summaryrefslogtreecommitdiffstatshomepage
path: root/templates/shortcodes
diff options
context:
space:
mode:
Diffstat (limited to 'templates/shortcodes')
-rw-r--r--templates/shortcodes/guestbook_entry.html25
-rw-r--r--templates/shortcodes/guestbook_form.html20
-rw-r--r--templates/shortcodes/img.html13
3 files changed, 58 insertions, 0 deletions
diff --git a/templates/shortcodes/guestbook_entry.html b/templates/shortcodes/guestbook_entry.html
new file mode 100644
index 0000000..69789ca
--- /dev/null
+++ b/templates/shortcodes/guestbook_entry.html
@@ -0,0 +1,25 @@
+{% import "macros/date.html" as date %}
+
+<div class="guestbook-entry">
+ <p>
+ {% if website %}<a href="{{ website | safe }}" target="_blank">{% endif %}
+ <strong class="guestbook-entry-name">{{ name | safe }}</strong>
+ {% if website %}</a>{% endif %}
+ <br>
+ <time datetime="{{ time }}">
+ {{ date::format_date(date=time) }}
+ </time>
+ </p>
+ <p>
+ {{ message | safe }}
+ </p>
+ {% if reply %}
+ <blockquote>
+ <p>
+ {{ reply | safe }}
+ <br><br>
+ &mdash; {{ config.extra.nickname }}
+ </p>
+ </blockquote>
+ {% endif %}
+</div>
diff --git a/templates/shortcodes/guestbook_form.html b/templates/shortcodes/guestbook_form.html
new file mode 100644
index 0000000..99dcf4c
--- /dev/null
+++ b/templates/shortcodes/guestbook_form.html
@@ -0,0 +1,20 @@
+<form id="guestbook-form" method="POST" action="/guestbook/sign">
+ <div class="form-entry">
+ <label for="guestbook-name">Name:</label>
+ <input type="text" id="guestbook-name" name="name" placeholder="Name" required>
+ </div>
+
+ <div class="form-entry">
+ <label for="guestbook-website">Website:</label>
+ <input type="url" id="guestbook-website" name="website" placeholder="Website (optional)">
+ </div>
+
+ <div class="form-entry">
+ <label for="guestbook-message">Message:</label>
+ <textarea id="guestbook-message" name="message" placeholder="Message" rows="5" required></textarea>
+ </div>
+
+ <div class="form-entry">
+ <input type="submit" value="Sign the guestbook">
+ </div>
+</form>
diff --git a/templates/shortcodes/img.html b/templates/shortcodes/img.html
new file mode 100644
index 0000000..8ff0820
--- /dev/null
+++ b/templates/shortcodes/img.html
@@ -0,0 +1,13 @@
+<figure>
+ {% if href %}<a href="{{ href }}">{% endif %}
+ <img src="{{ src }}" alt="{{ alt }}"
+ {% if title %}title="{{ title }}"{% endif %}
+ {% if height %}height="{{ height }}"{% endif %}
+ {% if width %}width="{{ width }}"{% endif %}
+ >
+ {% if href %}</a>{% endif %}
+
+ {% if caption %}
+ <figcaption>{{ caption | safe }}</figcaption>
+ {% endif %}
+</figure>