Template

Lbox

From Dogcraft Wiki

m (movd lBox to lbox.)
(proper documentation + templatedata)
Line 1: Line 1:
<noinclude>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
<noinclude>
{{TemplateStyles}}
==Linked box template==
The linked box or '''lbox''' template is a specialized version of [[Template:Box|<tt><nowiki>{{Template:Box}}</nowiki></tt>]] It is an interface template for creating containers that also serve as links, useful for navigation. Used across the wiki on various pages, such as the main page. Please check the template parameters before use!


===Without images===
This template is only transcluding a specific configuration of [[Template:Box|<tt><nowiki>{{Template:Box}}</nowiki></tt>]] with added CSS.
<div style="display:flex; gap:10px; justify-content:center;" class="flex-mobile-wrap">
 
 
===Examples===
====No image====
<pre style="white-space:pre-line;"><nowiki>{{lbox
|title=Survival 4
|width=300px
|height=370px
|content=The fourth dogcraft survival world, running from 1<sup>st</sup> April 2020 to 14<sup>th</sup> March 2022. This was the first time survival was split into multiple interconnected worlds, which were called Husky and Beagle. These worlds ran on versions 1.15.2 to 1.17.
}}</nowiki></pre> generates: {{lbox
|title=Survival 4
|width=300px
|height=370px
|content=The fourth dogcraft survival world, running from 1<sup>st</sup> April 2020 to 14<sup>th</sup> March 2022. This was the first time survival was split into multiple interconnected worlds, which were called Husky and Beagle. These worlds ran on versions 1.15.2 to 1.17.
}}
 
 
====With image====
<pre style="white-space:pre-line;"><nowiki>{{lbox
|title=Survival 4
|width=300px
|height=370px
|image=Grand Central Station - Shepherd.png
|content=The fourth dogcraft survival world, running from 1<sup>st</sup> April 2020 to 14<sup>th</sup> March 2022. This was the first time survival was split into multiple interconnected worlds, which were called Husky and Beagle. These worlds ran on versions 1.15.2 to 1.17
|footer=This is a footer
}}</nowiki></pre> generates: {{lbox
|title=Survival 4
|width=300px
|height=370px
|image=Grand Central Station - Shepherd.png
|content=The fourth dogcraft survival world, running from 1<sup>st</sup> April 2020 to 14<sup>th</sup> March 2022. This was the first time survival was split into multiple interconnected worlds, which were called Husky and Beagle. These worlds ran on versions 1.15.2 to 1.17.
|footer=This is a footer
}}
 
 
===Flexbox layout example===
For more complex layouts, this template can be used together with a flexbox container.
<pre><nowiki><div style="display:flex; gap:10px; justify-content:center;" class="flex-mobile-wrap">
{{LBox|title=Survival Railway Network|width=none}}
{{LBox|title=Survival Railway Network|width=none}}
{{LBox|title=Nether Transport Network|width=none}}
{{LBox|title=Nether Transport Network|width=none}}
Line 8: Line 48:
{{LBox|title=Other Railway Network|width=none}}
{{LBox|title=Other Railway Network|width=none}}
{{LBox|title=Connected Seas Coalition|width=none}}
{{LBox|title=Connected Seas Coalition|width=none}}
</div>
</div></nowiki></pre> generates:
 
<div style="display:flex; gap:10px; justify-content:center; transform: scale(.5) translate(-50%,-50%); height:200px;" class="flex-mobile-wrap">
===With images===
{{LBox|title=Survival Railway Network|width=none}}
<div style="display:flex; gap:10px; justify-content:center;" class="flex-mobile-wrap">
{{LBox|title=Nether Transport Network|width=none}}
{{LBox|title=Survival Railway Network|width=none|image=Grand Central Station - Shepherd.png
{{LBox|title=Road & Horse Network|width=none}}
|content=Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.}}
{{LBox|title=Other Railway Network|width=none}}
{{LBox|title=Nether Transport Network|width=none|image=NTN example 1.png
{{LBox|title=Connected Seas Coalition|width=none}}
|content=Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute ir}}
</div>''This example has been scaled down''
{{LBox|title=Road & Horse Network|width=none|image=Biome Galore Road Extension (5-22-2022).png
|content=Lorem }}
{{LBox|title=Other Railway Network|width=none
|content=Lorem ipsum dolor sit amet,}}
{{LBox|title=Connected Seas Coalition|width=none
|content=Lorem ipsum dolor sit amet, consectetur adipiscing el}}
</div>




Line 37: Line 70:
|image={{{image|}}}
|image={{{image|}}}
|content={{{content|}}}
|content={{{content|}}}
|footer={{{footer|}}}
}}
}}
<includeonly>
<includeonly>
<noinclude>
<templatedata>
{
"params": {
"width": {
"label": "Maximum width",
"description": "Parameter for setting the container's maximum width.",
"example": "300px",
"type": "string",
"default": "25%",
"suggested": true
},
"height": {
"label": "Height",
"description": "Optional parameter for the container's height",
"example": "250px, 18em, 70%",
"type": "string",
"default": "400px",
"suggested": true
},
"link": {
"label": "Link",
"description": "The target page where the container leads upon clicking.",
"example": "Main page",
"type": "wiki-page-name",
"default": "#",
"required": true,
"suggested": true
},
"title": {
"label": "Title",
"description": "The container's title",
"example": "Survival 3",
"type": "string",
"default": "Title",
"required": true,
"suggested": true
},
"titlecolor": {
"label": "Title color",
"description": "Optional parametera for setting title text color, useful when using an image as the header background.",
"example": "black, white",
"type": "string",
"default": "white",
"suggested": true
},
"image": {
"label": "Image",
"description": "For setting an image as the header background.",
"example": "Egg.png",
"type": "wiki-file-name",
"suggested": true
},
"content": {
"label": "Content",
"description": "The container's content. This may be almost anything that can go on a normal page, such as wikitext, files, links, other templates, html, etc.",
"example": "Lorem ipsum",
"type": "string",
"required": true,
"suggested": true
},
"footer": {
"label": "Footer",
"description": "The content of the footer. Use this if you always want to display something at the bottom of the box.",
"example": "Created on 2023. Jan. 32.",
"type": "string",
"suggested": true
}
},
"description": "A specialized version of [[Template:Box]] for creating containers that also serve as links.",
"format": "block",
"paramOrder": [
"title",
"content",
"link",
"width",
"footer",
"image",
"height",
"titlecolor"
]
}
</templatedata>
</noinclude>

Revision as of 20:28, 11 July 2022

Linked box template

The linked box or lbox template is a specialized version of {{Template:Box}} It is an interface template for creating containers that also serve as links, useful for navigation. Used across the wiki on various pages, such as the main page. Please check the template parameters before use!

This template is only transcluding a specific configuration of {{Template:Box}} with added CSS.


Examples

No image

{{lbox
|title=Survival 4
|width=300px
|height=370px
|content=The fourth dogcraft survival world, running from 1<sup>st</sup> April 2020 to 14<sup>th</sup> March 2022. This was the first time survival was split into multiple interconnected worlds, which were called Husky and Beagle. These worlds ran on versions 1.15.2 to 1.17.
}}

generates:

Survival 4

The fourth dogcraft survival world, running from 1st April 2020 to 14th March 2022. This was the first time survival was split into multiple interconnected worlds, which were called Husky and Beagle. These worlds ran on versions 1.15.2 to 1.17.



With image

{{lbox
|title=Survival 4
|width=300px
|height=370px
|image=Grand Central Station - Shepherd.png
|content=The fourth dogcraft survival world, running from 1<sup>st</sup> April 2020 to 14<sup>th</sup> March 2022. This was the first time survival was split into multiple interconnected worlds, which were called Husky and Beagle. These worlds ran on versions 1.15.2 to 1.17
|footer=This is a footer
}}

generates:

Grand Central Station - Shepherd.png

Survival 4

The fourth dogcraft survival world, running from 1st April 2020 to 14th March 2022. This was the first time survival was split into multiple interconnected worlds, which were called Husky and Beagle. These worlds ran on versions 1.15.2 to 1.17.
This is a footer



Flexbox layout example

For more complex layouts, this template can be used together with a flexbox container.

<div style="display:flex; gap:10px; justify-content:center;" class="flex-mobile-wrap">
{{LBox|title=Survival Railway Network|width=none}}
{{LBox|title=Nether Transport Network|width=none}}
{{LBox|title=Road & Horse Network|width=none}}
{{LBox|title=Other Railway Network|width=none}}
{{LBox|title=Connected Seas Coalition|width=none}}
</div>

generates:

Survival Railway Network


Nether Transport Network


Road & Horse Network


Other Railway Network


Connected Seas Coalition


This example has been scaled down


This page was last modified on 11 July 2022, at 20:28. (2 years ago)
Background Valentine's Day Event 2024 by TheWhiteTigerNL