Template:LibraryItem: Difference between revisions
From Bodhicitta
(VSCode edit) |
(VSCode edit) |
||
| Line 142: | Line 142: | ||
.mw-file-source href the lightbox reads the full-size URL from. | .mw-file-source href the lightbox reads the full-size URL from. | ||
See the .tws-lightbox handler in tws.js. | See the .tws-lightbox handler in tws.js. | ||
-->[[File:{{PAGENAME:{{{ FrontCoverImg | }}}}}| | |||
300px, not 500px. MediaWiki puts the ORIGINAL file in the srcset once the | |||
1.5x or 2x variant would exceed the image's native width, and most covers | |||
here are under 750px wide — so a 500px request made every Retina display | |||
download the full file on page load, up to 3MB. The lightbox fetches the | |||
original on click, which is the point of it. The slot is col-md-3, so 300px | |||
is ample anyway. | |||
-->[[File:{{PAGENAME:{{{ FrontCoverImg | }}}}}|300px|class=w-100 h-auto rounded tsdwiki-depth-1 mb-4]]</div> | |||
<div class="col-md-9"> | <div class="col-md-9"> | ||
|{{GetItemData | |{{GetItemData | ||
| Line 148: | Line 155: | ||
|intro=<div class="col-md-3 pt-4 tws-lightbox"> | |intro=<div class="col-md-3 pt-4 tws-lightbox"> | ||
|outro=</div><div class="col-md-9"> | |outro=</div><div class="col-md-9"> | ||
|map={{lb}}{{lb}}@@@{{!}} | |map={{lb}}{{lb}}@@@{{!}}300px{{!}}class=w-100 h-auto rounded tsdwiki-depth-1 mb-4{{rb}}{{rb}} | ||
|default=<div class="col-12"> | |default=<div class="col-12"> | ||
}} | }} | ||