migrate to astro #1
4 changed files with 30 additions and 0 deletions
9
src/components/Button.astro
Normal file
9
src/components/Button.astro
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
const {position, text, url, id} = Astro.props;
|
||||||
|
---
|
||||||
|
<style>
|
||||||
|
button, a {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
{url ? <a href={url}><button id={id}>{text}</button></a> : <button id={id}>{text}</button>}
|
10
src/components/ButtonCollection.astro
Normal file
10
src/components/ButtonCollection.astro
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<style>
|
||||||
|
div {
|
||||||
|
display: grid;
|
||||||
|
grid-auto-flow: column;
|
||||||
|
grid-auto-columns: 1fr;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="button-collection">
|
||||||
|
<slot />
|
||||||
|
</div>
|
|
@ -4,6 +4,9 @@ import GroupBox from "../components/GroupBox.astro";
|
||||||
import Me from "../components/Me.astro";
|
import Me from "../components/Me.astro";
|
||||||
import Presence from "../components/Presence.astro";
|
import Presence from "../components/Presence.astro";
|
||||||
import Window from "../components/Window.astro";
|
import Window from "../components/Window.astro";
|
||||||
|
import Button from "./Button.astro";
|
||||||
|
import ButtonCollection from "./ButtonCollection.astro";
|
||||||
|
import Spacer from "./Spacer.astro";
|
||||||
---
|
---
|
||||||
<Window title="Home" maxWidth="600px">
|
<Window title="Home" maxWidth="600px">
|
||||||
<Me />
|
<Me />
|
||||||
|
@ -18,4 +21,11 @@ import Window from "../components/Window.astro";
|
||||||
<GroupBox name="Reach out">
|
<GroupBox name="Reach out">
|
||||||
<Contacts />
|
<Contacts />
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
<ButtonCollection>
|
||||||
|
<Button position="left" text="Projects (soon)" url="/projects"/>
|
||||||
|
<Spacer />
|
||||||
|
<Button position="left" text="Code (soon)" url="/code"/>
|
||||||
|
<Spacer />
|
||||||
|
<Button position="left" text="Blog (ETA: 100 years)" url="/code"/>
|
||||||
|
</ButtonCollection>
|
||||||
</Window>
|
</Window>
|
||||||
|
|
1
src/components/Spacer.astro
Normal file
1
src/components/Spacer.astro
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<span />
|
Loading…
Reference in a new issue