7 Days to Die Wiki
(Page créée avec « {{doc/début}} Ce modèle sert à créer des liens pour les cases sur la page d'accueil : {{SITENAME}}. Le modèle dépend énormément du CSS dans les fichiers suivants :... »)
 
MannedTooth (discussion | contributions)
(à traduire)
Ligne 1 : Ligne 1 :
 
{{doc/début}}
 
{{doc/début}}
Ce modèle sert à créer des liens pour les cases sur la page d'accueil : {{SITENAME}}. Le modèle dépend énormément du CSS dans les fichiers suivants : [[MediaWiki:Hydradark.css]] et [[MediaWiki:Mobile.css]].
+
This template is for creating the styled links used within boxes on the front page: [[{{SITENAME}}]]. It relies heavily on CSS in [[MediaWiki:Hydra.css]] / [[MediaWiki:Hydradark.css]] and [[MediaWiki:Mobile.css]].
  +
==Usage==
  +
Any group of {{tlx|FP link}} templates must be enclosed by an element with the class <code>fplinks</code>.
  +
===Internal (wiki) links===
  +
<pre>
  +
{{FP link | destination | display text /optional
  +
| image = file link /optional
  +
| width = <small/normal/wide/full> /optional
  +
| imageonly = <true/false> /optional
  +
| plain = <true/false> /optional
  +
}}
  +
</pre>
  +
===External links===
  +
<pre>
  +
{{FP link | url = destination | display text /optional
  +
| image = file link /optional
  +
| width = <small/normal/wide/full> /optional
  +
| imageonly = <true/false> /optional
  +
| plain = <true/false> /optional
  +
}}
  +
</pre>
  +
==Parameters==
  +
===Internal (wiki) links===
  +
;<code>''destination''</code> : Destination wiki page. '''Required'''.
  +
;<code>''display text''</code> : Optional text to display instead of the name of the destination page.
   
  +
===External links===
== Liens ordinaires ==
 
  +
;<code>|url=</code> : The destination URL. '''Required''' for external links.
Pour les liens ordinaires, la syntaxe est la suivante :
 
  +
;<code>''display text''</code> : Optional text to display instead of the URL. If omitted, the full URL will be displayed.
<nowiki>{{Lien accueil|nom de page}}</nowiki>
 
<nowiki>{{Lien accueil|nom de page|texte affiché}}</nowiki>
 
   
  +
===Style parameters===
Pour les liens externes, la syntaxe est la suivante :
 
  +
<nowiki>{{Lien accueil|url=http://www.exemple.com}}</nowiki>
 
  +
;<code>|image=</code> : Optional image, to be displayed above the link.
<nowiki>{{Lien accueil|url=http://www.exemple.com|texte affiché}}</nowiki>
 
  +
;<code>|width=</code> : Determines the size of the link box. code>small</code> links take up to 20% of the width of the containing element. <code>normal</code> links take up to 25% of the width of the containing element. <code>wide</code> links take up to 33% of the containing element. <code>full</code> links take the entire width of the containing element. If omitted, defaults to <code>normal</code>.
  +
;<code>|imageonly=</code> : When an image is specified, this determines whether to show only the image or both the image and the link. <code>true</code> will show only the image, <code>false</code> will show the link as well. If omitted, defaults to <code>false</code>.
  +
;<code>|plain=</code> : This provides an option to remove backgrounds and borders for certain links. <code>true</code> will remove visible styles, <code>false</code> will use the default styles. If omitted, defaults to <code>false</code>.
  +
  +
==Examples==
  +
===Links only===
  +
<pre>
  +
<div class="fplinks">
  +
{{FP link | Main Page | Normal}}
  +
{{FP link | Main Page | Wide | width = wide}}
  +
{{FP link | Main Page | Plain | plain = true}}
  +
  +
{{FP link | Main Page | Full width | width = full}}
  +
</div>
  +
</pre>
  +
  +
<div class="fplinks">
  +
{{FP link | Main Page | Normal}}
  +
{{FP link | Main Page | Wide | width = wide}}
  +
{{FP link | Main Page | Plain | plain = true}}
  +
  +
{{FP link | Main Page | Full width | width = full}}
  +
</div>
  +
  +
===With images===
  +
<pre>
  +
<div class="fplinks">
  +
{{FP link | Main Page | With image | image = Wiki.png}}
  +
{{FP link | Main Page | Hidden text | image = Wiki.png | imageonly = true}}
  +
{{FP link | Main Page | Plain | image = Wiki.png | plain = true}}
  +
{{FP link | Main Page | Plain | image = Wiki.png | plain = true | imageonly = true}}
  +
  +
{{FP link | Main Page | Wide with image | image = Wiki.png | width = wide}}
  +
{{FP link | Main Page | Wide hidden text | image = Wiki.png | width = wide | imageonly = true}}
  +
</div>
  +
</pre>
  +
  +
<div class="fplinks">
  +
{{FP link | Main Page | With image | image = Wiki.png}}
  +
{{FP link | Main Page | Hidden text | image = Wiki.png | imageonly = true}}
  +
{{FP link | Main Page | Plain | image = Wiki.png | plain = true}}
  +
{{FP link | Main Page | Plain | image = Wiki.png | plain = true | imageonly = true}}
  +
  +
{{FP link | Main Page | Wide with image | image = Wiki.png | width = wide}}
  +
{{FP link | Main Page | Wide hidden text | image = Wiki.png | width = wide | imageonly = true}}
  +
</div>
 
{{doc/fin}}
 
{{doc/fin}}

Version du 31 janvier 2019 à 20:07

Template-info.png Documentation


This template is for creating the styled links used within boxes on the front page: 7 Days to Die Wiki. It relies heavily on CSS in MediaWiki:Hydra.css / MediaWiki:Hydradark.css and MediaWiki:Mobile.css.

Usage

Any group of {{FP link}} templates must be enclosed by an element with the class fplinks.

Internal (wiki) links

{{FP link | destination | display text /optional
| image = file link /optional
| width = <small/normal/wide/full> /optional
| imageonly = <true/false> /optional
| plain = <true/false> /optional
}}

External links

{{FP link | url = destination | display text /optional
| image = file link /optional
| width = <small/normal/wide/full> /optional
| imageonly = <true/false> /optional
| plain = <true/false> /optional
}}

Parameters

Internal (wiki) links

destination 
Destination wiki page. Required.
display text 
Optional text to display instead of the name of the destination page.

External links

|url= 
The destination URL. Required for external links.
display text 
Optional text to display instead of the URL. If omitted, the full URL will be displayed.

Style parameters

|image= 
Optional image, to be displayed above the link.
|width= 
Determines the size of the link box. code>small links take up to 20% of the width of the containing element. normal links take up to 25% of the width of the containing element. wide links take up to 33% of the containing element. full links take the entire width of the containing element. If omitted, defaults to normal.
|imageonly= 
When an image is specified, this determines whether to show only the image or both the image and the link. true will show only the image, false will show the link as well. If omitted, defaults to false.
|plain= 
This provides an option to remove backgrounds and borders for certain links. true will remove visible styles, false will use the default styles. If omitted, defaults to false.

Examples

Links only

<div class="fplinks">
{{FP link | Main Page | Normal}}
{{FP link | Main Page | Wide | width = wide}}
{{FP link | Main Page | Plain | plain = true}}

{{FP link | Main Page | Full width | width = full}}
</div>

With images

<div class="fplinks">
{{FP link | Main Page | With image | image = Wiki.png}}
{{FP link | Main Page | Hidden text | image = Wiki.png | imageonly = true}}
{{FP link | Main Page | Plain | image = Wiki.png | plain = true}}
{{FP link | Main Page | Plain | image = Wiki.png | plain = true | imageonly = true}}

{{FP link | Main Page | Wide with image | image = Wiki.png | width = wide}}
{{FP link | Main Page | Wide hidden text | image = Wiki.png | width = wide | imageonly = true}}
</div>

Ceci est la page de documentation du modèle, il devrait avoir subi une transclusion en la page principale du modèle. Voir Modèle:Doc pour plus d'information.