Template talk:Auxiliary Table of Contents
Default to full width
editAll other auxillary content has full width. I think this looks silly when seen between full width headers and footers. Can we default width to 100% please?
Hesperian 00:11, 29 July 2016 (UTC)
- Bear in mind the content (currently left-aligned) is going to look lonely in a huge box unless some effort is taken to block-centre content as well (in which case the argument pretty much comes full-circle.)
- The current default makes the non-original nature of the synthesised content distinct from "per scan" items.
- There is already the possibility of setting
|width=100%
without second-guessing the layouts settled upon by prior editors (who may not be around to defend their decisions.)
- If you are sure you want to proceed I offer no further objections. AuFCL (talk) 03:53, 29 July 2016 (UTC)
Responsive design
editHaving a a fixed width, the TOC currently generated by the template is not responsive and it's scaled together with the text content, see the screenshots above.
This should fix it, without any change to appearance if not responsiveness (and it makes use only of one table instead of two):
<div style="max-width:{{{width|400px}}}; width: 100%; margin-left:auto; margin-right:auto; box-sizing: border-box" class="subheadertemplate">
{| style="width:100%"
!{{{title|Chapters}}}
|{{table style|ar}}|{{smaller|{{{comment|(not individually listed)}}}}}
|-
|}
<poem style="padding-right:2em; padding-left:2em">{{{text|{{{1|}}}}}}</poem></div>
</div>
I'd personally make a few minor other tweaks to improve appearance, but we can see them later. —Esponenziale (talk) 22:37, 28 August 2018 (UTC). Edited 08:43, 29 August 2018 (UTC)
This is the modification I would consider to improve appearance (green background extends to full width, as the other div using subhadertemplate) and to simplify code:
<div class="subheadertemplate">{{center block|width={{{width|}}}|
'''{{{title|Chapters}}}''' {{smaller|{{{comment|(not individually listed)}}}}}
{{{text|{{{1|}}}}}}
}}
</div>
It goes without saying that this design is responsive. Let me know if there's anyone not agreeing on this. —Esponenziale (talk) 11:36, 2 September 2018 (UTC)
Following discussion at Wikisource:Scriptorium#Aux_TOS_now_full-width? I'd like to point out the three (minor) reasons for extending the green background to full width.
- It would allow not to introduce any left and right padding around the text to separate it from the border. This padding ends up taking up room without reason in ePubs, where the green background and border are not applied since class "subheadertemplate" is not exported there.
- Template:Center block doesn't support a class argument, therefore, in order to apply the green background and border while keeping the green box centered, we would have to give up to some style parametrization: either we use the block center template duplicating there (in its style argument) the style of class subheadertemplate, or we use a div with class subheadertemplate duplicating there the style of block center template.
- All other templates used for the navigation of the subpages have class subheadertemplate and full width, therefore it seems pretty ok to me to render this template at full width as well.
I recognize that these are minor arguments and I'm ready to give up if anyone disagrees. —Esponenziale (talk) 13:58, 10 September 2018 (UTC)
Noting use with template:dtpl
editWhen one is wrapping template:dtpl that template utilises a forced white template by default, to override that you will need apply the formatting
textbackground=#E6F2E6;
to that template. — billinghurst sDrewth 11:54, 7 April 2020 (UTC)
Replace "Chapters" by "Contents" as default title?
edit"Chapters" only works for, well, works that do have chapters, meaning for example not poetry collections, while "Contents" is more general and fits with everything (after all, it's called "Auxiliary Table of Contents", not "Auxiliary Chapter List"). Thoughts? — Alien 3
3 3 12:41, 19 October 2024 (UTC)