Refactor the page
layout
This commit is contained in:
parent
a403ffee42
commit
3342abc9e6
2 changed files with 17 additions and 14 deletions
|
@ -9,25 +9,27 @@ 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 or page.collection == 'tabs' %}
|
|
||||||
|
{% capture _content %}
|
||||||
|
{% if layout.refactor or page.layout == 'page' %}
|
||||||
|
{% include refactor-content.html content=content %}
|
||||||
|
{% else %}
|
||||||
|
{{ content }}
|
||||||
|
{% endif %}
|
||||||
|
{% endcapture %}
|
||||||
|
|
||||||
|
{% if page.layout == 'page' or page.collection == 'tabs'%}
|
||||||
|
{% assign title = site.data.locales[lang].tabs[tab_key] | default: page.title %}
|
||||||
<h1 class="dynamic-title">
|
<h1 class="dynamic-title">
|
||||||
{%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%}
|
{{ title }}
|
||||||
{{- site.data.locales[lang].tabs[tab_key] | default: page.title -}}
|
|
||||||
</h1>
|
</h1>
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
{% if page.layout == 'page' %}
|
{{ _content }}
|
||||||
{% include refactor-content.html content=content %}
|
|
||||||
{% else %}
|
|
||||||
{{ content }}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if page.layout == 'post' %}
|
{{ _content }}
|
||||||
{% include refactor-content.html content=content %}
|
|
||||||
{% else %}
|
|
||||||
{{ content }}
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div> <!-- #core-wrapper -->
|
</div> <!-- #core-wrapper -->
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
layout: page
|
layout: page
|
||||||
|
refactor: true
|
||||||
pannel_includes:
|
pannel_includes:
|
||||||
- toc
|
- toc
|
||||||
tail_includes:
|
tail_includes:
|
||||||
|
|
Loading…
Reference in a new issue