js
This commit is contained in:
parent
daf96857f5
commit
3707225ff7
5 changed files with 31 additions and 2 deletions
5
src/components/Button.astro
Normal file
5
src/components/Button.astro
Normal file
|
@ -0,0 +1,5 @@
|
|||
<button>hi</button>
|
||||
|
||||
<script>
|
||||
document.querySelector("button").addEventListener("click", () => {alert("hi")});
|
||||
</script>
|
3
src/components/Footer.astro
Normal file
3
src/components/Footer.astro
Normal file
|
@ -0,0 +1,3 @@
|
|||
<footer>
|
||||
<p>aaaAAAA.COM</p>
|
||||
</footer>
|
2
src/components/Navigation.astro
Normal file
2
src/components/Navigation.astro
Normal file
|
@ -0,0 +1,2 @@
|
|||
<a href="/about">second page idk</a>
|
||||
<a href="/blog">Cool blog</a>
|
10
src/components/Social.astro
Normal file
10
src/components/Social.astro
Normal file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
const { platform, username } = Astro.props;
|
||||
---
|
||||
<a href={`https://${platform}.com/${username}`}>{platform}</a>
|
||||
|
||||
<style>
|
||||
* {
|
||||
color: green;
|
||||
}
|
||||
</style>
|
|
@ -1,5 +1,9 @@
|
|||
---
|
||||
import "../styles/global.css";
|
||||
import Button from "../components/Button.astro";
|
||||
import Navigation from "../components/Navigation.astro";
|
||||
import Footer from "../components/Footer.astro";
|
||||
import Social from "../components/Social.astro";
|
||||
|
||||
const nuclearLaunchCodes = "below"
|
||||
// this will never be revealed :meowlien:
|
||||
|
@ -25,10 +29,15 @@ const nukeColors = "navy";
|
|||
</head>
|
||||
<body>
|
||||
<h1>Astro 2</h1>
|
||||
<a href="/about">second page idk</a>
|
||||
<a href="/blog">Cool blog</a>
|
||||
<Navigation />
|
||||
<p>The nukes are {nuclearLaunchCodes}</p>
|
||||
<p id="nukes">The actual code is {actualLaunchCodes.map((code) => <pre>{code}</pre> )}</p>
|
||||
{actualLaunchCodes.length >= 6 && <p>Enough codes to obliterate humanity</p>}
|
||||
<Footer />
|
||||
<h3>
|
||||
Socials
|
||||
</h3>
|
||||
<Social platform="GitHub" username="nin0-dev" />
|
||||
<Button />
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue