From 75c4ff6a801803dde48f81226ca6e6931727a476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= Date: Mon, 1 Aug 2022 21:43:50 +0100 Subject: [PATCH] Format codebase with `prettier` --- .prettierrc | 4 ++- package.json | 3 +- src/index.html | 3 ++ src/lib/html/base.html | 43 ++++++++++++++--------------- src/lib/html/navigation.html | 20 +++++++------- src/lib/scss/_fonts.scss | 12 ++++---- src/lib/scss/_navbar.scss | 2 +- src/lib/scss/_typed.scss | 14 ++++++---- src/mail.html | 30 ++++++++++++++++++-- src/music/components/indicator.tsx | 3 +- src/music/components/visualizer.tsx | 3 +- src/music/store/music/types.ts | 10 +++---- 12 files changed, 88 insertions(+), 59 deletions(-) diff --git a/.prettierrc b/.prettierrc index 91d2598..3026ab8 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,9 +1,11 @@ # -*- yaml -*- tabWidth: 4 -bracketSameLine: true overrides: - files: "**/*.html" options: tabWidth: 2 + - files: "**/*.scss" + options: + tabWidth: 2 diff --git a/package.json b/package.json index 5380d67..35eab38 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,8 @@ "serve": "parcel serve --no-autoinstall", "watch": "parcel watch --no-autoinstall", "build-dist": "parcel build --no-cache --no-autoinstall && rename '.html' '.html.hbs' dist/*.html", - "check": "tsc --noEmit" + "check": "tsc --noEmit", + "style": "prettier --check src" }, "source": "src/index.html", "browserslist": "> 1%, not dead" diff --git a/src/index.html b/src/index.html index bf956e1..81df37c 100644 --- a/src/index.html +++ b/src/index.html @@ -10,7 +10,9 @@
+ + ### About Me Looks like you found my website. I suppose introductions are @@ -37,6 +39,7 @@
+ ### My Work diff --git a/src/lib/html/base.html b/src/lib/html/base.html index be001d7..f2e031c 100644 --- a/src/lib/html/base.html +++ b/src/lib/html/base.html @@ -1,32 +1,29 @@ + + + + + + + - - - - - - - + - + tlater.net + - tlater.net - + + + + - - - - + - - - - - - - - - + + + + + diff --git a/src/lib/html/navigation.html b/src/lib/html/navigation.html index 65904d6..29362a6 100644 --- a/src/lib/html/navigation.html +++ b/src/lib/html/navigation.html @@ -1,7 +1,13 @@ diff --git a/src/lib/scss/_fonts.scss b/src/lib/scss/_fonts.scss index d95dcaf..283bb77 100644 --- a/src/lib/scss/_fonts.scss +++ b/src/lib/scss/_fonts.scss @@ -30,18 +30,16 @@ $weights: 300, 400, 500, 600, 700; // a release since https://github.com/source-foundry/Hack/issues/467 // was resolved. -$variants: - regular 400 normal, - bold 700 normal, - italic 400 italic, +$variants: regular 400 normal, bold 700 normal, italic 400 italic, bolditalic 700 italic; @each $name, $weight, $style in $variants { @font-face { font-family: "Hack"; - src: - url("npm:hack-font/build/web/fonts/hack-#{$name}-subset.woff2?sha=3114f1256") format("woff2"), - url("npm:hack-font/build/web/fonts/hack-#{$name}-subset.woff?sha=3114f1256") format("woff"); + src: url("npm:hack-font/build/web/fonts/hack-#{$name}-subset.woff2?sha=3114f1256") + format("woff2"), + url("npm:hack-font/build/web/fonts/hack-#{$name}-subset.woff?sha=3114f1256") + format("woff"); font-weight: $weight; font-style: $style; } diff --git a/src/lib/scss/_navbar.scss b/src/lib/scss/_navbar.scss index d4487c6..f37e05a 100644 --- a/src/lib/scss/_navbar.scss +++ b/src/lib/scss/_navbar.scss @@ -11,7 +11,7 @@ } & .navbar-start > .navbar-item { - color: rgba($white, .75); + color: rgba($white, 0.75); &:hover { background-color: $dark !important; diff --git a/src/lib/scss/_typed.scss b/src/lib/scss/_typed.scss index 1082e72..a77a758 100644 --- a/src/lib/scss/_typed.scss +++ b/src/lib/scss/_typed.scss @@ -119,11 +119,15 @@ $delays: 69ms, 83ms, 49ms, 48ms, 52ms, 59ms, 40ms, 71ms, 80ms, 67ms; @for $animation from 0 through $number { - $out: list.append($out, ( - type-#{$id}-#{$animation}, - $animation, - _sum(_round_robin($delays, $animation)) - ), $sep); + $out: list.append( + $out, + ( + type-#{$id}-#{$animation}, + $animation, + _sum(_round_robin($delays, $animation)) + ), + $sep + ); } @return $out; diff --git a/src/mail.html b/src/mail.html index 9ac17eb..26b5b94 100644 --- a/src/mail.html +++ b/src/mail.html @@ -9,17 +9,40 @@
- +
- +
- +
@@ -31,6 +54,7 @@
+ Any messages you enter here are directly forwarded to me. I aim to respond within a day. diff --git a/src/music/components/indicator.tsx b/src/music/components/indicator.tsx index 2189e0a..4c7f827 100644 --- a/src/music/components/indicator.tsx +++ b/src/music/components/indicator.tsx @@ -41,7 +41,8 @@ class Indicator extends React.Component {