Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
You must create an account or log in to edit.

Template:Nice List Box: Difference between revisions

Template page
Content deleted Content added
No edit summary
Tag: 2017 source edit
No edit summary
Tag: 2017 source edit
 
(31 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<templatestyles src="Nice List Box/styles.css"/><includeonly>
<includeonly><div style="text-align: center; border: 2px solid {{#if:{{{Color|}}}|{{{Color}}}|var(--color-amaranth-legacy-scope)}};">
<div class="template-nice-list-box" style="border:2px solid {{#if: {{{Color|}}}|{{{Color}}}|var(--color-amaranth-legacy-scope)}}">
<span style="font-size:var(--font-size-xxx-large); font-family: var(--font-family-header-custom); color:var(--color-base--emphasized);">{{{Title|unknown}}}</span>
<h{{#if: {{{TitleLevel|}}}|{{{TitleLevel}}}|2}} class="template-nice-list-box-title">{{{Title|unknown}}}</h{{#if: {{{TitleLevel|}}}|{{{TitleLevel}}}|2}}><!--
-->{{#if: {{{Subtitle|}}}|<div class="template-nice-list-box-subtitle">{{{Subtitle}}}</div>}}<!--
-->{{#if: {{{Image|}}}|<div class="template-nice-list-box-image">[[File:{{{Image}}}{{#if: {{{ImageSize|}}}|{{!}}{{{ImageSize}}}}}|center|thumb]]</div>}}{{#if: {{{Gallery|}}}|<div class="template-nice-list-box-gallery">{{{Gallery}}}</div>}}<!--
-->{{#if: {{{Subsubtitle|}}}|<div class="template-nice-list-box-subsubtitle">{{{Subsubtitle}}}</div>}}<!--
-->{{#if: {{{Label1|}}}|<div class="template-nice-list-box-label">{{{Label1}}} - {{{Field1}}}</div>}}<!--
-->{{#if: {{{Label2|}}}|<div class="template-nice-list-box-label">{{{Label2}}} - {{{Field2}}}</div>}}<!--
-->{{#if: {{{Description|}}}|<hr style="background: {{#if: {{{Color|}}}|{{{Color}}}|var(--color-amaranth-legacy-scope)}}"><div class="template-nice-list-box-description">{{{Description}}}</div><hr style="background: {{#if: {{{Color|}}}|{{{Color}}}|var(--color-amaranth-legacy-scope)}}">}}<!--
-->{{#if: {{{SubLabel|}}}|<div class="template-nice-list-box-field"><span class="template-nice-list-box-label">{{{SubLabel}}}</span> - {{{SubField}}}</div>}}<!--
-->{{#if: {{{OptionalLabel1|}}}|<div class="template-nice-list-box-field"><span class="template-nice-list-box-label">{{{OptionalLabel1}}}</span> - {{{OptionalField1}}}</div>}}<!--
-->{{#if: {{{OptionalLabel2|}}}|<div class="template-nice-list-box-field"><span class="template-nice-list-box-label">{{{OptionalLabel2}}}</span> - {{{OptionalField2}}}</div>}}<!--
-->{{#if: {{{OptionalLabel3|}}}|<div class="template-nice-list-box-field"><span class="template-nice-list-box-label">{{{OptionalLabel3}}}</span> - {{{OptionalField3}}}</div>}}<!--
-->{{#if: {{{OptionalLabel4|}}}|<div class="template-nice-list-box-field"><span class="template-nice-list-box-label">{{{OptionalLabel4}}}</span> - {{{OptionalField4}}}</div>}}<!--
-->{{#if: {{{OptionalLabel5|}}}|<div class="template-nice-list-box-field"><span class="template-nice-list-box-label">{{{OptionalLabel5}}}</span> - {{{OptionalField5}}}</div>}}
</div>
</includeonly><noinclude>
<templatedata>
{
"params": {
"Title": {
"suggested": true
},
"Color": {
"suggested": true
},
"Subtitle": {
"suggested": true
},
"Image": {
"suggested": true
},
"Gallery": {
"suggested": true,
"description": "Enter proper gallery formatting here."
},
"Subsubtitle": {
"suggested": true
},
"Label1": {
"suggested": true
},
"Field1": {
"suggested": true
},
"Label2": {
"suggested": true
},
"Field2": {
"suggested": true
},
"Description": {
"suggested": true
},
"SubLabel": {
"suggested": true
},
"SubField": {
"suggested": true
},
"OptionalLabel1": {
"suggested": true,
"description": "Does not show up if it is empty"
},
"OptionalField1": {
"suggested": true,
"description": "Does not show up if its label is empty"
},
"OptionalLabel2": {
"suggested": true,
"description": "Does not show up if it is empty"
},
"OptionalField2": {
"suggested": true,
"description": "Does not show up if its label is empty"
},
"OptionalLabel3": {
"suggested": true,
"description": "Does not show up if it is empty"
},
"OptionalField3": {
"suggested": true,
"description": "Does not show up if its label is empty"
},
"OptionalLabel4": {
"suggested": true,
"description": "Does not show up if it is empty"
},
"OptionalField4": {
"suggested": true,
"description": "Does not show up if its label is empty"
},
"OptionalLabel5": {
"suggested": true,
"description": "Does not show up if it is empty"
},
"OptionalField5": {
"suggested": true,
"description": "Does not show up if its label is empty"
},
"ImageSize": {},
"TitleLevel": {
"default": "2",
"suggested": true
}
},
"sets": [],
"description": "Based on Template:Star use for lists that you want to look nice. Works great on mobile (better than tables by a LOT). Optional Fields and Labels only show up if the label field is not empty.",
"format": "block",
"paramOrder": [
"Title",
"TitleLevel",
"Color",
"Subtitle",
"Image",
"ImageSize",
"Gallery",
"Subsubtitle",
"Label1",
"Field1",
"Label2",
"Field2",
"Description",
"SubLabel",
"SubField",
"OptionalLabel1",
"OptionalField1",
"OptionalLabel2",
"OptionalField2",
"OptionalLabel3",
"OptionalField3",
"OptionalLabel4",
"OptionalField4",
"OptionalLabel5",
"OptionalField5"
]
}
</templatedata>


==Example==
{{#if: {{{Subtitle|}}}
<pre>
|<span style="font-size:var(--font-size-xx-large); font-family: var(--font-family-header-custom); color:var(--color-base--emphasized);">{{{Subtitle}}}</span>
}}

{{#if: {{{Image|}}}
| [[File:{{{Image}}}|center|thumb]]
}}
{{#if: {{{Subsubtitle|}}}
|<span style="font-size:var(--font-size-xx-large); font-family: var(--font-family-serif); color:var(--color-base--emphasized);">{{{Subsubtitle}}}</span>
}}

{{#if: {{{Label1|}}}
|<span style="font-size:var(--font-size-xx-large); font-family: var(--font-family-serif); color:var(--color-base--emphasized);">{{{Label1}}} - {{{Field1}}}</span>
}}

{{#if: {{{Label2|}}}
|<span style="font-size:var(--font-size-xx-large); font-family: var(--font-family-serif); color:var(--color-base--emphasized);">{{{Label2}}} - {{{Field2}}}</span>
}}
{{#if: {{{Description|}}}
|----
<span style="font-size:var(--font-size-medium);">{{{Description}}}</span><br>
----
}}
{{#if: {{{SubLabel|}}}
|<span style="font-size:var(--font-size-x-large); font-family: var(--font-family-serif); color:var(--color-base--emphasized);">{{{SubLabel}}} - {{{SubField}}}</span><br>
}}
{{#if: {{{OptionalLabel1|}}}
| <span style="font-size:var(--font-size-x-large); font-family: var(--font-family-serif); color:var(--color-base--emphasized);">{{{OptionalLabel1}}} - {{{OptionalField1}}}</span><br>
}}
{{#if: {{{OptionalLabel2|}}}
| <span style="font-size:var(--font-size-x-large); font-family: var(--font-family-serif); color:var(--color-base--emphasized);">{{{OptionalLabel2}}} - {{{OptionalField2}}}</span><br>
}}
{{#if: {{{OptionalLabel3|}}}
| <span style="font-size:var(--font-size-x-large); font-family: var(--font-family-serif); color:var(--color-base--emphasized);">{{{OptionalLabel3}}} - {{{OptionalField3}}}</span><br>
}}
{{#if: {{{OptionalLabel4|}}}
| <span style="font-size:var(--font-size-x-large); font-family: var(--font-family-serif); color:var(--color-base--emphasized);">{{{OptionalLabel4}}} - {{{OptionalField4}}}</span><br>
}}
</div></includeonly><noinclude>
{{Nice List Box
{{Nice List Box
|Title=Example
|Title=Example
|Color=#FFFFFF
|Color=#FFFFFF
|Font=Helvetica
|Image=Unknown.png
|Image=Unknown.png
|Gallery=<gallery>
|Subtitle=''Example''
File:Unknown.png
|Subsubtitle=''Example''
File:Community.png
File:Glypht.png
</gallery>
|Label1=Example
|Label1=Example
|Field1=Example
|Field1=Example
Line 62: Line 165:
|OptionalLabel4=Optional4
|OptionalLabel4=Optional4
|OptionalField4=Example
|OptionalField4=Example
|OptionalLabel5=Optional4
|OptionalField5=Example
}}
}}
</pre>
; Description

: Based on [[Template:Star]] use for lists that you want to look nice. Works great on mobile (better than tables by a LOT). Optional Fields and Labels only show up if the label field is not empty.
; Syntax
<pre>
{{Nice List Box
{{Nice List Box
|Title=Example
|Title=Example
|Color=#FFFFFF
|Color=#FFFFFF
|Font=Helvetica
|Image=Unknown.png
|Image=Unknown.png
|Gallery=<gallery>
File:Unknown.png
File:Community.png
File:Glypht.png
</gallery>
|Subtitle=''Example''
|Subsubtitle=''Example''
|Label1=Example
|Label1=Example
|Field1=Example
|Field1=Example
Line 87: Line 196:
|OptionalLabel4=Optional4
|OptionalLabel4=Optional4
|OptionalField4=Example
|OptionalField4=Example
|OptionalLabel5=Optional5
|OptionalField5=Example
}}
}}
</pre>
<templatedata>
{"params":{
"Title":{"suggested":true},
"Color":{"suggested":true},
"Subtitle":{"suggested":true},
"Image":{"suggested":true},
"Subsubtitle":{"suggested":true},
"Label1":{"suggested":true},
"Field1":{"suggested":true},
"Label2":{"suggested":true},
"Field2":{"suggested":true},
"Description":{"suggested":true},
"SubLabel":{"suggested":true},
"SubField":{"suggested":true},
"OptionalLabel1":{"suggested":true, "description": "Does not show up if it is empty"},
"OptionalField1":{"suggested":true, "description": "Does not show up if its label is empty"},
"OptionalLabel2":{"suggested":true, "description": "Does not show up if it is empty"},
"OptionalField2":{"suggested":true, "description": "Does not show up if its label is empty"},
"OptionalLabel3":{"suggested":true, "description": "Does not show up if it is empty"},
"OptionalField3":{"suggested":true, "description": "Does not show up if its label is empty"},
"OptionalLabel4":{"suggested":true, "description": "Does not show up if it is empty"},
"OptionalField4":{"suggested":true, "description": "Does not show up if its label is empty"}},"sets":[],"maps":{}}
</templatedata>
</noinclude>
</noinclude>

Latest revision as of 04:08, June 9, 2025

Based on Template:Star use for lists that you want to look nice. Works great on mobile (better than tables by a LOT). Optional Fields and Labels only show up if the label field is not empty.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
TitleTitle

no description

Unknownsuggested
TitleLevelTitleLevel

no description

Default
2
Unknownsuggested
ColorColor

no description

Unknownsuggested
SubtitleSubtitle

no description

Unknownsuggested
ImageImage

no description

Unknownsuggested
ImageSizeImageSize

no description

Unknownoptional
GalleryGallery

Enter proper gallery formatting here.

Unknownsuggested
SubsubtitleSubsubtitle

no description

Unknownsuggested
Label1Label1

no description

Unknownsuggested
Field1Field1

no description

Unknownsuggested
Label2Label2

no description

Unknownsuggested
Field2Field2

no description

Unknownsuggested
DescriptionDescription

no description

Unknownsuggested
SubLabelSubLabel

no description

Unknownsuggested
SubFieldSubField

no description

Unknownsuggested
OptionalLabel1OptionalLabel1

Does not show up if it is empty

Unknownsuggested
OptionalField1OptionalField1

Does not show up if its label is empty

Unknownsuggested
OptionalLabel2OptionalLabel2

Does not show up if it is empty

Unknownsuggested
OptionalField2OptionalField2

Does not show up if its label is empty

Unknownsuggested
OptionalLabel3OptionalLabel3

Does not show up if it is empty

Unknownsuggested
OptionalField3OptionalField3

Does not show up if its label is empty

Unknownsuggested
OptionalLabel4OptionalLabel4

Does not show up if it is empty

Unknownsuggested
OptionalField4OptionalField4

Does not show up if its label is empty

Unknownsuggested
OptionalLabel5OptionalLabel5

Does not show up if it is empty

Unknownsuggested
OptionalField5OptionalField5

Does not show up if its label is empty

Unknownsuggested

Example

{{Nice List Box
|Title=Example
|Color=#FFFFFF
|Font=Helvetica
|Image=Unknown.png
|Gallery=<gallery>
File:Unknown.png
File:Community.png
File:Glypht.png
</gallery>
|Label1=Example
|Field1=Example
|Label2=Example
|Field2=Example
|Description=This is the description of my list entry!
|SubLabel=Example
|SubField=Example
|OptionalLabel1=Optional1
|OptionalField1=Example
|OptionalLabel2=Optional2
|OptionalField2=Example
|OptionalLabel3=Optional3
|OptionalField3=Example
|OptionalLabel4=Optional4
|OptionalField4=Example
|OptionalLabel5=Optional4
|OptionalField5=Example
}}

Example

Example
Example
Example - Example
Example - Example

This is the description of my list entry!

Example - Example
Optional1 - Example
Optional2 - Example
Optional3 - Example
Optional4 - Example
Optional5 - Example