mirror of
https://github.com/He4eT/xecut-site.git
synced 2026-05-05 01:47:25 +00:00
menu: simple menu
This commit is contained in:
parent
d2ce95a3ad
commit
e12198bfc5
2 changed files with 24 additions and 4 deletions
|
|
@ -1,3 +1,14 @@
|
||||||
export default {
|
export default {
|
||||||
langs: ['en', 'ru', 'sr'],
|
langs: [
|
||||||
|
'en',
|
||||||
|
'ru',
|
||||||
|
'sr',
|
||||||
|
],
|
||||||
|
menu: [
|
||||||
|
'index',
|
||||||
|
'status',
|
||||||
|
'location',
|
||||||
|
'inventory',
|
||||||
|
'feed',
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,12 @@
|
||||||
<div>
|
{% set entries = config.menu %}
|
||||||
test
|
<ul>
|
||||||
</div>
|
{%- for entry in entries %}
|
||||||
|
<li>
|
||||||
|
{% if page.url.startsWith('/' ~ page.lang ~ '/' ~ entry) %}
|
||||||
|
<span>{{ entry }}</span>
|
||||||
|
{% else %}
|
||||||
|
<a href="{{ ('/' ~ entry ~ '/') | locale_url }}">{{ entry }}</a>
|
||||||
|
{% endif %}
|
||||||
|
</li>
|
||||||
|
{%- endfor %}
|
||||||
|
</ul>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue