Difference between revisions of "Template:Infobox state"

From Wiki - Scioly.org
Jump to navigation Jump to search
m (State infoboxes are now responsive to screen width)
(38 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{|align="right" style="width: 275px; text-align: left; font-size: 80%;" class="wikitable"
+
{{#css:
 +
@media (max-width: 500px) {
 +
    table.infobox {
 +
        position: relative;
 +
        float: none;
 +
        left: 50%;
 +
        transform: translateX(-50%);
 +
        margin: 0;
 +
        width: auto;
 +
        width: -webkit-fit-content;
 +
        width: -moz-fit-content;
 +
        width: fit-content;
 +
    }
 +
}
 +
}}{|align="right" class="infobox"
 
|-
 
|-
! colspan="2" style="border-bottom: none;" | {{#ifexist: Image:Map of USA {{PAGENAME}}.png| [[Image:Map of USA {{PAGENAME}}.png|100px]]}}
+
! colspan="2" style="font-size: larger; text-align: center;" | '''{{PAGENAME}}'''
|-  
 
! colspan="2" style="border-top: none; font-size: larger;" | '''{{PAGENAME}} At a Glance'''
 
 
|-
 
|-
| width="100"  
+
{{#if: {{{State|}}}|
| '''Total teams''' || {{{Total teams|}}}
+
{{!}}colspan="2"{{!}}<center>[[File:{{{State|}}}.svg|200px]]</center>
 +
{{!}}-
 +
}}
 +
{{#if: {{{map|}}}{{{Member since|}}}{{{Total teams|}}}{{{B champs|}}}{{{C champs|}}}{{{States location|}}}{{{Date|}}}{{{website|}}}| {{!}}colspan="2" style="margin: 5px; background-color: lavender; text-align: center;"{{!}}'''General Information'''
 +
{{!}}-
 +
}}
 +
|style="width: 100px;"|'''Member of SO since'''
 +
|{{{Member since|}}}
 
|-
 
|-
| '''States location''' || {{{States location|}}}
+
|style="width: 100px;"|'''Total teams'''
 +
|{{{Total teams|}}}
 
|-
 
|-
| '''B Champion''' || {{{B champs|}}}
+
|style="width: 100px;"|'''[[Division B]] Champion'''
 +
|{{{B champs|}}}
 
|-
 
|-
| '''C Champion''' || {{{C champs|}}}
+
|style="width: 100px;"|'''[[Division C]] Champion'''
 +
|{{{C champs|}}}
 +
|-
 +
|style="width: 100px;"|'''State Tournament Location'''
 +
|{{{States location|}}}
 +
|-
 +
|style="width: 100px;"|'''Date'''
 +
|{{{Date|}}}
 +
|-
 +
|style="width: 100px;"|'''Website'''
 +
|{{{website|}}}
 
|-
 
|-
| '''State website''' || {{{website|}}}
 
 
|}
 
|}
<includeonly>
 
{{#if:{{{website|}}}|[[Category:State pages with website information]]|[[Category:State pages without website information]]}}
 
</includeonly>
 
 
<noinclude>
 
<noinclude>
[[Category:Templates]]
+
{{Documentation}}
[[Category:Organization Templates]]
 
 
</noinclude>
 
</noinclude>

Revision as of 01:01, 8 August 2020

Infobox state
Member of SO since
Total teams
Division B Champion
Division C Champion
State Tournament Location
Date
Website
Template documentation[view] [edit] [history] [purge]

The Infobox state template is a template used to generate an infobox for a state.

Parameters

State - the state
map - a map showing the state's location
Member since - year since the state has been a part of Science Olympiad
Total teams - the total number of teams in the state
B champs - the most recent Division B champion
C champs - the most recent Division C champion
Date - the date on which the state competition was most recently held
States location - the location where the state competition was most recently held
website - the state's website

Usage

The template should be placed at the very top of an article, with no empty line breaks before or after the template

Examples

Code Result
{{Infobox state
|Member since=2006}}
Infobox state
General Information
Member of SO since 2006
Total teams
Division B Champion
Division C Champion
State Tournament Location
Date
Website
{{Infobox state
|Member since=2006
|Total teams=100
|B champs=Ladue Middle School
|C champs=Ladue Horton Watkins High School}}
Infobox state
General Information
Member of SO since 2006
Total teams 100
Division B Champion Ladue Middle School
Division C Champion Ladue Horton Watkins High School
State Tournament Location
Date
Website
{{Infobox state
|State=New Jersey
|Member since=2006
|Total teams=100
|B champs=Ladue Middle School
|C champs=Ladue Horton Watkins High School
|States location=Westminster College
|Date=January 1, 2020
|website=http://www.scioly.org}}
Infobox state
New Jersey.svg
General Information
Member of SO since 2006
Total teams 100
Division B Champion Ladue Middle School
Division C Champion Ladue Horton Watkins High School
State Tournament Location Westminster College
Date January 1, 2020
Website http://www.scioly.org