Improve mobile title display
Also fixed the 404 page title on mobile screens
This commit is contained in:
parent
b518c9d3bc
commit
3caacbee61
3 changed files with 4 additions and 9 deletions
|
@ -136,7 +136,6 @@ defaults:
|
||||||
values:
|
values:
|
||||||
layout: page
|
layout: page
|
||||||
permalink: /:title/
|
permalink: /:title/
|
||||||
dynamic_title: true # Hide title in mobile screens.
|
|
||||||
|
|
||||||
sass:
|
sass:
|
||||||
style: compressed
|
style: compressed
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
<div id="topbar-title">
|
<div id="topbar-title">
|
||||||
{% if page.layout == 'home' %}
|
{% if page.layout == 'home' %}
|
||||||
{{- site.data.locales[lang].title | default: site.title -}}
|
{{- site.data.locales[lang].title | default: site.title -}}
|
||||||
{% elsif page.collection == 'tabs' %}
|
{% elsif page.collection == 'tabs' or page.dynamic_title %}
|
||||||
{%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%}
|
{%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%}
|
||||||
{{- site.data.locales[lang].tabs[tab_key] | default: page.title -}}
|
{{- site.data.locales[lang].tabs[tab_key] | default: page.title -}}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
|
@ -9,14 +9,10 @@ layout: default
|
||||||
<!-- core -->
|
<!-- core -->
|
||||||
<div id="core-wrapper" class="col-12 col-lg-11 col-xl-8">
|
<div id="core-wrapper" class="col-12 col-lg-11 col-xl-8">
|
||||||
<div class="post pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4">
|
<div class="post pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4">
|
||||||
{% if page.dynamic_title %}
|
{% if page.dynamic_title or page.collection == 'tabs' %}
|
||||||
<h1 class="dynamic-title">
|
<h1 class="dynamic-title">
|
||||||
{% if page.collection == 'tabs' %}
|
|
||||||
{%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%}
|
{%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%}
|
||||||
{{- site.data.locales[lang].tabs[tab_key] | default: page.title -}}
|
{{- site.data.locales[lang].tabs[tab_key] | default: page.title -}}
|
||||||
{% else %}
|
|
||||||
{{- page.title -}}
|
|
||||||
{% endif %}
|
|
||||||
</h1>
|
</h1>
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
{% include refactor-content.html content=content %}
|
{% include refactor-content.html content=content %}
|
||||||
|
|
Loading…
Reference in a new issue