Skip to content

Commit

Permalink
Obey Stylint rules (#1037)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang authored Aug 1, 2019
1 parent 1912025 commit f313c60
Show file tree
Hide file tree
Showing 98 changed files with 2,212 additions and 1,796 deletions.
2 changes: 1 addition & 1 deletion .stylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"truncate": true
},
"semicolons": "always",
"sortOrder": "grouped",
"sortOrder": "alphabetical",
"stackedProperties": false,
"trailingWhitespace": "never",
"universal": false,
Expand Down
15 changes: 10 additions & 5 deletions source/css/_common/components/back-to-top-sidebar.styl
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
.back-to-top {
visibility: hidden;
margin: (20px - $sidebar-offset) -10px -20px;
background: $b2t-sidebar-bg-color;
cursor: pointer;
font-size: $b2t-font-size;
margin: 20px - $sidebar-offset -10px -20px;
opacity: $b2t-opacity;
cursor: pointer;
text-align: center;
&:hover { opacity: $b2t-opacity-hover; }
visibility: hidden;

&:hover {
opacity: $b2t-opacity-hover;
}

+tablet-mobile() {
display: none if not hexo-config('sidebar.onmobile');
if (!hexo-config('sidebar.onmobile')) {
display: none;
}
}

&.back-to-top-on {
Expand Down
20 changes: 11 additions & 9 deletions source/css/_common/components/back-to-top.styl
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
.back-to-top {
box-sizing: border-box;
position: fixed;
bottom: $b2t-position-bottom;
right: $b2t-position-right;
z-index: $zindex-5;
padding: 0 6px;
width: hexo-config('back2top.scrollpercent') ? initial : 24px;
background: $b2t-bg-color;
font-size: $b2t-font-size;
opacity: $b2t-opacity;
bottom: $b2t-position-bottom;
box-sizing: border-box;
color: $b2t-color;
cursor: pointer;
font-size: $b2t-font-size;
opacity: $b2t-opacity;
padding: 0 6px;
position: fixed;
right: $b2t-position-right;
text-align: center;
transition-property: bottom;
width: hexo-config('back2top.scrollpercent') ? initial : 24px;
z-index: $zindex-5;
the-transition();

&:hover {
color: $sidebar-highlight;
}

&.back-to-top-on {
bottom: $b2t-position-bottom-on;
}

+tablet-mobile() {
opacity: $b2t-opacity-hover;
right: $b2t-position-right-mobile;
Expand Down
24 changes: 13 additions & 11 deletions source/css/_common/components/buttons.styl
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
.btn {
display: inline-block;
padding: 0 20px;
font-size: $btn-default-font-size;
color: $btn-default-color;
background: $btn-default-bg;
border: $btn-default-border-width solid $btn-default-border-color;
text-decoration: none;
border-radius: $btn-default-radius;
color: $btn-default-color;
display: inline-block;
font-size: $btn-default-font-size;
padding: 0 20px;
text-decoration: none;
transition-property: background-color;
the-transition();
line-height: 2;

&:hover {
background: $btn-default-hover-bg;
border-color: $btn-default-hover-border-color;
color: $btn-default-hover-color;
background: $btn-default-hover-bg;
}

+.btn {
margin: 0 0 8px 8px;
}

.fa-fw {
width: (18em / 14);
text-align: left;
width: (18em / 14);
}
}

.btn-bar {
display: block;
width: 22px;
height: 2px;
background: $text-color;
border-radius: 1px;
display: block;
height: 2px;
width: 22px;

&+.btn-bar { margin-top: 4px; }
&+.btn-bar {
margin-top: 4px;
}
}
2 changes: 1 addition & 1 deletion source/css/_common/components/comments.styl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.comments {
.comments {
margin: 60px 20px 0;
overflow: hidden;
}
28 changes: 14 additions & 14 deletions source/css/_common/components/components.styl
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
@import "highlight";
@import "tags";
@import 'highlight';
@import 'tags';
@import 'buttons';
@import 'pagination';
@import 'comments';

@import "buttons";
@import "pagination";
@import "comments";
@import (hexo-config('back2top.sidebar') ? "back-to-top-sidebar" : "back-to-top") if (hexo-config('back2top.enable'));
@import (hexo-config('back2top.sidebar') ? 'back-to-top-sidebar' : 'back-to-top') if (hexo-config('back2top.enable'));

@import "header";
@import "post";
@import "sidebar";
@import "footer";
@import "third-party";
@import 'header';
@import 'post';
@import 'sidebar';
@import 'footer';
@import 'third-party';
@import 'pages';

@import "pages";
@import 'rainbow' if (hexo-config('safari_rainbow'));

@import "rainbow" if hexo-config('safari_rainbow');
@import "scrollbar" if hexo-config('custom_scrollbar');
@import 'scrollbar' if (hexo-config('custom_scrollbar'));
38 changes: 27 additions & 11 deletions source/css/_common/components/footer/footer.styl
Original file line number Diff line number Diff line change
@@ -1,30 +1,46 @@
.footer {
font-size: $font-size-small;
color: $grey-dark;
font-size: $font-size-small;

img { border: none; }
img {
border: none;
}
}

.footer-inner { text-align: center; }
.footer-inner {
text-align: center;
}

@keyframes iconAnimate {
0%, 100% { transform: scale(1); }
10%, 30% { transform: scale(0.9); }
20%, 40%, 60%, 80% { transform: scale(1.1); }
50%, 70% { transform: scale(1.1); }
0%, 100% {
transform: scale(1);
}

10%, 30% {
transform: scale(.9);
}

20%, 40%, 60%, 80% {
transform: scale(1.1);
}

50%, 70% {
transform: scale(1.1);
}
}

if hexo-config('footer.icon.animated') {
if (hexo-config('footer.icon.animated')) {
#animate {
animation: iconAnimate 1.33s ease-in-out infinite;
}
}

.with-love {
color: unquote(hexo-config('footer.icon.color'));
display: inline-block;
margin: 0 5px;
color: unquote(hexo-config('footer.icon.color'));
}

.powered-by,
.theme-info { display: inline-block; }
.powered-by, .theme-info {
display: inline-block;
}
28 changes: 18 additions & 10 deletions source/css/_common/components/header/github-banner.styl
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,57 @@
0%, 100% {
transform: rotate(0);
}

20%, 60% {
transform: rotate(-25deg);
}

40%, 80% {
transform: rotate(10deg);
}
}

.github-corner {
scheme = hexo-config('scheme');
bg_color = unquote(hexo-config('android_chrome_color'));
mobile_layout_economy = hexo-config('mobile_layout_economy');
$scheme = hexo-config('scheme');
$bg-color = unquote(hexo-config('android_chrome_color'));
$mobile-layout-economy = hexo-config('mobile_layout_economy');

:hover .octo-arm {
animation: octocat-wave 560ms ease-in-out;
}

> svg {
fill: bg_color;
border: 0;
color: #fff;
fill: $bg-color;
position: absolute;
top: 0;
border: 0;
right: 0;
top: 0;
}

+tablet-mobile() {
> svg {
if (scheme == 'Pisces') || (scheme == 'Gemini') {
if (($scheme == 'Pisces') || ($scheme == 'Gemini')) {
color: $bg-color;
fill: #fff;
color: bg_color;
}
}

.github-corner:hover .octo-arm {
animation: none;
}

.github-corner .octo-arm {
animation: octocat-wave 560ms ease-in-out;
}
}

+mobile() {
> svg {
if (scheme == 'Mist') {
if ($scheme == 'Mist') {
top: inherit;
if mobile_layout_economy {

if ($mobile-layout-economy) {
+mobile-small() {
margin-top: initial;
}
Expand Down
19 changes: 12 additions & 7 deletions source/css/_common/components/header/header.styl
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
.header { background: $head-bg; }
.header {
background: $head-bg;
}

.header-inner { position: relative; }
.header-inner {
position: relative;
}

@import "headerband";
@import "site-meta";
@import "site-nav";
@import "menu";
@import "github-banner" if hexo-config('github_banner.enable');
@import 'headerband';
@import 'site-meta';
@import 'site-nav';
@import 'menu';

@import 'github-banner' if (hexo-config('github_banner.enable'));
2 changes: 1 addition & 1 deletion source/css/_common/components/header/headerband.styl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.headband {
height: $headband-height;
background: $headband-bg;
height: $headband-height;
}
16 changes: 11 additions & 5 deletions source/css/_common/components/header/menu.styl
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,31 @@

.menu .menu-item {
display: inline-block;
margin: 0 10px;
list-style: none;
margin: 0 10px;

+mobile() {
margin-top: 10px;
}

a, span.exturl {
border-bottom: 1px solid $menu-link-border;
display: block;
font-size: $font-size-smaller;
line-height: inherit;
border-bottom: 1px solid $menu-link-border;
transition-property: border-color;
the-transition();

&:hover { border-bottom-color: $menu-link-hover-border; }
&:hover {
border-bottom-color: $menu-link-hover-border;
}
}

.fa { margin-right: 5px; }
.fa {
margin-right: 5px;
}
}

.use-motion .menu-item { opacity: 0; }
.use-motion .menu-item {
opacity: 0;
}
Loading

0 comments on commit f313c60

Please sign in to comment.