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

Merge pull request #558 from visuddhinanda/master

图标和文字平齐
visuddhinanda 4 лет назад
Родитель
Сommit
dcc41c5bb0
4 измененных файлов с 33 добавлено и 17 удалено
  1. 12 12
      app/article/article.js
  2. 13 2
      app/article/index.php
  3. 2 0
      app/article/style.css
  4. 6 3
      app/term/note.js

+ 12 - 12
app/article/article.js

@@ -131,16 +131,16 @@ function articleFillFootNavButton(article_list,curr_article){
 		const element = article_list[index];
 		if(element.article==curr_article){
 			if(index!=0){
-				$("#contents_nav_left").html(article_list[index-1].title);
+				$("#contents_nav_left_inner").html(article_list[index-1].title);
 				prevArticle = article_list[index-1].article;
 			}else{
-				$("#contents_nav_left").html("无");
+				$("#contents_nav_left_inner").html("无");
 			}
 			if(index!=article_list.length-1){
-				$("#contents_nav_right").html(article_list[index+1].title);
+				$("#contents_nav_right_inner").html(article_list[index+1].title);
 				nextArticle = article_list[index+1].article;
 			}else{
-				$("#contents_nav_right").html("无");
+				$("#contents_nav_right_inner").html("无");
 			}
 		}
 	}
@@ -520,12 +520,12 @@ function fill_sent_nav(){
 	$("#contents_nav_right").hide();
 }
 function fill_sent_nav(){
-	$("#contents_nav_left").html("");
-	$("#contents_nav_right").html("");
+	$("#contents_nav_left_inner").html("");
+	$("#contents_nav_right_inner").html("");
 }
 function fill_para_nav(){
-	$("#contents_nav_left").html(_par-1);
-	$("#contents_nav_right").html(_par+1);
+	$("#contents_nav_left_inner").html(_par-1);
+	$("#contents_nav_right_inner").html(_par+1);
 }
 function fill_chapter_nav(){
 	if(prevChapter>0){
@@ -538,10 +538,10 @@ function fill_chapter_nav(){
 				par: prevChapter,
 			}
 		).done(function (data) {
-			$("#contents_nav_left").html(data.data.toc);
+			$("#contents_nav_left_inner").html(data.data.toc);
 		});		
 	}else{
-		$("#contents_nav_left").html("无");
+		$("#contents_nav_left_inner").html("无");
 	}
 	if(nextChapter>0){
 		$.getJSON(
@@ -553,10 +553,10 @@ function fill_chapter_nav(){
 				par: nextChapter,
 			}
 		).done(function (data) {
-			$("#contents_nav_right").html(data.data.toc);
+			$("#contents_nav_right_inner").html(data.data.toc);
 		});		
 	}else{
-		$("#contents_nav_right").html("无");
+		$("#contents_nav_right_inner").html("无");
 
 	}
 }

+ 13 - 2
app/article/index.php

@@ -343,8 +343,19 @@ function set_toc_visible(isVisible){
 			</div>
 			<div id="contents_foot">
 				<div id="contents_nav" style="display:flex;justify-content: space-between;">
-					<div id="contents_nav_left" class="nav_bnt nav_left" onclick="goto_prev()">上一个</div>
-					<div id="contents_nav_right"  class="nav_bnt nav_right" onclick="goto_next()">下一个</div>
+					<div id="contents_nav_left" class="nav_bnt nav_left" onclick="goto_prev()">
+					<svg class='icon' style='fill: var(--box-bg-color1)'>
+						<use xlink:href='../../node_modules/bootstrap-icons/bootstrap-icons.svg#chevron-left'>
+					</svg>
+					<span id="contents_nav_left_inner" ></span>
+					</div>
+					<div id="contents_nav_right"  class="nav_bnt nav_right" onclick="goto_next()">
+					<span id="contents_nav_right_inner" ></span>		
+					<svg class='icon' style='fill: var(--box-bg-color1)'>
+						<use xlink:href='../../node_modules/bootstrap-icons/bootstrap-icons.svg#chevron-right'>
+					</svg>
+							
+					</div>
 				</div>
 				<div id="contents_dicuse">
 				

+ 2 - 0
app/article/style.css

@@ -8,6 +8,8 @@
 .icon {
 	width: 15px;
 	height: 15px;
+	margin-top: 4px;
+    margin-bottom: -2px;
 }
 .submenu_title {
 	font-size: 120%;

+ 6 - 3
app/term/note.js

@@ -714,9 +714,12 @@ function note_json_html(in_json) {
 		"<span class='other_tran_span' title='🧲" +
 		gLocal.gui.other +
 		gLocal.gui.translation +
-		"'><svg class='icon' style='fill: var(--box-bg-color1)'><use xlink:href=\"../studio/svg/icon.svg#more_tran\"></svg>" +
-		gLocal.gui.translation +
-		"</span>";
+		"'>";
+	output += "<svg class='icon' style='fill: var(--box-bg-color1)'>";
+	output += "<use xlink:href='../../node_modules/bootstrap-icons/bootstrap-icons.svg#translate'>";
+	output += "</svg>" ;
+	output +=	gLocal.gui.translation ;
+	output += "</span>";
 	output += "<span class='other_tran_num'></span>";
 	output += "</span>";
 	output += "<span class='separate_line'></span>";