Update manifest.json with extra properties, set theme colour properly as a <meta> as well
This commit is contained in:
parent
b172d9f139
commit
7429d43280
4 changed files with 33 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
|||
{% load compress favtags lemoncurry_tags meta static %}<!doctype html>
|
||||
{% load compress favtags lemoncurry_tags meta static theme_colour %}<!doctype html>
|
||||
<html lang="en" class="{% block html_class %}{% endblock %}">
|
||||
<head{% meta_namespaces %}>{% site_name as site_name %}{% request_uri request as uri %}{% request_origin request as origin %}
|
||||
<base href="{{ origin }}" />
|
||||
|
@ -9,7 +9,9 @@
|
|||
|
||||
<link rel="hub" href="{% get_push_hub %}" />
|
||||
<link rel="self" href="{{ uri }}" />
|
||||
|
||||
<link rel="manifest" href="{% url 'wellknowns:manifest' %}" />
|
||||
<meta name="theme-color" content="{% theme_colour 2 %}" />
|
||||
|
||||
<meta property="og:url" content="{{ uri }}" />
|
||||
<meta property="og:title" content="{% firstof title site_name %}" />
|
||||
|
|
9
lemoncurry/templatetags/theme_colour.py
Normal file
9
lemoncurry/templatetags/theme_colour.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
from django import template
|
||||
from ..theme import color
|
||||
|
||||
register = template.Library()
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
def theme_colour(i):
|
||||
return color(i)
|
|
@ -9,3 +9,7 @@ path = join(
|
|||
)
|
||||
with open(path, 'r') as f:
|
||||
theme = safe_load(f)
|
||||
|
||||
|
||||
def color(i):
|
||||
return '#' + theme['base0' + format(i, '1X')]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue