feat: home landing page
This commit is contained in:
41
src/components/layout/Landing.astro
Normal file
41
src/components/layout/Landing.astro
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
export interface Props {
|
||||
title?: string
|
||||
description?: string
|
||||
imageUrl?: string
|
||||
}
|
||||
|
||||
const { title, description, imageUrl } = Astro.props
|
||||
const permalink = new URL(Astro.url.pathname, Astro.site).href
|
||||
const seoTitle =
|
||||
title === undefined ? 'Juggernaut Plays' : `${title} | Juggernaut Plays`
|
||||
const seoDescription =
|
||||
description === undefined
|
||||
? 'Oops, parece que no hay descripción.'
|
||||
: description
|
||||
const seoImage =
|
||||
imageUrl === undefined ? 'https://srjuggernaut.dev/DefaultOG.png' : imageUrl
|
||||
---
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<!-- SEO -->
|
||||
|
||||
<title>{seoTitle}</title>
|
||||
<meta name="description" content={seoDescription}>
|
||||
|
||||
<!-- Open Graph -->
|
||||
|
||||
<meta property="og:title" content={seoTitle}>
|
||||
<meta property="og:description" content={seoDescription}>
|
||||
<meta property="og:url" content={permalink}>
|
||||
<meta property="og:image" content={seoImage}>
|
||||
</head>
|
||||
<body>
|
||||
<main><slot /></main>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user