From 4479a8801e3c2aa901cd1499f459272805472222 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Tue, 27 May 2025 13:02:57 -0400 Subject: Reinit with old packs archived --- website/static/capes/.gitignore | 1 + website/static/index.html | 26 ++++++++++++++++++ website/static/index.js | 25 +++++++++++++++++ website/static/mrpacks/.gitignore | 1 + website/static/style.css | 53 ++++++++++++++++++++++++++++++++++++ website/static/template.html | 56 ++++++++++++++++++++++++++++++++++++++ website/static/template.png | Bin 0 -> 766 bytes 7 files changed, 162 insertions(+) create mode 100644 website/static/capes/.gitignore create mode 100644 website/static/index.html create mode 100644 website/static/index.js create mode 100644 website/static/mrpacks/.gitignore create mode 100644 website/static/style.css create mode 100644 website/static/template.html create mode 100644 website/static/template.png (limited to 'website/static') diff --git a/website/static/capes/.gitignore b/website/static/capes/.gitignore new file mode 100644 index 0000000..e33609d --- /dev/null +++ b/website/static/capes/.gitignore @@ -0,0 +1 @@ +*.png diff --git a/website/static/index.html b/website/static/index.html new file mode 100644 index 0000000..6394fcf --- /dev/null +++ b/website/static/index.html @@ -0,0 +1,26 @@ + + + + + Cape Setter + + + + +
+ +
+ + +
+
+
+ +
+
+ +
+
+
+ + diff --git a/website/static/index.js b/website/static/index.js new file mode 100644 index 0000000..22bfc20 --- /dev/null +++ b/website/static/index.js @@ -0,0 +1,25 @@ +const IP = "http://:12444"; + +function init() { + document.getElementById('file').addEventListener('change', handleFileSelect, false); +} + +function handleFileSelect(event) { + var username = document.getElementById('username').value + if (!username) { + return; + } + const reader = new FileReader(); + const url = IP + '/capes'; + var formData = new FormData(); + formData.append('username', username); + formData.append('data', event.target.files[0]); + fetch(url, { + method : "POST", + body: formData + }).then((response) => { + if (response.ok) { + document.getElementById('preview').src = IP + '/static/capes/' + username + '.png'; + } + }); +} diff --git a/website/static/mrpacks/.gitignore b/website/static/mrpacks/.gitignore new file mode 100644 index 0000000..bca65f2 --- /dev/null +++ b/website/static/mrpacks/.gitignore @@ -0,0 +1 @@ +*.mrpack diff --git a/website/static/style.css b/website/static/style.css new file mode 100644 index 0000000..242ced7 --- /dev/null +++ b/website/static/style.css @@ -0,0 +1,53 @@ +#main { + display: flex; + flex-direction: column; +} + +#preview { + width: 35%; + height: 35%; + /* IE, only works on tags */ + -ms-interpolation-mode: nearest-neighbor; + /* Firefox */ + image-rendering: crisp-edges; + /* Chromium + Safari */ + image-rendering: pixelated; +} + +#template { + width: 100%; + display: flex; + align-items: center; + flex-direction: row; +} + +ul { + margin-left: 2px; +} + +.input-color { + position: relative; + margin-top: -10px; +} + +.input-color p { + padding-left: 30px; +} + +.input-color .color-box { + width: 20px; + height: 20px; + display: inline-block; + background-color: #ccc; + position: absolute; + left: 5px; + top: -1px; +} + +#desc { + margin-top: 0px; +} + +#desc p { + margin-bottom: -10px; +} diff --git a/website/static/template.html b/website/static/template.html new file mode 100644 index 0000000..f7d62de --- /dev/null +++ b/website/static/template.html @@ -0,0 +1,56 @@ + + + + + Cape Template + + + +
+ +
    +
    +

    Top

    +
    +
    +
    +

    Bottom

    +
    +
    +
    +

    Left Side

    +
    +
    +
    +

    Front

    +
    +
    +
    +

    Right Side

    +
    +
    +
    +

    Back

    +
    +
    +
    +

    Elytra (back is mirrored)

    +
    +
    +
    +

    Elytra Bottom

    +
    +
    +
    +

    Elytra Inner

    +
    +
    +
+
+
+

Right click and "Save Image As...", edit, then upload here.

+

If you don't want to edit the Elytra texture, you can crop it out.

+

Feel free to scale. Only use integer scaling (Multiply width/height by a whole number).

+
+ + diff --git a/website/static/template.png b/website/static/template.png new file mode 100644 index 0000000..102e5bf Binary files /dev/null and b/website/static/template.png differ -- cgit v1.2.3-101-g0448