Vorlage:CharakterInfoboxZweiteForm: Unterschied zwischen den Versionen
Aus Dunkelherzen Wiki
DRP (Diskussion | Beiträge) Die Seite wurde neu angelegt: „<div style="float:right; width: 300px;"> {| class="wikitable" style="width:100%; max-width:300px;" |- ! colspan="2" style="text-align:center; background:#ccc;" | <div style="font-size: 120%; font-weight: bold;">{{PAGENAME}}</div> <div style="margin-top: 4px;"> <span class="plainlinks"> [<span onclick="document.getElementById('form1a').style.display='block'; document.getElementById('form2a').style.display='none';" style="cursor:pointer;">Form 1</span> | <…“ |
DRP (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
| Zeile 7: | Zeile 7: | ||
<div style="margin-top: 4px;"> | <div style="margin-top: 4px;"> | ||
<span class="plainlinks"> | <span class="plainlinks"> | ||
[< | [<a href="javascript:void(0);" onclick="switchForm(1)">Form 1</a> | | ||
< | <a href="javascript:void(0);" onclick="switchForm(2)">Form 2</a>] | ||
</span> | </span> | ||
</div> | </div> | ||
|- | |- | ||
| colspan="2" style="text-align:center;" | | | colspan="2" style="text-align:center;" | | ||
<div id="form-image-1">[[Datei:{{{bild1|Placeholder.png}}}|250px]]</div> | |||
<div id="form-image-2" style="display:none;">[[Datei:{{{bild2|Placeholder.png}}}|250px]]</div> | |||
<div id=" | |||
<div id=" | |||
|- | |- | ||
| '''Größe''' || | | '''Größe''' || | ||
< | <span id="form-groesse-1">{{{größe1|Unbekannt}}}</span> | ||
< | <span id="form-groesse-2" style="display:none;">{{{größe2|Unbekannt}}}</span> | ||
|- | |- | ||
| '''Gewicht''' || | | '''Gewicht''' || | ||
< | <span id="form-gewicht-1">{{{gewicht1|Unbekannt}}}</span> | ||
< | <span id="form-gewicht-2" style="display:none;">{{{gewicht2|Unbekannt}}}</span> | ||
|- | |- | ||
| Zeile 49: | Zeile 47: | ||
|} | |} | ||
</div> | </div> | ||
<script> | |||
function switchForm(n) { | |||
const isForm1 = (n === 1); | |||
document.getElementById("form-image-1").style.display = isForm1 ? "block" : "none"; | |||
document.getElementById("form-image-2").style.display = isForm1 ? "none" : "block"; | |||
document.getElementById("form-groesse-1").style.display = isForm1 ? "inline" : "none"; | |||
document.getElementById("form-groesse-2").style.display = isForm1 ? "none" : "inline"; | |||
document.getElementById("form-gewicht-1").style.display = isForm1 ? "inline" : "none"; | |||
document.getElementById("form-gewicht-2").style.display = isForm1 ? "none" : "inline"; | |||
} | |||
</script> | |||
Aktuelle Version vom 12. Juli 2025, 21:06 Uhr
|
CharakterInfoboxZweiteForm
[<a href="javascript:void(0);" onclick="switchForm(1)">Form 1</a> | <a href="javascript:void(0);" onclick="switchForm(2)">Form 2</a>] | |
|---|---|
| Größe |
Unbekannt |
| Gewicht |
Unbekannt |
| Spezies | Unbekannt |
| Subspezies | Unbekannt |
| Klasse | Unbekannt |
| Subklasse | Unbekannt |
| Alter | Unbekannt |
| Geschlecht | Unbekannt |
| Sexualität | Unbekannt |
| Kultur/Nationalität | Unbekannt |
| Ideologie | Unbekannt |
| Fraktion | Unbekannt |
<script> function switchForm(n) {
const isForm1 = (n === 1);
document.getElementById("form-image-1").style.display = isForm1 ? "block" : "none";
document.getElementById("form-image-2").style.display = isForm1 ? "none" : "block";
document.getElementById("form-groesse-1").style.display = isForm1 ? "inline" : "none";
document.getElementById("form-groesse-2").style.display = isForm1 ? "none" : "inline";
document.getElementById("form-gewicht-1").style.display = isForm1 ? "inline" : "none";
document.getElementById("form-gewicht-2").style.display = isForm1 ? "none" : "inline";
} </script>
