New mixin round-icon

This commit is contained in:
Mimi 2020-06-24 22:46:01 +08:00
parent 35355277f8
commit ee4b27a5f9
7 changed files with 39 additions and 48 deletions

View File

@ -14,14 +14,11 @@
&::before { &::before {
background: $grey-dark; background: $grey-dark;
border: 1px solid white; border: 1px solid white;
border-radius: 50%;
content: ' ';
height: 10px;
margin-left: -6px; margin-left: -6px;
margin-top: -4px; margin-top: -4px;
position: absolute; position: absolute;
top: 50%; top: 50%;
width: 10px; round-icon(10px);
} }
} }
@ -33,14 +30,11 @@
&::before { &::before {
background: $grey; background: $grey;
border-radius: 50%;
content: ' ';
height: 8px;
margin-left: -4px; margin-left: -4px;
margin-top: -4px; margin-top: -4px;
position: absolute; position: absolute;
top: 50%; top: 50%;
width: 8px; round-icon(8px);
} }
} }
@ -64,14 +58,11 @@
&::before { &::before {
background: $grey; background: $grey;
border: 1px solid white; border: 1px solid white;
border-radius: 50%;
content: ' ';
height: 6px;
left: -4px; left: -4px;
position: absolute; position: absolute;
top: $font-size-smallest; top: $font-size-smallest;
transition: background $transition-ease; transition: background $transition-ease;
width: 6px; round-icon(6px);
} }
&:hover { &:hover {

View File

@ -1,27 +1,11 @@
.links-of-author { .links-of-author {
margin-top: 15px;
a, span.exturl { a, span.exturl {
border-bottom-color: $black-light;
display: inline-block;
font-size: $font-size-smaller; font-size: $font-size-smaller;
margin-bottom: 10px; }
margin-right: 10px;
vertical-align: middle;
if (hexo-config('social_icons.transition')) { if (!hexo-config('social_icons.icons_only')) {
transition: all $transition-ease; .fa, .fab, .far, .fas {
} margin-right: 2px;
&::before {
background: rgb(random-color(0, 255) - 50%, random-color(0, 255) - 50%, random-color(0, 255) - 50%);
border-radius: 50%;
content: ' ';
display: inline-block;
height: 4px;
margin-right: 3px;
vertical-align: middle;
width: 4px;
} }
} }
} }

View File

@ -7,7 +7,6 @@
font-size: $font-size-small; font-size: $font-size-small;
line-height: 2; line-height: 2;
padding: 0 20px; padding: 0 20px;
text-decoration: none;
transition: background-color $transition-ease; transition: background-color $transition-ease;
&:hover { &:hover {

View File

@ -45,14 +45,11 @@ if (hexo-config('codeblock.copy_button.style') == 'mac') {
&::before { &::before {
background: #fc625d; background: #fc625d;
border-radius: 50%;
box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b; box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
content: ' ';
height: 12px;
left: 12px; left: 12px;
margin-top: -20px; margin-top: -20px;
position: absolute; position: absolute;
width: 12px; round-icon(12px);
} }
} }
} }

View File

@ -73,8 +73,6 @@ sidebar-inline-links-item() {
a, span.exturl { a, span.exturl {
box-sizing: border-box; box-sizing: border-box;
display: inline-block; display: inline-block;
margin-bottom: 0;
margin-right: 0;
max-width: 216px; max-width: 216px;
overflow: hidden; overflow: hidden;
padding: 0 5px; padding: 0 5px;
@ -144,3 +142,10 @@ sidebar-toggle() {
opacity: $b2t-opacity-hover; opacity: $b2t-opacity-hover;
} }
} }
round-icon($diameter) {
border-radius: 50%;
content: ' ';
height: $diameter;
width: $diameter;
}

View File

@ -51,6 +51,30 @@ if (hexo-config('sidebar.position') == 'right') {
} }
} }
.links-of-author {
margin-top: 15px;
a, span.exturl {
border-bottom-color: $black-light;
display: inline-block;
margin-bottom: 10px;
margin-right: 10px;
vertical-align: middle;
if (hexo-config('social_icons.transition')) {
transition: all $transition-ease;
}
&::before {
background: rgb(random-color(0, 255) - 50%, random-color(0, 255) - 50%, random-color(0, 255) - 50%);
display: inline-block;
margin-right: 3px;
transform: translateY(-2px);
round-icon(4px);
}
}
}
.links-of-blogroll-item { .links-of-blogroll-item {
if (hexo-config('links_settings.layout') == 'inline') { if (hexo-config('links_settings.layout') == 'inline') {
display: inline-block; display: inline-block;

View File

@ -72,21 +72,12 @@
a, span.exturl { a, span.exturl {
border-bottom: none; border-bottom: none;
display: block; display: block;
text-decoration: none;
&::before {
display: none;
}
&:hover { &:hover {
background: var(--body-bg-color); background: var(--body-bg-color);
border-radius: 4px; border-radius: 4px;
} }
} }
.fa, .fab, .far, .fas {
margin-right: 2px;
}
} }
.links-of-blogroll-item { .links-of-blogroll-item {