- Welcome to the Kancolle Wiki!
- If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord
Difference between revisions of "Template:Event Banner Fade"
Jump to navigation
Jump to search
(New placeholders + rng) |
m (bugfix + doc) |
||
Line 1: | Line 1: | ||
− | <includeonly>{{#vardefine:ebf_ph| {{#if:{{{incoming|}}}{{{ph|}}}{{#ifeq:{{{File1|}}}{{{File2|}}}||{{#ifeq:{{{1|}}}||true|}}|}}|{{#if:{{{ph|}}}|{{{ph}}}| {{#vardefine:rng_roll|{{Random number|101}}}} {{#ifeq:{{#var:rng_roll}}|101|4|{{#ifexpr: {{#var:rng_roll}} > 90 |3|{{#ifexpr: {{#var:rng_roll}} > 50 |2|1}}}}}} }} |false}} }}<span style="display:inline;"><span style="position:absolute;" class=fadein>[[File:{{#ifeq:{{#var:ebf_ph}}|false| {{#if:{{{File2|}}}|{{{File2|}}}|{{{1|}}} Banner{{#if:{{{suffix|}}}| {{{suffix|}}}|}} Alt.{{#ifeq:{{{jpg|}}}|true|jpg|png}} }}|Event Banner Placeholder {{#var:ebf_ph}} Alt.png }}|link={{{link|{{#ifeq:{{{1|}}}||Events|{{{1|}}}}} }}}{{#if:{{{size|}}}| {{!}}{{{size}}} }}{{#if:{{{caption| {{{link| {{{1|}}} }}} }}}|{{!}}{{{caption|{{{link| {{{1|}}} }}} }}} }}]]</span>[[File:{{#ifeq:{{#var:ebf_ph}}|false| {{#if:{{{File1|}}}|{{{File1|}}}|{{{1|}}} Banner{{#if:{{{suffix|}}}| {{{suffix|}}}|}}.{{#ifeq:{{{jpg|}}}|true|jpg|png}} }} | Event Banner Placeholder {{#var:ebf_ph}}.png }}|link={{{link|{{#ifeq:{{{1|}}}||Events|{{{1|}}}}} }}}{{#if:{{{size|}}}| {{!}}{{{size}}} }}]]</span></includeonly><noinclude> | + | <includeonly>{{#vardefine:ebf_ph| {{#if:{{{incoming|}}}{{{ph|}}}{{#ifeq:{{{File1|}}}{{{File2|}}}||{{#ifeq:{{{1|}}}||true|}}|}}|{{#if:{{{ph|}}}|{{{ph}}}| {{#vardefine:rng_roll|{{#expr:{{Random number|101}}+1}}}} {{#ifeq:{{#var:rng_roll}}|101|4|{{#ifexpr: {{#var:rng_roll}} > 90 |3|{{#ifexpr: {{#var:rng_roll}} > 50 |2|1}}}}}} }} |false}} }}<span style="display:inline;"><span style="position:absolute;" class=fadein>[[File:{{#ifeq:{{#var:ebf_ph}}|false| {{#if:{{{File2|}}}|{{{File2|}}}|{{{1|}}} Banner{{#if:{{{suffix|}}}| {{{suffix|}}}|}} Alt.{{#ifeq:{{{jpg|}}}|true|jpg|png}} }}|Event Banner Placeholder {{#var:ebf_ph}} Alt.png }}|link={{{link|{{#ifeq:{{{1|}}}||Events|{{{1|}}}}} }}}{{#if:{{{size|}}}| {{!}}{{{size}}} }}{{#if:{{{caption| {{{link| {{{1|}}} }}} }}}|{{!}}{{{caption|{{{link| {{{1|}}} }}} }}} }}]]</span>[[File:{{#ifeq:{{#var:ebf_ph}}|false| {{#if:{{{File1|}}}|{{{File1|}}}|{{{1|}}} Banner{{#if:{{{suffix|}}}| {{{suffix|}}}|}}.{{#ifeq:{{{jpg|}}}|true|jpg|png}} }} | Event Banner Placeholder {{#var:ebf_ph}}.png }}|link={{{link|{{#ifeq:{{{1|}}}||Events|{{{1|}}}}} }}}{{#if:{{{size|}}}| {{!}}{{{size}}} }}]]</span></includeonly><noinclude> |
A template for event banners to change image on-hover using the <code>.fadein</code> css, without having to make a new class every time. | A template for event banners to change image on-hover using the <code>.fadein</code> css, without having to make a new class every time. | ||
<br>Also allows for other new options, like changing the banner size. | <br>Also allows for other new options, like changing the banner size. | ||
Line 37: | Line 37: | ||
==Placeholders== | ==Placeholders== | ||
− | If not specified, one is chosen at random (at different weights) | + | If not specified, one is chosen at random (at different weights) each hard refresh (page edit/purge). |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | !#!!credit!!example!!Main Image!!Hover Image!!test | + | !#!!credit!!% to<br>appear!!example!!Main Image!!Hover Image!!test |
|- | |- | ||
− | |1||'''[[User:Rambern4|Rambern4]]''' | + | |1||'''[[User:Rambern4|Rambern4]]'''||50/101 |
|style="text-align:center;"|{{ {{PAGENAME}}|size=400px|ph=1}} | |style="text-align:center;"|{{ {{PAGENAME}}|size=400px|ph=1}} | ||
|[[File:Event Banner Placeholder 1.png|400px]]||N/A | |[[File:Event Banner Placeholder 1.png|400px]]||N/A | ||
|- | |- | ||
− | |2||'''Ben_5917'''<br>''assistance:'' '''[[User:Grunilg|Grunilg]]''' | + | |2||'''Ben_5917'''<br>''assistance:'' '''[[User:Grunilg|Grunilg]]'''||40/101 |
|style="text-align:center;"|{{ {{PAGENAME}}|size=400px|ph=2}} | |style="text-align:center;"|{{ {{PAGENAME}}|size=400px|ph=2}} | ||
|[[File:Event Banner Placeholder 2.png|400px]]||[[File:Event Banner Placeholder 2 Alt.png|400px]] | |[[File:Event Banner Placeholder 2.png|400px]]||[[File:Event Banner Placeholder 2 Alt.png|400px]] | ||
|- | |- | ||
− | |3||'''Ben_5917'''<br>''assistance:'' '''[[User:Grunilg|Grunilg]]''' | + | |3||'''Ben_5917'''<br>''assistance:'' '''[[User:Grunilg|Grunilg]]'''||10/101 |
|style="text-align:center;"|{{ {{PAGENAME}}|size=400px|ph=3}} | |style="text-align:center;"|{{ {{PAGENAME}}|size=400px|ph=3}} | ||
|(redirects to #2)<br>[[File:Event Banner Placeholder 3.png|400px]]||[[File:Event Banner Placeholder 3 Alt.png|400px]] | |(redirects to #2)<br>[[File:Event Banner Placeholder 3.png|400px]]||[[File:Event Banner Placeholder 3 Alt.png|400px]] | ||
|- | |- | ||
− | |4||'''Ben_5917''' | + | |4||'''Ben_5917'''||1/101 |
|style="text-align:center;"|{{ {{PAGENAME}}|size=400px|ph=4}} | |style="text-align:center;"|{{ {{PAGENAME}}|size=400px|ph=4}} | ||
|[[File:Event Banner Placeholder 4.png|400px]]||N/A | |[[File:Event Banner Placeholder 4.png|400px]]||N/A |
Latest revision as of 09:16, 21 July 2023
A template for event banners to change image on-hover using the .fadein
css, without having to make a new class every time.
Also allows for other new options, like changing the banner size.
{{Event Banner Fade|size=400px}}
{{Event Banner Fade|Incoming 2099 Event|incoming=true|size=400px}}
{{Event Banner Fade|Summer 2013 Event|jpg=true|caption=Southern Waters Assault Reconnaissance!|size=400px}}
{{Event Banner Fade|Summer 2013 Event|jpg=true|caption=Southern Waters Assault Reconnaissance!}}
{{Event Banner Fade|Fall 2020 Event|suffix=EO|caption=Escort! Fleet Transport Operation|size=400px}}
{{Event Banner Fade|Fall 2020 Event|suffix=EO|caption=Escort! Fleet Transport Operation}}
{{Event Banner Fade|File1=2013SpringEventBanner.jpg|File2=2013SpringEventBannerAlt.jpg|size=400px|link=Spring 2013 Event}}
{{Event Banner Fade|File1=2013SpringEventBanner.jpg|File2=2013SpringEventBannerAlt.jpg|link=Spring 2013 Event}}
Placeholders
If not specified, one is chosen at random (at different weights) each hard refresh (page edit/purge).
# | credit | % to appear |
example | Main Image | Hover Image | test |
---|---|---|---|---|---|---|
1 | Rambern4 | 50/101 | N/A | |||
2 | Ben_5917 assistance: Grunilg |
40/101 | ||||
3 | Ben_5917 assistance: Grunilg |
10/101 | (redirects to #2) |
|||
4 | Ben_5917 | 1/101 | N/A |