Fix first image
This commit is contained in:
parent
5370e12afb
commit
46d0008b72
|
|
@ -7,17 +7,11 @@
|
||||||
"url": "https://www.f-list.net/c/alice%20prairie"
|
"url": "https://www.f-list.net/c/alice%20prairie"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Zae & Kan'vi Cum",
|
"name": "Zae",
|
||||||
"volume": 81,
|
"volume": 39,
|
||||||
"color": "#FF56BD",
|
"color": "#FF56BD",
|
||||||
"url": "https://www.f-list.net/c/Zae",
|
"url": "https://www.f-list.net/c/Zae",
|
||||||
"image": "characters/zae.png"
|
"image": "characters/zae.png"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Dog Cum",
|
|
||||||
"volume": 8,
|
|
||||||
"color": "#940619",
|
|
||||||
"url": "https://www.f-list.net/c/maxene%20sita/"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
|
|
|
||||||
329
www/index.html
329
www/index.html
|
|
@ -1,193 +1,168 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<title>Cumtanks.snowusne.net</title>
|
|
||||||
|
|
||||||
<!-- Open Graph / Discord -->
|
<head>
|
||||||
<meta property="og:type" content="website" />
|
<meta charset="UTF-8" />
|
||||||
<meta property="og:title" content="cumtanks.snowusne.net" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<meta property="og:image" content="/preview.png" />
|
<title>Cumtanks.snowusne.net</title>
|
||||||
|
|
||||||
<!-- Twitter -->
|
<!-- Open Graph / Discord -->
|
||||||
<meta name="twitter:card" content="summary_large_image" />
|
<meta property="og:type" content="website" />
|
||||||
<meta name="twitter:title" content="cumtanks.snowusne.net" />
|
<meta property="og:title" content="cumtanks.snowusne.net" />
|
||||||
<meta name="twitter:image" content="/preview.png" />
|
<meta property="og:image" content="/preview.png" />
|
||||||
|
|
||||||
<link rel="stylesheet" href="styles.css" />
|
<!-- Twitter -->
|
||||||
</head>
|
<meta name="twitter:card" content="summary_large_image" />
|
||||||
|
<meta name="twitter:title" content="cumtanks.snowusne.net" />
|
||||||
|
<meta name="twitter:image" content="/preview.png" />
|
||||||
|
|
||||||
<body>
|
<link rel="stylesheet" href="styles.css" />
|
||||||
<div class="container">
|
</head>
|
||||||
<div class="tank-container">
|
|
||||||
<img
|
<body>
|
||||||
src="Alice_close_up_sheath_background.png"
|
<img src="preview.png" alt="Preview" style="display:none;" aria-hidden="true" />
|
||||||
alt="Tank Background Back"
|
<div class="container">
|
||||||
class="background-image background-image-back"
|
<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_shot.png"
|
<img src="Alice_close_up_sheath_shot.png" alt="Tank Background Foreground"
|
||||||
alt="Tank Background Foreground"
|
class="background-image background-image-fore" />
|
||||||
class="background-image background-image-fore"
|
<!-- Liquid layers will be inserted here by JavaScript! -->
|
||||||
/>
|
<div class="artist-link">
|
||||||
<!-- Liquid layers will be inserted here by JavaScript! -->
|
<a href="https://x.com/Raven4Seth" target="_blank" rel="noopener noreferrer">Art by SethRaven4</a>
|
||||||
<div class="artist-link">
|
|
||||||
<a
|
|
||||||
href="https://x.com/Raven4Seth"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
>Art by SethRaven4</a
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="settings">
|
|
||||||
<h2>Settings</h2>
|
|
||||||
<label>
|
|
||||||
Tank Top Offset (px):
|
|
||||||
<input
|
|
||||||
type="number"
|
|
||||||
id="tankTopOffset"
|
|
||||||
value="22"
|
|
||||||
min="0"
|
|
||||||
max="800"
|
|
||||||
/>
|
|
||||||
</label>
|
|
||||||
<label>
|
|
||||||
Tank Bottom Offset (px):
|
|
||||||
<input
|
|
||||||
type="number"
|
|
||||||
id="tankBottomOffset"
|
|
||||||
value="40"
|
|
||||||
min="0"
|
|
||||||
max="800"
|
|
||||||
/>
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="settings">
|
||||||
|
<h2>Settings</h2>
|
||||||
|
<label>
|
||||||
|
Tank Top Offset (px):
|
||||||
|
<input type="number" id="tankTopOffset" value="22" min="0" max="800" />
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
Tank Bottom Offset (px):
|
||||||
|
<input type="number" id="tankBottomOffset" value="40" min="0" max="800" />
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
let tankData = null;
|
let tankData = null;
|
||||||
const tankContainer = document.querySelector(".tank-container");
|
const tankContainer = document.querySelector(".tank-container");
|
||||||
const tankTopInput = document.getElementById("tankTop");
|
const tankTopInput = document.getElementById("tankTop");
|
||||||
const tankBottomInput = document.getElementById("tankBottom");
|
const tankBottomInput = document.getElementById("tankBottom");
|
||||||
const tankTopOffsetInput = document.getElementById("tankTopOffset");
|
const tankTopOffsetInput = document.getElementById("tankTopOffset");
|
||||||
const tankBottomOffsetInput = document.getElementById("tankBottomOffset");
|
const tankBottomOffsetInput = document.getElementById("tankBottomOffset");
|
||||||
|
|
||||||
async function loadData() {
|
async function loadData() {
|
||||||
try {
|
try {
|
||||||
const response = await fetch("data.json");
|
const response = await fetch("data.json");
|
||||||
tankData = await response.json();
|
tankData = await response.json();
|
||||||
updateTank();
|
|
||||||
} catch (error) {
|
|
||||||
console.error("Error loading tank data:", error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateTank() {
|
|
||||||
if (!tankData) return;
|
|
||||||
|
|
||||||
// Clear existing liquid layers
|
|
||||||
const existingLayers = document.querySelectorAll(".liquid-layer");
|
|
||||||
existingLayers.forEach((layer) => layer.remove());
|
|
||||||
|
|
||||||
const tankContainerHeight = tankContainer.offsetHeight;
|
|
||||||
const tankTopOffset = tankData.settings.tankTopOffset;
|
|
||||||
const tankBottomOffset = tankData.settings.tankBottomOffset;
|
|
||||||
const tankHeight =
|
|
||||||
tankContainerHeight - tankTopOffset - tankBottomOffset;
|
|
||||||
let currentHeight = 0;
|
|
||||||
let cumulativeVolume = 0;
|
|
||||||
|
|
||||||
tankData.liquids.forEach((liquid, i) => {
|
|
||||||
const layer = document.createElement("div");
|
|
||||||
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;
|
|
||||||
} else {
|
|
||||||
layer.style.backgroundImage = "";
|
|
||||||
layer.style.backgroundColor = liquid.color;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create the label
|
|
||||||
const label = document.createElement("div");
|
|
||||||
label.className = "liquid-label";
|
|
||||||
|
|
||||||
// If there's a URL, make it a clickable link
|
|
||||||
if (liquid.url) {
|
|
||||||
const link = document.createElement("a");
|
|
||||||
link.href = liquid.url;
|
|
||||||
link.textContent = `${liquid.name} (${liquid.volume}%)`;
|
|
||||||
link.className = "liquid-link";
|
|
||||||
label.appendChild(link);
|
|
||||||
} else {
|
|
||||||
label.textContent = `${liquid.name} (${liquid.volume}%)`;
|
|
||||||
}
|
|
||||||
|
|
||||||
cumulativeVolume += liquid.volume;
|
|
||||||
|
|
||||||
// Shift label left if cumulative volume is under 20%
|
|
||||||
if (cumulativeVolume < 20) {
|
|
||||||
label.style.left = "18%";
|
|
||||||
label.style.transform = "translate(-30%, -50%)";
|
|
||||||
} else {
|
|
||||||
label.style.left = "50%";
|
|
||||||
label.style.transform = "translate(-50%, -50%)";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Calculate height based on volume percentage
|
|
||||||
const height = (liquid.volume / 100) * tankHeight;
|
|
||||||
layer.style.height = `${height}px`;
|
|
||||||
|
|
||||||
// Position from bottom, stacking up, starting at tankBottomOffset
|
|
||||||
layer.style.bottom = `${currentHeight + tankBottomOffset}px`;
|
|
||||||
currentHeight += height;
|
|
||||||
|
|
||||||
// Add the label to the layer
|
|
||||||
layer.appendChild(label);
|
|
||||||
tankContainer.appendChild(layer);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update settings
|
|
||||||
function updateSettings() {
|
|
||||||
if (!tankData) return;
|
|
||||||
|
|
||||||
tankData.settings.tankTopOffset = parseInt(tankTopOffsetInput.value);
|
|
||||||
tankData.settings.tankBottomOffset = parseInt(
|
|
||||||
tankBottomOffsetInput.value
|
|
||||||
);
|
|
||||||
updateTank();
|
updateTank();
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Error loading tank data:", error);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Event listeners
|
function updateTank() {
|
||||||
tankTopOffsetInput.addEventListener("change", updateSettings);
|
if (!tankData) return;
|
||||||
tankBottomOffsetInput.addEventListener("change", updateSettings);
|
|
||||||
|
|
||||||
// Initial load
|
// Clear existing liquid layers
|
||||||
loadData();
|
const existingLayers = document.querySelectorAll(".liquid-layer");
|
||||||
</script>
|
existingLayers.forEach((layer) => layer.remove());
|
||||||
|
|
||||||
|
const tankContainerHeight = tankContainer.offsetHeight;
|
||||||
|
const tankTopOffset = tankData.settings.tankTopOffset;
|
||||||
|
const tankBottomOffset = tankData.settings.tankBottomOffset;
|
||||||
|
const tankHeight =
|
||||||
|
tankContainerHeight - tankTopOffset - tankBottomOffset;
|
||||||
|
let currentHeight = 0;
|
||||||
|
let cumulativeVolume = 0;
|
||||||
|
|
||||||
|
tankData.liquids.forEach((liquid, i) => {
|
||||||
|
const layer = document.createElement("div");
|
||||||
|
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;
|
||||||
|
} else {
|
||||||
|
layer.style.backgroundImage = "";
|
||||||
|
layer.style.backgroundColor = liquid.color;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create the label
|
||||||
|
const label = document.createElement("div");
|
||||||
|
label.className = "liquid-label";
|
||||||
|
|
||||||
|
// If there's a URL, make it a clickable link
|
||||||
|
if (liquid.url) {
|
||||||
|
const link = document.createElement("a");
|
||||||
|
link.href = liquid.url;
|
||||||
|
link.textContent = `${liquid.name} (${liquid.volume}%)`;
|
||||||
|
link.className = "liquid-link";
|
||||||
|
label.appendChild(link);
|
||||||
|
} else {
|
||||||
|
label.textContent = `${liquid.name} (${liquid.volume}%)`;
|
||||||
|
}
|
||||||
|
|
||||||
|
cumulativeVolume += liquid.volume;
|
||||||
|
|
||||||
|
// Shift label left if cumulative volume is under 20%
|
||||||
|
if (cumulativeVolume < 20) {
|
||||||
|
label.style.left = "18%";
|
||||||
|
label.style.transform = "translate(-30%, -50%)";
|
||||||
|
} else {
|
||||||
|
label.style.left = "50%";
|
||||||
|
label.style.transform = "translate(-50%, -50%)";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Calculate height based on volume percentage
|
||||||
|
const height = (liquid.volume / 100) * tankHeight;
|
||||||
|
layer.style.height = `${height}px`;
|
||||||
|
|
||||||
|
// Position from bottom, stacking up, starting at tankBottomOffset
|
||||||
|
layer.style.bottom = `${currentHeight + tankBottomOffset}px`;
|
||||||
|
currentHeight += height;
|
||||||
|
|
||||||
|
// Add the label to the layer
|
||||||
|
layer.appendChild(label);
|
||||||
|
tankContainer.appendChild(layer);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update settings
|
||||||
|
function updateSettings() {
|
||||||
|
if (!tankData) return;
|
||||||
|
|
||||||
|
tankData.settings.tankTopOffset = parseInt(tankTopOffsetInput.value);
|
||||||
|
tankData.settings.tankBottomOffset = parseInt(
|
||||||
|
tankBottomOffsetInput.value
|
||||||
|
);
|
||||||
|
updateTank();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Event listeners
|
||||||
|
tankTopOffsetInput.addEventListener("change", updateSettings);
|
||||||
|
tankBottomOffsetInput.addEventListener("change", updateSettings);
|
||||||
|
|
||||||
|
// Initial load
|
||||||
|
loadData();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
<footer class="tiny-footer">
|
||||||
|
<span>
|
||||||
|
Art by
|
||||||
|
<a href="https://x.com/Raven4Seth" target="_blank" rel="noopener noreferrer">SethRave4</a>
|
||||||
|
• Message
|
||||||
|
<a href="mailto:vixi@snowsune.net">vixi@snowsune.net</a> for
|
||||||
|
questions/comments/anything!
|
||||||
|
</span>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
|
||||||
<!-- Footer -->
|
|
||||||
<footer class="tiny-footer">
|
|
||||||
<span>
|
|
||||||
Art by
|
|
||||||
<a
|
|
||||||
href="https://x.com/Raven4Seth"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
>SethRave4</a
|
|
||||||
>
|
|
||||||
• Message
|
|
||||||
<a href="mailto:vixi@snowsune.net">vixi@snowsune.net</a> for
|
|
||||||
questions/comments/anything!
|
|
||||||
</span>
|
|
||||||
</footer>
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
Loading…
Reference in New Issue