Skip to content

Commit ecac70f

Browse files
committed
feat(socials): add socials from config file to /
1 parent 02377b2 commit ecac70f

File tree

4 files changed

+48
-3
lines changed

4 files changed

+48
-3
lines changed

src/components/LastFMWidget.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<div class="wrapper flex">
1111
{#if data.track}
1212
{#if data.track.image[3]}
13-
<img src={data.track.image[3].uri} alt={`Cover for ${data.track.name}`} />
13+
<img src={data.track.image[3].uri} alt="" />
1414
{/if}
1515

1616
<div class="info flex">

src/components/Socials.astro

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
import { Icon } from "astro-icon";
3+
const { default: socials } = await import("../../config/socials.json");
4+
---
5+
6+
<div class="wrapper flex">
7+
{
8+
socials.map((item) => (
9+
<a href={item.link} target="_blank" aria-label={item.name}>
10+
<Icon alt={`Logo for ${item.name}`} name={item.icon} />
11+
</a>
12+
))
13+
}
14+
</div>
15+
16+
<style lang="scss">
17+
.wrapper {
18+
--gap: 0.5em;
19+
20+
width: 100%;
21+
height: 100%;
22+
justify-content: space-between;
23+
align-items: center;
24+
25+
a {
26+
color: hsl(var(--clr-white));
27+
transition: color 0.2s ease-in-out;
28+
display: grid;
29+
place-items: center;
30+
height: 2.5em;
31+
width: 2.5em;
32+
33+
&:hover {
34+
color: hsl(var(--clr-primary));
35+
}
36+
}
37+
}
38+
</style>

src/layouts/BaseLayout.astro

+4
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,16 @@ const { title = "new.midka.dev", class: className }: Props = Astro.props;
3939
.noise-container {
4040
position: relative;
4141
isolation: isolate;
42+
display: flex;
43+
align-items: center;
44+
justify-content: center;
4245
/* background-color: hsl(var(--clr-background)); */
4346
}
4447

4548
.noise-underlay {
4649
z-index: -2;
4750
position: relative;
51+
width: 100%;
4852
}
4953

5054
.noise {

src/pages/index.astro

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
import LastFMWidget from "../components/LastFMWidget.svelte";
3+
import Socials from "../components/Socials.astro";
34
import BaseLayout from "../layouts/BaseLayout.astro";
45
import { LastFMClient } from "../lib/LastFM.client";
56
import "../styles/global.css";
@@ -22,15 +23,17 @@ const lastFMData = {
2223
</section>
2324
<section class="about noise-container">
2425
<div class="noise"></div>
25-
<div class="noise-underlay">About Me</div>
26+
<div class="noise-underlay">Hi! I'm Midka</div>
2627
</section>
2728
<section class="something noise-container">
2829
<div class="noise"></div>
2930
<div class="noise-underlay">Something</div>
3031
</section>
3132
<section class="socials noise-container">
3233
<div class="noise"></div>
33-
<div class="noise-underlay">Socials</div>
34+
<div class="noise-underlay">
35+
<Socials />
36+
</div>
3437
</section>
3538
<section class="project1 noise-container">
3639
<div class="noise"></div>

0 commit comments

Comments
 (0)