Add image bkgrounds

This commit is contained in:
Kenwood 2025-07-02 11:34:14 -04:00
parent 663edf97cd
commit 5370e12afb
7 changed files with 178 additions and 133 deletions

BIN
www/Composite.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

BIN
www/characters/zae.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 817 KiB

BIN
www/characters/zae.png~ Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

View File

@ -7,20 +7,21 @@
"url": "https://www.f-list.net/c/alice%20prairie" "url": "https://www.f-list.net/c/alice%20prairie"
}, },
{ {
"name": "Bear Cum", "name": "Zae & Kan'vi Cum",
"volume": 9, "volume": 81,
"color": "#523a33", "color": "#FF56BD",
"url": "https://www.f-list.net/c/Glyren" "url": "https://www.f-list.net/c/Zae",
"image": "characters/zae.png"
}, },
{ {
"name": "Kan'vi Cum (Glowing)", "name": "Dog Cum",
"volume": 18, "volume": 8,
"color": "#FF56BD", "color": "#940619",
"url": "https://www.f-list.net/c/Zae" "url": "https://www.f-list.net/c/maxene%20sita/"
} }
], ],
"settings": { "settings": {
"tankTopOffset": 265, "tankTopOffset": 360,
"tankBottomOffset": 101 "tankBottomOffset": 101
} }
} }

BIN
www/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@ -1,6 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
@ -22,24 +21,47 @@
<body> <body>
<div class="container"> <div class="container">
<div class="tank-container"> <div class="tank-container">
<img src="Alice_close_up_sheath_background.png" alt="Tank Background Back" <img
class="background-image background-image-back" /> src="Alice_close_up_sheath_background.png"
<img src="Alice_close_up_sheath_shot.png" alt="Tank Background Foreground" alt="Tank Background Back"
class="background-image background-image-fore" /> class="background-image background-image-back"
/>
<img
src="Alice_close_up_sheath_shot.png"
alt="Tank Background Foreground"
class="background-image background-image-fore"
/>
<!-- Liquid layers will be inserted here by JavaScript! --> <!-- Liquid layers will be inserted here by JavaScript! -->
<div class="artist-link"> <div class="artist-link">
<a href="https://x.com/Raven4Seth" target="_blank" rel="noopener noreferrer">Art by SethRaven4</a> <a
href="https://x.com/Raven4Seth"
target="_blank"
rel="noopener noreferrer"
>Art by SethRaven4</a
>
</div> </div>
</div> </div>
<div class="settings"> <div class="settings">
<h2>Settings</h2> <h2>Settings</h2>
<label> <label>
Tank Top Offset (px): Tank Top Offset (px):
<input type="number" id="tankTopOffset" value="22" min="0" max="800" /> <input
type="number"
id="tankTopOffset"
value="22"
min="0"
max="800"
/>
</label> </label>
<label> <label>
Tank Bottom Offset (px): Tank Bottom Offset (px):
<input type="number" id="tankBottomOffset" value="40" min="0" max="800" /> <input
type="number"
id="tankBottomOffset"
value="40"
min="0"
max="800"
/>
</label> </label>
</div> </div>
</div> </div>
@ -72,14 +94,26 @@
const tankContainerHeight = tankContainer.offsetHeight; const tankContainerHeight = tankContainer.offsetHeight;
const tankTopOffset = tankData.settings.tankTopOffset; const tankTopOffset = tankData.settings.tankTopOffset;
const tankBottomOffset = tankData.settings.tankBottomOffset; const tankBottomOffset = tankData.settings.tankBottomOffset;
const tankHeight = tankContainerHeight - tankTopOffset - tankBottomOffset; const tankHeight =
tankContainerHeight - tankTopOffset - tankBottomOffset;
let currentHeight = 0; let currentHeight = 0;
let cumulativeVolume = 0; let cumulativeVolume = 0;
tankData.liquids.forEach((liquid, i) => { tankData.liquids.forEach((liquid, i) => {
const layer = document.createElement("div"); const layer = document.createElement("div");
layer.className = "liquid-layer"; layer.className = "liquid-layer";
// Set background: image if present, else color
if (liquid.image) {
layer.style.backgroundImage = `url(${liquid.image})`;
layer.style.backgroundSize = "660px";
layer.style.backgroundRepeat = "no-repeat";
layer.style.backgroundPosition = "right 110px top 0px";
layer.style.backgroundColor = liquid.color; layer.style.backgroundColor = liquid.color;
} else {
layer.style.backgroundImage = "";
layer.style.backgroundColor = liquid.color;
}
// Create the label // Create the label
const label = document.createElement("div"); const label = document.createElement("div");
@ -100,11 +134,11 @@
// Shift label left if cumulative volume is under 20% // Shift label left if cumulative volume is under 20%
if (cumulativeVolume < 20) { if (cumulativeVolume < 20) {
label.style.left = '18%'; label.style.left = "18%";
label.style.transform = 'translate(-30%, -50%)'; label.style.transform = "translate(-30%, -50%)";
} else { } else {
label.style.left = '50%'; label.style.left = "50%";
label.style.transform = 'translate(-50%, -50%)'; label.style.transform = "translate(-50%, -50%)";
} }
// Calculate height based on volume percentage // Calculate height based on volume percentage
@ -126,7 +160,9 @@
if (!tankData) return; if (!tankData) return;
tankData.settings.tankTopOffset = parseInt(tankTopOffsetInput.value); tankData.settings.tankTopOffset = parseInt(tankTopOffsetInput.value);
tankData.settings.tankBottomOffset = parseInt(tankBottomOffsetInput.value); tankData.settings.tankBottomOffset = parseInt(
tankBottomOffsetInput.value
);
updateTank(); updateTank();
} }
@ -141,12 +177,17 @@
<!-- Footer --> <!-- Footer -->
<footer class="tiny-footer"> <footer class="tiny-footer">
<span> <span>
Art by <a href="https://x.com/Raven4Seth" target="_blank" rel="noopener noreferrer">SethRave4</a> Art by
&bull; <a
Message <a href="mailto:vixi@snowsune.net">vixi@snowsune.net</a> for questions/comments/anything! href="https://x.com/Raven4Seth"
target="_blank"
rel="noopener noreferrer"
>SethRave4</a
>
&bull; Message
<a href="mailto:vixi@snowsune.net">vixi@snowsune.net</a> for
questions/comments/anything!
</span> </span>
</footer> </footer>
</body> </body>
</html> </html>

View File

@ -72,6 +72,9 @@ h1 {
transition: all 0.3s ease; transition: all 0.3s ease;
z-index: 2; z-index: 2;
overflow: hidden; overflow: hidden;
background-position: top center;
background-repeat: no-repeat;
background-size: contain;
} }
.liquid-layer > div { .liquid-layer > div {