mirror of
https://github.com/ditatompel/xmr-remote-nodes.git
synced 2025-02-02 03:06:37 +00:00
Removing meta OG:Image and article
This commit is contained in:
parent
2a4721b8de
commit
a2669c558f
6 changed files with 13 additions and 75 deletions
|
@ -2,7 +2,6 @@
|
|||
// import { writable } from 'svelte/store';
|
||||
import { page } from '$app/stores';
|
||||
import { computePosition, autoUpdate, offset, shift, flip, arrow } from '@floating-ui/dom';
|
||||
import { beforeNavigate, afterNavigate } from '$app/navigation';
|
||||
import '../../app.css';
|
||||
import {
|
||||
Toast,
|
||||
|
@ -24,96 +23,57 @@
|
|||
title: 'Monero is private, decentralized cryptocurrency that keeps your finances confidential and secure.',
|
||||
description: '',
|
||||
keywords: '',
|
||||
image:
|
||||
'https://vcl-og-img.ditatompel.com/' +
|
||||
encodeURIComponent('Monero is private, decentralized cryptocurrency that keeps your finances confidential and secure.') +
|
||||
'.png?md=0'
|
||||
};
|
||||
const meta = {
|
||||
title: metaDefaults.title,
|
||||
description: metaDefaults.description,
|
||||
keywords: metaDefaults.keywords,
|
||||
image: metaDefaults.image,
|
||||
article: { publishTime: '', modifiedTime: '', author: '' },
|
||||
// Twitter
|
||||
twitter: {
|
||||
title: metaDefaults.title,
|
||||
description: metaDefaults.description,
|
||||
image: metaDefaults.image
|
||||
description: metaDefaults.description
|
||||
}
|
||||
};
|
||||
|
||||
page.subscribe((page) => {
|
||||
// Restore Page Defaults
|
||||
meta.title = metaDefaults.title;
|
||||
meta.description = metaDefaults.description;
|
||||
meta.keywords = metaDefaults.keywords;
|
||||
meta.image = metaDefaults.image;
|
||||
// Restore Twitter Defaults
|
||||
meta.twitter.title = metaDefaults.title;
|
||||
meta.twitter.description = metaDefaults.description;
|
||||
meta.twitter.image = metaDefaults.image;
|
||||
if (typeof page.data.meta === 'object') {
|
||||
meta.title = page.data.meta.title ?? metaDefaults.title;
|
||||
meta.description = page.data.meta.description ?? metaDefaults.description;
|
||||
meta.keywords = page.data.meta.keywords ?? metaDefaults.description;
|
||||
meta.image = page.data.meta.image ?? metaDefaults.image;
|
||||
// Restore Twitter Defaults
|
||||
meta.twitter.title = page.data.meta.title ?? metaDefaults.title;
|
||||
meta.twitter.description = page.data.meta.description ?? metaDefaults.description;
|
||||
meta.twitter.image = page.data.meta.image ?? metaDefaults.description;
|
||||
if (typeof page.data.meta.article === 'object') {
|
||||
meta.article.author = page.data.meta.article.author ?? '';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
let isLoading = false;
|
||||
|
||||
// progress bar show
|
||||
beforeNavigate(() => (isLoading = true));
|
||||
|
||||
// scroll to top after nafigation and progress bar
|
||||
afterNavigate((/* params */) => {
|
||||
isLoading = false;
|
||||
// scroll to top when navigate
|
||||
// const isNewPage = params.from?.url.pathname !== params.to?.url.pathname;
|
||||
// const elemPage = document.querySelector('#page');
|
||||
// if (isNewPage && elemPage !== null) {
|
||||
// elemPage.scrollTop = 0;
|
||||
// }
|
||||
});
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>{meta.title} — xmr.ditatompel.com</title>
|
||||
<!-- Meta Tags -->
|
||||
<meta name="title" content="{meta.title} — ditatompel.com" />
|
||||
<meta name="title" content="{meta.title} — xmr.ditatompel.com" />
|
||||
<meta name="description" content={meta.description} />
|
||||
<meta name="keywords" content={meta.keywords} />
|
||||
<meta name="theme-color" content="#272b31" />
|
||||
<meta name="author" content="ditatompel" />
|
||||
|
||||
<!-- Open Graph - https://ogp.me/ -->
|
||||
<meta property="og:site_name" content="ditatompel.com" />
|
||||
<meta property="og:site_name" content="xmr.ditatompel.com" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://www.ditatompel.com{$page.url.pathname}" />
|
||||
<meta property="og:url" content="https://xmr.ditatompel.com{$page.url.pathname}" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta property="og:title" content="{meta.title} — ditatompel.com" />
|
||||
<meta property="og:title" content="{meta.title} — xmr.ditatompel.com" />
|
||||
<meta property="og:description" content={meta.description} />
|
||||
<meta property="og:image" content={meta.image} />
|
||||
<meta property="og:image:secure_url" content={meta.image} />
|
||||
<meta property="og:image:type" content="image/png" />
|
||||
<meta property="og:image:width" content="2048" />
|
||||
<meta property="og:image:height" content="1170" />
|
||||
|
||||
<!-- Open Graph: Twitter -->
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta name="twitter:site" content="@ditatompel" />
|
||||
<meta name="twitter:creator" content="@ditatompel" />
|
||||
<meta name="twitter:title" content="{meta.twitter.title} — ditatompel.com" />
|
||||
<meta name="twitter:title" content="{meta.twitter.title} — xmr.ditatompel.com" />
|
||||
<meta name="twitter:description" content={meta.twitter.description} />
|
||||
<meta name="twitter:image" content={meta.twitter.image} />
|
||||
</svelte:head>
|
||||
|
||||
<Modal />
|
||||
|
|
|
@ -12,15 +12,10 @@ export async function load({ data }) {
|
|||
title: metaDefaults.title,
|
||||
description: metaDefaults.description,
|
||||
keywords: metaDefaults.keywords,
|
||||
image:
|
||||
'https://vcl-og-img.ditatompel.com/' + encodeURIComponent(metaDefaults.title) + '.png?md=0',
|
||||
// Article
|
||||
article: { publishTime: '', modifiedTime: '', author: '' },
|
||||
// Twitter
|
||||
twitter: {
|
||||
title: metaDefaults.title,
|
||||
description: metaDefaults.description,
|
||||
image: metaDefaults.image
|
||||
description: metaDefaults.description
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -12,15 +12,10 @@ export async function load({ data }) {
|
|||
title: metaDefaults.title,
|
||||
description: metaDefaults.description,
|
||||
keywords: metaDefaults.keywords,
|
||||
image:
|
||||
'https://vcl-og-img.ditatompel.com/' + encodeURIComponent(metaDefaults.title) + '.png?md=0',
|
||||
// Article
|
||||
article: { publishTime: '', modifiedTime: '', author: '' },
|
||||
// Twitter
|
||||
twitter: {
|
||||
title: metaDefaults.title,
|
||||
description: metaDefaults.description,
|
||||
image: metaDefaults.image
|
||||
description: metaDefaults.description
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -12,16 +12,11 @@ export async function load({ data }) {
|
|||
title: metaDefaults.title,
|
||||
description: metaDefaults.description,
|
||||
keywords: metaDefaults.keywords,
|
||||
image:
|
||||
'https://vcl-og-img.ditatompel.com/' + encodeURIComponent(metaDefaults.title) + '.png?md=0',
|
||||
// Article
|
||||
article: { publishTime: '', modifiedTime: '', author: '' },
|
||||
// Twitter
|
||||
twitter: {
|
||||
title: metaDefaults.title,
|
||||
description: metaDefaults.description,
|
||||
image: metaDefaults.image
|
||||
description: metaDefaults.description
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -7,22 +7,16 @@ export async function load({ data }) {
|
|||
keywords: 'monero,xmr,monero node,xmrnode,cryptocurrency'
|
||||
};
|
||||
|
||||
|
||||
return {
|
||||
meta: {
|
||||
title: metaDefaults.title,
|
||||
description: metaDefaults.description,
|
||||
keywords: metaDefaults.keywords,
|
||||
image:
|
||||
'https://vcl-og-img.ditatompel.com/' + encodeURIComponent(metaDefaults.title) + '.png?md=0',
|
||||
// Article
|
||||
article: { publishTime: '', modifiedTime: '', author: '' },
|
||||
// Twitter
|
||||
twitter: {
|
||||
title: metaDefaults.title,
|
||||
description: metaDefaults.description,
|
||||
image: metaDefaults.image
|
||||
description: metaDefaults.description
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
// progress bar show
|
||||
beforeNavigate(() => (isLoading = true));
|
||||
|
||||
afterNavigate((/* params */) => {
|
||||
afterNavigate(() => {
|
||||
isLoading = false;
|
||||
});
|
||||
</script>
|
||||
|
@ -33,4 +33,3 @@
|
|||
/>
|
||||
{/if}
|
||||
<slot />
|
||||
|
||||
|
|
Loading…
Reference in a new issue