diff options
| author | BigCoke233 <hi@guhub.cn> | 2020-03-28 16:32:44 +0800 |
|---|---|---|
| committer | BigCoke233 <hi@guhub.cn> | 2020-03-28 16:32:44 +0800 |
| commit | 3d7f72862c6bfe897567a5f29f0ac46be4b2fe6d (patch) | |
| tree | c97772ca03ba5c92fd759decc29b7e2140e34fc1 /assets | |
| parent | 7f28079d5aff966a202fbcbb1af21d7ee88c9f5e (diff) | |
:star: Perf: 优化代码结构
Diffstat (limited to 'assets')
| -rw-r--r-- | assets/css/main/dark.css | 324 | ||||
| -rw-r--r-- | assets/css/main/themes.css | 337 | ||||
| -rw-r--r-- | assets/js/miracles.min.js | 2 |
3 files changed, 326 insertions, 337 deletions
diff --git a/assets/css/main/dark.css b/assets/css/main/dark.css deleted file mode 100644 index 8d42937..0000000 --- a/assets/css/main/dark.css +++ /dev/null @@ -1,324 +0,0 @@ -@charset 'utf-8';
-
-/*
- * Dark theme for Miracles
- * Author: Eltrac
- * License: MIT
- */
-
-.body-dark {
- background:#4b4b4b;
- color:#fafafa
-}
-
-/**
- * Special
- */
-
-/* Post Content */
-.body-dark .post-content code {
- background:#505050
-}
-.body-dark .post-content tr:nth-child(odd) {
- background:#6e6e6e
-}
-.body-dark .post-content hr {
- border: 3px dashed #787878!important
-}
-/* Pio Plugin */
-.body-dark .pio-container .pio-dialog {
- color:#fff;
- box-shadow:1px 1px 15px #505050;
- -webkit-box-shadow:1px 1px 15px #505050;
- -moz-box-shadow:1px 1px 15px #505050;
- background:rgba(90,90,90,.9)
-}
-.body-dark .pio-action span {
- background-color:rgba(90,90,90,.9)
-}
-/* Aplayer */
-.body-dark .aplayer,
-.body-dark .aplayer .aplayer-author,
-.body-dark .aplayer .aplayer-controller,
-.body-dark .aplayer .aplayer-icon,
-.body-dark .aplayer .aplayer-info,
-.body-dark .aplayer .aplayer-lrc-contents p,
-.body-dark .aplayer-list-author,
-.body-dark .aplayer-list-index {
- color:#f0f0f0!important
-}
-.body-dark .aplayer {
- background:#646464
-}
-.body-dark .aplayer .aplayer-list ol li:hover,
-.body-dark .aplayer-list-light {
- background:#8c8c8c!important
-}
-.body-dark .aplayer .aplayer-lrc:after,
-.body-dark .aplayer .aplayer-lrc:before {
- background:0 0;
- background:0 0;
- filter:none
-}
-.body-dark .aplayer .aplayer-list ol li {
- border-color:#787878
-}
-.body-dark .aplayer-list::-webkit-scrollbar {
- background:#6e6e6e!important
-}
-.body-dark .aplayer-list::-webkit-scrollbar-thumb {
- background:#505050
-}
-.body-dark .aplayer-info {
- border:none
-}
-/* Nav/Search/login */
-.body-dark .nav {
- background:rgba(50,50,50,.86) !important;
- box-shadow:0 0 20px #000;
- -webkit-box-shadow:0 0 20px #000;
- -moz-box-shadow:0 0 30px #000
-}
-.body-dark .mobile-menu-pagelist a:hover,
-.body-dark .nav a:hover,
-.body-dark .nav-mobile-title:hover {
- background:#646464
-}
-.body-dark .nav-icon-button {
- background:#5a5a5a
-}
-.body-dark .nav-icon-button {
- color:#fff
-}
-.body-dark .nav-icon-button:hover,
-.body-dark .search-close {
- background:#5a5a5a
-}
-.body-dark .login,
-.body-dark .mobile-menu,
-.body-dark .search,
-.body-dark .bangumi-des {
- background:rgba(90,90,90,.95)
-}
-/* Bangumi */
-.body-dark .bangumi-progress {
- background: gray
-}
-.body-dark .bangumi-progress-bar {
- background: rgb(180,180,180)
-}
-
-/* Others */
-.body-dark .post-meta a {
- color: gray!important
-}
-.body-dark .comment-reply a {
- background: 0 0
-}
-.body-dark .footer-info {
- background:#3c3c3c!important
-}
-
-/**
- * Normal
- */
-/* Need shadow */
-.body-dark .options {
- box-shadow:0 0 0 #fff;
- -moz-box-shadow:0 0 0 #fff;
- -webkit-box-shadow:0 0 0 #fff
-}
-.body-dark .OwO .OwO-body .OwO-items .OwO-item:hover,
-.body-dark .OwO-body,.body-dark .OwO-open .OwO-logo,
-.body-dark .bubble.saying-body:hover,
-.body-dark .comment-pagenav a,
-.body-dark .dark-button,
-.body-dark .options,
-.body-dark .post-body,
-.body-dark .saying-item,
-.body-dark .post-item,
-.body-dark .post-pagenav a,
-.body-dark #comment-form {
- box-shadow:0 1px 10px #323232;
- -moz-box-shadow:0 1px 10px #323232;
- -webkit-box-shadow:0 1px 10px #323232
-}
-.body-dark .gotop-button,
-.body-dark .links-item,
-.body-dark .alert {
- box-shadow:0 1px 3px #323232;
- -moz-box-shadow:0 1px 3px #323232;
- -webkit-box-shadow:0 1px 3px #323232
-}
-.body-dark .gotop-button:hover,
-.body-dark .links-item:hover {
- box-shadow:0 4px 22px #323232;
- -moz-box-shadow:0 4px 22px #323232;
- -webkit-box-shadow:0 4px 22px #323232;
-}
-/* No Shadow */
-.body-dark .options-with-drawer {
- box-shadow: 0 0 0 #fff;
- -moz-box-shadow: 0 0 0 #fff;
- -webkit-box-shadow: 0 0 0 #fff;
-}
-/* Need #646464 bg */
-.body-dark .archives-list a:hover,
-.body-dark .bubble.comment-content,
-.body-dark .bubble.saying-body,
-.body-dark .comment-author,
-.body-dark .comment-by-author .bubble.comment-content,
-.body-dark .comment-pagenav a,
-.body-dark .comment-submit button,
-.body-dark .drawer-content a:hover,
-.body-dark .drawer-footer,
-.body-dark .drawer-header,
-.body-dark .options-button-active,
-.body-dark .tags-item a,
-.body-dark .post-tags a,
-.body-dark .about-social a:hover,
-.body-dark .comment-hidden {
- background: #646464!important
-}
-/* Need #5a5a5a bg */
-.body-dark .OwO-body,
-.body-dark .OwO-logo,
-.body-dark .OwO-package-active,
-.body-dark .OwO-packages li:hover,
-.body-dark .comment-form input,
-.body-dark .comment-form textarea,
-.body-dark .saying-item textarea,
-.body-dark .comment-reply a:hover,
-.body-dark .dark-button,.body-dark .dialog,
-.body-dark .drawer,
-.body-dark .drawer-icon,
-.body-dark .gotop-button,.body-dark .links-item,
-.body-dark .options,
-.body-dark .options-family-button,
-.body-dark .options-theme-label,
-.body-dark .post-body,
-.body-dark .saying-item,
-.body-dark .post-content th,
-.body-dark .post-item,
-.body-dark .post-pagenav a,
-.body-dark .search-form input,
-.body-dark .login-form button,
-.body-dark .login-enter-admin,
-.body-dark #comment-form,
-.body-dark .comment-by-author > .comment-body-inner > .comment-main > .comment-meta > .comment-date:before {
- background:#5a5a5a!important
-}
-/* Need #6e6e6e bg */
-.body-dark .OwO-bar,
-.body-dark .OwO-item,
-.body-dark .index-banner,
-.body-dark .comment-submit {
- background-color:#6e6e6e!important
-}
-.body-dark .index-banner {
- background-color: rgb(80,80,80)!important
-}
-/* Need white fonts */
-.body-dark .login-enter-admin,
-.body-darl .login-form button,
-.body-dark .OwO-bar,
-.body-dark .OwO-logo,
-.body-dark .comment,
-.body-dark .comment a,
-.body-dark .comment-content p,
-.body-dark .comment-form input,
-.body-dark .comment-form textarea,
-.body-dark .saying-item textarea,
-.body-dark .dark-button,
-.body-dark .drawer,
-.body-dark .drawer a,
-.body-dark .drawer-icon,
-.body-dark .drawer-open .drawer-button,
-.body-dark .footer-info,
-.body-dark .footer-info a,
-.body-dark .gotop-button,
-.body-dark .login,
-.body-dark .login-close,
-.body-dark .mobile-menu,
-.body-dark .mobile-menu a,
-.body-dark .mobile-menu-close,
-.body-dark .mobile-menu-footer,
-.body-dark .nav,
-.body-dark .nav a,
-.body-dark .options-contentsize-button,
-.body-dark .options-family-button,
-.body-dark .options-theme-item:hover .options-theme-label,
-.body-dark .post-body,
-.body-dark .saying-item,
-.body-dark .saying-item a,
-.body-dark .post-body a,
-.body-dark .post-content blockquote,
-.body-dark .post-item,
-.body-dark .post-item a,
-.body-dark .search-close,
-.body-dark .search-form button,
-.body-darl .login a,
-.body-dark .banner-content.banner-font-black,
-.body-dark .post-pagenav a,
-.body-dark .comment-submit,
-.body-dark .header-meta a,
-.body-dark .alert,
-.body-dark .respond input,
-.body-dark .respond textarea {
- color:#fafafa!important
-}
-.body-dark .options-theme-label {
- color:#5a5a5a!important
-}
-/* Need border color */
-.body-dark .OwO-body,
-.body-dark .OwO-logo,
-.body-dark .comment-form input,
-.body-dark .comment-form textarea,
-.body-dark .saying-item textarea,
-.body-dark .drawer,
-.body-dark .mobile-menu-footer,
-.body-dark .mobile-menu-title,
-.body-dark .options hr,
-.body-dark .post-content blockquote,
-.body-dark .post-content table,
-.body-dark .post-content td,
-.body-dark .post-content th,
-.body-dark .post-content tr,
-.body-dark .saying-hr,
-.body-dark .post-share {
- border-color:#6e6e6e!important
-}
-.body-dark .tip {
- border-top-color:#6e6e6e!important;
- border-bottom-color:#6e6e6e!important;
- border-right-color:#6e6e6e!important
-}
-.body-dark .bubble.comment-content:before,
-.body-dark .bubble.saying-body:before,
-.body-dark .comment-by-author .bubble.comment-content:before {
- border-right-color:#646464!important
-}
-/* Need darker mask */
-.body-dark .banner-mask {
- background:rgba(10,10,10,.4)
-}
-/* Need filter */
-.body-dark img,
-.body-dark .links-img {
- filter:brightness(80%)
-}
-.body-dark .aplayer-pic,
-.body-dark .post-banner,
-.body-dark iframe {
- filter:brightness(72%)
-}
-/* Dark shade */
-.body-dark .dark-shade {
- position:fixed;
- width:100%;
- height:100%;
- background-color:#00000085;
- z-index:100;
- pointer-events:none
-}
diff --git a/assets/css/main/themes.css b/assets/css/main/themes.css index 4ae937f..c54cc01 100644 --- a/assets/css/main/themes.css +++ b/assets/css/main/themes.css @@ -4,13 +4,328 @@ * Author: Eltrac
* License: MIT
*/
-/* Dark theme */
-@import url("dark.css");
-/* Serif */
+
+/**
+ * Font
+ */
.body-serif {
font-family: 'Noto Serif SC',serif
}
-/* Gray Filter */
+
+/**
+ * Dark
+ */
+.body-dark {
+ background:#4b4b4b;
+ color:#fafafa
+}
+/* Post Content */
+.body-dark .post-content code {
+ background:#505050
+}
+.body-dark .post-content tr:nth-child(odd) {
+ background:#6e6e6e
+}
+.body-dark .post-content hr {
+ border: 3px dashed #787878!important
+}
+/* Pio Plugin */
+.body-dark .pio-container .pio-dialog {
+ color:#fff;
+ box-shadow:1px 1px 15px #505050;
+ -webkit-box-shadow:1px 1px 15px #505050;
+ -moz-box-shadow:1px 1px 15px #505050;
+ background:rgba(90,90,90,.9)
+}
+.body-dark .pio-action span {
+ background-color:rgba(90,90,90,.9)
+}
+/* Aplayer */
+.body-dark .aplayer,
+.body-dark .aplayer .aplayer-author,
+.body-dark .aplayer .aplayer-controller,
+.body-dark .aplayer .aplayer-icon,
+.body-dark .aplayer .aplayer-info,
+.body-dark .aplayer .aplayer-lrc-contents p,
+.body-dark .aplayer-list-author,
+.body-dark .aplayer-list-index {
+ color:#f0f0f0!important
+}
+.body-dark .aplayer {
+ background:#646464
+}
+.body-dark .aplayer .aplayer-list ol li:hover,
+.body-dark .aplayer-list-light {
+ background:#8c8c8c!important
+}
+.body-dark .aplayer .aplayer-lrc:after,
+.body-dark .aplayer .aplayer-lrc:before {
+ background:0 0;
+ background:0 0;
+ filter:none
+}
+.body-dark .aplayer .aplayer-list ol li {
+ border-color:#787878
+}
+.body-dark .aplayer-list::-webkit-scrollbar {
+ background:#6e6e6e!important
+}
+.body-dark .aplayer-list::-webkit-scrollbar-thumb {
+ background:#505050
+}
+.body-dark .aplayer-info {
+ border:none
+}
+/* Nav/Search/login */
+.body-dark .nav {
+ background:rgba(50,50,50,.86) !important;
+ box-shadow:0 0 20px #000;
+ -webkit-box-shadow:0 0 20px #000;
+ -moz-box-shadow:0 0 30px #000
+}
+.body-dark .mobile-menu-pagelist a:hover,
+.body-dark .nav a:hover,
+.body-dark .nav-mobile-title:hover {
+ background:#646464
+}
+.body-dark .nav-icon-button {
+ background:#5a5a5a
+}
+.body-dark .nav-icon-button {
+ color:#fff
+}
+.body-dark .nav-icon-button:hover,
+.body-dark .search-close {
+ background:#5a5a5a
+}
+.body-dark .login,
+.body-dark .mobile-menu,
+.body-dark .search,
+.body-dark .bangumi-des {
+ background:rgba(90,90,90,.95)
+}
+/* Bangumi */
+.body-dark .bangumi-progress {
+ background: gray
+}
+.body-dark .bangumi-progress-bar {
+ background: rgb(180,180,180)
+}
+
+/* Others */
+.body-dark .post-meta a {
+ color: gray!important
+}
+.body-dark .comment-reply a {
+ background: 0 0
+}
+.body-dark .footer-info {
+ background:#3c3c3c!important
+}
+/* Need shadow */
+.body-dark .options {
+ box-shadow:0 0 0 #fff;
+ -moz-box-shadow:0 0 0 #fff;
+ -webkit-box-shadow:0 0 0 #fff
+}
+.body-dark .OwO .OwO-body .OwO-items .OwO-item:hover,
+.body-dark .OwO-body,.body-dark .OwO-open .OwO-logo,
+.body-dark .bubble.saying-body:hover,
+.body-dark .comment-pagenav a,
+.body-dark .dark-button,
+.body-dark .options,
+.body-dark .post-body,
+.body-dark .saying-item,
+.body-dark .post-item,
+.body-dark .post-pagenav a,
+.body-dark #comment-form {
+ box-shadow:0 1px 10px #323232;
+ -moz-box-shadow:0 1px 10px #323232;
+ -webkit-box-shadow:0 1px 10px #323232
+}
+.body-dark .gotop-button,
+.body-dark .links-item,
+.body-dark .alert {
+ box-shadow:0 1px 3px #323232;
+ -moz-box-shadow:0 1px 3px #323232;
+ -webkit-box-shadow:0 1px 3px #323232
+}
+.body-dark .gotop-button:hover,
+.body-dark .links-item:hover {
+ box-shadow:0 4px 22px #323232;
+ -moz-box-shadow:0 4px 22px #323232;
+ -webkit-box-shadow:0 4px 22px #323232;
+}
+/* No Shadow */
+.body-dark .options-with-drawer {
+ box-shadow: 0 0 0 #fff;
+ -moz-box-shadow: 0 0 0 #fff;
+ -webkit-box-shadow: 0 0 0 #fff;
+}
+/* Need #646464 bg */
+.body-dark .archives-list a:hover,
+.body-dark .bubble.comment-content,
+.body-dark .bubble.saying-body,
+.body-dark .comment-author,
+.body-dark .comment-by-author .bubble.comment-content,
+.body-dark .comment-pagenav a,
+.body-dark .comment-submit button,
+.body-dark .drawer-content a:hover,
+.body-dark .drawer-footer,
+.body-dark .drawer-header,
+.body-dark .options-button-active,
+.body-dark .tags-item a,
+.body-dark .post-tags a,
+.body-dark .about-social a:hover,
+.body-dark .comment-hidden {
+ background: #646464!important
+}
+/* Need #5a5a5a bg */
+.body-dark .OwO-body,
+.body-dark .OwO-logo,
+.body-dark .OwO-package-active,
+.body-dark .OwO-packages li:hover,
+.body-dark .comment-form input,
+.body-dark .comment-form textarea,
+.body-dark .saying-item textarea,
+.body-dark .comment-reply a:hover,
+.body-dark .dark-button,.body-dark .dialog,
+.body-dark .drawer,
+.body-dark .drawer-icon,
+.body-dark .gotop-button,.body-dark .links-item,
+.body-dark .options,
+.body-dark .options-family-button,
+.body-dark .options-theme-label,
+.body-dark .post-body,
+.body-dark .saying-item,
+.body-dark .post-content th,
+.body-dark .post-item,
+.body-dark .post-pagenav a,
+.body-dark .search-form input,
+.body-dark .login-form button,
+.body-dark .login-enter-admin,
+.body-dark #comment-form,
+.body-dark .comment-by-author > .comment-body-inner > .comment-main > .comment-meta > .comment-date:before {
+ background:#5a5a5a!important
+}
+/* Need #6e6e6e bg */
+.body-dark .OwO-bar,
+.body-dark .OwO-item,
+.body-dark .index-banner,
+.body-dark .comment-submit {
+ background-color:#6e6e6e!important
+}
+.body-dark .index-banner {
+ background-color: rgb(80,80,80)!important
+}
+/* Need white fonts */
+.body-dark .login-enter-admin,
+.body-darl .login-form button,
+.body-dark .OwO-bar,
+.body-dark .OwO-logo,
+.body-dark .comment,
+.body-dark .comment a,
+.body-dark .comment-content p,
+.body-dark .comment-form input,
+.body-dark .comment-form textarea,
+.body-dark .saying-item textarea,
+.body-dark .dark-button,
+.body-dark .drawer,
+.body-dark .drawer a,
+.body-dark .drawer-icon,
+.body-dark .drawer-open .drawer-button,
+.body-dark .footer-info,
+.body-dark .footer-info a,
+.body-dark .gotop-button,
+.body-dark .login,
+.body-dark .login-close,
+.body-dark .mobile-menu,
+.body-dark .mobile-menu a,
+.body-dark .mobile-menu-close,
+.body-dark .mobile-menu-footer,
+.body-dark .nav,
+.body-dark .nav a,
+.body-dark .options-contentsize-button,
+.body-dark .options-family-button,
+.body-dark .options-theme-item:hover .options-theme-label,
+.body-dark .post-body,
+.body-dark .saying-item,
+.body-dark .saying-item a,
+.body-dark .post-body a,
+.body-dark .post-content blockquote,
+.body-dark .post-item,
+.body-dark .post-item a,
+.body-dark .search-close,
+.body-dark .search-form button,
+.body-darl .login a,
+.body-dark .banner-content.banner-font-black,
+.body-dark .post-pagenav a,
+.body-dark .comment-submit,
+.body-dark .header-meta a,
+.body-dark .alert,
+.body-dark .respond input,
+.body-dark .respond textarea {
+ color:#fafafa!important
+}
+.body-dark .options-theme-label {
+ color:#5a5a5a!important
+}
+/* Need border color */
+.body-dark .OwO-body,
+.body-dark .OwO-logo,
+.body-dark .comment-form input,
+.body-dark .comment-form textarea,
+.body-dark .saying-item textarea,
+.body-dark .drawer,
+.body-dark .mobile-menu-footer,
+.body-dark .mobile-menu-title,
+.body-dark .options hr,
+.body-dark .post-content blockquote,
+.body-dark .post-content table,
+.body-dark .post-content td,
+.body-dark .post-content th,
+.body-dark .post-content tr,
+.body-dark .saying-hr,
+.body-dark .post-share {
+ border-color:#6e6e6e!important
+}
+.body-dark .tip {
+ border-top-color:#6e6e6e!important;
+ border-bottom-color:#6e6e6e!important;
+ border-right-color:#6e6e6e!important
+}
+.body-dark .bubble.comment-content:before,
+.body-dark .bubble.saying-body:before,
+.body-dark .comment-by-author .bubble.comment-content:before {
+ border-right-color:#646464!important
+}
+/* Need darker mask */
+.body-dark .banner-mask {
+ background:rgba(10,10,10,.4)
+}
+/* Need filter */
+.body-dark img,
+.body-dark .links-img {
+ filter:brightness(80%)
+}
+.body-dark .aplayer-pic,
+.body-dark .post-banner,
+.body-dark iframe {
+ filter:brightness(72%)
+}
+/* Dark shade */
+.body-dark .dark-shade {
+ position:fixed;
+ width:100%;
+ height:100%;
+ background-color:#00000085;
+ z-index:100;
+ pointer-events:none
+}
+
+/**
+ * Gray
+ */
.html-filter-gray {
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
@@ -19,12 +334,10 @@ -o-filter: grayscale(100%);
filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
}
-/* Sepia Filter */
-.html-filter-sepia {
- filter: sepia(30%);
- -webkit-filter: sepia(30%);
- -moz-filter: sepia(30%);
- -ms-filter: sepia(30%);
- -o-filter: sepia(30%);
- filter:progid:DXImageTransform.Microsoft.BasicImage(sepia=0.30);
+
+/**
+ * Sepia
+ */
+.body-sepia {
+ background: rgb(248,241,228)
}
\ No newline at end of file diff --git a/assets/js/miracles.min.js b/assets/js/miracles.min.js index 1e4af3f..05c301a 100644 --- a/assets/js/miracles.min.js +++ b/assets/js/miracles.min.js @@ -151,7 +151,7 @@ function highlight() { }
//owo
function owoLoad() {
- if($(".owo")){
+ if($(".OwO").length>0){
var OwO_demo = new OwO({
logo: 'OωO表情',
container: document.getElementsByClassName('OwO')[0],
|
