Skip to content

Commit 314fd3e

Browse files
author
vaifix
committed
1. Fix the bug that sometimes the latest comments exceed the container.
2. Add search function. 3. Fix the problem of the directory being too long and exceeding the screen. 4. Fix the issue where the directory rendering is abnormal in some cases. 5. Other minor optimizations.
1 parent 914c3f1 commit 314fd3e

File tree

7 files changed

+310
-140
lines changed

7 files changed

+310
-140
lines changed

src/Ankia-Theme.css

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Ankia-Theme v1.4
2+
* Ankia-Theme v1.5
33
* https://ankia.top/
44
*
55
* Licensed Apache-2.0 © 东东
@@ -347,6 +347,9 @@ a {
347347
opacity: 0;
348348
display: none;
349349
}
350+
.searchContainerStyle {
351+
width: 80% !important;
352+
}
350353
}
351354

352355
#title {
@@ -641,6 +644,9 @@ iframe.pdf-view {
641644
animation: fromRightToLeftAppearing 1s ease-in-out;
642645
border-left: 2px solid #d9dde4;
643646
padding-left: 15px;
647+
margin-right: 15px;
648+
max-height: 80vh;
649+
overflow: auto;
644650
}
645651

646652
.tocActive {
@@ -906,6 +912,11 @@ ul#toc {
906912
text-align: justify;
907913
}
908914

915+
#latestComment {
916+
display: flex;
917+
flex-direction: column;
918+
}
919+
909920
#mobileMenuContainer {
910921
margin-top: 60px;
911922
display: none;
@@ -1007,3 +1018,54 @@ ul#toc {
10071018
background: #999999;
10081019
transform: translateY(-5px);
10091020
}
1021+
1022+
/*搜索*/
1023+
.searchContainerStyle {
1024+
position: fixed;
1025+
top: 80px;
1026+
display: none;
1027+
align-items: center;
1028+
background-color: #fff;
1029+
border-radius: 5px;
1030+
flex-direction: column;
1031+
width: 50%;
1032+
cursor: pointer;
1033+
box-shadow: 0 1px 3px rgb(0 0 0 / 18%);
1034+
padding: 20px;
1035+
z-index: 1000;
1036+
max-height: 60%;
1037+
overflow: auto;
1038+
animation: slideIn 0.5s ease-in-out;
1039+
}
1040+
1041+
#searchInput {
1042+
border: none;
1043+
border-bottom: 1px solid blanchedalmond;
1044+
padding: 5px;
1045+
width: 90%;
1046+
outline: none;
1047+
}
1048+
1049+
.searchItems {
1050+
font-weight: bold;
1051+
}
1052+
.itemsTitle {
1053+
margin: 0.4em 0em;
1054+
padding-left: 0.5em;
1055+
border-left: 1px solid #d9d3d3;
1056+
}
1057+
.searchItems:hover {
1058+
color: burlywood;
1059+
}
1060+
1061+
#searchResults {
1062+
width: 90%;
1063+
margin-top: 1em;
1064+
}
1065+
1066+
#toc-pane::-webkit-scrollbar {
1067+
width: 1px;
1068+
}
1069+
#toc-pane::-webkit-scrollbar-thumb {
1070+
background-color: var(--blue);
1071+
}

0 commit comments

Comments
 (0)