diff --git a/.eslintrc b/.eslintrc index f8eaa18..42c72ec 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,4 +1,7 @@ { + "env": { + "browser": true + }, "extends": [ "plugin:import/typescript", diff --git a/README.md b/README.md index 26d82d0..e3178b9 100644 --- a/README.md +++ b/README.md @@ -4,16 +4,11 @@ This is the repository for my personal blog/website [rickvanlieshout.com](https: ## Todo -- print view - - - hide mode toggler - - hide "all articles" link in posts - - hide menu - - hide social buttons - - change "header title" - - "time to read" (https://www.gatsbyjs.com/plugins/gatsby-remark-reading-time/) +- quote needs a visual indicator (like a line or quote mark) in front to show it's a quote + + - migrate resume - migrate projects - migrate blogs @@ -22,3 +17,4 @@ This is the repository for my personal blog/website [rickvanlieshout.com](https: - release to sftp or gh-pages - lighthouse doesn't like the blue... :) +- url, id, title disqus diff --git a/content/config.json b/content/config.json index ba7b55c..7b39967 100644 --- a/content/config.json +++ b/content/config.json @@ -4,8 +4,8 @@ "subtitle": "The thoughts, discoveries and murmurings of a Software enthusiast", "copyright": "© All rights reserved.", "googleAnalyticsId": "", - "disqusShortname": "", - "postsLimit": 7, + "disqusShortname": "rickvanlieshoutcom", + "postsLimit": 5, "pathPrefix": "/", "menu": [ { diff --git a/content/posts/2022/scala-day-4-a-challenge.md b/content/posts/2017/scala-day-4-a-challenge.md similarity index 99% rename from content/posts/2022/scala-day-4-a-challenge.md rename to content/posts/2017/scala-day-4-a-challenge.md index ab9145a..d52b18e 100644 --- a/content/posts/2022/scala-day-4-a-challenge.md +++ b/content/posts/2017/scala-day-4-a-challenge.md @@ -9,7 +9,6 @@ tags: - "Development" - "slsw" description: "The last day of my journey with Scala is said to be a challenge" -# socialImage: "/media/42-line-bible.jpg" --- The book doesn't offer a day 4, my school, however, does. Or rather, it wants us to "create" a day 4. The main objective of day 4 is to "create a [smart](https://en.wikipedia.org/wiki/SMART_criteria) goal which fits the language and challenges you". For this purpose I came up with the following goal: diff --git a/src/assets/scss/_base.scss b/src/assets/scss/_base.scss index 07e265d..d067cf2 100644 --- a/src/assets/scss/_base.scss +++ b/src/assets/scss/_base.scss @@ -1,3 +1,17 @@ @charset "UTF-8"; @import "base/generic"; + +.showInPrintView { + display: none; +} + +@media print { + .hideInPrintView { + display:none; + } + + .showInPrintView { + display: initial; + } +} diff --git a/src/components/Pagination/Pagination.tsx b/src/components/Pagination/Pagination.tsx index bc6887a..91abd12 100644 --- a/src/components/Pagination/Pagination.tsx +++ b/src/components/Pagination/Pagination.tsx @@ -1,11 +1,8 @@ -import React from "react"; - +import { PAGINATION } from "@/constants"; import classNames from "classnames"; import { Link } from "gatsby"; - +import React from "react"; import * as styles from "./Pagination.module.scss"; -import { PAGINATION } from "@/constants"; - type Props = { prevPagePath: string; @@ -14,12 +11,7 @@ type Props = { hasPrevPage: boolean; }; -const Pagination = ({ - prevPagePath, - nextPagePath, - hasNextPage, - hasPrevPage, -}: Props) => { +const Pagination = ({ prevPagePath, nextPagePath, hasNextPage, hasPrevPage }: Props) => { const prevClassName = classNames(styles.previousLink, { [styles.disable]: !hasPrevPage, }); @@ -29,12 +21,12 @@ const Pagination = ({ }); return ( -
+
{PAGINATION.PREV_PAGE} @@ -43,7 +35,7 @@ const Pagination = ({ {PAGINATION.NEXT_PAGE} diff --git a/src/components/Pagination/__snapshots__/Pagination.test.tsx.snap b/src/components/Pagination/__snapshots__/Pagination.test.tsx.snap index 836155f..626e12b 100644 --- a/src/components/Pagination/__snapshots__/Pagination.test.tsx.snap +++ b/src/components/Pagination/__snapshots__/Pagination.test.tsx.snap @@ -1,10 +1,12 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Pagination renders correctly 1`] = ` -
+
); diff --git a/src/components/Post/Author/__snapshots__/Author.test.tsx.snap b/src/components/Post/Author/__snapshots__/Author.test.tsx.snap index 4735603..3c2881d 100644 --- a/src/components/Post/Author/__snapshots__/Author.test.tsx.snap +++ b/src/components/Post/Author/__snapshots__/Author.test.tsx.snap @@ -3,7 +3,8 @@ exports[`Author renders correctly 1`] = `

- Written by: + Written by: + @@ -11,6 +12,12 @@ exports[`Author renders correctly 1`] = ` Rick van Lieshout + + + @ http://localhost/ +

`; diff --git a/src/components/Post/Content/__snapshots__/Content.test.tsx.snap b/src/components/Post/Content/__snapshots__/Content.test.tsx.snap index b9308db..9d6272e 100644 --- a/src/components/Post/Content/__snapshots__/Content.test.tsx.snap +++ b/src/components/Post/Content/__snapshots__/Content.test.tsx.snap @@ -4,7 +4,9 @@ exports[`Content renders correctly 1`] = ` Array [
- + @@ -14,8 +16,19 @@ Array [ + + + rickvanLieshout.com + + - + ↩ All articles -
- + viewBox="0 0 384 512" + xmlns="http://www.w3.org/2000/svg" + > + + +
+
+
+
+ +
-
- -
-
+ className="react-toggle-thumb" + /> +
-
- -
+
,
diff --git a/src/components/Post/Post.tsx b/src/components/Post/Post.tsx index dd66d88..b90666c 100644 --- a/src/components/Post/Post.tsx +++ b/src/components/Post/Post.tsx @@ -28,7 +28,7 @@ const Post: React.FC = ({ post }: Props) => {
-
+
diff --git a/src/components/Post/Tags/Tags.tsx b/src/components/Post/Tags/Tags.tsx index 2599185..48f3457 100644 --- a/src/components/Post/Tags/Tags.tsx +++ b/src/components/Post/Tags/Tags.tsx @@ -1,7 +1,5 @@ -import React from "react"; - import { Link } from "gatsby"; - +import React from "react"; import * as styles from "./Tags.module.scss"; type Props = { @@ -10,7 +8,7 @@ type Props = { }; const Tags = ({ tags, tagSlugs }: Props) => ( -
+
+ + -
- -
+
+ All rights reserved. +
+ + + Switch color mode: +
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+ +
`; diff --git a/src/components/ThemeSwitcher/ThemeSwitcher.tsx b/src/components/ThemeSwitcher/ThemeSwitcher.tsx index 3445e8d..90c950a 100644 --- a/src/components/ThemeSwitcher/ThemeSwitcher.tsx +++ b/src/components/ThemeSwitcher/ThemeSwitcher.tsx @@ -23,7 +23,7 @@ export const ThemeSwitcher: FunctionComponent = ({ showLabel }) => { } return ( - <> + {showLabel && "Switch color mode:"} {showLabel &&
} = ({ showLabel }) => { }} onChange={toggleTheme} /> - +
); }; diff --git a/src/templates/CategoriesTemplate/__snapshots__/CategoriesTemplate.test.tsx.snap b/src/templates/CategoriesTemplate/__snapshots__/CategoriesTemplate.test.tsx.snap index 87df816..1d5685c 100644 --- a/src/templates/CategoriesTemplate/__snapshots__/CategoriesTemplate.test.tsx.snap +++ b/src/templates/CategoriesTemplate/__snapshots__/CategoriesTemplate.test.tsx.snap @@ -17,221 +17,233 @@ exports[`CategoriesTemplate renders correctly 1`] = `

- - -
- All rights reserved. -
- - Switch color mode: -
-
-
-
-
-
  • + - - -
  • -
    - + About Me + + +
  • + + Contact Me + +
  • + + + -
    - -
    +
    + All rights reserved. +
    + + + Switch color mode: +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    + +
    diff --git a/src/templates/CategoryTemplate/__snapshots__/CategoryTemplate.test.tsx.snap b/src/templates/CategoryTemplate/__snapshots__/CategoryTemplate.test.tsx.snap index 164c020..949d7e5 100644 --- a/src/templates/CategoryTemplate/__snapshots__/CategoryTemplate.test.tsx.snap +++ b/src/templates/CategoryTemplate/__snapshots__/CategoryTemplate.test.tsx.snap @@ -17,221 +17,233 @@ exports[`CategoryTemplate renders correctly 1`] = `

    - - -
    - All rights reserved. -
    - - Switch color mode: -
    -
    -
    -
    -
    -
  • + - - -
  • -
    - + About Me + + +
  • + + Contact Me + +
  • + + + -
    - -
    +
    + All rights reserved. +
    + + + Switch color mode: +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    + +
    @@ -306,10 +318,12 @@ exports[`CategoryTemplate renders correctly 1`] = `
    -
    +
    - -
    - All rights reserved. -
    - - Switch color mode: -
    -
    -
    -
    -
    -
  • + - - -
  • -
    - + About Me + + +
  • + + Contact Me + +
  • + + + -
    - -
    +
    + All rights reserved. +
    + + + Switch color mode: +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    + +
    @@ -303,10 +315,12 @@ exports[`IndexTemplate renders correctly 1`] = `
    -
    +
    - -
    - All rights reserved. -
    - - Switch color mode: -
    -
    -
    -
    -
    -
  • + - - -
  • -
    - + About Me + + +
  • + + Contact Me + +
  • + + + -
    - -
    +
    + All rights reserved. +
    + + + Switch color mode: +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    + +
    diff --git a/src/templates/PageTemplate/__snapshots__/PageTemplate.test.tsx.snap b/src/templates/PageTemplate/__snapshots__/PageTemplate.test.tsx.snap index 1c1905f..27b39fa 100644 --- a/src/templates/PageTemplate/__snapshots__/PageTemplate.test.tsx.snap +++ b/src/templates/PageTemplate/__snapshots__/PageTemplate.test.tsx.snap @@ -17,221 +17,233 @@ exports[`PageTemplate renders correctly 1`] = `

    - - -
    - All rights reserved. -
    - - Switch color mode: -
    -
    -
    -
    -
    -
  • + - - -
  • -
    - + About Me + + +
  • + + Contact Me + +
  • + + + -
    - -
    +
    + All rights reserved. +
    + + + Switch color mode: +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    + +
    diff --git a/src/templates/PostTemplate/__snapshots__/PostTemplate.test.tsx.snap b/src/templates/PostTemplate/__snapshots__/PostTemplate.test.tsx.snap index d9797c7..ce6c10b 100644 --- a/src/templates/PostTemplate/__snapshots__/PostTemplate.test.tsx.snap +++ b/src/templates/PostTemplate/__snapshots__/PostTemplate.test.tsx.snap @@ -6,7 +6,9 @@ exports[`PostTemplate renders correctly 1`] = `
    - + @@ -16,8 +18,19 @@ exports[`PostTemplate renders correctly 1`] = ` + + + rickvanLieshout.com + + - + ↩ All articles -
    - + viewBox="0 0 384 512" + xmlns="http://www.w3.org/2000/svg" + > + + +
    +
    +
    +
    + +
    -
    - -
    -
    + className="react-toggle-thumb" + /> +
    -
    - -
    +
    @@ -142,7 +159,8 @@ exports[`PostTemplate renders correctly 1`] = `
    -
    +

    - - -
    - All rights reserved. -
    - - Switch color mode: -
    -
    -
    -
    -
    -
  • + - - -
  • -
    - + About Me + + +
  • + + Contact Me + +
  • + + + -
    - -
    +
    + All rights reserved. +
    + + + Switch color mode: +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    + +
    @@ -306,10 +318,12 @@ exports[`TagTemplate renders correctly 1`] = `
    -
    +
    - -
    - All rights reserved. -
    - - Switch color mode: -
    -
    -
    -
    -
    -
  • + - - -
  • -
    - + About Me + + +
  • + + Contact Me + +
  • + + + -
    - -
    +
    + All rights reserved. +
    + + + Switch color mode: +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    + +