Difference between revisions of "Template:FAQ"
Jump to navigation
Jump to search
Bumsakalaka (talk | contribs) |
Bumsakalaka (talk | contribs) |
||
Line 1: | Line 1: | ||
<div id="{{{id|0}}}" class="{{{4|wica-top-spacing wica-bottom-spacing wica-visible}}}" style="width: {{#if: {{{width|}}} |{{{width|400px}}} | {{{3|400px}}} }}; max-width: 100%;"> | |||
<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">'''<translate><!--T:1--> Question:</translate>''' {{{header|}}}{{{1|}}}</span> | <span style="background-color: #ffffff; padding: 1px; border-radius: 5px; float: right; margin-left: 10px;"> {{IconBook}} </span><span style="color:#FFFFFF">'''<translate><!--T:1--> Question:</translate>''' {{{header|}}}{{{1|}}}</span> | ||
Line 22: | Line 8: | ||
{{#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><noinclude><languages /> | ||
{{Breadcrumbs | |||
|link1={{EditorManualLink}} | |||
}} | |||
== Description == | |||
Create a FAQ box with 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>header</code> or 1st (mandatory): Content displayed in the box header | |||
* <code>body</code> or 2nd (mandatory): Content displayed in the box body | |||
* <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 3rd (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" | |||
== Examples == | |||
{| class="wikitable light" | |||
! Code || Description | |||
|- | |||
! <code><nowiki>{{FAQ|header=What if...?|body=If..., then...}}</nowiki></code> || FAQ box with specified question and answer | |||
|- | |||
| colspan="2" | {{FAQ|header=What if...?|body=If..., then...}} | |||
|} | |||
{{#switch: {{PAGELANGUAGE}} | |||
| en = [[Category:Translatable_templates]] | |||
| | |||
}}</noinclude> |
Revision as of 18:42, 8 November 2022
Question:
Answer:
Description
Create a FAQ box with 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
header
or 1st (mandatory): Content displayed in the box headerbody
or 2nd (mandatory): Content displayed in the box bodyid
(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 3rd (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"
Examples
Code | Description |
---|---|
{{FAQ|header=What if...?|body=If..., then...}} |
FAQ box with specified question and answer |
Question: Answer: |