Jump to content

Template:Infobox city: Difference between revisions

From Legopedia
Created page with "<div class="infobox" style="float: right; clear: right; margin: 0 0 1em 1em; width: 22em; border: 1px solid var(--border-color-base, #a2a9b1); background-color: var(--background-color-interactive-subtle, #f8f9fa); color: var(--color-base, #202122); font-size: 88%; line-height: 1.5em; padding: 0.4em; border-radius: 2px;"> <!-- City Name Header --> <div style="background-color: var(--background-color-neutral-subtle, #eaecef); text-align: center; font-weight: bold; fon..."
 
No edit summary
Line 1: Line 1:
<div class="infobox" style="float: right; clear: right; margin: 0 0 1em 1em; width: 22em; border: 1px solid var(--border-color-base, #a2a9b1); background-color: var(--background-color-interactive-subtle, #f8f9fa); color: var(--color-base, #202122); font-size: 88%; line-height: 1.5em; padding: 0.4em; border-radius: 2px;">
<table class="infobox" style="float: right; clear: right; margin: 0 0 1em 1em; width: 22em; border: 1px solid var(--border-color-base, #a2a9b1); background-color: var(--background-color-interactive-subtle, #f8f9fa); color: var(--color-base, #202122); font-size: 88%; line-height: 1.5; border-collapse: collapse; padding: 0.2em;">
 
 
   <!-- City Name Header -->
   <!-- Main Title -->
   <div style="background-color: var(--background-color-neutral-subtle, #eaecef); text-align: center; font-weight: bold; font-size: 125%; padding: 0.3em; margin-bottom: 0.5em; border-radius: 2px;">
   <tr>
    {{{name|{{PAGENAME}}}}}
    <th colspan="2" style="background-color: var(--background-color-neutral-subtle, #eaecf0); font-size: 125%; font-weight: bold; text-align: center; padding: 0.4em; border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
   </div>
      {{{name|{{PAGENAME}}}}}
    </th>
   </tr>


   <!-- Flag / Image Section -->
   <!-- Flag / Image Section -->
   {{#if: {{{image|}}} |
   {{#if: {{{image|}}} |
   <div style="text-align: center; margin-bottom: 0.5em; padding: 0.4em; border: 1px solid var(--border-color-subtle, #c8ccd1); background-color: var(--background-color-base, #ffffff);">
   <tr>
    [[File:{{{image}}}|250px|center]]
    <td colspan="2" style="text-align: center; padding: 0.5em 0.3em; border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
    {{#if: {{{image_caption|}}} | <div style="font-size: 90%; margin-top: 0.4em;">{{{image_caption}}}</div> }}
      <div style="display: inline-block; border: 1px solid var(--border-color-subtle, #ccc); padding: 3px; background-color: var(--background-color-base, #fff);">
   </div>
        [[File:{{{image}}}|220px|center]]
      </div>
      {{#if: {{{image_caption|}}} | <div style="font-size: 90%; margin-top: 0.4em; color: var(--color-subtle, #54595d);">{{{image_caption}}}</div> }}
    </td>
   </tr>
   }}
   }}


   <!-- Basic Information Header -->
   <!-- Section 1: Basic Information -->
   <div style="background-color: var(--background-color-neutral-subtle, #eaecef); text-align: center; font-weight: bold; padding: 0.2em; margin-top: 0.5em; border-radius: 2px;">
   <tr>
    Basic Information
    <th colspan="2" style="background-color: var(--background-color-neutral-subtle, #eaecf0); text-align: center; font-weight: bold; padding: 0.2em; border-top: 1px solid var(--border-color-subtle, #a2a9b1); border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
   </div>
      Basic Information
    </th>
   </tr>


   <!-- Basic Info Table -->
   {{#if: {{{country|}}} |
  <table style="width: 100%; border-collapse: collapse; margin-bottom: 0.5em;">
  <tr style="border-bottom: 1px solid var(--border-color-subtle, #eaecf0);">
    {{#if: {{{country|}}} |
    <th style="text-align: left; padding: 0.3em 0.4em; width: 35%; font-weight: bold;">Country</th>
    <tr style="border-bottom: 1px solid var(--border-color-subtle, #e0e0e0);">
    <td style="padding: 0.3em 0.4em;">{{{country}}}</td>
      <th style="text-align: left; padding: 0.3em 0; width: 40%;">Country</th>
  </tr>
      <td style="padding: 0.3em 0;">{{{country}}}</td>
  }}
    </tr>
    }}
    {{#if: {{{founded|}}} |
    <tr style="border-bottom: 1px solid var(--border-color-subtle, #e0e0e0);">
      <th style="text-align: left; padding: 0.3em 0;">Founded</th>
      <td style="padding: 0.3em 0;">{{{founded}}}</td>
    </tr>
    }}
    {{#if: {{{mayor|}}} |
    <tr style="border-bottom: 1px solid var(--border-color-subtle, #e0e0e0);">
      <th style="text-align: left; padding: 0.3em 0;">Mayor</th>
      <td style="padding: 0.3em 0;">{{{mayor}}}</td>
    </tr>
    }}
  </table>


   <!-- Demographics Header -->
   {{#if: {{{founded|}}} |
   <div style="background-color: var(--background-color-neutral-subtle, #eaecef); text-align: center; font-weight: bold; padding: 0.2em; border-radius: 2px;">
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #eaecf0);">
    Demographics
    <th style="text-align: left; padding: 0.3em 0.4em; font-weight: bold;">Founded</th>
   </div>
    <td style="padding: 0.3em 0.4em;">{{{founded}}}</td>
   </tr>
  }}


   <!-- Demographics Table -->
  {{#if: {{{mayor|}}} |
   <table style="width: 100%; border-collapse: collapse;">
  <tr style="border-bottom: 1px solid var(--border-color-subtle, #eaecf0);">
     {{#if: {{{population|}}} |
    <th style="text-align: left; padding: 0.3em 0.4em; font-weight: bold;">Mayor</th>
    <tr style="border-bottom: 1px solid var(--border-color-subtle, #e0e0e0);">
    <td style="padding: 0.3em 0.4em;">{{{mayor}}}</td>
      <th style="text-align: left; padding: 0.3em 0; width: 40%;">Population</th>
  </tr>
      <td style="padding: 0.3em 0;">{{{population}}}</td>
  }}
    </tr>
 
    }}
   <!-- Section 2: Demographics -->
    {{#if: {{{area|}}} |
   <tr>
    <tr style="border-bottom: 1px solid var(--border-color-subtle, #e0e0e0);">
    <th colspan="2" style="background-color: var(--background-color-neutral-subtle, #eaecf0); text-align: center; font-weight: bold; padding: 0.2em; border-top: 1px solid var(--border-color-subtle, #a2a9b1); border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
      <th style="text-align: left; padding: 0.3em 0;">Area</th>
      Demographics
      <td style="padding: 0.3em 0;">{{{area}}}</td>
     </th>
    </tr>
  </tr>
    }}
 
  </table>
  {{#if: {{{population|}}} |
  <tr style="border-bottom: 1px solid var(--border-color-subtle, #eaecf0);">
    <th style="text-align: left; padding: 0.3em 0.4em; font-weight: bold;">Population</th>
    <td style="padding: 0.3em 0.4em;">{{{population}}}</td>
  </tr>
  }}
 
  {{#if: {{{area|}}} |
  <tr style="border-bottom: 1px solid var(--border-color-subtle, #eaecf0);">
    <th style="text-align: left; padding: 0.3em 0.4em; font-weight: bold;">Area</th>
    <td style="padding: 0.3em 0.4em;">{{{area}}}</td>
  </tr>
  }}


</div><noinclude>
</table><noinclude>
[[Category:Infobox templates]]
[[Category:Infobox templates]]
</noinclude>
</noinclude>

Revision as of 22:43, 30 July 2026

{{#if: | }} {{#if: | }} {{#if: | }} {{#if: | }} {{#if: | }} {{#if: | }}
     Infobox city
       [[File:{{{image}}}|220px|center]]
{{#if: |
{{{image_caption}}}
}}
     Basic Information
Country {{{country}}}
Founded {{{founded}}}
Mayor {{{mayor}}}
     Demographics
Population {{{population}}}
Area {{{area}}}