|
2 | 2 | import Footer from "../components/Footer.astro"; |
3 | 3 | import "../styles/global.css"; |
4 | 4 |
|
| 5 | +const DEFAULT_KEYWORDS = ["binarybrains", "upiicsa", "algoritigmia"]; |
| 6 | +
|
| 7 | +const ogImage = { |
| 8 | + path: "https://binarybrains-upiicsa.github.io/images/binary-brains-banner.png", |
| 9 | + alt: "A logo of a blue brain digitalized", |
| 10 | +}; |
| 11 | +
|
5 | 12 | interface Props { |
6 | 13 | title: string; |
| 14 | + description?: string; |
| 15 | + keywords?: string[]; |
| 16 | + canonical?: URL; |
7 | 17 | } |
8 | 18 |
|
9 | | -const { title } = Astro.props; |
| 19 | +const { |
| 20 | + title, |
| 21 | + description, |
| 22 | + keywords = DEFAULT_KEYWORDS, |
| 23 | + canonical, |
| 24 | +} = Astro.props; |
10 | 25 | --- |
11 | 26 |
|
12 | | -<html lang="en"> |
| 27 | +<html lang="es"> |
13 | 28 | <head> |
14 | 29 | <meta charset="utf-8" /> |
15 | 30 | <link rel="icon" type="image/svg+xml" href="/favicon.svg" /> |
16 | 31 | <meta name="viewport" content="width=device-width" /> |
17 | 32 | <meta name="generator" content={Astro.generator} /> |
18 | 33 | <base href="https://binarybrains-upiicsa.github.io/" /> |
| 34 | + |
| 35 | + <meta name="twitter:card" content="summary_large_image" /> |
| 36 | + |
19 | 37 | <title>{title}</title> |
| 38 | + <meta name="twitter:title" content={title} /> |
| 39 | + <meta property="og:title" content={title} /> |
| 40 | + |
| 41 | + {canonical && <link rel="canonical" href={canonical.toString()} />} |
| 42 | + |
| 43 | + { |
| 44 | + description && ( |
| 45 | + <> |
| 46 | + <meta property="og:description" content={description} /> |
| 47 | + <meta name="twitter:description" content={description} /> |
| 48 | + <meta name="description" content={description} /> |
| 49 | + </> |
| 50 | + ) |
| 51 | + } |
| 52 | + |
| 53 | + <meta name="twitter:image" content={ogImage.path} /> |
| 54 | + <meta name="twitter:image:alt" content={ogImage.alt} /> |
| 55 | + <meta property="og:image" content={ogImage.path} /> |
| 56 | + <meta property="og:image:alt" content={ogImage.alt} /> |
| 57 | + |
| 58 | + <meta property="og:type" content="website" /> |
| 59 | + <meta property="og:site_name" content="binarybrains-upiicsa" /> |
| 60 | + <meta property="og:locale" content="es_MX" /> |
| 61 | + |
| 62 | + <meta name="keywords" content={keywords.join(", ")} /> |
20 | 63 | </head> |
21 | 64 | <body> |
22 | | - <div id="cursor" class="custom-cursor" /> |
| 65 | + <div id="cursor" class="custom-cursor"></div> |
23 | 66 | <slot /> |
24 | 67 | <Footer /> |
25 | 68 | </body> |
26 | 69 | </html> |
27 | 70 |
|
28 | 71 | <script> |
29 | 72 | const cursor = document.getElementById("cursor"); |
30 | | - globalThis.addEventListener("mousemove", (event: MouseEvent) => { |
31 | | - if (cursor) { |
32 | | - cursor.style.transform = |
33 | | - `translate(${event.clientX}px, ${event.clientY}px)`; |
34 | | - } |
35 | | - }); |
| 73 | + globalThis.addEventListener("mousemove", (event: MouseEvent) => { |
| 74 | + if (cursor) { |
| 75 | + cursor.style.transform = `translate(${event.clientX}px, ${event.clientY}px)`; |
| 76 | + } |
| 77 | + }); |
36 | 78 | </script> |
0 commit comments