Updated views

* Moved links.njk to _partial/links.njk.

* Renamed layout.njk to _layout.njk.

* Cleaned some formatting in links.njk and nojs.njk (mainly had something to do with extraneous whitespaces).
This commit is contained in:
Bobby Wibowo 2018-04-19 13:22:53 +07:00
parent f4b00b404b
commit a18d3a2e21
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF
8 changed files with 43 additions and 43 deletions

View File

@ -9,16 +9,16 @@
<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 %}
{% for link in globals.home_links -%}
<div class="column is-narrow">
<a {{ attrs(link.attrs) | trim }}>
{% if link.icon %}
{% if link.icon -%}
<span class="icon is-medium">
<i class="{{ link.icon }}"></i>
</span>
{% else %}
{%- else -%}
{{ link.attrs.title }}
{% endif %}
{%- endif %}
</a>
</div>
{% endfor %}

View File

@ -1,4 +1,4 @@
{% extends "layout.njk" %}
{% extends "_layout.njk" %}
{% block stylesheets %}
<!-- Stylesheets -->

View File

@ -1,4 +1,4 @@
{% extends "layout.njk" %}
{% extends "_layout.njk" %}
{% block stylesheets %}
{{ super() }}

View File

@ -1,4 +1,4 @@
{% extends "layout.njk" %}
{% extends "_layout.njk" %}
{% block stylesheets %}
{{ super() }}

View File

@ -1,4 +1,4 @@
{% extends "layout.njk" %}
{% extends "_layout.njk" %}
{% block stylesheets %}
{{ super() }}

View File

@ -1,4 +1,4 @@
{% extends "layout.njk" %}
{% extends "_layout.njk" %}
{% block stylesheets %}
{{ super() }}
@ -72,7 +72,7 @@
<a href="auth" id="loginLinkText"></a>
</h3>
{% include "links.njk" %}
{% include "_partial/links.njk" %}
</div>
</div>
</section>

View File

@ -1,4 +1,4 @@
{% extends "layout.njk" %}
{% extends "_layout.njk" %}
{% block stylesheets %}
{{ super() }}
@ -30,45 +30,45 @@
</p>
</div>
<div class="content">
{% if uploadDisabled %}
<a class="button is-danger" style="display: flex" href="auth">{{ uploadDisabled }}</a>
{% else %}
<form id="form" action="" method="post" enctype="multipart/form-data">
<div class="field">
<input type="file" name="files[]" multiple="multiple" style="width: 100%">
</div>
<div class="field">
<input type="submit" class="button is-danger" value="Upload" style="width: 100%">
</div>
</form>
{% endif %}
{% if uploadDisabled -%}
<a class="button is-danger" style="display: flex" href="auth">{{ uploadDisabled }}</a>
{%- else -%}
<form id="form" action="" method="post" enctype="multipart/form-data">
<div class="field">
<input type="file" name="files[]" multiple="multiple" style="width: 100%">
</div>
<div class="field">
<input type="submit" class="button is-danger" value="Upload" style="width: 100%">
</div>
</form>
{%- endif %}
</div>
</div>
<div class="column is-hidden-mobile"></div>
</div>
{% if files %}
<div id="uploads" style="display: block">
{% for item in files %}
<div class="columns">
<div class="column is-hidden-mobile"></div>
<div class="column">
{% if errorMessage %}
<p class="error">{{ errorMessage | safe }}</p>
{% endif %}
{% if item.url %}
<p class="link">
<a href="{{ item.url }}" target="_blank">{{ item.url | safe }}</a>
</p>
{% endif %}
</div>
<div class="column is-hidden-mobile"></div>
</div>
{% endfor %}
{% if files -%}
<div id="uploads" style="display: block">
{% for item in files -%}
<div class="columns">
<div class="column is-hidden-mobile"></div>
<div class="column">
{% if errorMessage -%}
<p class="error">{{ errorMessage | safe }}</p>
{%- endif %}
{% if item.url -%}
<p class="link">
<a href="{{ item.url }}" target="_blank">{{ item.url | safe }}</a>
</p>
{%- endif %}
</div>
<div class="column is-hidden-mobile"></div>
</div>
{% endif %}
{% endfor %}
</div>
{%- endif %}
{% include "links.njk" %}
{% include "_partial/links.njk" %}
</div>
</div>
</section>