diff --git a/package.json b/package.json index 343eb91..cc6cc37 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "format": "prettier --write --ignore-unknown ." }, "dependencies": { - "@fontsource/nunito": "^4.5.11", + "@fontsource/roboto-flex": "^4.5.2", "@mdx-js/react": "^2.1.5", "gatsby": "^5.0.0", "gatsby-plugin-image": "^3.2.0", diff --git a/src/_global.scss b/src/_global.scss index 80d9e51..1c587cf 100644 --- a/src/_global.scss +++ b/src/_global.scss @@ -1,4 +1,14 @@ @mixin vars { --color-base: white; --color-splash: #234ef6; + + --layout-width: 1000px; + --layout-padding: 20px; + --layout-slant: -30deg; +} + +@mixin boxConstraints { + max-width: var(--layout-width); + width: 100%; + margin: 0 auto; } diff --git a/src/index.scss b/src/index.scss index 8523f14..23cb3b6 100644 --- a/src/index.scss +++ b/src/index.scss @@ -1,6 +1,11 @@ -@use "@fontsource/nunito/scss/mixins" as Nunito; +@use "@fontsource/roboto-flex/scss/mixins" as RobotoFlex; +@import "./global"; -@include Nunito.fontFaceVariable($type: "wghtOnly"); +@include RobotoFlex.fontFaceVariable($type: "full"); + +:root { + @include vars; +} *, *::after, @@ -10,7 +15,8 @@ html, body, -#___gatsby { +#___gatsby, +#gatsby-focus-wrapper { width: 100%; min-height: 100vh; padding: 0; @@ -18,5 +24,13 @@ body, } body { - font-family: "NunitoVariable", "Nunito", "Nunito Sans", sans-serif; + font-family: "Roboto FlexVariable", "RobotoVariable", "Roboto Flex", + "Roboto", sans-serif; + color: var(--color-splash); + background-color: var(--color-base); +} + +a { + color: inherit; + text-decoration: underline dotted currentColor; } diff --git a/src/layout/Layout.module.scss b/src/layout/Layout.module.scss new file mode 100644 index 0000000..457bbdd --- /dev/null +++ b/src/layout/Layout.module.scss @@ -0,0 +1,58 @@ +@import "../global"; + +.layout { + min-height: 100vh; + display: flex; + flex-direction: column; + + .navigation { + position: sticky; + top: 0; + left: 0; + width: 100%; + z-index: 900; + background-color: var(--color-base); + + > .navigationBorder { + max-width: var(--layout-width); + width: 100%; + margin: 0 auto; + margin-top: -10px; + height: 15px; + background-image: repeating-linear-gradient( + var(--layout-slant), + white 0px, + var(--color-splash) 0.5px 3px, + white 3.5px 12px + ); + } + + > nav { + max-width: var(--layout-width); + width: 100%; + margin: 0 auto; + display: flex; + z-index: 905; + + a { + padding: var(--layout-padding); + text-decoration: none; + font-size: 1.3em; + font-weight: 700; + + &.logo { + margin-right: auto; + } + } + } + } + + .main { + flex-grow: 1; + } + + footer { + padding: var(--layout-padding); + text-align: center; + } +} diff --git a/src/layout/Layout.tsx b/src/layout/Layout.tsx new file mode 100644 index 0000000..707ba26 --- /dev/null +++ b/src/layout/Layout.tsx @@ -0,0 +1,36 @@ +import { Link } from "gatsby"; +import React from "react"; + +import "../index.scss"; +import * as styles from "./Layout.module.scss"; + +const Layout = ({ children }: React.PropsWithChildren<{}>) => { + return ( +