⧼social-icons-mobile-buttons⧽

Template:PersonRemote: Difference between revisions

From Tsadra Commons
(VSCode edit)
(Revert: #ifexist runs on commons, so it tests the wrong wiki for a consuming wiki)
Tag: Manual revert
 
(21 intermediate revisions by the same user not shown)
Line 7: Line 7:
| {{{ MainNamePhon | }}}
| {{{ MainNamePhon | }}}
| {{SUBPAGENAME}}
| {{SUBPAGENAME}}
}}</div>{{#if: {{{ MainNameDev | }}}{{{ MainNameTib | }}}{{{ MainNameChi | }}}{{{ MainNameJap | }}}{{{ MainNameKor | }}}
}}
</div>{{#if: {{{ MainNameDev | }}}{{{ MainNameTib | }}}{{{ MainNameChi | }}}{{{ MainNameJap | }}}{{{ MainNameKor | }}}
|<div class="text-80 my-2">
|<div class="text-80 my-2">
<div class="d-inline-block mr-3">{{#arraymap:{{{ MainNameDev | }}};{{{ MainNameTib | }}};{{{ MainNameChi | }}};{{{ MainNameJap | }}};{{{ MainNameKor | }}}
<div class="d-inline-block mr-3">{{#arraymap:{{{ MainNameDev | }}};{{{ MainNameTib | }}};{{{ MainNameChi | }}};{{{ MainNameJap | }}};{{{ MainNameKor | }}}
Line 15: Line 16:
|,&nbsp;
|,&nbsp;
}}</div>{{#ifeq: {{{ Subclass | }}} | Classical | {{#if: {{{ Yearbirth | }}}|
}}</div>{{#ifeq: {{{ Subclass | }}} | Classical | {{#if: {{{ Yearbirth | }}}|
<div class="d-inline-block mr-3 text-70 text-muted">{{{ Yearbirth | }}}{{#if: {{{ Yeardeath | }}}
<div class="d-inline-block mr-3 text-70">{{{ Yearbirth | }}}{{#if: {{{ Yeardeath | }}}
|&nbsp;-&nbsp;{{{ Yeardeath | }}}
|&nbsp;&nbsp;{{{ Yeardeath | }}}
|
|
}}</div>|}} | }}
}}</div> | }} | }}
</div>
</div>
|{{#ifeq: {{{ Subclass | }}} | Classical | {{#if: {{{ Yearbirth | }}}
|{{#ifeq: {{{ Subclass | }}} | Classical | {{#if: {{{ Yearbirth | }}}
|<div class="d-inline-block text-50 text-muted">{{{ Yearbirth | }}}{{#if: {{{ Yeardeath | }}}
|<div class="d-inline-block text-50">{{{ Yearbirth | }}}{{#if: {{{ Yeardeath | }}}
|&nbsp;-&nbsp;{{{ Yeardeath | }}}
|&nbsp;&nbsp;{{{ Yeardeath | }}}
|
|
}}</div>
}}</div>
Line 55: Line 56:
|File:Noimagefound.jpg  
|File:Noimagefound.jpg  
|{{filepath:Teaching_Mudra_2_reduced_opacity.png|300}}
|{{filepath:Teaching_Mudra_2_reduced_opacity.png|300}}
|{{filepath:{{#titleparts:{{PAGENAME:{{{ FirstImage | }}}}}}}|500}}
|{{filepath:{{#titleparts:{{PAGENAME:{{{ FirstImage | }}}}} }}|500}}
}}
}}
| {{filepath:Teaching_Mudra_2_reduced_opacity.png|300}}
| {{filepath:Teaching_Mudra_2_reduced_opacity.png|300}}
Line 63: Line 64:
|File:Noimagefound.jpg  
|File:Noimagefound.jpg  
|{{filepath:Teaching_Mudra_2_reduced_opacity.png|300}}
|{{filepath:Teaching_Mudra_2_reduced_opacity.png|300}}
|{{filepath:{{#titleparts:{{PAGENAME:{{{ FirstImage | }}}}}}}}}
|{{filepath:{{#titleparts:{{PAGENAME:{{{ FirstImage | }}}}} }} }}
}}
}}
| {{filepath:Teaching_Mudra_2_reduced_opacity.png|300}}
| {{filepath:Teaching_Mudra_2_reduced_opacity.png|300}}
Line 88: Line 89:
|@@@
|@@@
|{{#widget:PersonGallery
|{{#widget:PersonGallery
|anchorsrc={{filepath:{{#titleparts:{{PAGENAME:@@@}}}}|nowiki}}
|anchorsrc={{filepath:{{#titleparts:{{PAGENAME:@@@}} }}|nowiki}}
|src={{filepath:{{#titleparts:{{PAGENAME:@@@}}}}|50}}
|src={{filepath:{{#titleparts:{{PAGENAME:@@@}} }}|50}}
|height=50px !important
|height=50px !important
|imgclasses=m-1
|imgclasses=m-1
Line 97: Line 98:
</div>
</div>
</div>
</div>
<div class="col-lg-8 text-article">  
<div class="col-lg-8 text-article">{{#if:{{{ BioTib | }}}{{{ GyatsaBioTib | }}}|{{I18n
|en={{#if: {{{ TolExcerpt | }}}
{{#tag:tabber | {{#arraymap:{{#if: {{{ Description | }}} | Description = {{{ Description | }}} | }} %%% {{#if: {{{ TolExcerpt | }}} | Excerpt from Treasury of Lives = {{{ TolExcerpt | }}} <div class="text-right link-no-border pt-3">... read more at [[File:TOLlogo.png|x45px|link={{{ TolLinkRaw | }}}|class=px-3 py-1 grey-hoverlay|The Treasury of Lives]]</div> | }} %%% {{#if: {{{ BnwShortPersonBio | }}}{{{ Bio | }}}{{{ BiographicalInfo | }}} | Description = {{#if: {{{ BnwShortPersonBio | }}} | {{{ BnwShortPersonBio | }}} | {{#if: {{{ Bio | }}} | {{{ Bio | }}} | {{#if: {{{ BiographicalInfo | }}} | {{{ BiographicalInfo | }}} | }} }} }} | }} %%%  {{#if: {{{ BioTib | }}} | <span class="text-120">རྣམ་ཐར་སྙིང་བསྡུས།</span> = {{{ BioTib | }}} | }} %%%  {{#if: {{{ GyatsaBioTib | }}} | <span class="text-120">གཏེར་སྟོན་བརྒྱ་རྩའི་རྣམ་ཐར</span> = {{{ GyatsaBioTib | }}} | }}
|{{{ TolExcerpt | }}}
|%%%
<div class="text-right link-no-border pt-3">... read more at [[File:TOLlogo.png|x45px|link={{{ TolLinkRaw | }}}|class=px-3 py-1 grey-hoverlay|The Treasury of Lives]]</div>
|{{#if: {{{ BnwShortPersonBio | }}}
| {{{ BnwShortPersonBio | }}}
| {{#if: {{{ Bio | }}}
| {{{ Bio | }}}
| {{#if: {{{ BiographicalInfo | }}}  
| {{{ BiographicalInfo | }}}
|
}}
}}
}}
}}
|bo={{#if: {{{ BioTib | }}}
|{{{ BioTib | }}}
|{{#if: {{{ GyatsaBioTib | }}}
|{{{ GyatsaBioTib | }}}
|
}}
}}
}}|{{#if: {{{ TolExcerpt | }}}  
|{{{ TolExcerpt | }}}
<div class="text-right link-no-border pt-3">... read more at [[File:TOLlogo.png|x45px|link={{{ TolLinkRaw | }}}|class=px-3 py-1 grey-hoverlay|The Treasury of Lives]]</div>
|{{#if: {{{ BnwShortPersonBio | }}}  
| {{{ BnwShortPersonBio | }}}
| {{#if: {{{ Bio | }}}  
| {{{ Bio | }}}  
| {{#if: {{{ BiographicalInfo | }}}  
| {{{ BiographicalInfo | }}}
|
}}
}}
}}
}}
}}
</div>
</div><!--
 
=== NAMES & CONNECTIONS ===
 
Alternate names, categories, translation languages, and lineage
relationships, in one quiet band between the biography and the works.
 
Alternate names lead the band. They sat inline under the page title at first,
but at twelve names for a figure like Jamgon Kongtrul that crowded the
header, and it split identity information across two places for layout
reasons rather than editorial ones. As the first row here they read as one
more attribute of the subject, alongside the categories and relationships.
Capped at 6, a little higher than the relationship rows, since names are
short and wrap several to a line.
 
These are built from the printouts this template already receives, rather
than from separate queries on the calling wiki. That matters for two reasons.
The relationship properties live here on Commons and are only copied to the
consuming wiki by SetRemoteValues, so reading them from the parameters avoids
depending on that import being current. And it removes six local ask queries
per page view, since the values arrive in the remote fetch that already runs.
 
Every row renders only when it has content, so a person with a single
category gets one short line while a figure at the centre of a lineage gets a
full block, from the same markup. The band disappears entirely when there is
nothing to show rather than leaving an empty frame.
 
Long lists cap at 8 with a "+N more" toggle. See .tws-capped in tws.js.
 
Values arrive comma-joined from the remote query, so every arraymap here
splits on comma.
-->{{#if: {{{ AltNamesTib | }}}{{{ AltNamesWylie | }}}{{{ AltNamesOther | }}}{{{ PersonType | }}}{{{ Languagetranslation | }}}{{{ EmanationOf | }}}{{{ Studentof | }}}{{{ Teacherof | }}}
|<div class="person-connections my-5 shadow-sm">{{#if: {{{ AltNamesTib | }}}{{{ AltNamesWylie | }}}{{{ AltNamesOther | }}}
|<div class="person-connections-row"><div class="person-connections-label">Also known as</div><div class="person-connections-items tws-capped" data-cap="6" data-items=".person-connections-item" data-noun="names"><!--
Tibetan is emitted separately from the transliterated names so it can carry
its own class. At a shared font size the Tibetan script renders noticeably
smaller than Latin text at the same nominal size, so it is scaled up to match
the optical size of the Wylie and other names beside it.
-->{{#arraymap:{{{ AltNamesTib | }}}
|,
|@@@
|<span class="person-connections-item person-alt-name-tib">@@@</span>
|
}}{{#arraymap:{{{ AltNamesWylie | }}},{{{ AltNamesOther | }}}
|,
|@@@
|<span class="person-connections-item">@@@</span>
|
}}</div></div>
|
}}{{#if: {{{ PersonType | }}}
|<div class="person-connections-row"><div class="person-connections-label">Categories</div><div class="person-connections-items">{{#arraymap:{{{ PersonType | }}}
|,
|@@@
|<span class="person-connections-item">[[:Category:@@@|@@@]]</span>
|
}}</div></div>
|
}}{{#if: {{{ Languagetranslation | }}}
|<div class="person-connections-row"><div class="person-connections-label">Translates from</div><div class="person-connections-items">{{#arraymap:{{{ Languagetranslation | }}}
|,
|@@@
|<span class="person-connections-item">[[:Category:Translators of @@@|@@@]]</span>
|
}}</div></div>
|
}}{{#if: {{{ EmanationOf | }}}
|<div class="person-connections-row"><div class="person-connections-label">Emanation of</div><div class="person-connections-items">{{#arraymap:{{{ EmanationOf | }}}
|,
|@@@
|<span class="person-connections-item">[[@@@]]</span>
|
}}</div></div>
|
}}{{#if: {{{ Studentof | }}}
|<div class="person-connections-row"><div class="person-connections-label">Student of</div><div class="person-connections-items tws-capped" data-cap="8" data-items=".person-connections-item" data-noun="teachers">{{#arraymap:{{{ Studentof | }}}
|,
|@@@
|@@@
|<span class="person-connections-item">[[@@@]]</span>
|
}}</div></div>
|
}}{{#if: {{{ Teacherof | }}}
|<div class="person-connections-row"><div class="person-connections-label">Teacher of</div><div class="person-connections-items tws-capped" data-cap="8" data-items=".person-connections-item" data-noun="students">{{#arraymap:{{{ Teacherof | }}}
|,
|@@@
|@@@
|{{!}}-{{!}}
|<span class="person-connections-item">[[@@@]]</span>
}} }}
|
 
}}</div></div>
|
}}
</div>
</div>
</div></includeonly>
|
}}</includeonly>

Latest revision as of 17:45, 11 September 2026