113 lines
5.0 KiB
Plaintext
113 lines
5.0 KiB
Plaintext
<h2 class="my-3">{{ page_title }}</h2>
|
|
<article>
|
|
<fieldset class="container mb-3">
|
|
<legend>Themes</legend>
|
|
<div class="row">
|
|
<div class="col">
|
|
<a href="{{ "admin/theme/new" | relative_link }}" class="btn btn-primary btn-sm mb-3"
|
|
hx-target="#theme_new">
|
|
Upload a New Theme
|
|
</a>
|
|
<div class="container">
|
|
{% include_template "_theme-list-columns" %}
|
|
<div class="row mwl-table-heading">
|
|
<div class="{{ theme_col }}">Theme</div>
|
|
<div class="{{ slug_col }} d-none d-md-inline-block">Slug</div>
|
|
<div class="{{ tmpl_col }} d-none d-md-inline-block">Templates</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mwl-table-detail" id="theme_new"></div>
|
|
{{ theme_list }}
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<fieldset class="container">
|
|
{%- assign cache_base_url = "admin/cache/" -%}
|
|
<legend>Caches</legend>
|
|
<div class="row pb-3">
|
|
<div class="col">
|
|
<p>
|
|
myWebLog uses a few caches to ensure that it serves pages as fast as possible. Normal actions taken within the
|
|
admin area will keep these up to date; however, if changes occur outside of the system (creating a new web log
|
|
via CLI, loading an updated theme via CLI, direct data updates, etc.), these options allow for the caches to
|
|
be refreshed without requiring you to restart the application.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-12 col-lg-6 pb-3">
|
|
<div class="card">
|
|
<header class="card-header text-white bg-secondary">Web Logs</header>
|
|
<div class="card-body">
|
|
<h6 class="card-subtitle text-muted pb-3">
|
|
These caches include the page list and categories for each web log
|
|
</h6>
|
|
{%- assign web_log_base_url = cache_base_url | append: "web-log/" -%}
|
|
<form method="post" class="container pb-3" hx-boost="false" hx-target="body" hx-swap="innerHTML show:window:top">
|
|
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
|
|
<button type="submit" class="btn btn-sm btn-primary pb-2"
|
|
hx-post="{{ web_log_base_url | append: "all/refresh" | relative_link }}">
|
|
Refresh All
|
|
</button>
|
|
<div class="row mwl-table-heading">
|
|
<div class="col">Name</div>
|
|
<div class="col">URL Base</div>
|
|
</div>
|
|
{%- for web_log in web_logs %}
|
|
<div class="row mwl-table-detail">
|
|
<div class="col">
|
|
{{ web_log[1] }}<br>
|
|
<small>
|
|
{%- assign refresh_url = web_log_base_url | append: web_log[0] | append: "/refresh" | relative_link -%}
|
|
<a href="{{ refresh_url }}" hx-post="{{ refresh_url }}">Refresh</a>
|
|
</small>
|
|
</div>
|
|
<div class="col">{{ web_log[2] }}</div>
|
|
</div>
|
|
{%- endfor %}
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-12 col-lg-6 pb-3">
|
|
<div class="card">
|
|
<header class="card-header text-white bg-secondary">Themes</header>
|
|
<div class="card-body">
|
|
<h6 class="card-subtitle text-muted pb-3">
|
|
The themes template cache is loaded on demand; refresh a cache with 0 templates will still refresh the
|
|
theme asset cache
|
|
</h6>
|
|
{%- assign theme_base_url = cache_base_url | append: "theme/" -%}
|
|
<form method="post" class="container pb-3" hx-boost="false" hx-target="body" hx-swap="innerHTML show:window:top">
|
|
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
|
|
<button type="submit" class="btn btn-sm btn-primary pb-2"
|
|
hx-post="{{ theme_base_url | append: "all/refresh" | relative_link }}">
|
|
Refresh All
|
|
</button>
|
|
<div class="row mwl-table-heading">
|
|
<div class="col-8">Name</div>
|
|
<div class="col-4">Cached Templates</div>
|
|
</div>
|
|
{%- for theme in cached_themes %}
|
|
{% unless theme[0] == "admin" %}
|
|
<div class="row mwl-table-detail">
|
|
<div class="col-8">
|
|
{{ theme[1] }}<br>
|
|
<small>
|
|
<span class="text-muted">{{ theme[0] }} • </span>
|
|
{%- assign refresh_url = theme_base_url | append: theme[0] | append: "/refresh" | relative_link -%}
|
|
<a href="{{ refresh_url }}" hx-post="{{ refresh_url }}">Refresh</a>
|
|
</small>
|
|
</div>
|
|
<div class="col-4">{{ theme[2] }}</div>
|
|
</div>
|
|
{% endunless %}
|
|
{%- endfor %}
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</article>
|