Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip: update links to have same animation on keypress as mouse hover #46

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/BottomLinks.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const { previousLink, previousLinkText, nextLink, nextLinkText } = Astro.props;
class="border-t-2 border-blue-light border-solid flex flex-wrap mt-24 w-full"
>
<a
class="border-r-2 border-blue-light border-solid flex-1 font-bold p-4 lg:p-12 w-1/2 hover:bg-blue-light"
class="border-r-2 border-blue-light border-solid flex-1 font-bold p-4 lg:p-12 w-1/2 hover:bg-blue-light focus:bg-blue-light"
href={previousLink}
>
<span class="text-navy text-sm lg:text-xl"> Previous</span>
Expand All @@ -24,7 +24,7 @@ const { previousLink, previousLinkText, nextLink, nextLinkText } = Astro.props;
</a>

<a
class="flex-1 font-bold p-4 lg:p-12 w-1/2 hover:bg-blue-light"
class="flex-1 font-bold p-4 lg:p-12 w-1/2 hover:bg-blue-light focus:bg-blue-light"
href={nextLink}
>
<span class="text-navy text-sm lg:text-xl">Next Up</span>
Expand Down
3 changes: 2 additions & 1 deletion src/components/RecentBlogPosts.astro
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ const { posts } = Astro.props;
@apply text-navy;
}

&:hover {
&:hover,
&:focus {
@apply text-red;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
letter-spacing: 1px;
padding: 10px 20px 10px 10px;

&:hover {
&:hover, &:focus {
@apply cursor-pointer text-navy;
box-shadow: inset 0 -2px var(--navy);
}
Expand Down
99 changes: 49 additions & 50 deletions src/components/WaveFooter.astro
Original file line number Diff line number Diff line change
Expand Up @@ -116,33 +116,27 @@ const year = new Date().getFullYear();
class="flex flex-wrap items-center justify-center w-full lg:justify-start"
>
<div class="flex justify-center w-full lg:justify-start">
<div class="social-links flex items-center pl-2 pr-2 justify-start">
<div class="flex items-center pl-2 pr-2 justify-start">
<a
aria-label="GitHub"
class="p-2"
class="p-2 github-logo"
href="https://github.com/shipshapecode"
>
<div class="github-logo">
<Icon name="github" />
</div>
<Icon name="github" />
</a>
<a
aria-label="Twitter"
class="p-2"
class="p-2 twitter-logo"
href="https://twitter.com/shipshapecode"
>
<div class="twitter-logo">
<Icon name="twitter" />
</div>
<Icon name="twitter" />
</a>
<a
aria-label="LinkedIn"
class="p-2"
class="p-2 linkedin-logo"
href="https://www.linkedin.com/company/ship-shape/"
>
<div class="linkedin-logo">
<Icon name="linkedin" />
</div>
<Icon name="linkedin" />
</a>
</div>
</div>
Expand All @@ -158,60 +152,65 @@ const year = new Date().getFullYear();
<style lang="scss" is:global>
.wave {
@apply bg-navy pt-24;
}
.footer-logo {
path {
fill: var(--white);
stroke: var(--white);
stroke-width: 1.25rem;
}
}

.footer-logo {
path {
fill: var(--white);
stroke: var(--white);
stroke-width: 1.25rem;
.footer-bottom {
a {
@apply font-bold text-white;

&:hover,
&:focus {
@apply text-red-light;
}
}

.footer-bottom {
a {
@apply font-bold text-white;

&:hover {
@apply text-red-light;
.github-logo,
.linkedin-logo,
.twitter-logo {
svg {
path {
@apply transition-colors;
fill: var(--white);
transition-duration: 0.25s;
transition-property: fill;
}
}

.social-links {
&:hover,
&:focus {
svg {
path {
fill: var(--white);
transition-duration: 0.25s;
transition-property: fill;
}

&:hover {
path {
fill: var(--red-light);
}
fill: var(--red-light);
}
}
}
}
}

.github-logo {
svg {
height: 22px;
width: 23px;
}
.github-logo {
svg {
height: 22px;
width: 23px;
}
}

.linkedin-logo {
svg {
height: 20px;
width: 19px;
}
.linkedin-logo {
svg {
height: 20px;
width: 19px;
}
}

.twitter-logo {
svg {
height: 19px;
width: 23px;
}
.twitter-logo {
svg {
height: 19px;
width: 23px;
}
}
</style>
3 changes: 2 additions & 1 deletion src/pages/about.astro
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,8 @@ const description =
}
}

&:hover {
&:hover,
&:focus {
svg {
path {
fill: var(--red-light);
Expand Down
6 changes: 4 additions & 2 deletions src/styles/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ a {
@apply text-red;
}

&:hover {
&:hover,
&:focus {
@apply text-navy;
}
}
Expand Down Expand Up @@ -67,7 +68,8 @@ h6 {
@apply text-navy;
}

&:hover {
&:hover,
&:focus {
@apply cursor-pointer text-red;

svg {
Expand Down
2 changes: 1 addition & 1 deletion src/styles/tailwind/components/blog-tag.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
@apply text-grey-light;
}

.blog-tag:hover {
.blog-tag:hover, .blog-tag:focus {
@apply bg-navy text-white;
}
2 changes: 1 addition & 1 deletion src/styles/tailwind/components/buttons.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
@apply !text-white;
}

.btn-white:hover {
.btn-white:hover, .btn-white:focus {
@apply !bg-blue-light !text-navy;
}

Expand Down
4 changes: 2 additions & 2 deletions src/styles/tailwind/components/nav-menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
@apply text-navy;
}

.nav-link:hover {
.nav-link:hover, .nav-link:focus {
@apply text-red-light;
}

Expand All @@ -51,7 +51,7 @@
@apply text-white;
}

.nav-link-alt:hover {
.nav-link-alt:hover, .nav-link-alt:focus {
@apply text-red-light;
}
}