feat: styling, fix layout

This commit is contained in:
Aaron Yarborough 2024-03-13 14:33:42 +00:00
parent 299cef20ef
commit 1dd348a191
5 changed files with 52 additions and 13 deletions

View file

@ -1,6 +1,6 @@
/** @type {import('next-sitemap').IConfig} */ /** @type {import('next-sitemap').IConfig} */
module.exports = { module.exports = {
siteUrl: process.env.SITE_URL || 'https://www.aaronjy.me', siteUrl: process.env.SITE_URL || 'https://www.aaronjy.me',
generateRobotsTxt: true, // (optional) generateRobotsTxt: true // (optional)
// ...other options // ...other options
} }

View file

@ -4,18 +4,20 @@ import React from 'react'
function Article ({ attributes, html }) { function Article ({ attributes, html }) {
return ( return (
<section> <section>
<NextSeo title={attributes.title} description={attributes.desc} openGraph={ <NextSeo
title={attributes.title} description={attributes.desc} openGraph={
{ {
title: attributes.title, title: attributes.title,
description: attributes.desc description: attributes.desc
} }
} /> }
<article> />
<div>
<h1>{attributes.title}</h1> <h1>{attributes.title}</h1>
<p>{attributes.desc}</p> <p>{attributes.desc}</p>
<hr /> <hr />
<div dangerouslySetInnerHTML={{ __html: html }} /> <div dangerouslySetInnerHTML={{ __html: html }} />
</article> </div>
</section> </section>
) )
} }

View file

@ -4,17 +4,17 @@ import style from './DefaultLayout.module.css'
import Header from '@/components/Header/Header' import Header from '@/components/Header/Header'
import Footer from '@/components/Footer/Footer' import Footer from '@/components/Footer/Footer'
import { Barlow } from 'next/font/google' import { Fira_Sans as FiraSans} from 'next/font/google'
const fontMain = Barlow({ subsets: ['latin'], weight: ['400', '600'] }) const fontMain = FiraSans({ subsets: ['latin'], weight: ['400', '600'] })
function DefaultLayout ({ children }) { function DefaultLayout ({ children }) {
return ( return (
<div className={style.layout}> <main className={`${style.layout} ${fontMain.className}`}>
<Header /> <Header />
<main className={`${fontMain.className}`}>{children}</main> <article>{children}</article>
<Footer /> <Footer />
</div> </main>
) )
} }

View file

@ -9,7 +9,10 @@ function Fun ({ entries }) {
<DefaultLayout> <DefaultLayout>
<section> <section>
<h1>Writing</h1> <h1>Writing</h1>
<p>Hobby projects, helpful scripts, and other fun bits and bobs!</p> <p>
Come get ya thoughts, ramblings, technical writing and other
long-from text content here!
</p>
</section> </section>
<section> <section>

View file

@ -1,12 +1,26 @@
:root {
--color-default: #30362F;
--color-primary: #DA7422;
--color-bg: #FFFBDB;
}
html, body { html, body {
margin: 0; margin: 0;
padding: 0 15px; }
body {
background-color: var(--color-bg);
color: var(--color-default)
} }
h1, h2, h3 { h1, h2, h3 {
font-weight: 600; font-weight: 600;
} }
a {
color: var(--color-primary)
}
ul { ul {
margin-left: 0; margin-left: 0;
list-style: inside; list-style: inside;
@ -19,4 +33,24 @@ ul li:not(:last-child) {
article { article {
border: none; border: none;
background: none;
}
article img {
border: 1px solid var(--color-default);
}
pre {
background-color: var(--color-default);
border-radius: 5px;
padding: 18px;
}
pre code {
color: var(--color-bg);
}
code:not(pre > code) {
background-color: var(--color-default);
color: var(--color-bg)
} }