mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-19 18:42:34 +00:00
parent
f677a588b2
commit
07097c8537
7
.github/workflows/linter.yml
vendored
7
.github/workflows/linter.yml
vendored
@ -20,3 +20,10 @@ jobs:
|
|||||||
uses: coverallsapp/github-action@master
|
uses: coverallsapp/github-action@master
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install curlylint
|
||||||
|
- run: curlylint --include .njk layout
|
||||||
|
|||||||
@ -39,7 +39,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{%- if theme.back2top.enable and theme.back2top.sidebar %}
|
{%- if theme.back2top.enable and theme.back2top.sidebar %}
|
||||||
<div class="back-to-top animated" role="button" aria-label="{{ __('accessibility.back_to_top') }}">
|
<div class="back-to-top animated" role="button" aria-label="{{ __('accessibility.back_to_top') }}">
|
||||||
<i class="fa fa-arrow-up"></i>
|
<i class="fa fa-arrow-up"></i>
|
||||||
|
|||||||
@ -83,11 +83,11 @@
|
|||||||
|
|
||||||
{{- next_inject('postMeta') }}
|
{{- next_inject('postMeta') }}
|
||||||
|
|
||||||
|
{%- if theme.symbols_count_time.separated_meta and config.symbols_count_time.symbols and config.symbols_count_time.time %}
|
||||||
|
<span class="post-meta-break"></span>
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
{%- if config.symbols_count_time.symbols %}
|
{%- if config.symbols_count_time.symbols %}
|
||||||
{%- if theme.symbols_count_time.separated_meta %}
|
|
||||||
</div>
|
|
||||||
<div class="post-meta">
|
|
||||||
{%- endif %}
|
|
||||||
<span class="post-meta-item" title="{{ __('symbols_count_time.count') }}">
|
<span class="post-meta-item" title="{{ __('symbols_count_time.count') }}">
|
||||||
<span class="post-meta-item-icon">
|
<span class="post-meta-item-icon">
|
||||||
<i class="far fa-file-word"></i>
|
<i class="far fa-file-word"></i>
|
||||||
|
|||||||
@ -12,11 +12,8 @@
|
|||||||
<nav class="site-state">
|
<nav class="site-state">
|
||||||
{%- if config.archive_dir != '/' and site.posts.length > 0 %}
|
{%- if config.archive_dir != '/' and site.posts.length > 0 %}
|
||||||
<div class="site-state-item site-state-posts">
|
<div class="site-state-item site-state-posts">
|
||||||
{%- if theme.menu.archives %}
|
{%- set archive_dir = theme.menu.archives.split('||')[0] | trim if theme.menu.archives else config.archive_dir + '/' %}
|
||||||
<a href="{{ url_for(theme.menu.archives.split('||')[0] | trim) }}">
|
<a href="{{ url_for(archive_dir) }}">
|
||||||
{% else %}
|
|
||||||
<a href="{{ url_for(config.archive_dir) }}">
|
|
||||||
{%- endif %}
|
|
||||||
<span class="site-state-item-count">{{ site.posts.length }}</span>
|
<span class="site-state-item-count">{{ site.posts.length }}</span>
|
||||||
<span class="site-state-item-name">{{ __('state.posts') }}</span>
|
<span class="site-state-item-name">{{ __('state.posts') }}</span>
|
||||||
</a>
|
</a>
|
||||||
@ -27,12 +24,9 @@
|
|||||||
{%- set categoriesPageQuery = site.pages.find({type: 'categories'}, {lean: true}) %}
|
{%- set categoriesPageQuery = site.pages.find({type: 'categories'}, {lean: true}) %}
|
||||||
{%- set hasCategoriesPage = categoriesPageQuery.length > 0 %}
|
{%- set hasCategoriesPage = categoriesPageQuery.length > 0 %}
|
||||||
<div class="site-state-item site-state-categories">
|
<div class="site-state-item site-state-categories">
|
||||||
|
{%- set category_dir = theme.menu.categories.split('||')[0] | trim if theme.menu.categories else config.category_dir + '/' %}
|
||||||
{%- if hasCategoriesPage %}
|
{%- if hasCategoriesPage %}
|
||||||
{%- if theme.menu.categories %}
|
<a href="{{ url_for(category_dir) }}">
|
||||||
<a href="{{ url_for(theme.menu.categories.split('||')[0] | trim) }}">
|
|
||||||
{% else %}
|
|
||||||
<a href="{{ url_for(config.category_dir) + '/' }}">
|
|
||||||
{%- endif %}
|
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
<span class="site-state-item-count">{{ site.categories.length }}</span>
|
<span class="site-state-item-count">{{ site.categories.length }}</span>
|
||||||
<span class="site-state-item-name">{{ __('state.categories') }}</span>
|
<span class="site-state-item-name">{{ __('state.categories') }}</span>
|
||||||
@ -44,12 +38,9 @@
|
|||||||
{%- set tagsPageQuery = site.pages.find({type: 'tags'}, {lean: true}) %}
|
{%- set tagsPageQuery = site.pages.find({type: 'tags'}, {lean: true}) %}
|
||||||
{%- set hasTagsPage = tagsPageQuery.length > 0 %}
|
{%- set hasTagsPage = tagsPageQuery.length > 0 %}
|
||||||
<div class="site-state-item site-state-tags">
|
<div class="site-state-item site-state-tags">
|
||||||
|
{%- set tag_dir = theme.menu.tags.split('||')[0] | trim if theme.menu.tags else config.tag_dir + '/' %}
|
||||||
{%- if hasTagsPage %}
|
{%- if hasTagsPage %}
|
||||||
{%- if theme.menu.tags %}
|
<a href="{{ url_for(tag_dir) }}">
|
||||||
<a href="{{ url_for(theme.menu.tags.split('||')[0] | trim) }}">
|
|
||||||
{% else %}
|
|
||||||
<a href="{{ url_for(config.tag_dir) + '/' }}">
|
|
||||||
{%- endif %}
|
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
<span class="site-state-item-count">{{ site.tags.length }}</span>
|
<span class="site-state-item-count">{{ site.tags.length }}</span>
|
||||||
<span class="site-state-item-name">{{ __('state.tags') }}</span>
|
<span class="site-state-item-name">{{ __('state.tags') }}</span>
|
||||||
@ -62,14 +53,10 @@
|
|||||||
|
|
||||||
{%- if theme.chat.enable and (theme.chatra.enable or theme.tidio.enable or theme.gitter.enable) %}
|
{%- if theme.chat.enable and (theme.chatra.enable or theme.tidio.enable or theme.gitter.enable) %}
|
||||||
<div class="sidebar-button site-overview-item animated">
|
<div class="sidebar-button site-overview-item animated">
|
||||||
{%- if theme.chatra.enable or theme.tidio.enable %}
|
<button{% if theme.gitter.enable %} class="js-gitter-toggle-chat-button"{% endif %}>
|
||||||
<button>
|
{%- if theme.chat.icon %}<i class="{{ theme.chat.icon }}"></i>{%- endif %}
|
||||||
{%- elif theme.gitter.enable %}
|
{{ theme.chat.text }}
|
||||||
<button class="js-gitter-toggle-chat-button">
|
</button>
|
||||||
{%- endif %}
|
|
||||||
{%- if theme.chat.icon %}<i class="{{ theme.chat.icon }}"></i>{%- endif %}
|
|
||||||
{{ theme.chat.text }}
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
|
|||||||
@ -91,7 +91,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// .post-meta-item exists in .post-meta and footer
|
// .post-meta-item exists in .post-meta and footer
|
||||||
.post-meta-item:not(:first-child)::before {
|
:not(.post-meta-break) + .post-meta-item::before {
|
||||||
content: '|';
|
content: '|';
|
||||||
margin: 0 .5em;
|
margin: 0 .5em;
|
||||||
}
|
}
|
||||||
@ -110,6 +110,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.post-meta-break {
|
||||||
|
flex-basis: 100%;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (hexo-config('busuanzi_count.enable') and hexo-config('busuanzi_count.post_views')) {
|
if (hexo-config('busuanzi_count.enable') and hexo-config('busuanzi_count.post_views')) {
|
||||||
#busuanzi_container_page_pv {
|
#busuanzi_container_page_pv {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user