Template
Box
From Dogcraft Wiki
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
<includeonly><div class="{{{class|}}}" id="{{{id|}}}" style="display:flex; flex-direction:column; color:{{{textcolor|#000}}}; background-color:{{{background|#E9EDEF}}}; height:{{{height|400px}}}; max-width:{{{width|25%}}}; overflow:clip; {{{style|}}} {{#if:{{{link|}}}|position:relative;|}}">{{#if:{{{image|}}} | <includeonly><div class="{{{class|}}}" id="{{{id|}}}" style="display:flex; flex-direction:column; color:{{{textcolor|#000}}}; background-color:{{{background|#E9EDEF}}}; height:{{{height|400px}}}; max-width:{{{width|25%}}}; overflow:clip; {{{style|}}} {{#if:{{{link|}}}|position:relative;|}}">{{#if:{{{image|}}} | ||
|<div style="max-height:33%; overflow:clip; display:flex; align-items:center; justify-content:center; position:relative; background:#8b0024;">[[File:{{{image| | |<div style="max-height:33%; overflow:clip; display:flex; align-items:center; justify-content:center; position:relative; background:#8b0024;">[[File:{{{image|}}}|borderless|600px|{{{imagealttext|}}}]]<h3 style="position:absolute; color:{{{titlecolor|white}}}; width:100%; padding:0.3em 0.4em; height:100%; display:flex; align-items:center; justify-content:center; text-align:center;">{{{title|Title}}}</h3></div> | ||
|{{Header|{{{title|Title}}}|margin=margin:0 0 5px 0; {{{headerstyle|}}} }}}} | |{{Header|{{{title|Title}}}|margin=margin:0 0 5px 0; {{{headerstyle|}}} }}}} | ||
<div style="padding:0 0.5em 0.2em 0.5em; overflow:{{#if:{{{link|}}}|clip|auto}}; height:100%;">{{{content|}}}</div>{{#if: {{{footer|}}} | <div style="padding:0 0.5em 0.2em 0.5em; overflow:{{#if:{{{link|}}}|clip|auto}}; height:100%;">{{{content|}}}</div>{{#if: {{{footer|}}} | ||
Line 92: | Line 92: | ||
}, | }, | ||
"textcolor": { | "textcolor": { | ||
"label": " | "label": "Text color", | ||
"description": "Optional parameter for setting content text color", | "description": "Optional parameter for setting content text color", | ||
"example": "red, #8b0024", | "example": "red, #8b0024", | ||
"type": "string" | "type": "string", | ||
"default": "#000" | |||
}, | }, | ||
"background": { | "background": { | ||
Line 101: | Line 102: | ||
"description": "Optional parameter for setting the background color of the content area and footer ", | "description": "Optional parameter for setting the background color of the content area and footer ", | ||
"example": "blue, #0000ff", | "example": "blue, #0000ff", | ||
"type": "string" | "type": "string", | ||
"default": "#e9edef" | |||
}, | }, | ||
"height": { | "height": { | ||
"label": "Height", | "label": "Height", | ||
"description": "Optional parameter for the container's height", | "description": "Optional parameter for the container's height", | ||
"example": " | "example": "250px, 18em, 70%", | ||
"type": "string", | "type": "string", | ||
"suggested": true | "suggested": true, | ||
"default": "400px" | |||
}, | }, | ||
"width": { | "width": { | ||
Line 128: | Line 131: | ||
"description": "Turns the container into a link. See [[Template:Lbox]] for implementation.", | "description": "Turns the container into a link. See [[Template:Lbox]] for implementation.", | ||
"example": "Main page", | "example": "Main page", | ||
"type": "wiki-page-name" | "type": "wiki-page-name", | ||
"default": "#" | |||
}, | }, | ||
"image": { | "image": { | ||
Line 149: | Line 153: | ||
"example": "black, white", | "example": "black, white", | ||
"type": "string", | "type": "string", | ||
"suggested": true | "suggested": true, | ||
"default": "white" | |||
}, | }, | ||
"title": { | "title": { | ||
Line 157: | Line 162: | ||
"type": "string", | "type": "string", | ||
"required": true, | "required": true, | ||
"suggested": true | "suggested": true, | ||
"default": "Title" | |||
}, | }, | ||
"headerstyle": { | "headerstyle": { |
Revision as of 00:05, 11 July 2022
Box template
This is an interface template for creating basic containers with a header, content and an optional footer. Used across the wiki on various pages, such as the main page. Please check the template parameters before use!
Examples
Basic box
Showcase
{{Box |width=300px |title=Showcase |content=I am an example box! |footer=This is the footer }}
generates:
Box with image header
{{Box |title=Showcase |image=Grand Central Station - Shepherd.png |content=I am an example box! |footer=This is the footer }}
generates:
Linked box
Please see Template:Lbox.
Inside a flexbox
Survival Railway Network
Nether Transport Network
Road & Horse Network
Other Railway Network
Connected Seas Coalition
The Box template works well with flexbox containers for creating more complex layouts. Make sure to set |width=none
(or an explicit value if desired) to avoid unexpected behavior.
<div style="display:flex; gap:5px; justify-content:center;" class="flex-mobile-wrap"> {{Box|title=Survival Railway Network|width=none}} {{Box|title=Nether Transport Network|width=none}} {{Box|title=Road & Horse Network|width=none}} {{Box|title=Other Railway Network|width=none}} {{Box|title=Connected Seas Coalition|width=none}} </div>
generates:
A more complex example
About the Dogcraft Wiki
Edit the Wiki
Sign in to your Dogcraft account to make a page! Write about your base, a project, or edit an existing page to add more information.
Wiki News
- XPModder has joined the Wiki Admin team! (30/09/23)
- The "Survival 5 Reflections of the Dogs" event has started, and World Downloads submissions are now open! (13/09/23)
- We've hit 600 pages! The 600th page is Station Competition by eybwam. (12/09/23)
- The Main Page has been refreshed with an improved look! (14/07/2023)
- The Reflections Survival 4 event has ended. (16/03/22)
- We've reached 450 pages with the creation of Spawn Build Challenge 2019! (02/03/22)
- We've launched the Reflections Survival 4 event! (09/01/22)
- We've reached 400 pages! (04/10/21)
- We've reached 350 pages! (11/07/21)
- The Reflections 2020 event has ended. (01/02/21)
- We've reached 300 pages! (10/01/21)
- We've launched the Reflections 2020 event! (02/01/21)
- The Wiki sign-in process has been improved (06/12/20)
- We've reached 275 pages! (06/12/20)
- We've reached 250 pages! (04/07/20)
- We've reached 225 pages! (03/04/20)
- The Dogcraft Wiki now uses Dogcraft.net accounts. (22/03/20)
- We've reached 175 pages! (15/01/20)
- We've reached 150 pages! (03/01/20)
- The Reflecting on 2019 Event has been launched! (02/01/20)
- The Dogcraft Wiki is now official and has moved. (06/09/2019)
- We've reached 125 pages! (05/08/2019)
- We've reached 100 pages! (04/07/2019)
- Navboxes are being added across the wiki (03/18/2019)
- The wiki domain has migrated to *.fandom.com (02/23/2019)
- Darparniox has been made a wiki administrator. (02/17/2019)
- The vote on a wiki merge to make an all-purpose ReNDoG wiki was turned town, solidifying the aim of this wiki. (02/12/2019)
{{Box |width=300px |title=About the Dogcraft Wiki |content=<center> <h4>Edit the Wiki</h4> <span class="vdesktop">[https://dogcraft.net/u/login?return=/wiki/Main%20Page Sign in] to your Dogcraft account to make a page! Write about your base, a project, or edit an existing page to add more information. <br></span> [[Dogcraft Wiki:Guidelines|{{Clickable button | 1= Help Editing| color=white }}]] [[Dogcraft Wiki:Create an Article|{{Clickable button | 1= Make an Article| color=blue }}]]</center> |footer=<hr style="margin:0em;"><center> <h4>Wiki News</h4></center> {{:Main Page/NewsScroll}} }}
generates:
Template data
Creates a basic container. Used in the interface and as a part of more complex containers.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Title | title | The container's title
| String | required |
Content | content | 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.
| String | required |
Maximum width | width | Parameter for setting the container's maximum width.
| String | suggested |
Footer | footer | The content of the footer. Use this if you always want to display something at the bottom of the box.
| String | suggested |
Image | image | For setting an image as the header background.
| File | suggested |
Image alt text | imagealttext | For setting image alt text
| String | suggested |
Height | height | Optional parameter for the container's height
| String | suggested |
Title color | titlecolor | Optional parameter for setting title text color, useful when using an image as the header background.
| String | suggested |
Text color | textcolor | Optional parameter for setting content text color
| String | optional |
Background color | background | Optional parameter for setting the background color of the content area and footer
| String | optional |
Class | class | Used to add CSS classes
| String | optional |
Id | id | Used to add a (unique!) CSS id.
| String | optional |
Style | style | Optional parameter for setting further CSS.
| String | optional |
Header styles | headerstyle | Optional parameter for setting CSS on the header. | String | optional |
Link | link | Turns the container into a link. See [[Template:Lbox]] for implementation.
| Page name | optional |
Link class | linkclass | no description | String | optional |