Upload files to "app/templates/includes"
This commit is contained in:
parent
1f5708b338
commit
db458e0c29
18
app/templates/includes/flash_messages.html
Normal file
18
app/templates/includes/flash_messages.html
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{% import "includes/macros.html" as macros %}
|
||||||
|
{% with messages = get_flashed_messages(with_categories=True) %}
|
||||||
|
{% if messages %}
|
||||||
|
<div id="toast-container" class="pin-top center-align">
|
||||||
|
{% for category, message in messages %}
|
||||||
|
{% if category == 'error' %}
|
||||||
|
{{ macros.make_toast(message, "color: rgba(255, 0, 0, 0.5)", None) }}
|
||||||
|
{% elif category == 'success' %}
|
||||||
|
{{ macros.make_toast(message, "color: rgba(0, 255, 0, 0.5)", None) }}
|
||||||
|
{% elif category == 'warning' %}
|
||||||
|
{{ macros.make_toast(message, "color: rgba(220, 200, 0, 0.5)", None) }}
|
||||||
|
{% else %}
|
||||||
|
{{ macros.make_toast(message, None, None) }}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endwith %}
|
||||||
12
app/templates/includes/macros.html
Normal file
12
app/templates/includes/macros.html
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{% macro make_toast(message, style, close_btn_msg) %}
|
||||||
|
<div class="toast" {% if style %}style="{{ style }}"{% endif %}>
|
||||||
|
<span>{{ message|safe -}}</span>
|
||||||
|
<button class="btn-flat toast-action" onclick="this.parentElement.remove();">
|
||||||
|
{% if close_btn_msg %}
|
||||||
|
{{ close_btn_msg|safe }}
|
||||||
|
{% else %}
|
||||||
|
×
|
||||||
|
{% endif %}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
{% endmacro %}
|
||||||
50
app/templates/includes/navbar.html
Normal file
50
app/templates/includes/navbar.html
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
{% import "includes/macros.html" as macros %}
|
||||||
|
|
||||||
|
<ul id="dev-env-dropdown" class="dropdown-content">
|
||||||
|
<li><a class="waves-effect waves-light" href="{{ url_for('main.env_status') }}">Status</a></li>
|
||||||
|
<div class="divider"></div>
|
||||||
|
{% for env in [{'url': 'http://dev-1.quarter.int', 'name': 'DEV 1'}] %}
|
||||||
|
<li><a class="waves-effect waves-light" href="{{ env['url'] }}" target="_blank">{{ env['name'] }}</a></li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<ul id="playground-tools" class="dropdown-content">
|
||||||
|
<li><a class="waves-effect waves-light" href="{{ url_for('playgrounds.generate_risk_pool') }}">Generate Risk Pool Data</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
{#<ul id="account-dropdown" class="dropdown-content">#}
|
||||||
|
{# <li><a class="waves-effect waves-light" id="logout" href="#" onclick="logout()">Logout</a></li>#}
|
||||||
|
{# <li><a class="waves-effect waves-light" href="{{ url_for('auth.account') }}" target=""><i class="material-icons prefix">account_circle</i>Account</a></li>#}
|
||||||
|
{#</ul>#}
|
||||||
|
|
||||||
|
<nav class="navbar-fixed cyan darken-2 white-text">
|
||||||
|
<div class="nav-wrapper">
|
||||||
|
<a href="{{ url_for('main.index') }}" class="brand-logo"><img src="{{ url_for('static', filename='img/Quarterhome Logo 300x86 WHITE.png') }}" height="65"></a>
|
||||||
|
<ul class="right hide-on-med-and-down">
|
||||||
|
<li>
|
||||||
|
<a class="waves-effect waves-light" href="{{ url_for('main.index') }}">Home</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="waves-effect waves-light" href="{{ url_for('main.directory') }}">Company Directory</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="dropdown-trigger waves-effect waves-light" href="#" data-target="dev-env-dropdown">
|
||||||
|
Development Environments <i class="material-icons right">arrow_drop_down</i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="dropdown-trigger waves-effect waves-light" href="#" data-target="playground-tools">
|
||||||
|
Playgrounds <i class="material-icons right">arrow_drop_down</i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<script src="https://cdn.jsdelivr.net/jquery.webui-popover/1.2.1/jquery.webui-popover.min.js"></script>
|
||||||
|
<link href="https://cdn.jsdelivr.net/jquery.webui-popover/1.2.1/jquery.webui-popover.min.css" rel="stylesheet" />
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('.dropdown-trigger').dropdown();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
Loading…
Reference in New Issue
Block a user