Newer
Older

Teemu Autto
committed
<html lang="{{get_locale()}}">
<head>
<title>{% block title %}{% endblock %} - {{ config['BRAND'] }}</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<link rel="stylesheet" href="{{ url_for('static', filename='windows-95-ui-kit/css/w95.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
{# Sentry tracing for client side. See: https://docs.sentry.io/platforms/javascript/install/cdn/ #}
{% if config['SENTRY_DSN'] %}
{{sentry_trace}}
<script
src="https://browser.sentry-cdn.com/7.35.0/bundle.tracing.min.js"
integrity="sha384-CjDPchuHUNlGb4GlhyuebuZegU12keiasU1R69+B0VhN5ShdBb06nBWZRfGi73G1"
crossorigin="anonymous">
</script>
<script>
Sentry.onLoad(function() {
Sentry.init({
dsn: {{config['SENTRY_DSN'] | tojson}},
release: {{config['SENTRY_RELEASE'] | tojson}},
environment: {{config['SENTRY_ENVIRONMENT'] | tojson}},
integrations: [new Sentry.BrowserTracing()],
});
});
</script>
{% endif %}
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="{{url_for('index')}}">{{config['BRAND']}}</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor01"
aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarTogglerDemo03">
<ul class="navbar-nav mr-auto">
<a class="nav-link" href="{{ url_for('items.index') }}">{{_("Home")}}</a>
<a class="nav-link" href="{{ url_for('items.sell') }}">{{_("Sell")}}</a>

Teemu Autto
committed
<li class="nav-item">
<div class="dropdown">
<button class="btn nav-link dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false">
{{_("Language")}}
</button>
<div class="dropdown-menu" id="locale-selector">
{% for _, lang in locales.items() %}
<a class="dropdown-item {% if lang|lower == get_locale()|lower %}active{% endif %}" href="{{ url_for(request.endpoint, **dict(request.view_args, locale=lang)) }}">{{lang.display_name}}</a>

Teemu Autto
committed
{% endfor %}
</div>
</div>
</li>
{% if current_user.is_authenticated %}
<li class="nav-item"><a href="{{ url_for('auth.profile', email="me") }}" class="nav-link">{{ current_user['email'] }}</a></li>
<li class="nav-item"><a href="{{ url_for('auth.logout') }}" class="nav-link">{{_("Log Out")}}</a></li>
<li class="nav-item"><a href="{{ url_for('auth.register') }}" class="nav-link">{{_("Register")}}</a>
<li class="nav-item"><a href="{{ url_for('auth.login') }}" class="nav-link">{{_("Log In")}}</a>
</ul>
<form class="form-inline">
<input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-info my-2 my-sm-0" type="submit">{{_("Search")}}</button>
<header>
{% block header %}
<h1>{{ config['BRAND'] }}</h1>
{% endblock %}
</header>
<main class="content">
{% block content %}
<!-- MAIN CONTENT BLOCK MISSING -->
{% endblock %}
</main>
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
{# Flash messages #}
<div class="position-fixed top-0 right-0 p-3 m-5">
<div class="container toast-container" id="messages">
{% for message in get_notifications() %}
{% if message['type'] == 'success' %}
{# Show success messages for 10 seconds #}
<div class="toast show bg-success text-white" role="alert" aria-live="assertive" aria-atomic="true" data-delay="10000">
{% elif message['type'] == 'error' %}
<div class="toast show bg-danger text-white" role="alert" aria-live="assertive" aria-atomic="true">
{% else %}
<div class="toast show" role="alert" aria-live="assertive" aria-atomic="true">
{% endif %}
<div class="toast-header">
<strong class="mr-auto">{{ message['title'] }}</strong>
<small><time datetime="{{message['created_at'].isoformat()}}">{{ message['created_at']|timeformat }}</time></small>
<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="{{_("Close")}}">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="toast-body">
{{ message['message'] }}
</div>
</div>
{% endfor %}
</div>
</div>
<!-- Option 1: jQuery and Bootstrap Bundle (includes Popper) -->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
</body>
</html>