diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base.html | 1 | ||||
-rw-r--r-- | templates/edit_project.html | 9 | ||||
-rw-r--r-- | templates/gallery.html | 15 | ||||
-rw-r--r-- | templates/index.html | 15 | ||||
-rw-r--r-- | templates/login.html | 17 | ||||
-rw-r--r-- | templates/new.html | 8 | ||||
-rw-r--r-- | templates/project_fields.html | 22 |
7 files changed, 73 insertions, 14 deletions
diff --git a/templates/base.html b/templates/base.html index 8d51f29..99a419b 100644 --- a/templates/base.html +++ b/templates/base.html @@ -8,6 +8,7 @@ <title>{% block title %}{{ title }}{% endblock %}</title> <link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet"> <link rel="stylesheet" href="{{ url_for('static', filename='main.css') }}"> + <script src="{{ url_for('static', filename='jquery.js') }}"></script> </head> <body> <div id="content" class="content"> diff --git a/templates/edit_project.html b/templates/edit_project.html new file mode 100644 index 0000000..fbbafdc --- /dev/null +++ b/templates/edit_project.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} +{% block body %} + {% set id_disabled = True %} + {% include "project_fields.html" %} + <p> + <button onclick="save_changes()">Save changes</button> + </p> + <script src="{{ url_for('static', filename="edit.js") }}"></script> +{% endblock %} diff --git a/templates/gallery.html b/templates/gallery.html new file mode 100644 index 0000000..6f6b013 --- /dev/null +++ b/templates/gallery.html @@ -0,0 +1,15 @@ +<div class="gallery"> + {% for project in projects %} + <a href="{{ url_for("projects", project_name=project.id) }}"> + <div class="gallery-element"> + {{ project.summary }} + </div> + </a> + {% endfor %} + <a href="https://github.com/romangraef"> + <div class="gallery-element"> + And many more on Github + </div> + </a> +</div> + diff --git a/templates/index.html b/templates/index.html index cefce37..27b3232 100644 --- a/templates/index.html +++ b/templates/index.html @@ -7,20 +7,7 @@ <p>As long as it is not webdesign, I will program nearly anything for you</p> <div class="spacer"></div> <h1>Projects</h1> - <div class="gallery"> - <a href="{{ url_for("projects", project_name="website") }}"> - <div class="gallery-element"> - This website - </div> - </a> - <div class="gallery-element"> - Discord Bots - </div> - <div class="gallery-element"> - LOGL - </div> - </div> - + {% include "gallery.html" %} {% endblock %} {% block title %} Roman Gräf diff --git a/templates/login.html b/templates/login.html new file mode 100644 index 0000000..118bf99 --- /dev/null +++ b/templates/login.html @@ -0,0 +1,17 @@ +{% extends "base.html" %} +{% block body %} + <form method="post" action="{{ url_for('check_login') }}"> + <p style="color: red;">Admin access only</p> + <p> + <label for="user">Username</label> + <input id="user" name="user" disabled="disabled" value="admin"> + </p> + <p> + <label for="pass">Password</label> + <input id="pass" name="pass" placeholder="Password"> + </p> + <p> + <input type="submit" value="Login"> + </p> + </form> +{% endblock %}
\ No newline at end of file diff --git a/templates/new.html b/templates/new.html new file mode 100644 index 0000000..32e0eff --- /dev/null +++ b/templates/new.html @@ -0,0 +1,8 @@ +{% extends"base.html" %} +{% block body %} + <form id="form" action="{{ url_for('new_project') }}" method="post"> + {% set id_disabled = False %} + {% include "project_fields.html" %} + <input type="submit" value="Create"> + </form> +{% endblock %}
\ No newline at end of file diff --git a/templates/project_fields.html b/templates/project_fields.html new file mode 100644 index 0000000..50472c1 --- /dev/null +++ b/templates/project_fields.html @@ -0,0 +1,22 @@ +{% set project = empty_project %} +<p> + <label for="id">Id</label><input name="id" id="id" value="{{ project.id }}" + {% if id_disabled %} + disabled="disabled" + {% endif %} +> +</p> +<p> + <label for="name">Name</label><input id="name" name="name" value="{{ project.name }}"> +</p> +<p> + <label for="summary">Summary</label><input id="summary" name="summary" value="{{ project.summary }}"> +</p> +<p> + Description:<br> + <textarea name="description" form="form" style="width: 100%; height: 400px;" title="description" + id="description">{{ project.description }}</textarea> +</p> +<p> + <label for="link">Link</label><input name="link" id="link" value="{{ project.link }}"> +</p> |