Ver Fonte

文章标题显示在页面标题上

visuddhinanda há 5 anos atrás
pai
commit
bbba8e027e
3 ficheiros alterados com 6 adições e 1 exclusões
  1. 2 0
      app/article/article.js
  2. 3 0
      app/article/print.css
  3. 1 1
      app/pcdl/html_head.php

+ 2 - 0
app/article/article.js

@@ -24,6 +24,7 @@ function articel_load(id) {
 					let result = JSON.parse(data);
 					if (result) {
 						$("#article_title").html(result.title);
+						$("#page_title").html(result.title);
 						$("#article_subtitle").html(result.subtitle);
 						$("#article_author").html(result.username.nickname + "@" + result.username.username);
 						$("#contents").html(note_init(result.content));
@@ -55,6 +56,7 @@ function collect_load(id) {
 					let result = JSON.parse(data);
 					if (result) {
 						$("#article_title").html(result.title);
+						$("#page_title").html(result.title);
 						if (result.subtitle) {
 							$("#article_subtitle").html(result.subtitle);
 						}

+ 3 - 0
app/article/print.css

@@ -26,3 +26,6 @@ note {
 #contents_div {
 	padding: 0;
 }
+note > .tran {
+	color: #000000;
+}

+ 1 - 1
app/pcdl/html_head.php

@@ -60,7 +60,7 @@ if (isset($_GET["language"])) {
 	<link rel="manifest" href="../public/images/favicon/site.webmanifest">
 	<link rel="mask-icon" href="../public/images/favicon/safari-pinned-tab.svg" color="#333333">
 
-	<title>wikipāḷi</title>
+	<title id="page_title">wikipāḷi</title>
 
 	<script src="../public/js/jquery.js"></script>
 	<script src="../public/js/comm.js"></script>