diff --git a/src/components/Layout.module.css b/src/components/Layout.module.css index e0d11a4e..81185618 100644 --- a/src/components/Layout.module.css +++ b/src/components/Layout.module.css @@ -1,7 +1,7 @@ .content { - padding: 0 var(--spacer); + padding: 0 calc(var(--spacer) / 1.5); width: 100%; - max-width: var(--maxWidthContent); + max-width: var(--maxWidthContainer); margin-left: auto; margin-right: auto; } @@ -23,7 +23,7 @@ } :global(.has-menu-open) .document { - transform: translate3d(0, calc(var(--spacer) * 3.5), 0); + transform: translate3d(0, calc(var(--spacer) * 2), 0); } @media (min-width: 60rem) { diff --git a/src/components/atoms/Container.module.css b/src/components/atoms/Container.module.css index e27eb2ee..41fff378 100644 --- a/src/components/atoms/Container.module.css +++ b/src/components/atoms/Container.module.css @@ -1,5 +1,10 @@ .container { - max-width: 37rem; + width: 100%; + max-width: var(--maxWidthContent); margin-left: auto; margin-right: auto; } + +.wide { + max-width: none; +} diff --git a/src/components/atoms/Container.tsx b/src/components/atoms/Container.tsx deleted file mode 100644 index 081a679e..00000000 --- a/src/components/atoms/Container.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import React, { ReactElement } from 'react' -import styles from './Container.module.css' - -export default function Container({ - children -}: { - children: any -}): ReactElement { - return
{children}
-} diff --git a/src/components/atoms/Exif.module.css b/src/components/atoms/Exif.module.css index d09d820b..0511445d 100644 --- a/src/components/atoms/Exif.module.css +++ b/src/components/atoms/Exif.module.css @@ -48,7 +48,6 @@ } .map { - composes: breakout from './Breakout.module.css'; composes: frame from './Image.module.css'; height: 180px; margin-top: calc(var(--spacer) * 2); diff --git a/src/components/atoms/Image.module.css b/src/components/atoms/Image.module.css index c86773b1..df43f78e 100644 --- a/src/components/atoms/Image.module.css +++ b/src/components/atoms/Image.module.css @@ -19,8 +19,8 @@ } .frame { - border-top: 2px solid transparent; - border-bottom: 2px solid transparent; + border-top: var(--stroke-width) solid rgba(255, 255, 255, 0.2); + border-bottom: var(--stroke-width) solid rgba(255, 255, 255, 0.2); border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--box-shadow); @@ -38,7 +38,7 @@ @media (min-width: 40rem) { .image { - border: 2px solid transparent; + border: var(--stroke-width) solid rgba(255, 255, 255, 0.2); } } diff --git a/src/components/atoms/Image.tsx b/src/components/atoms/Image.tsx index 09f9ce44..d840436a 100644 --- a/src/components/atoms/Image.tsx +++ b/src/components/atoms/Image.tsx @@ -16,7 +16,13 @@ export const Image = ({ className={`${styles.image} ${className ? className : ''}`} data-original={original && original.src} > - {alt} + {alt} {title &&
{title}
} ) diff --git a/src/components/atoms/Input.module.css b/src/components/atoms/Input.module.css index 9c1f8a8b..bf115b89 100644 --- a/src/components/atoms/Input.module.css +++ b/src/components/atoms/Input.module.css @@ -8,7 +8,7 @@ color: var(--input-color); background-color: var(--input-bg); background-image: none; - border: 0; + border: var(--stroke-width) solid transparent; border-radius: var(--border-radius); box-shadow: none; transition: all ease-in-out 0.15s; diff --git a/src/components/atoms/Input.tsx b/src/components/atoms/Input.tsx index 1fb283c8..22ad8698 100644 --- a/src/components/atoms/Input.tsx +++ b/src/components/atoms/Input.tsx @@ -1,6 +1,6 @@ import React, { ReactElement } from 'react' import styles from './Input.module.css' -export default function Input(props: any): ReactElement { - return +export default function Input({ className, ...props }: any): ReactElement { + return } diff --git a/src/components/molecules/Menu.module.css b/src/components/molecules/Menu.module.css index 5264dc89..5f306877 100644 --- a/src/components/molecules/Menu.module.css +++ b/src/components/molecules/Menu.module.css @@ -1,10 +1,7 @@ .menu { - composes: divider from '../atoms/Divider.module.css'; - margin-top: 0; - padding-top: calc(var(--spacer) / 2); position: absolute; - top: calc(100% + calc(var(--spacer) / 1.5)); + top: 100%; left: 0; width: 100%; } @@ -40,20 +37,6 @@ text-align: center; } -/* .menu a:hover, -.menu a:focus { - color: var(--link-color-hover); -} */ -/* - :global(.dark) & { - color: $text-color--dark; - text-shadow: 0 -1px 0 rgba(#000, 0.5); - - &:hover, - &:focus { - color: $link-color-hover; - } */ - .menu::-webkit-scrollbar, .menu::-moz-scrollbar, .menu::-webkit-scrollbar-thumb, diff --git a/src/components/molecules/RelatedPosts.module.css b/src/components/molecules/RelatedPosts.module.css index 5a093bb4..f8cca035 100644 --- a/src/components/molecules/RelatedPosts.module.css +++ b/src/components/molecules/RelatedPosts.module.css @@ -1,12 +1,12 @@ +.relatedPosts { + composes: container from '../atoms/Container.module.css'; +} + .title { font-size: var(--font-size-h3); margin-bottom: var(--spacer); } -.relatedPosts { - margin-top: -4rem; -} - .relatedPosts ul { display: grid; gap: calc(var(--spacer) / 2); diff --git a/src/components/molecules/Search/SearchResults.module.css b/src/components/molecules/Search/SearchResults.module.css index b8a1b13f..b63239ee 100644 --- a/src/components/molecules/Search/SearchResults.module.css +++ b/src/components/molecules/Search/SearchResults.module.css @@ -12,7 +12,9 @@ height: 91vh; } -.searchResults ul { +.results { + composes: container from '../../atoms/Container.module.css'; + composes: wide from '../../atoms/Container.module.css'; padding: var(--spacer) calc(var(--spacer) / 2); margin-bottom: 0; display: flex; @@ -21,42 +23,42 @@ } @media (min-width: 60rem) { - .searchResults ul { + .results { padding-left: 0; padding-right: 0; } } -.searchResults ul li { +.results li { display: block; flex: 0 0 48%; margin-bottom: var(--spacer); } @media (min-width: 40rem) { - .searchResults ul li { + .results li { flex-basis: 31%; } } -.searchResults ul li::before { +.results li::before { display: none; } -.searchResults img { +.results img { margin-bottom: 0; } -.searchResults a { +.results a { display: block; } -.searchResults a > div { +.results a > div { margin-bottom: 0; } -.searchResults a:hover h4, -.searchResults a:focus h4 { +.results a:hover h4, +.results a:focus h4 { color: var(--link-color); } diff --git a/src/components/molecules/Search/SearchResults.tsx b/src/components/molecules/Search/SearchResults.tsx index 6502caf8..d1be94c2 100644 --- a/src/components/molecules/Search/SearchResults.tsx +++ b/src/components/molecules/Search/SearchResults.tsx @@ -1,7 +1,6 @@ import React, { ReactElement } from 'react' import ReactDOM from 'react-dom' import { graphql, useStaticQuery } from 'gatsby' -import Container from '../../atoms/Container' import PostTeaser from '../PostTeaser' import SearchResultsEmpty from './SearchResultsEmpty' import styles from './SearchResults.module.css' @@ -36,25 +35,23 @@ function SearchResultsPure({ }) { return (
- - {results.length > 0 ? ( - - ) : ( - - )} - + {results.length > 0 ? ( + + ) : ( + + )}
) } diff --git a/src/components/organisms/Footer.tsx b/src/components/organisms/Footer.tsx index c4558f28..0078d713 100644 --- a/src/components/organisms/Footer.tsx +++ b/src/components/organisms/Footer.tsx @@ -1,6 +1,5 @@ import React, { ReactElement, PureComponent } from 'react' import { Link } from 'gatsby' -import Container from '../atoms/Container' import Icon from '../atoms/Icon' import Vcard from '../molecules/Vcard' import { useSiteMetadata } from '../../hooks/use-site-metadata' @@ -35,10 +34,8 @@ export default class Footer extends PureComponent { render(): ReactElement { return ( ) } diff --git a/src/components/organisms/Header.module.css b/src/components/organisms/Header.module.css index dd421e6f..30487395 100644 --- a/src/components/organisms/Header.module.css +++ b/src/components/organisms/Header.module.css @@ -1,13 +1,3 @@ -.header { - padding: 0 calc(var(--spacer) / var(--line-height)); -} - -@media (min-width: 40rem) { - .header { - padding: 0 calc(var(--spacer) * 2); - } -} - @media (min-width: 40rem) and (min-height: 500px) { .header { position: fixed; @@ -20,18 +10,16 @@ } .headerContent { + padding: 0 calc(var(--spacer) / 1.5); + max-width: var(--maxWidthContainer); + margin-left: auto; + margin-right: auto; position: relative; display: flex; justify-content: space-between; align-items: center; } -@media (min-width: 40rem) { - .headerContent { - padding: 0; - } -} - /* Logo ///////////////////////////////////// */ diff --git a/src/components/templates/Archive.tsx b/src/components/templates/Archive.tsx index 8e0e489d..d41f6ce1 100644 --- a/src/components/templates/Archive.tsx +++ b/src/components/templates/Archive.tsx @@ -35,7 +35,11 @@ export default function Archive({ } return ( - +
{PostsList}
{numPages > 1 && }
diff --git a/src/components/templates/Page.module.css b/src/components/templates/Page.module.css index 4a770168..a0a8e6c6 100644 --- a/src/components/templates/Page.module.css +++ b/src/components/templates/Page.module.css @@ -1,10 +1,7 @@ .pagetitle { - composes: divider from '../atoms/Divider.module.css'; - font-size: var(--font-size-h3); margin-top: 0; - margin-bottom: calc(var(--spacer) * var(--line-height)); - padding-bottom: calc(var(--spacer) / var(--line-height)); + margin-bottom: var(--spacer); color: var(--text-color-light); display: flex; justify-content: space-between; diff --git a/src/components/templates/Post/Actions.module.css b/src/components/templates/Post/Actions.module.css index 7f7da958..ec080cca 100644 --- a/src/components/templates/Post/Actions.module.css +++ b/src/components/templates/Post/Actions.module.css @@ -1,6 +1,4 @@ .actions { - composes: breakout from '../../atoms/Breakout.module.css'; - margin-top: calc(var(--spacer) * 2); margin-bottom: calc(var(--spacer) * 2); background: var(--box-background-color); @@ -8,7 +6,6 @@ padding-bottom: var(--spacer); border-radius: var(--border-radius); display: grid; - gap: calc(var(--spacer) / 2); } @media (min-width: 40rem) { @@ -25,14 +22,13 @@ .actionTitle { font-size: var(--font-size-base); color: var(--text-color); - margin-top: 0; - margin-bottom: calc(var(--spacer) / 4); - transition: color 0.2s ease-out; + margin: 0; + transition: 0.2s ease-out; } .actionText { font-size: var(--font-size-small); - color: var(--brand-grey-light); + color: var(--text-color-light); margin-bottom: 0; transition: color 0.2s ease-out; } @@ -42,11 +38,11 @@ margin: 0; padding-top: var(--spacer); padding-bottom: var(--spacer); - padding-left: calc(var(--spacer) * 2); + padding-left: calc(var(--spacer) * 1.5); padding-right: calc(var(--spacer) / 2); position: relative; text-align: left; - border-bottom: 1px dashed var(--border-color); + border-bottom: var(--stroke-width) solid var(--body-background-color); } .action:last-child { @@ -56,7 +52,7 @@ @media (min-width: 40rem) { .action { border-bottom: 0; - border-left: 1px dashed var(--border-color); + border-left: var(--stroke-width) solid var(--body-background-color); } .action:first-child { @@ -73,7 +69,7 @@ width: 20px; height: 20px; position: absolute; - left: var(--spacer); + left: calc(var(--spacer) / 1.5); top: calc(var(--spacer) / 1.05); stroke: var(--text-color-light); } diff --git a/src/components/templates/Post/Actions.tsx b/src/components/templates/Post/Actions.tsx index 1b1ca11f..8c9f97ea 100644 --- a/src/components/templates/Post/Actions.tsx +++ b/src/components/templates/Post/Actions.tsx @@ -48,12 +48,12 @@ export default function PostActions({ /> diff --git a/src/components/templates/Post/PrevNext.module.css b/src/components/templates/Post/PrevNext.module.css index 36729d73..5ccc51b1 100644 --- a/src/components/templates/Post/PrevNext.module.css +++ b/src/components/templates/Post/PrevNext.module.css @@ -1,7 +1,6 @@ .prevnext { - composes: divider from '../../atoms/Divider.module.css'; - - margin-top: calc(var(--spacer) * 4); + composes: container from '../../atoms/Container.module.css'; + margin-top: calc(var(--spacer) * 2); padding-top: calc(var(--spacer) * 2); display: grid; gap: var(--spacer); diff --git a/src/components/templates/Post/index.module.css b/src/components/templates/Post/index.module.css index c8a21341..12b1db05 100644 --- a/src/components/templates/Post/index.module.css +++ b/src/components/templates/Post/index.module.css @@ -1,7 +1,7 @@ .hentry { + composes: container from '../../atoms/Container.module.css'; width: 100%; - padding-top: var(--spacer); - padding-bottom: calc(var(--spacer) * 3); + padding-bottom: var(--spacer); } .hentry > a { diff --git a/src/global/_variables.css b/src/global/_variables.css index 6236a0f4..ef363d9f 100644 --- a/src/global/_variables.css +++ b/src/global/_variables.css @@ -9,7 +9,7 @@ --brand-grey: #4e5d63; --brand-grey-dark: #323c41; - --brand-grey-light: #70858e; + --brand-grey-light: #7f97a1; --brand-grey-dimmed: #c3d8e0; --alert-info: #f7f1e4; @@ -113,7 +113,7 @@ ///////////////////////////////////// */ --maxWidthContent: 45rem; - --maxWidthContainer: 80rem; + --maxWidthContainer: 70rem; --easing: cubic-bezier(0.75, 0, 0.08, 1); } @@ -126,4 +126,7 @@ --text-color-dimmed: var(--brand-grey-dark); --border-color: var(--brand-grey-dark); --color-headings: var(--brand-main-light); + + --input-bg: var(--body-background-color); + --input-color: var(--text-color); } diff --git a/src/global/global.css b/src/global/global.css index ffb1c1f4..da61e89c 100644 --- a/src/global/global.css +++ b/src/global/global.css @@ -359,3 +359,7 @@ td { .gatsby-resp-image-figure { margin-bottom: var(--spacer); } + +.gatsby-image-wrapper { + max-height: 100vh; +} diff --git a/src/pages/index.module.css b/src/pages/index.module.css index 4a2ba000..a1e23927 100644 --- a/src/pages/index.module.css +++ b/src/pages/index.module.css @@ -1,5 +1,5 @@ .section { - composes: breakout from '../components/atoms/Breakout.module.css'; + composes: container.wide from '../components/atoms/Container.module.css'; } .section:not(:first-child) {