This is the talk page for discussing improvements to the Box-header template. |
|
Archives: Index, 1Auto-archiving period: 90 days |
Portals | ||||||||||
|
Note: This page contains NOEDITSECTION and NOTOC, and is therefore in general not suitable for use in articles. (See Template talk:Box-header/Archive 1#Fixes for an explanation on how to circumnavigate this and other problems.)
For an explanation on how to use this template, please see Wikipedia:Portal.
Please add a
#REDIRECT [[Template talk:Box-header]]
to the talk pages of both newly created templates.
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Change: Add the ability to customise colours for each border around the box.
Description: This is seen (by use of editing a copy of this template) on this page Portal:Canada/Wikiprojects/box-header/2 and uses a different coloured border for under the title. Also see Portal:Daddy Yankee/box-header/2 for another box-header that cannot be created from this template for the same reasons. I tried to accomplish this using this template, but from my testing, it is not at the moment possible. Dreamy Jazz (talk) 15:04, 4 June 2018 (UTC)
|titleborder=
for the title border colour, and |border=
for other borders' colour, or all borders if |titleborder=
isn't specified. (Though the documentation here could do with some improvement, I had to look at the source code to find that out) Evad37 [talk] 01:14, 5 June 2018 (UTC)((Box-header
| title=Foo
| noedit=yes
| titleborder=#ff0000
| border=#0000ff
))
Bar
((Box-footer))
Bar
((Box-header
| title=Foo
| noedit=yes
| titleborder=#ff0000
| border=#0000ff; border-top: 1px solid #ff0000
))
Bar
((Box-footer))
Bar
((Box-header
| title=Foo
| noedit=yes
| titleborder=#0000ff
| border=#0000ff; border-top: 1px solid #ff0000
))
Bar
((Box-footer))
Bar
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
The line:
padding-top: (({padding-top|.3em;))}
needs to be changed to:
padding-top: (({padding-top|.3em))};
this ensures the semi-colon is always included. At the moment it not being included will cause errors when a custom padding-top is provided.
See example:
((Box-header
| padding-top=1em
))
((Box-footer))
produces in the source:
... padding-top: 1em-moz-border-radius: 0; ...
Thanks, Dreamy Jazz (talk) 21:15, 5 June 2018 (UTC)
In this version of the Earth sciences portal, a couple of things aren't working. The edit link at the top of the box reads [((fullurl:(({2))}|action=edit)) edit], and in the first news item there is the string ((convert|adj=on|2|-|5|m)). RockMagnetist(talk) 15:18, 6 June 2018 (UTC)
(({2))}
in Portal:Earth sciences/box-header became the literal text (({2))} which was then passed into Template:Box-header's |editpage=
parameter. These 2 edits [1][2] fixed it by allowing |noedit=yes
to be passed on to Template:Box-header for portal components not using subpages - Evad37 [talk] 00:12, 7 June 2018 (UTC)((Transclude selected current events))
template, or rather its module, which now properly expands any templates found in the items it transcludes - Evad37 [talk] 02:40, 7 June 2018 (UTC)
Should this template be switched to use Module:Box-header (i.e. the code currently at Template:Box-header/lua)? It would take the same parameters and produce the same output, but would have the advantage of checking colour combinations for accessibility, per MOS:COLOUR, and reporting uses of inaccessible colours in Category:Box-header with insufficient title contrast and Category:Box-header with insufficient body contrast. It would also mean that this template and ((Box-header colour)) would be using the same code, reducing redundancy and allowing any future improvements to be made to both templates. - Evad37 [talk] 07:19, 13 August 2018 (UTC)
I suggest that the magic words NOTOC and NOEDITSECTION are removed from output of this module to allow usage of the template on the pages, where table of contents and edit links are needed. For example: subpages of portals, like Portal:United Kingdom/Featured picture, and talk pages of portals. The overwhelming majority of usages of ((Box-header)) are in portals, and to that end the magic words were added to template ((Portal styles)), which is transcluded to all portal pages via ((Portal maintenance status)). Ping wbm1058, who objected to this change. —andrybak (talk) 12:57, 27 February 2021 (UTC)
Template talk:Box-header/Archive 1 §Accessibility Issue
|
---|
I recently made a change which AzaToth then reverted. I'd like to discuss options for how it might be possible to incorporate this as I think it is important. Basically, I added <h2> - </h2> tags around the (({title))} parameter. These create a 'level 2 header', such as is automatically created by '==' in wikimarkup. The reason for including such is that these headers are used by screen-reader software for the blind to navigate around to different sections. Without them blind users essentially have to listen to the entire portal page rather than just the particular section they are interested in at the moment. The problem is that Wikipedia also uses these headers to determine where to place automatic 'edit' links for users who have that option selected in their preferences. I assumed that most portals use __NOEDITSECTION__, the way I do at Portal:Featured content, to suppress the automatic 'edit' links, but apparently that is not the case. If we add __NOEDITSECTION__ to this template would that suppress them for just this or all pages the template appears on? Do people actually use automatic edit links on existing portals? Could we just remove the manually inserted edit link in this template and use the automatic one instead (which would have the benefit of not showing them for users who have requested that option)? Et cetera. I have already addressed this issue by adjusting things on the portals I maintain, but I think it would be a good feature to incorporate on all of them if there is some way to work out this 'edit link' issue. --CBDunkerson 19:00, 20 March 2006 (UTC)
Sorry I didn't notice those issues (it figures the three portals I looked at would have 'NOTOC', 'NOEDITSECTION', and black fonts) and thanks for all your efforts in cleaning them up. --CBDunkerson 21:05, 20 March 2006 (UTC)
|
__NOTOC____NOEDITSECTION__
to them.the "section 1" in the TOC has no heading – what is "section 1" and why is it there?– this is because on page Wikipedia:WikiProject Merge, the first usage of ((Box-header)) has
|title=[[File:PMG logo.svg|85px|WikiProject Merge]]
, and images are stripped away when generating a table of contents. —andrybak (talk) 14:19, 27 September 2021 (UTC)