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