Jump to content

Template:Infobox city: Difference between revisions

From Legopedia
No edit summary
No edit summary
Line 1: Line 1:
<table 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.4; border-collapse: collapse;">
<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;">


   <!-- Native Name & English Name -->
   <!-- Header Title -->
   <tr>
   <tr>
     <th colspan="2" style="text-align: center; font-size: 110%; padding: 0.5rem 0.2rem; border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
     <th colspan="2" style="text-align: center; font-size: 110%; 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> }}
       {{#if: {{{native_name|}}} | <div style="font-weight: bold; font-size: 115%;">{{{native_name}}}</div> }}
       <div style="font-weight: bold;">{{{name|{{PAGENAME}}}}}</div>
       <div style="font-weight: bold;">{{{name|{{PAGENAME}}}}}</div>
Line 9: Line 9:
   </tr>
   </tr>


   <!-- Side-by-Side Flag and Coat of Arms -->
   <!-- Side-by-Side Flag & Coat of Arms -->
   {{#if: {{{flag_url|}}} {{{coat_url|}}} |
   {{#if: {{{flag_url|}}}{{{flag_image|}}} {{{coat_url|}}}{{{coat_image|}}} |
   <tr>
   <tr>
     <td colspan="2" style="padding: 0.6rem 0.3rem; border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
     <td colspan="2" style="padding: 0.6em 0.3em; 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;">
         <tr>
         <tr>
           <!-- Flag Column -->
           <!-- Flag -->
           <td style="width: 50%; vertical-align: middle; padding: 0.2rem;">
           <td style="width: 50%; vertical-align: middle; padding: 0.2em;">
             {{#if: {{{flag_url|}}} |
             {{#if: {{{flag_url|}}} |
               <img src="{{{flag_url}}}" alt="Flag" style="max-width: 110px; height: auto; display: block; margin: 0 auto; border: 1px solid var(--border-color-subtle, #ccc);" /><br/>
               <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);" />
              <span style="font-size: 85%; color: var(--color-subtle, #0645ad);">(<a href="{{{flag_link|#}}}" style="color: inherit; text-decoration: none;">Flag</a>)</span>
            | {{#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>
           </td>
           </td>
           <!-- Coat of Arms Column -->
           <!-- Coat of Arms -->
           <td style="width: 50%; vertical-align: middle; padding: 0.2rem;">
           <td style="width: 50%; vertical-align: middle; padding: 0.2em;">
             {{#if: {{{coat_url|}}} |
             {{#if: {{{coat_url|}}} |
               <img src="{{{coat_url}}}" alt="Coat of Arms" style="max-width: 100px; height: auto; display: block; margin: 0 auto;" /><br/>
               <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;" />
              <span style="font-size: 85%; color: var(--color-subtle, #0645ad);">(<a href="{{{coat_link|#}}}" style="color: inherit; text-decoration: none;">Coat of Arms</a>)</span>
            | {{#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>
           </td>
           </td>
         </tr>
         </tr>
Line 35: Line 37:
   }}
   }}


   <!-- National Motto -->
   <!-- Optional Map Section -->
   {{#if: {{{motto|}}} |
   {{#if: {{{map_url|}}}{{{map_image|}}} |
  <tr>
    <td colspan="2" style="text-align: center; padding: 0.5em 0.2em; border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
      {{#if: {{{map_url|}}} |
        <img src="{{{map_url}}}" alt="Map" style="max-width: 100%; height: auto; display: block; margin: 0 auto;" />
      | {{#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>
  </tr>
  }}
 
  <!-- Basic Info 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);">
     <td colspan="2" style="text-align: center; padding: 0.4rem;">
     <th style="text-align: left; padding: 0.4em 0.5em; width: 40%; font-weight: bold; color: var(--color-progressive, #36c);">Capital</th>
       <span style="color: var(--color-subtle, #0645ad);">National motto:</span> {{{motto}}}
    <td style="padding: 0.4em 0.5em;">
       {{{capital}}}
      {{#if: {{{coordinates|}}} | <br/><span style="font-size: 85%; color: var(--color-subtle, #54595d);">{{{coordinates}}}</span> }}
     </td>
     </td>
   </tr>
   </tr>
   }}
   }}


   <!-- National Anthem -->
   {{#if: {{{largest_city|}}} |
   {{#if: {{{anthem|}}} |
  <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>
    <td style="padding: 0.4em 0.5em;">{{{largest_city}}}</td>
  </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);">
     <td colspan="2" style="text-align: center; padding: 0.4rem;">
     <th style="text-align: left; padding: 0.4em 0.5em; font-weight: bold; color: var(--color-progressive, #36c);">Official languages</th>
      <span style="color: var(--color-subtle, #0645ad);">National anthem:</span> <i>{{{anthem}}}</i>
    <td style="padding: 0.4em 0.5em;">{{{official_languages}}}</td>
    </td>
  </tr>
  }}
 
  {{#if: {{{country|}}} |
  <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>
    <td style="padding: 0.4em 0.5em;">{{{country}}}</td>
   </tr>
   </tr>
   }}
   }}


  <!-- Map Section -->
   {{#if: {{{founded|}}} |
   {{#if: {{{map_url|}}} |
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
     <td colspan="2" style="text-align: center; padding: 0.5rem 0.2rem;">
     <th style="text-align: left; padding: 0.4em 0.5em; font-weight: bold; color: var(--color-progressive, #36c);">Founded</th>
      <img src="{{{map_url}}}" alt="Map location" style="max-width: 100%; height: auto; display: block; margin: 0 auto;" />
    <td style="padding: 0.4em 0.5em;">{{{founded}}}</td>
      {{#if: {{{map_caption|}}} | <div style="font-size: 85%; margin-top: 0.3rem;">{{{map_caption}}}</div> }}
    </td>
   </tr>
   </tr>
   }}
   }}


  <!-- Capital -->
   {{#if: {{{mayor|}}} |
   {{#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.4rem 0.5rem; width: 40%; font-weight: bold; color: var(--color-subtle, #0645ad);">Capital</th>
     <th style="text-align: left; padding: 0.4em 0.5em; font-weight: bold; color: var(--color-progressive, #36c);">Mayor</th>
     <td style="padding: 0.4rem 0.5rem;">
     <td style="padding: 0.4em 0.5em;">{{{mayor}}}</td>
      {{{capital}}}
      {{#if: {{{coordinates|}}} | <br/><span style="font-size: 85%; color: var(--color-subtle, #54595d);">{{{coordinates}}}</span> }}
    </td>
   </tr>
   </tr>
   }}
   }}


  <!-- Largest City -->
   {{#if: {{{population|}}} |
   {{#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.4rem 0.5rem; font-weight: bold; color: var(--color-subtle, #0645ad);">Largest city</th>
     <th style="text-align: left; padding: 0.4em 0.5em; font-weight: bold; color: var(--color-progressive, #36c);">Population</th>
     <td style="padding: 0.4rem 0.5rem;">{{{largest_city}}}</td>
     <td style="padding: 0.4em 0.5em;">{{{population}}}</td>
   </tr>
   </tr>
   }}
   }}


  <!-- Official Languages -->
   {{#if: {{{area|}}} |
   {{#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.4rem 0.5rem; font-weight: bold; color: var(--color-subtle, #0645ad);">Official languages</th>
     <th style="text-align: left; padding: 0.4em 0.5em; font-weight: bold; color: var(--color-progressive, #36c);">Area</th>
     <td style="padding: 0.4rem 0.5rem;">{{{official_languages}}}</td>
     <td style="padding: 0.4em 0.5em;">{{{area}}}</td>
   </tr>
   </tr>
   }}
   }}

Revision as of 22:46, 30 July 2026

{{#if: | }} {{#if: | }} {{#if: | }} {{#if: | }} {{#if: | }} {{#if: | }} {{#if: | }} {{#if: | }} {{#if: | }} {{#if: | }}
{{#if: |
{{{native_name}}}
}}
Infobox city
           {{#if:  |
             <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:  | [[File:{{{flag_image}}}|110x80px|center]] }}
           }}
           (<a href="#" style="color: var(--color-progressive, #36c); text-decoration: none;">Flag</a>)
           {{#if:  |
             <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:  | [[File:{{{coat_image}}}|90x80px|center]] }}
           }}
           (<a href="#" style="color: var(--color-progressive, #36c); text-decoration: none;">Coat of Arms</a>)
     {{#if:  |
       <img src="{{{map_url}}}" alt="Map" style="max-width: 100%; height: auto; display: block; margin: 0 auto;" />
     | {{#if:  | [[File:{{{map_image}}}|250px|center]] }}
     }}
{{#if: |
{{{map_caption}}}
}}
Capital
     {{{capital}}}
     {{#if:  | 
{{{coordinates}}} }}
Largest city {{{largest_city}}}
Official languages {{{official_languages}}}
Country {{{country}}}
Founded {{{founded}}}
Mayor {{{mayor}}}
Population {{{population}}}
Area {{{area}}}