diff --git a/entries/templates/entries/entry_amp.html b/entries/templates/entries/entry_amp.html index 4410c44..1ff1a45 100644 --- a/entries/templates/entries/entry_amp.html +++ b/entries/templates/entries/entry_amp.html @@ -1,9 +1,9 @@ -{% load favtags jsonify lemoncurry_tags markdown theme_colour %} +{% load absolute_url favtags friendly_url humanize jsonify lemoncurry_tags markdown shortlink theme_colour %} {{ entry.title }} ~ {% site_name %} - + @@ -76,6 +91,11 @@
+ {% if entry.photo %} + + + + {% endif %} {% if entry.name %}

{{ entry.name }}

{% endif %} @@ -83,6 +103,53 @@
{{ entry.content | markdown }}
+ +
diff --git a/lemoncurry/templatetags/absolute_url.py b/lemoncurry/templatetags/absolute_url.py new file mode 100644 index 0000000..f7ad56a --- /dev/null +++ b/lemoncurry/templatetags/absolute_url.py @@ -0,0 +1,10 @@ +from django import template +from urllib.parse import urljoin +from ..utils import origin + +register = template.Library() + + +@register.simple_tag(takes_context=True) +def absolute_url(context, url): + return urljoin(origin(context.request), url)