Alt-text for opengraph and twitter card + better Jekyll conditional clause

This commit is contained in:
Rasmus Malver 2021-12-08 20:32:37 +01:00
parent 7d5239a2e1
commit 78321bb615
2 changed files with 12 additions and 15 deletions

View file

@ -7,39 +7,36 @@
{% if page.redirect %} {% if page.redirect %}
<meta http-equiv='refresh' content='5;url={% if site.active_lang == site.default_lang %} {{site.url}} {% else %} {{site.url}}/{{ site.active_lang }} {% endif %}' /> <meta http-equiv='refresh' content='5;url={% if site.active_lang == site.default_lang %} {{site.url}} {% else %} {{site.url}}/{{ site.active_lang }} {% endif %}' />
{% endif %} {% endif %}
{% if page.permalink == "/intetatskjule" %}
<meta property="og:type" content="website"> <meta property="og:type" content="website">
<meta property="og:image" content="{{ site.url }}/assets/img/og01.png" /> <meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@ulovliglogning">
<meta name="twitter:creator" content="@ulovliglogning">
{% if page.permalink == "/intetatskjule" %}
<meta property="og:image" content="{{ site.url }}/assets/img/postkort-opengraph.png" />
<meta property="og:image:alt" content="Et mobilfoto af begge sider af postkortet. På den ene side står der “Jeg har intet at skjule” og på den anden side er der en fuldmagt, hvor man giver os adgang til ens data." />
<meta property="og:url" content="{{ site.url }}/intetatskjule" /> <meta property="og:url" content="{{ site.url }}/intetatskjule" />
<meta property="og:description" content="Kender du nogen der ikke har noget at skjule? Giv dem et postkort, og lad os se deres data." /> <meta property="og:description" content="Kender du nogen der ikke har noget at skjule? Giv dem et postkort, og lad os se deres data." />
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:creator" content="@ulovliglogning">
<meta name="twitter:title" content="{{ global.title }}"> <meta name="twitter:title" content="{{ global.title }}">
<meta name="twitter:description" content="Kender du nogen der ikke har noget at skjule? Giv dem et postkort, og lad os se deres data."> <meta name="twitter:description" content="Kender du nogen der ikke har noget at skjule? Giv dem et postkort, og lad os se deres data.">
<meta name="twitter:image:alt" content="Et mobilfoto af begge sider af postkortet. På den ene side står der “Jeg har intet at skjule” og på den anden side er der en fuldmagt, hvor man giver os adgang til ens data.">
<meta name="twitter:image" content="{{ site.url }}/assets/img/postkort-twittercard.png"> <meta name="twitter:image" content="{{ site.url }}/assets/img/postkort-twittercard.png">
{% endif %} {% elsif page.permalink == "/gavekort" %}
{% if page.permalink == "/gavekort" %}
<meta property="og:type" content="website">
<meta property="og:image" content="{{ site.url }}/assets/img/og01.png" /> <meta property="og:image" content="{{ site.url }}/assets/img/og01.png" />
<meta property="og:url" content="{{ site.url }}" /> <meta property="og:url" content="{{ site.url }}" />
<meta property="og:description" content="Giv en donation i gave. Bestil et smukt kort." /> <meta property="og:description" content="Giv en donation i gave. Bestil et smukt kort." />
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:creator" content="@ulovliglogning">
<meta name="twitter:title" content="{{ global.title }}"> <meta name="twitter:title" content="{{ global.title }}">
<meta name="twitter:description" content="Giv en donation i gave. Bestil et smukt kort."> <meta name="twitter:description" content="Giv en donation i gave. Bestil et smukt kort.">
<meta name="twitter:image" content="{{ site.url }}/assets/img/twcard2020.png"> <meta name="twitter:image" content="{{ site.url }}/assets/img/twcard2020.png">
{% endif %} {% else %}
{% if page.permalink == "/" %}
<meta property="og:type" content="website">
<meta property="og:image" content="{{ site.url }}/assets/img/og01.png" /> <meta property="og:image" content="{{ site.url }}/assets/img/og01.png" />
<meta property="og:image:alt" content="En orange baggrund med en tegning af en simpel smartphone. På skærmen har den Foreningen imod Ulovlig Lognings logo." />
<meta property="og:url" content="{{ site.url }}" /> <meta property="og:url" content="{{ site.url }}" />
<meta property="og:description" content="{{ global.description }}" /> <meta property="og:description" content="{{ global.description }}" />
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:creator" content="@ulovliglogning">
<meta name="twitter:title" content="{{ global.title }}"> <meta name="twitter:title" content="{{ global.title }}">
<meta name="twitter:description" content="{{ global.description }}"> <meta name="twitter:description" content="{{ global.description }}">
<meta name="twitter:image" content="{{ site.url }}/assets/img/twcard2020.png"> <meta name="twitter:image" content="{{ site.url }}/assets/img/twcard2020.png">
{% endif %} <meta name="twitter:image:alt" content="Et orange skilt med en QR-kode og vores Mobile Pay-nummer 40456. Teksten “Stop ulovlig logning!”">
{% endif %}
<link rel="apple-touch-icon" sizes="180x180" href="/assets/img/favicon/apple-touch-icon.png"> <link rel="apple-touch-icon" sizes="180x180" href="/assets/img/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/assets/img/favicon/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="32x32" href="/assets/img/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/img/favicon/favicon-16x16.png"> <link rel="icon" type="image/png" sizes="16x16" href="/assets/img/favicon/favicon-16x16.png">

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 MiB