Jump to content

Template:Infobox city: Difference between revisions

From Legopedia
No edit summary
No edit summary
Line 1: Line 1:
<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;">
<table class="infobox" style="float: right; clear: right; margin: 0 0 1em 1em; width: 18em; border: 1px solid var(--border-color-base, #a2a9b1); background-color: var(--background-color-interactive-subtle, #f8f9fa); color: var(--color-base, #202122); font-size: 85%; line-height: 1.4; border-collapse: collapse;">


   <!-- Header Title -->
   <!-- Title Header -->
   <tr>
   <tr>
     <th colspan="2" style="text-align: center; font-size: 110%; padding: 0.5em 0.2em; border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
     <th colspan="2" style="text-align: center; padding: 0.5em 0.2em; border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
       {{#if: {{{native_name|}}} | <div style="font-weight: bold; font-size: 115%;">{{{native_name}}}</div> }}
       <div style="font-size: 90%; color: var(--color-subtle, #54595d);">{{{native_name|}}}</div>
       <div style="font-weight: bold;">{{{name|{{PAGENAME}}}}}</div>
       <div style="font-size: 115%; font-weight: bold;">{{{name|{{PAGENAME}}}}}</div>
     </th>
     </th>
   </tr>
   </tr>


   <!-- Side-by-Side Flag & Coat of Arms -->
   <!-- Flags & Coat of Arms Side-by-Side -->
  {{#if: {{{flag_url|}}}{{{flag_image|}}} {{{coat_url|}}}{{{coat_image|}}} |
   <tr>
   <tr>
     <td colspan="2" style="padding: 0.6em 0.3em; border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
     <td colspan="2" style="padding: 0.5em 0.2em; border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
       <table style="width: 100%; border-collapse: collapse; text-align: center; background: transparent;">
       <table style="width: 100%; border-collapse: collapse; text-align: center; background: transparent; border: none;">
         <tr>
         <tr>
           <!-- Flag -->
           <!-- Flag -->
           <td style="width: 50%; vertical-align: middle; padding: 0.2em;">
           <td style="width: 50%; vertical-align: bottom; padding: 0.1em; border: none;">
             {{#if: {{{flag_url|}}} |
             <img src="{{{flag_url|https://via.placeholder.com/100x60?text=Flag}}}" alt="Flag" style="max-width: 90px; max-height: 60px; width: auto; height: auto; display: block; margin: 0 auto 0.2em auto; border: 1px solid var(--border-color-subtle, #ccc);" />
              <img src="{{{flag_url}}}" alt="Flag" style="max-width: 110px; max-height: 80px; width: auto; height: auto; display: block; margin: 0 auto 0.3em auto; border: 1px solid var(--border-color-subtle, #ccc);" />
            | {{#if: {{{flag_image|}}} | [[File:{{{flag_image}}}|110x80px|center]] }}
            }}
             <span style="font-size: 85%;">(<a href="{{{flag_link|#}}}" style="color: var(--color-progressive, #36c); text-decoration: none;">Flag</a>)</span>
             <span style="font-size: 85%;">(<a href="{{{flag_link|#}}}" style="color: var(--color-progressive, #36c); text-decoration: none;">Flag</a>)</span>
           </td>
           </td>
           <!-- Coat of Arms -->
           <!-- Coat of Arms -->
           <td style="width: 50%; vertical-align: middle; padding: 0.2em;">
           <td style="width: 50%; vertical-align: bottom; padding: 0.1em; border: none;">
             {{#if: {{{coat_url|}}} |
             <img src="{{{coat_url|https://via.placeholder.com/80x60?text=Coat}}}" alt="Coat of Arms" style="max-width: 75px; max-height: 60px; width: auto; height: auto; display: block; margin: 0 auto 0.2em auto;" />
              <img src="{{{coat_url}}}" alt="Coat of Arms" style="max-width: 90px; max-height: 80px; width: auto; height: auto; display: block; margin: 0 auto 0.3em auto;" />
            | {{#if: {{{coat_image|}}} | [[File:{{{coat_image}}}|90x80px|center]] }}
            }}
             <span style="font-size: 85%;">(<a href="{{{coat_link|#}}}" style="color: var(--color-progressive, #36c); text-decoration: none;">Coat of Arms</a>)</span>
             <span style="font-size: 85%;">(<a href="{{{coat_link|#}}}" style="color: var(--color-progressive, #36c); text-decoration: none;">Coat of Arms</a>)</span>
           </td>
           </td>
Line 35: Line 28:
     </td>
     </td>
   </tr>
   </tr>
  }}


   <!-- Optional Map Section -->
   <!-- Map Image -->
  {{#if: {{{map_url|}}}{{{map_image|}}} |
   <tr>
   <tr>
     <td colspan="2" style="text-align: center; padding: 0.5em 0.2em; border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
     <td colspan="2" style="text-align: center; padding: 0.4em 0.2em; border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
       {{#if: {{{map_url|}}} |
       <img src="{{{map_url|https://via.placeholder.com/220x120?text=Location+Map}}}" alt="Map" style="max-width: 100%; height: auto; display: block; margin: 0 auto;" />
        <img src="{{{map_url}}}" alt="Map" style="max-width: 100%; height: auto; display: block; margin: 0 auto;" />
       <div style="font-size: 80%; margin-top: 0.2em; color: var(--color-subtle, #54595d);">{{{map_caption|}}}</div>
       | {{#if: {{{map_image|}}} | [[File:{{{map_image}}}|250px|center]] }}
      }}
      {{#if: {{{map_caption|}}} | <div style="font-size: 85%; margin-top: 0.3em; color: var(--color-subtle, #54595d);">{{{map_caption}}}</div> }}
     </td>
     </td>
   </tr>
   </tr>
  }}


   <!-- Basic Info Rows -->
   <!-- Data Rows -->
  {{#if: {{{capital|}}} |
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
     <th style="text-align: left; padding: 0.4em 0.5em; width: 40%; font-weight: bold; color: var(--color-progressive, #36c);">Capital</th>
     <th style="text-align: left; padding: 0.3em 0.4em; width: 40%; font-weight: bold; color: var(--color-progressive, #36c);">Capital</th>
     <td style="padding: 0.4em 0.5em;">
     <td style="padding: 0.3em 0.4em;">{{{capital|}}} {{{coordinates|}}}</td>
      {{{capital}}}
      {{#if: {{{coordinates|}}} | <br/><span style="font-size: 85%; color: var(--color-subtle, #54595d);">{{{coordinates}}}</span> }}
    </td>
   </tr>
   </tr>
  }}


  {{#if: {{{largest_city|}}} |
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
     <th style="text-align: left; padding: 0.4em 0.5em; font-weight: bold; color: var(--color-progressive, #36c);">Largest city</th>
     <th style="text-align: left; padding: 0.3em 0.4em; font-weight: bold; color: var(--color-progressive, #36c);">Largest city</th>
     <td style="padding: 0.4em 0.5em;">{{{largest_city}}}</td>
     <td style="padding: 0.3em 0.4em;">{{{largest_city|}}}</td>
   </tr>
   </tr>
  }}


  {{#if: {{{official_languages|}}} |
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
     <th style="text-align: left; padding: 0.4em 0.5em; font-weight: bold; color: var(--color-progressive, #36c);">Official languages</th>
     <th style="text-align: left; padding: 0.3em 0.4em; font-weight: bold; color: var(--color-progressive, #36c);">Official languages</th>
     <td style="padding: 0.4em 0.5em;">{{{official_languages}}}</td>
     <td style="padding: 0.3em 0.4em;">{{{official_languages|}}}</td>
   </tr>
   </tr>
  }}


  {{#if: {{{country|}}} |
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
     <th style="text-align: left; padding: 0.4em 0.5em; font-weight: bold; color: var(--color-progressive, #36c);">Country</th>
     <th style="text-align: left; padding: 0.3em 0.4em; font-weight: bold; color: var(--color-progressive, #36c);">Country</th>
     <td style="padding: 0.4em 0.5em;">{{{country}}}</td>
     <td style="padding: 0.3em 0.4em;">{{{country|}}}</td>
   </tr>
   </tr>
  }}


  {{#if: {{{founded|}}} |
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
     <th style="text-align: left; padding: 0.4em 0.5em; font-weight: bold; color: var(--color-progressive, #36c);">Founded</th>
     <th style="text-align: left; padding: 0.3em 0.4em; font-weight: bold; color: var(--color-progressive, #36c);">Founded</th>
     <td style="padding: 0.4em 0.5em;">{{{founded}}}</td>
     <td style="padding: 0.3em 0.4em;">{{{founded|}}}</td>
   </tr>
   </tr>
  }}


  {{#if: {{{mayor|}}} |
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
     <th style="text-align: left; padding: 0.4em 0.5em; font-weight: bold; color: var(--color-progressive, #36c);">Mayor</th>
     <th style="text-align: left; padding: 0.3em 0.4em; font-weight: bold; color: var(--color-progressive, #36c);">Mayor</th>
     <td style="padding: 0.4em 0.5em;">{{{mayor}}}</td>
     <td style="padding: 0.3em 0.4em;">{{{mayor|}}}</td>
   </tr>
   </tr>
  }}


  {{#if: {{{population|}}} |
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
     <th style="text-align: left; padding: 0.4em 0.5em; font-weight: bold; color: var(--color-progressive, #36c);">Population</th>
     <th style="text-align: left; padding: 0.3em 0.4em; font-weight: bold; color: var(--color-progressive, #36c);">Population</th>
     <td style="padding: 0.4em 0.5em;">{{{population}}}</td>
     <td style="padding: 0.3em 0.4em;">{{{population|}}}</td>
   </tr>
   </tr>
  }}


  {{#if: {{{area|}}} |
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
     <th style="text-align: left; padding: 0.4em 0.5em; font-weight: bold; color: var(--color-progressive, #36c);">Area</th>
     <th style="text-align: left; padding: 0.3em 0.4em; font-weight: bold; color: var(--color-progressive, #36c);">Area</th>
     <td style="padding: 0.4em 0.5em;">{{{area}}}</td>
     <td style="padding: 0.3em 0.4em;">{{{area|}}}</td>
   </tr>
   </tr>
  }}


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

Revision as of 22:47, 30 July 2026

Infobox city
           <img src="https://via.placeholder.com/100x60?text=Flag" alt="Flag" style="max-width: 90px; max-height: 60px; width: auto; height: auto; display: block; margin: 0 auto 0.2em auto; border: 1px solid var(--border-color-subtle, #ccc);" />
           (<a href="#" style="color: var(--color-progressive, #36c); text-decoration: none;">Flag</a>)
           <img src="https://via.placeholder.com/80x60?text=Coat" alt="Coat of Arms" style="max-width: 75px; max-height: 60px; width: auto; height: auto; display: block; margin: 0 auto 0.2em auto;" />
           (<a href="#" style="color: var(--color-progressive, #36c); text-decoration: none;">Coat of Arms</a>)
     <img src="https://via.placeholder.com/220x120?text=Location+Map" alt="Map" style="max-width: 100%; height: auto; display: block; margin: 0 auto;" />
Capital
Largest city
Official languages
Country
Founded
Mayor
Population
Area