diff options
| author | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2026-02-02 21:10:12 +0530 |
|---|---|---|
| committer | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2026-02-02 21:10:12 +0530 |
| commit | d245c05825743e20d2df2900c4f8313d82ebcfe1 (patch) | |
| tree | b82ce18e8b9d2ff3d6c32f152b6d799d27eb4ffa /templates/shortcodes | |
first commit
Diffstat (limited to 'templates/shortcodes')
| -rw-r--r-- | templates/shortcodes/guestbook_entry.html | 25 | ||||
| -rw-r--r-- | templates/shortcodes/guestbook_form.html | 20 | ||||
| -rw-r--r-- | templates/shortcodes/img.html | 13 |
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> + — {{ 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> |