Template:Article: Difference between revisions

From elijah
Jump to navigation Jump to search
WikiSync push v1.1
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 35: Line 35:
{{#if:{{{HasRelatedEntries|}}}|
{{#if:{{{HasRelatedEntries|}}}|
   {{#arraymap:{{{HasRelatedEntries|}}}|;|@@|{{#set:HasRelatedEntries=@@}}|}}
   {{#arraymap:{{{HasRelatedEntries|}}}|;|@@|{{#set:HasRelatedEntries=@@}}|}}
}}
{{#if:{{{HasGalleryImages|}}}|
  {{#arraymap:{{{HasGalleryImages|}}}|;|@@|{{#set:HasGalleryImages=@@}}|}}
}}
}}


<!-- ==========================================================
<!-- ==========================================================
     VISUAL DISPLAY (THE CARD)
     GALLERY (floats left, sits beside the infobox)
     ========================================================== -->
     ========================================================== -->
<div class="article-card" style="
{{#if:{{{HasGalleryImages|}}}|
<div style="float:left; margin:0 1.2em 1.2em 0; font-family:Georgia,'Times New Roman',serif;">
  <div style="display:flex; flex-wrap:wrap; gap:0.6em;">
    {{#arraymap:{{{HasGalleryImages|}}}|;|@@|<div>[[{{#show: @@ |?HasFile#-}}|frameless|160px|thumb]]</div>|}}
  </div>
</div>
}}
 
<!-- ==========================================================
    VISUAL DISPLAY (FLOATING INFOBOX — right 1/3, body flows left)
    ========================================================== -->
<div style="
  float: right;
  clear: right;
  width: 33%;
  min-width: 220px;
  max-width: 360px;
  margin: 0 0 1.2em 1.5em;
   font-family: Georgia, 'Times New Roman', serif;
   font-family: Georgia, 'Times New Roman', serif;
   border: 1px solid #c8d0d8;
  font-size: 0.92em;
   border: 1px solid #e0d8d0;
   border-radius: 6px;
   border-radius: 6px;
   background: #ffffff;
   background: #ffffff;
  width: 100%;
   box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  margin: 0 0 1.5em 0;
   box-shadow: 0 2px 8px rgba(0,0,0,0.10);
   overflow: hidden;
   overflow: hidden;
  display: block;
   box-sizing: border-box;
   box-sizing: border-box;
">
">


   <!-- Card Header -->
   <!-- Main picture: full infobox width, above title -->
   <div style="
   {{#if:{{{HasMainPicture|}}}|
    background: linear-gradient(135deg, #3b2a1a 0%, #5c4033 100%);
    <div style="text-align:center; background:#f5f2ee; border-bottom:1px solid #e8e0d8;">
     color: #ffffff;
      [[{{#show: {{{HasMainPicture|}}} |?HasFile#-}}|center|frameless|360px|{{{HasTitle|}}}]]
    padding: 0.75em 1em 0.6em 1em;
     </div>
  ">
  }}
     <div style="font-size:1.25em; font-weight:bold; letter-spacing:0.02em; line-height:1.2;">
 
  <!-- Title header: soft cream -->
  <div style="background:#faf8f5; border-bottom:1px solid #e8e0d8; padding:0.7em 0.9em 0.55em;">
     <div style="font-size:1.1em; font-weight:bold; letter-spacing:0.01em; line-height:1.25; color:#2a1f14;">
       {{{HasTitle|{{PAGENAME}}}}}
       {{{HasTitle|{{PAGENAME}}}}}
     </div>
     </div>
     {{#if:{{{HasAuthor|}}}|
     {{#if:{{{HasAuthor|}}}|
       <div style="font-size:0.82em; opacity:0.80; margin-top:0.2em;">{{{HasAuthor}}}</div>
       <div style="font-size:0.85em; color:#888; margin-top:0.2em;">{{{HasAuthor}}}</div>
     }}
     }}
   </div>
   </div>


   <!-- Body: two-column layout — metadata left, image right -->
   <!-- Metadata -->
   <div style="padding: 0.85em 1em 0.9em 1em; display:table; width:100%; box-sizing:border-box;">
   <div style="padding:0.75em 0.9em 0.8em;">


     <!-- Left column: all metadata -->
     <!-- Topics (chips — usually 1–3 short values) -->
     <div style="display:table-cell; vertical-align:top; text-align:left;">
     {{#if:{{{BelongsToTopic|}}}|
      <div style="margin-bottom:0.5em; line-height:1.9;">
        <span style="color:#777; font-weight:bold; margin-right:0.3em;">Topics</span>
        {{#arraymap:{{{BelongsToTopic|}}}|;|@@|<span style="display:inline-block; background:#f0ece4; border:1px solid #d8d0c4; border-radius:3px; padding:0.05em 0.4em; margin:0.06em 0.1em 0.06em 0; white-space:nowrap;">[[BelongsToTopic::@@]]</span>|}}
      </div>
    }}


      <!-- Topics -->
    <!-- Period (chips) -->
      {{#if:{{{BelongsToTopic|}}}|
    {{#if:{{{HasTimePeriod|}}}|
        <div style="font-size:0.88em; margin-bottom:0.55em; text-align:left;">
      <div style="margin-bottom:0.5em; line-height:1.9;">
          <span style="color:#777;">'''Topics'''</span>
        <span style="color:#777; font-weight:bold; margin-right:0.3em;">Period</span>
          <ul style="margin:0.2em 0 0 1.2em; padding:0;">
        {{#arraymap:{{{HasTimePeriod|}}}|;|@@|<span style="display:inline-block; background:#f0ece4; border:1px solid #d8d0c4; border-radius:3px; padding:0.05em 0.4em; margin:0.06em 0.1em 0.06em 0; white-space:nowrap;">[[HasTimePeriod::@@]]</span>|}}
            {{#arraymap:{{{BelongsToTopic|}}}|;|@@|<li>[[BelongsToTopic::@@]]</li>|}}
      </div>
          </ul>
    }}
        </div>
      }}


      <!-- Period & Region -->
    <!-- Region (chip) -->
      <table style="border-collapse:collapse; font-size:0.88em; margin-bottom:0.55em;">
    {{#if:{{{HasRegion|}}}|
        {{#if:{{{HasTimePeriod|}}}|
      <div style="margin-bottom:0.5em; line-height:1.9;">
          <tr>
        <span style="color:#777; font-weight:bold; margin-right:0.3em;">Region</span>
            <td style="color:#777; padding:0.12em 0.8em 0.12em 0; white-space:nowrap; vertical-align:top; text-align:left;">'''Period'''</td>
         <span style="display:inline-block; background:#f0ece4; border:1px solid #d8d0c4; border-radius:3px; padding:0.05em 0.4em;">{{{HasRegion}}}</span>
            <td style="color:#222; text-align:left;">{{#arraymap:{{{HasTimePeriod|}}}|;|@@|[[HasTimePeriod::@@]]|&ensp;·&ensp;}}</td>
      </div>
          </tr>
    }}
         }}
        {{#if:{{{HasRegion|}}}|
          <tr>
            <td style="color:#777; padding:0.12em 0.8em 0.12em 0; white-space:nowrap; vertical-align:top; text-align:left;">'''Region'''</td>
            <td style="color:#222; text-align:left;">{{{HasRegion}}}</td>
          </tr>
        }}
        {{#if:{{{HasNationalLibraryCode|}}}|
          <tr>
            <td style="color:#777; padding:0.12em 0.8em 0.12em 0; white-space:nowrap; vertical-align:top; text-align:left;">'''NLI Code'''</td>
            <td style="color:#222; text-align:left;">{{{HasNationalLibraryCode}}}</td>
          </tr>
        }}
      </table>


      <!-- Extensions -->
    <!-- NLI Code (plain text identifier) -->
      {{#if:{{{HasExtension|}}}|
    {{#if:{{{HasNationalLibraryCode|}}}|
        <div style="font-size:0.88em; margin-bottom:0.55em; text-align:left;">
      <div style="margin-bottom:0.5em; line-height:1.6;">
          <span style="color:#777;">'''Extensions'''</span>
        <span style="color:#777; font-weight:bold; margin-right:0.3em;">NLI Code</span>
          <ul style="margin:0.2em 0 0 1.2em; padding:0;">
        <span style="color:#444;">{{{HasNationalLibraryCode}}}</span>
            {{#arraymap:{{{HasExtension|}}}|;|@@|<li>[[HasExtension::@@|@@]]</li>|}}
      </div>
          </ul>
    }}
        </div>
      }}


      <!-- Related Personalities -->
    <!-- Extensions (vertical list) -->
      {{#if:{{{HasRelatedPersonalities|}}}|
    {{#if:{{{HasExtension|}}}|
        <div style="font-size:0.88em; margin-bottom:0.55em; text-align:left;">
      <div style="margin-bottom:0.55em;">
          <span style="color:#777;">'''Related Personalities'''</span>
        <div style="color:#777; font-weight:bold; margin-bottom:0.25em;">Extensions</div>
          <ul style="margin:0.2em 0 0 1.2em; padding:0;">
        <ul style="margin:0; padding:0 0 0 1.1em; line-height:1.7;">
            {{#arraymap:{{{HasRelatedPersonalities|}}}|;|@@|<li>[[@@]]</li>|}}
          {{#arraymap:{{{HasExtension|}}}|;|@@|<li>[[HasExtension::@@|{{#show: @@|?HasTitle|default=@@}}]]</li>|}}
          </ul>
        </ul>
        </div>
      </div>
      }}
    }}


      <!-- Related Communities -->
    <!-- Related Personalities (vertical list) -->
      {{#if:{{{HasRelatedCommunities|}}}|
    {{#if:{{{HasRelatedPersonalities|}}}|
        <div style="font-size:0.88em; margin-bottom:0.55em; text-align:left;">
      <div style="margin-bottom:0.55em;">
          <span style="color:#777;">'''Related Communities'''</span>
        <div style="color:#777; font-weight:bold; margin-bottom:0.25em;">Related Personalities</div>
          <ul style="margin:0.2em 0 0 1.2em; padding:0;">
        <ul style="margin:0; padding:0 0 0 1.1em; line-height:1.7;">
            {{#arraymap:{{{HasRelatedCommunities|}}}|;|@@|<li>[[@@]]</li>|}}
          {{#arraymap:{{{HasRelatedPersonalities|}}}|;|@@|<li>[[HasRelatedPersonalities::@@|@@]]</li>|}}
          </ul>
        </ul>
        </div>
      </div>
      }}
    }}


      <!-- Related Entries -->
    <!-- Related Communities (vertical list) -->
      {{#if:{{{HasRelatedEntries|}}}|
    {{#if:{{{HasRelatedCommunities|}}}|
        <div style="font-size:0.88em; margin-bottom:0.3em; text-align:left;">
      <div style="margin-bottom:0.55em;">
          <span style="color:#777;">'''Related Entries'''</span>
        <div style="color:#777; font-weight:bold; margin-bottom:0.25em;">Related Communities</div>
          <ul style="margin:0.2em 0 0 1.2em; padding:0;">
        <ul style="margin:0; padding:0 0 0 1.1em; line-height:1.7;">
            {{#arraymap:{{{HasRelatedEntries|}}}|;|@@|<li>[[@@]]</li>|}}
          {{#arraymap:{{{HasRelatedCommunities|}}}|;|@@|<li>[[HasRelatedCommunities::@@|@@]]</li>|}}
          </ul>
        </ul>
        </div>
      </div>
      }}
    }}


     </div><!-- /left column -->
     <!-- Related Entries (vertical list) -->
 
     {{#if:{{{HasRelatedEntries|}}}|
    <!-- Right column: main picture or placeholder -->
       <div style="margin-bottom:0.3em;">
     <div style="display:table-cell; vertical-align:top; padding-left:1em; width:160px; min-width:160px;">
        <div style="color:#777; font-weight:bold; margin-bottom:0.25em;">Related Entries</div>
      {{#if:{{{HasMainPicture|}}}|
        <ul style="margin:0; padding:0 0 0 1.1em; line-height:1.7;">
        [[{{#show: {{{HasMainPicture|}}} |?HasFile#-}}|thumb|150px|center|{{{HasTitle|}}}]]
           {{#arraymap:{{{HasRelatedEntries|}}}|;|@@|<li>[[@@]]</li>|}}
       |
        </ul>
        <div style="
      </div>
          width:150px;
    }}
          height:180px;
          background:#f0f2f5;
          border:1px dashed #c0c8d0;
          border-radius:4px;
          display:flex;
          align-items:center;
          justify-content:center;
          color:#b0b8c4;
          font-size:0.78em;
          text-align:center;
          line-height:1.4;
           box-sizing:border-box;
          padding:0.5em;
        ">No image<br/>available</div>
      }}
    </div><!-- /right column -->


   </div><!-- /body -->
   </div><!-- /metadata -->


   <!-- Map (full width, below body) -->
   <!-- Map (full infobox width, below metadata) -->
   {{#if:{{{HasMap|}}}|
   {{#if:{{{HasMap|}}}|
     <div style="border-top:1px solid #e4e8ec; padding:0.75em 1em; text-align:center;">
     <div style="border-top:1px solid #e4e8ec; padding:0.75em 0.9em; text-align:center;">
       [[{{{HasMap|}}}|center|thumb|500px|Map]]
       [[{{{HasMap|}}}|center|thumb|340px|Map]]
     </div>
     </div>
   }}
   }}


</div>
</div>
</includeonly>
</includeonly>


Line 200: Line 193:
  |HasRelatedEntries=Article:011; Article:055
  |HasRelatedEntries=Article:011; Article:055
  |HasMainPicture=Image:TomaszTreter1609
  |HasMainPicture=Image:TomaszTreter1609
|HasGalleryImages=Image:TomaszTreter1609; Image:AnotherImageID
  |HasMap=File:GaliciaMap1900.jpg
  |HasMap=File:GaliciaMap1900.jpg
  |HasNationalLibraryCode=NNL_ALEPH001234567
  |HasNationalLibraryCode=NNL_ALEPH001234567

Latest revision as of 09:02, 13 July 2026



Use this template on Article: pages to describe encyclopedia entries.

Example:

{{Article
 |HasArticleID=1.4.3
 |HasTitle=Jewish Trade in Poland
 |HasAuthor=Adam Teller
 |BelongsToTopic=Economics; Commerce
 |HasTimePeriod=1772-1914; 1648-1772
 |HasRegion=Galicia
 |HasExtension=Article:042; Article:078
 |HasRelatedPersonalities=Person:Q123456; Person:Q789012
 |HasRelatedCommunities=Community:Kraków; Community:Lviv
 |HasRelatedEntries=Article:011; Article:055
 |HasMainPicture=Image:TomaszTreter1609
 |HasGalleryImages=Image:TomaszTreter1609; Image:AnotherImageID
 |HasMap=File:GaliciaMap1900.jpg
 |HasNationalLibraryCode=NNL_ALEPH001234567
}}

Then write the narrative text of the article directly after the template call.