web: add og:title to head on all pages with custom title

This commit is contained in:
wukko 2024-09-09 12:19:25 +06:00
parent 0b5b8454a9
commit b96d2ea352
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2
5 changed files with 24 additions and 5 deletions

View file

@ -36,6 +36,10 @@
<title> <title>
{homeTitle}{stringPageTitle} ~ {$t("general.cobalt")} {homeTitle}{stringPageTitle} ~ {$t("general.cobalt")}
</title> </title>
<meta
property="og:title"
content="{homeTitle}{stringPageTitle} ~ {$t('general.cobalt')}"
/>
</svelte:head> </svelte:head>
<svelte:window bind:innerWidth={screenWidth} /> <svelte:window bind:innerWidth={screenWidth} />
@ -79,7 +83,10 @@
{/if} {/if}
</div> </div>
<nav class="subnav-navigation" class:visible-mobile={isMobile && isHome}> <nav
class="subnav-navigation"
class:visible-mobile={isMobile && isHome}
>
<slot name="navigation"></slot> <slot name="navigation"></slot>
{#if isMobile && isHome && pageSubtitle} {#if isMobile && isHome && pageSubtitle}
<div class="subtext subnav-subtitle center"> <div class="subtext subnav-subtitle center">
@ -108,9 +115,7 @@
.subnav-page { .subnav-page {
--subnav-nav-width: 250px; --subnav-nav-width: 250px;
--subnav-padding: 30px; --subnav-padding: 30px;
--subnav-padding-small: calc( --subnav-padding-small: calc(var(--subnav-padding) - var(--padding));
var(--subnav-padding) - var(--padding)
);
display: grid; display: grid;
width: 100%; width: 100%;
grid-template-columns: var(--subnav-nav-width) 1fr; grid-template-columns: var(--subnav-nav-width) 1fr;

View file

@ -8,6 +8,7 @@
<svelte:head> <svelte:head>
<title>{$t("general.cobalt")}</title> <title>{$t("general.cobalt")}</title>
<meta property="og:title" content={$t("general.cobalt")} />
</svelte:head> </svelte:head>
<div id="cobalt-save-container" class="center-column-container"> <div id="cobalt-save-container" class="center-column-container">
@ -22,7 +23,8 @@
<Omnibox /> <Omnibox />
</main> </main>
<div id="terms-note"> <div id="terms-note">
{$t("save.terms.note.agreement")} <a href="/about/terms">{$t("save.terms.note.link")}</a> {$t("save.terms.note.agreement")}
<a href="/about/terms">{$t("save.terms.note.link")}</a>
</div> </div>
</div> </div>

View file

@ -16,6 +16,10 @@
<title> <title>
{$t("tabs.donate")} ~ {$t("general.cobalt")} {$t("tabs.donate")} ~ {$t("general.cobalt")}
</title> </title>
<meta
property="og:title"
content="{$t("tabs.donate")} ~ {$t("general.cobalt")}"
/>
</svelte:head> </svelte:head>
<div id="donate-page-wrapper"> <div id="donate-page-wrapper">

View file

@ -190,6 +190,10 @@
<svelte:head> <svelte:head>
<title>{$t("tabs.remux")} ~ {$t("general.cobalt")}</title> <title>{$t("tabs.remux")} ~ {$t("general.cobalt")}</title>
<meta
property="og:title"
content="{$t("tabs.remux")} ~ {$t("general.cobalt")}"
/>
</svelte:head> </svelte:head>
<DropReceiver id="remux-container" bind:draggedOver bind:file> <DropReceiver id="remux-container" bind:draggedOver bind:file>

View file

@ -82,6 +82,10 @@
<title> <title>
{$t("tabs.updates")} ~ {$t("general.cobalt")} {$t("tabs.updates")} ~ {$t("general.cobalt")}
</title> </title>
<meta
property="og:title"
content="{$t("tabs.updates")} ~ {$t("general.cobalt")}"
/>
</svelte:head> </svelte:head>
<svelte:window on:keydown={handleKeydown} /> <svelte:window on:keydown={handleKeydown} />