Skip to content
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
.next
.idea
Comment thread
cherylli marked this conversation as resolved.
node_modules
.env
.DS_Store
Expand Down
1 change: 1 addition & 0 deletions .prettierrc
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
{
"singleQuote": true,
"jsxSingleQuote": true,
"arrowParens": "avoid"
}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,4 +44,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Added

- About page content (first section)

### Fixed

- component file structure

### Changed

- components folder structure
- relative to absolute imports with aliases
40 changes: 0 additions & 40 deletions components/Meta.js

This file was deleted.

20 changes: 10 additions & 10 deletions components/Nav.js
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
import { useState, useEffect, useRef } from 'react';
import Link from 'next/link';
import Image from 'next/image';
import Container from './Container';
import styles from '../styles/Nav.module.scss';
import { linksNav } from '../utils/links';
import { useRouter } from 'next/router';
import Container from '@/components/containers/Container';
import styles from '@/styles/Nav.module.scss';
import { linksNav } from '@/utils/links';

export default function Nav() {
const router = useRouter();
Expand DownExpand Up@@ -45,14 +45,14 @@ export default function Nav() {
<div ref={containerRef}>
<nav className={styles.nav}>
<div className={styles.nav__logo}>
<Link href="/" passHref>
<Link href='/' passHref>
<a>
<Image
src="/images/svg/logo.svg"
src='/images/svg/logo.svg'
height={115}
width={180}
alt="Logo"
title="Go to the Homepage"
alt='Logo'
title='Go to the Homepage'
/>
</a>
</Link>
Expand All@@ -79,12 +79,12 @@ export default function Nav() {
}
})}
<li className={styles.nav__item}>
<Link href="https://webdevpath.slack.com/join/shared_invite/zt-xqqgwwo5-a09BSVWC9ZrHmS6RaMBzVw#/shared-invite/email">
<Link href='https://webdevpath.slack.com/join/shared_invite/zt-xqqgwwo5-a09BSVWC9ZrHmS6RaMBzVw#/shared-invite/email'>
<a
className={`${styles.nav__button} ${
active ? styles.active : ''
}`}
title="Join us"
title='Join us'
>
Join us
</a>
Expand All@@ -96,7 +96,7 @@ export default function Nav() {
active ? styles.active : ''
}`}
onClick={() => setActive(active => !active)}
aria-label="toggle navigation"
aria-label='toggle navigation'
>
<span className={styles.nav__hamburger__bar}></span>
<span className={styles.nav__hamburger__bar}></span>
Expand Down
5 changes: 5 additions & 0 deletions components/Title.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
const Title = ({ title }) => {
return <h2>{title}</h2>;
};

export default Title;
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
import Link from 'next/link';
import btnStyles from '../styles/ButtonLink.module.scss';
import btnStyles from '@/styles/ButtonLink.module.scss';

export default function ButtonLink({
customClassName,
Expand Down
6 changes: 3 additions & 3 deletions components/Card.js → components/containers/Card.js
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
import Image from 'next/image';
import Link from 'next/link';
import styles from '../styles/Card.module.scss';
import styles from '@/styles/Card.module.scss';

export default function Card({
image,
Expand All@@ -17,8 +17,8 @@ export default function Card({
src={image}
alt={altTag}
className={styles.img}
layout="fill"
objectFit="cover"
layout='fill'
objectFit='cover'
/>
</div>
<h2 className={styles.title}>{title}</h2>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,9 +3,9 @@ import { Pagination, Navigation } from 'swiper';
import 'swiper/css';
import 'swiper/css/pagination';
import 'swiper/css/navigation';
import Card from './Card';
import Container from './Container';
import styles from '../styles/CardsColumns.module.scss';
import Card from '@/components/containers/Card';
import Container from '@/components/containers/Container';
import styles from '@/styles/CardsColumns.module.scss';

export default function CardsColumns({
images,
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
import containerStyles from '../styles/Container.module.scss';
import containerStyles from '@/styles/Container.module.scss';

export default function Container({ className, children, styles }) {
return (
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import { useIntersect } from '../hooks/useIntersect';
import styles from '../styles/RevealContainer.module.scss';
import { useIntersect } from '@/hooks/useIntersect';
import styles from '@/styles/RevealContainer.module.scss';

const RevealContentContainer = ({ children }) => {
const [ref, entry] = useIntersect({ threshold: 0.15 });
Expand Down
19 changes: 10 additions & 9 deletions components/TwoColumn.js → components/containers/TwoColumn.js
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
import Image from 'next/image';
import ButtonLink from './ButtonLink';
import Container from './Container';
import styles from '../styles/TwoColumn.module.scss';
import ButtonLink from '@/components/buttons/ButtonLink';
import Container from '@/components/containers/Container';
import styles from '@/styles/TwoColumn.module.scss';

export default function TwoColumn({
image,
Expand DownExpand Up@@ -32,10 +32,12 @@ export default function TwoColumn({
styles={{ flexDirection: rowOrder }}
>
<div className={styles.inner__content}>
<h2 className={styles.title} style={{ color: color }}>
{title}
</h2>
<p className={styles.content}>{content}</p>
{title && (
<h2 className={styles.title} style={{ color: color }}>
{title}
</h2>
)}
<div className={styles.content}>{content}</div>
{link && (
<ButtonLink link={link} customClassName={customBtnClass}>
{linkText}
Expand All@@ -48,8 +50,7 @@ export default function TwoColumn({
src={image}
alt={altTag}
className={styles.img}
layout="fill"
objectFit="cover"
layout='fill'
priority
/>
</div>
Expand Down
10 changes: 5 additions & 5 deletions components/Bracket.js → components/decorations/Bracket.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,14 +3,14 @@ export default function Bracket(props) {

return (
<svg
width="179"
height="366"
viewBox="0 0 179 366"
xmlns="http://www.w3.org/2000/svg"
width='179'
height='366'
viewBox='0 0 179 366'
xmlns='http://www.w3.org/2000/svg'
className={className}
>
<path
d="M124.414 81.1248C124.414 23.5658 96.8124 2.33325e-05 40.1669 1.83804e-05C33.9874 1.78402e-05 28.4258 0.625658 23.8941 1.66838C7.20943 5.63078 1.11774e-07 15.641 -9.27436e-07 27.5282C-2.03957e-06 40.2496 5.76754 47.7573 17.3026 50.8855C19.7745 51.7197 22.4522 52.1368 25.13 52.3453C46.5524 54.8479 54.5857 64.6496 54.5857 89.4667L54.5857 125.754C54.5857 155.993 75.5961 175.179 113.085 179.35L113.085 187.067C75.5961 191.238 54.5857 210.424 54.5857 240.663L54.5857 276.533C54.5857 301.559 46.5523 311.361 25.13 313.655C22.2462 314.072 19.5684 314.697 17.0966 315.115C5.56154 318.451 -2.70171e-05 325.959 -2.8111e-05 338.472C-2.90955e-05 349.733 6.38547 359.535 21.2163 363.706C26.3659 365.166 32.7514 366 40.1668 366C96.8124 366 124.414 342.434 124.414 285.084L124.414 258.598C124.414 234.824 133.066 222.728 155.724 218.349C170.967 215.429 179 205.21 179 183.313C179 163.501 171.173 150.779 155.724 148.068C132.654 143.689 124.414 131.593 124.414 107.819L124.414 81.1248Z"
d='M124.414 81.1248C124.414 23.5658 96.8124 2.33325e-05 40.1669 1.83804e-05C33.9874 1.78402e-05 28.4258 0.625658 23.8941 1.66838C7.20943 5.63078 1.11774e-07 15.641 -9.27436e-07 27.5282C-2.03957e-06 40.2496 5.76754 47.7573 17.3026 50.8855C19.7745 51.7197 22.4522 52.1368 25.13 52.3453C46.5524 54.8479 54.5857 64.6496 54.5857 89.4667L54.5857 125.754C54.5857 155.993 75.5961 175.179 113.085 179.35L113.085 187.067C75.5961 191.238 54.5857 210.424 54.5857 240.663L54.5857 276.533C54.5857 301.559 46.5523 311.361 25.13 313.655C22.2462 314.072 19.5684 314.697 17.0966 315.115C5.56154 318.451 -2.70171e-05 325.959 -2.8111e-05 338.472C-2.90955e-05 349.733 6.38547 359.535 21.2163 363.706C26.3659 365.166 32.7514 366 40.1668 366C96.8124 366 124.414 342.434 124.414 285.084L124.414 258.598C124.414 234.824 133.066 222.728 155.724 218.349C170.967 215.429 179 205.21 179 183.313C179 163.501 171.173 150.779 155.724 148.068C132.654 143.689 124.414 131.593 124.414 107.819L124.414 81.1248Z'
fill={fill}
/>
</svg>
Expand Down
10 changes: 5 additions & 5 deletions components/Stick.js → components/decorations/Stick.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,14 +3,14 @@ export default function Stick(props) {

return (
<svg
width="172"
height="412"
viewBox="0 0 172 412"
xmlns="http://www.w3.org/2000/svg"
width='172'
height='412'
viewBox='0 0 172 412'
xmlns='http://www.w3.org/2000/svg'
className={className}
>
<path
d="M36.5812 412C56.8032 412 68.1638 402.875 74.2985 382.343L169.955 49.0476C171.318 44.4851 172 40.1506 172 34.9037C172 13.9158 157.231 0 134.964 0C115.424 0 103.836 9.80952 97.4742 31.4817L2.04491 364.549C0.908851 368.656 0 373.446 0 378.921C0 397.172 12.9511 412 36.5812 412Z"
d='M36.5812 412C56.8032 412 68.1638 402.875 74.2985 382.343L169.955 49.0476C171.318 44.4851 172 40.1506 172 34.9037C172 13.9158 157.231 0 134.964 0C115.424 0 103.836 9.80952 97.4742 31.4817L2.04491 364.549C0.908851 368.656 0 373.446 0 378.921C0 397.172 12.9511 412 36.5812 412Z'
fill={fill}
/>
</svg>
Expand Down
18 changes: 9 additions & 9 deletions components/Footer.js → components/layout/Footer.js
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
import Link from 'next/link';
import footerStyles from '../styles/Footer.module.scss';
import { linksNav } from '../utils/links';
import NewsletterSubscribe from './mailchimp/NewsletterSubscribe';
import footerStyles from '@/styles/Footer.module.scss';
import { linksNav } from '@/utils/links';
import NewsletterSubscribe from '@/components/mailchimp/NewsletterSubscribe';
import Image from 'next/image';
import Container from './Container';
import Container from '@/components/containers/Container';

export default function Footer() {
return (
<footer className={footerStyles.footer}>
<NewsletterSubscribe />
<Container className={footerStyles.footer__inner}>
<nav className={footerStyles.footer__nav} aria-label="Main">
<nav className={footerStyles.footer__nav} aria-label='Main'>
<ul className={footerStyles.footer__navList}>
{linksNav.map(link => (
<li className={footerStyles.footer__navItem} key={link.text}>
Expand All@@ -21,13 +21,13 @@ export default function Footer() {
))}
</ul>
</nav>
<Link href="/">
<a className={footerStyles.footer__logo} title="Go to the Homepage">
<Link href='/'>
<a className={footerStyles.footer__logo} title='Go to the Homepage'>
<Image
src="/images/svg/logo.svg"
src='/images/svg/logo.svg'
height={250}
width={250}
alt="Logo"
alt='Logo'
/>
</a>
</Link>
Expand Down
12 changes: 6 additions & 6 deletions components/Hero.js → components/layout/Hero.js
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
import { useState } from 'react';
import Image from 'next/image';
import Nav from './Nav';
import Container from './Container';
import styles from '../styles/Hero.module.scss';
import Nav from '@/components/Nav';
import Container from '@/components/containers/Container';
import styles from '@/styles/Hero.module.scss';

export default function Hero({
title,
Expand All@@ -29,9 +29,9 @@ export default function Hero({
src={imgBg}
alt={imgAlt}
className={styles.imageBg}
layout="fill"
objectFit="cover"
objectPosition="center"
layout='fill'
objectFit='cover'
objectPosition='center'
priority
/>
<Container className={styles.header__content}>
Expand Down
10 changes: 5 additions & 5 deletions components/Layout.js → components/layout/Layout.js
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
import { useRouter } from 'next/router';
import { heroOptions } from '../utils/hero-options';
import Hero from './Hero';
import Meta from './Meta';
import Footer from './Footer';
import styles from '../styles/Layout.module.scss';
import { heroOptions } from '@/utils/hero-options';
import Hero from '@/components/layout/Hero';
import Meta from '@/components/layout/Meta';
import Footer from '@/components/layout/Footer';
import styles from '@/styles/Layout.module.scss';

export default function Layout({ children }) {
const router = useRouter();
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Feature/about us first section by cherylli · Pull Request #107 · Web-Dev-Path/web-dev-path · GitHub
Skip to content
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
.next
.idea
Comment thread
cherylli marked this conversation as resolved.
node_modules
.env
.DS_Store
Expand Down
1 change: 1 addition & 0 deletions .prettierrc
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
{
"singleQuote": true,
"jsxSingleQuote": true,
"arrowParens": "avoid"
}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,4 +44,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Added

- About page content (first section)

### Fixed

- component file structure

### Changed

- components folder structure
- relative to absolute imports with aliases
40 changes: 0 additions & 40 deletions components/Meta.js

This file was deleted.

20 changes: 10 additions & 10 deletions components/Nav.js
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
import { useState, useEffect, useRef } from 'react';
import Link from 'next/link';
import Image from 'next/image';
import Container from './Container';
import styles from '../styles/Nav.module.scss';
import { linksNav } from '../utils/links';
import { useRouter } from 'next/router';
import Container from '@/components/containers/Container';
import styles from '@/styles/Nav.module.scss';
import { linksNav } from '@/utils/links';

export default function Nav() {
const router = useRouter();
Expand DownExpand Up@@ -45,14 +45,14 @@ export default function Nav() {
<div ref={containerRef}>
<nav className={styles.nav}>
<div className={styles.nav__logo}>
<Link href="/" passHref>
<Link href='/' passHref>
<a>
<Image
src="/images/svg/logo.svg"
src='/images/svg/logo.svg'
height={115}
width={180}
alt="Logo"
title="Go to the Homepage"
alt='Logo'
title='Go to the Homepage'
/>
</a>
</Link>
Expand All@@ -79,12 +79,12 @@ export default function Nav() {
}
})}
<li className={styles.nav__item}>
<Link href="https://webdevpath.slack.com/join/shared_invite/zt-xqqgwwo5-a09BSVWC9ZrHmS6RaMBzVw#/shared-invite/email">
<Link href='https://webdevpath.slack.com/join/shared_invite/zt-xqqgwwo5-a09BSVWC9ZrHmS6RaMBzVw#/shared-invite/email'>
<a
className={`${styles.nav__button} ${
active ? styles.active : ''
}`}
title="Join us"
title='Join us'
>
Join us
</a>
Expand All@@ -96,7 +96,7 @@ export default function Nav() {
active ? styles.active : ''
}`}
onClick={() => setActive(active => !active)}
aria-label="toggle navigation"
aria-label='toggle navigation'
>
<span className={styles.nav__hamburger__bar}></span>
<span className={styles.nav__hamburger__bar}></span>
Expand Down
5 changes: 5 additions & 0 deletions components/Title.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
const Title = ({ title }) => {
return <h2>{title}</h2>;
};

export default Title;
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
import Link from 'next/link';
import btnStyles from '../styles/ButtonLink.module.scss';
import btnStyles from '@/styles/ButtonLink.module.scss';

export default function ButtonLink({
customClassName,
Expand Down
6 changes: 3 additions & 3 deletions components/Card.js → components/containers/Card.js
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
import Image from 'next/image';
import Link from 'next/link';
import styles from '../styles/Card.module.scss';
import styles from '@/styles/Card.module.scss';

export default function Card({
image,
Expand All@@ -17,8 +17,8 @@ export default function Card({
src={image}
alt={altTag}
className={styles.img}
layout="fill"
objectFit="cover"
layout='fill'
objectFit='cover'
/>
</div>
<h2 className={styles.title}>{title}</h2>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,9 +3,9 @@ import { Pagination, Navigation } from 'swiper';
import 'swiper/css';
import 'swiper/css/pagination';
import 'swiper/css/navigation';
import Card from './Card';
import Container from './Container';
import styles from '../styles/CardsColumns.module.scss';
import Card from '@/components/containers/Card';
import Container from '@/components/containers/Container';
import styles from '@/styles/CardsColumns.module.scss';

export default function CardsColumns({
images,
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
import containerStyles from '../styles/Container.module.scss';
import containerStyles from '@/styles/Container.module.scss';

export default function Container({ className, children, styles }) {
return (
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import { useIntersect } from '../hooks/useIntersect';
import styles from '../styles/RevealContainer.module.scss';
import { useIntersect } from '@/hooks/useIntersect';
import styles from '@/styles/RevealContainer.module.scss';

const RevealContentContainer = ({ children }) => {
const [ref, entry] = useIntersect({ threshold: 0.15 });
Expand Down
19 changes: 10 additions & 9 deletions components/TwoColumn.js → components/containers/TwoColumn.js
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
import Image from 'next/image';
import ButtonLink from './ButtonLink';
import Container from './Container';
import styles from '../styles/TwoColumn.module.scss';
import ButtonLink from '@/components/buttons/ButtonLink';
import Container from '@/components/containers/Container';
import styles from '@/styles/TwoColumn.module.scss';

export default function TwoColumn({
image,
Expand DownExpand Up@@ -32,10 +32,12 @@ export default function TwoColumn({
styles={{ flexDirection: rowOrder }}
>
<div className={styles.inner__content}>
<h2 className={styles.title} style={{ color: color }}>
{title}
</h2>
<p className={styles.content}>{content}</p>
{title && (
<h2 className={styles.title} style={{ color: color }}>
{title}
</h2>
)}
<div className={styles.content}>{content}</div>
{link && (
<ButtonLink link={link} customClassName={customBtnClass}>
{linkText}
Expand All@@ -48,8 +50,7 @@ export default function TwoColumn({
src={image}
alt={altTag}
className={styles.img}
layout="fill"
objectFit="cover"
layout='fill'
priority
/>
</div>
Expand Down
10 changes: 5 additions & 5 deletions components/Bracket.js → components/decorations/Bracket.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,14 +3,14 @@ export default function Bracket(props) {

return (
<svg
width="179"
height="366"
viewBox="0 0 179 366"
xmlns="http://www.w3.org/2000/svg"
width='179'
height='366'
viewBox='0 0 179 366'
xmlns='http://www.w3.org/2000/svg'
className={className}
>
<path
d="M124.414 81.1248C124.414 23.5658 96.8124 2.33325e-05 40.1669 1.83804e-05C33.9874 1.78402e-05 28.4258 0.625658 23.8941 1.66838C7.20943 5.63078 1.11774e-07 15.641 -9.27436e-07 27.5282C-2.03957e-06 40.2496 5.76754 47.7573 17.3026 50.8855C19.7745 51.7197 22.4522 52.1368 25.13 52.3453C46.5524 54.8479 54.5857 64.6496 54.5857 89.4667L54.5857 125.754C54.5857 155.993 75.5961 175.179 113.085 179.35L113.085 187.067C75.5961 191.238 54.5857 210.424 54.5857 240.663L54.5857 276.533C54.5857 301.559 46.5523 311.361 25.13 313.655C22.2462 314.072 19.5684 314.697 17.0966 315.115C5.56154 318.451 -2.70171e-05 325.959 -2.8111e-05 338.472C-2.90955e-05 349.733 6.38547 359.535 21.2163 363.706C26.3659 365.166 32.7514 366 40.1668 366C96.8124 366 124.414 342.434 124.414 285.084L124.414 258.598C124.414 234.824 133.066 222.728 155.724 218.349C170.967 215.429 179 205.21 179 183.313C179 163.501 171.173 150.779 155.724 148.068C132.654 143.689 124.414 131.593 124.414 107.819L124.414 81.1248Z"
d='M124.414 81.1248C124.414 23.5658 96.8124 2.33325e-05 40.1669 1.83804e-05C33.9874 1.78402e-05 28.4258 0.625658 23.8941 1.66838C7.20943 5.63078 1.11774e-07 15.641 -9.27436e-07 27.5282C-2.03957e-06 40.2496 5.76754 47.7573 17.3026 50.8855C19.7745 51.7197 22.4522 52.1368 25.13 52.3453C46.5524 54.8479 54.5857 64.6496 54.5857 89.4667L54.5857 125.754C54.5857 155.993 75.5961 175.179 113.085 179.35L113.085 187.067C75.5961 191.238 54.5857 210.424 54.5857 240.663L54.5857 276.533C54.5857 301.559 46.5523 311.361 25.13 313.655C22.2462 314.072 19.5684 314.697 17.0966 315.115C5.56154 318.451 -2.70171e-05 325.959 -2.8111e-05 338.472C-2.90955e-05 349.733 6.38547 359.535 21.2163 363.706C26.3659 365.166 32.7514 366 40.1668 366C96.8124 366 124.414 342.434 124.414 285.084L124.414 258.598C124.414 234.824 133.066 222.728 155.724 218.349C170.967 215.429 179 205.21 179 183.313C179 163.501 171.173 150.779 155.724 148.068C132.654 143.689 124.414 131.593 124.414 107.819L124.414 81.1248Z'
fill={fill}
/>
</svg>
Expand Down
10 changes: 5 additions & 5 deletions components/Stick.js → components/decorations/Stick.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,14 +3,14 @@ export default function Stick(props) {

return (
<svg
width="172"
height="412"
viewBox="0 0 172 412"
xmlns="http://www.w3.org/2000/svg"
width='172'
height='412'
viewBox='0 0 172 412'
xmlns='http://www.w3.org/2000/svg'
className={className}
>
<path
d="M36.5812 412C56.8032 412 68.1638 402.875 74.2985 382.343L169.955 49.0476C171.318 44.4851 172 40.1506 172 34.9037C172 13.9158 157.231 0 134.964 0C115.424 0 103.836 9.80952 97.4742 31.4817L2.04491 364.549C0.908851 368.656 0 373.446 0 378.921C0 397.172 12.9511 412 36.5812 412Z"
d='M36.5812 412C56.8032 412 68.1638 402.875 74.2985 382.343L169.955 49.0476C171.318 44.4851 172 40.1506 172 34.9037C172 13.9158 157.231 0 134.964 0C115.424 0 103.836 9.80952 97.4742 31.4817L2.04491 364.549C0.908851 368.656 0 373.446 0 378.921C0 397.172 12.9511 412 36.5812 412Z'
fill={fill}
/>
</svg>
Expand Down
18 changes: 9 additions & 9 deletions components/Footer.js → components/layout/Footer.js
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
import Link from 'next/link';
import footerStyles from '../styles/Footer.module.scss';
import { linksNav } from '../utils/links';
import NewsletterSubscribe from './mailchimp/NewsletterSubscribe';
import footerStyles from '@/styles/Footer.module.scss';
import { linksNav } from '@/utils/links';
import NewsletterSubscribe from '@/components/mailchimp/NewsletterSubscribe';
import Image from 'next/image';
import Container from './Container';
import Container from '@/components/containers/Container';

export default function Footer() {
return (
<footer className={footerStyles.footer}>
<NewsletterSubscribe />
<Container className={footerStyles.footer__inner}>
<nav className={footerStyles.footer__nav} aria-label="Main">
<nav className={footerStyles.footer__nav} aria-label='Main'>
<ul className={footerStyles.footer__navList}>
{linksNav.map(link => (
<li className={footerStyles.footer__navItem} key={link.text}>
Expand All@@ -21,13 +21,13 @@ export default function Footer() {
))}
</ul>
</nav>
<Link href="/">
<a className={footerStyles.footer__logo} title="Go to the Homepage">
<Link href='/'>
<a className={footerStyles.footer__logo} title='Go to the Homepage'>
<Image
src="/images/svg/logo.svg"
src='/images/svg/logo.svg'
height={250}
width={250}
alt="Logo"
alt='Logo'
/>
</a>
</Link>
Expand Down
12 changes: 6 additions & 6 deletions components/Hero.js → components/layout/Hero.js
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
import { useState } from 'react';
import Image from 'next/image';
import Nav from './Nav';
import Container from './Container';
import styles from '../styles/Hero.module.scss';
import Nav from '@/components/Nav';
import Container from '@/components/containers/Container';
import styles from '@/styles/Hero.module.scss';

export default function Hero({
title,
Expand All@@ -29,9 +29,9 @@ export default function Hero({
src={imgBg}
alt={imgAlt}
className={styles.imageBg}
layout="fill"
objectFit="cover"
objectPosition="center"
layout='fill'
objectFit='cover'
objectPosition='center'
priority
/>
<Container className={styles.header__content}>
Expand Down
10 changes: 5 additions & 5 deletions components/Layout.js → components/layout/Layout.js
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
import { useRouter } from 'next/router';
import { heroOptions } from '../utils/hero-options';
import Hero from './Hero';
import Meta from './Meta';
import Footer from './Footer';
import styles from '../styles/Layout.module.scss';
import { heroOptions } from '@/utils/hero-options';
import Hero from '@/components/layout/Hero';
import Meta from '@/components/layout/Meta';
import Footer from '@/components/layout/Footer';
import styles from '@/styles/Layout.module.scss';

export default function Layout({ children }) {
const router = useRouter();
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Feature/about us first section by cherylli · Pull Request #107 · Web-Dev-Path/web-dev-path · GitHub
Skip to content
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
.next
.idea
Comment thread
cherylli marked this conversation as resolved.
node_modules
.env
.DS_Store
Expand Down
1 change: 1 addition & 0 deletions .prettierrc
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
{
"singleQuote": true,
"jsxSingleQuote": true,
"arrowParens": "avoid"
}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,4 +44,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Added

- About page content (first section)

### Fixed

- component file structure

### Changed

- components folder structure
- relative to absolute imports with aliases
40 changes: 0 additions & 40 deletions components/Meta.js

This file was deleted.

20 changes: 10 additions & 10 deletions components/Nav.js
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
import { useState, useEffect, useRef } from 'react';
import Link from 'next/link';
import Image from 'next/image';
import Container from './Container';
import styles from '../styles/Nav.module.scss';
import { linksNav } from '../utils/links';
import { useRouter } from 'next/router';
import Container from '@/components/containers/Container';
import styles from '@/styles/Nav.module.scss';
import { linksNav } from '@/utils/links';

export default function Nav() {
const router = useRouter();
Expand DownExpand Up@@ -45,14 +45,14 @@ export default function Nav() {
<div ref={containerRef}>
<nav className={styles.nav}>
<div className={styles.nav__logo}>
<Link href="/" passHref>
<Link href='/' passHref>
<a>
<Image
src="/images/svg/logo.svg"
src='/images/svg/logo.svg'
height={115}
width={180}
alt="Logo"
title="Go to the Homepage"
alt='Logo'
title='Go to the Homepage'
/>
</a>
</Link>
Expand All@@ -79,12 +79,12 @@ export default function Nav() {
}
})}
<li className={styles.nav__item}>
<Link href="https://webdevpath.slack.com/join/shared_invite/zt-xqqgwwo5-a09BSVWC9ZrHmS6RaMBzVw#/shared-invite/email">
<Link href='https://webdevpath.slack.com/join/shared_invite/zt-xqqgwwo5-a09BSVWC9ZrHmS6RaMBzVw#/shared-invite/email'>
<a
className={`${styles.nav__button} ${
active ? styles.active : ''
}`}
title="Join us"
title='Join us'
>
Join us
</a>
Expand All@@ -96,7 +96,7 @@ export default function Nav() {
active ? styles.active : ''
}`}
onClick={() => setActive(active => !active)}
aria-label="toggle navigation"
aria-label='toggle navigation'
>
<span className={styles.nav__hamburger__bar}></span>
<span className={styles.nav__hamburger__bar}></span>
Expand Down
5 changes: 5 additions & 0 deletions components/Title.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
const Title = ({ title }) => {
return <h2>{title}</h2>;
};

export default Title;
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
import Link from 'next/link';
import btnStyles from '../styles/ButtonLink.module.scss';
import btnStyles from '@/styles/ButtonLink.module.scss';

export default function ButtonLink({
customClassName,
Expand Down
6 changes: 3 additions & 3 deletions components/Card.js → components/containers/Card.js
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
import Image from 'next/image';
import Link from 'next/link';
import styles from '../styles/Card.module.scss';
import styles from '@/styles/Card.module.scss';

export default function Card({
image,
Expand All@@ -17,8 +17,8 @@ export default function Card({
src={image}
alt={altTag}
className={styles.img}
layout="fill"
objectFit="cover"
layout='fill'
objectFit='cover'
/>
</div>
<h2 className={styles.title}>{title}</h2>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,9 +3,9 @@ import { Pagination, Navigation } from 'swiper';
import 'swiper/css';
import 'swiper/css/pagination';
import 'swiper/css/navigation';
import Card from './Card';
import Container from './Container';
import styles from '../styles/CardsColumns.module.scss';
import Card from '@/components/containers/Card';
import Container from '@/components/containers/Container';
import styles from '@/styles/CardsColumns.module.scss';

export default function CardsColumns({
images,
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
import containerStyles from '../styles/Container.module.scss';
import containerStyles from '@/styles/Container.module.scss';

export default function Container({ className, children, styles }) {
return (
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import { useIntersect } from '../hooks/useIntersect';
import styles from '../styles/RevealContainer.module.scss';
import { useIntersect } from '@/hooks/useIntersect';
import styles from '@/styles/RevealContainer.module.scss';

const RevealContentContainer = ({ children }) => {
const [ref, entry] = useIntersect({ threshold: 0.15 });
Expand Down
19 changes: 10 additions & 9 deletions components/TwoColumn.js → components/containers/TwoColumn.js
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
import Image from 'next/image';
import ButtonLink from './ButtonLink';
import Container from './Container';
import styles from '../styles/TwoColumn.module.scss';
import ButtonLink from '@/components/buttons/ButtonLink';
import Container from '@/components/containers/Container';
import styles from '@/styles/TwoColumn.module.scss';

export default function TwoColumn({
image,
Expand DownExpand Up@@ -32,10 +32,12 @@ export default function TwoColumn({
styles={{ flexDirection: rowOrder }}
>
<div className={styles.inner__content}>
<h2 className={styles.title} style={{ color: color }}>
{title}
</h2>
<p className={styles.content}>{content}</p>
{title && (
<h2 className={styles.title} style={{ color: color }}>
{title}
</h2>
)}
<div className={styles.content}>{content}</div>
{link && (
<ButtonLink link={link} customClassName={customBtnClass}>
{linkText}
Expand All@@ -48,8 +50,7 @@ export default function TwoColumn({
src={image}
alt={altTag}
className={styles.img}
layout="fill"
objectFit="cover"
layout='fill'
priority
/>
</div>
Expand Down
10 changes: 5 additions & 5 deletions components/Bracket.js → components/decorations/Bracket.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,14 +3,14 @@ export default function Bracket(props) {

return (
<svg
width="179"
height="366"
viewBox="0 0 179 366"
xmlns="http://www.w3.org/2000/svg"
width='179'
height='366'
viewBox='0 0 179 366'
xmlns='http://www.w3.org/2000/svg'
className={className}
>
<path
d="M124.414 81.1248C124.414 23.5658 96.8124 2.33325e-05 40.1669 1.83804e-05C33.9874 1.78402e-05 28.4258 0.625658 23.8941 1.66838C7.20943 5.63078 1.11774e-07 15.641 -9.27436e-07 27.5282C-2.03957e-06 40.2496 5.76754 47.7573 17.3026 50.8855C19.7745 51.7197 22.4522 52.1368 25.13 52.3453C46.5524 54.8479 54.5857 64.6496 54.5857 89.4667L54.5857 125.754C54.5857 155.993 75.5961 175.179 113.085 179.35L113.085 187.067C75.5961 191.238 54.5857 210.424 54.5857 240.663L54.5857 276.533C54.5857 301.559 46.5523 311.361 25.13 313.655C22.2462 314.072 19.5684 314.697 17.0966 315.115C5.56154 318.451 -2.70171e-05 325.959 -2.8111e-05 338.472C-2.90955e-05 349.733 6.38547 359.535 21.2163 363.706C26.3659 365.166 32.7514 366 40.1668 366C96.8124 366 124.414 342.434 124.414 285.084L124.414 258.598C124.414 234.824 133.066 222.728 155.724 218.349C170.967 215.429 179 205.21 179 183.313C179 163.501 171.173 150.779 155.724 148.068C132.654 143.689 124.414 131.593 124.414 107.819L124.414 81.1248Z"
d='M124.414 81.1248C124.414 23.5658 96.8124 2.33325e-05 40.1669 1.83804e-05C33.9874 1.78402e-05 28.4258 0.625658 23.8941 1.66838C7.20943 5.63078 1.11774e-07 15.641 -9.27436e-07 27.5282C-2.03957e-06 40.2496 5.76754 47.7573 17.3026 50.8855C19.7745 51.7197 22.4522 52.1368 25.13 52.3453C46.5524 54.8479 54.5857 64.6496 54.5857 89.4667L54.5857 125.754C54.5857 155.993 75.5961 175.179 113.085 179.35L113.085 187.067C75.5961 191.238 54.5857 210.424 54.5857 240.663L54.5857 276.533C54.5857 301.559 46.5523 311.361 25.13 313.655C22.2462 314.072 19.5684 314.697 17.0966 315.115C5.56154 318.451 -2.70171e-05 325.959 -2.8111e-05 338.472C-2.90955e-05 349.733 6.38547 359.535 21.2163 363.706C26.3659 365.166 32.7514 366 40.1668 366C96.8124 366 124.414 342.434 124.414 285.084L124.414 258.598C124.414 234.824 133.066 222.728 155.724 218.349C170.967 215.429 179 205.21 179 183.313C179 163.501 171.173 150.779 155.724 148.068C132.654 143.689 124.414 131.593 124.414 107.819L124.414 81.1248Z'
fill={fill}
/>
</svg>
Expand Down
10 changes: 5 additions & 5 deletions components/Stick.js → components/decorations/Stick.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,14 +3,14 @@ export default function Stick(props) {

return (
<svg
width="172"
height="412"
viewBox="0 0 172 412"
xmlns="http://www.w3.org/2000/svg"
width='172'
height='412'
viewBox='0 0 172 412'
xmlns='http://www.w3.org/2000/svg'
className={className}
>
<path
d="M36.5812 412C56.8032 412 68.1638 402.875 74.2985 382.343L169.955 49.0476C171.318 44.4851 172 40.1506 172 34.9037C172 13.9158 157.231 0 134.964 0C115.424 0 103.836 9.80952 97.4742 31.4817L2.04491 364.549C0.908851 368.656 0 373.446 0 378.921C0 397.172 12.9511 412 36.5812 412Z"
d='M36.5812 412C56.8032 412 68.1638 402.875 74.2985 382.343L169.955 49.0476C171.318 44.4851 172 40.1506 172 34.9037C172 13.9158 157.231 0 134.964 0C115.424 0 103.836 9.80952 97.4742 31.4817L2.04491 364.549C0.908851 368.656 0 373.446 0 378.921C0 397.172 12.9511 412 36.5812 412Z'
fill={fill}
/>
</svg>
Expand Down
18 changes: 9 additions & 9 deletions components/Footer.js → components/layout/Footer.js
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
import Link from 'next/link';
import footerStyles from '../styles/Footer.module.scss';
import { linksNav } from '../utils/links';
import NewsletterSubscribe from './mailchimp/NewsletterSubscribe';
import footerStyles from '@/styles/Footer.module.scss';
import { linksNav } from '@/utils/links';
import NewsletterSubscribe from '@/components/mailchimp/NewsletterSubscribe';
import Image from 'next/image';
import Container from './Container';
import Container from '@/components/containers/Container';

export default function Footer() {
return (
<footer className={footerStyles.footer}>
<NewsletterSubscribe />
<Container className={footerStyles.footer__inner}>
<nav className={footerStyles.footer__nav} aria-label="Main">
<nav className={footerStyles.footer__nav} aria-label='Main'>
<ul className={footerStyles.footer__navList}>
{linksNav.map(link => (
<li className={footerStyles.footer__navItem} key={link.text}>
Expand All@@ -21,13 +21,13 @@ export default function Footer() {
))}
</ul>
</nav>
<Link href="/">
<a className={footerStyles.footer__logo} title="Go to the Homepage">
<Link href='/'>
<a className={footerStyles.footer__logo} title='Go to the Homepage'>
<Image
src="/images/svg/logo.svg"
src='/images/svg/logo.svg'
height={250}
width={250}
alt="Logo"
alt='Logo'
/>
</a>
</Link>
Expand Down
12 changes: 6 additions & 6 deletions components/Hero.js → components/layout/Hero.js
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
import { useState } from 'react';
import Image from 'next/image';
import Nav from './Nav';
import Container from './Container';
import styles from '../styles/Hero.module.scss';
import Nav from '@/components/Nav';
import Container from '@/components/containers/Container';
import styles from '@/styles/Hero.module.scss';

export default function Hero({
title,
Expand All@@ -29,9 +29,9 @@ export default function Hero({
src={imgBg}
alt={imgAlt}
className={styles.imageBg}
layout="fill"
objectFit="cover"
objectPosition="center"
layout='fill'
objectFit='cover'
objectPosition='center'
priority
/>
<Container className={styles.header__content}>
Expand Down
10 changes: 5 additions & 5 deletions components/Layout.js → components/layout/Layout.js
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
import { useRouter } from 'next/router';
import { heroOptions } from '../utils/hero-options';
import Hero from './Hero';
import Meta from './Meta';
import Footer from './Footer';
import styles from '../styles/Layout.module.scss';
import { heroOptions } from '@/utils/hero-options';
import Hero from '@/components/layout/Hero';
import Meta from '@/components/layout/Meta';
import Footer from '@/components/layout/Footer';
import styles from '@/styles/Layout.module.scss';

export default function Layout({ children }) {
const router = useRouter();
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Feature/about us first section by cherylli · Pull Request #107 · Web-Dev-Path/web-dev-path · GitHub
Skip to content
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
.next
.idea
Comment thread
cherylli marked this conversation as resolved.
node_modules
.env
.DS_Store
Expand Down
1 change: 1 addition & 0 deletions .prettierrc
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
{
"singleQuote": true,
"jsxSingleQuote": true,
"arrowParens": "avoid"
}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,4 +44,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Added

- About page content (first section)

### Fixed

- component file structure

### Changed

- components folder structure
- relative to absolute imports with aliases
40 changes: 0 additions & 40 deletions components/Meta.js

This file was deleted.

20 changes: 10 additions & 10 deletions components/Nav.js
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
import { useState, useEffect, useRef } from 'react';
import Link from 'next/link';
import Image from 'next/image';
import Container from './Container';
import styles from '../styles/Nav.module.scss';
import { linksNav } from '../utils/links';
import { useRouter } from 'next/router';
import Container from '@/components/containers/Container';
import styles from '@/styles/Nav.module.scss';
import { linksNav } from '@/utils/links';

export default function Nav() {
const router = useRouter();
Expand DownExpand Up@@ -45,14 +45,14 @@ export default function Nav() {
<div ref={containerRef}>
<nav className={styles.nav}>
<div className={styles.nav__logo}>
<Link href="/" passHref>
<Link href='/' passHref>
<a>
<Image
src="/images/svg/logo.svg"
src='/images/svg/logo.svg'
height={115}
width={180}
alt="Logo"
title="Go to the Homepage"
alt='Logo'
title='Go to the Homepage'
/>
</a>
</Link>
Expand All@@ -79,12 +79,12 @@ export default function Nav() {
}
})}
<li className={styles.nav__item}>
<Link href="https://webdevpath.slack.com/join/shared_invite/zt-xqqgwwo5-a09BSVWC9ZrHmS6RaMBzVw#/shared-invite/email">
<Link href='https://webdevpath.slack.com/join/shared_invite/zt-xqqgwwo5-a09BSVWC9ZrHmS6RaMBzVw#/shared-invite/email'>
<a
className={`${styles.nav__button} ${
active ? styles.active : ''
}`}
title="Join us"
title='Join us'
>
Join us
</a>
Expand All@@ -96,7 +96,7 @@ export default function Nav() {
active ? styles.active : ''
}`}
onClick={() => setActive(active => !active)}
aria-label="toggle navigation"
aria-label='toggle navigation'
>
<span className={styles.nav__hamburger__bar}></span>
<span className={styles.nav__hamburger__bar}></span>
Expand Down
5 changes: 5 additions & 0 deletions components/Title.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
const Title = ({ title }) => {
return <h2>{title}</h2>;
};

export default Title;
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
import Link from 'next/link';
import btnStyles from '../styles/ButtonLink.module.scss';
import btnStyles from '@/styles/ButtonLink.module.scss';

export default function ButtonLink({
customClassName,
Expand Down
6 changes: 3 additions & 3 deletions components/Card.js → components/containers/Card.js
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
import Image from 'next/image';
import Link from 'next/link';
import styles from '../styles/Card.module.scss';
import styles from '@/styles/Card.module.scss';

export default function Card({
image,
Expand All@@ -17,8 +17,8 @@ export default function Card({
src={image}
alt={altTag}
className={styles.img}
layout="fill"
objectFit="cover"
layout='fill'
objectFit='cover'
/>
</div>
<h2 className={styles.title}>{title}</h2>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,9 +3,9 @@ import { Pagination, Navigation } from 'swiper';
import 'swiper/css';
import 'swiper/css/pagination';
import 'swiper/css/navigation';
import Card from './Card';
import Container from './Container';
import styles from '../styles/CardsColumns.module.scss';
import Card from '@/components/containers/Card';
import Container from '@/components/containers/Container';
import styles from '@/styles/CardsColumns.module.scss';

export default function CardsColumns({
images,
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
import containerStyles from '../styles/Container.module.scss';
import containerStyles from '@/styles/Container.module.scss';

export default function Container({ className, children, styles }) {
return (
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import { useIntersect } from '../hooks/useIntersect';
import styles from '../styles/RevealContainer.module.scss';
import { useIntersect } from '@/hooks/useIntersect';
import styles from '@/styles/RevealContainer.module.scss';

const RevealContentContainer = ({ children }) => {
const [ref, entry] = useIntersect({ threshold: 0.15 });
Expand Down
19 changes: 10 additions & 9 deletions components/TwoColumn.js → components/containers/TwoColumn.js
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
import Image from 'next/image';
import ButtonLink from './ButtonLink';
import Container from './Container';
import styles from '../styles/TwoColumn.module.scss';
import ButtonLink from '@/components/buttons/ButtonLink';
import Container from '@/components/containers/Container';
import styles from '@/styles/TwoColumn.module.scss';

export default function TwoColumn({
image,
Expand DownExpand Up@@ -32,10 +32,12 @@ export default function TwoColumn({
styles={{ flexDirection: rowOrder }}
>
<div className={styles.inner__content}>
<h2 className={styles.title} style={{ color: color }}>
{title}
</h2>
<p className={styles.content}>{content}</p>
{title && (
<h2 className={styles.title} style={{ color: color }}>
{title}
</h2>
)}
<div className={styles.content}>{content}</div>
{link && (
<ButtonLink link={link} customClassName={customBtnClass}>
{linkText}
Expand All@@ -48,8 +50,7 @@ export default function TwoColumn({
src={image}
alt={altTag}
className={styles.img}
layout="fill"
objectFit="cover"
layout='fill'
priority
/>
</div>
Expand Down
10 changes: 5 additions & 5 deletions components/Bracket.js → components/decorations/Bracket.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,14 +3,14 @@ export default function Bracket(props) {

return (
<svg
width="179"
height="366"
viewBox="0 0 179 366"
xmlns="http://www.w3.org/2000/svg"
width='179'
height='366'
viewBox='0 0 179 366'
xmlns='http://www.w3.org/2000/svg'
className={className}
>
<path
d="M124.414 81.1248C124.414 23.5658 96.8124 2.33325e-05 40.1669 1.83804e-05C33.9874 1.78402e-05 28.4258 0.625658 23.8941 1.66838C7.20943 5.63078 1.11774e-07 15.641 -9.27436e-07 27.5282C-2.03957e-06 40.2496 5.76754 47.7573 17.3026 50.8855C19.7745 51.7197 22.4522 52.1368 25.13 52.3453C46.5524 54.8479 54.5857 64.6496 54.5857 89.4667L54.5857 125.754C54.5857 155.993 75.5961 175.179 113.085 179.35L113.085 187.067C75.5961 191.238 54.5857 210.424 54.5857 240.663L54.5857 276.533C54.5857 301.559 46.5523 311.361 25.13 313.655C22.2462 314.072 19.5684 314.697 17.0966 315.115C5.56154 318.451 -2.70171e-05 325.959 -2.8111e-05 338.472C-2.90955e-05 349.733 6.38547 359.535 21.2163 363.706C26.3659 365.166 32.7514 366 40.1668 366C96.8124 366 124.414 342.434 124.414 285.084L124.414 258.598C124.414 234.824 133.066 222.728 155.724 218.349C170.967 215.429 179 205.21 179 183.313C179 163.501 171.173 150.779 155.724 148.068C132.654 143.689 124.414 131.593 124.414 107.819L124.414 81.1248Z"
d='M124.414 81.1248C124.414 23.5658 96.8124 2.33325e-05 40.1669 1.83804e-05C33.9874 1.78402e-05 28.4258 0.625658 23.8941 1.66838C7.20943 5.63078 1.11774e-07 15.641 -9.27436e-07 27.5282C-2.03957e-06 40.2496 5.76754 47.7573 17.3026 50.8855C19.7745 51.7197 22.4522 52.1368 25.13 52.3453C46.5524 54.8479 54.5857 64.6496 54.5857 89.4667L54.5857 125.754C54.5857 155.993 75.5961 175.179 113.085 179.35L113.085 187.067C75.5961 191.238 54.5857 210.424 54.5857 240.663L54.5857 276.533C54.5857 301.559 46.5523 311.361 25.13 313.655C22.2462 314.072 19.5684 314.697 17.0966 315.115C5.56154 318.451 -2.70171e-05 325.959 -2.8111e-05 338.472C-2.90955e-05 349.733 6.38547 359.535 21.2163 363.706C26.3659 365.166 32.7514 366 40.1668 366C96.8124 366 124.414 342.434 124.414 285.084L124.414 258.598C124.414 234.824 133.066 222.728 155.724 218.349C170.967 215.429 179 205.21 179 183.313C179 163.501 171.173 150.779 155.724 148.068C132.654 143.689 124.414 131.593 124.414 107.819L124.414 81.1248Z'
fill={fill}
/>
</svg>
Expand Down
10 changes: 5 additions & 5 deletions components/Stick.js → components/decorations/Stick.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,14 +3,14 @@ export default function Stick(props) {

return (
<svg
width="172"
height="412"
viewBox="0 0 172 412"
xmlns="http://www.w3.org/2000/svg"
width='172'
height='412'
viewBox='0 0 172 412'
xmlns='http://www.w3.org/2000/svg'
className={className}
>
<path
d="M36.5812 412C56.8032 412 68.1638 402.875 74.2985 382.343L169.955 49.0476C171.318 44.4851 172 40.1506 172 34.9037C172 13.9158 157.231 0 134.964 0C115.424 0 103.836 9.80952 97.4742 31.4817L2.04491 364.549C0.908851 368.656 0 373.446 0 378.921C0 397.172 12.9511 412 36.5812 412Z"
d='M36.5812 412C56.8032 412 68.1638 402.875 74.2985 382.343L169.955 49.0476C171.318 44.4851 172 40.1506 172 34.9037C172 13.9158 157.231 0 134.964 0C115.424 0 103.836 9.80952 97.4742 31.4817L2.04491 364.549C0.908851 368.656 0 373.446 0 378.921C0 397.172 12.9511 412 36.5812 412Z'
fill={fill}
/>
</svg>
Expand Down
18 changes: 9 additions & 9 deletions components/Footer.js → components/layout/Footer.js
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
import Link from 'next/link';
import footerStyles from '../styles/Footer.module.scss';
import { linksNav } from '../utils/links';
import NewsletterSubscribe from './mailchimp/NewsletterSubscribe';
import footerStyles from '@/styles/Footer.module.scss';
import { linksNav } from '@/utils/links';
import NewsletterSubscribe from '@/components/mailchimp/NewsletterSubscribe';
import Image from 'next/image';
import Container from './Container';
import Container from '@/components/containers/Container';

export default function Footer() {
return (
<footer className={footerStyles.footer}>
<NewsletterSubscribe />
<Container className={footerStyles.footer__inner}>
<nav className={footerStyles.footer__nav} aria-label="Main">
<nav className={footerStyles.footer__nav} aria-label='Main'>
<ul className={footerStyles.footer__navList}>
{linksNav.map(link => (
<li className={footerStyles.footer__navItem} key={link.text}>
Expand All@@ -21,13 +21,13 @@ export default function Footer() {
))}
</ul>
</nav>
<Link href="/">
<a className={footerStyles.footer__logo} title="Go to the Homepage">
<Link href='/'>
<a className={footerStyles.footer__logo} title='Go to the Homepage'>
<Image
src="/images/svg/logo.svg"
src='/images/svg/logo.svg'
height={250}
width={250}
alt="Logo"
alt='Logo'
/>
</a>
</Link>
Expand Down
12 changes: 6 additions & 6 deletions components/Hero.js → components/layout/Hero.js
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
import { useState } from 'react';
import Image from 'next/image';
import Nav from './Nav';
import Container from './Container';
import styles from '../styles/Hero.module.scss';
import Nav from '@/components/Nav';
import Container from '@/components/containers/Container';
import styles from '@/styles/Hero.module.scss';

export default function Hero({
title,
Expand All@@ -29,9 +29,9 @@ export default function Hero({
src={imgBg}
alt={imgAlt}
className={styles.imageBg}
layout="fill"
objectFit="cover"
objectPosition="center"
layout='fill'
objectFit='cover'
objectPosition='center'
priority
/>
<Container className={styles.header__content}>
Expand Down
10 changes: 5 additions & 5 deletions components/Layout.js → components/layout/Layout.js
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
import { useRouter } from 'next/router';
import { heroOptions } from '../utils/hero-options';
import Hero from './Hero';
import Meta from './Meta';
import Footer from './Footer';
import styles from '../styles/Layout.module.scss';
import { heroOptions } from '@/utils/hero-options';
import Hero from '@/components/layout/Hero';
import Meta from '@/components/layout/Meta';
import Footer from '@/components/layout/Footer';
import styles from '@/styles/Layout.module.scss';

export default function Layout({ children }) {
const router = useRouter();
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' Feature/about us first section by cherylli · Pull Request #107 · Web-Dev-Path/web-dev-path · GitHub
Skip to content
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
.next
.idea
Comment thread
cherylli marked this conversation as resolved.
node_modules
.env
.DS_Store
Expand Down
1 change: 1 addition & 0 deletions .prettierrc
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
{
"singleQuote": true,
"jsxSingleQuote": true,
"arrowParens": "avoid"
}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,4 +44,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Added

- About page content (first section)

### Fixed

- component file structure

### Changed

- components folder structure
- relative to absolute imports with aliases
40 changes: 0 additions & 40 deletions components/Meta.js

This file was deleted.

20 changes: 10 additions & 10 deletions components/Nav.js
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
import { useState, useEffect, useRef } from 'react';
import Link from 'next/link';
import Image from 'next/image';
import Container from './Container';
import styles from '../styles/Nav.module.scss';
import { linksNav } from '../utils/links';
import { useRouter } from 'next/router';
import Container from '@/components/containers/Container';
import styles from '@/styles/Nav.module.scss';
import { linksNav } from '@/utils/links';

export default function Nav() {
const router = useRouter();
Expand DownExpand Up@@ -45,14 +45,14 @@ export default function Nav() {
<div ref={containerRef}>
<nav className={styles.nav}>
<div className={styles.nav__logo}>
<Link href="/" passHref>
<Link href='/' passHref>
<a>
<Image
src="/images/svg/logo.svg"
src='/images/svg/logo.svg'
height={115}
width={180}
alt="Logo"
title="Go to the Homepage"
alt='Logo'
title='Go to the Homepage'
/>
</a>
</Link>
Expand All@@ -79,12 +79,12 @@ export default function Nav() {
}
})}
<li className={styles.nav__item}>
<Link href="https://webdevpath.slack.com/join/shared_invite/zt-xqqgwwo5-a09BSVWC9ZrHmS6RaMBzVw#/shared-invite/email">
<Link href='https://webdevpath.slack.com/join/shared_invite/zt-xqqgwwo5-a09BSVWC9ZrHmS6RaMBzVw#/shared-invite/email'>
<a
className={`${styles.nav__button} ${
active ? styles.active : ''
}`}
title="Join us"
title='Join us'
>
Join us
</a>
Expand All@@ -96,7 +96,7 @@ export default function Nav() {
active ? styles.active : ''
}`}
onClick={() => setActive(active => !active)}
aria-label="toggle navigation"
aria-label='toggle navigation'
>
<span className={styles.nav__hamburger__bar}></span>
<span className={styles.nav__hamburger__bar}></span>
Expand Down
5 changes: 5 additions & 0 deletions components/Title.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
const Title = ({ title }) => {
return <h2>{title}</h2>;
};

export default Title;
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
import Link from 'next/link';
import btnStyles from '../styles/ButtonLink.module.scss';
import btnStyles from '@/styles/ButtonLink.module.scss';

export default function ButtonLink({
customClassName,
Expand Down
6 changes: 3 additions & 3 deletions components/Card.js → components/containers/Card.js
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
import Image from 'next/image';
import Link from 'next/link';
import styles from '../styles/Card.module.scss';
import styles from '@/styles/Card.module.scss';

export default function Card({
image,
Expand All@@ -17,8 +17,8 @@ export default function Card({
src={image}
alt={altTag}
className={styles.img}
layout="fill"
objectFit="cover"
layout='fill'
objectFit='cover'
/>
</div>
<h2 className={styles.title}>{title}</h2>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,9 +3,9 @@ import { Pagination, Navigation } from 'swiper';
import 'swiper/css';
import 'swiper/css/pagination';
import 'swiper/css/navigation';
import Card from './Card';
import Container from './Container';
import styles from '../styles/CardsColumns.module.scss';
import Card from '@/components/containers/Card';
import Container from '@/components/containers/Container';
import styles from '@/styles/CardsColumns.module.scss';

export default function CardsColumns({
images,
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
import containerStyles from '../styles/Container.module.scss';
import containerStyles from '@/styles/Container.module.scss';

export default function Container({ className, children, styles }) {
return (
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import { useIntersect } from '../hooks/useIntersect';
import styles from '../styles/RevealContainer.module.scss';
import { useIntersect } from '@/hooks/useIntersect';
import styles from '@/styles/RevealContainer.module.scss';

const RevealContentContainer = ({ children }) => {
const [ref, entry] = useIntersect({ threshold: 0.15 });
Expand Down
19 changes: 10 additions & 9 deletions components/TwoColumn.js → components/containers/TwoColumn.js
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
import Image from 'next/image';
import ButtonLink from './ButtonLink';
import Container from './Container';
import styles from '../styles/TwoColumn.module.scss';
import ButtonLink from '@/components/buttons/ButtonLink';
import Container from '@/components/containers/Container';
import styles from '@/styles/TwoColumn.module.scss';

export default function TwoColumn({
image,
Expand DownExpand Up@@ -32,10 +32,12 @@ export default function TwoColumn({
styles={{ flexDirection: rowOrder }}
>
<div className={styles.inner__content}>
<h2 className={styles.title} style={{ color: color }}>
{title}
</h2>
<p className={styles.content}>{content}</p>
{title && (
<h2 className={styles.title} style={{ color: color }}>
{title}
</h2>
)}
<div className={styles.content}>{content}</div>
{link && (
<ButtonLink link={link} customClassName={customBtnClass}>
{linkText}
Expand All@@ -48,8 +50,7 @@ export default function TwoColumn({
src={image}
alt={altTag}
className={styles.img}
layout="fill"
objectFit="cover"
layout='fill'
priority
/>
</div>
Expand Down
10 changes: 5 additions & 5 deletions components/Bracket.js → components/decorations/Bracket.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,14 +3,14 @@ export default function Bracket(props) {

return (
<svg
width="179"
height="366"
viewBox="0 0 179 366"
xmlns="http://www.w3.org/2000/svg"
width='179'
height='366'
viewBox='0 0 179 366'
xmlns='http://www.w3.org/2000/svg'
className={className}
>
<path
d="M124.414 81.1248C124.414 23.5658 96.8124 2.33325e-05 40.1669 1.83804e-05C33.9874 1.78402e-05 28.4258 0.625658 23.8941 1.66838C7.20943 5.63078 1.11774e-07 15.641 -9.27436e-07 27.5282C-2.03957e-06 40.2496 5.76754 47.7573 17.3026 50.8855C19.7745 51.7197 22.4522 52.1368 25.13 52.3453C46.5524 54.8479 54.5857 64.6496 54.5857 89.4667L54.5857 125.754C54.5857 155.993 75.5961 175.179 113.085 179.35L113.085 187.067C75.5961 191.238 54.5857 210.424 54.5857 240.663L54.5857 276.533C54.5857 301.559 46.5523 311.361 25.13 313.655C22.2462 314.072 19.5684 314.697 17.0966 315.115C5.56154 318.451 -2.70171e-05 325.959 -2.8111e-05 338.472C-2.90955e-05 349.733 6.38547 359.535 21.2163 363.706C26.3659 365.166 32.7514 366 40.1668 366C96.8124 366 124.414 342.434 124.414 285.084L124.414 258.598C124.414 234.824 133.066 222.728 155.724 218.349C170.967 215.429 179 205.21 179 183.313C179 163.501 171.173 150.779 155.724 148.068C132.654 143.689 124.414 131.593 124.414 107.819L124.414 81.1248Z"
d='M124.414 81.1248C124.414 23.5658 96.8124 2.33325e-05 40.1669 1.83804e-05C33.9874 1.78402e-05 28.4258 0.625658 23.8941 1.66838C7.20943 5.63078 1.11774e-07 15.641 -9.27436e-07 27.5282C-2.03957e-06 40.2496 5.76754 47.7573 17.3026 50.8855C19.7745 51.7197 22.4522 52.1368 25.13 52.3453C46.5524 54.8479 54.5857 64.6496 54.5857 89.4667L54.5857 125.754C54.5857 155.993 75.5961 175.179 113.085 179.35L113.085 187.067C75.5961 191.238 54.5857 210.424 54.5857 240.663L54.5857 276.533C54.5857 301.559 46.5523 311.361 25.13 313.655C22.2462 314.072 19.5684 314.697 17.0966 315.115C5.56154 318.451 -2.70171e-05 325.959 -2.8111e-05 338.472C-2.90955e-05 349.733 6.38547 359.535 21.2163 363.706C26.3659 365.166 32.7514 366 40.1668 366C96.8124 366 124.414 342.434 124.414 285.084L124.414 258.598C124.414 234.824 133.066 222.728 155.724 218.349C170.967 215.429 179 205.21 179 183.313C179 163.501 171.173 150.779 155.724 148.068C132.654 143.689 124.414 131.593 124.414 107.819L124.414 81.1248Z'
fill={fill}
/>
</svg>
Expand Down
10 changes: 5 additions & 5 deletions components/Stick.js → components/decorations/Stick.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,14 +3,14 @@ export default function Stick(props) {

return (
<svg
width="172"
height="412"
viewBox="0 0 172 412"
xmlns="http://www.w3.org/2000/svg"
width='172'
height='412'
viewBox='0 0 172 412'
xmlns='http://www.w3.org/2000/svg'
className={className}
>
<path
d="M36.5812 412C56.8032 412 68.1638 402.875 74.2985 382.343L169.955 49.0476C171.318 44.4851 172 40.1506 172 34.9037C172 13.9158 157.231 0 134.964 0C115.424 0 103.836 9.80952 97.4742 31.4817L2.04491 364.549C0.908851 368.656 0 373.446 0 378.921C0 397.172 12.9511 412 36.5812 412Z"
d='M36.5812 412C56.8032 412 68.1638 402.875 74.2985 382.343L169.955 49.0476C171.318 44.4851 172 40.1506 172 34.9037C172 13.9158 157.231 0 134.964 0C115.424 0 103.836 9.80952 97.4742 31.4817L2.04491 364.549C0.908851 368.656 0 373.446 0 378.921C0 397.172 12.9511 412 36.5812 412Z'
fill={fill}
/>
</svg>
Expand Down
18 changes: 9 additions & 9 deletions components/Footer.js → components/layout/Footer.js
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
import Link from 'next/link';
import footerStyles from '../styles/Footer.module.scss';
import { linksNav } from '../utils/links';
import NewsletterSubscribe from './mailchimp/NewsletterSubscribe';
import footerStyles from '@/styles/Footer.module.scss';
import { linksNav } from '@/utils/links';
import NewsletterSubscribe from '@/components/mailchimp/NewsletterSubscribe';
import Image from 'next/image';
import Container from './Container';
import Container from '@/components/containers/Container';

export default function Footer() {
return (
<footer className={footerStyles.footer}>
<NewsletterSubscribe />
<Container className={footerStyles.footer__inner}>
<nav className={footerStyles.footer__nav} aria-label="Main">
<nav className={footerStyles.footer__nav} aria-label='Main'>
<ul className={footerStyles.footer__navList}>
{linksNav.map(link => (
<li className={footerStyles.footer__navItem} key={link.text}>
Expand All@@ -21,13 +21,13 @@ export default function Footer() {
))}
</ul>
</nav>
<Link href="/">
<a className={footerStyles.footer__logo} title="Go to the Homepage">
<Link href='/'>
<a className={footerStyles.footer__logo} title='Go to the Homepage'>
<Image
src="/images/svg/logo.svg"
src='/images/svg/logo.svg'
height={250}
width={250}
alt="Logo"
alt='Logo'
/>
</a>
</Link>
Expand Down
12 changes: 6 additions & 6 deletions components/Hero.js → components/layout/Hero.js
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
import { useState } from 'react';
import Image from 'next/image';
import Nav from './Nav';
import Container from './Container';
import styles from '../styles/Hero.module.scss';
import Nav from '@/components/Nav';
import Container from '@/components/containers/Container';
import styles from '@/styles/Hero.module.scss';

export default function Hero({
title,
Expand All@@ -29,9 +29,9 @@ export default function Hero({
src={imgBg}
alt={imgAlt}
className={styles.imageBg}
layout="fill"
objectFit="cover"
objectPosition="center"
layout='fill'
objectFit='cover'
objectPosition='center'
priority
/>
<Container className={styles.header__content}>
Expand Down
10 changes: 5 additions & 5 deletions components/Layout.js → components/layout/Layout.js
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
import { useRouter } from 'next/router';
import { heroOptions } from '../utils/hero-options';
import Hero from './Hero';
import Meta from './Meta';
import Footer from './Footer';
import styles from '../styles/Layout.module.scss';
import { heroOptions } from '@/utils/hero-options';
import Hero from '@/components/layout/Hero';
import Meta from '@/components/layout/Meta';
import Footer from '@/components/layout/Footer';
import styles from '@/styles/Layout.module.scss';

export default function Layout({ children }) {
const router = useRouter();
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Feature/about us first section by cherylli · Pull Request #107 · Web-Dev-Path/web-dev-path · GitHub
Skip to content
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
.next
.idea
Comment thread
cherylli marked this conversation as resolved.
node_modules
.env
.DS_Store
Expand Down
1 change: 1 addition & 0 deletions .prettierrc
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
{
"singleQuote": true,
"jsxSingleQuote": true,
"arrowParens": "avoid"
}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,4 +44,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Added

- About page content (first section)

### Fixed

- component file structure

### Changed

- components folder structure
- relative to absolute imports with aliases
40 changes: 0 additions & 40 deletions components/Meta.js

This file was deleted.

20 changes: 10 additions & 10 deletions components/Nav.js
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
import { useState, useEffect, useRef } from 'react';
import Link from 'next/link';
import Image from 'next/image';
import Container from './Container';
import styles from '../styles/Nav.module.scss';
import { linksNav } from '../utils/links';
import { useRouter } from 'next/router';
import Container from '@/components/containers/Container';
import styles from '@/styles/Nav.module.scss';
import { linksNav } from '@/utils/links';

export default function Nav() {
const router = useRouter();
Expand DownExpand Up@@ -45,14 +45,14 @@ export default function Nav() {
<div ref={containerRef}>
<nav className={styles.nav}>
<div className={styles.nav__logo}>
<Link href="/" passHref>
<Link href='/' passHref>
<a>
<Image
src="/images/svg/logo.svg"
src='/images/svg/logo.svg'
height={115}
width={180}
alt="Logo"
title="Go to the Homepage"
alt='Logo'
title='Go to the Homepage'
/>
</a>
</Link>
Expand All@@ -79,12 +79,12 @@ export default function Nav() {
}
})}
<li className={styles.nav__item}>
<Link href="https://webdevpath.slack.com/join/shared_invite/zt-xqqgwwo5-a09BSVWC9ZrHmS6RaMBzVw#/shared-invite/email">
<Link href='https://webdevpath.slack.com/join/shared_invite/zt-xqqgwwo5-a09BSVWC9ZrHmS6RaMBzVw#/shared-invite/email'>
<a
className={`${styles.nav__button} ${
active ? styles.active : ''
}`}
title="Join us"
title='Join us'
>
Join us
</a>
Expand All@@ -96,7 +96,7 @@ export default function Nav() {
active ? styles.active : ''
}`}
onClick={() => setActive(active => !active)}
aria-label="toggle navigation"
aria-label='toggle navigation'
>
<span className={styles.nav__hamburger__bar}></span>
<span className={styles.nav__hamburger__bar}></span>
Expand Down
5 changes: 5 additions & 0 deletions components/Title.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
const Title = ({ title }) => {
return <h2>{title}</h2>;
};

export default Title;
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
import Link from 'next/link';
import btnStyles from '../styles/ButtonLink.module.scss';
import btnStyles from '@/styles/ButtonLink.module.scss';

export default function ButtonLink({
customClassName,
Expand Down
6 changes: 3 additions & 3 deletions components/Card.js → components/containers/Card.js
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
import Image from 'next/image';
import Link from 'next/link';
import styles from '../styles/Card.module.scss';
import styles from '@/styles/Card.module.scss';

export default function Card({
image,
Expand All@@ -17,8 +17,8 @@ export default function Card({
src={image}
alt={altTag}
className={styles.img}
layout="fill"
objectFit="cover"
layout='fill'
objectFit='cover'
/>
</div>
<h2 className={styles.title}>{title}</h2>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,9 +3,9 @@ import { Pagination, Navigation } from 'swiper';
import 'swiper/css';
import 'swiper/css/pagination';
import 'swiper/css/navigation';
import Card from './Card';
import Container from './Container';
import styles from '../styles/CardsColumns.module.scss';
import Card from '@/components/containers/Card';
import Container from '@/components/containers/Container';
import styles from '@/styles/CardsColumns.module.scss';

export default function CardsColumns({
images,
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
import containerStyles from '../styles/Container.module.scss';
import containerStyles from '@/styles/Container.module.scss';

export default function Container({ className, children, styles }) {
return (
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import { useIntersect } from '../hooks/useIntersect';
import styles from '../styles/RevealContainer.module.scss';
import { useIntersect } from '@/hooks/useIntersect';
import styles from '@/styles/RevealContainer.module.scss';

const RevealContentContainer = ({ children }) => {
const [ref, entry] = useIntersect({ threshold: 0.15 });
Expand Down
19 changes: 10 additions & 9 deletions components/TwoColumn.js → components/containers/TwoColumn.js
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
import Image from 'next/image';
import ButtonLink from './ButtonLink';
import Container from './Container';
import styles from '../styles/TwoColumn.module.scss';
import ButtonLink from '@/components/buttons/ButtonLink';
import Container from '@/components/containers/Container';
import styles from '@/styles/TwoColumn.module.scss';

export default function TwoColumn({
image,
Expand DownExpand Up@@ -32,10 +32,12 @@ export default function TwoColumn({
styles={{ flexDirection: rowOrder }}
>
<div className={styles.inner__content}>
<h2 className={styles.title} style={{ color: color }}>
{title}
</h2>
<p className={styles.content}>{content}</p>
{title && (
<h2 className={styles.title} style={{ color: color }}>
{title}
</h2>
)}
<div className={styles.content}>{content}</div>
{link && (
<ButtonLink link={link} customClassName={customBtnClass}>
{linkText}
Expand All@@ -48,8 +50,7 @@ export default function TwoColumn({
src={image}
alt={altTag}
className={styles.img}
layout="fill"
objectFit="cover"
layout='fill'
priority
/>
</div>
Expand Down
10 changes: 5 additions & 5 deletions components/Bracket.js → components/decorations/Bracket.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,14 +3,14 @@ export default function Bracket(props) {

return (
<svg
width="179"
height="366"
viewBox="0 0 179 366"
xmlns="http://www.w3.org/2000/svg"
width='179'
height='366'
viewBox='0 0 179 366'
xmlns='http://www.w3.org/2000/svg'
className={className}
>
<path
d="M124.414 81.1248C124.414 23.5658 96.8124 2.33325e-05 40.1669 1.83804e-05C33.9874 1.78402e-05 28.4258 0.625658 23.8941 1.66838C7.20943 5.63078 1.11774e-07 15.641 -9.27436e-07 27.5282C-2.03957e-06 40.2496 5.76754 47.7573 17.3026 50.8855C19.7745 51.7197 22.4522 52.1368 25.13 52.3453C46.5524 54.8479 54.5857 64.6496 54.5857 89.4667L54.5857 125.754C54.5857 155.993 75.5961 175.179 113.085 179.35L113.085 187.067C75.5961 191.238 54.5857 210.424 54.5857 240.663L54.5857 276.533C54.5857 301.559 46.5523 311.361 25.13 313.655C22.2462 314.072 19.5684 314.697 17.0966 315.115C5.56154 318.451 -2.70171e-05 325.959 -2.8111e-05 338.472C-2.90955e-05 349.733 6.38547 359.535 21.2163 363.706C26.3659 365.166 32.7514 366 40.1668 366C96.8124 366 124.414 342.434 124.414 285.084L124.414 258.598C124.414 234.824 133.066 222.728 155.724 218.349C170.967 215.429 179 205.21 179 183.313C179 163.501 171.173 150.779 155.724 148.068C132.654 143.689 124.414 131.593 124.414 107.819L124.414 81.1248Z"
d='M124.414 81.1248C124.414 23.5658 96.8124 2.33325e-05 40.1669 1.83804e-05C33.9874 1.78402e-05 28.4258 0.625658 23.8941 1.66838C7.20943 5.63078 1.11774e-07 15.641 -9.27436e-07 27.5282C-2.03957e-06 40.2496 5.76754 47.7573 17.3026 50.8855C19.7745 51.7197 22.4522 52.1368 25.13 52.3453C46.5524 54.8479 54.5857 64.6496 54.5857 89.4667L54.5857 125.754C54.5857 155.993 75.5961 175.179 113.085 179.35L113.085 187.067C75.5961 191.238 54.5857 210.424 54.5857 240.663L54.5857 276.533C54.5857 301.559 46.5523 311.361 25.13 313.655C22.2462 314.072 19.5684 314.697 17.0966 315.115C5.56154 318.451 -2.70171e-05 325.959 -2.8111e-05 338.472C-2.90955e-05 349.733 6.38547 359.535 21.2163 363.706C26.3659 365.166 32.7514 366 40.1668 366C96.8124 366 124.414 342.434 124.414 285.084L124.414 258.598C124.414 234.824 133.066 222.728 155.724 218.349C170.967 215.429 179 205.21 179 183.313C179 163.501 171.173 150.779 155.724 148.068C132.654 143.689 124.414 131.593 124.414 107.819L124.414 81.1248Z'
fill={fill}
/>
</svg>
Expand Down
10 changes: 5 additions & 5 deletions components/Stick.js → components/decorations/Stick.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,14 +3,14 @@ export default function Stick(props) {

return (
<svg
width="172"
height="412"
viewBox="0 0 172 412"
xmlns="http://www.w3.org/2000/svg"
width='172'
height='412'
viewBox='0 0 172 412'
xmlns='http://www.w3.org/2000/svg'
className={className}
>
<path
d="M36.5812 412C56.8032 412 68.1638 402.875 74.2985 382.343L169.955 49.0476C171.318 44.4851 172 40.1506 172 34.9037C172 13.9158 157.231 0 134.964 0C115.424 0 103.836 9.80952 97.4742 31.4817L2.04491 364.549C0.908851 368.656 0 373.446 0 378.921C0 397.172 12.9511 412 36.5812 412Z"
d='M36.5812 412C56.8032 412 68.1638 402.875 74.2985 382.343L169.955 49.0476C171.318 44.4851 172 40.1506 172 34.9037C172 13.9158 157.231 0 134.964 0C115.424 0 103.836 9.80952 97.4742 31.4817L2.04491 364.549C0.908851 368.656 0 373.446 0 378.921C0 397.172 12.9511 412 36.5812 412Z'
fill={fill}
/>
</svg>
Expand Down
18 changes: 9 additions & 9 deletions components/Footer.js → components/layout/Footer.js
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
import Link from 'next/link';
import footerStyles from '../styles/Footer.module.scss';
import { linksNav } from '../utils/links';
import NewsletterSubscribe from './mailchimp/NewsletterSubscribe';
import footerStyles from '@/styles/Footer.module.scss';
import { linksNav } from '@/utils/links';
import NewsletterSubscribe from '@/components/mailchimp/NewsletterSubscribe';
import Image from 'next/image';
import Container from './Container';
import Container from '@/components/containers/Container';

export default function Footer() {
return (
<footer className={footerStyles.footer}>
<NewsletterSubscribe />
<Container className={footerStyles.footer__inner}>
<nav className={footerStyles.footer__nav} aria-label="Main">
<nav className={footerStyles.footer__nav} aria-label='Main'>
<ul className={footerStyles.footer__navList}>
{linksNav.map(link => (
<li className={footerStyles.footer__navItem} key={link.text}>
Expand All@@ -21,13 +21,13 @@ export default function Footer() {
))}
</ul>
</nav>
<Link href="/">
<a className={footerStyles.footer__logo} title="Go to the Homepage">
<Link href='/'>
<a className={footerStyles.footer__logo} title='Go to the Homepage'>
<Image
src="/images/svg/logo.svg"
src='/images/svg/logo.svg'
height={250}
width={250}
alt="Logo"
alt='Logo'
/>
</a>
</Link>
Expand Down
12 changes: 6 additions & 6 deletions components/Hero.js → components/layout/Hero.js
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
import { useState } from 'react';
import Image from 'next/image';
import Nav from './Nav';
import Container from './Container';
import styles from '../styles/Hero.module.scss';
import Nav from '@/components/Nav';
import Container from '@/components/containers/Container';
import styles from '@/styles/Hero.module.scss';

export default function Hero({
title,
Expand All@@ -29,9 +29,9 @@ export default function Hero({
src={imgBg}
alt={imgAlt}
className={styles.imageBg}
layout="fill"
objectFit="cover"
objectPosition="center"
layout='fill'
objectFit='cover'
objectPosition='center'
priority
/>
<Container className={styles.header__content}>
Expand Down
10 changes: 5 additions & 5 deletions components/Layout.js → components/layout/Layout.js
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
import { useRouter } from 'next/router';
import { heroOptions } from '../utils/hero-options';
import Hero from './Hero';
import Meta from './Meta';
import Footer from './Footer';
import styles from '../styles/Layout.module.scss';
import { heroOptions } from '@/utils/hero-options';
import Hero from '@/components/layout/Hero';
import Meta from '@/components/layout/Meta';
import Footer from '@/components/layout/Footer';
import styles from '@/styles/Layout.module.scss';

export default function Layout({ children }) {
const router = useRouter();
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); Feature/about us first section by cherylli · Pull Request #107 · Web-Dev-Path/web-dev-path · GitHub
Skip to content
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
.next
.idea
Comment thread
cherylli marked this conversation as resolved.
node_modules
.env
.DS_Store
Expand Down
1 change: 1 addition & 0 deletions .prettierrc
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
{
"singleQuote": true,
"jsxSingleQuote": true,
"arrowParens": "avoid"
}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,4 +44,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Added

- About page content (first section)

### Fixed

- component file structure

### Changed

- components folder structure
- relative to absolute imports with aliases
40 changes: 0 additions & 40 deletions components/Meta.js

This file was deleted.

20 changes: 10 additions & 10 deletions components/Nav.js
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
import { useState, useEffect, useRef } from 'react';
import Link from 'next/link';
import Image from 'next/image';
import Container from './Container';
import styles from '../styles/Nav.module.scss';
import { linksNav } from '../utils/links';
import { useRouter } from 'next/router';
import Container from '@/components/containers/Container';
import styles from '@/styles/Nav.module.scss';
import { linksNav } from '@/utils/links';

export default function Nav() {
const router = useRouter();
Expand DownExpand Up@@ -45,14 +45,14 @@ export default function Nav() {
<div ref={containerRef}>
<nav className={styles.nav}>
<div className={styles.nav__logo}>
<Link href="/" passHref>
<Link href='/' passHref>
<a>
<Image
src="/images/svg/logo.svg"
src='/images/svg/logo.svg'
height={115}
width={180}
alt="Logo"
title="Go to the Homepage"
alt='Logo'
title='Go to the Homepage'
/>
</a>
</Link>
Expand All@@ -79,12 +79,12 @@ export default function Nav() {
}
})}
<li className={styles.nav__item}>
<Link href="https://webdevpath.slack.com/join/shared_invite/zt-xqqgwwo5-a09BSVWC9ZrHmS6RaMBzVw#/shared-invite/email">
<Link href='https://webdevpath.slack.com/join/shared_invite/zt-xqqgwwo5-a09BSVWC9ZrHmS6RaMBzVw#/shared-invite/email'>
<a
className={`${styles.nav__button} ${
active ? styles.active : ''
}`}
title="Join us"
title='Join us'
>
Join us
</a>
Expand All@@ -96,7 +96,7 @@ export default function Nav() {
active ? styles.active : ''
}`}
onClick={() => setActive(active => !active)}
aria-label="toggle navigation"
aria-label='toggle navigation'
>
<span className={styles.nav__hamburger__bar}></span>
<span className={styles.nav__hamburger__bar}></span>
Expand Down
5 changes: 5 additions & 0 deletions components/Title.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
const Title = ({ title }) => {
return <h2>{title}</h2>;
};

export default Title;
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
import Link from 'next/link';
import btnStyles from '../styles/ButtonLink.module.scss';
import btnStyles from '@/styles/ButtonLink.module.scss';

export default function ButtonLink({
customClassName,
Expand Down
6 changes: 3 additions & 3 deletions components/Card.js → components/containers/Card.js
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
import Image from 'next/image';
import Link from 'next/link';
import styles from '../styles/Card.module.scss';
import styles from '@/styles/Card.module.scss';

export default function Card({
image,
Expand All@@ -17,8 +17,8 @@ export default function Card({
src={image}
alt={altTag}
className={styles.img}
layout="fill"
objectFit="cover"
layout='fill'
objectFit='cover'
/>
</div>
<h2 className={styles.title}>{title}</h2>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,9 +3,9 @@ import { Pagination, Navigation } from 'swiper';
import 'swiper/css';
import 'swiper/css/pagination';
import 'swiper/css/navigation';
import Card from './Card';
import Container from './Container';
import styles from '../styles/CardsColumns.module.scss';
import Card from '@/components/containers/Card';
import Container from '@/components/containers/Container';
import styles from '@/styles/CardsColumns.module.scss';

export default function CardsColumns({
images,
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
import containerStyles from '../styles/Container.module.scss';
import containerStyles from '@/styles/Container.module.scss';

export default function Container({ className, children, styles }) {
return (
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import { useIntersect } from '../hooks/useIntersect';
import styles from '../styles/RevealContainer.module.scss';
import { useIntersect } from '@/hooks/useIntersect';
import styles from '@/styles/RevealContainer.module.scss';

const RevealContentContainer = ({ children }) => {
const [ref, entry] = useIntersect({ threshold: 0.15 });
Expand Down
19 changes: 10 additions & 9 deletions components/TwoColumn.js → components/containers/TwoColumn.js
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
import Image from 'next/image';
import ButtonLink from './ButtonLink';
import Container from './Container';
import styles from '../styles/TwoColumn.module.scss';
import ButtonLink from '@/components/buttons/ButtonLink';
import Container from '@/components/containers/Container';
import styles from '@/styles/TwoColumn.module.scss';

export default function TwoColumn({
image,
Expand DownExpand Up@@ -32,10 +32,12 @@ export default function TwoColumn({
styles={{ flexDirection: rowOrder }}
>
<div className={styles.inner__content}>
<h2 className={styles.title} style={{ color: color }}>
{title}
</h2>
<p className={styles.content}>{content}</p>
{title && (
<h2 className={styles.title} style={{ color: color }}>
{title}
</h2>
)}
<div className={styles.content}>{content}</div>
{link && (
<ButtonLink link={link} customClassName={customBtnClass}>
{linkText}
Expand All@@ -48,8 +50,7 @@ export default function TwoColumn({
src={image}
alt={altTag}
className={styles.img}
layout="fill"
objectFit="cover"
layout='fill'
priority
/>
</div>
Expand Down
10 changes: 5 additions & 5 deletions components/Bracket.js → components/decorations/Bracket.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,14 +3,14 @@ export default function Bracket(props) {

return (
<svg
width="179"
height="366"
viewBox="0 0 179 366"
xmlns="http://www.w3.org/2000/svg"
width='179'
height='366'
viewBox='0 0 179 366'
xmlns='http://www.w3.org/2000/svg'
className={className}
>
<path
d="M124.414 81.1248C124.414 23.5658 96.8124 2.33325e-05 40.1669 1.83804e-05C33.9874 1.78402e-05 28.4258 0.625658 23.8941 1.66838C7.20943 5.63078 1.11774e-07 15.641 -9.27436e-07 27.5282C-2.03957e-06 40.2496 5.76754 47.7573 17.3026 50.8855C19.7745 51.7197 22.4522 52.1368 25.13 52.3453C46.5524 54.8479 54.5857 64.6496 54.5857 89.4667L54.5857 125.754C54.5857 155.993 75.5961 175.179 113.085 179.35L113.085 187.067C75.5961 191.238 54.5857 210.424 54.5857 240.663L54.5857 276.533C54.5857 301.559 46.5523 311.361 25.13 313.655C22.2462 314.072 19.5684 314.697 17.0966 315.115C5.56154 318.451 -2.70171e-05 325.959 -2.8111e-05 338.472C-2.90955e-05 349.733 6.38547 359.535 21.2163 363.706C26.3659 365.166 32.7514 366 40.1668 366C96.8124 366 124.414 342.434 124.414 285.084L124.414 258.598C124.414 234.824 133.066 222.728 155.724 218.349C170.967 215.429 179 205.21 179 183.313C179 163.501 171.173 150.779 155.724 148.068C132.654 143.689 124.414 131.593 124.414 107.819L124.414 81.1248Z"
d='M124.414 81.1248C124.414 23.5658 96.8124 2.33325e-05 40.1669 1.83804e-05C33.9874 1.78402e-05 28.4258 0.625658 23.8941 1.66838C7.20943 5.63078 1.11774e-07 15.641 -9.27436e-07 27.5282C-2.03957e-06 40.2496 5.76754 47.7573 17.3026 50.8855C19.7745 51.7197 22.4522 52.1368 25.13 52.3453C46.5524 54.8479 54.5857 64.6496 54.5857 89.4667L54.5857 125.754C54.5857 155.993 75.5961 175.179 113.085 179.35L113.085 187.067C75.5961 191.238 54.5857 210.424 54.5857 240.663L54.5857 276.533C54.5857 301.559 46.5523 311.361 25.13 313.655C22.2462 314.072 19.5684 314.697 17.0966 315.115C5.56154 318.451 -2.70171e-05 325.959 -2.8111e-05 338.472C-2.90955e-05 349.733 6.38547 359.535 21.2163 363.706C26.3659 365.166 32.7514 366 40.1668 366C96.8124 366 124.414 342.434 124.414 285.084L124.414 258.598C124.414 234.824 133.066 222.728 155.724 218.349C170.967 215.429 179 205.21 179 183.313C179 163.501 171.173 150.779 155.724 148.068C132.654 143.689 124.414 131.593 124.414 107.819L124.414 81.1248Z'
fill={fill}
/>
</svg>
Expand Down
10 changes: 5 additions & 5 deletions components/Stick.js → components/decorations/Stick.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,14 +3,14 @@ export default function Stick(props) {

return (
<svg
width="172"
height="412"
viewBox="0 0 172 412"
xmlns="http://www.w3.org/2000/svg"
width='172'
height='412'
viewBox='0 0 172 412'
xmlns='http://www.w3.org/2000/svg'
className={className}
>
<path
d="M36.5812 412C56.8032 412 68.1638 402.875 74.2985 382.343L169.955 49.0476C171.318 44.4851 172 40.1506 172 34.9037C172 13.9158 157.231 0 134.964 0C115.424 0 103.836 9.80952 97.4742 31.4817L2.04491 364.549C0.908851 368.656 0 373.446 0 378.921C0 397.172 12.9511 412 36.5812 412Z"
d='M36.5812 412C56.8032 412 68.1638 402.875 74.2985 382.343L169.955 49.0476C171.318 44.4851 172 40.1506 172 34.9037C172 13.9158 157.231 0 134.964 0C115.424 0 103.836 9.80952 97.4742 31.4817L2.04491 364.549C0.908851 368.656 0 373.446 0 378.921C0 397.172 12.9511 412 36.5812 412Z'
fill={fill}
/>
</svg>
Expand Down
18 changes: 9 additions & 9 deletions components/Footer.js → components/layout/Footer.js
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
import Link from 'next/link';
import footerStyles from '../styles/Footer.module.scss';
import { linksNav } from '../utils/links';
import NewsletterSubscribe from './mailchimp/NewsletterSubscribe';
import footerStyles from '@/styles/Footer.module.scss';
import { linksNav } from '@/utils/links';
import NewsletterSubscribe from '@/components/mailchimp/NewsletterSubscribe';
import Image from 'next/image';
import Container from './Container';
import Container from '@/components/containers/Container';

export default function Footer() {
return (
<footer className={footerStyles.footer}>
<NewsletterSubscribe />
<Container className={footerStyles.footer__inner}>
<nav className={footerStyles.footer__nav} aria-label="Main">
<nav className={footerStyles.footer__nav} aria-label='Main'>
<ul className={footerStyles.footer__navList}>
{linksNav.map(link => (
<li className={footerStyles.footer__navItem} key={link.text}>
Expand All@@ -21,13 +21,13 @@ export default function Footer() {
))}
</ul>
</nav>
<Link href="/">
<a className={footerStyles.footer__logo} title="Go to the Homepage">
<Link href='/'>
<a className={footerStyles.footer__logo} title='Go to the Homepage'>
<Image
src="/images/svg/logo.svg"
src='/images/svg/logo.svg'
height={250}
width={250}
alt="Logo"
alt='Logo'
/>
</a>
</Link>
Expand Down
12 changes: 6 additions & 6 deletions components/Hero.js → components/layout/Hero.js
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
import { useState } from 'react';
import Image from 'next/image';
import Nav from './Nav';
import Container from './Container';
import styles from '../styles/Hero.module.scss';
import Nav from '@/components/Nav';
import Container from '@/components/containers/Container';
import styles from '@/styles/Hero.module.scss';

export default function Hero({
title,
Expand All@@ -29,9 +29,9 @@ export default function Hero({
src={imgBg}
alt={imgAlt}
className={styles.imageBg}
layout="fill"
objectFit="cover"
objectPosition="center"
layout='fill'
objectFit='cover'
objectPosition='center'
priority
/>
<Container className={styles.header__content}>
Expand Down
10 changes: 5 additions & 5 deletions components/Layout.js → components/layout/Layout.js
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
import { useRouter } from 'next/router';
import { heroOptions } from '../utils/hero-options';
import Hero from './Hero';
import Meta from './Meta';
import Footer from './Footer';
import styles from '../styles/Layout.module.scss';
import { heroOptions } from '@/utils/hero-options';
import Hero from '@/components/layout/Hero';
import Meta from '@/components/layout/Meta';
import Footer from '@/components/layout/Footer';
import styles from '@/styles/Layout.module.scss';

export default function Layout({ children }) {
const router = useRouter();
Expand Down
Loading