fipamo/brain/views/dash/settings.twig

123 lines
4.5 KiB
Twig
Raw Normal View History

{% extends "dash/_frame.twig" %}
{% block title %}
{{ title }}
{% endblock %}
{% block stylesheets %}
<link rel="stylesheet" type="text/css" href="/assets/css/dash/start.css?=cvnbm">
{% endblock %}
{% block mainContent %}
<article role="settings">
<h1>Settings</h1>
<section role="member-settings">
<div role="member-avatar">
<img id="avatar" src="{{ member['avatar'] }}" for="avatar-upload"/>
<input id="avatar-upload" type="file" name="avatar-upload"/>
</div>
<div role="site-background">
<img id="background" src="{{ background }}" alt="image for site background" for="background-upload"/>
<input id="background-upload" type="file" name="backgrond-upload"/>
</div>
<div>
<input type='text' name='handle' id='settings-handle' placeholder='handle' value="{{ member['handle'] }}" autofocus/>
<input type='text' name='email' id='settings-email' placeholder='email' value="{{ member['email'] }}" autofocus/>
</div>
<div>
<input type='text' name='base-url' id='settings-url' placeholder='url' value="{{ baseUrl }}" autofocus/>
<input type='text' name='base-title' id='settings-title' placeholder='site title' value="{{ siteTitle }}" autofocus/>
</div>
<div>
<textarea id="settings-desc" type='text' name='settings_desc' class='settings-dec' placeholder='description stuff' , autofocus>{{ desc }}</textarea>
</div>
</section>
<section role="site-settings">
<div role="features">
<label>Options</label>
<br>
{% if apiStatus is defined and apiStatus == "true" %}
<button id="api-access-toggle" title="allow external api" data-enabled="true">
<i class="ti ti-phone-incoming"></i>
<span id="api-status">API ACCESS ENABLED</span>
</button>
{% else %}
<button id="api-access-toggle" title="allow external api" data-enabled="false">
<i class="ti ti-phone-incoming"></i>
<span id="api-status">API ACCESS NOT ENABLED</span>
</button>
{% endif %}
{% if dynamicRenderStatus is defined and dynamicRenderStatus == "true" %}
<button id="dynamic-render-toggle" title="allow external api" data-enabled="true">
<i class="ti ti-arrow-merge"></i>
<span id="dynamic-render-status">DYNAMIC PAGE RENDERING</span>
</button>
{% else %}
<button id="dynamic-render-toggle" title="allow external api" data-enabled="false">
<i class="ti ti-arrow-merge"></i>
<span id="dynamic-render-status">STATIC PAGE RENDERING</span>
</button>
{% endif %}
</div>
<div role="theme">
<label>Themes</label><br/>
{% for theme in themes %}
{% if theme.name == currentTheme %}
<a href="#" id="{{ theme.name }}" class="theme-select" data-enabled="true">{{ theme['display-name'] }}</a>
{% else %}
<a href="#" id="{{ theme.name }}" class="theme-select" data-enabled="false">{{ theme['display-name'] }}</a>
{% endif %}
{% endfor %}
</div>
<div role="mail">
<label>EMAIL</label><br/>
{% if mailOption == "option-none" or mailOption == "" %}
<a href="#" class="mail-option" id="option-none" data-enabled="true">NONE</a>
{% else %}
<a href="#" class="mail-option" id="option-none" data-enabled="false">NONE</a>
{% endif %}
{% if mailOption == "option-mg" or mailOption == "" %}
<a href="#" class="mail-option" id="option-mg" data-enabled="true">MAILGUN</a>
{% else %}
<a href="#" class="mail-option" id="option-mg" data-enabled="false">MAILGUN</a>
{% endif %}
{% if mailOption == "option-smtp" or mailOption == "" %}
<a href="#" class="mail-option" id="option-smtp" data-enabled="true">SMTP</a>
{% else %}
<a href="#" class="mail-option" id="option-smtp" data-enabled="false">SMTP</a>
{% endif %}
{% apply spaceless %}
{{ include("dash/partials/mailforms.twig") }}
{% endapply %}
<button id="send-mail">TEST MAIL</button>
<br/><br/>
</div>
</section>
<section role="data-settings">
<div class="column">
<label>API KEY</label>
<br/>
{{ member['key'] }}
<br/>
<label>FORM TOKEN</label><br/>
{{ ftoken }}
</div>
<div class="column">
<button id="create-backup">BACK UP YOUR SITE</button><br/>
{% if lastBackup != '' %}
LAST BACK UP<br/>
<a href="/api/v1/files">{{ lastBackup }}</a><br/>
{% else %}
<span>span No back ups. Frowny face.</span>
{% endif %}
</div>
</section>
</article>
{% endblock %}