-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBase.astro
183 lines (156 loc) · 4.79 KB
/
Base.astro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
---
import type { Options } from '@contracts'
import Favicons from '@components/Favicons.astro'
import onestWoff2 from '@fontsource-variable/inconsolata/files/inconsolata-latin-wght-normal.woff2?url'
import inconsolataWoff2 from '@fontsource-variable/onest/files/onest-latin-wght-normal.woff2?url'
import { Schema } from 'astro-seo-schema'
import '@fontsource-variable/onest'
import '@fontsource-variable/inconsolata'
import '@styles/globals.css'
import 'sanitize.css'
import 'sanitize.css/forms.css'
import 'sanitize.css/assets.css'
import 'sanitize.css/typography.css'
import 'sanitize.css/reduce-motion.css'
interface Props {
options: Options
}
const { options } = Astro.props
const { title, description, metaRobots } = options;
---
<!doctype html>
<html dir="ltr" lang="es">
<head>
<meta charset="UTF-8" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<title>{title}</title>
<slot name="preconnect" />
<slot name="async-script" />
<!-- Critical CSS -->
<style is:inline>
:root {
--accent: 136, 58, 234;
--accent-light: 224, 204, 250;
--accent-dark: 49, 10, 101;
--accent-gradient: linear-gradient(
45deg,
rgb(var(--accent)),
rgb(var(--accent-light)) 30%,
white 60%
);
--scrollbar: #e5e5e5;
--scrollbar-thumb: #c0c0c0;
--scrollbar-thumb-hover: #909090;
--scrollbar-dark: #898989;
--scrollbar-thumb-dark: #5d5d5d;
--scrollbar-thumb-hover-dark: #3f3f3f;
}
@view-transition {
navigation: auto;
}
body {
overflow-x: hidden;
}
body::-webkit-scrollbar {
width: 7px;
height: 7px;
background: var(--scrollbar);
transition: background 150ms cubic-bezier(0.4, 0, 0.2, 1);
will-change: background;
}
body::-webkit-scrollbar-thumb {
background: var(--scrollbar-thumb);
border-radius: 0.25rem;
}
@media (any-hover: hover) {
body::-webkit-scrollbar-thumb:hover {
background: var(--scrollbar-thumb-hover);
}
}
@media (prefers-color-scheme: dark) {
html body::-webkit-scrollbar {
background: var(--scrollbar-dark);
transition: background 150ms cubic-bezier(0.4, 0, 0.2, 1);
will-change: background;
}
html body::-webkit-scrollbar-thumb {
background: var(--scrollbar-thumb-dark);
}
@media (any-hover: hover) {
html body::-webkit-scrollbar-thumb:hover {
background: var(--scrollbar-thumb-hover-dark);
}
}
}
@supports not selector(::-webkit-scrollbar) {
html,
body {
scrollbar-color: var(--scrollbar) var(--scrollbar-thumb);
scrollbar-width: thin;
scrollbar-gutter: stable;
}
@media (prefers-color-scheme: dark) {
html,
html body {
scrollbar-color: var(--scrollbar-dark) var(--scrollbar-thumb-dark);
}
}
}
</style>
<slot name="stylesheet" />
<link
as="font"
crossorigin="anonymous"
href={onestWoff2}
rel="preload"
type="font/woff2"
/>
<link
as="font"
crossorigin="anonymous"
href={inconsolataWoff2}
rel="preload"
type="font/woff2"
/>
<slot name="preload" />
<slot name="defer-script" />
<meta content={metaRobots || 'index, follow'} name="robots" />
{description && <meta content={description} name="description" />}
{description && <link href={Astro.url.href} rel="canonical" />}
<meta
content="UXCorpRangel - https://github.com/UXCorpRangel"
name="author"
/>
<meta content={Astro.generator} name="generator" />
{
description && (
<Schema
item={{
'@context': 'https://schema.org',
'@type': 'Organization',
name: 'JSConf Chile 2025 | La más prestigiosa conferencia de JavaScript',
url: Astro.url.href,
logo: Astro.url.href + 'og/og.jpg',
description:
'Acompáñanos en la tercera edición de la JSConf Chile donde tendremos Charlistas internacionales, comunidad, aprendizaje y conexiones.',
sameAs: [
'https://www.linkedin.com/company/jsconf-chile/',
'https://www.instagram.com/jsconf.cl/',
'https://x.com/jsconfcl',
'https://www.facebook.com/jsconfcl'
]
}}
/>
)
}
<slot name="schema" />
<Favicons />
<meta content="dark light" name="color-scheme" />
<meta content="#ee2525" name="theme-color" />
<slot name="social-media" />
</head>
<body>
<slot />
<slot name="dynamic-components" />
</body>
</html>