Skip to content

Commit

Permalink
Optimize the style of custom-logo and sidebar-inner
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed Jun 6, 2020
1 parent 6d5d471 commit d194052
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 46 deletions.
12 changes: 3 additions & 9 deletions layout/_partials/header/brand.njk
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@
</div>
</div>

<div class="site-meta{%- if theme.custom_logo %} custom-logo{%- endif %}">
<div class="site-meta">
{%- if theme.custom_logo and theme.scheme === 'Muse' %}
<div class="site-meta-headline">
<a>
<img class="custom-logo-image" src="{{ theme.custom_logo }}" alt="{{ title }}">
</a>
</div>
<img class="custom-logo-image" src="{{ theme.custom_logo }}" alt="{{ title }}">
{%- endif %}

<a href="{{ config.root }}" class="brand" rel="start">
Expand All @@ -27,9 +23,7 @@
<p class="site-subtitle" itemprop="description">{{ subtitle }}</p>
{%- endif %}
{%- if theme.custom_logo and (theme.scheme === 'Gemini' or theme.scheme === 'Pisces') %}
<a>
<img class="custom-logo-image" src="{{ theme.custom_logo }}" alt="{{ title }}">
</a>
<img class="custom-logo-image" src="{{ theme.custom_logo }}" alt="{{ title }}">
{%- endif %}
</div>

Expand Down
1 change: 0 additions & 1 deletion source/css/_common/components/components.styl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
if (hexo-config('back2top.enable')) {
.back-to-top {
font-size: $b2t-font-size;
text-align: center;
the-transition();
}

Expand Down
1 change: 0 additions & 1 deletion source/css/_common/components/pages/breadcrumb.styl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ ul.breadcrumb {
list-style: none;
margin: 1em 0;
padding: 0 2em;
text-align: center;

li {
display: inline;
Expand Down
1 change: 0 additions & 1 deletion source/css/_common/components/post/post-eof.styl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
background: $grey-light;
height: 1px;
margin: $post-eof-margin-top auto $post-eof-margin-bottom;
text-align: center;
width: 8%;

.post-block:last-of-type & {
Expand Down
8 changes: 8 additions & 0 deletions source/css/_common/outline/header/site-meta.styl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
}
}

.custom-logo-image {
margin-top: 20px;

+tablet-mobile() {
display: none;
}
}

.brand {
border-bottom: none;
color: var(--brand-color);
Expand Down
2 changes: 0 additions & 2 deletions source/css/_common/outline/sidebar/sidebar-author.styl
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@ if (hexo-config('avatar.rotated')) {
color: $site-author-name-color;
font-weight: $site-author-name-weight;
margin: $site-author-name-margin;
text-align: center;
}

.site-description {
color: $site-description-color;
font-size: $site-description-font-size;
margin-top: $site-description-margin-top;
text-align: center;
}
1 change: 0 additions & 1 deletion source/css/_common/outline/sidebar/sidebar.styl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

.cc-license {
margin-top: 10px;
text-align: center;

.cc-opacity {
border-bottom: none;
Expand Down
6 changes: 2 additions & 4 deletions source/css/_common/outline/sidebar/site-state.styl
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,25 @@
line-height: 1.4;
margin-top: 10px;
overflow: hidden;
text-align: center;
white-space: nowrap;
}

.site-state-item {
padding: 0 15px;

&:not(:first-child) {
border-left: 1px solid $site-state-item-border-color;
}

a {
border-bottom: none;
display: block;
padding: 0 15px;
}
}

.site-state-item-count {
display: block;
font-size: $site-state-item-count-font-size;
font-weight: 600;
text-align: center;
}

.site-state-item-name {
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/scaffolding/pagination.styl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ $page-number-basic {

.page-number.current {
background: $pagination-active-bg;
border-top-color: $pagination-active-border;
border-color: $pagination-active-border;
color: $pagination-active-color;
}
}
17 changes: 1 addition & 16 deletions source/css/_schemes/Muse/_header.styl
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
.custom-logo {
.site-meta-headline {
text-align: center;
}

.site-title {
color: $black-deep;
margin: 10px auto 0;

a {
border: 0;
}
}
}

.custom-logo-image {
background: white;
margin: 0 auto;
margin: 0 auto 10px;
max-width: 150px;
padding: 5px;
}
Expand Down
8 changes: 0 additions & 8 deletions source/css/_schemes/Pisces/_header.styl
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,3 @@
.site-subtitle {
margin: 10px 10px 0;
}

.custom-logo-image {
margin-top: 20px;

+tablet-mobile() {
display: none;
}
}
3 changes: 1 addition & 2 deletions source/css/_schemes/Pisces/_sidebar.styl
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,14 @@
}
}

.site-state-item {
.site-state-item a {
padding: 0 10px;
}

.sidebar-button {
border-bottom: 1px dotted $grey-light;
border-top: 1px dotted $grey-light;
margin-top: 10px;
text-align: center;

a {
border: 0;
Expand Down

1 comment on commit d194052

@stevenjoezhang
Copy link
Member Author

@stevenjoezhang stevenjoezhang commented on d194052 Jun 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.