Fixed generator issue and some template improvements
Some checks are pending
Validate HTML site / build (push) Waiting to run

This commit is contained in:
Stijn Bannink 2024-10-13 14:29:21 +02:00
parent 146c19211c
commit 3d42c62b54
Signed by: SBDeveloper
GPG key ID: B730712F2C3A9D7A
13 changed files with 41 additions and 7 deletions

4
dist/css/styles.css vendored
View file

@ -1,3 +1,7 @@
[data-bs-theme="dark"] body {
background-color: #1e1e1e !important;
}
.form-check-input { .form-check-input {
clear: left; clear: left;
} }

View file

@ -1 +1 @@
.form-check-input{clear:left}.form-switch.form-switch-sm{margin-bottom:.5rem}.form-switch.form-switch-sm .form-check-input{height:1rem;width:calc(1rem + .75rem);border-radius:2rem}.form-switch.form-switch-md{margin-bottom:1rem}.form-switch.form-switch-md .form-check-input{height:1.5rem;width:calc(2rem + .75rem);border-radius:3rem}.form-switch.form-switch-lg{margin-bottom:1.5rem}.form-switch.form-switch-lg .form-check-input{height:2rem;width:calc(3rem + .75rem);border-radius:4rem}.form-switch.form-switch-xl{margin-bottom:2rem}.form-switch.form-switch-xl .form-check-input{height:2.5rem;width:calc(4rem + .75rem);border-radius:5rem} [data-bs-theme=dark] body{background-color:#1e1e1e!important}.form-check-input{clear:left}.form-switch.form-switch-sm{margin-bottom:.5rem}.form-switch.form-switch-sm .form-check-input{height:1rem;width:calc(1rem + .75rem);border-radius:2rem}.form-switch.form-switch-md{margin-bottom:1rem}.form-switch.form-switch-md .form-check-input{height:1.5rem;width:calc(2rem + .75rem);border-radius:3rem}.form-switch.form-switch-lg{margin-bottom:1.5rem}.form-switch.form-switch-lg .form-check-input{height:2rem;width:calc(3rem + .75rem);border-radius:4rem}.form-switch.form-switch-xl{margin-bottom:2rem}.form-switch.form-switch-xl .form-check-input{height:2.5rem;width:calc(4rem + .75rem);border-radius:5rem}

BIN
dist/img/favicon/apple-touch-icon.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
dist/img/favicon/favicon-48x48.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
dist/img/favicon/favicon.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

3
dist/img/favicon/favicon.svg vendored Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 300 KiB

21
dist/img/favicon/site.webmanifest vendored Normal file
View file

@ -0,0 +1,21 @@
{
"name": "MyWebSite",
"short_name": "MySite",
"icons": [
{
"src": "/web-app-manifest-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "/web-app-manifest-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

View file

Before

Width:  |  Height:  |  Size: 225 KiB

After

Width:  |  Height:  |  Size: 225 KiB

View file

@ -38,7 +38,7 @@ function buildJSON(supportsCMD, item, namespace, models) {
if (supportsCMD) { if (supportsCMD) {
//Insert custom model data models //Insert custom model data models
for (let i = 0; i < models.length; i++) { for (let i = 0; i < models.length; i++) {
json['overrides'][i + 1] = { json['overrides'][i] = {
'predicate': { 'predicate': {
'custom_model_data': i + 1 'custom_model_data': i + 1
}, },

View file

@ -1 +1 @@
const itemDamages={leather_helmet:55,leather_chestplate:80,leather_leggings:75,leather_boots:65,netherite_hoe:2031,diamond_axe:1561,diamond_hoe:1561,shears:238};function buildJSON(supportsCMD,item,namespace,models){namespace=namespace==="minecraft"?"":namespace+":";const json={};json["parent"]="item/handheld";json["textures"]={layer0:"item/"+item,layer1:"item/"+item+"_overlay"};json["overrides"]=[];if(supportsCMD){for(let i=0;i<models.length;i++){json["overrides"][i+1]={predicate:{custom_model_data:i+1},model:namespace+"item/"+models[i]}}}else{json["overrides"][0]={predicate:{damaged:0,damage:0},model:"item/"+item};for(let i=0;i<models.length;i++){json["overrides"][i+1]={predicate:{damaged:0,damage:((i+1)/(itemDamages[item]-1)).toFixed(6)},model:namespace+"item/"+models[i]}}json["overrides"][models.length+1]={predicate:{damaged:1,damage:0},model:"item/"+item}}return JSON.stringify(json,null,2)} const itemDamages={leather_helmet:55,leather_chestplate:80,leather_leggings:75,leather_boots:65,netherite_hoe:2031,diamond_axe:1561,diamond_hoe:1561,shears:238};function buildJSON(supportsCMD,item,namespace,models){namespace=namespace==="minecraft"?"":namespace+":";const json={};json["parent"]="item/handheld";json["textures"]={layer0:"item/"+item,layer1:"item/"+item+"_overlay"};json["overrides"]=[];if(supportsCMD){for(let i=0;i<models.length;i++){json["overrides"][i]={predicate:{custom_model_data:i+1},model:namespace+"item/"+models[i]}}}else{json["overrides"][0]={predicate:{damaged:0,damage:0},model:"item/"+item};for(let i=0;i<models.length;i++){json["overrides"][i+1]={predicate:{damaged:0,damage:((i+1)/(itemDamages[item]-1)).toFixed(6)},model:namespace+"item/"+models[i]}}json["overrides"][models.length+1]={predicate:{damaged:1,damage:0},model:"item/"+item}}return JSON.stringify(json,null,2)}

View file

@ -2,7 +2,7 @@
<html lang="en" data-bs-theme="dark"> <html lang="en" data-bs-theme="dark">
<head> <head>
<title>Model File Generator · SBDevelopment</title> <title>Model File Generator | SBDevelopment</title>
<meta name="title" content="Model File Generator"> <meta name="title" content="Model File Generator">
<meta name="description" content="Easily generate the resourcepack asset files for your VehiclesPlus models."> <meta name="description" content="Easily generate the resourcepack asset files for your VehiclesPlus models.">
@ -13,10 +13,16 @@
<meta name="theme-color" content="#f49604"/> <meta name="theme-color" content="#f49604"/>
<link rel="icon" type="image/png" href="dist/img/favicon/favicon-48x48.png" sizes="48x48"/>
<link rel="icon" type="image/svg+xml" href="dist/img/favicon/favicon.svg"/>
<link rel="shortcut icon" href="dist/img/favicon/favicon.ico"/>
<link rel="apple-touch-icon" sizes="180x180" href="dist/img/favicon/apple-touch-icon.png"/>
<link rel="manifest" href="dist/img/favicon/site.webmanifest"/>
<meta property="og:type" content="website"> <meta property="og:type" content="website">
<meta property="og:title" content="Model File Generator"> <meta property="og:title" content="Model File Generator">
<meta property="og:url" content="https://vpmodelfiletool.sbdevelopment.tech/"> <meta property="og:url" content="https://vpmodelfiletool.sbdevelopment.tech/">
<meta property="og:image" content="https://vpmodelfiletool.sbdevelopment.tech/vp.png"> <meta property="og:image" content="https://vpmodelfiletool.sbdevelopment.tech/dist/img/vp.png">
<meta property="og:description" <meta property="og:description"
content="Easily generate the resourcepack asset files for your VehiclesPlus models."> content="Easily generate the resourcepack asset files for your VehiclesPlus models.">
@ -38,8 +44,8 @@
<body> <body>
<div class="container"> <div class="container">
<div class="jumbotron my-4"> <div class="jumbotron my-4">
<h1 class="display-4 pb-1"><img src="https://sbdevelopment.tech/wp-content/uploads/2023/09/logo2-light.png" <h1 class="display-4 pb-1"><img src="dist/img/vp.png"
alt="SBDevelopment logo" class="pe-1 pb-2" style="width: 3em;"> Model File alt="VehiclesPlus" class="pe-1 pb-2" style="width: 2em;"> Model File
Generator</h1> Generator</h1>
<p class="lead">Generate the resourcepack asset files for your VehiclesPlus models.</p> <p class="lead">Generate the resourcepack asset files for your VehiclesPlus models.</p>
<hr class="mb-3"> <hr class="mb-3">