filesafe/views/links.njk
Bobby Wibowo 09f51c8448
Updates~ 😉
Thanks to Zephyrrus for the hints about nunjucks, sort of (he did not really give out any specific hints to me, I stalked his fork, lmao).

* Replaced Handlebars with Nunjucks.

* Replaced all static HTML files with their NJK-equivalent (excluding error pages).

* Renamed "albumDomain" to "homeDomain" in config.sample.js (make sure you update your config.js too).

* Updated dependencies: knex and eslint-plugin-import (dev).

* Updated vscode's settings.json (I may update this again very soon).
2018-04-19 04:00:36 +07:00

29 lines
771 B
Plaintext

{% macro attrs(obj) %}
{% set space = joiner(' ') %}
{% for id, val in obj -%}
{{ space() }}{{ id }}="{{ val }}"
{%- endfor %}
{% endmacro %}
<div class="columns is-gapless">
<div class="column is-hidden-mobile"></div>
<div class="column">
<div id="linksColumn" class="columns is-mobile is-multiline is-centered">
{% for link in globals.home_links %}
<div class="column is-narrow">
<a {{ attrs(link.attrs) | trim }}>
{% if link.icon %}
<span class="icon is-medium">
<i class="{{ link.icon }}"></i>
</span>
{% else %}
{{ link.attrs.title }}
{% endif %}
</a>
</div>
{% endfor %}
</div>
</div>
<div class="column is-hidden-mobile"></div>
</div>