Template talk:Auxiliary Table of Contents

From Wikisource
Latest comment: 4 years ago by Billinghurst in topic Noting use with template:dtpl
Jump to navigation Jump to search

Default to full width[edit]

All 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)Reply

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.)
  1. The current default makes the non-original nature of the synthesised content distinct from "per scan" items.
  2. 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)Reply

Responsive design[edit]

Current unresponsive design (iBooks on iPhone)
Responsive design made with HTML and wikicode currently on Reflections on War and Death. Some minor tweaks to appearance.

Having 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)Reply

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}}}'''&emsp;{{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)Reply

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.

  1. 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.
  2. 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.
  3. 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)Reply

Noting use with template:dtpl[edit]

When 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)Reply