pupupu

simple static CMS for crappy servers
git clone https://git.ce9e.org/pupupu.git

commit
a78a9254ef5eec043a2dc4d1be4b5fdb8bc08bb3
parent
079e7bf8794cf00abfa4bdaeb6fd8fdddc3029f7
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2018-10-12 17:23
use template inheritance

Diffstat

C templates/form.html -> templates/base.html 31 +------------------------------
M templates/form.html 25 ++++---------------------

2 files changed, 5 insertions, 51 deletions


diff --git a/templates/form.html b/templates/base.html

@@ -8,36 +8,7 @@
    8     8     <link rel="stylesheet" type="text/css" href="static/main.css">
    9     9 </head>
   10    10 <body>
   11    -1 
   12    -1     <form method="POST">
   13    -1         <label>
   14    -1             Body
   15    -1             <textarea name="md">{{ data.md }}</textarea>
   16    -1         </label>
   17    -1 
   18    -1         <label>
   19    -1             Metadata
   20    -1             <textarea name="yml">{{ data.yml }}</textarea>
   21    -1         </label>
   22    -1 
   23    -1         <input type="submit" value="Save">
   24    -1         <input type="submit" class="button--danger" name="delete" value="Löschen">
   25    -1     </form>
   26    -1 
   27    -1     <nav aria-label="Subpages">
   28    -1         <ul>
   29    -1             {% for name, _path in subpages %}
   30    -1                 <li><a href="?path={{ _path }}">{{ name }}</a></li>
   31    -1             {% endfor %}
   32    -1         </ul>
   33    -1     </nav>
   34    -1 
   35    -1     <form>
   36    -1         <input name="path" value="{{ path }}">
   37    -1         <button>Edit</button>
   38    -1     </form>
   39    -1 
   40    -1     <a href="{{ path }}/">View</a>
   -1    11     {% block content %}{% endblock %}
   41    12 
   42    13     <script src="node_modules/simplemde/dist/simplemde.min.js"></script>
   43    14     <script src="static/main.js"></script>

diff --git a/templates/form.html b/templates/form.html

@@ -1,14 +1,6 @@
    1    -1 <!DOCTYPE html>
    2    -1 <html>
    3    -1 <head>
    4    -1     <meta charset="UTF-8">
    5    -1     <meta name="viewport" content="width=device-width, initial-scale=1">
    6    -1     <link rel="stylesheet" type="text/css" href="node_modules/font-awesome/css/font-awesome.min.css">
    7    -1     <link rel="stylesheet" type="text/css" href="node_modules/simplemde/dist/simplemde.min.css">
    8    -1     <link rel="stylesheet" type="text/css" href="static/main.css">
    9    -1 </head>
   10    -1 <body>
   -1     1 {% extends 'base.html' %}
   11     2 
   -1     3 {% block content %}
   12     4     <form method="POST">
   13     5         <label>
   14     6             Body
@@ -32,14 +24,5 @@
   32    24         </ul>
   33    25     </nav>
   34    26 
   35    -1     <form>
   36    -1         <input name="path" value="{{ path }}">
   37    -1         <button>Edit</button>
   38    -1     </form>
   39    -1 
   40    -1     <a href="{{ path }}/">View</a>
   41    -1 
   42    -1     <script src="node_modules/simplemde/dist/simplemde.min.js"></script>
   43    -1     <script src="static/main.js"></script>
   44    -1 </body>
   45    -1 </html>
   -1    27     <a href="{{ path }}/" class="button">View</a>
   -1    28 {% endblock %}