mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-17 18:22:33 +00:00
Fix multiple h1 tag (#416)
This commit is contained in:
parent
847fc59e3e
commit
fc90c76159
@ -20,7 +20,7 @@
|
||||
|
||||
{%- if post.header !== false %}
|
||||
<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 #}
|
||||
{%- if post.link %}
|
||||
{%- if post.sticky > 0 %}
|
||||
@ -42,7 +42,7 @@
|
||||
{{- post.title }}
|
||||
{{- post_edit(post.source) }}
|
||||
{%- endif %}
|
||||
</{%- if is_index %}h2{% else %}h1{%- endif %}>
|
||||
</{% if is_index %}h2{% else %}h1{% endif %}>
|
||||
|
||||
<div class="post-meta-container">
|
||||
{{ partial('_partials/post/post-meta.njk') }}
|
||||
@ -57,7 +57,7 @@
|
||||
{#################}
|
||||
{### 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 post.description and theme.excerpt_description %}
|
||||
<p>{{ post.description }}</p>
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
|
||||
<a href="{{ config.root }}" class="brand" rel="start">
|
||||
<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>
|
||||
</a>
|
||||
{%- 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}) }}
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
{%- if theme.algolia_search.enable or theme.local_search.enable %}
|
||||
<li class="menu-item menu-item-search">
|
||||
<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>
|
||||
</li>
|
||||
{%- endif %}
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
{%- endif %}
|
||||
<span class="site-state-item-count">{{ site.categories.length }}</span>
|
||||
<span class="site-state-item-name">{{ __('state.categories') }}</span>
|
||||
{%- if hasCategoriesPage %}</a>{%- endif %}
|
||||
{%- if hasCategoriesPage %}</a>{% endif %}
|
||||
</div>
|
||||
{%- endif %}
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
{%- endif %}
|
||||
<span class="site-state-item-count">{{ site.tags.length }}</span>
|
||||
<span class="site-state-item-name">{{ __('state.tags') }}</span>
|
||||
{%- if hasTagsPage %}</a>{%- endif %}
|
||||
{%- if hasTagsPage %}</a>{% endif %}
|
||||
</div>
|
||||
{%- endif %}
|
||||
</nav>
|
||||
@ -54,7 +54,7 @@
|
||||
{%- if theme.chat.enable and (theme.chatra.enable or theme.tidio.enable or theme.gitter.enable) %}
|
||||
<div class="sidebar-button site-overview-item animated">
|
||||
<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 }}
|
||||
</button>
|
||||
</div>
|
||||
@ -84,7 +84,7 @@
|
||||
{%- if theme.links %}
|
||||
<div class="links-of-blogroll site-overview-item animated">
|
||||
<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 }}
|
||||
</div>
|
||||
<ul class="links-of-blogroll-list">
|
||||
|
||||
@ -14,10 +14,10 @@
|
||||
<div class="post-block">
|
||||
<div class="post-content">
|
||||
<div class="collection-title">
|
||||
<h2 class="collection-header">
|
||||
<h1 class="collection-header">
|
||||
{{- page.category }}
|
||||
<small>{{ __('title.category') }}</small>
|
||||
</h2>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
{{ post_template.render(page.posts) }}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{% extends '_layout.njk' %}
|
||||
{% 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 %}
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
{#################}
|
||||
{### 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' %}
|
||||
{%- include '_partials/page/tags.njk' -%}
|
||||
{% elif page.type === 'categories' %}
|
||||
|
||||
@ -14,10 +14,10 @@
|
||||
<div class="post-block">
|
||||
<div class="post-content">
|
||||
<div class="collection-title">
|
||||
<h2 class="collection-header">
|
||||
<h1 class="collection-header">
|
||||
{{- page.tag }}
|
||||
<small>{{ __('title.tag') }}</small>
|
||||
</h2>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
{{ post_template.render(page.posts) }}
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
font-family: $font-family-logo;
|
||||
font-size: $font-size-title;
|
||||
font-weight: normal;
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user