|
|
| (6 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;"> | | __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="died"><label>Died</label></data> |
| {{#if:{{{header1|}}}|
| | <data source="parents"><label>Parents</label></data> |
| <tr> | | <data source="relatives"><label>Relatives</label></data> |
| <th colspan="2" class="infobox-subheader" style="text-align:center; background-color:#eaecf0; padding:0.25em;">{{{header1}}}</th> | | <data source="nationality"><label>Nationality</label></data> |
| </tr>}} | | <data source="other_names"><label>Other names</label></data> |
| {{{content|}}}
| | <data source="occupation"><label>Occupation</label></data> |
| {{#if:{{{header2|}}}|
| | <data source="years_active"><label>Years active</label></data> |
| <tr> | | <data source="known_for"><label>Known for</label></data> |
| <th colspan="2" class="infobox-subheader" style="text-align:center; background-color:#eaecf0; padding:0.25em;">{{{header2}}}</th> | | <data source="notable_works"><label>Notable work(s)</label></data> |
| </tr>}} | | <data source="home_town"><label>Home town</label></data> |
| {{#if:{{{additional_content|}}}|{{{additional_content}}}}}
| | <data source="education"><label>Education</label></data> |
| {{#if:{{{header3|}}}|
| | <data source="alma_mater"><label>Alma mater</label></data> |
| <tr> | | <data source="awards"><label>Awards / Honors</label></data> |
| <th colspan="2" class="infobox-subheader" style="text-align:center; background-color:#eaecf0; padding:0.25em;">{{{header3}}}</th> | | <data source="spouse"><label>Spouse / Partner</label></data> |
| </tr>}} | | <data source="children"><label>Children</label></data> |
| {{#if:{{{additional_content2|}}}|{{{additional_content2}}}}}
| | <data source="religion"><label>Religion</label></data> |
| {{#if:{{{below|}}}|
| | <data source="political_affiliation"><label>Political affiliation</label></data> |
| <tr> | | <data source="residence"><label>Residence</label></data> |
| <td colspan="2" class="infobox-below" style="text-align:center; padding:0.25em;">{{{below}}}</td> | | <data source="website"><label>Website</label></data> |
| </tr>}} | | <data source="social_media"><label>Social media</label></data> |
| </table><noinclude> | | <group> |
| | | <header>Attributes</header> |
| [[Category:Infobox templates]]
| | <data source="height"><label>Height</label></data> |
| [[Category:Layout templates]]
| | <data source="weight"><label>Weight</label></data> |
| [[Category:Base templates]]
| | <data source="hair"><label>Hair color</label></data> |
| | | <data source="eyes"><label>Eye color</label></data> |
| == Description == | | </group> |
| This is the base template for all infoboxes. It provides a standardized structure and styling for information boxes across the wiki.
| | </infobox> |
| | | <noinclude>{{Infobox person |
| == Usage == | | | name = Shovon Ahmed |
| This template is not meant to be used directly on articles. Instead, use specialized infobox templates for specific article types.
| | | image = |
| | | | caption = Shovon Ahmed |
| 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:
| | | gender = Male |
| | | | birth_name = Shovon Ahmed |
| <pre>
| | | birth_date = 2003 |
| {{Infobox
| | | birth_place = Noakhali, Bangladesh |
| |title = {{#if:{{{name|}}}|{{{name}}}|{{PAGENAME}}}} | | | died = |
| |image = {{{image|}}} | | | parents = |
| |image_size = {{{image_size|}}} | | | relatives = |
| |caption = {{{caption|}}} | | | nationality = Bangladeshi |
| |content = | | | other_names = |
| {{#if:{{{field1|}}}|
| | | occupation = SEO Professional, PR Professional, Entrepreneur |
| <tr>
| | | years_active = 2012–present |
| <td class="infobox-label">Field 1</td>
| | | known_for = Founder of WikiGenius, Google Knowledge Panel Creator, Founder of Panel PR |
| <td class="infobox-data">{{{field1}}}</td>
| | | notable_works = Google Knowledge Panels (500+ created), WikiGenius |
| </tr>
| | | home_town = Sunamganj, Bangladesh |
| | | education = Bachelor's Degree in [Your Field] (replace with actual) |
| | | alma_mater = [Your University Name] (replace with actual) |
| | | awards = |
| | | spouse = |
| | | children = |
| | | religion = |
| | | political_affiliation = |
| | | residence = Dhaka, Bangladesh |
| | | website = https://wikigenius.com |
| | | social_media = Instagram, LinkedIn, Twitter |
| | | height = 5 Feet 6 Inch |
| | | weight = 68KG |
| | | hair = Black |
| | | eyes = Black |
| }} | | }} |
| {{#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> |