Hauptmenü öffnen

AntamarWiki β

Änderungen

Benutzer:Tequila/Sandkasten

2.979 Bytes hinzugefügt, 23:29, 25. Feb. 2009
keine Bearbeitungszusammenfassung
<div style="position:relative; float:right; width:250px;">
<div style="background-color:#F4E6D2; text-align:center; font-size:120%; font-weight:bold; border:1px solid black; padding:0.4em;">{{{name}}}</div>
<div style="border-width:0px 1px 1px; border-style:solid;"><div style="text-align:center; padding:6px 0px;">[[Bild:Leerwappen.png|150px]]<div style="font-size:80%; font-weight:bold; padding-bottom:6px;">[http://wiki.antamar-community.de/index.php?title=Spezial:Hochladen&wpDestFile=Wappen_{{PAGENAMEE}}.png Wappen hochladen]</div></div></div>
<div style="border-width:0px 1px 1px; border-style:solid;"><div style="background-color:#F4E6D2; text-align:center; font-weight:bold; padding:0.4em;">Übersicht</div></div>
<div style="border-width:0px 1px 1px; border-style:solid;"><div style="background-color:#F4E6D2; font-weight:bold; width:100px; padding:0.4em; border-right:1px solid black; float:left;">Fläche</div><div style="padding:0.4em;">Unbekannt<br />mehrzeilig</div></div>
<div style="border-width:0px 1px 1px; border-style:solid;"><div style="background-color:#F4E6D2; font-weight:bold; width:100px; padding:0.4em; border-right:1px solid black; float:left;">Einwohnerzahl</div><div style="padding:0.4em;">Unbekannt</div></div>
<div style="border-width:0px 1px 1px; border-style:solid;"><div style="background-color:#F4E6D2; font-weight:bold; width:100px; padding:0.4em; border-right:1px solid black; float:left;">Marktrecht</div><div style="padding:0.4em;">Unbekannt</div></div>
<div style="border-width:0px 1px 1px; border-style:solid;"><div style="background-color:#F4E6D2; text-align:center; font-weight:bold; padding:0.4em;">Zugehörigkeit</div></div>
<div style="border-width:0px 1px 1px; border-style:solid;"><div style="background-color:#F4E6D2; font-weight:bold; width:100px; padding:0.4em; border-right:1px solid black; float:left;">Kontinent</div><div style="padding:0.4em;">Unbekannt</div></div>
<div style="border-width:0px 1px 1px; border-style:solid;"><div style="background-color:#F4E6D2; font-weight:bold; width:100px; padding:0.4em; border-right:1px solid black; float:left;">Kultur</div><div style="padding:0.4em;">Unbekannt</div></div>
<div style="border-width:0px 1px 1px; border-style:solid;"><div style="background-color:#F4E6D2; font-weight:bold; width:100px; padding:0.4em; border-right:1px solid black; float:left;">Land</div><div style="padding:0.4em;">Unbekannt</div></div>
</div>
Ich versuche hier die Infoboxen anstatt durch Tabellen durch div-Boxen und CSS-Formatierungen auszudrücken. Funktioniert das richtig, so ist das valider und sollte auch Serverlast sparen, da die meisten Infos aus der zentralen CSS-Datei ([[Mediawiki:Common.css|hier]]) kommen. Außerdem erlaubt es das leichte modifizieren sämtlicher Infoboxen.
Derzeit gibt es jedoch noch ein paar Probleme:*mehrzeilige Boxen werden nicht korrekt dargestellt*Bei den Einträgen fehlt der Abstand zum linken Rand Im folgenden findet sich ein möglicher Eintrag in die CSS-Datei, darunter befindet sich die Stadtboxvorlage mit div-Boxen und den CSS-Klassen. Da diese noch nicht existent sind sieht es derzeit etwas minimalistisch aus <pre>.Infobox {| position:relative;float:right;width:250px;} .InfoboxBaustein {border="1" cellpadding="5" cellspacing="0" align="left" -width="250px" :0px 1px 1px;border-style="margin:solid;} .InfoboxTitel {background-color:#F4E6D2;text-leftalign:1emcenter;"! colspan="2" style="font-size:120%; font-weight:bold;border:1px solid black;padding:0.4em;} .InfoboxUntertitel {background-color:#F4E6D2;text-align:center; font-weight:bold;padding:0.4em;} .InfoboxZeileL {background-color:#F4E6D2;font-weight:bold;width:100px;padding:0.4em;border-right:1px solid black;float:left;} .InfoboxZeileR {padding:0.4em;} .InfoboxBild {text-align:center;padding:6px 0px;} .InfoboxBildHochladen {font-size:80%;font-weight:bold;}</pre> <div class="Infobox" | ><div class="InfoboxTitel">{{{name}}}|-</div>{{#ifeq: {{{wappen}}} | nein | | ! colspan<div class="2InfoboxBaustein" {{!}} > {{#if: {{{wappen|}}} | [[Bild:{{{wappen}}}{{!}}center{{!}}Wappen der Stadt {{{name}}}{{!}}150px]] | {{#ifexist: Bild:Wappen_{{{name}}}.gif | [[Bild:Wappen_{{{name}}}.gif{{!}}center{{!}}Wappen der Stadt {{{name}}}{{!}}150px]] | {{#ifexist: Bild:Wappen_{{{name}}}.png | [[Bild:Wappen_{{{name}}}.png{{!}}center{{!}}Wappen der Stadt {{{name}}}{{!}}150px]] | [[Bild:Leerwappen.png{{!}}center{{!}}Kein Wappen vorhanden{{!}}150px]]<smalldiv class="InfoboxBildHochladen">[http://wiki.antamar-community.de/index.php?title=Spezial:Hochladen&wpDestFile=Wappen_{{PAGENAMEE}}.png Wappen hochladen]</smalldiv><includeonly>[[Kategorie:Fehlendes Wappen]]</includeonly> }} }} }} </div> }}|-! colspan<div class="2InfoboxBaustein" style><div class="text-align:center; background-color:#F4E6D2;InfoboxUntertitel" | >Übersicht</div></div>|-! style<div class="background-color:#F4E6D2; text-align:left;InfoboxBaustein" width><div class="80pxInfoboxZeileL" | >Fläche| </div><div class="InfoboxZeileR">{{#if: {{{fläche|}}} | {{{fläche}}} [[Antamarische_W%C3%A4hrungen_und_Einheiten#Fl.C3.A4chenma.C3.9Fe{{!}}Morgen]] | Unbekannt }}</div></div>|-! style<div class="InfoboxBaustein"><div class="background-color:#F4E6D2; text-align:left;InfoboxZeileL" | >Einwohnerzahl| </div><div class="InfoboxZeileR">{{#if: {{{einwohner|}}} | {{{einwohner}}} | Unbekannt }}</div></div>|-! style<div class="InfoboxBaustein"><div class="background-color:#F4E6D2; text-align:left;InfoboxZeileL" | >Marktrecht| </div><div class="InfoboxZeileR">{{#if: {{{marktrecht|}}} | {{{marktrecht}}} | Unbekannt }}</div></div>|-! colspan<div class="2InfoboxBaustein" style><div class="text-align:center; background-color:#F4E6D2;InfoboxUntertitel" | >Zugehörigkeit</div></div>|-! style<div class="InfoboxBaustein"><div class="background-color:#F4E6D2; text-align:left;InfoboxZeileL" | >Kontinent| </div><div class="InfoboxZeileR">{{#if: {{{kontinent|}}} | [[{{{kontinent}}}]] | Unbekannt }}</div></div>|-! style<div class="InfoboxBaustein"><div class="background-color:#F4E6D2; text-align:left;InfoboxZeileL" | >Kultur| </div><div class="InfoboxZeileR">{{#if: {{{kultur|}}} | [[{{{kultur}}}]] | Unbekannt }}</div></div>|-! style<div class="InfoboxBaustein"><div class="background-color:#F4E6D2; text-align:left;InfoboxZeileL" | >Land| </div><div class="InfoboxZeileR">{{#if: {{{land|}}} | [[{{{land}}}]] | Unbekannt }}</div></div>{{#if: {{{provinz|}}} | {{!}}-! style<div class="InfoboxBaustein"><div class="background-color:#F4E6D2; text-align:left;InfoboxZeileL" {{!}} >Provinz{{!}} </div><div class="InfoboxZeileR">[[{{{provinz}}}]] </div></div> }}|}</div>
927
Bearbeitungen