Skip to content

Commit

Permalink
add dynamic profile logo's in
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhonas committed May 13, 2024
1 parent dfc54fd commit cbb03b3
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
const { title, description } = Astro.props['content'];
import resume from '../../resume/resume.clintp.json';
import { Image } from 'astro:assets';
import logoGithub from '../images/logo-social-github.svg'
import logoLinkedIn from '../images/logo-social-linkedin.svg'
const logos = {
github: logoGithub,
linkedin: logoLinkedIn
}
---

<!doctype html>
Expand All @@ -23,9 +33,14 @@ import resume from '../../resume/resume.clintp.json';
<img src="/favicon.svg" class="inline-block w-8 object-cover rounded mr-2"/>
<h1 class="text-lg font-bold">$ ./clintp.xyz</h1>
</a>
<nav class="flex gap-4">
<nav class="flex gap-2">
{ resume.basics.profiles.map(profile => (
<a href={ profile.url } class="hover:underline" rel="noopener" target="_blank">{ profile.network }</a>
<a href={ profile.url } class="hover:animate-spin" rel="noopener" target="_blank">
<Image src={ logos[profile.network.toLowerCase()] }
alt={ profile.network }
class="w-7 h-7 invert"
/>
</a>
))
}
</div>
Expand Down

0 comments on commit cbb03b3

Please sign in to comment.