1
0
mirror of https://github.com/kremalicious/blog.git synced 2025-01-03 18:35:07 +01:00
This commit is contained in:
Matthias Kretschmann 2021-03-04 22:53:35 +01:00
parent 5e11ba6263
commit 4c963dcd16
Signed by: m
GPG Key ID: 606EEEF3C479A91F
16 changed files with 67 additions and 70 deletions

View File

@ -36,7 +36,7 @@
.document { .document {
margin-top: calc(var(--spacer) * 2.5); margin-top: calc(var(--spacer) * 2.5);
/* height of footer */ /* height of footer */
margin-bottom: calc(var(--spacer) * 18); margin-bottom: calc(var(--spacer) * 12);
position: relative; position: relative;
z-index: 2; z-index: 2;
min-height: 500px; min-height: 500px;

View File

@ -5,7 +5,7 @@
@media (min-width: 70rem) { @media (min-width: 70rem) {
.breakout { .breakout {
margin-left: -7rem; margin-left: -6rem;
margin-right: -7rem; margin-right: -6rem;
} }
} }

View File

@ -16,3 +16,6 @@
:global(.dark) .divider::before { :global(.dark) .divider::before {
border-bottom-color: var(--brand-grey); border-bottom-color: var(--brand-grey);
} }
.dividerTop {
}

View File

@ -8,7 +8,7 @@
margin-top: calc(var(--spacer) / 2); margin-top: calc(var(--spacer) / 2);
} }
.hamburgerLine { .line {
display: block; display: block;
position: absolute; position: absolute;
height: 1px; height: 1px;
@ -20,38 +20,38 @@
transition: 0.2s var(--easing); transition: 0.2s var(--easing);
} }
.hamburgerLine::nth-child(1) { .line:nth-child(1) {
top: 0; top: 0;
transform-origin: left center; transform-origin: left center;
} }
.hamburgerLine::nth-child(2) { .line:nth-child(2) {
top: 7px; top: 7px;
transform-origin: left center; transform-origin: left center;
} }
.hamburgerLine::nth-child(3) { .line:nth-child(3) {
top: 14px; top: 14px;
transform-origin: left center; transform-origin: left center;
} }
/* open state */ /* open state */
:global(.has-menu-open) .hamburgerLine::nth-child(1) { :global(.has-menu-open) .line:nth-child(1) {
transform: rotate(45deg); transform: rotate(45deg);
top: -1px; top: -1px;
} }
:global(.has-menu-open) .hamburgerLine::nth-child(2) { :global(.has-menu-open) .line:nth-child(2) {
width: 0%; width: 0%;
opacity: 0; opacity: 0;
} }
:global(.has-menu-open) .hamburgerLine::nth-child(3) { :global(.has-menu-open) .line:nth-child(3) {
transform: rotate(-45deg); transform: rotate(-45deg);
top: 16px; top: 16px;
} }
.hamburgerButton { .button {
padding: calc(var(--spacer) / 2); padding: calc(var(--spacer) / 2);
vertical-align: middle; vertical-align: middle;
display: inline-block; display: inline-block;
@ -59,12 +59,12 @@
margin-right: -1rem; margin-right: -1rem;
} }
.hamburgerButton:hover, .button:hover,
.hamburgerButton:focus { .button:focus {
outline: 0; outline: 0;
} }
.hamburgerButton:hover .hamburgerLine, .button:hover .line,
.hamburgerButton:focus .hamburgerLine { .button:focus .line {
border-color: var(--link-color); border-color: var(--link-color);
} }

View File

@ -10,13 +10,13 @@ export default function Hamburger({
<button <button
type="button" type="button"
title="Menu" title="Menu"
className={styles.hamburgerButton} className={styles.button}
onClick={onClick} onClick={onClick}
> >
<span className={styles.hamburger}> <span className={styles.hamburger}>
<span className={styles.hamburgerLine} /> <span className={styles.line} />
<span className={styles.hamburgerLine} /> <span className={styles.line} />
<span className={styles.hamburgerLine} /> <span className={styles.line} />
</span> </span>
</button> </button>
) )

View File

@ -37,7 +37,7 @@
margin-bottom: calc(var(--spacer) * var(--line-height)); margin-bottom: calc(var(--spacer) * var(--line-height));
display: block; display: block;
position: relative; position: relative;
transition: 0.2s var(--easing); transition: 0.2s ease-out;
} }
@media (min-width: 40rem) { @media (min-width: 40rem) {

View File

@ -26,7 +26,7 @@ export const imageSizeDefault = graphql`
original { original {
src src
} }
fluid(maxWidth: 940, quality: 85) { fluid(maxWidth: 950, quality: 85) {
...GatsbyImageSharpFluid_withWebp_noBase64 ...GatsbyImageSharpFluid_withWebp_noBase64
} }
} }

View File

@ -5,7 +5,6 @@
margin-bottom: 0; margin-bottom: 0;
font-size: var(--font-size-base); font-size: var(--font-size-base);
transition: color 0.2s ease-out; transition: color 0.2s ease-out;
color: var(--text-color);
} }
.post { .post {
@ -25,7 +24,7 @@
} }
.empty { .empty {
/* @include media-frame; */ composes: frame from '../atoms/Image.module.css';
display: block; display: block;
min-height: 95px; min-height: 95px;

View File

@ -1,17 +1,8 @@
.vcard {
margin-bottom: calc(var(--spacer) * 2);
}
.avatar { .avatar {
/* @include media-frame; */ composes: frame from '../atoms/Image.module.css';
border: 2px solid transparent;
margin-bottom: calc(var(--spacer) / 3);
}
.avatar,
.avatar img {
border-radius: 50%; border-radius: 50%;
overflow: hidden; margin-bottom: calc(var(--spacer) / 3);
} }
.description { .description {

View File

@ -29,7 +29,7 @@ export default function Vcard(): ReactElement {
const links = [twitter, github, rss, jsonfeed] const links = [twitter, github, rss, jsonfeed]
return ( return (
<div className={styles.vcard}> <>
<Img className={styles.avatar} fixed={avatar} alt="avatar" /> <Img className={styles.avatar} fixed={avatar} alt="avatar" />
<p className={styles.description}> <p className={styles.description}>
Blog of designer &amp; developer{' '} Blog of designer &amp; developer{' '}
@ -39,6 +39,6 @@ export default function Vcard(): ReactElement {
</p> </p>
<IconLinks links={links} /> <IconLinks links={links} />
</div> </>
) )
} }

View File

@ -17,22 +17,8 @@
} }
} }
.theme {
margin: var(--spacer) auto;
}
.theme p {
text-align: center;
margin: 0;
}
.themeTitle {
font-size: var(--font-size-h5);
margin-bottom: calc(var(--spacer) / 2);
}
.copyright { .copyright {
padding-top: var(--spacer); padding-top: calvar(--spacer);
padding-bottom: var(--spacer); padding-bottom: var(--spacer);
} }

View File

@ -14,7 +14,6 @@ kbd {
code, code,
samp { samp {
white-space: normal; white-space: normal;
color: inherit;
background-color: var(--box-background-color); background-color: var(--box-background-color);
border-radius: var(--border-radius); border-radius: var(--border-radius);
} }

View File

@ -49,7 +49,7 @@
--font-size-h5: var(--font-size-large); --font-size-h5: var(--font-size-large);
--font-size-h6: var(--font-size-base); --font-size-h6: var(--font-size-base);
--line-height: 1.7; --line-height: 1.6;
--line-height-small: 1.1428571429; --line-height-small: 1.1428571429;
--font-family-base: 'ff-tisa-sans-web-pro', 'Trebuchet MS', 'Helvetica Neue', --font-family-base: 'ff-tisa-sans-web-pro', 'Trebuchet MS', 'Helvetica Neue',
@ -65,7 +65,7 @@
--font-family-headings: 'brandon-grotesque', 'Avenir Next', 'Helvetica Neue', --font-family-headings: 'brandon-grotesque', 'Avenir Next', 'Helvetica Neue',
'Helvetica', 'Arial', 'sans-serif'; 'Helvetica', 'Arial', 'sans-serif';
--font-weight-headings: 700; --font-weight-headings: 700;
--line-height-headings: 1.4; --line-height-headings: 1.2;
/* Spacing /* Spacing
///////////////////////////////////// */ ///////////////////////////////////// */
@ -80,7 +80,7 @@
/* Code /* Code
///////////////////////////////////// */ ///////////////////////////////////// */
--code-color: var(--brand-light); --code-color: var(--brand-grey-light);
--kbd-color: var(--code-color); --kbd-color: var(--code-color);
/* Responsive breakpoints /* Responsive breakpoints
@ -109,16 +109,16 @@
/* Misc. /* Misc.
///////////////////////////////////// */ ///////////////////////////////////// */
--maxWidthContent: 47rem; --maxWidthContent: 45rem;
--maxWidthContainer: 80rem; --maxWidthContainer: 80rem;
--easing: cubic-bezier(0.75, 0, 0.08, 1); --easing: cubic-bezier(0.75, 0, 0.08, 1);
} }
.dark { .dark {
--body-background-color: #1d2224; --body-background-color: #161a1b;
--box-background-color: rgba(0, 0, 0, 0.1); --box-background-color: rgba(255, 255, 255, 0.03);
--text-color: #889da7; --text-color: var(--brand-grey-light);
--text-color-light: var(--brand-grey); --text-color-light: var(--brand-grey);
--text-color-dimmed: var(--brand-grey-dark); --text-color-dimmed: var(--brand-grey-dark);
--border-color: var(--brand-grey-dark); --border-color: var(--brand-grey-dark);

View File

@ -25,8 +25,8 @@ body {
color: var(--text-color); color: var(--text-color);
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
font-feature-settings: 'liga', 'kern'; font-feature-settings: 'liga', 'kern';
-webkit-font-smoothing: antialiased; /* -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale; */
min-height: 100vh; min-height: 100vh;
background: var(--body-background-color); background: var(--body-background-color);
transition: 0.4s var(--easing); transition: 0.4s var(--easing);
@ -41,7 +41,7 @@ body {
p, p,
ul, ul,
ol { ol {
margin: 0 0 var(--spacer); margin: 0 0 calc(var(--spacer) / var(--line-height));
} }
/* Reset fonts for relevant elements /* Reset fonts for relevant elements
@ -122,10 +122,8 @@ h6 {
line-height: var(--line-height-headings); line-height: var(--line-height-headings);
color: var(--color-headings); color: var(--color-headings);
font-weight: var(--font-weight-headings); font-weight: var(--font-weight-headings);
margin: 0 0 var(--spacer); margin: 0 0 calc(var(--spacer) / var(--line-height));
letter-spacing: -0.01em; letter-spacing: -0.01em;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
transition: color 0.2s ease-out; transition: color 0.2s ease-out;
} }
@ -138,6 +136,27 @@ h6 {
font-weight: 600; font-weight: 600;
} }
h1 .anchor.before,
h2 .anchor.before,
h3 .anchor.before,
h4 .anchor.before,
h5 .anchor.before,
h6 .anchor.before {
opacity: 0;
font-size: var(--font-size-h4);
bottom: 0;
top: 0.3em;
}
h1:hover .anchor,
h2:hover .anchor,
h3:hover .anchor,
h4:hover .anchor,
h5:hover .anchor,
h6:hover .anchor {
opacity: 1;
}
/* Responsive Media /* Responsive Media
///////////////////////////////////// */ ///////////////////////////////////// */
@ -180,7 +199,7 @@ ol {
li { li {
position: relative; position: relative;
margin-bottom: calc(var(--spacer) / 2); margin-bottom: calc(var(--spacer) / 8);
} }
li::before { li::before {

View File

@ -20,7 +20,7 @@
} }
.articles:first-of-type h1 { .articles:first-of-type h1 {
font-size: var(--font-size-h4); font-size: var(--font-size-h3);
} }
.articlesLast { .articlesLast {

View File

@ -21,7 +21,7 @@ export default function Home({ data }: PageProps): ReactElement {
</div> </div>
<div className={`${styles.articles} ${styles.articlesLast}`}> <div className={`${styles.articles} ${styles.articlesLast}`}>
{(data as any).latestArticles.edges {(data as any).latestArticles.edges
.slice(2, 5) .slice(2, 8)
.map(({ node }: { node: Post }) => ( .map(({ node }: { node: Post }) => (
<PostTeaser key={node.id} post={node} hideDate /> <PostTeaser key={node.id} post={node} hideDate />
))} ))}
@ -48,7 +48,7 @@ export const homeQuery = graphql`
latestArticles: allMarkdownRemark( latestArticles: allMarkdownRemark(
filter: { fields: { type: { ne: "photo" } } } filter: { fields: { type: { ne: "photo" } } }
sort: { order: DESC, fields: [fields___date] } sort: { order: DESC, fields: [fields___date] }
limit: 5 limit: 8
) { ) {
edges { edges {
node { node {