Add more favicons for browser shortcuts
@@ -9,6 +9,18 @@
|
||||
<link rel="stylesheet" type="text/x-scss" href="{% static "pretixcontrol/scss/auth.scss" %}"/>
|
||||
{% endcompress %}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link rel="shortcut icon" href="{% static "pretixbase/img/favicon.ico" %}">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{% static "pretixbase/img/icons/apple-touch-icon.png" %}">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{% static "pretixbase/img/icons/favicon-32x32.png" %}">
|
||||
<link rel="icon" type="image/png" sizes="194x194" href="{% static "pretixbase/img/icons/favicon-194x194.png" %}">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="{% static "pretixbase/img/icons/android-chrome-192x192.png" %}">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{% static "pretixbase/img/icons/favicon-16x16.png" %}">
|
||||
<link rel="manifest" href="{% url "presale:site.webmanifest" %}">
|
||||
<link rel="mask-icon" href="{% static "pretixbase/img/icons/safari-pinned-tab.svg" %}" color="#3b1c4a">
|
||||
<meta name="msapplication-TileColor" content="#3b1c4a">
|
||||
<meta name="msapplication-config" content="{% url "presale:browserconfig.xml" %}">
|
||||
<meta name="theme-color" content="#3b1c4a">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
|
||||
@@ -52,8 +52,20 @@
|
||||
<script type="text/javascript" src="{% static "fileupload/jquery.fileupload.js" %}"></script>
|
||||
{% endcompress %}
|
||||
{{ html_head|safe }}
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" href="{% static "pretixbase/img/favicon.ico" %}">
|
||||
<link rel="shortcut icon" href="{% static "pretixbase/img/favicon.ico" %}">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{% static "pretixbase/img/icons/apple-touch-icon.png" %}">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{% static "pretixbase/img/icons/favicon-32x32.png" %}">
|
||||
<link rel="icon" type="image/png" sizes="194x194" href="{% static "pretixbase/img/icons/favicon-194x194.png" %}">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="{% static "pretixbase/img/icons/android-chrome-192x192.png" %}">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{% static "pretixbase/img/icons/favicon-16x16.png" %}">
|
||||
<link rel="manifest" href="{% url "presale:site.webmanifest" %}">
|
||||
<link rel="mask-icon" href="{% static "pretixbase/img/icons/safari-pinned-tab.svg" %}" color="#3b1c4a">
|
||||
<meta name="msapplication-TileColor" content="#3b1c4a">
|
||||
<meta name="msapplication-config" content="{% url "presale:browserconfig.xml" %}">
|
||||
<meta name="theme-color" content="#3b1c4a">
|
||||
|
||||
{% block custom_header %}{% endblock %}
|
||||
</head>
|
||||
<body data-datetimeformat="{{ js_datetime_format }}" data-timeformat="{{ js_time_format }}"
|
||||
|
||||
@@ -78,5 +78,6 @@ def contextprocessor(request):
|
||||
ctx['js_date_format'] = get_javascript_format_without_seconds('DATE_INPUT_FORMATS')
|
||||
ctx['js_time_format'] = get_javascript_format_without_seconds('TIME_INPUT_FORMATS')
|
||||
ctx['js_locale'] = get_moment_locale()
|
||||
ctx['settings'] = pretix_settings
|
||||
|
||||
return ctx
|
||||
|
||||
@@ -35,8 +35,18 @@
|
||||
<meta name="referrer" content="origin">
|
||||
{{ html_head|safe }}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="icon" href="{% static "pretixbase/img/favicon.ico" %}">
|
||||
{% block custom_header %}{% endblock %}
|
||||
<link rel="shortcut icon" href="{% static "pretixbase/img/favicon.ico" %}">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{% static "pretixbase/img/icons/apple-touch-icon.png" %}">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{% static "pretixbase/img/icons/favicon-32x32.png" %}">
|
||||
<link rel="icon" type="image/png" sizes="194x194" href="{% static "pretixbase/img/icons/favicon-194x194.png" %}">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="{% static "pretixbase/img/icons/android-chrome-192x192.png" %}">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{% static "pretixbase/img/icons/favicon-16x16.png" %}">
|
||||
<link rel="manifest" href="{% url "presale:site.webmanifest" %}">
|
||||
<link rel="mask-icon" href="{% static "pretixbase/img/icons/safari-pinned-tab.svg" %}" color="{{ settings.primary_color|default:"#3b1c4a" }}">
|
||||
<meta name="msapplication-TileColor" content="{{ settings.primary_color|default:"#3b1c4a" }}">
|
||||
<meta name="msapplication-config" content="{% url "presale:browserconfig.xml" %}">
|
||||
<meta name="theme-color" content="{{ settings.primary_color|default:"#3b1c4a" }}">
|
||||
</head>
|
||||
<body class="nojs" data-locale="{{ request.LANGUAGE_CODE }}" data-now="{% now "U.u" %}" data-datetimeformat="{{ js_datetime_format }}" data-timeformat="{{ js_time_format }}" data-dateformat="{{ js_date_format }}" data-datetimelocale="{{ js_locale }}">
|
||||
{% block above %}
|
||||
|
||||
@@ -8,6 +8,7 @@ import pretix.presale.views.locale
|
||||
import pretix.presale.views.order
|
||||
import pretix.presale.views.organizer
|
||||
import pretix.presale.views.robots
|
||||
import pretix.presale.views.theme
|
||||
import pretix.presale.views.user
|
||||
import pretix.presale.views.waiting
|
||||
import pretix.presale.views.widget
|
||||
@@ -111,5 +112,7 @@ organizer_patterns = [
|
||||
locale_patterns = [
|
||||
url(r'^locale/set$', pretix.presale.views.locale.LocaleSet.as_view(), name='locale.set'),
|
||||
url(r'^robots.txt$', pretix.presale.views.robots.robots_txt, name='robots.txt'),
|
||||
url(r'^browserconfig.xml$', pretix.presale.views.theme.browserconfig_xml, name='browserconfig.xml'),
|
||||
url(r'^site.webmanifest$', pretix.presale.views.theme.webmanifest, name='site.webmanifest'),
|
||||
url(r'^widget/v1\.(?P<lang>[a-zA-Z0-9_\-]+)\.js$', pretix.presale.views.widget.widget_js, name='widget.js'),
|
||||
]
|
||||
|
||||
50
src/pretix/presale/views/theme.py
Normal file
@@ -0,0 +1,50 @@
|
||||
from django.http import HttpResponse
|
||||
from django.templatetags.static import static
|
||||
from django.views.decorators.cache import cache_page
|
||||
|
||||
|
||||
@cache_page(3600)
|
||||
def browserconfig_xml(request):
|
||||
return HttpResponse(
|
||||
"""<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square150x150logo src="{}"/>
|
||||
<square310x310logo src="{}"/>
|
||||
<TileColor>#3b1c4a</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>""".format(
|
||||
static('pretixbase/img/icons/mstile-150x150.png'),
|
||||
static('pretixbase/img/icons/mstile-310x310.png'),
|
||||
), content_type='text/xml'
|
||||
)
|
||||
|
||||
|
||||
@cache_page(3600)
|
||||
def webmanifest(request):
|
||||
return HttpResponse(
|
||||
"""{
|
||||
"name": "",
|
||||
"short_name": "",
|
||||
"icons": [
|
||||
{
|
||||
"src": "%s",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "%s",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#3b1c4a",
|
||||
"background_color": "#3b1c4a",
|
||||
"display": "standalone"
|
||||
}""" % (
|
||||
static('pretixbase/img/icons/android-chrome-192x192.png'),
|
||||
static('pretixbase/img/icons/android-chrome-512x512.png'),
|
||||
), content_type='text/json'
|
||||
)
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
BIN
src/pretix/static/pretixbase/img/icons/apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
src/pretix/static/pretixbase/img/icons/favicon-16x16.png
Normal file
|
After Width: | Height: | Size: 489 B |
BIN
src/pretix/static/pretixbase/img/icons/favicon-194x194.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
src/pretix/static/pretixbase/img/icons/favicon-32x32.png
Normal file
|
After Width: | Height: | Size: 652 B |
BIN
src/pretix/static/pretixbase/img/icons/favicon.ico
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
src/pretix/static/pretixbase/img/icons/mstile-150x150.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
src/pretix/static/pretixbase/img/icons/mstile-310x310.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
@@ -0,0 +1 @@
|
||||
<svg version="1" xmlns="http://www.w3.org/2000/svg" width="933.333" height="933.333" viewBox="0 0 700.000000 700.000000"><path d="M0 109v109l4.3.1c33 .5 65.2 14.8 90 40.1 31.8 32.5 43.6 76.6 33.3 124.3-1.2 5.4-5.7 17.8-9 24.8-12.2 25.6-36.1 49.6-61.6 61.9-15.9 7.6-35.2 12.4-51.7 12.7L0 482v218h436.5v-60.5l9.2-.1c6-.1 9.3.3 9.6 1 .2.6.3 14.3.3 30.3l-.1 29.3H700V482l-4.7-.1c-32.5-.4-64.9-14.7-88.9-39.2-25.5-26.1-38.6-58.6-37.9-94.4.6-27.9 7.6-50 23.4-73.8 6.4-9.8 23.8-27 34.1-33.7 15.6-10.3 33.3-17.9 47.5-20.4 10-1.7 15.9-2.4 20.8-2.4h5.7V0H455.5v58h-19V.5L218.3.2 0 0v109zm454-6.1c1.3.1 1.5 5.7 1.5 44.6 0 43.8 0 44.5-2 44.6-7.9.3-15.7 0-16.3-.6-.4-.3-.7-20.3-.7-44.3v-43.7l4.5-.5c2.5-.3 6.1-.4 8-.3 1.9.1 4.2.2 5 .2zm1.5 178.6c0 24.5-.2 44.5-.5 44.6-.3.1-4.6.2-9.5.2l-9 .2V237h19v44.5zM287 256.4c37.8 3.1 65.2 23.6 75 55.9 3.6 12 4.4 18.2 4.4 34.2.1 18.9-.5 24-3.9 35.9-8.2 28.5-26.2 47.7-52 55.6-7.1 2.2-9.8 2.5-24 2.5-8.8-.1-17.8-.4-20.1-.9l-4-.8V510.5l-31.7.3-31.7.2V269.3l6.8-2.6c9.8-3.8 18.7-6.4 27.2-7.7 4.1-.7 8.2-1.4 9.1-1.5.9-.2 6.3-.7 12-1 5.7-.4 10.5-.8 10.6-.9.4-.3 14.8.2 22.3.8zm168.5 159.1c0 24.5-.2 44.6-.5 44.6-1.9.4-18 .4-18.1-.1-.4-1.5-.5-86.7-.1-87.8.3-.8 3.1-1.2 9.6-1.2h9.1v44.5zm-.1 133.7c-.1 24.4-.2 44.6-.3 44.9-.1.7-18.1.7-18.2 0-.4-1.6-.5-86.8-.1-87.9.3-.8 3.1-1.2 9.6-1.2h9.1l-.1 44.2z"/><path d="M264.5 293.9c-2 .8-2 1.8-2.1 54.5v53.8l2.5 1c1.4.5 5.8.8 9.8.5 20.6-1.5 29.5-18.2 29.6-55.7.2-37.8-9.2-54.5-30.5-54.8-4-.1-8.2.3-9.3.7z"/></svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |