feat: create and style components

This commit is contained in:
Ruidy 2024-12-31 09:23:48 +01:00
parent 0c86d20738
commit e25d4c5d14
No known key found for this signature in database
GPG key ID: E00F51288CB857CC
2 changed files with 38 additions and 3 deletions

View file

@ -1,8 +1,29 @@
---
const platform = "GitHub"
const username = "rjNemo"
import Social from "./Social.astro"
const platforms = [
{
platform: "GitHub",
username: "rjNemo",
},{
platform: "LinkedIn",
username: "ruidy-nemausat",
}
]
const url = `https://ruidy.nemausat.com`
---
<footer>
<p>© 2023 Ruidy Learn more about my projects on <a href={`https://github.com/${username}`}>{platform}</a> and my <a href={url}>website</a>.</p>
<p>© 2023 Ruidy</p>
{platforms.map(platform => (
<Social platform={platform.platform} username={platform.username}/>
))}
<a href={url}>website</a>
</footer>
<style>
footer {
display: flex;
gap: 1rem;
margin-top: 2rem;
}
</style>

View file

@ -0,0 +1,14 @@
---
const { platform, username } = Astro.props
---
<a href={`https://www.${platform}.com/${username}`}>{platform}</a>
<style>
a {
padding: 0.5rem 1rem;
color: white;
background-color: #4c1d95;
text-decoration: none;
}
</style>