mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-09-11 02:35:52 +02:00
added read time on index and post pages
This commit is contained in:
@@ -9,13 +9,23 @@
|
||||
.title {
|
||||
font-size: $typographic-base-font-size * 2;
|
||||
font-weight: 600;
|
||||
margin-bottom: 0px !important;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
max-width: $layout-post-width;
|
||||
text-align: center;
|
||||
@include line-height(1.65);
|
||||
@include margin-top(1);
|
||||
@include margin-bottom(0);
|
||||
}
|
||||
|
||||
.subTitle {
|
||||
font-size: $typographic-base-font-size;
|
||||
font-style: italic;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 0px;
|
||||
max-width: $layout-post-width;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.body {
|
||||
@@ -48,7 +58,7 @@
|
||||
max-width: $layout-post-width;
|
||||
}
|
||||
|
||||
h2 > a {
|
||||
h2>a {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
@@ -80,7 +90,7 @@
|
||||
@include margin-bottom(1.125);
|
||||
}
|
||||
|
||||
h2 > a {
|
||||
h2>a {
|
||||
visibility: unset;
|
||||
@include padding-right(1);
|
||||
}
|
||||
|
@@ -6,15 +6,17 @@ import * as styles from "./Content.module.scss";
|
||||
interface Props {
|
||||
title: string;
|
||||
body: string;
|
||||
subTitle?: string;
|
||||
}
|
||||
|
||||
const Content: React.FC<Props> = ({ body, title }: Props) => {
|
||||
const Content: React.FC<Props> = ({ body, title, subTitle }: Props) => {
|
||||
const { author } = useSiteMetadata();
|
||||
return (
|
||||
<>
|
||||
<PostHeader author={author} />
|
||||
<div className={styles.content}>
|
||||
<h1 className={styles.title}>{title}</h1>
|
||||
<h2 className={styles.subTitle}>- {subTitle}</h2>
|
||||
<div className={styles.body} dangerouslySetInnerHTML={{ __html: body }} />
|
||||
</div>
|
||||
</>
|
||||
|
@@ -138,6 +138,9 @@ exports[`Content renders correctly 1`] = `
|
||||
<h1>
|
||||
Perfecting the Art of Perfection
|
||||
</h1>
|
||||
<h2>
|
||||
-
|
||||
</h2>
|
||||
<div
|
||||
dangerouslySetInnerHTML={
|
||||
{
|
||||
|
Reference in New Issue
Block a user