Ajout manifest.json pour icônes raccourcis
This commit is contained in:
parent
161399d33d
commit
6d499815e6
BIN
beesgospel/static/img/abeille-1024.png
Normal file
BIN
beesgospel/static/img/abeille-1024.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 124 KiB |
BIN
beesgospel/static/img/abeille-192.png
Normal file
BIN
beesgospel/static/img/abeille-192.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
BIN
beesgospel/static/img/abeille-512.png
Normal file
BIN
beesgospel/static/img/abeille-512.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 58 KiB |
346
beesgospel/static/img/abeille.svg
Normal file
346
beesgospel/static/img/abeille.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 88 KiB |
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"),
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<title>Le Gospel de l’Abeille - Bee's Gospel{% block page_title %}{% endblock %}</title>
|
||||
<link href="{% static 'vendor/bootstrap.min.css' %}" rel="stylesheet">
|
||||
<link href="{% static 'css/main.css' %}" rel="stylesheet">
|
||||
<link rel="manifest" href="{% url 'manifest' %}" crossorigin="use-credentials">
|
||||
<script src="{% static 'vendor/bootstrap.bundle.min.js' %}"></script>
|
||||
</head>
|
||||
<body class="{% block bodyclass %}{% endblock %}">
|
||||
|
|
26
templates/manifest.json
Normal file
26
templates/manifest.json
Normal file
|
@ -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"
|
||||
}]
|
||||
}
|
Loading…
Reference in a new issue