blessing-skin-server/resources/views/shared/head.twig
2020-06-01 16:20:28 +08:00

28 lines
1.1 KiB
Twig

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta name="theme-color" content="{{ theme_color }}">
<meta name="keywords" content="{{ seo.keywords }}">
<meta name="description" content="{{ seo.description }}">
{{ seo.extra|striptags('<meta>')|raw }}
<link rel="preconnect" href="https://cdn.jsdelivr.net/" crossorigin>
{% if custom_cdn_host %}
<link rel="preconnect" href="{{ custom_cdn_host }}" crossorigin>
{% endif %}
<script>
window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js?v4')
})
</script>
{% for link in links %}
<link{% for attribute, value in link %} {{ attribute }}="{{ value|raw }}"{% endfor %}>
{% endfor %}
<link rel="shortcut icon" href="{{ favicon }}">
<link rel="icon" type="image/png" href="{{ favicon }}" sizes="192x192">
<link rel="apple-touch-icon" href="{{ favicon }}" sizes="180x180">
{% if inline_css %}
<style>{{ inline_css|striptags }}</style>
{% endif %}
{{ extra_head|join('\n')|raw }}