Benutzer:Tequila/Sandkasten: Unterschied zwischen den Versionen
K |
|||
| Zeile 1: | Zeile 1: | ||
<div style="position:relative; float:right; width:250px;"> | <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="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;">[[Bild:Leerwappen.png|150px]]<div style="font-size:80%; font-weight:bold | + | <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;">[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; 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;">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> | </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 | |
| − | {{#ifeq: {{{wappen}}} | nein | | | + | |
| − | + | 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-width:0px 1px 1px; | |
| − | + | border-style:solid; | |
| − | + | } | |
| − | + | ||
| − | + | .InfoboxTitel { | |
| − | + | background-color:#F4E6D2; | |
| − | + | text-align:center; | |
| − | + | font-size:120%; | |
| − | + | font-weight:bold; | |
| − | + | border:1px solid black; | |
| − | + | padding:0.4em; | |
| − | + | } | |
| − | {{#if: {{{provinz|}}} | | + | |
| − | + | .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 | | <div class="InfoboxBaustein"> {{#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]] <div class="InfoboxBildHochladen">[http://wiki.antamar-community.de/index.php?title=Spezial:Hochladen&wpDestFile=Wappen_{{PAGENAMEE}}.png Wappen hochladen]</div><includeonly>[[Kategorie:Fehlendes Wappen]]</includeonly> }} }} }} </div> }} | ||
| + | <div class="InfoboxBaustein"><div class="InfoboxUntertitel">Übersicht</div></div> | ||
| + | <div class="InfoboxBaustein"><div class="InfoboxZeileL">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> | ||
| + | <div class="InfoboxBaustein"><div class="InfoboxZeileL">Einwohnerzahl</div><div class="InfoboxZeileR">{{#if: {{{einwohner|}}} | {{{einwohner}}} | Unbekannt }}</div></div> | ||
| + | <div class="InfoboxBaustein"><div class="InfoboxZeileL">Marktrecht</div><div class="InfoboxZeileR">{{#if: {{{marktrecht|}}} | {{{marktrecht}}} | Unbekannt }}</div></div> | ||
| + | <div class="InfoboxBaustein"><div class="InfoboxUntertitel">Zugehörigkeit</div></div> | ||
| + | <div class="InfoboxBaustein"><div class="InfoboxZeileL">Kontinent</div><div class="InfoboxZeileR">{{#if: {{{kontinent|}}} | [[{{{kontinent}}}]] | Unbekannt }}</div></div> | ||
| + | <div class="InfoboxBaustein"><div class="InfoboxZeileL">Kultur</div><div class="InfoboxZeileR">{{#if: {{{kultur|}}} | [[{{{kultur}}}]] | Unbekannt }}</div></div> | ||
| + | <div class="InfoboxBaustein"><div class="InfoboxZeileL">Land</div><div class="InfoboxZeileR">{{#if: {{{land|}}} | [[{{{land}}}]] | Unbekannt }}</div></div> | ||
| + | {{#if: {{{provinz|}}} | <div class="InfoboxBaustein"><div class="InfoboxZeileL">Provinz</div><div class="InfoboxZeileR">[[{{{provinz}}}]]</div></div> }} | ||
| + | </div> | ||
Version vom 25. Februar 2009, 22:29 Uhr
{{{name}}}
Übersicht
Fläche
Unbekannt
mehrzeilig
mehrzeilig
Einwohnerzahl
Unbekannt
Marktrecht
Unbekannt
Zugehörigkeit
Kontinent
Unbekannt
Kultur
Unbekannt
Land
Unbekannt
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 (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
.Infobox {
position:relative;
float:right;
width:250px;
}
.InfoboxBaustein {
border-width:0px 1px 1px;
border-style:solid;
}
.InfoboxTitel {
background-color:#F4E6D2;
text-align:center;
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;
}
{{{name}}}
Übersicht
Fläche
Unbekannt
Einwohnerzahl
Unbekannt
Marktrecht
Unbekannt
Zugehörigkeit
Kontinent
Unbekannt
Kultur
Unbekannt
Land
Unbekannt