Skip to content

Commit

Permalink
refactor: Run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
steezplusplus committed Sep 9, 2023
1 parent a921ec0 commit 383b045
Show file tree
Hide file tree
Showing 39 changed files with 391 additions and 245 deletions.
1 change: 1 addition & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- downgrade typescript to 5.1.0 compatability issue with eslint

- Why not use <details> element for the accordion?

- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details

- Typography package on blog posts?: https://tailwindcss.com/docs/typography-plugin
Expand Down
16 changes: 12 additions & 4 deletions app/_components/arrowLink/ArrowLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,26 @@ import { faArrowAltCircleRight } from '@fortawesome/free-regular-svg-icons';
export type ArrowLinkProps = {
href: string;
title: string;
}
};

export function ArrowLink(props: ArrowLinkProps) {
const { href, title } = props;
return (
<li className="flex flex-row items-center rounded border border-white">
<Link className="group px-4 py-2 text-xl text-white hover:underline" href={href}>
<Link
className="group px-4 py-2 text-xl text-white hover:underline"
href={href}
>
<span className="flex items-center gap-x-2">
{title}
<FontAwesomeIcon className="group-hover:translate-x-1 group-focus:translate-x-1" icon={faArrowAltCircleRight} color="white" size="sm" />
<FontAwesomeIcon
className="group-hover:translate-x-1 group-focus:translate-x-1"
icon={faArrowAltCircleRight}
color="white"
size="sm"
/>
</span>
</Link>
</li>
);
}
}
5 changes: 3 additions & 2 deletions app/_components/footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ export function Footer() {
<ul className="flex h-full flex-col items-center justify-center px-4 text-sm sm:flex-row sm:justify-between sm:px-6 lg:px-8">
<li>
<p>
&copy; {new Date().getFullYear()} Accessible Web Components. <i>Supporting resources to make the web accessible</i>.
&copy; {new Date().getFullYear()} Accessible Web Components.{' '}
<i>Supporting resources to make the web accessible</i>.
</p>
</li>
<li className="ml-auto mr-2">
Expand All @@ -27,4 +28,4 @@ export function Footer() {
</li>
</ul>
);
}
}
6 changes: 4 additions & 2 deletions app/_components/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ export function Header() {
<header className="flex h-full items-center justify-center bg-gradient-to-r from-emerald-900 to-emerald-500">
<ul className="flex flex-col gap-y-8 p-8">
<li>
<h2 className="text-7xl leading-tight text-white">Making the web a better place through accessible software.</h2>
<h2 className="text-7xl leading-tight text-white">
Making the web a better place through accessible software.
</h2>
</li>
<li>
<ul className="flex flex-row items-center gap-x-8">
Expand All @@ -16,4 +18,4 @@ export function Header() {
</ul>
</header>
);
}
}
4 changes: 2 additions & 2 deletions app/_components/navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ export function Navbar() {
<li className="ml-3">
<NavLink href="/blog" name="Blog" />
</li>
</ul >
</ul>
);
}
}
10 changes: 7 additions & 3 deletions app/_components/navbar/navLink/NavLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Link from 'next/link';
export type NavLinkProps = {
href: string;
name: string;
}
};

export function NavLink(props: NavLinkProps) {
const { href, name } = props;
Expand All @@ -23,9 +23,13 @@ export function NavLink(props: NavLinkProps) {
}

return (
<Link className="group text-black transition duration-300" href={href} aria-current={ariaCurrent}>
<Link
className="group text-black transition duration-300"
href={href}
aria-current={ariaCurrent}
>
{name}
<span className="block h-0.5 max-w-0 bg-black transition-all duration-700 group-aria-[current=page]:max-w-full" />
</Link>
);
}
}
4 changes: 2 additions & 2 deletions app/_styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('../../assets/fonts/OpenSans-Variable.ttf') format('truetype-variations');
src: url('../../assets/fonts/OpenSans-Variable.ttf')
format('truetype-variations');
}

:root {
font-size: 1rem;
font-family: 'Open Sans'; /* TODO Does this belong in @layer base? */
}
}

8 changes: 4 additions & 4 deletions app/_styles/layout.module.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.layout {
@apply h-screen grid;
@apply grid h-screen;
grid-template:
"navbar" 3.5rem
"main" 1fr
"footer" 2.5rem;
'navbar' 3.5rem
'main' 1fr
'footer' 2.5rem;
}

.layout > navbar {
Expand Down
35 changes: 21 additions & 14 deletions app/about/_components/about/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,39 @@ export function About() {
<article className="prose mx-auto my-8 sm:prose-sm md:prose-base lg:prose-lg xl:prose-xl">
<h2>What is Accessible Web Components?</h2>
<p>
A blog trying to make web accessability become more accessible knowledge.
A blog trying to make web accessability become more accessible
knowledge.
</p>

<h2>Why?</h2>
<p>
According to a <Link href={webAimURL}>2023 report by WebAIM</Link>, the accessibility of the internet for individuals with disabilities stands at a mere 3.7%.
While the a11y community has made great strides in the recent years, adoption is slow for many reasons.
In particular, lack of awareness of WCAG and ADA is low across the software industry.
According to a <Link href={webAimURL}>2023 report by WebAIM</Link>, the
accessibility of the internet for individuals with disabilities stands
at a mere 3.7%. While the a11y community has made great strides in the
recent years, adoption is slow for many reasons. In particular, lack of
awareness of WCAG and ADA is low across the software industry.
</p>
<p>
In addition to this, some people perceive accessibility as a complex and daunting task.
This misconception arises from a lack of definitive and information rich resources for people learn.
As of late, <Link href={ariaApgURL}>Aria APG</Link> and <Link href={openUiURL}>OpenUI</Link> have made amazing strides in educating best practices for a11y.
In addition to this, some people perceive accessibility as a complex and
daunting task. This misconception arises from a lack of definitive and
information rich resources for people learn. As of late,{' '}
<Link href={ariaApgURL}>Aria APG</Link> and{' '}
<Link href={openUiURL}>OpenUI</Link> have made amazing strides in
educating best practices for a11y.
</p>
<p>
This website serves as my humble contribution to the web development community, and to express gratitude towards those who have taught me invaluable lessons.
It is my hope that my blog posts can help simplify the mental modal required for building accessible UI, while using OpenUI and Aria APG as my resources.
This website serves as my humble contribution to the web development
community, and to express gratitude towards those who have taught me
invaluable lessons. It is my hope that my blog posts can help simplify
the mental modal required for building accessible UI, while using OpenUI
and Aria APG as my resources.
</p>

<h2>Who are you?</h2>
<p>
I&apos;m Jesse, a software engineer.
</p>
<p>I&apos;m Jesse, a software engineer.</p>
<p>
Feel free to contact me on <Link href={LinkedInURL}>LinkedIn</Link>.
</p>
</article >
</article>
);
}
}
6 changes: 2 additions & 4 deletions app/about/_components/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ export function Header() {
return (
<header className="bg-gradient-to-r from-emerald-900 to-emerald-500">
<div className="flex flex-col gap-y-2 p-8">
<h2 className="text-7xl leading-tight text-white">
About the project
</h2>
<h2 className="text-7xl leading-tight text-white">About the project</h2>
<p className="text-white">In question-answer format</p>
</div>
</header>
);
}
}
4 changes: 2 additions & 2 deletions app/blog/_components/article/Article.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ export function Article(props: ArticleProps) {
</Link>
</h2>
<p className="font-light">{description}</p>
</li >
</li>
);
}
}
4 changes: 2 additions & 2 deletions app/blog/_components/disclosure/Disclosure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
export type DisclosureProps = {
label: string;
handleClick: () => void;
}
};

export function Disclosure(props: DisclosureProps) {
const { label, handleClick } = props;
Expand All @@ -15,4 +15,4 @@ export function Disclosure(props: DisclosureProps) {
{label}
</button>
);
}
}
6 changes: 4 additions & 2 deletions app/blog/_components/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ export function Header() {
<h1 className="text-7xl leading-tight text-white">Blog</h1>
</li>
<li>
<h2 className="text-white">Learn a11y and frontend dev with these articles</h2>
<h2 className="text-white">
Learn a11y and frontend dev with these articles
</h2>
</li>
</ul>
</header>
);
}
}
18 changes: 13 additions & 5 deletions app/blog/_components/pagination/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,26 @@ export function Pagination() {
<nav className="mt-6" role="navigation" aria-label="Pagination Navigation">
<ul className="flex flex-row items-center justify-center gap-x-4">
<li>
<Link href="#" aria-label="Goto Page 1">1</Link>
<Link href="#" aria-label="Goto Page 1">
1
</Link>
</li>
<li>
<Link href="#" aria-label="Goto Page 2">2</Link>
<Link href="#" aria-label="Goto Page 2">
2
</Link>
</li>
<li>
<Link href="#" aria-label="Goto Page 3">3</Link>
<Link href="#" aria-label="Goto Page 3">
3
</Link>
</li>
<li>
<Link href="#" aria-label="Goto Page 4">4</Link>
<Link href="#" aria-label="Goto Page 4">
4
</Link>
</li>
</ul>
</nav>
);
}
}
8 changes: 5 additions & 3 deletions app/blog/_components/tag/Tag.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
export type TagProps = {
displayText: string;
}
};

export function Tag(props: TagProps) {
const { displayText } = props;
return (
<span className="rounded-md border border-solid px-1 text-sm">{displayText}</span>
<span className="rounded-md border border-solid px-1 text-sm">
{displayText}
</span>
);
}
}
Loading

0 comments on commit 383b045

Please sign in to comment.