mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-20 19:02:33 +00:00
Refactor post_meta_order
This commit is contained in:
parent
a3dcac5f33
commit
7c596190bc
@ -582,7 +582,6 @@ disqus:
|
|||||||
enable: false
|
enable: false
|
||||||
shortname:
|
shortname:
|
||||||
count: true
|
count: true
|
||||||
#post_meta_order: 0
|
|
||||||
|
|
||||||
# DisqusJS
|
# DisqusJS
|
||||||
# Alternative Disqus - Render comment component using Disqus API.
|
# Alternative Disqus - Render comment component using Disqus API.
|
||||||
@ -603,7 +602,6 @@ changyan:
|
|||||||
enable: false
|
enable: false
|
||||||
appid:
|
appid:
|
||||||
appkey:
|
appkey:
|
||||||
#post_meta_order: 0
|
|
||||||
|
|
||||||
# Valine
|
# Valine
|
||||||
# For more information: https://valine.js.org, https://github.com/xCss/Valine
|
# For more information: https://valine.js.org, https://github.com/xCss/Valine
|
||||||
@ -622,7 +620,6 @@ valine:
|
|||||||
serverURLs: # When the custom domain name is enabled, fill it in here (it will be detected automatically by default, no need to fill in)
|
serverURLs: # When the custom domain name is enabled, fill it in here (it will be detected automatically by default, no need to fill in)
|
||||||
enableQQ: false # Whether to enable the Nickname box to automatically get QQ Nickname and QQ Avatar
|
enableQQ: false # Whether to enable the Nickname box to automatically get QQ Nickname and QQ Avatar
|
||||||
requiredFields: [] # Set required fields: [nick] | [nick, mail]
|
requiredFields: [] # Set required fields: [nick] | [nick, mail]
|
||||||
#post_meta_order: 0
|
|
||||||
|
|
||||||
# LiveRe comments system
|
# LiveRe comments system
|
||||||
# You can get your uid from https://livere.com/insight/myCode (General web site)
|
# You can get your uid from https://livere.com/insight/myCode (General web site)
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<article itemscope itemtype="http://schema.org/Article">
|
<article itemscope itemtype="http://schema.org/Article">
|
||||||
<header class="post-header">
|
<header class="post-header">
|
||||||
<div class="post-meta">
|
<div class="post-meta-container">
|
||||||
<time itemprop="dateCreated"
|
<time itemprop="dateCreated"
|
||||||
datetime="{{ moment(post.date).format() }}"
|
datetime="{{ moment(post.date).format() }}"
|
||||||
content="{{ date(post.date, config.date_format) }}">
|
content="{{ date(post.date, config.date_format) }}">
|
||||||
|
|||||||
@ -43,8 +43,8 @@
|
|||||||
{%- endif %}
|
{%- endif %}
|
||||||
</{%- if is_index %}h2{% else %}h1{%- endif %}>
|
</{%- if is_index %}h2{% else %}h1{%- endif %}>
|
||||||
|
|
||||||
<div class="post-meta">
|
<div class="post-meta-container">
|
||||||
|
<div class="post-meta">
|
||||||
{%- set date_diff = date(post.date) != date(post.updated) %}
|
{%- set date_diff = date(post.date) != date(post.updated) %}
|
||||||
{%- set time_diff = time(post.date) != time(post.updated) %}
|
{%- set time_diff = time(post.date) != time(post.updated) %}
|
||||||
|
|
||||||
@ -149,11 +149,11 @@
|
|||||||
<span>{{ symbolsTime(post, config.symbols_count_time.awl, config.symbols_count_time.wpm, __('symbols_count_time.time_minutes')) }}</span>
|
<span>{{ symbolsTime(post, config.symbols_count_time.awl, config.symbols_count_time.wpm, __('symbols_count_time.time_minutes')) }}</span>
|
||||||
</span>
|
</span>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
{%- if post.description and (not theme.excerpt_description or not is_index) %}
|
{%- if post.description and (not theme.excerpt_description or not is_index) %}
|
||||||
<div class="post-description">{{ post.description }}</div>
|
<div class="post-description">{{ post.description }}</div>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
{{- post_edit(page.source) }}
|
{{- post_edit(page.source) }}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<div class="post-meta">
|
<div class="post-meta-container">
|
||||||
{%- if page.description %}
|
{%- if page.description %}
|
||||||
<div class="post-description">{{ page.description }}</div>
|
<div class="post-description">{{ page.description }}</div>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|||||||
@ -40,6 +40,6 @@ hexo.extend.filter.register('theme_inject', injects => {
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
`, {}, {}, theme.changyan.post_meta_order);
|
`, {}, {});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@ -36,6 +36,6 @@ hexo.extend.filter.register('theme_inject', injects => {
|
|||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
`, {}, {}, theme.disqus.post_meta_order);
|
`, {}, {});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@ -30,6 +30,6 @@ hexo.extend.filter.register('theme_inject', injects => {
|
|||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
`, {}, {}, theme.valine.post_meta_order);
|
`, {}, {});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@ -76,7 +76,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-meta {
|
.post-meta-container {
|
||||||
display: inline;
|
display: inline;
|
||||||
font-size: $font-size-smallest;
|
font-size: $font-size-smallest;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
|||||||
@ -5,9 +5,7 @@
|
|||||||
post-card();
|
post-card();
|
||||||
|
|
||||||
.social-list {
|
.social-list {
|
||||||
display: flex;
|
flex-wrap();
|
||||||
flex-wrap: wrap;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
.social-item {
|
.social-item {
|
||||||
margin: .5em 2em;
|
margin: .5em 2em;
|
||||||
|
|||||||
@ -36,7 +36,6 @@
|
|||||||
color: var(--link-color);
|
color: var(--link-color);
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
vertical-align: top;
|
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
background: var(--link-color);
|
background: var(--link-color);
|
||||||
@ -66,7 +65,7 @@
|
|||||||
transform: rotate(30deg);
|
transform: rotate(30deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.posts-expand .post-meta {
|
.posts-expand .post-meta-container {
|
||||||
color: $grey-dark;
|
color: $grey-dark;
|
||||||
font-family: $font-family-posts;
|
font-family: $font-family-posts;
|
||||||
font-size: $font-size-smallest;
|
font-size: $font-size-smallest;
|
||||||
@ -83,6 +82,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Flexbox layout makes it possible to reorder the child
|
||||||
|
// elements of .post-meta through the `order` CSS property
|
||||||
|
.post-meta {
|
||||||
|
flex-wrap();
|
||||||
|
}
|
||||||
|
|
||||||
// .post-meta-item exists in .post-meta and footer
|
// .post-meta-item exists in .post-meta and footer
|
||||||
.post-meta-item + .post-meta-item::before {
|
.post-meta-item + .post-meta-item::before {
|
||||||
content: '|';
|
content: '|';
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
.site-state {
|
.site-state {
|
||||||
display: flex;
|
flex-wrap();
|
||||||
flex-wrap: wrap;
|
|
||||||
justify-content: center;
|
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,9 +21,7 @@ tbody tr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
caption, th, td {
|
caption, th, td {
|
||||||
font-weight: normal;
|
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
vertical-align: middle;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
th, td {
|
th, td {
|
||||||
|
|||||||
@ -81,6 +81,12 @@ sidebar-inline-links-item() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
flex-wrap() {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
flex-column() {
|
flex-column() {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-meta {
|
.post-meta-container {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,7 +28,6 @@
|
|||||||
float: right;
|
float: right;
|
||||||
padding: 2px 5px;
|
padding: 2px 5px;
|
||||||
text-shadow: 1px 1px 0 rgba(0, 0, 0, .1);
|
text-shadow: 1px 1px 0 rgba(0, 0, 0, .1);
|
||||||
vertical-align: middle;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -53,10 +53,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.links-of-author {
|
.links-of-author {
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
justify-content: center;
|
flex-wrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
.links-of-author-item {
|
.links-of-author-item {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user