diff --git a/package-lock.json b/package-lock.json index f060ea1..4ef0e2c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,8 @@ "dependencies": { "@astrojs/alpinejs": "^0.4.0", "@types/alpinejs": "^3.13.10", - "alpinejs": "^3.14.1" + "alpinejs": "^3.14.1", + "img-comparison-slider": "^8.0.6" }, "devDependencies": { "@astrojs/mdx": "^3.1.6", @@ -6713,6 +6714,12 @@ "node": ">= 4" } }, + "node_modules/img-comparison-slider": { + "version": "8.0.6", + "resolved": "https://registry.npmjs.org/img-comparison-slider/-/img-comparison-slider-8.0.6.tgz", + "integrity": "sha512-ej4de7mWyjcXZvDgHq8K2a/dG8Vv+qYTdUjZa3cVILf316rLtDrHyGbh9fPvixmAFgbs30zTLfmaRDa7abjtzw==", + "license": "MIT" + }, "node_modules/immutable": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", diff --git a/package.json b/package.json index 4b55fc3..d26d778 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "dependencies": { "@astrojs/alpinejs": "^0.4.0", "@types/alpinejs": "^3.13.10", - "alpinejs": "^3.14.1" + "alpinejs": "^3.14.1", + "img-comparison-slider": "^8.0.6" } } diff --git a/public/blog/blog-posts.json b/public/blog/blog-posts.json index 3da5bb0..6c0a7ba 100644 --- a/public/blog/blog-posts.json +++ b/public/blog/blog-posts.json @@ -1,10 +1,18 @@ [ - { - "postId": "new-website", - "userId": "Martin Prokoph", - "date": "09th February 2024", - "title": "So... I have a new website now!", - "body": "I finally revamped my website, making it more performant, more accessible and more useful!", - "img": "/social-preview-image.png" - } + { + "postId": "life-is-changing", + "userId": "Martin Prokoph", + "date": "11th October 2024", + "title": "Life is changing", + "body": "A retrospective of my Modding journey so far, and an outlook into the future", + "img": "/blog/life/leipzig.jpg" + }, + { + "postId": "new-website", + "userId": "Martin Prokoph", + "date": "09th February 2024", + "title": "So... I have a new website now!", + "body": "I finally revamped my website, making it more performant, accessible and useful!", + "img": "/social-preview-image.png" + } ] \ No newline at end of file diff --git a/public/blog/life/leipzig.jpg b/public/blog/life/leipzig.jpg new file mode 100644 index 0000000..5be7e40 Binary files /dev/null and b/public/blog/life/leipzig.jpg differ diff --git a/public/blog/life/midnightlib-0.2.4.png b/public/blog/life/midnightlib-0.2.4.png new file mode 100644 index 0000000..67b9e60 Binary files /dev/null and b/public/blog/life/midnightlib-0.2.4.png differ diff --git a/public/blog/life/midnightlib-1.6.3.png b/public/blog/life/midnightlib-1.6.3.png new file mode 100644 index 0000000..c9b24f0 Binary files /dev/null and b/public/blog/life/midnightlib-1.6.3.png differ diff --git a/public/blog/life/round-trees-pmc.png b/public/blog/life/round-trees-pmc.png new file mode 100644 index 0000000..6ee2cb5 Binary files /dev/null and b/public/blog/life/round-trees-pmc.png differ diff --git a/src/components/ImgComparisonSlider.astro b/src/components/ImgComparisonSlider.astro new file mode 100644 index 0000000..5f41a2e --- /dev/null +++ b/src/components/ImgComparisonSlider.astro @@ -0,0 +1,71 @@ +--- +interface Props { + imgBefore: string + imgAfter: string + captionBefore?: string + captionAfter?: string +} +const { imgBefore, imgAfter, captionBefore, captionAfter } = Astro.props +--- + + +
+ + {captionBefore ?
{captionBefore}
: ""} +
+
+ + {captionAfter ?
{captionAfter}
: ""} +
+
+ + + + + + \ No newline at end of file diff --git a/src/components/Navigation.astro b/src/components/Navigation.astro index 0295f95..b8d24d0 100644 --- a/src/components/Navigation.astro +++ b/src/components/Navigation.astro @@ -14,9 +14,8 @@ import { Icon } from 'astro-icon/components'