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

View file

@ -8,6 +8,7 @@
<svelte:head>
<title>{$t("general.cobalt")}</title>
<meta property="og:title" content={$t("general.cobalt")} />
</svelte:head>
<div id="cobalt-save-container" class="center-column-container">
@ -22,7 +23,8 @@
<Omnibox />
</main>
<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>

View file

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

View file

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

View file

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