Browse Source

书籍封面模式

visuddhinanda 4 years ago
parent
commit
9eaea74b8f
2 changed files with 30 additions and 11 deletions
  1. 10 6
      app/palicanon/palicanon.js
  2. 20 5
      app/palicanon/style.css

+ 10 - 6
app/palicanon/palicanon.js

@@ -101,7 +101,7 @@ function tag_changed() {
 					}
 				}
 
-				if (arrBookList.length < 100 || (arrBookList.length > 100 && iterator.level == 1)) {
+				if (arrBookList.length < 50 || (arrBookList.length > 50 && iterator.level == 1)) {
 					arrChapter.push(iterator);
 				}
 			}
@@ -117,6 +117,11 @@ function tag_changed() {
 			tag_render_others();
 			palicanon_chapter_list_apply(0);
 			$("#list-1").html(render_chapter_list(arrChapter));
+			if (arrBookList.length < 50) {
+				$("#list_shell_1").removeClass("book_view");
+			} else {
+				$("#list_shell_1").addClass("book_view");
+			}
 		}
 	);
 }
@@ -407,11 +412,10 @@ function sortNumber(a, b) {
 }
 
 function tag_list_slide_toggle(element) {
-	if($(element).html().indexOf("⮟")!= -1){
-		$(element).html("⮝")
-	}
-	else{
-		$(element).html("⮟")
+	if ($(element).html().indexOf("⮟") != -1) {
+		$(element).html("⮝");
+	} else {
+		$(element).html("⮟");
 	}
 	$("#tag_list").slideToggle();
 }

+ 20 - 5
app/palicanon/style.css

@@ -163,6 +163,7 @@ tag {
 }
 .chapter_list ul li:hover {
 	background-color: darkorange;
+	cursor: pointer;
 }
 .chapter_list .resource {
 	display: flex;
@@ -170,6 +171,7 @@ tag {
 	margin-bottom: auto;
 }
 .chapter_list .title .title_1 {
+	color: var(--main-color);
 	font-weight: 700;
 	font-size: 110%;
 }
@@ -215,11 +217,7 @@ tag {
 	text-align: center;
 }
 .chapter_head .title .title_1 {
-	font-size: 120%;
-	padding: 1em 0 0.5em 0;
-	font-weight: 700;
-}
-.chapter_head .title .title_1 {
+	color: var(--main-color);
 	font-size: 120%;
 	padding: 1em 0 0.5em 0;
 	font-weight: 700;
@@ -256,3 +254,20 @@ tag {
 	display: flex;
 	justify-content: space-between;
 }
+
+.book_view .grid {
+	width: 100%;
+}
+.book_view ul {
+	border-right: unset;
+}
+.book_view ul li {
+	width: 180px;
+	height: 250px;
+	margin: 1em;
+	border: 10px solid wheat;
+}
+.book_view ul {
+	display: flex;
+	flex-flow: wrap;
+}