diff --git a/beesgospel/static/img/abeille-1024.png b/beesgospel/static/img/abeille-1024.png new file mode 100644 index 0000000..2f7ca4c Binary files /dev/null and b/beesgospel/static/img/abeille-1024.png differ diff --git a/beesgospel/static/img/abeille-192.png b/beesgospel/static/img/abeille-192.png new file mode 100644 index 0000000..0ba3718 Binary files /dev/null and b/beesgospel/static/img/abeille-192.png differ diff --git a/beesgospel/static/img/abeille-512.png b/beesgospel/static/img/abeille-512.png new file mode 100644 index 0000000..dc67d8b Binary files /dev/null and b/beesgospel/static/img/abeille-512.png differ diff --git a/beesgospel/static/img/abeille.svg b/beesgospel/static/img/abeille.svg new file mode 100644 index 0000000..a5d0e8b --- /dev/null +++ b/beesgospel/static/img/abeille.svg @@ -0,0 +1,346 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/beesgospel/views.py b/beesgospel/views.py index 2ddf694..f77a3de 100644 --- a/beesgospel/views.py +++ b/beesgospel/views.py @@ -21,6 +21,11 @@ class HomeView(TemplateView): } +class ManifestView(TemplateView): + template_name = "manifest.json" + content_type = "application/json" + + class PresentationView(TemplateView): template_name="presentation.html" diff --git a/common/urls.py b/common/urls.py index 0d7fcff..2ace8e4 100644 --- a/common/urls.py +++ b/common/urls.py @@ -1,10 +1,14 @@ from django.contrib import admin from django.urls import include, path +from django.views.decorators.cache import cache_page from django.views.generic import TemplateView from beesgospel import views urlpatterns = [ + path("manifest.json", + cache_page(3600 * 24)(views.ManifestView.as_view()), name="manifest" + ), path("admin/", admin.site.urls), path("accounts/", include("django.contrib.auth.urls")), path("", views.HomeView.as_view(), name="home"), diff --git a/templates/base.html b/templates/base.html index f32de9e..5f499df 100644 --- a/templates/base.html +++ b/templates/base.html @@ -6,6 +6,7 @@ Le Gospel de l’Abeille - Bee's Gospel{% block page_title %}{% endblock %} + diff --git a/templates/manifest.json b/templates/manifest.json new file mode 100644 index 0000000..120024e --- /dev/null +++ b/templates/manifest.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://json.schemastore.org/web-manifest-combined.json", + "name": "Bee's Gospel", + "short_name": "Bee's Gospel", + "start_url": "/", + "display": "standalone", + "background_color": "#fff", + "lang": "fr", + "icons": [{ + "src": "{% static 'img/abeille-192.png' %}", + "sizes": "192x192", + "type": "image/png" + }, { + "src": "{% static 'img/abeille-512.png' %}", + "sizes": "512x512", + "type": "image/png" + }, { + "src": "{% static 'img/abeille-1024.png' %}", + "sizes": "1024x1024", + "type": "image/png" + }, + { + "src": "{% static 'img/abeille.svg' %}", + "sizes": "any" + }] +}