summaryrefslogtreecommitdiff
path: root/examples/starter/src/pages/index.astro
blob: ea853b668d91ab7154e2d9e14261a2761531d54a (plain) (blame)
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
---
import {Content as TourContent} from '../content/Tour.md';
import Logo from '../components/Logo.astro';
import '../styles/global.css';
import '../styles/home.css';
/* ASTRO:COMPONENT_IMPORTS */

// Component Script:
// You can write any JavaScript/TypeScript that you'd like here.
// It will run during the build, but never in the browser.
// All variables are available to use in the HTML template below.
let title = 'My Astro Site';

// 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">
	<title>{title}</title>

	<link rel="icon" type="image/x-icon" href="/favicon.ico" />

	<style>
		header {
			display: flex;
			flex-direction: column;
			gap: 1em;
			max-width: min(100%, 68ch);
		}
		article {
			padding-top: 2em;
			line-height: 1.5;
			display: flex;
			flex-direction: column;
			gap: 1em;
			max-width: 70ch;
		}
		.banner {
			text-align: center;
			font-size: 1.2rem;
			background: var(--color-light);
			padding: 1em 1.5em;
			padding-left: 0.75em;
			border-radius: 4px;
		}
	</style>
	<style is:global>
		pre {
			padding: 1rem;
		}
	</style>
</head>
<body>
	<main>
		<header>
			<div>
				<Logo width={60} height={80} />
				<h1>Welcome to <a href="https://astro.build/">Astro</a></h1>
			</div>
		</header>

		<article>
			<div class="banner">
				<p><strong>🧑‍🚀 Seasoned astronaut?</strong> Delete this template and have fun!</p>
			</div>
			<TourContent />
		</article>

		<!--

		You can also use imported framework components directly in your markup!
		
		Note: by default, these components are NOT interactive on the client.
		The `client:visible` directive tells Astro to make it interactive.
		
		See https://docs.astro.build/core-concepts/component-hydration/ 

		-->

		<!-- ASTRO:COMPONENT_MARKUP -->
	</main>
</body>
</html>