Orri sekundarioak css modulesera pasatzen ditu (#14)

* refactor: extract component

* refactor: extract component

* refactor: use comonent

* feat: Orrialde basikoa CSS modulesera pasatzen du

* chore: erabiltzen ez den konponentea kentzen du

* feat: Oina CSS modulesera pasatzen du

* refactor: CSS variable

* chore: erabiltzen ez den tema kentzen du

* chore: erabiltzen ez den objektua kentzen du

* chore: dependentziak kentzen ditu
This commit is contained in:
Aitor Urrutia
2023-12-26 11:43:01 +01:00
committed by GitHub
parent 311e25cdd7
commit 2646b21712
36 changed files with 209 additions and 783 deletions

View File

@@ -2,7 +2,7 @@
.contentWrapper {
padding: var(--size-huge) 0;
font-weight: 300;
font-weight: var(--font-weight-regular);
@include largeFont;
}
@@ -24,7 +24,7 @@
@include largeFont;
padding: var(--size-base);
background: var(--color-zuria);
font-weight: 700;
font-weight: var(--font-weight-bold);
cursor: pointer;
display: flex;
align-items: center;

View File

@@ -27,7 +27,7 @@
.izena {
text-align: left;
font-weight: 300;
font-weight: var(--font-weight-regular);
padding: 0 var(--size-xtiny);
vertical-align: top;
}
@@ -35,7 +35,7 @@
.prezioa {
width: var(--size-huge);
text-align: right;
font-weight: 300;
font-weight: var(--font-weight-regular);
padding: 0 var(--size-xtiny);
vertical-align: top;
}
@@ -58,7 +58,7 @@
.alergenoa {
color: var(--color-morea);
font-weight: 700;
font-weight: var(--font-weight-bold);
&:not(:last-child)::after {
content: ', ';

View File

@@ -0,0 +1,20 @@
import React from 'react';
import { Link } from 'gatsby';
import { Container } from '../../components/Container';
import { Gainburua } from '../../components/Gainburua';
export const NotFound: React.FC = () => (
<>
<Gainburua />
<Container>
<main>
<h1>404: Ez dugu bilatzen duzun orria topatu</h1>
<br />
<Link to="/">Hasierara bueltatu</Link>
</main>
</Container>
</>
);

View File

@@ -0,0 +1 @@
export { NotFound } from './NotFound';

View File

@@ -0,0 +1,65 @@
@import '../../styles/tools/mixins/font.scss';
.atala {
padding-top: var(--size-base);
}
.edukia {
font-weight: var(--font-weight-regular);
@include baseFont;
p:not(-last-child) {
margin-bottom: var(--size-base);
}
h1 {
@include gargantuanFont;
font-weight: var(--font-weight-bold);
margin-bottom: var(--size-base);
}
h2 {
@include hugeFont;
font-weight: var(--font-weight-bold);
margin-bottom: var(--size-base);
}
h3 {
@include largeFont;
font-weight: var(--font-weight-bold);
margin-bottom: var(--size-base);
}
h4 {
font-weight: var(--font-weight-bold);
margin-bottom: var(--size-mini);
}
ul {
margin-bottom: var(--size-base);
}
li {
list-style: disc inside;
margin-bottom: var(--size-small);
}
table {
margin-bottom: var(--size-base);
}
th {
padding: var(--size-small);
}
td {
padding: var(--size-small);
border: 1px solid var(--color-beltza);
}
hr {
border: 2px solid var(--color-beltza);
margin-bottom: var(--size-base);
margin-top: var(--size-base);
}
}

View File

@@ -0,0 +1,34 @@
import React from 'react';
import ReactMarkdown from 'react-markdown';
import remarkGfm from 'remark-gfm';
import { Container } from '../../components/Container';
import { Gainburua } from '../../components/Gainburua';
import { Oina } from '../../components/Oina';
import * as styles from './RegularPage.module.scss';
import { RegularPageContent } from './RegularPageContent';
interface Props {
content: RegularPageContent;
}
export const RegularPage: React.FC<Props> = ({ content }) => {
const { edukia } = content;
return (
<>
<Gainburua />
<Container>
<section className={styles.atala}>
<ReactMarkdown remarkPlugins={[remarkGfm]} className={styles.edukia}>
{edukia}
</ReactMarkdown>
</section>
</Container>
<Oina />
</>
);
};

View File

@@ -0,0 +1,4 @@
export interface RegularPageContent {
izenburua: string;
edukia: string;
}

View File

@@ -0,0 +1 @@
export { RegularPage } from './RegularPage';