Template talk:Chapters: Difference between revisions
(Created page with "== Top row background color == {| style=float:right |{{pre|<nowiki> {{table | {{tr | {{th|colspan=3|bgcolor=rgba(0,0,0,0.5)|{{hl2|4}} Chapters}} | bgcolor={{{{{game|hl2}}}|c...") |
(reply to User:popcorn.) |
||
Line 26: | Line 26: | ||
In addition, this would mean that you don't need to #switch for the game right at the beginning of the template (in which case you could also just make a template for each game's chapters), instead after the table's top row. That should decrease redundance at least a bit.<br> | In addition, this would mean that you don't need to #switch for the game right at the beginning of the template (in which case you could also just make a template for each game's chapters), instead after the table's top row. That should decrease redundance at least a bit.<br> | ||
--[[User:Popcorn|popcorn]] ([[User talk:Popcorn|talk]]) 14:38, 25 July 2023 (PDT) | --[[User:Popcorn|popcorn]] ([[User talk:Popcorn|talk]]) 14:38, 25 July 2023 (PDT) | ||
:Thanks for that edit. :) [[User:Kr0tchet|kr0tchet]] ([[User talk:Kr0tchet|talk]]) 08:34, 26 July 2023 (PDT) |
Revision as of 08:35, 26 July 2023
Top row background color
{{table | {{tr | {{th|colspan=3|bgcolor=rgba(0,0,0,0.5)|{{hl2|4}} Chapters}} | bgcolor={{{{{game|hl2}}}|col}} }} <!-- ... --> }} | |||
↓ | |||
|
Apparently you'd like to use a fitting background color for the top row for each game. Instead of hard coding it for each game, like #403305 that you used for hl2, you can - if it fits to your plans - make use of {{hl2|col}}
for that matter, or more precisely: {{{{{game}}}|col}}
. Using this, the background color adapts to the {{{game}}}. Using a second half transparent black background color, you can darken the game's color. This should work out as long as the game color is not too dark. :)
In addition, this would mean that you don't need to #switch for the game right at the beginning of the template (in which case you could also just make a template for each game's chapters), instead after the table's top row. That should decrease redundance at least a bit.
--popcorn (talk) 14:38, 25 July 2023 (PDT)