Compare commits

...

6 Commits

Author SHA1 Message Date
Martin Prokoph
1e6fb724c3 feat: update BetterLeaves wiki for 9.3 2025-07-31 00:42:37 +02:00
Martin Prokoph
cc9b4ba6e1 test: add citation debug page 2025-07-30 23:45:46 +02:00
Martin Prokoph
b5d4fa1aec feat: update betterleaves script image 2025-07-30 23:45:14 +02:00
Martin Prokoph
810612c4e5 fix: weird gradle info version selector placement 2025-07-30 23:31:36 +02:00
Martin Prokoph
d55cdfa175 feat: create ThisRocks mod page 2025-07-30 23:25:51 +02:00
Martin Prokoph
c580b9e181 feat: improve styling 2025-07-30 23:22:41 +02:00
22 changed files with 1035 additions and 259 deletions

View File

@@ -1 +1 @@
[["Map",1,2],"meta::meta",["Map",3,4,5,6],"astro-version","5.5.5","astro-config-digest","{\"root\":{},\"srcDir\":{},\"publicDir\":{},\"outDir\":{},\"cacheDir\":{},\"site\":\"https://www.midnightdust.eu\",\"compressHTML\":true,\"base\":\"/\",\"trailingSlash\":\"ignore\",\"output\":\"static\",\"scopedStyleStrategy\":\"attribute\",\"build\":{\"format\":\"directory\",\"client\":{},\"server\":{},\"assets\":\"_astro\",\"serverEntry\":\"entry.mjs\",\"redirects\":true,\"inlineStylesheets\":\"auto\",\"concurrency\":1},\"server\":{\"open\":false,\"host\":false,\"port\":4321,\"streaming\":true,\"allowedHosts\":[]},\"redirects\":{},\"image\":{\"endpoint\":{\"route\":\"/_image\"},\"service\":{\"entrypoint\":\"astro/assets/services/sharp\",\"config\":{}},\"domains\":[],\"remotePatterns\":[]},\"devToolbar\":{\"enabled\":true},\"markdown\":{\"syntaxHighlight\":{\"type\":\"shiki\",\"excludeLangs\":[\"math\"]},\"shikiConfig\":{\"langs\":[],\"langAlias\":{},\"theme\":\"github-dark\",\"themes\":{},\"wrap\":false,\"transformers\":[]},\"remarkPlugins\":[],\"rehypePlugins\":[],\"remarkRehype\":{},\"gfm\":true,\"smartypants\":true},\"security\":{\"checkOrigin\":true},\"env\":{\"schema\":{},\"validateSecrets\":false},\"experimental\":{\"clientPrerender\":false,\"contentIntellisense\":false,\"responsiveImages\":false,\"serializeConfig\":false,\"headingIdCompat\":false,\"preserveScriptOrder\":false},\"legacy\":{\"collections\":false}}"]
[["Map",1,2],"meta::meta",["Map",3,4,5,6],"astro-version","5.7.8","astro-config-digest","{\"root\":{},\"srcDir\":{},\"publicDir\":{},\"outDir\":{},\"cacheDir\":{},\"site\":\"https://www.midnightdust.eu\",\"compressHTML\":true,\"base\":\"/\",\"trailingSlash\":\"ignore\",\"output\":\"static\",\"scopedStyleStrategy\":\"attribute\",\"build\":{\"format\":\"directory\",\"client\":{},\"server\":{},\"assets\":\"_astro\",\"serverEntry\":\"entry.mjs\",\"redirects\":true,\"inlineStylesheets\":\"auto\",\"concurrency\":1},\"server\":{\"open\":false,\"host\":false,\"port\":4321,\"streaming\":true,\"allowedHosts\":[]},\"redirects\":{},\"image\":{\"endpoint\":{\"route\":\"/_image\"},\"service\":{\"entrypoint\":\"astro/assets/services/sharp\",\"config\":{}},\"domains\":[],\"remotePatterns\":[]},\"devToolbar\":{\"enabled\":true},\"markdown\":{\"syntaxHighlight\":{\"type\":\"shiki\",\"excludeLangs\":[\"math\"]},\"shikiConfig\":{\"langs\":[],\"langAlias\":{},\"theme\":\"github-dark\",\"themes\":{},\"wrap\":false,\"transformers\":[]},\"remarkPlugins\":[],\"rehypePlugins\":[],\"remarkRehype\":{},\"gfm\":true,\"smartypants\":true},\"security\":{\"checkOrigin\":true},\"env\":{\"schema\":{},\"validateSecrets\":false},\"experimental\":{\"clientPrerender\":false,\"contentIntellisense\":false,\"responsiveImages\":false,\"headingIdCompat\":false,\"preserveScriptOrder\":false},\"legacy\":{\"collections\":false}}"]

6
.astro/icon.d.ts vendored
View File

@@ -1,5 +1,5 @@
// Automatically generated by astro-icon
// 8e7429c946c12d2c48e5c45083ba2275bd979b675d70e184ce0a9174f7985787
// c9a3fc05907e9102c87a67793988dd3fa433213a55a6a2087e99c14105223c42
declare module 'virtual:astro-icon' {
export type Icon =
@@ -21201,5 +21201,7 @@ declare module 'virtual:astro-icon' {
| "simple-icons:tmobile"
| "simple-icons:windows11"
| "double-arrow-slider"
| "linux";
| "fabric"
| "linux"
| "neoforge";
}

View File

@@ -4,14 +4,27 @@ import tailwind from '@astrojs/tailwind';
import icon from "astro-icon";
import alpinejs from "@astrojs/alpinejs";
import rehypeCitation from 'rehype-citation';
// https://astro.build/config
export default defineConfig({
site: 'https://www.midnightdust.eu',
compressHTML: true,
integrations: [mdx(), icon(), tailwind({
applyBaseStyles: false
}), alpinejs()],
integrations: [
mdx(
{rehypePlugins: [[rehypeCitation, {
bibliography: "https://raw.githubusercontent.com/timlrx/rehype-citation/main/test/references-data.bib",
linkCitations: true,
showTooltips: true,
inlineClass: ["citation"],
csl: "https://raw.githubusercontent.com/citation-style-language/styles/master/acm-sig-proceedings.csl"
}]]}
),
icon(),
tailwind({
applyBaseStyles: false
}
), alpinejs()],
vite: {
css: {
preprocessorOptions: {
@@ -21,4 +34,4 @@ export default defineConfig({
}
}
}
});
});

756
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -11,7 +11,7 @@
"preview": "astro preview"
},
"devDependencies": {
"@astrojs/mdx": "^4.2.2",
"@astrojs/mdx": "^4.2.5",
"@astrojs/partytown": "^2.1.4",
"@astrojs/tailwind": "^6.0.2",
"@iconify-json/ion": "^1.2.2",
@@ -21,7 +21,7 @@
"@typescript-eslint/eslint-plugin": "^8.28.0",
"@typescript-eslint/parser": "^8.28.0",
"accessible-astro-components": "^2.4.0",
"astro": "^5.5.5",
"astro": "^5.7.8",
"astro-compress": "^2.3.6",
"astro-icon": "^1.1.5",
"eslint": "^9.23.0",
@@ -35,9 +35,10 @@
"tailwindcss": "^3.4.17"
},
"dependencies": {
"@astrojs/alpinejs": "^0.4.4",
"@astrojs/alpinejs": "^0.4.7",
"@types/alpinejs": "^3.13.11",
"alpinejs": "^3.14.9",
"rehype-citation": "^2.3.1",
"vanilla-tilt": "^1.8.1"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 708 KiB

After

Width:  |  Height:  |  Size: 621 KiB

View File

@@ -6,7 +6,10 @@
@font-face {
font-family: 'Open Sans';
src: local('Open Sans ExtraBold'), local('OpenSans-ExtraBold'), url('/fonts/OpenSans-ExtraBold.woff2') format('woff2'),
src:
local('Open Sans ExtraBold'),
local('OpenSans-ExtraBold'),
url('/fonts/OpenSans-ExtraBold.woff2') format('woff2'),
url('/fonts/OpenSans-ExtraBold.woff') format('woff');
font-weight: bold;
font-style: normal;
@@ -15,7 +18,10 @@
@font-face {
font-family: 'Open Sans';
src: local('Open Sans Bold'), local('OpenSans-Bold'), url('/fonts/OpenSans-Bold.woff2') format('woff2'),
src:
local('Open Sans Bold'),
local('OpenSans-Bold'),
url('/fonts/OpenSans-Bold.woff2') format('woff2'),
url('/fonts/OpenSans-Bold.woff') format('woff');
font-weight: bold;
font-style: normal;
@@ -24,7 +30,10 @@
@font-face {
font-family: 'Open Sans';
src: local('Open Sans Italic'), local('OpenSans-Italic'), url('/fonts/OpenSans-Italic.woff2') format('woff2'),
src:
local('Open Sans Italic'),
local('OpenSans-Italic'),
url('/fonts/OpenSans-Italic.woff2') format('woff2'),
url('/fonts/OpenSans-Italic.woff') format('woff');
font-weight: normal;
font-style: italic;
@@ -33,7 +42,10 @@
@font-face {
font-family: 'Open Sans';
src: local('Open Sans Regular'), local('OpenSans-Regular'), url('/fonts/OpenSans-Regular.woff2') format('woff2'),
src:
local('Open Sans Regular'),
local('OpenSans-Regular'),
url('/fonts/OpenSans-Regular.woff2') format('woff2'),
url('/fonts/OpenSans-Regular.woff') format('woff');
font-weight: normal;
font-style: normal;
@@ -88,11 +100,11 @@ body {
}
h1 {
font-size: 2.25rem;
font-size: 3rem;
line-height: 3.375rem;
@include breakpoint(medium) {
font-size: 3rem;
font-size: 4rem;
line-height: 3.625rem;
}
}

View File

@@ -1,20 +1,54 @@
---
const { text, url_gh, url_mr, url_cf, url_wiki = "", mod = "default" } = Astro.props
const { text, url_gh, url_mr, url_cf, url_wiki = '', mod = 'default', icon = '' } = Astro.props
import { Icon } from 'astro-icon/components'
---
<div class="container rellax" data-rellax-speed="-1.5">
<div class={"call-to-action mt-24 mb-32 flex flex-col items-center gap-12 rounded-xl p-12 md:p-24 " + mod}>
<h2 class="text-center text-3xl md:text-5xl">{text}</h2>
<div class="rellax container" data-rellax-speed="-1.5">
<div class={'call-to-action mt-24 mb-32 flex flex-col items-center gap-12 rounded-xl p-12 md:p-24 ' + mod}>
<h2 class="text-center text-3xl md:text-5xl">
{icon != '' ? <Icon class='inline pr-2 align-bottom' name={icon} /> : ''}{text}
</h2>
<div class="flex flex-col gap-3 min-[800px]:flex-row">
{(url_mr != '') ? <a href={url_mr} class={"button has-icon text-lg " + mod+"-button-primary"}>
<Icon name="simple-icons:modrinth" />Modrinth</a> : ''}
{(url_cf != '') ? <a href={url_cf} class={"button has-icon text-lg " + mod+"-button-primary"}>
<Icon name="simple-icons:curseforge" />CurseForge</a> : ''}
{(url_gh != '') ? <a href={url_gh} class={"button has-icon text-lg " + mod+"-button-primary"}>
<Icon name="simple-icons:github" />GitHub</a> : ''}
{(url_wiki != '') ? <a href={url_wiki} class={"button has-icon color-secondary text-lg " + mod+"-button-secondary"}>
<Icon name="ion:library" />Visit the new Wiki!</a> : ''}
{
url_mr != '' ? (
<a href={url_mr} class={'button has-icon text-lg ' + mod + '-button-primary'}>
<Icon name="simple-icons:modrinth" />
Modrinth
</a>
) : (
''
)
}
{
url_cf != '' ? (
<a href={url_cf} class={'button has-icon text-lg ' + mod + '-button-primary'}>
<Icon name="simple-icons:curseforge" />
CurseForge
</a>
) : (
''
)
}
{
url_gh != '' ? (
<a href={url_gh} class={'button has-icon text-lg ' + mod + '-button-primary'}>
<Icon name="simple-icons:github" />
GitHub
</a>
) : (
''
)
}
{
url_wiki != '' ? (
<a href={url_wiki} class={'button has-icon color-secondary text-lg ' + mod + '-button-secondary'}>
<Icon name="ion:library" />
Visit the new Wiki!
</a>
) : (
''
)
}
</div>
</div>
</div>
@@ -26,7 +60,7 @@ import { Icon } from 'astro-icon/components'
}
.midnightcontrols {
color: var(--neutral-100);
background-image: linear-gradient(40deg, #E302A4, #9400C6);
background-image: linear-gradient(40deg, #e302a4, #9400c6);
}
.midnightcontrols-button-primary {
background-color: #ff6fff;
@@ -45,7 +79,9 @@ import { Icon } from 'astro-icon/components'
border: 3px solid var(--neutral-900);
border-radius: 3px;
text-decoration: none;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
transition:
color 0.15s ease-in-out,
background-color 0.15s ease-in-out;
&:where(:hover, :focus) {
color: var(--neutral-100);
@@ -53,4 +89,14 @@ import { Icon } from 'astro-icon/components'
text-decoration: underline;
}
}
.neoforge {
color: var(--neutral-100);
background-image: linear-gradient(40deg, #d7742f, #ee5577);
}
.neoforge-button-primary {
background-color: #ee5577;
}
.neoforge-button-secondary {
background-color: #d7742f;
}
</style>

View File

@@ -6,14 +6,14 @@ const { modid } = Astro.props
---
<gradle-version modid={modid}>
<div class="wrapper">
<div>
<label for="loader-selector" class="sr-only">Select the Modloader</label>
<select
name="loader-selector"
id="loader-selector"
class="selector cursor-pointer rounded-md pl-3 pr-2 py-1.5 border-2 dark:border-green-300 dark:bg-neutral-800 dark:text-white focus-visible:outline-none"
aria-label="Choose the Modloader">
</select>
<label for="version-selector" class="sr-only">Select the Version</label>
<select
@@ -32,7 +32,7 @@ class VersionInfo {
versionList: any;
finishedArray: any;
modInfo: any;
selectedLoader: string;
selectedVersion: string;
@@ -73,7 +73,7 @@ class VersionInfo {
* */
loadVersionList() {
let selectedLoader = this.selectedLoader;
let versionMap = Object.keys(this.finishedArray).reduce(function(map, value) {
let versionMap = Object.keys(this.finishedArray).reduce(function(map, value) {
if (value.startsWith(selectedLoader)) {
const version = value.split("+")[1];
if (!Object.values(map).includes(version)) {
@@ -88,7 +88,7 @@ class VersionInfo {
));
return versionList;
}
/**
* Loads the version info from Modrinth
* @param modid The ID of the mod
@@ -119,13 +119,13 @@ class VersionElement extends HTMLElement {
connectedCallback() {
var modid = this.getAttribute("modid");
if (modid == null) return;
// Get the gradle.properties code block
const versionLabel = document.getElementById("resulting-version");
// Get the 2 selectors defined above
const loaderSelector = document.getElementById("loader-selector");
const versionSelector = document.getElementById("version-selector");
VersionInfo.load(modid).then((versionInfo) => {
if (loaderSelector instanceof HTMLSelectElement) {
versionInfo.loaderList.forEach((loader: string) => {
@@ -159,7 +159,7 @@ class VersionElement extends HTMLElement {
});
}
}
// Tell the browser to use our VersionElement class for <gradle-version> elements.
customElements.define('gradle-version', VersionElement);

View File

@@ -23,6 +23,9 @@ import { Icon } from 'astro-icon/components'
<li class="submenu-item">
<a href="/midnightcontrols/">MidnightControls</a>
</li>
<li class="submenu-item">
<a href="/thisrocks/">This Rocks!</a>
</li>
</ul>
</li>
<li class="menu-item has-dropdown">

4
src/icons/fabric.svg Normal file
View File

@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" clip-rule="evenodd" viewBox="0 0 24 24">
<path fill="none" d="M0 0h24v24H0z"></path>
<path fill="none" stroke="currentColor" stroke-width="23" d="m820 761-85.6-87.6c-4.6-4.7-10.4-9.6-25.9 1-19.9 13.6-8.4 21.9-5.2 25.4 8.2 9 84.1 89 97.2 104 2.5 2.8-20.3-22.5-6.5-39.7 5.4-7 18-12 26-3 6.5 7.3 10.7 18-3.4 29.7-24.7 20.4-102 82.4-127 103-12.5 10.3-28.5 2.3-35.8-6-7.5-8.9-30.6-34.6-51.3-58.2-5.5-6.3-4.1-19.6 2.3-25 35-30.3 91.9-73.8 111.9-90.8" transform="matrix(.08671 0 0 .0867 -49.8 -56)"></path>
</svg>

After

Width:  |  Height:  |  Size: 639 B

3
src/icons/neoforge.svg Normal file
View File

@@ -0,0 +1,3 @@
<svg enable-background="new 0 0 24 24" version="1.1" viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m12 19.2v2m0-2v2"></path><path d="m8.4 1.3c0.5 1.5 0.7 3 0.1 4.6-0.2 0.5-0.9 1.5-1.6 1.5m8.7-6.1c-0.5 1.5-0.7 3-0.1 4.6 0.2 0.6 0.9 1.5 1.6 1.5"></path><path d="m3.6 15.8h-1.7m18.5 0h1.7"></path><path d="m3.2 12.1h-1.7m19.3 0h1.8"></path><path d="m8.1 12.7v1.6m7.8-1.6v1.6"></path><path d="m10.8 18h1.2m0 1.2-1.2-1.2m2.4 0h-1.2m0 1.2 1.2-1.2"></path><path d="m4 9.7c-0.5 1.2-0.8 2.4-0.8 3.7 0 3.1 2.9 6.3 5.3 8.2 0.9 0.7 2.2 1.1 3.4 1.1m0.1-17.8c-1.1 0-2.1 0.2-3.2 0.7m11.2 4.1c0.5 1.2 0.8 2.4 0.8 3.7 0 3.1-2.9 6.3-5.3 8.2-0.9 0.7-2.2 1.1-3.4 1.1m-0.1-17.8c1.1 0 2.1 0.2 3.2 0.7"></path><path d="m4 9.7c-0.2-1.8-0.3-3.7 0.5-5.5s2.2-2.6 3.9-3m11.6 8.5c0.2-1.9 0.3-3.7-0.5-5.5s-2.2-2.6-3.9-3"></path><path d="m12 21.2-2.4 0.4m2.4-0.4 2.4 0.4"></path></g>
</svg>

After

Width:  |  Height:  |  Size: 1001 B

View File

@@ -106,6 +106,26 @@ const {
}
}
}
.citation {
font-size: 90%;
line-height: 90%;
font-style: italic;
padding-left: 0.2rem;
a, a:not(.button):visited {
color: var(--font-color);
}
}
.references {
&:before {
content: "Sources:";
font-size: 120%;
color: var(--primary-200);
text-decoration: underline;
}
border: 2px var(--primary-200) dotted;
border-radius: 0.75rem;
padding: 0.6rem;
}
</style>
</body>
</html>
</html>

View File

@@ -6,7 +6,7 @@ import blogPosts from '../../../public/blog/blog-posts.json'
export async function getStaticPaths({ paginate }) {
//const response = await fetch('https://jsonplaceholder.typicode.com/posts')
//const data = await response.json()
const data = blogPosts;
const data = blogPosts
return paginate(data, { pageSize: 6 })
}
@@ -14,31 +14,21 @@ export async function getStaticPaths({ paginate }) {
const { page } = Astro.props
---
<DefaultLayout
title="Blog"
description="Just my personal blog, where I write about cool projects and endeavours."
>
<DefaultLayout title="Blog" description="Just my personal blog, where I write about cool projects and endeavours.">
<section class="my-12">
<div class="space-content container">
<h1>Blog</h1>
<p class="text-2xl">
Just my personal blog, where I write about cool projects and endeavours.
</p>
<p class="text-2xl">Just my personal blog, where I write about cool projects and endeavours.</p>
</div>
</section>
<section class="my-12">
<div class="container">
<p class="text-sm"><em>Post {page.start + 1} through {page.end + 1} of {page.total} total posts</em></p>
<p class="text-sm"><em>Posts {page.start + 1}-{page.end + 1} of {page.total} total posts</em></p>
<ul class="my-3">
{
page.data.map((post) => (
<li>
<Card
url={'/blog/' + post.postId}
title={post.title}
footer={'Published: ' + post.date}
img={post.img}
>
<Card url={'/blog/' + post.postId} title={post.title} footer={'Published: ' + post.date} img={post.img}>
{post.body}
</Card>
</li>
@@ -59,7 +49,7 @@ const { page } = Astro.props
</section>
</DefaultLayout>
<style lang="scss">
<style lang="scss" is:global>
ul {
display: grid;
grid-template-columns: 1fr;
@@ -74,4 +64,73 @@ const { page } = Astro.props
grid-template-columns: repeat(3, 1fr);
}
}
.pagination a,
.pagination .disabled {
border-radius: 0.75rem;
}
.pagination li:nth-child(1) span, .pagination li:nth-child(5) span {
border-style: dotted;
}
.pagination li:nth-child(2) span, .pagination li:nth-child(4) span {
border-style: dashed;
}
.card {
transition: inset 0.15s ease-in-out;
overflow: visible;
position: relative;
width: calc(100% - 0.5rem);
padding: 2rem;
> * {
position: relative;
z-index: 2;
}
&::before,
&::after {
content: '';
position: absolute;
}
&::before {
inset: 0;
background-color: var(--background);
border: 3px solid var(--neutral-700);
border-radius: 1rem;
box-shadow: 0 0 0 6px var(--background);
z-index: 1;
}
&::after {
background-color: var(--action-color);
inset: 1rem -0.85rem -0.85rem 1rem;
border-radius: 1rem;
z-index: 0;
}
&, &::after {
transition: background-color 0.15s linear;
}
&:hover,
&:focus-within {
box-shadow: 0 0 0 0rem var(--action-color);
a:not(.button) {
color: var(--primary-100);
}
&::after {
background-color: var(--primary-100);
}
}
}
:global(.card [data-icon]) {
height: auto;
width: 4rem;
color: var(--action-color);
}
:global(.darkmode .card::before) {
background-color: var(--dark-100);
box-shadow: 0 0 0 6px var(--dark-100);
}
</style>

12
src/pages/blog/test.mdx Normal file
View File

@@ -0,0 +1,12 @@
---
layout: ../../layouts/BlogLayout.astro
title: Citation test
author: Martin Prokoph
date: 30th November 2024
---
### This is a test for citations
Hello world [see @Nash1950 pp 12-13; @Nash1951]
Thanks for reading!
~ Motschen

View File

@@ -6,28 +6,33 @@ import ContentMedia from '../components/ContentMedia.astro'
---
<DefaultLayout title="MidnightControls">
<h2 class="my-8 text-6xl text-center">MidnightControls</h2>
<h1 class="my-8 text-center">MidnightControls</h1>
<ContentMedia imgSrc="/midnightcontrols/feature-touchscreen.webp">
<h2>Play Minecraft whichever way <span class="bg-clip-text text-transparent bg-gradient-to-r from-pink-500 to-violet-500">you</span> want!</h2>
<h2>
Play Minecraft whichever way <span
class="bg-gradient-to-r from-pink-500 to-violet-500 bg-clip-text text-transparent">you</span
> want!
</h2>
<p class="text-2xl">
MidnightControls allows the use of controllers, touchscreens and even eye trackers!<br>
MidnightControls allows the use of controllers, touchscreens and even eye trackers!<br />
Minecraft Java was never more accessible.
</p>
</ContentMedia>
<ContentMedia imgSrc="/midnightcontrols/automobility.png" reverseImg={true}>
<h2>Broad mod compatibility</h2>
<p class="text-2xl">
Many Fabric and Quilt mods are compatible with MidnightControls right out of the box.<br>
The mod also exposes an API, allowing developers to easily add controller support to complex mods.<br>
Many Fabric and Quilt mods are compatible with MidnightControls right out of the box.<br />
The mod also exposes an API, allowing developers to easily add controller support to complex mods.<br />
<p>Shown here is <a href="https://modrinth.com/mod/automobility">Automobility</a>, go check it out!</p>
</p>
</ContentMedia>
<section>
<div class="container">
<h2 class="mb-16 text-6xl">Features</h2>
<h1 class="mb-16">Features</h1>
<div class="grid grid-cols-1 gap-12 md:grid-cols-2 lg:grid-cols-3">
<Feature icon="ion:game-controller-outline" title="Controller Support">
Use your favorite controller to play your favorite game.<br>Many controllers are supported without any configuration!
Use your favorite controller to play your favorite game.<br />Many controllers are supported without any
configuration!
</Feature>
<Feature icon="ion:finger-print-outline" title="Touchscreen Support">
You only have a touchscreen? No problem! The only thing missing is multitouch support.
@@ -36,10 +41,12 @@ import ContentMedia from '../components/ContentMedia.astro'
Eye Trackers are a great way for people with disabilities to still be able to enjoy this great game!
</Feature>
<Feature icon="ion:options-outline" title="Configurable">
The MidnightLib-powered config is full of exciting features.<br>Use the advanced config screen for even more of them!
The MidnightLib-powered config is full of exciting features.<br />Use the advanced config screen for even more
of them!
</Feature>
<Feature icon="ion:people-outline" title="Splitscreen">
Invite your homies and loved ones for a local splitscreen Minecraft session! Consult the wiki for setup instructions.
Invite your homies and loved ones for a local splitscreen Minecraft session! Consult the wiki for setup
instructions.
</Feature>
<Feature icon="ion:happy-outline" title="Great Community">
MidnightControls has an amazing community that is always willing to help with any trouble!
@@ -47,21 +54,27 @@ import ContentMedia from '../components/ContentMedia.astro'
</div>
</div>
</section>
<CallToAction text="Start using MidnightControls right now!"
url_gh="https://github.com/TeamMidnightDust/MidnightControls"
url_mr="https://modrinth.com/mod/midnightcontrols"
url_cf="https://www.curseforge.com/minecraft/mc-mods/midnightcontrols"
url_wiki="/wiki/midnightcontrols"
mod="midnightcontrols"
<CallToAction
text="Start using MidnightControls right now!"
url_gh="https://github.com/TeamMidnightDust/MidnightControls"
url_mr="https://modrinth.com/mod/midnightcontrols"
url_cf="https://www.curseforge.com/minecraft/mc-mods/midnightcontrols"
url_wiki="/wiki/midnightcontrols"
mod="midnightcontrols"
/>
<section>
<div class="container">
<h2 class="my-32 text-6xl text-center">MidnightControlsExtra</h2>
<h1 class="my-32 text-center">MidnightControlsExtra</h1>
<ContentMedia imgSrc="/midnightcontrols/front-block-placing.webp">
<h2>You want even <span class="bg-clip-text text-transparent bg-gradient-to-r from-green-500 to-cyan-500">more</span>?</h2>
<h2>
You want even <span class="bg-gradient-to-r from-green-500 to-cyan-500 bg-clip-text text-transparent"
>more</span
>?
</h2>
<p class="text-2xl">
We got you!<br/> <br/>
MidnightControlsExtra provides useful features that might trigger anticheats.<br/>
We got you!<br />
<br />
MidnightControlsExtra provides useful features that might trigger anticheats.<br />
Front block placing, anyone?
</p>
</ContentMedia>
@@ -70,7 +83,7 @@ import ContentMedia from '../components/ContentMedia.astro'
Place those pesky blocks almost as fast as Sonic would!
</Feature>
<Feature icon="ion:share-outline" title="Front Block Placing">
Place blocks in front of you without sneaking up to the edge of the block.<br/>Just like on Bedrock!
Place blocks in front of you without sneaking up to the edge of the block.<br />Just like on Bedrock!
</Feature>
<Feature icon="ion:layers-outline" title="Vertical Reacharound">
Easily place something below the block you are standing on!
@@ -78,9 +91,10 @@ import ContentMedia from '../components/ContentMedia.astro'
</div>
</div>
</section>
<CallToAction text="Download MidnightControlsExtra!"
url_gh="https://github.com/TeamMidnightDust/MidnightControlsExtra"
url_mr="https://modrinth.com/mod/midnightcontrols-extra"
url_cf="https://www.curseforge.com/minecraft/mc-mods/midnightcontrolsextra"
<CallToAction
text="Download MidnightControlsExtra!"
url_gh="https://github.com/TeamMidnightDust/MidnightControlsExtra"
url_mr="https://modrinth.com/mod/midnightcontrols-extra"
url_cf="https://www.curseforge.com/minecraft/mc-mods/midnightcontrolsextra"
/>
</DefaultLayout>

View File

@@ -6,29 +6,32 @@ import ContentMedia from '../components/ContentMedia.astro'
---
<DefaultLayout title="MidnightLib">
<h2 class="my-8 text-6xl text-center">MidnightLib</h2>
<h1 class="my-8 text-center">MidnightLib</h1>
<ContentMedia imgSrc="/midnightlib/midnightlib-example-code.webp">
<h2>Implement configurations easier than ever before!</h2>
<p class="text-2xl">
Just create Java fields, annotate them with <span class="bg-clip-text text-transparent bg-gradient-to-r from-yellow-500 to-orange-500 font-mono">@Entry</span>,
maybe add some more additional options, and boom! <br>
This example can be found <a href="https://github.com/TeamMidnightDust/MidnightLib/blob/architectury/MidnightConfigExample.java"
>here</a>, and helps you get started (almost) faster than speed of light!
Just create Java fields, annotate them with <span
class="bg-gradient-to-r from-yellow-500 to-orange-500 bg-clip-text font-mono text-transparent">@Entry</span
>, maybe add some more additional options, and boom! <br />
This example can be found <a
href="https://github.com/TeamMidnightDust/MidnightLib/blob/architectury/MidnightConfigExample.java">here</a
>, and helps you get started (almost) faster than speed of light!
</p>
</ContentMedia>
<ContentMedia imgSrc="/midnightlib/midnightlib-example.png" reverseImg={true}>
<h2>User-friendly config screens</h2>
<p class="text-2xl">
Configuration screens are automatically created from config classes.<br>
Configuration screens are automatically created from config classes.<br />
Here's one generated from a class similar to the one from above!
</p>
</ContentMedia>
<section>
<div class="container">
<h2 class="mb-16 text-6xl">Features</h2>
<h1 class="mb-16">Features</h1>
<div class="grid grid-cols-1 gap-12 md:grid-cols-2 lg:grid-cols-3">
<Feature icon="ion:leaf-outline" title="Lightweight">
Size of the .jar is currently just 50KB.<br>Everything essential for the config (including GUI) is only 30KB!
Size of the .jar is currently just 50KB.<br />Everything essential for the config (including GUI) is only
30KB!
</Feature>
<Feature icon="ion:cafe-outline" title="JiJ-able">
Bundle MidnightLib with your mod with ease. Gone are the days of installing dependencies manually!
@@ -48,10 +51,11 @@ import ContentMedia from '../components/ContentMedia.astro'
</div>
</div>
</section>
<CallToAction text="Start using MidnightLib right now!"
url_gh="https://github.com/TeamMidnightDust/MidnightLib"
url_mr="https://modrinth.com/mod/midnightlib"
url_cf="https://www.curseforge.com/minecraft/mc-mods/midnightlib"
url_wiki="/wiki/midnightlib"
<CallToAction
text="Start using MidnightLib right now!"
url_gh="https://github.com/TeamMidnightDust/MidnightLib"
url_mr="https://modrinth.com/mod/midnightlib"
url_cf="https://www.curseforge.com/minecraft/mc-mods/midnightlib"
url_wiki="/wiki/midnightlib"
/>
</DefaultLayout>

56
src/pages/thisrocks.astro Normal file
View File

@@ -0,0 +1,56 @@
---
import DefaultLayout from '../layouts/DefaultLayout.astro'
import BlurryDivider from '../components/BlurryDivider.astro'
import CallToAction from '../components/CallToAction.astro'
import ContentMedia from '../components/ContentMedia.astro'
---
<DefaultLayout title="This Rocks!">
<h1 class="my-8 text-center">This Rocks!</h1>
<ContentMedia imgSrc="/thisrocks/thisrocks_plains.png">
<h2>
Enhance your world generation with <span
class="bg-gradient-to-r from-green-500 to-yellow-500 bg-clip-text text-transparent">detailed</span
> natural blocks.
</h2>
<p class="text-2xl">
Are you bored of staring at endless empty plains and beaches?<br />
This Rocks is on its way to rescue you!
</p>
</ContentMedia>
<ContentMedia imgSrc="/thisrocks/thisrocks_sea.png" reverseImg={true}>
<h2>
Enjoy nature on <span class="bg-gradient-to-r from-purple-500 to-orange-500 bg-clip-text text-transparent"
>vanilla</span
>
clients!
</h2>
<p class="text-2xl">
Thanks to the Polymer library, newer versions of the mod allow anyone to join the server and enjoy the pretty
decorations.<br />
No client mods required!<br />
<p>
Only available in the Fabric version. Find more serverside mods <a href="https://modrinth.com/mods?q=polymer"
>here</a
>
.
</p>
</p>
</ContentMedia>
<BlurryDivider />
<CallToAction
text="Start using This Rocks on Fabric right now!"
icon="fabric"
url_gh="https://github.com/TeamMidnightDust/ThisRocks"
url_mr="https://modrinth.com/mod/this-rocks"
url_cf="https://www.curseforge.com/minecraft/mc-mods/this-rocks"
/>
<CallToAction
text="Are you on (Neo-)Forge? Here you go!"
icon="neoforge"
url_gh="https://github.com/Mrbysco/ThisRocksForge"
url_mr="https://modrinth.com/mod/this-rocks-forge"
url_cf="https://www.curseforge.com/minecraft/mc-mods/this-rocks-forge"
mod="neoforge"
/>
</DefaultLayout>

View File

@@ -9,22 +9,23 @@ import { Icon } from 'astro-icon/components'
import { Notification } from 'accessible-astro-components'
import CustomTabs from "../../components/CustomTabs.astro"
import Difficulty from "../../components/Difficulty.astro"
import BlurryDivider from "../../components/BlurryDivider.astro"
import pythonCodeImage from '../../assets/betterleaves/script.png';
import ingameImage from '../../assets/betterleaves/ingame.png';
# Better Leaves Wiki
Welcome to the Better Leaves wiki.
This documentation aims to help you create your own flavour for any texturepack or mod.
Welcome to the Better Leaves wiki.
This documentation aims to help you create your own flavour for any texturepack or mod.
<br/>
<ImageComparison firstTitle="Python Code" secondTitle="In-Game" sliderColor='var(--action-color)' sliderShadowColor='var(--action-color)'>
<ImageComparison firstTitle="Python Code" secondTitle="In-Game" sliderColor='var(--action-color)' sliderShadowColor='var(--action-color)'>
<Image slot="first-image" width="1920" height="1080" alt="A screenshot showing the Python script code" src={pythonCodeImage}/>
<Image slot="second-image" width="1920" height="1080" alt="A screenshot of the Better Leaves resourcepack in action" src={ingameImage}/>
</ImageComparison>
## Getting Started <Difficulty difficulty="easy" />
First of all, you need to download the contents of the GitHub repository.
First of all, you need to download the contents of the GitHub repository.
To do so, you can either download the [zip file](https://github.com/TeamMidnightDust/BetterLeavesLite/archive/refs/heads/main.zip), or just execute
```bash
git clone https://github.com/TeamMidnightDust/BetterLeavesLite.git
@@ -32,23 +33,23 @@ git clone https://github.com/TeamMidnightDust/BetterLeavesLite.git
in a terminal window.
## Texturepacks <Difficulty difficulty="easy" />
You can easily create a build for any texturepack.
Just add the pack (as a .zip file or folder) to the input/texturepacks/ folder.
You can easily create a build for any texturepack.
Just add the pack (as a .zip file or folder) to the input/texturepacks/ folder.
After that, follow the <a href="#building">Building</a> section to get your flavour!
<center><img alt="An overview of the input folder" src="/betterleaves/input-folder.png" width="500"></img></center>
<p class="text-center italic">The input folder is all you have to worry about</p>
<p class="text-center italic">The input folder is all you have to worry about</p>
## Mods <Difficulty difficulty="easy" />
In simple cases, it is enough to put the mod file in the /input/mods folder and continue with the <a href="#building">Building</a> section.
In simple cases, it is enough to put the mod file in the /input/mods folder and continue with the <a href="#building">Building</a> section.
<center><img alt="An overview of the input/mods folder, showing the automatic unpacking process" src="/betterleaves/mods-unpacking.png" width="500"></img></center>
<p class="text-center italic">Put the .jar file into input/mods, and the script will take care of extracting all textures with "leaves" in their name.
<br/>The _temp folder is purely symbolic here, it will only exist for a few milliseconds during the extraction process.</p>
## Building <Difficulty difficulty="medium" />
To build your flavour of the pack, you need to have Python installed on your system.
You can get it on any modern operating system.
To build your flavour of the pack, you need to have Python installed on your system.
You can get it on any modern operating system.
<CustomTabs tabs={[{
name: `Windows`,
@@ -66,7 +67,7 @@ You can get it on any modern operating system.
}]}>
<div id="windows" data-active="true">
Download the latest stable Python 3 release from the official <a href="https://www.python.org/downloads/windows/">website</a><br/>
or using winget in PowerShell:
or using winget in PowerShell:
<br/>
```bash
winget install -e --id Python.Python.3.13.1
@@ -74,16 +75,16 @@ You can get it on any modern operating system.
</div>
<div id="linux" class="hidden">
On most systems, Python should already be installed by default.<br/>
Else, just install Python using your distro's package manager.
Else, just install Python using your distro's package manager.
<br/>
Arch Linux:
Arch Linux:
```bash
pacman -S python
```
</div>
<div id="macos" class="hidden">
In case you haven't already, install Homebrew according to the <a href="https://brew.sh/">official instructions</a>.<br/>
Now, you can just install python using the following command:
Now, you can just install python using the following command:
<br/>
```bash
brew install python
@@ -91,8 +92,8 @@ You can get it on any modern operating system.
</div>
</CustomTabs>
Now that you have python installed, head back into the BetterLeavesLite directory.
Here, you should now open a terminal window and run
Now that you have python installed, head back into the BetterLeavesLite directory.
Here, you should now open a terminal window and run
```bash
pip install -r requirements.txt
```
@@ -100,12 +101,12 @@ To build the pack, execute the script using the following command:
```bash
python3 gen_pack.py 1.0 Your Edition
```
Replace "1.0" with your desired version number and "Your Edition" with the name you'd like to appear in the resourcepack description ingame.
Replace "1.0" with your desired version number and "Your Edition" with the name you'd like to appear in the resourcepack description ingame.
And in no time, the script will generate a ready-to-use zip file with your desired content.
## Irregularities and Missing Textures <Difficulty difficulty="advanced" />
If you see missing textures when trying your freshly-built pack, the mod you're adding support for has a more complicated asset structure.
In these cases, you unfortunately have to manually configure exceptions in the /input/overrides.json file.
If you see missing textures when trying your freshly-built pack, the mod you're adding support for has a more complicated asset structure.
In these cases, you unfortunately have to manually configure exceptions in the /input/overrides.json file.
```json
{
// Leaves that should not be tinted based on the biome they're in
@@ -133,6 +134,70 @@ In these cases, you unfortunately have to manually configure exceptions in the /
"dynamicTreesNamespaces": {
"minecraft": "dynamictrees",
"aether": "dtaether"
},
// Force-generate (non-bushy) item models for various blocks
"generateItemModels": [
"biomesoplenty:rainbow_birch_leaves",
"betterend:lacugrove_leaves"
],
// Specify blocks that share the same models
"blockStateCopies": {
"minecraft:oak_leaves": [
"twilightforest:twilight_oak_leaves",
"dynamictrees:oak_undergrowth_leaves"
]
},
// A list of textures that will not be treated as leaf blocks (useful for texture stitching)
"compileOnly": [
"minecraft:block/snow"
]
}
```
<BlurryDivider />
## The .betterleaves.json format
### Block States <Difficulty difficulty="advanced" />
Sometimes, you want models to only apply to specific block states.
This is also useful in cases where you want to combine multiple leaf variant textures into a single blockstate file (in that case, set state to "").
`input/assets/eternal_starlight/northland_leaves.betterleaves.json`:
```json
{
"blockStateData": {
"block": "eternal_starlight:northland_leaves",
"state": "snowy=false"
}
}
```
```
### Sprite Overrides <Difficulty difficulty="advanced" />
You can override the sprites used in the model. Currently, top and bottom faces of the leaf model will default to the regular texture, but can be overridden this way.
`input/assets/eternal_starlight/northland_leaves_snowy.betterleaves.json`:
```json
{
"spriteOverrides": {
"top": "minecraft:block/snow",
"bottom": "eternal_starlight:block/northland_leaves"
}
...
}
```
### Texture Stitching <Difficulty difficulty="hard" />
Some leaves have textures that consist of different halves for example Blue Wisteria Leaves from Environmental.
This is where texture stitching comes in.
<center><img style="image-rendering: pixelated" alt="Showcase of the texture stitching layout" src="/betterleaves/demo_blue_wisteria_leaves_top.png" width="400"></img></center>
<p class="text-center italic">Texture stitching allows you to use custom sub-textures while generating the bushy texture</p>
`input/assets/environmental/blue_wisteria_leaves_top.betterleaves.json`:
```json
{
"textureStitching": {
"1-3": "environmental:block/wisteria_leaves",
// Unspecified parts will use the regular leaf texture
"7-9": "environmental:block/blue_wisteria_leaves"
}
...
}
```