laterite-web 0.9.16

Laterite CMF public web layer: themes, static-site generation, page metadata, canonical URLs, and sitemaps
Documentation
{% if !locked %}
<dialog class="lat-dialog" id="new-template">
  <form method="post" action="{{ theme_url }}/templates">
    {% let dialog_title = shell.t("New template") %}{% include "_dialog_head.html" %}
    <div class="lat-dialog__body">
      <input type="hidden" name="_csrf" value="{{ shell.csrf_token() }}">
      <div class="lat-field">
        <label class="lat-field__label" for="new-kind">{{ shell.t("Kind") }}</label>
        <select class="lat-input lat-select" id="new-kind" name="kind">
          {% for k in kinds %}<option value="{{ k.0 }}">{{ k.1 }}</option>{% endfor %}
        </select>
      </div>
      <div class="lat-field">
        <label class="lat-field__label" for="new-path">{{ shell.t("Path") }}<span class="lat-field__req">*</span></label>
        <input class="lat-input" id="new-path" name="path" required placeholder="home.htm" autofocus>
        <p class="lat-field__help">{{ shell.t("Folders with a slash, lowercase letters, digits, dots, hyphens and underscores.") }}</p>
      </div>
    </div>
    <div class="lat-dialog__actions"><button class="lat-btn lat-btn--ghost" type="button" data-lat-dialog-close>{{ shell.t("Cancel") }}</button><button class="lat-btn lat-btn--primary" type="submit">{{ shell.t("Create") }}</button></div>
  </form>
</dialog>
<dialog class="lat-dialog" id="import-zip">
  <form method="post" action="{{ theme_url }}/import" enctype="multipart/form-data">
    {% let dialog_title = shell.t("Import templates from a zip") %}{% include "_dialog_head.html" %}
    <div class="lat-dialog__body">
      <input type="hidden" name="_csrf" value="{{ shell.csrf_token() }}">
      <div class="lat-field">
        <label class="lat-field__label" for="import-file">{{ shell.t("Archive") }}<span class="lat-field__req">*</span></label>
        {% let upload_id = "import-file" %}
        {% let upload_accept = ".zip,application/zip" %}
        {% let upload_multiple = false %}
        {% let upload_url = String::new() %}
        {% let upload_direct = String::new() %}
        {% let upload_fields = String::new() %}
        {% let upload_hint = shell.t("A zip as Export writes it: theme.yaml and one file per template under its kind's folder.") %}
        {% include "_upload.html" %}
      </div>
      <div class="lat-field">
        <label class="lat-field__label"><input type="checkbox" name="replace" value="1"> {{ shell.t("Replace templates this theme already has") }}</label>
      </div>
    </div>
    <div class="lat-dialog__actions"><button class="lat-btn lat-btn--ghost" type="button" data-lat-dialog-close>{{ shell.t("Cancel") }}</button><button class="lat-btn lat-btn--primary" type="submit">{{ shell.t("Import") }}</button></div>
  </form>
</dialog>
{% endif %}