Permalink
Browse files

Add the new section for libraries (#729)

  • Loading branch information...
1 parent e740d6a commit 5b750a1121c4fae391da3aff4a43d0037c8b1d8e @nscyclone nscyclone committed with Nov 28, 2016
Showing with 22 additions and 16 deletions.
  1. +2 −2 README.md
  2. +5 −1 _config.yml
  3. +15 −13 _includes/sidebar.html
View
@@ -43,8 +43,8 @@ In addition to the steps above there are a few addition steps required for trans
```shell
$ cd elixir_school
- $ mkdir -p jp/lessons/{basics,advanced,specifics}
- $ touch jp/lessons/{basics,advanced,specifics}/.gitignore
+ $ mkdir -p jp/lessons/{basics,advanced,specifics,libraries}
+ $ touch jp/lessons/{basics,advanced,specifics,libraries}/.gitignore
```
1. Update `_config.yml` by including the 2 character code in `languages` and adding translations to `sections`, `description` and `toc`:
View
@@ -104,6 +104,11 @@ sections:
tr: Spesifik
bg: Спесифики
de: Einzelheiten
+ - tag: libraries
+ label:
+ en: Libraries
+ ru: Библиотеки
+ uk: Бібліотеки
gems:
- kramdown
@@ -159,7 +164,6 @@ toc:
bg: Съдържание
de: Inhaltsverzeichnis
-
share:
en: Share This Page
ru: Поделиться
@@ -19,20 +19,22 @@
{% for section in site.sections %}
{% assign title = section.label[lang] %}
{% assign current_tag = section.tag | strip %}
- <div class="sidebar-nav-group {{section.tag}}">
- <div class="sidebar-nav-header">
- <i class="fa {% if current_category != current_tag %} fa-chevron-right {% else %} fa-chevron-down {% endif %}"></i>
- <span>{{title}}</span>
+ {% assign list = site.pages | where: "category", current_tag | where: "lang", lang | sort: "order" %}
+ {% unless list == empty %}
+ <div class="sidebar-nav-group {{section.tag}}">
+ <div class="sidebar-nav-header">
+ <i class="fa {% if current_category != current_tag %} fa-chevron-right {% else %} fa-chevron-down {% endif %}"></i>
+ <span>{{title}}</span>
+ </div>
+ <div class="sidebar-nav-list" {% if current_category != current_tag %} style="display: none;" {% endif %}>
+ {% for node in list %}
+ <div class="sidebar-nav-item">
+ {{node.order}}. <a class="sidebar-lesson {% if page.url == node.url %} active{% endif %}" href="{{node.url}}">{{node.title}}</a>
+ </div>
+ {% endfor %}
+ </div>
</div>
- <div class="sidebar-nav-list" {% if current_category != current_tag %} style="display: none;" {% endif %}>
- {% assign list = site.pages | where: "category", section.tag | where: "lang", lang | sort: "order" %}
- {% for node in list %}
- <div class="sidebar-nav-item">
- {{node.order}}. <a class="sidebar-lesson {% if page.url == node.url %} active{% endif %}" href="{{node.url}}">{{node.title}}</a>
- </div>
- {% endfor %}
- </div>
- </div>
+ {% endunless %}
{% endfor %}
</nav>

0 comments on commit 5b750a1

Please sign in to comment.