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: separate; border-spacing: 0; border-radius: 4px; padding: 0.6rem;">
<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;">


   <!-- Main Title -->
   <!-- Native Name & English Name -->
   <tr>
   <tr>
     <th colspan="2" style="background-color: var(--background-color-neutral-subtle, #eaecf0); font-family: 'Linux Libertine', Georgia, serif; font-size: 1.2rem; font-weight: bold; text-align: center; padding: 0.4rem; border-radius: 4px; border: 1px solid var(--border-color-subtle, #c8ccd1);">
     <th colspan="2" style="text-align: center; font-size: 110%; padding: 0.5rem 0.2rem; border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
       {{{name|{{PAGENAME}}}}}
       {{#if: {{{native_name|}}} | <div style="font-weight: bold; font-size: 115%;">{{{native_name}}}</div> }}
      <div style="font-weight: bold;">{{{name|{{PAGENAME}}}}}</div>
     </th>
     </th>
   </tr>
   </tr>


   <!-- Flag / Image Section -->
   <!-- Side-by-Side Flag and Coat of Arms -->
   {{#if: {{{image|}}} |
   {{#if: {{{flag_url|}}} {{{coat_url|}}} |
   <tr>
   <tr>
     <td colspan="2" style="text-align: center; padding: 0.6rem 0 0.4rem 0;">
     <td colspan="2" style="padding: 0.6rem 0.3rem; border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
      [[File:{{{image}}}|220px|center]]
      <table style="width: 100%; border-collapse: collapse; text-align: center; background: transparent;">
      {{#if: {{{image_caption|}}} | <div style="font-size: 0.85rem; margin-top: 0.4rem; color: var(--color-subtle, #54595d);">{{{image_caption}}}</div> }}
        <tr>
          <!-- Flag Column -->
          <td style="width: 50%; vertical-align: middle; padding: 0.2rem;">
            {{#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/>
              <span style="font-size: 85%; color: var(--color-subtle, #0645ad);">(<a href="{{{flag_link|#}}}" style="color: inherit; text-decoration: none;">Flag</a>)</span>
            }}
          </td>
          <!-- Coat of Arms Column -->
          <td style="width: 50%; vertical-align: middle; padding: 0.2rem;">
            {{#if: {{{coat_url|}}} |
              <img src="{{{coat_url}}}" alt="Coat of Arms" style="max-width: 100px; height: auto; display: block; margin: 0 auto;" /><br/>
              <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>
            }}
          </td>
        </tr>
      </table>
     </td>
     </td>
   </tr>
   </tr>
   }}
   }}


   <!-- Basic Information Section -->
   <!-- National Motto -->
   <tr>
  {{#if: {{{motto|}}} |
    <th colspan="2" style="background-color: var(--background-color-neutral-subtle, #eaecf0); text-align: center; font-weight: bold; padding: 0.3rem; margin-top: 0.4rem; border-radius: 4px; border: 1px solid var(--border-color-subtle, #c8ccd1);">
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
      Basic Information
    <td colspan="2" style="text-align: center; padding: 0.4rem;">
     </th>
      <span style="color: var(--color-subtle, #0645ad);">National motto:</span> {{{motto}}}
     </td>
   </tr>
   </tr>
  }}


   {{#if: {{{country|}}} |
  <!-- National Anthem -->
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #eaecf0);">
   {{#if: {{{anthem|}}} |
     <th style="text-align: left; padding: 0.3rem 0.2rem; width: 35%; font-weight: bold;">Country</th>
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
    <td style="padding: 0.3rem 0.2rem;">{{{country}}}</td>
     <td colspan="2" style="text-align: center; padding: 0.4rem;">
      <span style="color: var(--color-subtle, #0645ad);">National anthem:</span> <i>{{{anthem}}}</i>
    </td>
   </tr>
   </tr>
   }}
   }}


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


   {{#if: {{{mayor|}}} |
  <!-- Capital -->
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #eaecf0);">
   {{#if: {{{capital|}}} |
     <th style="text-align: left; padding: 0.3rem 0.2rem; font-weight: bold;">Mayor</th>
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
     <td style="padding: 0.3rem 0.2rem;">{{{mayor}}}</td>
     <th style="text-align: left; padding: 0.4rem 0.5rem; width: 40%; font-weight: bold; color: var(--color-subtle, #0645ad);">Capital</th>
     <td style="padding: 0.4rem 0.5rem;">
      {{{capital}}}
      {{#if: {{{coordinates|}}} | <br/><span style="font-size: 85%; color: var(--color-subtle, #54595d);">{{{coordinates}}}</span> }}
    </td>
   </tr>
   </tr>
   }}
   }}


   <!-- Demographics Section -->
   <!-- Largest City -->
  <tr>
   {{#if: {{{largest_city|}}} |
    <th colspan="2" style="background-color: var(--background-color-neutral-subtle, #eaecf0); text-align: center; font-weight: bold; padding: 0.3rem; border-radius: 4px; border: 1px solid var(--border-color-subtle, #c8ccd1);">
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
      Demographics
     <th style="text-align: left; padding: 0.4rem 0.5rem; font-weight: bold; color: var(--color-subtle, #0645ad);">Largest city</th>
    </th>
     <td style="padding: 0.4rem 0.5rem;">{{{largest_city}}}</td>
  </tr>
 
   {{#if: {{{population|}}} |
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #eaecf0);">
     <th style="text-align: left; padding: 0.3rem 0.2rem; font-weight: bold;">Population</th>
     <td style="padding: 0.3rem 0.2rem;">{{{population}}}</td>
   </tr>
   </tr>
   }}
   }}


   {{#if: {{{area|}}} |
  <!-- Official Languages -->
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #eaecf0);">
   {{#if: {{{official_languages|}}} |
     <th style="text-align: left; padding: 0.3rem 0.2rem; font-weight: bold;">Area</th>
   <tr style="border-bottom: 1px solid var(--border-color-subtle, #a2a9b1);">
     <td style="padding: 0.3rem 0.2rem;">{{{area}}}</td>
     <th style="text-align: left; padding: 0.4rem 0.5rem; font-weight: bold; color: var(--color-subtle, #0645ad);">Official languages</th>
     <td style="padding: 0.4rem 0.5rem;">{{{official_languages}}}</td>
   </tr>
   </tr>
   }}
   }}

Revision as of 22:45, 30 July 2026

{{#if: | }} {{#if: | }} {{#if: | }} {{#if: | }} {{#if: | }} {{#if: | }} {{#if: | }}
{{#if: |
{{{native_name}}}
}}
Infobox city
           {{#if:  |
             <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);" />
(<a href="#" style="color: inherit; text-decoration: none;">Flag</a>) }}
           {{#if:  |
             <img src="{{{coat_url}}}" alt="Coat of Arms" style="max-width: 100px; height: auto; display: block; margin: 0 auto;" />
(<a href="#" style="color: inherit; text-decoration: none;">Coat of Arms</a>) }}
     National motto: {{{motto}}}
     National anthem: {{{anthem}}}
     <img src="{{{map_url}}}" alt="Map location" style="max-width: 100%; height: auto; display: block; margin: 0 auto;" />
{{#if: |
{{{map_caption}}}
}}
Capital
     {{{capital}}}
     {{#if:  | 
{{{coordinates}}} }}
Largest city {{{largest_city}}}
Official languages {{{official_languages}}}