Difference between revisions of "Template:FAQ/en"
Jump to navigation
Jump to search
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
(16 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
< | <includeonly><div {{#if: {{{id|}}} | id="{{{id}}}"}} class="{{{4|{{#switch:{{{nesting|}}} | ||
|0 | |||
|1 | |||
|2 = wica-nesting-{{{nesting}}} | |||
}} wica-top-spacing wica-bottom-spacing wica-visible}}}" style="max-width: {{{width|{{{3|400px}}}}}};"> | |||
<div style="background:#686868; padding:0px 10px 2px; border-radius: 10px 10px 0px 0px; border: 2px solid #686868;"> | <div style="background:#686868; padding:0px 10px 2px; border-radius: 10px 10px 0px 0px; border: 2px solid #686868;"> | ||
<span style="background-color: #ffffff; padding: 1px; border-radius: 5px; float: right; margin-left: 10px;"> {{IconBook}} </span><span style="color:#FFFFFF">'''Question:''' {{{ | <span style="background-color: #ffffff; padding: 1px; border-radius: 5px; float: right; margin-left: 10px;"> {{IconBook}} </span><span style="color:#FFFFFF">'''Question:''' {{{title|}}}{{{1|}}}</span> | ||
</div> | </div> | ||
<div style="background:#E0E0E0; padding:0px 10px 2px; border-radius: 0px 0px 10px 10px; border: 2px solid #686868;"> | <div style="background:#E0E0E0; padding:0px 10px 2px; border-radius: 0px 0px 10px 10px; border: 2px solid #686868;"> | ||
'''Answer:''' {{{2|}}}{{{ | '''Answer:''' {{{2|}}}{{{text|}}} | ||
{{#if: {{{id|}}} |<div style="float: none; font-size: 80%; text-align: right;">[<nowiki></nowiki>[[:#{{{id}}}|{{{id}}}{{#if: {{{extid|}}}| / {{{extid}}}|<nowiki></nowiki>|}}]]<nowiki></nowiki>]</div>|}} | {{#if: {{{id|}}} |<div style="float: none; font-size: 80%; text-align: right;">[<nowiki></nowiki>[[:#{{{id}}}|{{{id}}}{{#if: {{{extid|}}}| / {{{extid}}}|<nowiki></nowiki>|}}]]<nowiki></nowiki>]</div>|}} | ||
</div> | </div> | ||
</div> | </div>{{OldNumberedParametersWarning|1{{#if: {{{1|}}} ||NULL}}={{{1|}}}|2{{#if: {{{2|}}} ||NULL}}={{{2|}}}|3{{#if: {{{3|}}} ||NULL}}={{{3|}}}|4{{#if: {{{4|}}} ||NULL}}={{{4|}}}|5{{#if: {{{5|}}} ||NULL}}={{{5|}}}|template=FAQ }}</includeonly><noinclude><languages />{{#if: {{#translation:}} | | [[Category:Translatable_templates]]}} | ||
{{Breadcrumbs | |||
|link1={{EditorManualLink}} | |||
}} | |||
== Description == | |||
Create a FAQ box with title (header) and body. If a clarification id is provided, it will be displayed in the bottom right corner in brackets. The same id can be used as an anchor for a link. An additional external id (ext id) can be also provided to refer to the CAR, for example in the same generated link. It uses default values for layout that can be overridden (classes and width). | |||
== Params == | |||
* <code>title</code> or (<del>1st</del> ''deprecated'') (mandatory): Title displayed in the header of the box | |||
* <code>text</code> or (<del>2nd</del> ''deprecated'') (mandatory): Text of box | |||
* <code>id</code> (optional): Clarification id shown on bottom right corner as a link in brackets. Only shown if provided. | |||
* <code>extid</code> (optional): Additional clarification id (with CAR.XXX format) shown on bottom right corner as part of the link generated for param id. Only shown if provided. | |||
* <code>width</code> or (<del>3rd</del> ''deprecated'') (optional + default): Box witdh. Default value = <code>400px</code>. When device is smaller, then width will be set to 100% of space. | |||
* <code>class</code> (optional + default): Wrapper div class string for box layout and separation, Default value = "wica-top-spacing wica-bottom-spacing wica-visible" | |||
* <code>nesting</code> (optional) - [ <code>0</code>, <code>1</code>, <code>2</code> ] Append <code>wica-nesting-#</code> class for margin level <code>0</code> (none), level <code>1</code> (<code>22px</code>) or level <code>2</code> (<code>42px</code>). Available only when <code>class</code> is not set! | |||
== Examples == | |||
{| class="wikitable light" | |||
! Code || Description | |||
|- | |||
! <code><nowiki>{{FAQ|title=What if...?|text=If..., then...}}</nowiki></code> || FAQ box with specified question and answer | |||
|- | |||
| colspan="2" | {{FAQ|title=What if...?|text=If..., then...}} | |||
|- | |||
! <code><nowiki>{{FAQ|nesting=1|title=What if...?|text=If..., then...}}</nowiki></code> || FAQ box with specified question and answer with nesting level 1 | |||
|- | |||
| colspan="2" | {{FAQ|nesting=1|title=What if...?|text=If..., then...}} | |||
|} | |||
</noinclude> |
Latest revision as of 11:20, 28 April 2024
Description
Create a FAQ box with title (header) and body. If a clarification id is provided, it will be displayed in the bottom right corner in brackets. The same id can be used as an anchor for a link. An additional external id (ext id) can be also provided to refer to the CAR, for example in the same generated link. It uses default values for layout that can be overridden (classes and width).
Params
title
or (1stdeprecated) (mandatory): Title displayed in the header of the boxtext
or (2nddeprecated) (mandatory): Text of boxid
(optional): Clarification id shown on bottom right corner as a link in brackets. Only shown if provided.extid
(optional): Additional clarification id (with CAR.XXX format) shown on bottom right corner as part of the link generated for param id. Only shown if provided.width
or (3rddeprecated) (optional + default): Box witdh. Default value =400px
. When device is smaller, then width will be set to 100% of space.class
(optional + default): Wrapper div class string for box layout and separation, Default value = "wica-top-spacing wica-bottom-spacing wica-visible"nesting
(optional) - [0
,1
,2
] Appendwica-nesting-#
class for margin level0
(none), level1
(22px
) or level2
(42px
). Available only whenclass
is not set!
Examples
Code | Description |
---|---|
{{FAQ|title=What if...?|text=If..., then...}} |
FAQ box with specified question and answer |
Question: What if...? Answer: If..., then... | |
{{FAQ|nesting=1|title=What if...?|text=If..., then...}} |
FAQ box with specified question and answer with nesting level 1 |
Question: What if...? Answer: If..., then... |