List tournaments by year in the dropdown menu.
This commit is contained in:
parent
0a342ba59d
commit
18b495a921
@ -1,5 +1,29 @@
|
||||
- url: 2014/2-summertime/
|
||||
title: Summertime
|
||||
- year: 2014
|
||||
events:
|
||||
|
||||
- url: 2014/1-tabiyas/
|
||||
title: Табии
|
||||
- title: Summertime
|
||||
url: https://www.linux.org.ru/forum/talks/10452081
|
||||
dir: 2-summertime
|
||||
|
||||
- title: Табии
|
||||
url: https://www.linux.org.ru/forum/talks/10099832
|
||||
dir: 1-tabiyas
|
||||
|
||||
- year: 2013
|
||||
events:
|
||||
|
||||
- title: Knockout!
|
||||
url: https://www.linux.org.ru/forum/talks/9840999
|
||||
dir: 4-knockout
|
||||
|
||||
- title: Осень
|
||||
url: https://www.linux.org.ru/forum/talks/9539078
|
||||
dir: 3-autumn
|
||||
|
||||
- title: Великолепная дюжина
|
||||
url: https://www.linux.org.ru/forum/talks/9088834
|
||||
dir: 2-great12
|
||||
|
||||
- title: Первый турнир
|
||||
url: https://www.linux.org.ru/forum/talks/8799973
|
||||
dir: 1-lorchess
|
||||
|
@ -14,13 +14,25 @@
|
||||
<div class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Турниры <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
{% for trn in site.data.tournaments %}
|
||||
<li><a href="/{{ trn.url }}">{{ trn.title }}</a></li>
|
||||
<a href="#" class="dropdown-toggle" id="dropdownMenu" data-toggle="dropdown">Турниры <b class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
|
||||
{% capture last_year %}{{ site.data.tournaments | map: 'year' | last }}{% endcapture %}
|
||||
{% for entry in site.data.tournaments %}
|
||||
{% capture year %}{{ entry.year }}{% endcapture %}
|
||||
<li role="presentation" class="dropdown-header">{{ year }}-й год</li>
|
||||
{% for trn in entry.events %}
|
||||
<li role="presentation">
|
||||
<a role="menuitem" tabindex="-1" href="/{{ year }}/{{ trn.dir }}">{{ trn.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% unless year == last_year %}
|
||||
<li role="presentation" class="divider"></li>
|
||||
{% endunless %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li><a href="/reviews/">Обзоры</a></li>
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
|
Loading…
Reference in New Issue
Block a user