added socials
This commit is contained in:
parent
af797ba515
commit
161e28d5f3
8 changed files with 72 additions and 0 deletions
8
src/components/Contacts.astro
Normal file
8
src/components/Contacts.astro
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
import Social from "./Social.astro"
|
||||
|
||||
const contacts = await Astro.glob("../../info/contacts/*.md")
|
||||
---
|
||||
<ul>
|
||||
{contacts.map(contact => <Social platform={contact.frontmatter.platform} url={contact.frontmatter.url} name={contact.frontmatter.name} note={contact.frontmatter.note}/>)}
|
||||
</ul>
|
16
src/components/GroupBox.astro
Normal file
16
src/components/GroupBox.astro
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
const {name} = Astro.props
|
||||
---
|
||||
|
||||
<style>
|
||||
fieldset {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 0px;
|
||||
padding: 0px 15px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<fieldset>
|
||||
<legend>{name}</legend>
|
||||
<slot />
|
||||
</fieldset>
|
16
src/components/Social.astro
Normal file
16
src/components/Social.astro
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
const {platform, name, url, note} = Astro.props;
|
||||
---
|
||||
|
||||
<style>
|
||||
bl {
|
||||
font-weight: 500;
|
||||
}
|
||||
it {
|
||||
font-style: italic;
|
||||
}
|
||||
</style>
|
||||
|
||||
<li>
|
||||
<bl>{platform}</bl>: {url ? <a href={url}>{name}</a> : name}{note && <it> ({note})</it>}
|
||||
</li>
|
|
@ -6,6 +6,9 @@ const {title, showClose, maxWidth} = Astro.props
|
|||
#window {
|
||||
max-width: var(--maxWidth);
|
||||
}
|
||||
.window-body {
|
||||
padding: 20px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="background" id="window">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue