Skip to content

Commit

Permalink
fix: repair tabbing and outline highlight (UEK-i-team#45)
Browse files Browse the repository at this point in the history
* fix: repair bad looking outlines
* fix: disable tabbing on sidebar when its hidden
* feature: create custom outline highlight
  • Loading branch information
TheWoxPL authored Mar 11, 2024
1 parent b481753 commit 586f5ee
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 27 deletions.
22 changes: 17 additions & 5 deletions src/assets/styles/baseStyles.scss
Original file line number Diff line number Diff line change
@@ -1,26 +1,38 @@
@import '../../assets/styles/theme';

@font-face {
font-family: 'Helvetica', sans-serif;
}

*,*::before, *::after {
*,
*::before,
*::after {
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

html{
:focus-visible {
outline-style: outset;
outline-color: $pink_100;
outline-width: 3px;
border-radius: 3px;
outline-offset: 2px;
}

html {
font-size: 62.5%;
scroll-behavior: smooth;
}

body{
body {
font-family: 'Helvetica', sans-serif;
font-size: 1.6rem;
margin: 0;
margin: 0;
background-size: cover;
background-repeat: repeat-y;
height: 100vh;
transition: background-image .5s ease;
transition: background-image 0.5s ease;
}

@media (min-width: 768px) {
Expand Down
2 changes: 2 additions & 0 deletions src/assets/styles/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ $white_100_75: rgba(255, 255, 255, 0.75);

$pink_50: #f9dbfb;

$pink_100: #fa75ff;

$violet_50: #d7cffc;

$violet_80: #140d19;
Expand Down
18 changes: 9 additions & 9 deletions src/components/Footer/Footer.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,25 @@
}

.containerIconsLight {
height: 100%;
display: flex;
gap: 7px;
padding-top: 5px;

a * {
position: relative;
display: flex;
width: 20px;
margin-top: 5px;
margin-right: 7px;
}
}

.containerIconsDark {
height: 100%;
display: flex;
gap: 7px;
padding-top: 5px;

a * {
filter: invert(100%);
position: relative;
display: flex;
width: 20px;
margin-top: 5px;
margin-right: 7px;
filter: invert(100%);
}
}

Expand Down
40 changes: 29 additions & 11 deletions src/components/SidebarMenu/SidebarMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,31 @@ export const SidebarMenu = ({ isVisible, onToggle }) => {
: containerHiddenLight
}
>
<button className={close} onClick={onToggle}>
<button
className={close}
onClick={onToggle}
tabIndex={isVisible ? 0 : -1}
>
<CloseSVG />
</button>
<div className={menu}>
<div className={menuItem}>
<Link to="/">{t('home')}</Link>
<Link to="/" tabIndex={isVisible ? 0 : -1}>
{t('home')}
</Link>
</div>
<div
onClick={handleToggleProjects}
className={areProjectsVisible ? menuItemProjects : menuItem}
>
<button>
<button tabIndex={isVisible ? 0 : -1}>
<CaronSVG
className={areProjectsVisible ? caronItem : caronItemRotated}
/>
<span>
<Link to="/">{t('projects')}</Link>
<Link to="/" tabIndex={isVisible ? 0 : -1}>
{t('projects')}
</Link>
</span>
</button>
</div>
Expand All @@ -91,7 +99,9 @@ export const SidebarMenu = ({ isVisible, onToggle }) => {
>
<div className={menuItemDecoration}></div>
<span>
<Link to="/">{t('navMap')}</Link>
<Link to="/" tabIndex={isVisible ? 0 : -1}>
{t('navMap')}
</Link>
</span>
</div>
<div
Expand All @@ -101,25 +111,33 @@ export const SidebarMenu = ({ isVisible, onToggle }) => {
>
<div className={menuItemDecoration}></div>
<span>
<Link to="/">{t('secretProject')}</Link>
<Link to="/" tabIndex={isVisible ? 0 : -1}>
{t('secretProject')}
</Link>
</span>
</div>
</div>
<div className={menuItem}>
<Link to="/news/">{t('news')}</Link>
<Link to="/news/" tabIndex={isVisible ? 0 : -1}>
{t('news')}
</Link>
</div>
<div className={menuItem}>
<Link to="/">{t('joinUs')}</Link>
<Link to="/" tabIndex={isVisible ? 0 : -1}>
{t('joinUs')}
</Link>
</div>
<div className={menuItem}>
<Link to="/">{t('contact')}</Link>
<Link to="/" tabIndex={isVisible ? 0 : -1}>
{t('contact')}
</Link>
</div>
</div>
<div className={socialMedia}>
<a href={GITHUB_LINK}>
<a href={GITHUB_LINK} tabIndex={isVisible ? 0 : -1}>
<GithubSVG />
</a>
<a href={FACEBOOK_LINK}>
<a href={FACEBOOK_LINK} tabIndex={isVisible ? 0 : -1}>
<FacebookSVG />
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/SidebarMenu/SidebarMenu.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@
padding: 0px 24px;
height: 200px;
height: 40px;
gap: 12px;
a * {
display: block;
margin-right: 12px;
filter: invert(100%);
height: 100%;
max-width: 40px;
Expand Down Expand Up @@ -219,9 +219,9 @@
padding: 0px 24px;
height: 200px;
height: 40px;
gap: 12px;
a * {
display: block;
margin-right: 12px;
filter: invert(100%);
height: 100%;
max-width: 40px;
Expand Down

0 comments on commit 586f5ee

Please sign in to comment.