jekyll build from Action a1b44a61ab

This commit is contained in:
2025-04-08 11:10:45 +00:00
parent 4730502138
commit 0c2d8ae4df
13 changed files with 120 additions and 18 deletions

View File

@@ -89,7 +89,7 @@
<img class="responsive-img" src="/cpred/assets/img/Tech.png" alt="Picture of Carver Wright" />
</div>
<div class="bg-dark fg-yellow cyber-tile col s6 m8 l11">
<div class="bg-dark fg-yellow cyber-tile col s12 m8 l11">
<p class="character-details">
<strong class="cyberpunk-font-og character-details-title">Straßenname:</strong>
<span id="streetname" class="oxanium-font character-details-value"></span>
@@ -108,11 +108,13 @@
</p>
<p class="character-details">
<strong class="cyberpunk-font-og character-details-title">Unterkunft:</strong>
<span id="housing" class="oxanium-font character-details-value"></span>
<span id="housing" class="oxanium-font character-details-value tooltipped" data-position="bottom"></span>
<span style="background-color: white; color: blue; font-size: .64em; display: flex; align-items: flex-start; height: fit-content; align-self: flex-start; border-radius: 50%; padding: 0px 4px; ">i</span>
</p>
<p class="character-details">
<strong class="cyberpunk-font-og character-details-title">Lebensstil:</strong>
<span id="lifestyle" class="oxanium-font character-details-value"></span>
<span id="lifestyle" class="oxanium-font character-details-value tooltipped" data-position="bottom"></span>
<span style="background-color: white; color: blue; font-size: .64em; display: flex; align-items: flex-start; height: fit-content; align-self: flex-start; border-radius: 50%; padding: 0px 4px; ">i</span>
</p>
<p class="character-details">
<strong class="cyberpunk-font-og character-details-title">Lebenskosten:</strong>
@@ -124,15 +126,36 @@
<script>
let char, housing, lifestyle;
fetch("/cpred/assets/game-data/characters/carver.json")
.then(response => response.json())
.then(character => {
document.getElementById('streetname').innerText = character.handle;
document.getElementById('age').innerText = character.age;
const mainRole = character.roles.find(role => role.main);
char = character;
return fetch("/cpred/assets/game-data/housings.json");
}).then(response => response.json())
.then(housings => {
housing = housings[char.housing.type];
return fetch("/cpred/assets/game-data/lifestyles.json");
}).then(response => response.json())
.then(lifestyles => {
lifestyle = lifestyles[char.lifestyle];
document.getElementById('streetname').innerText = char.handle;
document.getElementById('age').innerText = char.age;
const mainRole = char.roles.find(role => role.main);
document.getElementById('role').innerText = mainRole.name + " Rang: " + mainRole.rank;
document.getElementById('housing').innerText = character.housing.type;
document.getElementById('lifestyle').innerText = character.lifestyle;
document.getElementById('housing').innerText = char.housing.type;
if (housing.description)
document.getElementById('housing').setAttribute("data-tooltip", housing.description);
document.getElementById('lifestyle').innerText = char.lifestyle;
if (housing.description)
document.getElementById('lifestyle').setAttribute("data-tooltip", lifestyle.description);
let costs = lifestyle.cost;
if (!char.housing.owned) {
costs += housing.rent;
}
document.getElementById('costs').innerText = costs + " ed";
});
</script>
@@ -196,6 +219,11 @@
<script src="/cpred/assets/js/materialize.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
const elems = document.querySelectorAll('.tooltipped');
const instances = M.Tooltip.init(elems, {});
});
document.addEventListener('DOMContentLoaded', function() {
var sidenavElems = document.querySelectorAll('.sidenav');
var sidenavInstances = M.Sidenav.init(sidenavElems, {});