diff --git a/.astro/icon.d.ts b/.astro/icon.d.ts index 5f6eff9..e8f09c7 100644 --- a/.astro/icon.d.ts +++ b/.astro/icon.d.ts @@ -1,5 +1,5 @@ // Automatically generated by astro-icon -// cf597ed5793ac3a0bc17ee825940f5c6cf4b61a3087f37ebca0a0576a301fee0 +// e9c4a8f68baebb6ebd5f479be9d5bb2351f0c7b5d632483958d8b375af75b69b declare module 'virtual:astro-icon' { export type Icon = @@ -14410,5 +14410,6 @@ declare module 'virtual:astro-icon' { | "simple-icons:zulip" | "simple-icons:zwave" | "simple-icons:zyte" + | "double-arrow-slider" | "linux"; } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index ba59899..974423e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,8 +10,7 @@ "dependencies": { "@astrojs/alpinejs": "^0.4.1", "@types/alpinejs": "^3.13.10", - "alpinejs": "^3.14.1", - "img-comparison-slider": "^8.0.6" + "alpinejs": "^3.14.1" }, "devDependencies": { "@astrojs/mdx": "^4.0.3", @@ -6791,12 +6790,6 @@ "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", @@ -9313,9 +9306,9 @@ } }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "dev": true, "funding": [ { diff --git a/package.json b/package.json index a3e5c6c..3e2ca80 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,6 @@ "dependencies": { "@astrojs/alpinejs": "^0.4.1", "@types/alpinejs": "^3.13.10", - "alpinejs": "^3.14.1", - "img-comparison-slider": "^8.0.6" + "alpinejs": "^3.14.1" } } diff --git a/public/betterleaves/ingame.png b/src/assets/betterleaves/ingame.png similarity index 100% rename from public/betterleaves/ingame.png rename to src/assets/betterleaves/ingame.png diff --git a/public/betterleaves/script.png b/src/assets/betterleaves/script.png similarity index 100% rename from public/betterleaves/script.png rename to src/assets/betterleaves/script.png diff --git a/src/components/ImageComparison.astro b/src/components/ImageComparison.astro new file mode 100644 index 0000000..09d6025 --- /dev/null +++ b/src/components/ImageComparison.astro @@ -0,0 +1,139 @@ +--- +interface Props { + firstTitle?: string + secondTitle?: string + sliderColor?: string + sliderShadowColor?: string +} +const { firstTitle, secondTitle, sliderColor = "white", sliderShadowColor = "black" } = Astro.props +import { Icon } from 'astro-icon/components' +--- + + +
+
+
+
+ +
+ +

{firstTitle}

+
+
+
+
+
+ +
+ +

{secondTitle}

+
+
+
+
+
+ + + +
+
+
+
+ + + + \ No newline at end of file diff --git a/src/components/ImgComparisonSlider.astro b/src/components/ImgComparisonSlider.astro deleted file mode 100644 index 5f41a2e..0000000 --- a/src/components/ImgComparisonSlider.astro +++ /dev/null @@ -1,71 +0,0 @@ ---- -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/icons/double-arrow-slider.svg b/src/icons/double-arrow-slider.svg new file mode 100644 index 0000000..66d429e --- /dev/null +++ b/src/icons/double-arrow-slider.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/pages/blog/life-is-changing.mdx b/src/pages/blog/life-is-changing.mdx index 7eebb0a..3d27a71 100644 --- a/src/pages/blog/life-is-changing.mdx +++ b/src/pages/blog/life-is-changing.mdx @@ -4,7 +4,8 @@ title: Life is changing author: Martin Prokoph date: 11th October 2024 --- -import ImgComparisonSlider from '../../components/ImgComparisonSlider.astro' +import ImageComparison from '../../components/ImageComparison.astro' +import { Image } from 'astro:assets' I started modding games back in 2018, when I was just 12 years old. In fact, Round Trees – one of my most popular resourcepacks to this day – had its first release back then. @@ -24,7 +25,10 @@ MidnightLib also deserves a mention. After becoming frustrated about the large file size of other config libraries, I had decided to take it on myself and write a tiny – but still feature-packed – config library, a task that I think I absolutely nailed. It is not only the basis for the vast majority of my mods, but also a lot of third-party ones, such as Effective, The Bumblezone, Bewitchment, as well as many others. - + + A config screen generated with MidnightLib 0.2.4 + A config screen generated with MidnightLib 1.6.3 +

MidnightLib has come a long way

Fast forward to today, I've created over 25 mods and resourcepacks, which have almost reached a total download amount of a staggering 100 Million! diff --git a/src/pages/components/astro-image-comparison-slider.mdx b/src/pages/components/astro-image-comparison-slider.mdx new file mode 100644 index 0000000..4b96a57 --- /dev/null +++ b/src/pages/components/astro-image-comparison-slider.mdx @@ -0,0 +1,29 @@ +--- +layout: ../../layouts/MarkdownLayout.astro +title: Image Comparison Slider for Astro +--- + +import ImageComparison from '../../components/ImageComparison.astro' +import { Image } from 'astro:assets'; +import { Icon } from 'astro-icon/components' + +# Image Comparison Slider for Astro + +Image comparison sliders are useful for comparing a previous state to the current one. +Since I wasn't fully satisfied with existing solutions, I created my own. + + + alt + + + +You can even customize the style to best fit your needs. + + alt + + +

lol

+

omg

+ + +
\ No newline at end of file diff --git a/src/pages/components/astro-tab-buttons.mdx b/src/pages/components/astro-tab-buttons.mdx new file mode 100644 index 0000000..746e95c --- /dev/null +++ b/src/pages/components/astro-tab-buttons.mdx @@ -0,0 +1,71 @@ +--- +layout: ../../layouts/MarkdownLayout.astro +title: Tab Button Component for Astro +--- + +import { Icon } from 'astro-icon/components' +import CustomTabs from "../../components/CustomTabs.astro" + +# Tab Button Component for Astro + +Having a paragraph of your text seperated by tabs can help readers choose their own path. +It is therefore a great way to improve your website's interactivity. + + +
+ Content in these divs can be written as regular Markdown in MDX files. + Otherwise, you can just add any HTML tags as usual. + The tab icons are powered by the awesome [Astro Icon](https://www.astroicon.dev/) component. +
+ +
+ +
+A common use case for these are installation guides for different operating systems: + +
+ Step 1: Download a Linux ISO and flash it to a USB stick + Step 2: Uninstall Windows + Step 3: Install Linux + Step 4: Continue with the Linux section +
+ + + +
\ No newline at end of file diff --git a/src/pages/wiki/betterleaves.mdx b/src/pages/wiki/betterleaves.mdx index d4cd511..b6c06c3 100644 --- a/src/pages/wiki/betterleaves.mdx +++ b/src/pages/wiki/betterleaves.mdx @@ -3,10 +3,13 @@ layout: ../../layouts/MarkdownLayout.astro title: Better Leaves Wiki --- -import ImgComparisonSlider from '../../components/ImgComparisonSlider.astro' +import ImageComparison from '../../components/ImageComparison.astro' +import { Image } from 'astro:assets'; import { Icon } from 'astro-icon/components' import { Notification } from 'accessible-astro-components' import CustomTabs from "../../components/CustomTabs.astro" +import pythonCodeImage from '../../assets/betterleaves/script.png'; +import ingameImage from '../../assets/betterleaves/ingame.png'; # Better Leaves Wiki @@ -14,8 +17,10 @@ Welcome to the Better Leaves wiki. This documentation aims to help you create your own flavour for any texturepack or mod.
- -

Better Leaves 9.0 is automatically generated using our Python script

+ + A screenshot showing the Python script code + A screenshot of the Better Leaves resourcepack in action + ## Getting Started First of all, you need to download the contents of the GitHub repository. @@ -37,7 +42,7 @@ After that, follow the Building section to get your flav In simple cases, it is enough to put the mod file in the /input/mods folder and continue with the Building section.
An overview of the input/mods folder, showing the automatic unpacking process
-

Put the .jar file ito input/mods, and the script will take care of extracting all textures with "leaves" in their name. +

Put the .jar file into input/mods, and the script will take care of extracting all textures with "leaves" in their name.
The _temp folder is purely symbolic here, it will only exist for a few milliseconds during the extraction process.

## Building