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

Fixes titles & headers excess spaces. #1632

Merged
merged 7 commits into from
May 3, 2017
Merged
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
4 changes: 2 additions & 2 deletions layout/_macro/post-collapse.swig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<article class="post post-type-{{ post.type | default('normal') }}" itemscope itemtype="http://schema.org/Article">
<header class="post-header">

<{% if theme.seo %}h2{% else %}h1{% endif %} class="post-title">
<{% if theme.seo %}h3{% else %}h2{% endif %} class="post-title">
{% if post.link %}{# Link posts #}
<a class="post-title-link post-title-link-external" target="_blank" href="{{ url_for(post.link) }}" itemprop="url">
{{ post.title or post.link }}
Expand All @@ -18,7 +18,7 @@
{% endif %}
</a>
{% endif %}
</{% if theme.seo %}h2{% else %}h1{% endif %}>
</{% if theme.seo %}h3{% else %}h2{% endif %}>

<div class="post-meta">
<time class="post-time" itemprop="dateCreated"
Expand Down
24 changes: 11 additions & 13 deletions layout/_macro/post.swig
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@

{# Not to show title for quote posts that do not have a title #}
{% if not (is_index and post.type === 'quote' and not post.title) %}
<{% if theme.seo %}h2{% else %}h1{% endif %} class="post-title" itemprop="name headline">
{# Link posts #}
{% if post.link %}
<{% if theme.seo %}h2{% else %}h1{% endif %} class="post-title" itemprop="name headline">{#
#}{# Link posts #}{#
#}{% if post.link %}
{% if post.sticky > 0 %}
{{ post.sticky }}
<span class="post-sticky-flag" title="{{ __('post.sticky') }}">
Expand All @@ -39,21 +39,19 @@
{{ post.title or post.link }}
<i class="fa fa-external-link"></i>
</a>
{% else %}
{% if is_index %}
{% else %}{#
#}{% if is_index %}
{% if post.sticky > 0 %}
<span class="post-sticky-flag" title="{{ __('post.sticky') }}">
<i class="fa fa-thumb-tack"></i>
</span>
{% endif %}
<a class="post-title-link" href="{{ url_for(post.path) }}" itemprop="url">
{{ post.title | default(__('post.untitled'))}}
</a>
{% else %}
{{ post.title }}
{% endif %}
{% endif %}
</{% if theme.seo %}h2{% else %}h1{% endif %}>
<a class="post-title-link" href="{{ url_for(post.path) }}" itemprop="url">{#
#}{{ post.title | default(__('post.untitled'))}}{#
#}</a>{#
#}{% else %}{{ post.title }}{% endif %}{#
#}{% endif %}{#
#}</{% if theme.seo %}h2{% else %}h1{% endif %}>
{% endif %}

<div class="post-meta">
Expand Down
8 changes: 4 additions & 4 deletions layout/category.swig
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

<section id="posts" class="posts-collapse">
<div class="collection-title">
<h2 >
{{ page.category }}
<small>{{ __('title.category') }}</small>
</h2>
<{% if theme.seo %}h2{% else %}h1{% endif %}>{#
#}{{ page.category }}{#
#}<small>{{ __('title.category') }}</small>
</{% if theme.seo %}h2{% else %}h1{% endif %}>
</div>

{% for post in page.posts %}
Expand Down
12 changes: 11 additions & 1 deletion layout/page.swig
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
{% extends '_layout.swig' %}
{% import '_macro/sidebar.swig' as sidebar_template %}

{% block title %}{% set page_title_suffix = ' | ' + config.title %}{% if page.type === "categories" and not page.title %}{{ __('title.category') + page_title_suffix }}{% elif page.type === "tags" and not page.title %}{{ __('title.tag') + page_title_suffix }}{% else %}{{ page.title + page_title_suffix }}{% endif %}{% endblock %}
{% block title %}{#
#}{% set page_title_suffix = ' | ' + config.title %}{#

#}{% if page.type === "categories" and not page.title %}{#
#}{{ __('title.category') + page_title_suffix }}{#
#}{% elif page.type === "tags" and not page.title %}{#
#}{{ __('title.tag') + page_title_suffix }}{#
#}{% else %}{#
#}{{ page.title + page_title_suffix }}{#
#}{% endif %}{#
#}{% endblock %}

{% block content %}

Expand Down
8 changes: 4 additions & 4 deletions layout/tag.swig
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

<div id="posts" class="posts-collapse">
<div class="collection-title">
<h2 >
{{ page.tag }}
<small>{{ __('title.tag') }}</small>
</h2>
<{% if theme.seo %}h2{% else %}h1{% endif %}>{#
#}{{ page.tag }}{#
#}<small>{{ __('title.tag') }}</small>
</{% if theme.seo %}h2{% else %}h1{% endif %}>
</div>

{% for post in page.posts %}
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 @@ -37,7 +37,7 @@

h2 { margin-left: 20px; }

small { color: $grey; }
small { color: $grey; margin-left: 5px; }

&::before {
content: " ";
Expand Down