~alcinnz/bureaucromancy

ref: 703b307333f90115a7512efcd660615a64a75700 bureaucromancy/tpl/base.html -rw-r--r-- 1.3 KiB
703b3073 — Adrian Cochrane Implement radio inputs, upload missing files, make space for descriptions & richer form controls to use. 1 year, 3 months ago
                                                                                
703b3073 Adrian Cochrane
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html>
<head>
  <title>{{form.method}} {{form.action}}</title>
  <style>
    body { background: black; color: #eee; font: medium sans-serif; }
    h1 { text-align: center }
    aside { width: 20%; border-right: thin solid #eee; }
    dt { font-weight: bold }
    dt a { color: inherit }
    .checked { color: lightgreen }
    .readonly { font-style: italic }
    .disabled { text-decoration: line-through }
    .selected { border-right: thick solid green }

    input, select, textarea { display: none; }

    main { display: flex; flex-direction: row; }
    section { padding: 20px }
  </style>
</head>
<body>
  <h1><strong>{{form.method}}</strong> <em>{{form.action}}</em></h1>
  <main>
  {% set selected=input.index %}
  <aside><dl>{% for input in inputs %}
    <dt class="{% if input.checked %}checked{% endif %} {% if input.index == selected %}selected{% endif %}">
      {% if input.checked %}&check;{% endif %}
      {% if input.disabled %}{{ input.label }}
      {% else %}<a href="/{{input.index}}{{Q}}" title="{{input.title}}">{{ input.label }}</a>
      {% endif %}</dt>
    <dd class="{% if input.readonly %}readonly{% endif %}">{{ input.value }}</dd>
  {% endfor %}</dl></aside>

  {% block main %}
    <section>
      {{ input.description }}
    </section>
  {% endblock %}
  </main>
</body>
</html>