style.css 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. /**
  2. teedoc search plugin css
  3. @author neucrack
  4. @copyright (c) neucrack CZD666666@gmail.com with MIT License
  5. @changes 2021.2.1 add basic attrributes
  6. */
  7. .blur {
  8. -webkit-filter: blur(9px);
  9. filter: blur(9px);
  10. }
  11. .pointer {
  12. cursor: pointer;
  13. }
  14. .dark #search {
  15. background-color: #2d2d2d;
  16. }
  17. #search {
  18. border-radius: 2em;
  19. background-color: #f1f1f1;
  20. display: flex;
  21. flex-direction: row;
  22. justify-content: center;
  23. align-items: center;
  24. transition: 0.4s;
  25. }
  26. #search .icon {
  27. transition: transform 0.4s linear;
  28. background: url("/static/image/search/search.svg");
  29. background-size: contain;
  30. background-repeat: no-repeat;
  31. background-position: center;
  32. align-self: center;
  33. min-height: 1.8rem;
  34. min-width: 1.8rem;
  35. transition: 0.2s;
  36. }
  37. #search .placeholder {
  38. padding: 0 1em;
  39. color: #a5a5a5;
  40. }
  41. #search_hints {
  42. display: none;
  43. }
  44. #search_wrapper {
  45. display: none;
  46. position: fixed;
  47. top: 0;
  48. bottom: 0;
  49. left: 0;
  50. right: 0;
  51. background-color: rgba(0, 0, 0, 0.73);
  52. z-index: 100;
  53. }
  54. .dark #search_wrapper {
  55. background-color: transparent;
  56. }
  57. #search_wrapper input:focus{
  58. outline: none;
  59. border: 1px solid #58b195;
  60. }
  61. #search_wrapper .close {
  62. background: url("/static/image/search/close.svg");
  63. background-size: contain;
  64. background-repeat: no-repeat;
  65. background-position: center;
  66. border-radius: 0.5em;
  67. min-height: 2.5rem;
  68. min-width: 2.5rem;
  69. z-index: 100;
  70. position: fixed;
  71. top: 3em;
  72. right: 3em;
  73. cursor: pointer;
  74. }
  75. #search_title {
  76. margin: 1em;
  77. }
  78. #search_wrapper #search_title > div {
  79. display: flex;
  80. flex-direction: row;
  81. justify-content: center;
  82. }
  83. #search_wrapper input {
  84. height: 60px;
  85. width: 60%;
  86. border: none;
  87. border-radius: 0.5em;
  88. margin: 0;
  89. text-align: center;
  90. color: #222222;
  91. font-size: 1.2em;
  92. display: inline-block;
  93. box-shadow: 0 0 12px 0 #e8e8e8;
  94. }
  95. .dark #search_wrapper input {
  96. box-shadow: 0 0 12px 0 #000000;
  97. background-color: black;
  98. color: white;
  99. }
  100. #search_wrapper > div {
  101. display: flex;
  102. height: 100%;
  103. }
  104. #search_wrapper #search_content {
  105. display: flex;
  106. flex-direction: column;
  107. width: 75%;
  108. height: 100%;
  109. background-color: white;
  110. margin: auto;
  111. padding: 0;
  112. border-radius: 0.5em;
  113. }
  114. .dark #search_wrapper #search_content {
  115. background-color: #3c3c3c;
  116. }
  117. #search_result {
  118. height: 100%;
  119. display: flex;
  120. flex-direction: row;
  121. overflow: auto;
  122. }
  123. #search_result h1 {
  124. font-size: 1.2em;
  125. }
  126. #search_result_name {
  127. overflow-y: auto;
  128. min-width: max-content;
  129. }
  130. #search_result_content {
  131. overflow-y: auto;
  132. flex-grow: 1;
  133. }
  134. #search_result ul {
  135. padding-left: 0;
  136. list-style: none;
  137. }
  138. #search_result li {
  139. box-shadow: 0 0 10px #e0e0e0;
  140. list-style: none;
  141. padding: 1em;
  142. margin: 1em;
  143. border-radius: 0.5em;
  144. transition: 0.4s;
  145. background-color: white;
  146. }
  147. .dark #search_result li {
  148. background-color: #2d2d2d;
  149. box-shadow: 0 0 2px #000000;
  150. }
  151. #search_result #search_result_name li {
  152. margin: 0.5em 1em 0.5em 0;
  153. background: #4caf7d;
  154. color: white;
  155. border-radius: 0;
  156. }
  157. .dark #search_result #search_result_name li {
  158. background: #1b4c33;
  159. }
  160. #search_result #search_result_name li:hover {
  161. margin-right: 0;
  162. }
  163. #search_result li:hover {
  164. box-shadow: 0px 5px 14px #868686;
  165. }
  166. .dark #search_result li:hover{
  167. box-shadow: 0px 5px 14px #1d1d1d;
  168. }
  169. #search_result code {
  170. background-color: #4caf7d;
  171. color: white;
  172. border-radius: 0.2em;
  173. padding: 0.1em;
  174. }
  175. #search_result .loading_hint {
  176. color: red;
  177. }
  178. #search_curr_result {
  179. margin-top: 0;
  180. padding-bottom: 3em;
  181. border: 1px solid #4caf7d;
  182. border-radius: 5px;
  183. }
  184. #search_others_result {
  185. padding-bottom: 3em;
  186. border: 1px solid #bdbdbd;
  187. border-radius: 5px;
  188. }
  189. .dark #search_curr_result {
  190. border: 1px solid #1b4c33;
  191. }
  192. .dark #search_others_result {
  193. border: 1px solid #696969;
  194. }
  195. #search_curr_result:first-child,
  196. #search_others_result:first-child {
  197. border-radius: 5px;
  198. }
  199. #search_result .hint {
  200. height: 2em;
  201. color: white;
  202. font-size: 1.5em;
  203. display: flex;
  204. justify-content: center;
  205. flex-direction: column;
  206. text-align: center;
  207. border-top: none;
  208. box-shadow: 0 6px 7px rgba(76, 175, 125, 0.38);
  209. background: #4caf7d;
  210. }
  211. .dark #search_result .hint {
  212. background: #1b4c33;
  213. }
  214. #search_curr_result > .hint {
  215. background-color: #4caf7d;
  216. }
  217. #search_curr_result .searching {
  218. background-color: #ff9800;
  219. }
  220. .search_highlight {
  221. background-color: #FFEB3B;
  222. border-radius: 0.2em;
  223. padding: 0.1em;
  224. }
  225. .dark .search_highlight{
  226. color: #1b1b1b;
  227. }
  228. .selected_highlight {
  229. background-color: #ff9823;
  230. }
  231. #search_ctrl_btn {
  232. position: fixed;
  233. top: 2em;
  234. right: 1em;
  235. display: flex;
  236. flex-direction: row;
  237. z-index: 999;
  238. user-select: none;
  239. }
  240. #search_ctrl_btn > div {
  241. border-radius: 0.2em;
  242. min-width: 5em;
  243. min-height: 2.5em;
  244. background-color: #fae94e;
  245. margin: 0.2em;
  246. display: flex;
  247. flex-direction: row;
  248. align-items: center;
  249. justify-content: center;
  250. padding: 0.2em;
  251. cursor: pointer;
  252. box-shadow: 0 0 12px 0 rgb(0, 0, 0, 0.06);
  253. transition: 0.4s;
  254. color: #8b7000;
  255. }
  256. #search_ctrl_btn > div:hover {
  257. box-shadow: 0 0 12px 0 rgb(0, 0, 0, 0.2);
  258. }
  259. #search_ctrl_btn > .previous .icon {
  260. background-image: url("/static/image/search/up.svg");
  261. -ms-transform: rotate(270deg);
  262. -moz-transform: rotate(270deg);
  263. -webkit-transform: rotate(270deg);
  264. transform: rotate(270deg);
  265. background-size: 2em;
  266. background-repeat: no-repeat;
  267. background-position: center;
  268. min-height: 1.5em;
  269. min-width: 1.5em;
  270. height: 1.5em;
  271. width: 1.5em;
  272. }
  273. #search_ctrl_btn > .next .icon {
  274. background-image: url("/static/image/search/up.svg");
  275. -ms-transform: rotate(90deg);
  276. -moz-transform: rotate(90deg);
  277. -webkit-transform: rotate(90deg);
  278. transform: rotate(90deg);
  279. background-size: 2em;
  280. background-repeat: no-repeat;
  281. background-position: center;
  282. min-height: 1.5em;
  283. min-width: 1.5em;
  284. height: 1.5em;
  285. width: 1.5em;
  286. }
  287. #remove_search > .icon {
  288. background-image: url("/static/image/search/cancel.svg");
  289. background-size: 2em;
  290. background-repeat: no-repeat;
  291. background-position: center;
  292. min-height: 1.5em;
  293. min-width: 1.5em;
  294. height: 1.5em;
  295. width: 1.5em;
  296. }
  297. @media screen and (max-width: 900px) {
  298. #search_wrapper #search_content {
  299. width: 100%;
  300. height: 100%;
  301. border-radius: 0;
  302. }
  303. #search_wrapper input {
  304. font-size: 0.8em;
  305. }
  306. #search_wrapper .close {
  307. top: 1.5em;
  308. right: 1em;
  309. }
  310. #search_result li {
  311. margin: 0;
  312. }
  313. #search_result #search_result_name li {
  314. font-size: 0.8em;
  315. }
  316. #search_curr_result > .hint {
  317. font-size: 1.2em;
  318. }
  319. #search_result .hint {
  320. font-size: 1.2em;
  321. }
  322. }