style: unified tool buttons style

This commit is contained in:
XPoet 2020-04-26 15:16:53 +08:00
parent 43ab737822
commit 903235b772
3 changed files with 8 additions and 31 deletions

View File

@ -2,16 +2,16 @@
@require "../common/magic-theme.styl"; @require "../common/magic-theme.styl";
@require "../common/magic-theme.styl"; @require "../common/magic-theme.styl";
$li-padding = 10px;
$li-border-radius = 5px; $li-border-radius = 5px;
$li-margin-bottom = 10px; $li-margin-bottom = 12px;
.tools-container { .tools-container {
.tools-list { .tools-list {
li { li {
cursor: pointer; cursor: pointer;
padding: $li-padding; width: $tool-button-width;
height: $tool-button-width;
border-radius: $li-border-radius; border-radius: $li-border-radius;
font-size: 1.2em; font-size: 1.2em;
display: flex; display: flex;
@ -34,11 +34,9 @@ $li-margin-bottom = 10px;
&.rss { &.rss {
padding: 0;
a { a {
border-radius: $li-border-radius; border-radius: $li-border-radius;
padding: $li-padding;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;

View File

@ -20,6 +20,7 @@ if (hexo-config('magic.enable') == true && hexo-config('magic.sidebar.enable') =
$header-shrink-height = 60px; // $header-shrink-height = 60px; //
$media-max-width = 760px; // $media-max-width = 760px; //
$tool-button-width = 36px; //
// =============================== // ===============================

View File

@ -66,28 +66,6 @@ $component-interspace = 30px;
transition(); transition();
} }
/*.scroll-to-top {
display: none;
position: fixed;
right: ((100% - $main-content-width) / 4);
bottom: $component-interspace;
border-radius: 2px;
padding: 2px 6px;
color: var(--frist-text-color);
background: var(--border-color);
cursor: pointer;
button {
color: var(--frist-text-color);
i {
font-size: 1.2em;
}
}
}
*/
.scroll-to-top { .scroll-to-top {
display: none; display: none;
position: fixed; position: fixed;
@ -101,11 +79,10 @@ $component-interspace = 30px;
li { li {
cursor: pointer; cursor: pointer;
padding: 2px; width: $tool-button-width;
width: 32px; height: $tool-button-width;
height: 30px;
border-radius: 5px; border-radius: 5px;
font-size: 0.9em; font-size: 1em;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -166,6 +143,7 @@ $component-interspace = 30px;
//.sidebar-toc { //.sidebar-toc {
// right: 2% !important; // right: 2% !important;
//} //}
.scroll-to-top { .scroll-to-top {
if (hexo-config('back2top.position') == left) { if (hexo-config('back2top.position') == left) {
left: 2% !important; left: 2% !important;