Extract view head

This commit is contained in:
philipp lang 2024-02-03 23:07:25 +01:00
parent c4a0c0af2d
commit b0e5aff5ac
3 changed files with 20 additions and 32 deletions

View File

@ -1,18 +1,4 @@
{% if __SELF__.event %}
{% put metatags %}
<meta property="og:title" content="{{__SELF__.event.name}}">
<meta property="og:url" content="{{__SELF__.currentUrl}}">
<meta property="og:description" content="{{__SELF__.event.excerpt}}">
<meta property="og:image" content="{{__SELF__.event.image}}">
<meta property="og:type" content="article">
{% endput %}
{% endif %}
{% put metatags %}
<meta name="adrema_base_url" content="/adrema-api">
{% endput %}
{% include 'silva.adrema::head' %}
<event-index
style="--primary: {{__SELF__.settings.primary_color}}; --primaryfg: #d1f8ff; --secondary: #800a19; --font: hsl(181, 84%, 78%); --circle: hsl(181, 86%, 16%)"
index-url="{{__SELF__.settings.indexUrl}}"

View File

@ -1,20 +1,4 @@
{% if __SELF__.event %}
{% put metatags %}
<meta property="og:title" content="{{__SELF__.event.name}}">
<meta property="og:url" content="{{__SELF__.currentUrl}}">
<meta property="og:description" content="{{__SELF__.event.excerpt}}">
<meta property="og:image" content="{{__SELF__.event.image}}">
<meta property="og:type" content="article">
{% endput %}
{% endif %}
{% put metatags %}
<meta name="adrema_base_url" content="/adrema-api">
{% endput %}
<script type="text/javascript">
var adrema_event = {{__SELF__.event.config | json_encode | raw}};
</script>
{% include 'silva.adrema::head' %}
<event-form
style="--primary: {{__SELF__.settings.primary_color}}; --primaryfg: #d1f8ff; --secondary: #800a19; --font: hsl(181, 84%, 78%); --circle: hsl(181, 86%, 16%)"

18
views/head.htm Normal file
View File

@ -0,0 +1,18 @@
{% if __SELF__.event %}
{% put metatags %}
<meta property="og:title" content="{{__SELF__.event.name}}">
<meta property="og:url" content="{{__SELF__.currentUrl}}">
<meta property="og:description" content="{{__SELF__.event.excerpt}}">
<meta property="og:image" content="{{__SELF__.event.image}}">
<meta property="og:type" content="article">
{% endput %}
{% endif %}
{% put metatags %}
<meta name="adrema_base_url" content="/adrema-api">
{% endput %}
<script type="text/javascript">
var adrema_event = {{__SELF__.event.config | json_encode | raw}};
</script>