Template:TopicPage: Difference between revisions

From Bodhicitta
(VSCode edit)
(VSCode edit)
 
(5 intermediate revisions by the same user not shown)
Line 20: Line 20:
|
|
}}
}}
}}
}}<!--
<div class="row mt-5">
=== BIBLIOGRAPHIC VIEW ===
<div class="col-md-3 order-md-last">
 
<div class="sidebar position-sticky" style="top: 100px;">
Full width, no sidebar.
<div>__TOC__</div>
 
</div>
The sidebar here held only a table of contents jumping between five class
</div>
headings. Measured across the 1,108 topics actually in use, the median topic
<div class="col-md-9">
carries SEVEN items and 96% carry fifteen or fewer — so on almost every topic
{{#if:{{#ask:[[TermTopics::{{#titleparts:{{SUBPAGENAME}}}}||{{ucfirst:{{#titleparts:{{SUBPAGENAME}}}}}}]]}}
page that rail helped a reader scroll past a single screen of content, and on
|{{#widget:filterInput}}
the 39% of topics with five items or fewer it listed headings for sections
|''No pages tagged with this topic!''
that were empty.
}}
 
Items are shown as citations rather than tiles. Citation is present on 99% of
tagged items and already carries author, title, publisher and year in one
formatted line, which is what someone scanning a topic bibliography actually
wants. A tile shows a cover image and a truncated description instead.


Grouping is deliberate. A single flat list is used by default, because with
seven items five class headings create more structure than content. Sections
appear only once the topic is large enough for them to help — see the
threshold below, which is set so it keeps working as topic assignments grow.
-->
<div class="row mt-4">
<div class="col-12">{{#if:{{#ask:[[TermTopics::{{#titleparts:{{SUBPAGENAME}}}}||{{ucfirst:{{#titleparts:{{SUBPAGENAME}}}}}}]]}}
|<div class="topic-biblio-controls">
<div class="topic-biblio-filter">{{#widget:filterInput|placeholder=Filter {{#ask:[[TermTopics::{{#titleparts:{{SUBPAGENAME}}}}||{{ucfirst:{{#titleparts:{{SUBPAGENAME}}}}}}]]|format=count}} entries...}}</div><!--
Class pills. Each is a plain filter link handled by tws.js, keyed on the
data-class attribute the rows carry. Only classes that actually occur on this
topic get a pill, so a topic with no dissertations shows no dissertations
filter.
--> <div class="topic-biblio-pills"><!--
No newline between this container and its pills. A blank-ish line here makes
MediaWiki wrap the whole run in a <p>, which becomes the only flex child and
leaves the pills laid out inline with their margins collapsed.
--><span class="topic-biblio-pill is-active" data-filter-class="">All <span class="rel-count">{{#ask:[[TermTopics::{{#titleparts:{{SUBPAGENAME}}}}||{{ucfirst:{{#titleparts:{{SUBPAGENAME}}}}}}]]|format=count}}</span></span>{{#arraymap:Editorial Content;Books;Articles;Classical Works;Multimedia;Dissertations;Tibetan Publications
|;
|@@@
|{{#ifexpr:{{#ask:[[Class::@@@]][[TermTopics::{{#titleparts:{{SUBPAGENAME}}}}||{{ucfirst:{{#titleparts:{{SUBPAGENAME}}}}}}]]|format=count}}>0
|<span class="topic-biblio-pill" data-filter-class="@@@">@@@ <span class="rel-count">{{#ask:[[Class::@@@]][[TermTopics::{{#titleparts:{{SUBPAGENAME}}}}||{{ucfirst:{{#titleparts:{{SUBPAGENAME}}}}}}]]|format=count}}</span></span>
|
}}
|
}}
</div>
</div>{{#ifexpr:{{#ask:[[TermTopics::{{#titleparts:{{SUBPAGENAME}}}}||{{ucfirst:{{#titleparts:{{SUBPAGENAME}}}}}}]]|format=count}}>{{{ groupThreshold | 25 }}}<!--
LARGE TOPIC — group by class, so a long bibliography stays navigable.
Each section renders only if it has entries.
--> |<div class="filterableContent">{{#arraymap:Editorial Content;Books;Articles;Classical Works;Multimedia;Dissertations;Tibetan Publications
|;
|@@@
|{{TopicBiblioSection
|heading=@@@
|query=[[Class::@@@]][[TermTopics::{{#titleparts:{{SUBPAGENAME}}}}||{{ucfirst:{{#titleparts:{{SUBPAGENAME}}}}}}]]
}}
|
}}</div>
<!--
SMALL TOPIC — one flat list, sorted so classes still cluster together.


<h3 class="pt-0">Editorial Content</h3>
Editorial Content is pulled out ahead of it rather than left to the sort.
{{TileQuery
SMW sorts Class alphabetically, which would bury our own writing between
|query=[[Category:Editorial Content]][[TermTopics::{{#titleparts:{{SUBPAGENAME}}}}||{{ucfirst:{{#titleparts:{{SUBPAGENAME}}}}}}]]
Dissertations and Multimedia; it belongs first on a topic page. Both parts
|classes=col-lg-6 mb-4 filterable
render headless, so they still read as a single list.
|intro=<div class="row filterableContent">
--> |<div class="filterableContent">{{TopicBiblioSection
|outro=</div>
|query=[[Class::Editorial Content]][[TermTopics::{{#titleparts:{{SUBPAGENAME}}}}||{{ucfirst:{{#titleparts:{{SUBPAGENAME}}}}}}]]
|sort=Citation
|order=asc
}}{{TopicBiblioSection
|query=[[Class::!Editorial Content]][[TermTopics::{{#titleparts:{{SUBPAGENAME}}}}||{{ucfirst:{{#titleparts:{{SUBPAGENAME}}}}}}]]
}}</div>
}}
}}
 
|''No pages tagged with this topic!''
{{TopicQuery|Books}}
}}
{{TopicQuery|Dissertations}}
{{TopicQuery|Articles}}
{{TopicQuery|Classical Works}}
{{TopicQuery|Multimedia}}
</div>
</div>
</div>{{#set:
</div>{{#set:
|CountEditorialContent={{TopicCount|Editorial Content}}
|CountBooks={{TopicCount|Books}}
|CountDissertations={{TopicCount|Dissertations}}
|CountArticles={{TopicCount|Articles}}
|CountClassicalWorks={{TopicCount|Classical Works}}
|CountMultimedia={{TopicCount|Multimedia}}
|AvailableTopic={{SUBPAGENAME}}
|AvailableTopic={{SUBPAGENAME}}
|Description=Explore a dedicated research hub for {{SUBPAGENAME}}. Features foundational definitions, scriptural references, and a curated index of all related classical texts, published works, and multimedia teachings.
|Description=Explore a dedicated research hub for {{SUBPAGENAME}}. Features foundational definitions, scriptural references, and a curated index of all related classical texts, published works, and multimedia teachings.
Line 66: Line 106:
|FrontCoverImg=File:Shantideva-Eric-reduced.jpg
|FrontCoverImg=File:Shantideva-Eric-reduced.jpg
}}[[Category:Topic Pages]]  
}}[[Category:Topic Pages]]  
</includeonly><noinclude>{{TemplateTag}}</noinclude>
</includeonly><noinclude>{{TemplateTag}}
 
Topic pages present a bibliography, so entries are listed as citations rather
than tiles. <code>Citation</code> is set on 99% of tagged items and already
carries author, title, publisher and year in one formatted line.
 
There is no sidebar. Measured across the 1,108 topics in use, the median topic
carries seven items and 96% carry fifteen or fewer, so the table-of-contents rail
that used to sit here helped a reader scroll past a single screen — and on the
39% of topics with five items or fewer it listed headings for empty sections.
 
== Parameters ==
 
{| class="wikitable"
! Parameter !! Description
|-
| <code>description</code> || Intro text, shown when the topic has no matching Key Terms entry.
|-
| <code>groupThreshold</code> || Item count above which the list splits into per-class sections. Defaults to 25.
|}
</noinclude>

Latest revision as of 13:31, 25 August 2026


Topic pages present a bibliography, so entries are listed as citations rather than tiles. Citation is set on 99% of tagged items and already carries author, title, publisher and year in one formatted line.

There is no sidebar. Measured across the 1,108 topics in use, the median topic carries seven items and 96% carry fifteen or fewer, so the table-of-contents rail that used to sit here helped a reader scroll past a single screen — and on the 39% of topics with five items or fewer it listed headings for empty sections.

Parameters

Parameter Description
description Intro text, shown when the topic has no matching Key Terms entry.
groupThreshold Item count above which the list splits into per-class sections. Defaults to 25.