WIP on messages

This commit is contained in:
2022-04-19 16:25:51 -04:00
parent 48e6d3edfa
commit a0573a348a
19 changed files with 372 additions and 264 deletions

View File

@@ -1,4 +1,4 @@
<h2 class="py-3">{{ web_log.name }} &bull; Dashboard</h2>
<h2 class="my-3">{{ web_log.name }} &bull; Dashboard</h2>
<article class="container">
<div class="row">
<section class="col-lg-5 offset-lg-1 col-xl-4 offset-xl-2 pb-3">

View File

@@ -37,6 +37,20 @@
</nav>
</header>
<main class="mx-3">
{% if messages %}
<div class="messages mt-2">
{% for msg in messages %}
<div role="alert" class="alert alert-{{ msg.level }} alert-dismissible fade show">
{{ msg.message }}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
{% if msg.detail %}
<hr>
<p>{{ msg.detail.value }}</p>
{% endif %}
</div>
{% endfor %}
</div>
{% endif %}
{{ content }}
</main>
<footer>

View File

@@ -1,5 +1,5 @@
<h2 class="py-3">Log On to {{ web_log.name }}</h2>
<article class="pb-3">
<h2 class="my-3">Log On to {{ web_log.name }}</h2>
<article class="py-3">
<form action="/user/log-on" method="post">
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<div class="container">

View File

@@ -1,27 +1,33 @@
<h2 class="py-3">{{ page_title }}</h2>
<h2 class="my-3">{{ page_title }}</h2>
<article>
<form action="/page/save" method="post">
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
<input type="hidden" name="pageId" value="{{ model.page_id }}">
<div class="container">
<div class="row mb-3">
<div class="col">
<div class="form-floating">
<div class="col-9">
<div class="form-floating pb-3">
<input type="text" name="title" id="title" class="form-control" autofocus required
value="{{ model.title }}">
<label for="title">Title</label>
</div>
</div>
</div>
<div class="row mb-3">
<div class="col-9">
<div class="form-floating">
<input type="text" name="permalink" id="permalink" class="form-control" required
value="{{ model.permalink }}">
<label for="permalink">Permalink</label>
</div>
</div>
<div class="col-3 align-self-center">
<div class="col-3">
<div class="form-floating pb-3">
<select name="template" id="template" class="form-control">
{% for tmpl in templates -%}
<option value="{{ tmpl[0] }}"{% if model.template == tmpl %} selected="selected"{% endif %}>
{{ tmpl[1] }}
</option>
{%- endfor %}
</select>
<label for="template">Page Template</label>
</div>
<div class="form-check form-switch">
<input type="checkbox" name="isShownInPageList" id="showList" class="form-check-input" value="true"
{%- if model.is_shown_in_page_list %} checked="checked"{% endif %}>

View File

@@ -1,4 +1,4 @@
<h2 class="py-3">{{ page_title }}</h2>
<h2 class="my-3">{{ page_title }}</h2>
<article class="container">
<a href="/page/new/edit" class="btn btn-primary btn-sm my-3">Create a New Page</a>
<table class="table table-sm table-striped table-hover">

View File

@@ -1,4 +1,4 @@
<h2 class="py-3">{{ web_log.name }} Settings</h2>
<h2 class="my-3">{{ web_log.name }} Settings</h2>
<article>
<form action="/admin/settings" method="post">
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">