added friends
This commit is contained in:
parent
fb4b3c0959
commit
e269cf76b1
3 changed files with 64 additions and 0 deletions
38
src/components/friend-card.astro
Normal file
38
src/components/friend-card.astro
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
---
|
||||||
|
interface Props {
|
||||||
|
name: string;
|
||||||
|
linkUri: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { name, linkUri } = Astro.props;
|
||||||
|
|
||||||
|
function extractInitials(name: string) {
|
||||||
|
// Split the name into words
|
||||||
|
const words = name.split(" ");
|
||||||
|
|
||||||
|
// Iterate over the words and extract the initials
|
||||||
|
const initials = words.map((word) => word.charAt(0).toUpperCase()).join("");
|
||||||
|
|
||||||
|
return initials;
|
||||||
|
}
|
||||||
|
|
||||||
|
const initials = extractInitials(name);
|
||||||
|
const linkLabel = linkUri.replace(/^https?:\/\//, "");
|
||||||
|
---
|
||||||
|
|
||||||
|
<li class="py-2">
|
||||||
|
<a
|
||||||
|
href={linkUri}
|
||||||
|
target="_blank"
|
||||||
|
class="hover:bg-gray-500 transition-all duration-200 flex items-center rounded-lg p-2"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="rounded-full flex-shrink-0 mr-4 w-10 h-10 bg-sky-900 text-white flex items-center justify-center text-lg font-medium"
|
||||||
|
>{initials}</span
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<p class="font-bold">{name}</p>
|
||||||
|
<p class="">{linkLabel}</p>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
24
src/components/friends.astro
Normal file
24
src/components/friends.astro
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
---
|
||||||
|
import FriendCard from "./friend-card.astro";
|
||||||
|
---
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h1 class="text-4xl font-bold mb-4">Friends</h1>
|
||||||
|
<p class="text-lg text-justify">
|
||||||
|
Folks I worked with, or I like what they do.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ul
|
||||||
|
class="mt-4 grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4"
|
||||||
|
>
|
||||||
|
<FriendCard name="Jamie Bishop" linkUri="https://jamiebi.shop" />
|
||||||
|
<FriendCard name="Ayden Panhuyzen" linkUri="https://ayden.dev" />
|
||||||
|
<FriendCard name="Corbin Crutchley" linkUri="https://crutchcorn.dev" />
|
||||||
|
<FriendCard name="James Fenn" linkUri="https://jfenn.me" />
|
||||||
|
<FriendCard name="Alex Dueppen" linkUri="https://ajd.sh" />
|
||||||
|
<FriendCard name="Peter Soboyejo" linkUri="https://petersoboyejo.com" />
|
||||||
|
<FriendCard name="Alexandre Wagner" linkUri="https://wagnerwave.com" />
|
||||||
|
<FriendCard name="Aidan Follestad" linkUri="https://af.codes" />
|
||||||
|
<FriendCard name="Victor Simon" linkUri="https://simonvictor.com" />
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
@ -4,6 +4,7 @@ import Hero from "../components/hero.astro";
|
||||||
import Whoami from "../components/whoami.astro";
|
import Whoami from "../components/whoami.astro";
|
||||||
import Www from "../components/www.astro";
|
import Www from "../components/www.astro";
|
||||||
import Talks from "../components/talks.astro";
|
import Talks from "../components/talks.astro";
|
||||||
|
import Friends from "../components/friends.astro";
|
||||||
---
|
---
|
||||||
|
|
||||||
<Page>
|
<Page>
|
||||||
|
|
@ -13,6 +14,7 @@ import Talks from "../components/talks.astro";
|
||||||
<div class="my-16 space-y-32">
|
<div class="my-16 space-y-32">
|
||||||
<Www />
|
<Www />
|
||||||
<Talks />
|
<Talks />
|
||||||
|
<Friends />
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</Page>
|
</Page>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue