Просмотр исходного кода

Display which tag is being filtered in the title

Lucas Stadler лет назад: 9
Родитель
Сommit
7eb9ef0fe4
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      go/blog/blog.go

+ 5 - 0
go/blog/blog.go

249
	fmt.Fprintf(out, `
249
	fmt.Fprintf(out, `
250
250
251
	<script>
251
	<script>
252
	var baseTitle = document.title;
253
252
	var currentFilter = null;
254
	var currentFilter = null;
253
255
254
	window.addEventListener("DOMContentLoaded", function(ev) {
256
	window.addEventListener("DOMContentLoaded", function(ev) {
312
				article.classList.add("does-not-match");
314
				article.classList.add("does-not-match");
313
			}
315
			}
314
		}
316
		}
317
318
		document.title = baseTitle + " (Posts tagged '" + tag + "')";
315
	}
319
	}
316
320
317
	function clearFilter() {
321
	function clearFilter() {
321
		}
325
		}
322
326
323
		currentFilter = null;
327
		currentFilter = null;
328
		document.title = baseTitle;
324
	}
329
	}
325
	</script>`)
330
	</script>`)
326
	fmt.Fprintf(out, "\n</body>\n</html>\n")
331
	fmt.Fprintf(out, "\n</body>\n</html>\n")