-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
index.astro
39 lines (36 loc) · 898 Bytes
/
index.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
---
// Component Imports
import Counter from '../components/Counter.astro';
// Full Astro Component Syntax:
// https://docs.astro.build/core-concepts/astro-components/
---
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<meta name="generator" content={Astro.generator} />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<style>
html,
body {
font-family: system-ui;
margin: 0;
}
body {
padding: 2rem;
}
</style>
</head>
<body>
<main>
<!-- Note: no `client:load` necessary since AlpineJS is always included -->
<Counter>
<h1>Hello, AlpineJS!</h1>
</Counter>
<!-- Note: pass props to Astro components to initialize Alpine with a certain state -->
<Counter initialCount={5}>
<h2>Use Astro to pass in server-side props</h2>
</Counter>
</main>
</body>
</html>