Vorlage:Titel: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(61 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
− | + | <!-- | |
− | + | Dokumentation | |
+ | |||
+ | --><noinclude> | ||
− | |||
<nowiki>{{Titel | <nowiki>{{Titel | ||
− | | <!-- | + | | <!-- Titel --> |
+ | | <!-- Titelzusatz, auch zusatz= --> | ||
+ | | class= <!-- z.B. pagename, lc --> | ||
+ | | notoc= <!-- 1 --> | ||
+ | | pagename= offizieller Seitentitel (Hauptseite) | ||
}} | }} | ||
− | |||
</nowiki> | </nowiki> | ||
+ | * HTML-Markup für Titel <nowiki>{{{1|}}}</nowiki> und Titelzusatz <nowiki>{{{2|}}}</nowiki>. | ||
+ | * Titel <nowiki>{{{1|}}}</nowiki> kann Doppelpunkt oder <nowiki><br></nowiki> enthalten, um Haupt- und Untertitel zu trennen. | ||
+ | * Titelzusatz <nowiki>{{{2|}}}</nowiki> erscheint über dem Haupttitel, Untertitel darunter. | ||
+ | * Titel ohne Markup wird mit DISPLAYTITLE als Metainfo gespeichert (aber so nicht angezeigt). | ||
+ | * class fügt eine entsprechende CSS-Klasse ein. | ||
+ | |||
</noinclude><includeonly><!-- | </noinclude><includeonly><!-- | ||
− | + | Variable | |
− | + | -->{{#vardefine:title | |
− | -->{{#vardefine: | + | |{{{1|}}}<!-- |
− | |{{#regex: {{{ | + | -->}}<!-- |
+ | -->{{#vardefine:autor | ||
+ | | {{#if:{{{autor|}}}|<span class=autor>{{{autor|}}}</span>}} | ||
+ | }}<!-- | ||
+ | -->{{#vardefine:title_plain | ||
+ | | {{#regex: {{#var:title}} | ||
+ | |/<[\/]*\w+[\/]*>/ | ||
+ | | | ||
+ | }}}}<!-- | ||
+ | -->{{#vardefine:title_markup | ||
+ | | {{#if: {{#regex: {{#var:title}} |/(:{{!}}<br[\/]*>)/}} | ||
+ | | {{#regex: {{#var:title}} | ||
+ | |/([^:]+)(:{{!}}<br[\/]*>)\s*([^:]+)/ | ||
+ | |$1 <span class='bottom'>$3{{#var:ref}}</span> | ||
+ | }} | ||
+ | |{{#var:title}}{{#var:ref}} | ||
+ | }} | ||
}}<!-- | }}<!-- | ||
− | -->{{#vardefine: | + | -->{{#vardefine:zusatz_plain |
− | |{{#regex: {{{ | + | |{{#if:{{{2|{{{zusatz|}}}}}}|({{#regex:{{{2|{{{zusatz|}}}}}}|/:/|}})}}<!-- |
+ | -->}}<!-- | ||
+ | -->{{#vardefine:zusatz_markup | ||
+ | |{{#if:{{{2|{{{zusatz|}}}}}}|<span class=titel_zusatz>{{{2|{{{zusatz|}}}}}}</span> }} | ||
+ | }}<!-- | ||
+ | -->{{#vardefine:fulltitle | ||
+ | |{{{pagename|{{#var:title_plain}} {{#var:zusatz_plain}} }}}<!-- | ||
+ | -->}}<!-- | ||
+ | -->{{#vardefine:namespace | ||
+ | |{{#switch: {{NAMESPACENUMBER}} | ||
+ | | 0 = artikel | ||
+ | | 4 = artikel | ||
+ | | #default = null | ||
+ | }}<!-- | ||
+ | -->}}<!-- | ||
+ | -->{{#vardefine:class | ||
+ | | {{#arraydefine:page | ||
+ | |{{lc:{{FULLPAGENAMEE}}}} | ||
+ | |/[:\/]/ | ||
+ | }}{{#arrayprint:page | ||
+ | ||§|<nowiki/> §-h1 | ||
+ | }} {{{class|}}} | ||
}}<!-- | }}<!-- | ||
− | + | Schreiben | |
− | -->{{ | + | --><div class='firstHeadingTitel {{#var:class}}'><!-- |
+ | text | ||
+ | --><span class=firstHeadingBody>{{#var:autor}}{{#var:zusatz_markup}}{{#var:title_markup}}</span><!-- | ||
+ | Search: | ||
+ | --><div class=wrapSearch2 id=search-container style=''><span class=search2>{{#fas:search}}</span></div><!-- | ||
+ | body class | ||
+ | (Vorsicht: kann ungewollt <p> erzeugen) | ||
+ | -->{{#ifeq:{{#var:namespace}}|artikel | ||
+ | | {{#if: {{{nobodyclass|}}}|<!--do nothing--> | ||
+ | |{{#addbodyclass:article}} | ||
+ | }} | ||
+ | }}<!-- | ||
+ | --></div><!-- | ||
+ | TOC | ||
+ | -->{{#ifeq:{{#var:namespace}}|artikel | ||
+ | |{{#ifeq:{{{notoc|}}}| 1 | ||
+ | |__NOTOC__|__TOC__ | ||
+ | }}}}<!-- | ||
+ | Attribute | ||
− | + | -->{{DISPLAYTITLE: {{#var:fulltitle}} }}<!-- | |
− | + | -->{{#set: hat_titel={{#var:fulltitle}} }}<!-- | |
− | --> | ||
CSS | CSS | ||
Zeile 36: | Zeile 100: | ||
display: none; | display: none; | ||
} | } | ||
− | }}</includeonly> | + | #search-container { |
+ | position: absolute; | ||
+ | right: 4.5rem; | ||
+ | top:-3.25rem; | ||
+ | z-index:4; | ||
+ | } | ||
+ | {{#ifanon:<!--do nothing-->| | ||
+ | #mw-navigation #p-views { | ||
+ | display: block; | ||
+ | background: none; | ||
+ | } | ||
+ | #ca-view, | ||
+ | #ca-watch, | ||
+ | #ca-history { | ||
+ | display: none; | ||
+ | } | ||
+ | #ca-edit { | ||
+ | background: none; | ||
+ | padding-: 2rem; | ||
+ | width: 15rem; | ||
+ | position: absolute; | ||
+ | left: 0; | ||
+ | } | ||
+ | #ca-edit a { | ||
+ | background: none; | ||
+ | float: none; | ||
+ | opacity: 0; | ||
+ | position: relative; | ||
+ | text-decoration: none; | ||
+ | color: #777; | ||
+ | padding-left: 2rem; | ||
+ | } | ||
+ | #ca-edit a:hover { | ||
+ | opacity: .5; | ||
+ | } | ||
+ | #ca-edit a::after { | ||
+ | content: '\f304'; | ||
+ | font-weight: 800; | ||
+ | font-size: 2em; | ||
+ | font-family: 'Font Awesome 5 Free'; | ||
+ | margin-left: 0.2em; | ||
+ | } }}}}</includeonly><noinclude> | ||
+ | <templatedata> | ||
+ | { | ||
+ | "params": { | ||
+ | "1": { | ||
+ | "description": "Haupttitel", | ||
+ | "type": "content", | ||
+ | "required": true | ||
+ | }, | ||
+ | "2": { | ||
+ | "description": "Nebentitel", | ||
+ | "type": "content" | ||
+ | }, | ||
+ | "class": { | ||
+ | "description": "z.B. für Kapitel- bzw. Seitenschmuck", | ||
+ | "example": "kitsune", | ||
+ | "type": "content" | ||
+ | }, | ||
+ | "notoc": { | ||
+ | "description": "Schaltet autom. TOC aus", | ||
+ | "type": "boolean" | ||
+ | }, | ||
+ | "zusatz": { | ||
+ | "description": "Titelzusatz", | ||
+ | "type": "content" | ||
+ | }, | ||
+ | "autor": { | ||
+ | "description": "Gastautoren", | ||
+ | "type": "string" | ||
+ | }, | ||
+ | "nobodyclass": { | ||
+ | "description": "hinzufügen der article-Klasse unterbinden", | ||
+ | "type": "boolean" | ||
+ | }, | ||
+ | "pagename": { | ||
+ | "description": "nur für Ausnahmefälle (Hauptseite)", | ||
+ | "type": "content" | ||
+ | } | ||
+ | }, | ||
+ | "description": "Gestaltung der Seitenüberschrift. Verbirgt den Standardseitentitel, der jedoch durch DISPLAYTITLE definiert wird (-->Metadaten). Erstellt einen Anzeigetitel, der verschiedentlich gestaltet werden kann. ", | ||
+ | "paramOrder": [ | ||
+ | "1", | ||
+ | "2", | ||
+ | "zusatz", | ||
+ | "class", | ||
+ | "notoc", | ||
+ | "nobodyclass", | ||
+ | "autor", | ||
+ | "pagename" | ||
+ | ] | ||
+ | } | ||
+ | </templatedata> | ||
+ | </noinclude> |
Aktuelle Version vom 9. August 2024, 12:11 Uhr
{{Titel | <!-- Titel --> | <!-- Titelzusatz, auch zusatz= --> | class= <!-- z.B. pagename, lc --> | notoc= <!-- 1 --> | pagename= offizieller Seitentitel (Hauptseite) }}
- HTML-Markup für Titel {{{1|}}} und Titelzusatz {{{2|}}}.
- Titel {{{1|}}} kann Doppelpunkt oder <br> enthalten, um Haupt- und Untertitel zu trennen.
- Titelzusatz {{{2|}}} erscheint über dem Haupttitel, Untertitel darunter.
- Titel ohne Markup wird mit DISPLAYTITLE als Metainfo gespeichert (aber so nicht angezeigt).
- class fügt eine entsprechende CSS-Klasse ein.
Gestaltung der Seitenüberschrift. Verbirgt den Standardseitentitel, der jedoch durch DISPLAYTITLE definiert wird (-->Metadaten). Erstellt einen Anzeigetitel, der verschiedentlich gestaltet werden kann.
Parameter | Beschreibung | Typ | Status | |
---|---|---|---|---|
1 | 1 | Haupttitel | Inhalt | erforderlich |
2 | 2 | Nebentitel | Inhalt | optional |
Zusatz | zusatz | Titelzusatz | Inhalt | optional |
Class | class | z.B. für Kapitel- bzw. Seitenschmuck
| Inhalt | optional |
Notoc | notoc | Schaltet autom. TOC aus | Boolesch | optional |
Nobodyclass | nobodyclass | hinzufügen der article-Klasse unterbinden | Boolesch | optional |
Autor | autor | Gastautoren | Zeichenfolge | optional |
Pagename | pagename | nur für Ausnahmefälle (Hauptseite) | Inhalt | optional |