Template:Person: Difference between revisions

From elijah
Jump to navigation Jump to search
No edit summary
WikiSync push v1.0
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
<!-- WikiSync | version=1.0 | updated=2026-04-27 -->
<includeonly>
<includeonly>
__NOFACTBOX__
__NOFACTBOX__
Line 22: Line 23:
  |HasImage={{{HasImage|}}}
  |HasImage={{{HasImage|}}}
  |HasArticle={{{HasArticle|}}}
  |HasArticle={{{HasArticle|}}}
|HasBibLink={{{HasBibLink|}}}
|HasYIVOLink={{{HasYIVOLink|}}}
|HasWikiLink={{{HasWikiLink|}}}
}}
}}


<!-- Handle List Properties (Split by semicolon or comma) -->
<!-- Handle List Properties (Split by semicolon or comma) -->
<!-- 1. URLs: We assume raw text storage for JSON export simplicity,  
<!-- 1. External Resources: We assume raw text storage for JSON export simplicity,
     but validation happens on display. -->
     but validation happens on display. -->
{{#if:{{{HasURL|}}}|
{{#if:{{{HasExtResources|}}}|
   {{#arraymap:{{{HasURL|}}}|;|@@|{{#set:HasURL=@@}} }}
   {{#arraymap:{{{HasExtResources|}}}|;|@@|{{#set:HasExtResources=@@}} }}
}}
}}


<!-- 2. Professions: We want these to be individual data points
<!-- Handle Related Entries List -->
    so we can query "Topic:Rabbis" later. -->
{{#if:{{{HasRelatedEntries|}}}|
  {{#arraymap:{{{HasRelatedEntries|}}}|;|@@|{{#set:HasRelatedEntries=@@}}|}}
}}
 
<!-- Handle Profession List (Controlled Vocabulary) -->
<!-- We split by semicolon so "Rabbi;Author" becomes two distinct data values -->
{{#if:{{{HasProfession|}}}|
{{#if:{{{HasProfession|}}}|
   {{#arraymap:{{{HasProfession|}}}|;|@@|{{#set:HasProfession=@@}} }}
   {{#arraymap:{{{HasProfession|}}}|;|@@|{{#set:HasProfession=@@}}|}}
}}
}}


Line 40: Line 49:
     VISUAL DISPLAY (THE CARD)
     VISUAL DISPLAY (THE CARD)
     ========================================================== -->
     ========================================================== -->
<div class="person-card" style="border:1px solid #ccc; background:#f9f9f9; padding:1em; display:flow-root; box-shadow: 2px 2px 5px rgba(0,0,0,0.1);">
<div class="person-card" style="
  font-family: Georgia, 'Times New Roman', serif;
  border: 1px solid #c8d0d8;
  border-radius: 6px;
  background: #ffffff;
  width: 100%;
  margin: 0 0 1.5em 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  overflow: hidden;
  display: block;
  box-sizing: border-box;
">


   <!-- Image Block -->
   <!-- Card Header -->
   {{#if:{{{HasImage|}}}|
   <div style="
     <div style="float:right; margin-left:1em; max-width:200px;">
    background: linear-gradient(135deg, #2c3e50 0%, #3d5166 100%);
       [[{{{HasImage}}}|thumb|200px|center|{{{HasName|}}}]]
    color: #ffffff;
    padding: 0.75em 1em 0.6em 1em;
  ">
     <div style="font-size:1.25em; font-weight:bold; letter-spacing:0.02em; line-height:1.2;">
       {{{HasName|{{PAGENAME}}}}}
     </div>
     </div>
  }}
    {{#if:{{{HasAltName|}}}|
      <div style="font-size:0.82em; opacity:0.80; margin-top:0.2em;">{{{HasAltName}}}</div>
    }}
  </div>
 
  <!-- Body: two-column layout — data left, image right -->
  <div style="padding: 0.85em 1em 0.9em 1em; display:table; width:100%; box-sizing:border-box;">


  <!-- Header -->
    <!-- Left column: all data -->
  <h2 style="margin-top:0;">{{{HasName|{{PAGENAME}}}}}</h2>
    <div style="display:table-cell; vertical-align:top; text-align:left;">
 
  <div class="person-data">
  <!-- Names -->
  {{#if:{{{HasHebName|}}}{{{HasYiddishName|}}}|
    <p>
    {{#if:{{{HasHebName|}}}|'''Hebrew:''' <span lang="he" dir="rtl">{{{HasHebName}}}</span> &bull; }}
    {{#if:{{{HasYiddishName|}}}|'''Yiddish:''' <span lang="yi" dir="rtl">{{{HasYiddishName}}}</span>}}
    </p>
  }}


  <!-- Vital Statistics -->
      <!-- Hebrew / Yiddish Names -->
  <ul>
      {{#if:{{{HasHebName|}}}{{{HasYiddishName|}}}|
    {{#if:{{{HasDateOfBirth|}}}|<li>'''Born:''' {{{HasDateOfBirth}}}{{#if:{{{HasPlaceOfBirth|}}}| in [[{{{HasPlaceOfBirth}}}]]}}</li>}}
        <div style="margin-bottom:0.55em; font-size:0.9em; color:#444;">
    {{#if:{{{HasDateOfDeath|}}}|<li>'''Died:''' {{{HasDateOfDeath}}}{{#if:{{{HasPlaceOfDeath|}}}| in [[{{{HasPlaceOfDeath}}}]]}}</li>}}
          {{#if:{{{HasHebName|}}}|<span style="font-weight:bold; color:#555;">עב׳:</span>&nbsp;<span lang="he" dir="rtl" style="font-size:1.05em;">{{{HasHebName}}}</span>}}
  </ul>
          {{#if:{{{HasHebName|}}}{{{HasYiddishName|}}}|{{#if:{{{HasHebName|}}}|{{#if:{{{HasYiddishName|}}}|&ensp;&bull;&ensp;}}}}}}
          {{#if:{{{HasYiddishName|}}}|<span style="font-weight:bold; color:#555;">יידיש:</span>&nbsp;<span lang="yi" dir="rtl" style="font-size:1.05em;">{{{HasYiddishName}}}</span>}}
        </div>
      }}


  <!-- Professional Data -->
      <!-- Vital Statistics — always show both rows -->
  {{#if:{{{HasProfession|}}}|
      <table style="border-collapse:collapse; font-size:0.88em; margin-bottom:0.55em;">
    '''Known for:'''  
        <tr>
    {{#arraymap:{{{HasProfession|}}}|;|@@|[[Term:@@|@@]]|, }} <!-- Auto-links to Term:Namespace -->
          <td style="color:#777; padding:0.12em 0.8em 0.12em 0; white-space:nowrap; vertical-align:top; text-align:left;">'''Born'''</td>
    <br/>
          <td style="color:#222; text-align:left;">
  }}
            {{#if:{{{HasDateOfBirth|}}}{{{HasPlaceOfBirth|}}}|
              {{#if:{{{HasDateOfBirth|}}}|{{{HasDateOfBirth}}}}}{{#if:{{{HasDateOfBirth|}}}{{{HasPlaceOfBirth|}}}|{{#if:{{{HasDateOfBirth|}}}|{{#if:{{{HasPlaceOfBirth|}}}|&ensp;·&ensp;}}}}}}{{#if:{{{HasPlaceOfBirth|}}}|[[{{{HasPlaceOfBirth}}}]]}}
            |<span style="color:#bbb;">—</span>}}
          </td>
        </tr>
        <tr>
          <td style="color:#777; padding:0.12em 0.8em 0.12em 0; white-space:nowrap; vertical-align:top; text-align:left;">'''Died'''</td>
          <td style="color:#222; text-align:left;">
            {{#if:{{{HasDateOfDeath|}}}{{{HasPlaceOfDeath|}}}|
              {{#if:{{{HasDateOfDeath|}}}|{{{HasDateOfDeath}}}}}{{#if:{{{HasDateOfDeath|}}}{{{HasPlaceOfDeath|}}}|{{#if:{{{HasDateOfDeath|}}}|{{#if:{{{HasPlaceOfDeath|}}}|&ensp;·&ensp;}}}}}}{{#if:{{{HasPlaceOfDeath|}}}|[[{{{HasPlaceOfDeath}}}]]}}
            |<span style="color:#bbb;">—</span>}}
          </td>
        </tr>
      </table>


  {{#if:{{{HasArticle|}}}|'''Related Article:''' [[{{{HasArticle}}}]]<br/>}}
      <!-- Professional Data -->
      {{#if:{{{HasProfession|}}}|
        <div style="font-size:0.88em; margin-bottom:0.55em; text-align:left;">
          <span style="color:#777;">'''Known for'''</span>
          <ul style="margin:0.2em 0 0 1.2em; padding:0;">
            <!-- {{#arraymap:{{{HasProfession|}}}|;|@@|[[Term:@@|@@]]|, }} --> <!-- Auto-links to Term:Namespace -->
            <!--
              We use [[HasProfession::@@]] syntax here.
              This displays the text "@@" (e.g. Rabbi), but clicking it
              searches the wiki for other people with that same property value.
            -->
            {{#arraymap:{{{HasProfession|}}}|;|@@|<li>[[HasProfession::@@]]</li>|}}
          </ul>
        </div>
      }}


  <!-- Identifiers (Crucial for TEI/MARC21 Interop) -->
      <!-- Related Article -->
  {{#if:{{{HasWikidataID|}}}{{{HasVIAFID|}}}{{{HasMazalID|}}}|
      <div style="font-size:0.88em; margin-bottom:0.3em; text-align:left;">
    <hr style="margin:0.5em 0; border:0; border-top:1px dashed #ccc;"/>
        {{#if:{{{HasArticle|}}}|
    <small style="color:#666;">
          <span style="color:#777;">'''Related Article'''</span>&ensp;[[{{{HasArticle}}}]]
    {{#if:{{{HasWikidataID|}}}|'''Wikidata:''' [https://www.wikidata.org/wiki/{{{HasWikidataID}}} {{{HasWikidataID}}}] &bull; }}
        |
    {{#if:{{{HasVIAFID|}}}|'''VIAF:''' [https://viaf.org/viaf/{{{HasVIAFID}}} {{{HasVIAFID}}}] &bull; }}
          <span style="color:#aaa; font-style:italic;">No Related Article</span>
    {{#if:{{{HasMazalID|}}}|'''Mazal ID:''' {{{HasMazalID}}}}}
        }}
    </small>
      </div>
    <br/>
  }}


  <!-- External Links with Validation -->
      <!-- Related Entries -->
  {{#if:{{{HasURL|}}}|
      {{#if:{{{HasRelatedEntries|}}}|
    '''External Links:'''<br/>
        <div style="font-size:0.88em; margin-bottom:0.3em; text-align:left;">
    {{#arraymap:{{{HasURL}}}|;|@@|
          <span style="color:#777;">'''Related Entries'''</span>
      {{#if: {{#rmatch:@@|^https?://}} | [@@ Link] | <!-- Invalid hidden --> }}
          <ul style="margin:0.2em 0 0 1.2em; padding:0;">
     |<br/>}}
            {{#arraymap:{{{HasRelatedEntries|}}}|;|@@|<li>[[@@]]</li>|}}
  }}
          </ul>
   </div>
        </div>
      }}
 
      <!-- Bibliography & Encyclopaedia Links -->
      <div style="font-size:0.88em; margin-bottom:0.3em; text-align:left;">
        {{#if:{{{HasBibLink|}}}|
          <span style="color:#777;">'''Selected bibliography'''</span>&ensp;[[{{{HasBibLink}}}]]
        |
          <span style="color:#aaa; font-style:italic;">No Selected bibliography</span>
        }}
      </div>
      <div style="font-size:0.88em; margin-bottom:0.3em; text-align:left;">
        {{#if:{{{HasYIVOLink|}}}|
          <span style="color:#777;">'''YIVO Encyclopedia entry'''</span>&ensp;[[{{{HasYIVOLink}}}]]
        |
          <span style="color:#aaa; font-style:italic;">No YIVO Encyclopedia entry</span>
        }}
      </div>
      <div style="font-size:0.88em; margin-bottom:0.55em; text-align:left;">
        {{#if:{{{HasWikiLink|}}}|
          <span style="color:#777;">'''Wikipedia entry'''</span>&ensp;[[{{{HasWikiLink}}}]]
        |
          <span style="color:#aaa; font-style:italic;">No Wikipedia entry</span>
        }}
      </div>
 
      <!-- Other External Links with Validation -->
      {{#if:{{{HasExtResources|}}}|
        <div style="font-size:0.88em; margin-bottom:0.4em; text-align:left;">
          <span style="color:#777;">'''External Links'''</span><br/>
          {{#arraymap:{{{HasExtResources}}}|;|@@|
            {{#if: {{#rmatch:@@|^https?://}} | <div style="padding-left:0.6em;">[@@ @@]</div> | <!-- Invalid hidden --> }}
          |}}
        </div>
      }}
 
      <!-- Identifiers (Crucial for TEI/MARC21 Interop) -->
      {{#if:{{{HasWikidataID|}}}{{{HasVIAFID|}}}{{{HasMazalID|}}}|
        <div style="
          border-top: 1px solid #e4e8ec;
          margin-top: 0.6em;
          padding-top: 0.5em;
          font-size: 0.78em;
          color: #888;
          line-height: 1.7;
          text-align: left;
        ">
          {{#if:{{{HasWikidataID|}}}|<span>'''Wikidata:'''&nbsp;[https://www.wikidata.org/wiki/{{{HasWikidataID}}} {{{HasWikidataID}}}]</span>&emsp;}}
          {{#if:{{{HasVIAFID|}}}|<span>'''VIAF:'''&nbsp;[https://viaf.org/viaf/{{{HasVIAFID}}} {{{HasVIAFID}}}]</span>&emsp;}}
          {{#if:{{{HasMazalID|}}}|<span>'''Mazal:'''&nbsp;{{{HasMazalID}}}</span>}}
        </div>
      }}
 
    </div><!-- /left column -->
 
     <!-- Right column: image or placeholder -->
    <div style="display:table-cell; vertical-align:top; padding-left:1em; width:160px; min-width:160px;">
      {{#if:{{{HasImage|}}}|
        [[{{#show: {{{HasImage|}}} |?HasFile#-}}|thumb|150px|center|{{{HasName|}}}]]
      |
        <div style="
          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>
</div>
Line 116: Line 244:
  |HasMazalID=MAZAL-000045
  |HasMazalID=MAZAL-000045
  |HasVIAFID=22945141
  |HasVIAFID=22945141
  |HasImage=File:Jacob_ben_Moses.jpg
  |HasImage=Image:Josef Perl
  |HasArticle=Article:The Jewish Council of Lviv
  |HasArticle=Article:The Jewish Council of Lviv
  |HasProfession=Community leader and rabbinical scholar
  |HasProfession=Community leader and rabbinical scholar
  |HasURL=https://example.org/persons/jacob_ben_moses; https://en.wikipedia.org/wiki/Jacob_ben_Moses
  |HasExtResources=https://example.org/persons/jacob_ben_moses; https://en.wikipedia.org/wiki/Jacob_ben_Moses
|HasRelatedEntries=Article:Haskalah; Article:Galician Jewry
|HasWikiLink=
|HasYIVOLink=
|HasBibLink=
}}
}}
</pre>
</pre>
</noinclude>
</noinclude>

Latest revision as of 20:21, 30 April 2026



Use this template on Person: pages to describe individual people.

Example:

{{Person
 |HasName=Perl ,Joseph
 |HasHebName=פרל, יוסף
 |HasYiddishName=פערל, יוסף
 |HasType=PublicFigure
 |HasDateOfBirth=1773
 |HasPlaceOfBirth=Community:Lviv
 |HasDateOfDeath=1839
 |HasPlaceOfDeath=Community:Brody
 |HasWikidataID=Q123456
 |HasMazalID=MAZAL-000045
 |HasVIAFID=22945141
 |HasImage=Image:Josef Perl
 |HasArticle=Article:The Jewish Council of Lviv
 |HasProfession=Community leader and rabbinical scholar
 |HasExtResources=https://example.org/persons/jacob_ben_moses; https://en.wikipedia.org/wiki/Jacob_ben_Moses
 |HasRelatedEntries=Article:Haskalah; Article:Galician Jewry
 |HasWikiLink=
 |HasYIVOLink=
 |HasBibLink=
}}