mirror of
https://github.com/searxng/searxng.git
synced 2026-07-30 11:51:24 +00:00
[mod] add manifest.json template and route (#5859)
URLs, name and colors are automatically rendered into manifest.json. Furthermore user preference of theme (light, dark, black) and theme colors are respected. Theme colors can be set in settings.yml
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
<link rel="icon" href="{{ url_for('static', filename='img/favicon.png') }}" sizes="any">
|
||||
<link rel="icon" href="{{ url_for('static', filename='img/favicon.svg') }}" type="image/svg+xml">
|
||||
<link rel="apple-touch-icon" href="{{ url_for('static', filename='img/favicon.png') }}">
|
||||
<link rel="manifest" href="{{ url_for('manifest') }}" />
|
||||
</head>
|
||||
<body class="{{ endpoint }}_endpoint" >
|
||||
<main id="main_{{ self._TemplateReference__context.name|replace("simple/", "")|replace(".html", "") }}" class="{{body_class}}">
|
||||
|
||||
25
searx/templates/simple/manifest.json
Normal file
25
searx/templates/simple/manifest.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "{{ instance_name }}",
|
||||
"short_name": "{{ instance_name }}",
|
||||
"icons": [
|
||||
{
|
||||
"src": "{{ url_for('static', filename='img/favicon.svg', _external=True) }}",
|
||||
"sizes": "any",
|
||||
"type": "image/svg+xml"
|
||||
},
|
||||
{
|
||||
"src": "{{ url_for('static', filename='img/192.png', _external=True) }}",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "{{ url_for('static', filename='img/512.png', _external=True) }}",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"start_url": "{{ url_for('index') }}",
|
||||
"theme_color": "{{ theme_color }}" ,
|
||||
"background_color": "{{ background_color }}",
|
||||
"display": "standalone"
|
||||
}
|
||||
Reference in New Issue
Block a user