Major improvements to SCSS code

dependabot/npm_and_yarn/typescript-eslint/parser-4.33.0
Guusvanmeerveld 3 years ago
parent 5a56643ead
commit 8c309699cc

@ -5,13 +5,6 @@
padding-top: 4rem; padding-top: 4rem;
} }
.input,
.textarea {
border-color: var(--borders);
color: var(--foreground);
background-color: var(--secondary);
}
.textarea { .textarea {
resize: none; resize: none;
height: 10rem; height: 10rem;

@ -10,6 +10,15 @@
width: 100%; width: 100%;
} }
.select {
border-color: var(--borders);
color: var(--foreground);
background-color: var(--secondary);
width: 7.5rem;
margin-bottom: 0;
}
.header { .header {
font-size: 1.75rem; font-size: 1.75rem;
} }

@ -21,6 +21,11 @@ const Navbar: FC = () => {
<div className="container"> <div className="container">
<span className={styles.header}>Portfolio</span> <span className={styles.header}>Portfolio</span>
<div className={styles.items}> <div className={styles.items}>
<select id="" className={styles.select}>
<option value="nl">NL</option>
<option value="en">EN</option>
</select>
<Link href="/#projects"> <Link href="/#projects">
<a>{t('nav.projects')}</a> <a>{t('nav.projects')}</a>
</Link> </Link>
@ -42,6 +47,8 @@ const Navbar: FC = () => {
export const getStaticProps: GetStaticProps = async ({ locale }) => { export const getStaticProps: GetStaticProps = async ({ locale }) => {
const { default: lngDict = {} } = await import(`../locales/${locale}.json`); const { default: lngDict = {} } = await import(`../locales/${locale}.json`);
console.log(lngDict);
return { return {
props: { lngDict }, props: { lngDict },
}; };

@ -0,0 +1,21 @@
.body {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
.header {
font-size: 5rem;
}
.subtitle {
font-size: 3rem;
}
.link {
margin-top: 1.5rem;
}

@ -0,0 +1,20 @@
import Link from 'next/link';
import { FC } from 'react';
import styles from './PageBuilder.module.scss';
const PageBuilder: FC<{ header: string; subtitle: string }> = ({ header, subtitle, children }) => (
<div className={styles.body}>
<div>
{children}
<div className={styles.header}>{header}</div>
<div className={styles.subtitle}>{subtitle}</div>
<Link href="/">
<a className={styles.link + ' button'}>Go back</a>
</Link>
</div>
</div>
);
export default PageBuilder;

@ -4,8 +4,8 @@
padding: 5rem 0; padding: 5rem 0;
} }
.title { .description {
font-size: 4rem; margin-bottom: 2rem;
} }
.right { .right {

@ -16,10 +16,9 @@ const Project: FC<ProjectComponent> = ({ name, description, buttons, cover, righ
<div className={styles.body}> <div className={styles.body}>
<div className={styles.content}> <div className={styles.content}>
<div className={right ? styles.right : styles.info}> <div className={right ? styles.right : styles.info}>
<div className={styles.title}>{name}</div> <h2>{name}</h2>
{description} <div className={styles.description}>{description}</div>
<br />
<br />
{buttons.map((button, i) => ( {buttons.map((button, i) => (
<Link href={button.link} key={i}> <Link href={button.link} key={i}>
<a className={styles.button + ' button'}>{button.text}</a> <a className={styles.button + ' button'}>{button.text}</a>

@ -1,22 +1,16 @@
import Link from 'next/link';
import { FC } from 'react'; import { FC } from 'react';
import Page from '@components/Page'; import Page from '@components/Page';
import Layout from '@components/Layout'; import Layout from '@components/Layout';
import PageBuilder from '@components/PageBuilder';
const NotFound: FC = () => ( const NotFound: FC = () => (
<Page title="Page not found" description="This page either doesn't exist or has been deleted"> <Page title="Page not found" description="This page either doesn't exist or has been deleted">
<Layout> <Layout>
<div className="page"> <PageBuilder
<div> header="Not found"
<div className="header">Not found</div> subtitle="This page either doesn't exist or has been deleted"
<div className="subtitle">This page either doesn&apos;t exist or has been deleted</div> />
<Link href="/">
<a className="link button">Go back</a>
</Link>
</div>
</div>
</Layout> </Layout>
</Page> </Page>
); );

@ -12,23 +12,14 @@
.profile { .profile {
margin: auto; margin: auto;
margin-bottom: 3rem; margin-bottom: 3rem;
display: block;
}
.title {
font-size: 4rem;
display: block;
} }
.subtitle { .subtitle {
margin-top: 2rem; margin-top: 2rem;
margin-bottom: 4rem; margin-bottom: 4rem;
display: block;
font-size: 2rem;
} }
.header { .projectsHeader {
font-size: 4rem;
text-align: center; text-align: center;
margin-bottom: 3rem; margin-bottom: 3rem;
} }

@ -10,7 +10,7 @@ import Page from '@components/Page';
import Project from '@components/Project'; import Project from '@components/Project';
import projects from '@config/projects.json'; import projects from '@config/projects.json';
import styles from './Home.module.scss'; import styles from './home.module.scss';
const Home: NextPage = () => { const Home: NextPage = () => {
const { t } = useI18n(); const { t } = useI18n();
@ -20,12 +20,12 @@ const Home: NextPage = () => {
<Layout> <Layout>
<div className={styles.body}> <div className={styles.body}>
<div className={styles.content + ' container'}> <div className={styles.content + ' container'}>
<span className={styles.profile + ' profile'}> <div className={styles.profile + ' profile'}>
<Image src="/assets/images/profile.svg" width={100} height={100} alt="" /> <Image src="/assets/images/profile.svg" width={100} height={100} alt="" />
</span> </div>
<span className={styles.title}>Guus van Meerveld</span> <h1>Guus van Meerveld</h1>
<span className={styles.subtitle}>{t('pages.home.subtitle')}</span> <h4 className={styles.subtitle}>{t('pages.home.subtitle')}</h4>
<a href="#projects" className="button"> <a href="#projects" className="button">
{t('pages.home.projects.button')} {t('pages.home.projects.button')}
@ -35,9 +35,9 @@ const Home: NextPage = () => {
<div className={styles.projects}> <div className={styles.projects}>
<div className="container"> <div className="container">
<div className={styles.header} id="projects"> <h1 className={styles.projectsHeader} id="projects">
Projects {t('nav.projects')}
</div> </h1>
{projects.map((project, i) => { {projects.map((project, i) => {
const props = { ...project, right: (i + 1) % 2 == 0 }; const props = { ...project, right: (i + 1) % 2 == 0 };

@ -14,7 +14,7 @@ import Page from '@components/Page';
import Shift from '@models/shifts'; import Shift from '@models/shifts';
import styles from './Shifts.module.scss'; import styles from './shifts.module.scss';
interface APIResponse { interface APIResponse {
updated: Date; updated: Date;

@ -0,0 +1,3 @@
.icon {
font-size: 10rem;
}

@ -1,26 +1,21 @@
import { NextPage } from 'next'; import { NextPage } from 'next';
import Link from 'next/link';
import Page from '@components/Page'; import Page from '@components/Page';
import Layout from '@components/Layout'; import Layout from '@components/Layout';
import PageBuilder from '@components/PageBuilder';
import styles from './thanks.module.scss';
const Thanks: NextPage = () => ( const Thanks: NextPage = () => (
<Page title="Thanks!" description="Thanks for submitting your contact form!"> <Page title="Thanks!" description="Thanks for submitting your contact form!">
<Layout> <Layout>
<div className="page"> <PageBuilder header="Thank you!" subtitle="Your submission is greatly appreciated!">
<div> <div className={styles.icon}>
<div className="icon"> <span role="img" aria-label="heart emoji">
<span role="img" aria-label="heart emoji">
</span>
</span>
</div>
<div className="header">Thank you!</div>
<div className="subtitle">Your submission is greatly appreciated!</div>
<Link href="/">
<a className="link button">Go back</a>
</Link>
</div> </div>
</div> </PageBuilder>
</Layout> </Layout>
</Page> </Page>
); );

@ -0,0 +1,7 @@
body {
margin: 0;
background-color: var(--background);
color: var(--foreground);
font-family: 'Raleway';
}

@ -0,0 +1,4 @@
.button {
background-color: var(--primary);
border-color: var(--primary);
}

@ -0,0 +1,7 @@
input,
textarea,
select {
&:focus {
border-color: var(--primary);
}
}

@ -0,0 +1,3 @@
a {
color: var(--primary);
}

@ -0,0 +1,4 @@
td,
th {
border-color: var(--borders);
}

@ -16,35 +16,10 @@
--secondary: #1c1c1c; --secondary: #1c1c1c;
--borders: #3c3838; --borders: #3c3838;
--foreground: rgb(236, 235, 235); --foreground: rgb(236, 235, 235);
td,
th {
border-color: var(--borders);
}
}
body {
margin: 0;
background-color: var(--background);
color: var(--foreground);
font-family: 'Raleway';
}
a {
color: var(--primary);
}
.button {
background-color: var(--primary);
border-color: var(--primary);
}
input:focus,
textarea:focus,
select:focus,
input[type='email']:focus {
border-color: var(--primary);
} }
@import 'page.scss'; @import './global/body.scss';
@import './global/link.scss';
@import './global/input.scss';
@import './global/table.scss';
@import './global/button.scss';

@ -1,25 +0,0 @@
.page {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
.icon {
font-size: 10rem;
}
.header {
font-size: 5rem;
}
.subtitle {
font-size: 3rem;
}
.link {
margin-top: 1.5rem;
}
}
Loading…
Cancel
Save