Template:TopicPage: Difference between revisions
(VSCode edit) |
(VSCode edit) |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 20: | Line 20: | ||
| | | | ||
}} | }} | ||
}} | }}<!-- | ||
< | === BIBLIOGRAPHIC VIEW === | ||
Full width, no sidebar. | |||
The sidebar here held only a table of contents jumping between five class | |||
headings. Measured across the 1,108 topics actually in use, the median topic | |||
carries SEVEN items and 96% carry fifteen or fewer — so on almost every topic | |||
page that rail helped a reader scroll past a single screen of content, and on | |||
the 39% of topics with five items or fewer it listed headings for sections | |||
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. | |||
< | Editorial Content is pulled out ahead of it rather than left to the sort. | ||
SMW sorts Class alphabetically, which would bury our own writing between | |||
Dissertations and Multimedia; it belongs first on a topic page. Both parts | |||
render headless, so they still read as a single list. | |||
--> |<div class="filterableContent">{{TopicBiblioSection | |||
| | |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!'' | |||
}} | |||
</div> | </div> | ||
</div>{{#set: | </div>{{#set: | ||
|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. |