Template:Infobox person: Difference between revisions

From WikiAlpha
mNo edit summary
Tag: Reverted
Undo revision 997 by Shovon (talk)
Tag: Undo
Line 1: Line 1:
<table class="infobox" style="width:22em; border:1px solid #a2a9b1; border-collapse:collapse; background-color:#f8f9fa;">
__INDEX__
<tr>
<infobox>
<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>
<title source="name"><default>{{PAGENAME}}</default></title>
</tr>
<image source="image">
{{#if:{{{above|}}}|
    <caption source="caption"></caption>
<tr>
    </image>
<td colspan="2" class="infobox-above" style="text-align:center; font-size:110%; font-weight:bold; padding:0.25em;">{{{above}}}</td>
<data source="gender"><label>Gender</label></data>
</tr>}}
<data source="age"><label>Age</label></data>
{{#if:{{{image|}}}|
<data source="birth_name"><label>Born</label></data>
<tr>
<data source="birth_date"><label>Birth date</label></data>
<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>
<data source="birth_place"><label>Birth place</label></data>
</tr>}}
<data source="Parents"><label>Parents</label></data>
{{#if:{{{header1|}}}|
<data source="Relatives"><label>Relatives</label></data>
<tr>
<data source="nationality"><label>Nationality</label></data>
<th colspan="2" class="infobox-subheader" style="text-align:center; background-color:#eaecf0; padding:0.25em;">{{{header1}}}</th>
<data source="other_names"><label>Other names</label></data>
</tr>}}
<data source="occupation"><label>Occupation</label></data>
{{{content|}}}
<data source="years_active"><label>Years active</label></data>
{{#if:{{{header2|}}}|
<data source="known_for"><label>Known for</label></data>
<tr>
<data source="notable_works"><label>Notable work(s)</label></data>
<th colspan="2" class="infobox-subheader" style="text-align:center; background-color:#eaecf0; padding:0.25em;">{{{header2}}}</th>
<data source="home_town"><label>Home town</label></data>
</tr>}}
    <data source="website"><label>website</label></data>
{{#if:{{{additional_content|}}}|{{{additional_content}}}}}
<group>
{{#if:{{{header3|}}}|
    <header>Attributes</header>
<tr>
    <data source="height"><label>Height</label></data>
<th colspan="2" class="infobox-subheader" style="text-align:center; background-color:#eaecf0; padding:0.25em;">{{{header3}}}</th>
    <data source="weight"><label>Weight</label></data>
</tr>}}
    <data source="hair"><label>Hair color</label></data>
{{#if:{{{additional_content2|}}}|{{{additional_content2}}}}}
    <data source="eyes"><label>Eye color</label></data>
{{#if:{{{below|}}}|
</group>
<tr>
</infobox>
<td colspan="2" class="infobox-below" style="text-align:center; padding:0.25em;">{{{below}}}</td>
<noinclude>{{Infobox person
</tr>}}
| name = Parvej Husen Talukder
</table><noinclude>
| image = Parvej_Husen_Talukder.jpg
 
| caption = Parvej Husen Talukder
[[Category:Infobox templates]]
| gender = Male
[[Category:Layout templates]]
| birth_name = Md. Parvej Husen Talukder
[[Category:Base templates]]
| birth_date = August 23, 2005
 
| birth_place = Jatichar, Derai Upazila, Sunamganj, Bangladesh
== Description ==
| parents = Md. Abul Kashem Talukder (father), Sultana Parvin (mother)
This is the base template for all infoboxes. It provides a standardized structure and styling for information boxes across the wiki.
| nationality = Bangladeshi
 
| occupation = Poet, Children's Writer, Journalist, Internet Entrepreneur
== Usage ==
| years_active = 2019–present
This template is not meant to be used directly on articles. Instead, use specialized infobox templates for specific article types.
| known_for = Founder of Kavya Kishor International, Creator of WikiGenius, "The King Rhymester of Haor Region"
 
| notable_works = "Chorar Jhalak", "The Imperfect Desires of Life"
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:
| website = https://parvejhusentalukder.com
 
<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>
</noinclude>

Revision as of 20:52, 10 June 2025