Skip to content

Commit 4b29d9b

Browse files
authored
Merge pull request #4 from yoanbernabeu/1-icons-for-social-networks
Draft: 📦 NEW: Add Social Icon Link
2 parents bf3eeb5 + 3e08117 commit 4b29d9b

18 files changed

Lines changed: 550 additions & 20 deletions

README.md

Lines changed: 54 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Feel free to use it as a template for your own projects.
1010

1111
## 👀 Demo
1212

13-
You can see a demo of the project at [https://go.yoandev.co](https://go.yoandev.co/)
13+
You can see a demo of the project at [https://linktreefreeclone.yoandev.co/](https://linktreefreeclone.yoandev.co/)
1414

1515
## 🚀 Quick start
1616

@@ -23,11 +23,15 @@ You can see a demo of the project at [https://go.yoandev.co](https://go.yoandev.
2323
Create a new file in `src/pages/links/` for each link you want to add.
2424
The file name will be not used, but it is recommended to use a descriptive name.
2525
The file should contain a frontmatter section with the following variables:
26-
* `title`: The title of the link
27-
* `emoji`: The emoji to use for the link
28-
* `href`: The URL of the link
26+
27+
* `title`: The title of the link
28+
29+
* `emoji`: The emoji to use for the link
30+
31+
* `href`: The URL of the link
2932

3033
Example:
34+
3135
```md
3236
---
3337

@@ -42,6 +46,52 @@ You can see a demo of the project at [https://go.yoandev.co](https://go.yoandev.
4246

4347
Replace the file `src/public/avatar.png` with your own avatar.
4448

49+
4. **Customize your social media links**
50+
51+
Create a new file in `src/pages/social/` for each social media link you want to add.
52+
The file name will be not used, but it is recommended to use a descriptive name.
53+
The file should contain a frontmatter section with the following variables:
54+
55+
* `icon`: The icon to use for the link
56+
57+
* `url`: The URL of the link
58+
59+
Example:
60+
61+
```md
62+
---
63+
icon: linkedin
64+
url: https://linkedin.com/in/yoan-bernabeu
65+
66+
---
67+
```
68+
69+
## 🔠 List of available icons for social media
70+
71+
For the `icon` variable in the frontmatter section of the social media links, you can use the following values:
72+
73+
* `behance`
74+
* `discord`
75+
* `github`
76+
* `facebook`
77+
* `instagram`
78+
* `google`
79+
* `linkedin`
80+
* `pinterest`
81+
* `vkontakte`
82+
* `stackoverflow`
83+
* `telegram`
84+
* `youtube`
85+
* `tiktok`
86+
* `snapchat`
87+
* `slack`
88+
* `messenger`
89+
* `dribbble`
90+
* `reddit`
91+
* `twitter`
92+
* `whatsapp`
93+
* `twitch`
94+
4595
## 🧞 Commands
4696

4797
All commands are run from the root of the project, from a terminal:

public/avatar.png

-15.8 KB
Loading

readme.png

-48.1 KB
Loading

src/components/Footer.astro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ const { title, tagline } = Astro.props;
1212
<p class="text-center text-base text-gray-400">
1313
&copy; 2022 {title}. {tagline}
1414
</p>
15+
<p class="text-center text-base text-gray-400">
16+
Make with <a href="https://github.com/yoanbernabeu/LinkTreeFreeClone" class="text-indigo-600">LinkTreeFreeClone</a>
17+
</p>
1518
</div>
1619
</div>
1720
</footer>

src/components/Header.astro

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
---
2+
import Social from './Social.astro';
3+
24
export interface Props {
35
subtitle: string;
46
title: string;
57
tagline: string;
68
}
79
810
const { subtitle, title, tagline } = Astro.props;
11+
const socials = await Astro.glob("./../pages/socials/*.md");
912
---
1013

1114
<div>
12-
<div class="mx-auto max-w-7xl py-16 px-4 sm:py-24 sm:px-6 lg:px-8">
15+
<div class="mx-auto max-w-7xl py-16 px-4 sm:py-10 sm:px-6 lg:px-8">
1316
<div class="text-center">
1417

1518
<img class="mx-auto h-40 w-40 rounded-full xl:h-56 xl:w-56" src="avatar.png" alt="">
@@ -25,7 +28,10 @@ const { subtitle, title, tagline } = Astro.props;
2528
<p class="mx-auto mt-5 max-w-xl text-xl text-gray-500">
2629
{tagline}
2730
</p>
28-
31+
32+
<Social
33+
socials={socials}
34+
/>
2935
</div>
3036
</div>
3137
</div>

0 commit comments

Comments
 (0)