diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2024-12-20 13:22:09 +0200 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2024-12-21 19:43:13 +0200 |
| commit | cd07f3b15c5055a9b7ee50da2161b42c56af5114 (patch) | |
| tree | c77ce4a53483e21f3517bed1b37a680064cbf2aa | |
| parent | edad25c53e4c3d6a9ea285c82913fb8486471dc9 (diff) | |
Add Open Graph meta tags to poll and manage pages
Fixes #2
| -rw-r--r-- | templates/base.html.j2 | 6 | ||||
| -rw-r--r-- | templates/manage.html.j2 | 12 | ||||
| -rw-r--r-- | templates/poll.html.j2 | 10 |
3 files changed, 25 insertions, 3 deletions
diff --git a/templates/base.html.j2 b/templates/base.html.j2 index c7e03d7..e0ae0d6 100644 --- a/templates/base.html.j2 +++ b/templates/base.html.j2 @@ -1,12 +1,14 @@ <!DOCTYPE html> <html lang="en"> <head> - <title>diddle 👉👈</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> - <meta name="description" content="diddle is a minimalist, mobile friendly, fast and self-hosted scheduling tool, licensed under Apache 2.0."> <link rel="preload" href="/static/InclusiveSans-Regular.ttf" as="font" type="font/woff2" crossorigin="anonymous"> <link rel="stylesheet" href="/static/styles.css"></link> + {% block head_meta %} + <title>diddle 👉👈</title> + <meta name="description" content="diddle is a minimalist, mobile friendly, fast and self-hosted scheduling tool, licensed under Apache 2.0."> + {% endblock %} </head> <body> <h1><a href="/">diddle 👉👈</a></h1> diff --git a/templates/manage.html.j2 b/templates/manage.html.j2 index 8cd2027..551e941 100644 --- a/templates/manage.html.j2 +++ b/templates/manage.html.j2 @@ -1,5 +1,15 @@ {% extends "base.html.j2" %} +{% block head_meta %} +<title>Manage "{{ poll.title }}" - diddle 👉👈</title> +<meta name="description" content="{{ poll.description }}"> +<meta property="og:title" content="Manage "{{ poll.title }}""> +<meta property="og:description" content="Manage diddle 👉👈 poll"> +<meta property="og:url" content="{{ poll.manage_url() }}"> +<meta property="og:site_name" content="diddle"> +<meta property="og:type" content="website"> +{% endblock %} + {% block content %} <h2>Managing <span class="contrast">{{ poll.title }}</span> by <i>{{ poll.author_name }}</i></h2> @@ -157,4 +167,4 @@ function copyShareLink() { } </script> -{% endblock %}
\ No newline at end of file +{% endblock %} diff --git a/templates/poll.html.j2 b/templates/poll.html.j2 index c09f089..14601fb 100644 --- a/templates/poll.html.j2 +++ b/templates/poll.html.j2 @@ -1,5 +1,15 @@ {% extends "base.html.j2" %} +{% block head_meta %} +<title>{{ poll.title }} - diddle 👉👈</title> +<meta name="description" content="{{ poll.description }}"> +<meta property="og:title" content="{{ poll.title }} by {{ poll.author_name }}"> +<meta property="og:description" content="{{ poll.description }}"> +<meta property="og:url" content="{{ poll.share_url() }}"> +<meta property="og:site_name" content="diddle"> +<meta property="og:type" content="website"> +{% endblock %} + {% block content %} <h2><span class="contrast">{{ poll.title }}</span> by <i>{{ poll.author_name }}</i></h2> |
