mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-20 19:02:33 +00:00
Refactor @import
This commit is contained in:
parent
1be8cbb18b
commit
989157a853
@ -1,14 +0,0 @@
|
|||||||
.back-to-top {
|
|
||||||
margin: 20px - $sidebar-offset -10px -20px;
|
|
||||||
opacity: 0;
|
|
||||||
transition: opacity $transition-ease;
|
|
||||||
|
|
||||||
&.back-to-top-on {
|
|
||||||
cursor: pointer;
|
|
||||||
opacity: $b2t-opacity;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
opacity: $b2t-opacity-hover;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,4 +1,27 @@
|
|||||||
|
if (hexo-config('back2top.enable')) {
|
||||||
.back-to-top {
|
.back-to-top {
|
||||||
|
font-size: $b2t-font-size;
|
||||||
|
|
||||||
|
if (not hexo-config('back2top.scrollpercent')) {
|
||||||
|
span {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hexo-config('back2top.sidebar')) {
|
||||||
|
margin: 20px - $sidebar-offset -10px -20px;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity $transition-ease;
|
||||||
|
|
||||||
|
&.back-to-top-on {
|
||||||
|
cursor: pointer;
|
||||||
|
opacity: $b2t-opacity;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
opacity: $b2t-opacity-hover;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
bottom: $b2t-position-bottom;
|
bottom: $b2t-position-bottom;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
color: $b2t-color;
|
color: $b2t-color;
|
||||||
@ -18,3 +41,5 @@
|
|||||||
bottom: $b2t-position-bottom-on;
|
bottom: $b2t-position-bottom-on;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,17 +1,3 @@
|
|||||||
if (hexo-config('back2top.enable')) {
|
|
||||||
.back-to-top {
|
|
||||||
font-size: $b2t-font-size;
|
|
||||||
|
|
||||||
if (not hexo-config('back2top.scrollpercent')) {
|
|
||||||
span {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@import (hexo-config('back2top.sidebar') ? 'back-to-top-sidebar' : 'back-to-top');
|
|
||||||
}
|
|
||||||
|
|
||||||
.noscript-warning {
|
.noscript-warning {
|
||||||
background-color: lighten($red, 20%);
|
background-color: lighten($red, 20%);
|
||||||
color: white;
|
color: white;
|
||||||
@ -26,7 +12,8 @@ if (hexo-config('back2top.enable')) {
|
|||||||
z-index: $zindex-5;
|
z-index: $zindex-5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@import 'reading-progress' if (hexo-config('reading_progress.enable'));
|
@import 'back-to-top';
|
||||||
|
@import 'reading-progress';
|
||||||
|
|
||||||
@import 'post';
|
@import 'post';
|
||||||
@import 'pages';
|
@import 'pages';
|
||||||
|
|||||||
@ -50,5 +50,4 @@
|
|||||||
@import 'post-footer';
|
@import 'post-footer';
|
||||||
@import 'post-widgets';
|
@import 'post-widgets';
|
||||||
@import 'post-reward';
|
@import 'post-reward';
|
||||||
|
@import 'post-followme';
|
||||||
@import 'post-followme' if (hexo-config('follow_me'));
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
if (hexo-config('follow_me')) {
|
||||||
.followme {
|
.followme {
|
||||||
color: $grey;
|
color: $grey;
|
||||||
padding: 1em 1.5em;
|
padding: 1em 1.5em;
|
||||||
@ -31,3 +32,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
if (hexo-config('reading_progress.enable')) {
|
||||||
.reading-progress-bar {
|
.reading-progress-bar {
|
||||||
--progress: 0;
|
--progress: 0;
|
||||||
background: unquote(hexo-config('reading_progress.color'));
|
background: unquote(hexo-config('reading_progress.color'));
|
||||||
@ -23,3 +24,4 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
if (hexo-config('gitalk.enable')) {
|
||||||
.gt-header a, .gt-comments a, .gt-popup a {
|
.gt-header a, .gt-comments a, .gt-popup a {
|
||||||
border-bottom: 0;
|
border-bottom: 0;
|
||||||
}
|
}
|
||||||
@ -5,3 +6,4 @@
|
|||||||
.gt-container .gt-popup .gt-action.is--active::before {
|
.gt-container .gt-popup .gt-action.is--active::before {
|
||||||
top: .7em;
|
top: .7em;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,12 +1,8 @@
|
|||||||
@import 'gitalk' if (hexo-config('gitalk.enable'));
|
@import 'gitalk';
|
||||||
|
@import 'utterances';
|
||||||
@import 'utterances' if (hexo-config('utterances.enable'));
|
@import 'search';
|
||||||
|
@import 'related-posts';
|
||||||
@import 'search' if (hexo-config('local_search.enable') || hexo-config('algolia_search.enable'));
|
@import 'math';
|
||||||
|
|
||||||
@import 'related-posts' if (hexo-config('related_posts.enable'));
|
|
||||||
|
|
||||||
@import 'math' if (hexo-config('math.mathjax.enable'));
|
|
||||||
|
|
||||||
.use-motion .animated {
|
.use-motion .animated {
|
||||||
// Fix issue #48 #55
|
// Fix issue #48 #55
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
if (hexo-config('math.mathjax.enable')) {
|
||||||
mjx-container[jax="CHTML"][display="true"], .has-jax {
|
mjx-container[jax="CHTML"][display="true"], .has-jax {
|
||||||
overflow: auto hidden;
|
overflow: auto hidden;
|
||||||
}
|
}
|
||||||
@ -5,3 +6,4 @@ mjx-container[jax="CHTML"][display="true"], .has-jax {
|
|||||||
mjx-container[display="true"] + br {
|
mjx-container[display="true"] + br {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
if (hexo-config('related_posts.enable')) {
|
||||||
.popular-posts-header {
|
.popular-posts-header {
|
||||||
border-bottom: 1px solid $gainsboro;
|
border-bottom: 1px solid $gainsboro;
|
||||||
font-size: $font-size-large;
|
font-size: $font-size-large;
|
||||||
@ -19,3 +20,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
if (hexo-config('local_search.enable') or hexo-config('algolia_search.enable')) {
|
||||||
.search-active {
|
.search-active {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
@ -100,6 +101,7 @@
|
|||||||
padding: 5px 0;
|
padding: 5px 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (hexo-config('algolia_search.enable')) {
|
if (hexo-config('algolia_search.enable')) {
|
||||||
.search-input-container {
|
.search-input-container {
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
if (hexo-config('utterances.enable')) {
|
||||||
.utterances {
|
.utterances {
|
||||||
max-width: unset;
|
max-width: unset;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
if (hexo-config('bookmark.enable')) {
|
||||||
.book-mark-link {
|
.book-mark-link {
|
||||||
border-bottom: 0;
|
border-bottom: 0;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@ -20,3 +21,4 @@
|
|||||||
.book-mark-link:hover, .book-mark-link-fixed {
|
.book-mark-link:hover, .book-mark-link-fixed {
|
||||||
top: -2px;
|
top: -2px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
if (hexo-config('github_banner.enable')) {
|
||||||
@keyframes octocat-wave {
|
@keyframes octocat-wave {
|
||||||
0%, 100% {
|
0%, 100% {
|
||||||
transform: rotate(0);
|
transform: rotate(0);
|
||||||
@ -57,3 +58,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -33,6 +33,5 @@
|
|||||||
@import 'site-nav';
|
@import 'site-nav';
|
||||||
@import 'menu';
|
@import 'menu';
|
||||||
|
|
||||||
@import 'bookmark' if (hexo-config('bookmark.enable'));
|
@import 'bookmark';
|
||||||
|
@import 'github-banner';
|
||||||
@import 'github-banner' if (hexo-config('github_banner.enable'));
|
|
||||||
|
|||||||
@ -2,4 +2,4 @@
|
|||||||
@import 'sidebar';
|
@import 'sidebar';
|
||||||
@import 'footer';
|
@import 'footer';
|
||||||
|
|
||||||
@import 'mobile' if (hexo-config('mobile_layout_economy'));
|
@import 'mobile';
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (hexo-config('mobile_layout_economy')) {
|
||||||
+mobile-small() {
|
+mobile-small() {
|
||||||
// For Pisces & Gemini schemes only wider width (remove main blocks in Gemini).
|
// For Pisces & Gemini schemes only wider width (remove main blocks in Gemini).
|
||||||
.main-inner {
|
.main-inner {
|
||||||
@ -75,7 +76,7 @@
|
|||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
// < 413px
|
// < 413px
|
||||||
+mobile-smallest() {
|
+mobile-smallest() {
|
||||||
|
|||||||
@ -34,7 +34,5 @@
|
|||||||
@import 'sidebar-dimmer';
|
@import 'sidebar-dimmer';
|
||||||
@import 'sidebar-nav';
|
@import 'sidebar-nav';
|
||||||
@import 'sidebar-toggle';
|
@import 'sidebar-toggle';
|
||||||
|
@import 'sidebar-toc';
|
||||||
@import 'sidebar-toc' if (hexo-config('toc.enable'));
|
@import 'site-state';
|
||||||
|
|
||||||
@import 'site-state' if (hexo-config('site_state'));
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
if (hexo-config('toc.enable')) {
|
||||||
.post-toc {
|
.post-toc {
|
||||||
font-size: $font-size-small;
|
font-size: $font-size-small;
|
||||||
|
|
||||||
@ -57,3 +58,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
if (hexo-config('site_state')) {
|
||||||
.site-state {
|
.site-state {
|
||||||
flex-wrap();
|
flex-wrap();
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
@ -24,3 +25,4 @@
|
|||||||
color: $site-state-item-name-color;
|
color: $site-state-item-name-color;
|
||||||
font-size: $site-state-item-name-font-size;
|
font-size: $site-state-item-name-font-size;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -2,10 +2,7 @@
|
|||||||
@import 'group-pictures';
|
@import 'group-pictures';
|
||||||
@import 'label';
|
@import 'label';
|
||||||
@import 'link-grid';
|
@import 'link-grid';
|
||||||
|
@import 'mermaid';
|
||||||
|
@import 'note';
|
||||||
|
@import 'pdf';
|
||||||
@import 'tabs';
|
@import 'tabs';
|
||||||
|
|
||||||
@import 'note' if (hexo-config('note.style') != 'disabled');
|
|
||||||
|
|
||||||
@import 'pdf' if (hexo-config('pdf.enable'));
|
|
||||||
|
|
||||||
@import 'mermaid' if (hexo-config('mermaid.enable'));
|
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
|
if (hexo-config('mermaid.enable')) {
|
||||||
.mermaid {
|
.mermaid {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
if (hexo-config('note.style') != 'disabled') {
|
||||||
.post-body .note {
|
.post-body .note {
|
||||||
$note-icons = hexo-config('note.icons');
|
$note-icons = hexo-config('note.icons');
|
||||||
$note-style = hexo-config('note.style');
|
$note-style = hexo-config('note.style');
|
||||||
@ -108,3 +109,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
|
if (hexo-config('pdf.enable')) {
|
||||||
.pdfobject-container {
|
.pdfobject-container {
|
||||||
iframe, embed {
|
iframe, embed {
|
||||||
height: unquote(hexo-config('pdf.height'));
|
height: unquote(hexo-config('pdf.height'));
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user