Skip to content

Commit

Permalink
Add title attributes to anchor tags in Header and Footer components
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-Liendo committed Jan 24, 2024
1 parent 46a7a55 commit 8e76830
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/lib/components/Footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<div class="flex justify-center">
<small
><a
title="Source code"
class="underline"
href="https://github.com/Michael-Liendo/michaelliendo.com"
>Source code</a
Expand Down
30 changes: 23 additions & 7 deletions src/lib/components/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -79,26 +79,42 @@
class="hidden sm:flex text-xl items-center sm:space-x-10 md:space-x-16 px-10 py-2 bg-[#f5f5f5] dark:bg-slate-900 border border-black dark:border-white rounded-full"
>
<li>
<a href="{baseLocaleUrl}/">{$LL.LAYOUT.NAV.HOME()}</a>
<a title="Go to the main page" href="{baseLocaleUrl}/"
>{$LL.LAYOUT.NAV.HOME()}</a
>
</li>
<li>
<a href="{baseLocaleUrl}/notes">{$LL.LAYOUT.NAV.NOTES()}</a>
<a title="Read about Michael's notes" href="{baseLocaleUrl}/notes"
>{$LL.LAYOUT.NAV.NOTES()}</a
>
</li>
<li>
<a href="{baseLocaleUrl}/projects">{$LL.LAYOUT.NAV.PROJECTS()}</a>
<a title="View Michael's Projects" href="{baseLocaleUrl}/projects"
>{$LL.LAYOUT.NAV.PROJECTS()}</a
>
</li>
</ul>
<ul
class="text-xl flex sm:hidden items-center space-x-6 px-5 py-2 bg-[#f5f5f5] dark:bg-slate-900 border border-black dark:border-white rounded-full"
aria-label="Main navigation"
>
<li><a href="{baseLocaleUrl}/" aria-label="Home"><Home /></a></li>
<li>
<a href="{baseLocaleUrl}/notes" aria-label="Notes"><Notebook /></a>
<a title="Go to the main page" href="{baseLocaleUrl}/" aria-label="Home"
><Home /></a
>
</li>
<li>
<a
title="Read about Michael's notes"
href="{baseLocaleUrl}/notes"
aria-label="Notes"><Notebook /></a
>
</li>
<li>
<a href="{baseLocaleUrl}/projects" aria-label="Projects"
><PodiumGold /></a
<a
title="View Michael's Projects"
href="{baseLocaleUrl}/projects"
aria-label="Projects"><PodiumGold /></a
>
</li>
</ul>
Expand Down
3 changes: 3 additions & 0 deletions src/routes/[[lang=lang]]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
{#each data.notes as note, index}
{#if index === 0}
<a
title="Read more about {note.title}"
href={`${baseLocaleUrl}/notes/${note.slug}`}
class="rounded-2xl flex flex-col justify-between w-full h-full bg-[#f5f5f5] dark:bg-slate-900 xl:col-span-2 xl:row-span-2"
itemprop="blogPost"
Expand Down Expand Up @@ -199,6 +200,7 @@
{/if}
{#if index === 1 || index === 4}
<a
title="Read more about {note.title}"
href={`${baseLocaleUrl}/notes/${note.slug}`}
class="rounded-2xl flex flex-col justify-between w-full h-full px-5 py-4 bg-[#f5f5f5] dark:bg-slate-900 xl:col-span-2"
itemprop="blogPost"
Expand Down Expand Up @@ -245,6 +247,7 @@
{/if}
{#if index === 2 || index === 3}
<a
title="Read more about {note.title}"
href={`${baseLocaleUrl}/notes/${note.slug}`}
class="block md:flex rounded-2xl w-full h-full bg-[#f5f5f5] dark:bg-slate-900 xl:col-span-4"
itemprop="blogPost"
Expand Down

0 comments on commit 8e76830

Please sign in to comment.