Permalink
Browse files

1. Remove `$read-more*` variables.

2. Refactor `post-button.styl` & `buttons.styl` & button.js.
3. Filter in modern notes on links with class `.btn` (to prevent color change on button tags).
  • Loading branch information...
ivan-nginx committed Oct 3, 2017
1 parent 721d00f commit 4884fb09292ec8ab6443c933c40666986bfbea0d
View
@@ -17,12 +17,12 @@ function postButton(args) {
icon = icon.trim();
title = title.trim();
var result = ['<span class="post-button text-center"><a class="btn" href="' + url + '"'];
var result = ['<a class="btn" href="' + url + '"'];
title.length > 0 && result.push(' title="' + title + '"');
result.push('>');
icon.length > 0 && result.push('<i class="fa fa-' + icon + '"></i>');
text.length > 0 && result.push(text);
result.push('</a></span>');
result.push('</a>');
return result.join('');
}
@@ -9,12 +9,22 @@
border-radius: $btn-default-radius;
transition-property: background-color;
the-transition();
line-height: 2;
&:hover {
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;
}
}
.btn-bar {
@@ -1,19 +1,3 @@
.post-button {
margin-top: 40px;
.btn {
color: $read-more-color;
font-size: $read-more-font-size;
background: $read-more-bg-color;
border-radius: $read-more-border-radius;
line-height: 2;
margin: 0 4px 8px 4px;
}
.btn:hover {
@extend .btn:hover;
}
.fa-fw {
width: (18em / 14);
text-align: left;
}
}
@@ -54,11 +54,13 @@
}
}
a {
color: $note-modern-default-text;
border-bottom: 1px solid $note-modern-default-text;
&:hover {
color: $note-modern-default-hover;
border-bottom: 1px solid $note-modern-default-hover;
&:not(.btn) {
color: $note-modern-default-text;
border-bottom: 1px solid $note-modern-default-text;
&:hover {
color: $note-modern-default-hover;
border-bottom: 1px solid $note-modern-default-hover;
}
}
}
}
@@ -75,11 +77,13 @@
}
}
a {
color: $note-modern-primary-text;
border-bottom: 1px solid $note-modern-primary-text;
&:hover {
color: $note-modern-primary-hover;
border-bottom: 1px solid $note-modern-primary-hover;
&:not(.btn) {
color: $note-modern-primary-text;
border-bottom: 1px solid $note-modern-primary-text;
&:hover {
color: $note-modern-primary-hover;
border-bottom: 1px solid $note-modern-primary-hover;
}
}
}
}
@@ -96,11 +100,13 @@
}
}
a {
color: $note-modern-info-text;
border-bottom: 1px solid $note-modern-info-text;
&:hover {
color: $note-modern-info-hover;
&:not(.btn) {
color: $note-modern-info-text;
border-bottom: 1px solid $note-modern-info-text;
&:hover {
color: $note-modern-info-hover;
border-bottom: 1px solid $note-modern-info-hover;
}
}
}
}
@@ -117,11 +123,13 @@
}
}
a {
color: $note-modern-success-text;
border-bottom: 1px solid $note-modern-success-text;
&:hover {
color: $note-modern-success-hover;
border-bottom: 1px solid $note-modern-success-hover;
&:not(.btn) {
color: $note-modern-success-text;
border-bottom: 1px solid $note-modern-success-text;
&:hover {
color: $note-modern-success-hover;
border-bottom: 1px solid $note-modern-success-hover;
}
}
}
}
@@ -138,11 +146,13 @@
}
}
a {
color: $note-modern-warning-text;
border-bottom: 1px solid $note-modern-warning-text;
&:hover {
color: $note-modern-warning-hover;
border-bottom: 1px solid $note-modern-warning-hover;
&:not(.btn) {
color: $note-modern-warning-text;
border-bottom: 1px solid $note-modern-warning-text;
&:hover {
color: $note-modern-warning-hover;
border-bottom: 1px solid $note-modern-warning-hover;
}
}
}
}
@@ -159,11 +169,13 @@
}
}
a {
color: $note-modern-danger-text;
border-bottom: 1px solid $note-modern-danger-text;
&:hover {
color: $note-modern-danger-hover;
border-bottom: 1px solid $note-modern-danger-hover;
&:not(.btn) {
color: $note-modern-danger-text;
border-bottom: 1px solid $note-modern-danger-text;
&:hover {
color: $note-modern-danger-hover;
border-bottom: 1px solid $note-modern-danger-hover;
}
}
}
}
@@ -50,10 +50,9 @@
text-align: left;
a {
margin: 0 8px 8px 0 !important;
padding: 0;
font-size: $font-size-base;
color: $grey-dim;
//color: $grey-dim;
background: none;
border: none;
border-bottom: 2px solid $grey-dim;
@@ -9,5 +9,5 @@ $brand-hover-color = $brand-color
$site-meta-text-align = left
$posts-collapse-left = 0
$read-more-color = $link-color
$read-more-bg-color = transparent
$btn-default-color = $link-color
$btn-default-bg = transparent
@@ -59,9 +59,9 @@ $toc-link-active-current-border-color = $sidebar-highlight
// --------------------------------------------------
// Button
$read-more-color = $text-color
$read-more-bg-color = white
$read-more-border-radius = 2px
$btn-default-radius = 2px
$btn-default-bg = white
$btn-default-color = $text-color
$btn-default-border-color = $text-color
$btn-default-hover-color = white
$btn-default-hover-bg = $black-deep
@@ -261,13 +261,6 @@ $post-copyright = {
$posts-collapse-left = 55px
$posts-collapse-left-mobile = 5px
$read-more-color = white
$read-more-font-size = 14px
$read-more-bg-color = $black-deep
$read-more-border-radius = 0
// Sidebar
// Variables for sidebar section elements.

0 comments on commit 4884fb0

Please sign in to comment.