Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改如下: #981

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ canonical: true
# When running the site in a subdirectory (e.g. domain.tld/blog), remove the leading slash (/archives -> archives)
menu:
home: /
#categories: /categories
#about: /about
# about: /about
archives: /archives
tags: /tags
#commonweal: /404.html
# categories: /categories
# tags: /tags/
# commonweal: /404.html


# Enable/Disable menu icons.
Expand All @@ -59,9 +59,9 @@ menu_icons:
# ---------------------------------------------------------------

# Schemes
scheme: Muse
#scheme: Mist
#scheme: Pisces
# scheme: Muse
scheme: Mist
# scheme: Pisces


# ---------------------------------------------------------------
Expand Down Expand Up @@ -120,7 +120,7 @@ font:
# Social Links
# Key is the link label showing to end users.
# Value is the target link (E.g. GitHub: https://github.com/iissnan)
#social:
# social:
#LinkLabel: Link


Expand All @@ -137,11 +137,10 @@ social_icons:
Twitter: twitter
Weibo: weibo


# Sidebar Avatar
# in theme directory(source/images): /images/avatar.jpg
# in site directory(source/uploads): /uploads/avatar.jpg
#avatar:
# avatar:


# Table Of Contents in the Sidebar
Expand Down Expand Up @@ -238,7 +237,7 @@ mathjax:
#swiftype_key:

# Baidu Analytics ID
#baidu_analytics:
# baidu_analytics:

# Duoshuo ShortName
#duoshuo_shortname:
Expand All @@ -249,7 +248,7 @@ mathjax:
# Baidu Share
# Available value:
# button | slide
#baidushare:
# baidushare: true
## type: button

# Share
Expand Down Expand Up @@ -327,9 +326,11 @@ busuanzi_count:
# tencent_analytics:

# Enable baidu push so that the blog will push the url to baidu automatically which is very helpful for SEO
baidu_push: false

# baidu_push: true

# search:
# path: search.xml
# field: post

#! ---------------------------------------------------------------
#! DO NOT EDIT THE FOLLOWING SETTINGS
Expand Down
16 changes: 7 additions & 9 deletions layout/_macro/post.swig
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</span>
{% endif %}
<a class="post-title-link" href="{{ url_for(post.path) }}" itemprop="url">
{{ post.title | default(__('post.untitled'))}}
#{{ post.title | default(__('post.untitled'))}}
</a>
{% else %}
{{ post.title }}
Expand All @@ -55,6 +55,11 @@
<time itemprop="dateCreated" datetime="{{ moment(post.date).format() }}" content="{{ date(post.date, config.date_format) }}">
{{ date(post.date, config.date_format) }}
</time>
{% if post.tags and post.tags.length %}
{% for tag in post.tags %}
<a class="post-tag" href="{{ url_for(tag.path) }}" rel="tag">{{ tag.name }}</a>
{% endfor %}
{% endif %}
</span>

{% if post.categories and post.categories.length %}
Expand All @@ -66,7 +71,7 @@
<span class="post-meta-item-text">{{ __('post.in') }}</span>
{% for cat in post.categories %}
<span itemprop="about" itemscope itemtype="https://schema.org/Thing">
<a href="{{ url_for(cat.path) }}" itemprop="url" rel="index">
<a class="post-category-item" href="{{ url_for(cat.path) }}" itemprop="url" rel="index">
<span itemprop="name">{{ cat.name }}</span>
</a>
</span>
Expand Down Expand Up @@ -197,13 +202,6 @@
</div>

<footer class="post-footer">
{% if post.tags and post.tags.length and not is_index %}
<div class="post-tags">
{% for tag in post.tags %}
<a href="{{ url_for(tag.path) }}" rel="tag">#{{ tag.name }}</a>
{% endfor %}
</div>
{% endif %}

{% if not is_index and (post.prev or post.next) and not navlessPost %}
<div class="post-nav">
Expand Down
15 changes: 12 additions & 3 deletions layout/_macro/sidebar.swig
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,24 @@
<span class="links-of-author-item">
<a href="{{ link }}" target="_blank" title="{{ name }}">
{% if theme.social_icons.enable %}
<i class="fa fa-fw fa-{{ theme.social_icons[name] | default('globe') | lower }}"></i>
{% if String(theme.social_icons[name]).startsWith('http') || String(theme.social_icons[name]).startsWith('/images/') %}
<i title="title="{{name}}""><img src="{{theme.social_icons[name]}}" alt="title="{{name}}""/></i>
{% else %}
<i title="{{name}}" class="fa fa-fw fa-{{ theme.social_icons[name] | default('globe') | lower }}"></i>
{% endif %}

{% endif %}
{{ name }}

</a>
</span>
{% endfor %}
{% endif %}
</div>

{% if config.email %}
<div class="">
<a class="email" href="mailto:{{ config.email }}">{{ config.email }}<a/>
</div>
{% endif %}
{% set cc = {'by': 1, 'by-nc': 1, 'by-nc-nd': 1, 'by-nc-sa': 1, 'by-nd': 1, 'by-sa': 1, 'zero': 1} %}
{% if theme.creative_commons in cc %}
<div class="cc-license motion-element" itemprop="license">
Expand Down
7 changes: 6 additions & 1 deletion layout/page.swig
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@
{{ _p('counter.tag_cloud', site.tags.length) }}
</div>
<div class="tag-cloud-tags">
{{ tagcloud({min_font: 12, max_font: 30, amount: 200, color: true, start_color: '#ccc', end_color: '#111'}) }}
{% for tag in site.tags %}
<a href="{{url_for(tag.path)}}">{{tag.name}}({{tag.length}})</a>
{% endfor %}
</div>
{# <div class="tag-cloud-tags">
{{ tagcloud({min_font: 12, max_font: 30, amount: 200, color: true, start_color: '#ccc', end_color: '#111'}) }}
</div> #}
</div>
{% elif page.type === 'categories' %}
<div class="category-all-page">
Expand Down
1 change: 1 addition & 0 deletions source/css/_common/components/highlight/highlight.styl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pre, code { font-family: $code-font-family; }

code {
padding: 2px 4px;
margin: 0 4px;
word-break: break-all;
color: $code-foreground;
background: $code-background;
Expand Down
15 changes: 13 additions & 2 deletions source/css/_common/components/pages/categories.styl
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,21 @@
list-style: none;
}

.category-list-item { margin: 5px 10px; }
.category-list-item {
margin: 5px 10px;
display: inline-block;
background-color $category-bg-color;
color: #fff;
padding: 2px 8px;
border-radius: 3px;
a, a:hover{
color: #fff;
border-bottom: none;
}
}

.category-list-count {
color: $grey;
color: #fff;
&:before {
display: inline;
content: " ("
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/post/post-collapse.styl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
.posts-collapse {
position: relative;
z-index: $zindex-1;

&::after {
content: " ";
position: absolute;
Expand Down
29 changes: 21 additions & 8 deletions source/css/_common/components/post/post-tags.styl
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
.posts-expand .post-tags {
margin-top: 40px;
text-align: center;
// .posts-expand .post-tags {
// margin-top: 40px;
// text-align: center;
//
// a {
// display: inline-block;
// margin-right: 10px;
// font-size: 13px;
// }
// }

a {
display: inline-block;
margin-right: 10px;
font-size: 13px;
}
.post-tag, .post-category-item {
padding: 4px 6px;
background-color: $tag-bg-color;
border-radius: 4px;
margin: 0 4px;
color: #fff !important;
font-weight: bold;
border: none !important;
}
.post-category-item {
background-color: $category-bg-color;
}
4 changes: 2 additions & 2 deletions source/css/_common/components/post/post-title.styl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.posts-expand .post-title {
font-size: 26px;
font-size: $post-title-font-size ;
text-align: center;
word-break: break-word;
font-weight: $posts-expand-title-font-weight
font-weight: bold;

+mobile() {
font-size: 22px;
Expand Down
33 changes: 20 additions & 13 deletions source/css/_common/components/sidebar/sidebar-author-links.styl
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
.links-of-author { margin-top: 20px; }

.links-of-author {
margin-top: 40px;
text-align: center;
}
.links-of-author .links-of-author-item {
display: inline-block;;
}
.links-of-author a {
display: inline-block;
vertical-align: middle;
margin-right: 10px;
margin-bottom: 10px;
border-bottom-color: $black-light;
font-size: 13px;
border: none;

&:before {
display: inline-block;
vertical-align: middle;
margin-right: 3px;
content: " ";
width: 4px;
height: 4px;
border-radius: 50%;
background: rgb(random-color(0, 255) - 50%, random-color(0, 255) - 50%, random-color(0, 255) - 50%);
i, i img{
width: $site-author-socail-item-size;
height: $site-author-socail-item-size;
font-size: $site-author-socail-item-size;
transition: all .5s ease-in-out;
}
i img {
opacity: 0.6;
margin-top: 4px;
&:hover {
opacity: 1;
}
}
}
1 change: 1 addition & 0 deletions source/css/_common/components/sidebar/sidebar-author.styl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
max-width: $site-author-image-width;
height: $site-author-image-height;
border: $site-author-image-border-width solid $site-author-image-border-color;
border-radius: 50%;
}

.site-author-name {
Expand Down
3 changes: 1 addition & 2 deletions source/css/_common/components/sidebar/sidebar.styl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

.sidebar-inner {
position: relative;
padding: 20px 10px;
padding: 42px 12px;
color: $grey-dark;
text-align: center;
}
Expand All @@ -39,4 +39,3 @@
@import "sidebar-blogroll.styl";
@import "sidebar-nav";
@import "sidebar-toc";

16 changes: 15 additions & 1 deletion source/css/_common/components/tag-cloud.styl
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,18 @@
display: inline-block;
margin: 10px;
}
}
}

.tag-cloud-tags a{
display: inline-block;
background-color $tag-bg-color;
padding: 2px 8px;
color: #fff;
border-bottom: none;
transition: all .5s ease-in-out;
border-radius: 3px;
}

.tag-cloud-tags a:hover {
font-size: 16px;
}
4 changes: 1 addition & 3 deletions source/css/_common/scaffolding/base.styl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ p { margin: 0 0 25px 0; }
a {
color: $link-color;
text-decoration: none;
border-bottom: 1px solid $grey-dark;
border-bottom: 1px solid $link-decoration-color;
word-wrap: break-word;

&:hover {
Expand Down Expand Up @@ -99,5 +99,3 @@ dd {
margin: 0;
padding: 0;
}


6 changes: 3 additions & 3 deletions source/css/_schemes/Mist/_posts-expanded.styl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
.post-eof { display: none; }

.post { margin-top: 120px; }
.post { margin-top: 60px; }
.post:first-child { margin-top: 0; }

.post-meta {
Expand All @@ -20,8 +20,8 @@

.post-title {
position: relative;
font-size: $font-size-headings-base;
font-weight: 400;
font-size: 48px;
font-weight: bold;
+mobile() { font-size: $font-size-headings-smaller; }
+desktop-large() { font-size: $font-size-headings-large; }
}
Expand Down
2 changes: 1 addition & 1 deletion source/css/_schemes/Mist/outline/outline.styl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
.main-inner { margin-top: 80px; }
.main-inner { margin-top: 40px; }
Loading