Skip to content

Commit

Permalink
Added layout page
Browse files Browse the repository at this point in the history
  • Loading branch information
cetinajero committed Jan 30, 2018
1 parent 3a3740e commit 50cf0a5
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion _layouts/page.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
---
layout: default
---
{{ content }}
{% assign url-size = page.url | size | minus: 2 %}
{% assign i18n-id = page.url | slice: 1,url-size | replace: '/', '-' | remove_first: page.collection | remove_first: '-' %}
{% if i18n-id == "" %}{% assign i18n-id = page.collection %}{% endif %}
{% if page.collection == 'pages' %}
{% assign i18n-title = site.data.i18n.common[page.collection][site.lang][i18n-id].title %}
{% assign i18n-subtitle = site.data.i18n.common[page.collection][site.lang][i18n-id].subtitle %}
{% else %}
{% assign i18n-title = site.data.i18n.catalog[page.collection][site.lang][i18n-id].title %}
{% assign i18n-subtitle = site.data.i18n.catalog[page.collection][site.lang][i18n-id].subtitle %}
{% endif %}
<h1 id="{{ i18n-id }}" class="post">{% if i18n-title %}{{ i18n-title }}{% else %}{{ page.title }}{% endif %}</h1>
<h3 id="{{ i18n-id }}" class="post">{% if i18n-subtitle %}{{ i18n-subtitle }}{% else %}{{ page.subtitle }}{% endif %}</h1>

<div class="post">
<div id="sign-in-content"></div>
{{ content }}
</div>

0 comments on commit 50cf0a5

Please sign in to comment.