Browse Source

Added simple translation.

master
KN4CK3R 1 year ago
parent
commit
fba43b2274
3 changed files with 30 additions and 8 deletions
  1. +22
    -0
      _config.yml
  2. +1
    -1
      _includes/footer.html
  3. +7
    -7
      _layouts/recipe.html

+ 22
- 0
_config.yml View File

@ -21,3 +21,25 @@ collections:
output: true
exclude: ['Gemfile', 'Gemfile.lock', 'Rakefile', 'README.md']
translation:
en:
components: "Components"
ingredients: "Ingredients"
directions: "Directions"
category: "Category"
nutritional_information: "Nutritional Information"
component_based: 'This is a <strong class="blue">component-based recipe</strong>.'
search: "Search"
blog: "Blog"
subscribe: "Subscribe"
de:
components: "Komponenten"
ingredients: "Zutaten"
directions: "Zubereitung"
category: "Kategorie"
nutritional_information: "Nährwertangaben"
component_based: 'Dieses Rezept besteht aus <strong class="blue">mehreren Komponenten</strong>.'
search: "Suche"
blog: "Blog"
subscribe: "Abonnieren"

+ 1
- 1
_includes/footer.html View File

@ -4,7 +4,7 @@
<div class="clearfix">
<div class="sm-col sm-col-6">
<p class="left-align mb2"><a href="{{ "/search" | prepend: site.baseurl}}">Search</a> | <a href="{{ "/blog" | prepend: site.baseurl}}">Blog</a> | Subscribe <a href="{{ "/feed.xml" | prepend: site.baseurl }}">via RSS</a></p>
<p class="left-align mb2"><a href="{{ "/search" | prepend: site.baseurl}}">{{ site.translation[site.language].search }}</a> | <a href="{{ "/blog" | prepend: site.baseurl}}">{{ site.translation[site.language].blog }}</a> | {{ site.translation[site.language].subscribe }} <a href="{{ "/feed.xml" | prepend: site.baseurl }}">via RSS</a></p>
</div>
<div class="sm-col sm-col-6">
<p class="right-align mb2">Made with <svg class="js-geomicon geomicon" height="0.8em" data-icon="heart" viewBox="0 0 32 32" style="fill:#007FFF"><title>heart icon</title><path d="M0 10 C0 6, 3 2, 8 2 C12 2, 15 5, 16 6 C17 5, 20 2, 24 2 C30 2, 32 6, 32 10 C32 18, 18 29, 16 30 C14 29, 0 18, 0 10"></path></svg> by <a href="http://twitter.com/clarklab">@clarklab</a></p>


+ 7
- 7
_layouts/recipe.html View File

@ -40,7 +40,7 @@ layout: default
<div class="sm-col sm-col-6 lg-col-6">
<!-- check if it's a component-based recipe -->
{% if page.components %}
<h4 class="blue mt0 mb2 xs-center">Components</h4>
<h4 class="blue mt0 mb2 xs-center">{{ site.translation[site.language].components }}</h4>
<ul>
<!-- list components that make up recipe -->
{% for component in page.components %}
@ -50,7 +50,7 @@ layout: default
{% endif %}
{% if page.ingredients %}
<h4 class="blue mt0 mb2 xs-center">Ingredients</h4>
<h4 class="blue mt0 mb2 xs-center">{{ site.translation[site.language].ingredients }}</h4>
<ul itemprop="ingredients">
<!-- list ingredients that make up recipe -->
{% for ingredient in page.ingredients %}
@ -62,7 +62,7 @@ layout: default
</div>
<div class="sm-col sm-col-6 lg-col-6">
<h4 class="blue mt0 mb2 xs-center">Directions</h4>
<h4 class="blue mt0 mb2 xs-center">{{ site.translation[site.language].directions }}</h4>
<ul itemprop="recipeInstructions">
{% for direction in page.directions %}
<li>{{ direction | markdownify }}</li>
@ -77,7 +77,7 @@ layout: default
{% if page.components %}
<div class="components bg-darken-2 p2 mt3 mb3 center">
&darr; This is a <strong class="blue">component-based recipe</strong> (fancy talk for making the dish in pieces, then assembling). &darr;
&darr; {{ site.translation[site.language].component_based }} &darr;
</div>
<div class="clearfix mxn2">
@ -100,14 +100,14 @@ layout: default
{% endif %}
{% endfor %}
<h4 class="blue regular xs-center">Ingredients</h4>
<h4 class="blue regular xs-center">{{ site.translation[site.language].ingredients }}</h4>
<ul class="ingredients" itemprop="ingredients">
{% for item in recipe.ingredients %}
<li itemprop="ingredient">{{ item | markdownify }}</li>
{% endfor %}
</ul>
<h4 class="blue regular xs-center">Steps</h4>
<h4 class="blue regular xs-center">{{ site.translation[site.language].directions }}</h4>
<ul itemprop="instructions">
{% for item in recipe.directions %}
<li>{{ item | markdownify }}</li>
@ -124,7 +124,7 @@ layout: default
<!-- end components -->
{% for category in page.categories %}
<p class="clearfix">Category: <span itemprop="recipeCategory">{{ category }}</span></p>
<p class="clearfix">{{ site.translation[site.language].category }}: <span itemprop="recipeCategory">{{ category }}</span></p>
{% endfor %}
</article>


Loading…
Cancel
Save