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 @@
|
||||
.back-to-top {
|
||||
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;
|
||||
@ -17,4 +40,6 @@
|
||||
&.back-to-top-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 {
|
||||
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,4 +1,5 @@
|
||||
.followme {
|
||||
if (hexo-config('follow_me')) {
|
||||
.followme {
|
||||
color: $grey;
|
||||
padding: 1em 1.5em;
|
||||
text-align: center;
|
||||
@ -30,4 +31,5 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
.reading-progress-bar {
|
||||
if (hexo-config('reading_progress.enable')) {
|
||||
.reading-progress-bar {
|
||||
--progress: 0;
|
||||
background: unquote(hexo-config('reading_progress.color'));
|
||||
height: unquote(hexo-config('reading_progress.height'));
|
||||
@ -22,4 +23,5 @@
|
||||
} else {
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
.gt-header a, .gt-comments a, .gt-popup a {
|
||||
if (hexo-config('gitalk.enable')) {
|
||||
.gt-header a, .gt-comments a, .gt-popup a {
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.gt-container .gt-popup .gt-action.is--active::before {
|
||||
.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,7 +1,9 @@
|
||||
mjx-container[jax="CHTML"][display="true"], .has-jax {
|
||||
if (hexo-config('math.mathjax.enable')) {
|
||||
mjx-container[jax="CHTML"][display="true"], .has-jax {
|
||||
overflow: auto hidden;
|
||||
}
|
||||
}
|
||||
|
||||
mjx-container[display="true"] + br {
|
||||
mjx-container[display="true"] + br {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
.popular-posts-header {
|
||||
if (hexo-config('related_posts.enable')) {
|
||||
.popular-posts-header {
|
||||
border-bottom: 1px solid $gainsboro;
|
||||
font-size: $font-size-large;
|
||||
margin-bottom: 10px;
|
||||
margin-top: $post-eof-margin-bottom;
|
||||
}
|
||||
}
|
||||
|
||||
.popular-posts {
|
||||
.popular-posts {
|
||||
padding: 0;
|
||||
|
||||
.popular-posts-item {
|
||||
@ -18,4 +19,5 @@
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
.search-active {
|
||||
if (hexo-config('local_search.enable') or hexo-config('algolia_search.enable')) {
|
||||
.search-active {
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.search-pop-overlay {
|
||||
.search-pop-overlay {
|
||||
background: rgba(0, 0, 0, 0);
|
||||
display: flex;
|
||||
height: 100%;
|
||||
@ -18,9 +19,9 @@
|
||||
background: rgba(0, 0, 0, .3);
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.search-popup {
|
||||
.search-popup {
|
||||
background: var(--card-bg-color);
|
||||
border-radius: 5px;
|
||||
height: 80%;
|
||||
@ -99,6 +100,7 @@
|
||||
border-bottom: 1px dashed $grey-light;
|
||||
padding: 5px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (hexo-config('algolia_search.enable')) {
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
.utterances {
|
||||
if (hexo-config('utterances.enable')) {
|
||||
.utterances {
|
||||
max-width: unset;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
.book-mark-link {
|
||||
if (hexo-config('bookmark.enable')) {
|
||||
.book-mark-link {
|
||||
border-bottom: 0;
|
||||
position: fixed;
|
||||
top: -10px;
|
||||
@ -15,8 +16,9 @@
|
||||
line-height: 1;
|
||||
font-family-icons('\f02e');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.book-mark-link:hover, .book-mark-link-fixed {
|
||||
.book-mark-link:hover, .book-mark-link-fixed {
|
||||
top: -2px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
@keyframes octocat-wave {
|
||||
if (hexo-config('github_banner.enable')) {
|
||||
@keyframes octocat-wave {
|
||||
0%, 100% {
|
||||
transform: rotate(0);
|
||||
}
|
||||
@ -10,9 +11,9 @@
|
||||
40%, 80% {
|
||||
transform: rotate(10deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.github-corner {
|
||||
.github-corner {
|
||||
$bg-color = unquote(hexo-config('android_chrome_color'));
|
||||
|
||||
:hover .octo-arm {
|
||||
@ -56,4 +57,5 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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,7 +5,8 @@
|
||||
}
|
||||
*/
|
||||
|
||||
+mobile-small() {
|
||||
if (hexo-config('mobile_layout_economy')) {
|
||||
+mobile-small() {
|
||||
// For Pisces & Gemini schemes only wider width (remove main blocks in Gemini).
|
||||
.main-inner {
|
||||
padding: initial !important;
|
||||
@ -74,8 +75,8 @@
|
||||
.pagination {
|
||||
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,4 +1,5 @@
|
||||
.post-toc {
|
||||
if (hexo-config('toc.enable')) {
|
||||
.post-toc {
|
||||
font-size: $font-size-small;
|
||||
|
||||
ol {
|
||||
@ -56,4 +57,5 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
.site-state {
|
||||
if (hexo-config('site_state')) {
|
||||
.site-state {
|
||||
flex-wrap();
|
||||
line-height: 1.4;
|
||||
}
|
||||
}
|
||||
|
||||
.site-state-item {
|
||||
.site-state-item {
|
||||
// Fix issue #103
|
||||
// The click area of the link becomes smaller
|
||||
padding: 0 15px;
|
||||
@ -12,15 +13,16 @@
|
||||
border-bottom: 0;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.site-state-item-count {
|
||||
.site-state-item-count {
|
||||
display: block;
|
||||
font-size: $site-state-item-count-font-size;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
.site-state-item-name {
|
||||
.site-state-item-name {
|
||||
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 @@
|
||||
.mermaid {
|
||||
if (hexo-config('mermaid.enable')) {
|
||||
.mermaid {
|
||||
margin-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
.post-body .note {
|
||||
if (hexo-config('note.style') != 'disabled') {
|
||||
.post-body .note {
|
||||
$note-icons = hexo-config('note.icons');
|
||||
$note-style = hexo-config('note.style');
|
||||
|
||||
@ -107,4 +108,5 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
.pdfobject-container {
|
||||
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