mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-18 18:33:42 +00:00
Fix multiple h1 tag (#416)
This commit is contained in:
parent
847fc59e3e
commit
fc90c76159
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
{%- if post.header !== false %}
|
{%- if post.header !== false %}
|
||||||
<header class="post-header">
|
<header class="post-header">
|
||||||
<{%- if is_index %}h2{% else %}h1{%- endif %} class="post-title{%- if post.direction and post.direction.toLowerCase() === 'rtl' %} rtl{%- endif %}" itemprop="name headline">
|
<{% if is_index %}h2{% else %}h1{% endif %} class="post-title{% if post.direction and post.direction.toLowerCase() === 'rtl' %} rtl{% endif %}" itemprop="name headline">
|
||||||
{# Link posts #}
|
{# Link posts #}
|
||||||
{%- if post.link %}
|
{%- if post.link %}
|
||||||
{%- if post.sticky > 0 %}
|
{%- if post.sticky > 0 %}
|
||||||
@ -42,7 +42,7 @@
|
|||||||
{{- post.title }}
|
{{- post.title }}
|
||||||
{{- post_edit(post.source) }}
|
{{- post_edit(post.source) }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
</{%- if is_index %}h2{% else %}h1{%- endif %}>
|
</{% if is_index %}h2{% else %}h1{% endif %}>
|
||||||
|
|
||||||
<div class="post-meta-container">
|
<div class="post-meta-container">
|
||||||
{{ partial('_partials/post/post-meta.njk') }}
|
{{ partial('_partials/post/post-meta.njk') }}
|
||||||
@ -57,7 +57,7 @@
|
|||||||
{#################}
|
{#################}
|
||||||
{### POST BODY ###}
|
{### POST BODY ###}
|
||||||
{#################}
|
{#################}
|
||||||
<div class="post-body{%- if post.direction and post.direction.toLowerCase() === 'rtl' %} rtl{%- endif %}" itemprop="articleBody">
|
<div class="post-body{% if post.direction and post.direction.toLowerCase() === 'rtl' %} rtl{% endif %}" itemprop="articleBody">
|
||||||
{%- if is_index %}
|
{%- if is_index %}
|
||||||
{%- if post.description and theme.excerpt_description %}
|
{%- if post.description and theme.excerpt_description %}
|
||||||
<p>{{ post.description }}</p>
|
<p>{{ post.description }}</p>
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
<a href="{{ config.root }}" class="brand" rel="start">
|
<a href="{{ config.root }}" class="brand" rel="start">
|
||||||
<i class="logo-line"></i>
|
<i class="logo-line"></i>
|
||||||
<h1 class="site-title">{{ title }}</h1>
|
<{% if is_home() or is_archive() %}h1{% else %}p{% endif %} class="site-title">{{ title }}</{% if is_home() or is_archive() %}h1{% else %}p{% endif %}>
|
||||||
<i class="logo-line"></i>
|
<i class="logo-line"></i>
|
||||||
</a>
|
</a>
|
||||||
{%- if subtitle %}
|
{%- if subtitle %}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
{{ partial('_partials/header/brand.njk', {}, {cache: theme.cache.enable}) }}
|
{{ partial('_partials/header/brand.njk') }}
|
||||||
|
|
||||||
{{ partial('_partials/header/menu.njk', {}, {cache: theme.cache.enable}) }}
|
{{ partial('_partials/header/menu.njk', {}, {cache: theme.cache.enable}) }}
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
{%- if theme.algolia_search.enable or theme.local_search.enable %}
|
{%- if theme.algolia_search.enable or theme.local_search.enable %}
|
||||||
<li class="menu-item menu-item-search">
|
<li class="menu-item menu-item-search">
|
||||||
<a role="button" class="popup-trigger">
|
<a role="button" class="popup-trigger">
|
||||||
{%- if theme.menu_settings.icons %}<i class="fa fa-search fa-fw"></i>{%- endif %}{{ __('menu.search') }}
|
{%- if theme.menu_settings.icons %}<i class="fa fa-search fa-fw"></i>{% endif %}{{ __('menu.search') }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
{%- 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>
|
||||||
{%- if hasCategoriesPage %}</a>{%- endif %}
|
{%- if hasCategoriesPage %}</a>{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
@ -44,7 +44,7 @@
|
|||||||
{%- 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>
|
||||||
{%- if hasTagsPage %}</a>{%- endif %}
|
{%- if hasTagsPage %}</a>{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
</nav>
|
</nav>
|
||||||
@ -54,7 +54,7 @@
|
|||||||
{%- 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">
|
||||||
<button{% if theme.gitter.enable %} class="js-gitter-toggle-chat-button"{% endif %}>
|
<button{% if theme.gitter.enable %} class="js-gitter-toggle-chat-button"{% endif %}>
|
||||||
{%- if theme.chat.icon %}<i class="{{ theme.chat.icon }}"></i>{%- endif %}
|
{%- if theme.chat.icon %}<i class="{{ theme.chat.icon }}"></i>{% endif %}
|
||||||
{{ theme.chat.text }}
|
{{ theme.chat.text }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -84,7 +84,7 @@
|
|||||||
{%- if theme.links %}
|
{%- if theme.links %}
|
||||||
<div class="links-of-blogroll site-overview-item animated">
|
<div class="links-of-blogroll site-overview-item animated">
|
||||||
<div class="links-of-blogroll-title">
|
<div class="links-of-blogroll-title">
|
||||||
{%- if theme.links_settings.icon %}<i class="{{ theme.links_settings.icon }} fa-fw"></i>{%- endif %}
|
{%- if theme.links_settings.icon %}<i class="{{ theme.links_settings.icon }} fa-fw"></i>{% endif %}
|
||||||
{{ theme.links_settings.title }}
|
{{ theme.links_settings.title }}
|
||||||
</div>
|
</div>
|
||||||
<ul class="links-of-blogroll-list">
|
<ul class="links-of-blogroll-list">
|
||||||
|
|||||||
@ -14,10 +14,10 @@
|
|||||||
<div class="post-block">
|
<div class="post-block">
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
<div class="collection-title">
|
<div class="collection-title">
|
||||||
<h2 class="collection-header">
|
<h1 class="collection-header">
|
||||||
{{- page.category }}
|
{{- page.category }}
|
||||||
<small>{{ __('title.category') }}</small>
|
<small>{{ __('title.category') }}</small>
|
||||||
</h2>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ post_template.render(page.posts) }}
|
{{ post_template.render(page.posts) }}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{% extends '_layout.njk' %}
|
{% extends '_layout.njk' %}
|
||||||
{% import '_macro/sidebar.njk' as sidebar_template with context %}
|
{% import '_macro/sidebar.njk' as sidebar_template with context %}
|
||||||
|
|
||||||
{% block title %}{{ title }}{%- if theme.index_with_subtitle and subtitle %} - {{ subtitle }}{%- endif %}{% endblock %}
|
{% block title %}{{ title }}{% if theme.index_with_subtitle and subtitle %} - {{ subtitle }}{% endif %}{% endblock %}
|
||||||
|
|
||||||
{% block class %}index posts-expand{% endblock %}
|
{% block class %}index posts-expand{% endblock %}
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
{#################}
|
{#################}
|
||||||
{### PAGE BODY ###}
|
{### PAGE BODY ###}
|
||||||
{#################}
|
{#################}
|
||||||
<div class="post-body{%- if page.direction and page.direction.toLowerCase() === 'rtl' %} rtl{%- endif %}">
|
<div class="post-body{% if page.direction and page.direction.toLowerCase() === 'rtl' %} rtl{% endif %}">
|
||||||
{%- if page.type === 'tags' %}
|
{%- if page.type === 'tags' %}
|
||||||
{%- include '_partials/page/tags.njk' -%}
|
{%- include '_partials/page/tags.njk' -%}
|
||||||
{% elif page.type === 'categories' %}
|
{% elif page.type === 'categories' %}
|
||||||
|
|||||||
@ -14,10 +14,10 @@
|
|||||||
<div class="post-block">
|
<div class="post-block">
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
<div class="collection-title">
|
<div class="collection-title">
|
||||||
<h2 class="collection-header">
|
<h1 class="collection-header">
|
||||||
{{- page.tag }}
|
{{- page.tag }}
|
||||||
<small>{{ __('title.tag') }}</small>
|
<small>{{ __('title.tag') }}</small>
|
||||||
</h2>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ post_template.render(page.posts) }}
|
{{ post_template.render(page.posts) }}
|
||||||
|
|||||||
@ -30,6 +30,7 @@
|
|||||||
font-family: $font-family-logo;
|
font-family: $font-family-logo;
|
||||||
font-size: $font-size-title;
|
font-size: $font-size-title;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
line-height: 1.5;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user