|
Tags: Blanking Mobile edit Mobile web edit |
| (2 intermediate revisions by 2 users not shown) |
| Line 1: |
Line 1: |
| <table class="infobox" style="width:22em; border:1px solid #a2a9b1; border-collapse:collapse; background-color:#f8f9fa;">
| |
| <tr>
| |
| <th colspan="2" class="infobox-title" style="text-align:center; font-size:125%; font-weight:bold; color:black; background-color:#eaecf0; padding:0.25em;">{{#if:{{{title|}}}|{{{title}}}|{{PAGENAME}}}}</th>
| |
| </tr>
| |
| {{#if:{{{above|}}}|
| |
| <tr>
| |
| <td colspan="2" class="infobox-above" style="text-align:center; font-size:110%; font-weight:bold; padding:0.25em;">{{{above}}}</td>
| |
| </tr>}}
| |
| {{#if:{{{image|}}}|
| |
| <tr>
| |
| <td colspan="2" class="infobox-image" style="text-align:center; padding:0.25em;">[[File:{{{image}}}|{{#if:{{{image_size|}}}|{{{image_size}}}|250px}}]]{{#if:{{{caption|}}}|<br /><small>{{{caption}}}</small>}}</td>
| |
| </tr>}}
| |
| {{#if:{{{header1|}}}|
| |
| <tr>
| |
| <th colspan="2" class="infobox-subheader" style="text-align:center; background-color:#eaecf0; padding:0.25em;">{{{header1}}}</th>
| |
| </tr>}}
| |
| {{{content|}}}
| |
| {{#if:{{{header2|}}}|
| |
| <tr>
| |
| <th colspan="2" class="infobox-subheader" style="text-align:center; background-color:#eaecf0; padding:0.25em;">{{{header2}}}</th>
| |
| </tr>}}
| |
| {{#if:{{{additional_content|}}}|{{{additional_content}}}}}
| |
| {{#if:{{{header3|}}}|
| |
| <tr>
| |
| <th colspan="2" class="infobox-subheader" style="text-align:center; background-color:#eaecf0; padding:0.25em;">{{{header3}}}</th>
| |
| </tr>}}
| |
| {{#if:{{{additional_content2|}}}|{{{additional_content2}}}}}
| |
| {{#if:{{{below|}}}|
| |
| <tr>
| |
| <td colspan="2" class="infobox-below" style="text-align:center; padding:0.25em;">{{{below}}}</td>
| |
| </tr>}}
| |
| </table><noinclude>
| |
|
| |
|
| [[Category:Infobox templates]]
| |
| [[Category:Layout templates]]
| |
| [[Category:Base templates]]
| |
|
| |
| == Description ==
| |
| This is the base template for all infoboxes. It provides a standardized structure and styling for information boxes across the wiki.
| |
|
| |
| == Usage ==
| |
| This template is not meant to be used directly on articles. Instead, use specialized infobox templates for specific article types.
| |
|
| |
| If you need to create a new infobox template, you can build upon this base template. Here's an example of how to create a derived infobox:
| |
|
| |
| <pre>
| |
| {{Infobox
| |
| |title = {{#if:{{{name|}}}|{{{name}}}|{{PAGENAME}}}}
| |
| |image = {{{image|}}}
| |
| |image_size = {{{image_size|}}}
| |
| |caption = {{{caption|}}}
| |
| |content =
| |
| {{#if:{{{field1|}}}|
| |
| <tr>
| |
| <td class="infobox-label">Field 1</td>
| |
| <td class="infobox-data">{{{field1}}}</td>
| |
| </tr>
| |
| }}
| |
| {{#if:{{{field2|}}}|
| |
| <tr>
| |
| <td class="infobox-label">Field 2</td>
| |
| <td class="infobox-data">{{{field2}}}</td>
| |
| </tr>
| |
| }}
| |
| <!-- Add more fields as needed -->
| |
| }}
| |
| </pre>
| |
|
| |
| == Parameters ==
| |
| * '''title''' - Title of the infobox (defaults to page name if not specified)
| |
| * '''above''' - Text to display above the title
| |
| * '''image''' - Filename of an image to display (without the File: prefix)
| |
| * '''image_size''' - Size of the image (defaults to 250px if not specified)
| |
| * '''caption''' - Caption text for the image
| |
| * '''header1''' - First section header
| |
| * '''content''' - Main content of the infobox (typically rows of label/data pairs)
| |
| * '''header2''' - Second section header
| |
| * '''additional_content''' - Additional content after header2
| |
| * '''header3''' - Third section header
| |
| * '''additional_content2''' - Additional content after header3
| |
| * '''below''' - Text to display at the bottom of the infobox
| |
|
| |
| == Styling ==
| |
| This template uses standardized classes for consistent styling:
| |
| * '''.infobox-title''' - The main title at the top
| |
| * '''.infobox-above''' - The text above the title
| |
| * '''.infobox-image''' - The main image container
| |
| * '''.infobox-subheader''' - Section headers within the infobox
| |
| * '''.infobox-label''' - The left column labels
| |
| * '''.infobox-data''' - The right column data
| |
| * '''.infobox-full-data''' - Data that spans both columns
| |
| * '''.infobox-below''' - The text at the bottom
| |
|
| |
| == Example ==
| |
| Here is an example of how a derived infobox template might be structured:
| |
|
| |
| <pre>
| |
| {{Infobox
| |
| |title = Example Item
| |
| |image = Example.jpg
| |
| |image_size = 220px
| |
| |caption = An example item
| |
| |header1 = Basic Information
| |
| |content =
| |
| <tr>
| |
| <td class="infobox-label">Type</td>
| |
| <td class="infobox-data">Example type</td>
| |
| </tr>
| |
| <tr>
| |
| <td class="infobox-label">Created</td>
| |
| <td class="infobox-data">2025</td>
| |
| </tr>
| |
| |header2 = Additional Details
| |
| |additional_content =
| |
| <tr>
| |
| <td class="infobox-label">Feature</td>
| |
| <td class="infobox-data">Example feature</td>
| |
| </tr>
| |
| |below = This is an example only.
| |
| }}
| |
| </pre>
| |
|
| |
| <templatedata>
| |
| {
| |
| "description": "Base template for all infoboxes on the wiki. Not meant to be used directly on articles.",
| |
| "params": {
| |
| "title": {
| |
| "label": "Title",
| |
| "description": "Title displayed at the top of the infobox (defaults to page name if not specified)",
| |
| "type": "string"
| |
| },
| |
| "above": {
| |
| "label": "Above",
| |
| "description": "Text to display above the title",
| |
| "type": "string"
| |
| },
| |
| "image": {
| |
| "label": "Image",
| |
| "description": "Filename of an image to display (without the File: prefix)",
| |
| "type": "string"
| |
| },
| |
| "image_size": {
| |
| "label": "Image size",
| |
| "description": "Width of the image in pixels (px)",
| |
| "type": "string",
| |
| "default": "250px"
| |
| },
| |
| "caption": {
| |
| "label": "Caption",
| |
| "description": "Caption text for the image",
| |
| "type": "string"
| |
| },
| |
| "header1": {
| |
| "label": "Header 1",
| |
| "description": "First section header",
| |
| "type": "string"
| |
| },
| |
| "content": {
| |
| "label": "Content",
| |
| "description": "Main content of the infobox (typically rows of label/data pairs)",
| |
| "type": "string"
| |
| },
| |
| "header2": {
| |
| "label": "Header 2",
| |
| "description": "Second section header",
| |
| "type": "string"
| |
| },
| |
| "additional_content": {
| |
| "label": "Additional content",
| |
| "description": "Additional content after header2",
| |
| "type": "string"
| |
| },
| |
| "header3": {
| |
| "label": "Header 3",
| |
| "description": "Third section header",
| |
| "type": "string"
| |
| },
| |
| "additional_content2": {
| |
| "label": "Additional content 2",
| |
| "description": "Additional content after header3",
| |
| "type": "string"
| |
| },
| |
| "below": {
| |
| "label": "Below",
| |
| "description": "Text to display at the bottom of the infobox",
| |
| "type": "string"
| |
| }
| |
| }
| |
| }
| |
| </templatedata>
| |
| </noinclude>
| |