Sb forum speech.png DiscordLink.png FacebookLink.png RedditLink.png SteamLink.png TwitterLink.png YoutubeLink.png

Difference between revisions of "User:DustyFB/Sandbox/Templates/Template:SpaceshipInfobox"

From Starbase wiki
Jump to navigation Jump to search
 
(34 intermediate revisions by the same user not shown)
Line 9: Line 9:
<includeonly>
<includeonly>
<div class="Spaceship-Infobox">
<div class="Spaceship-Infobox">
  <div class="Spaceship-Info-Header">
<div class="Spaceship-Info-Header">
    <div class="Spaceship-Info-Image-Wrap">{{{image}}}
<div class="Spaceship-Info-Image-Wrap">{{{image|}}}
      <div class="Spaceship-Info-Faction-Logo">{{{factionLogo}}}</div>
<div class="Spaceship-Info-Faction-Logo">{{{factionLogo|}}}</div>
    </div>
</div>
    <span class="Spaceship-Info-Header-Caption">{{{caption}}}</span>
<span class="Spaceship-Info-Header-Caption">{{{caption|}}}</span>
  </div>
</div>
  <div class="Spaceship-Info-Name">{{#if:{{{name|}}}|{{{name}}}|Name not submitted.}}</div>
<div class="Spaceship-Info-Name">{{#if:{{{name|}}}|{{{name}}}|Name not submitted.}}</div>
  <div class="Spaceship-Info-Data-Wrap">
<div class="Spaceship-Info-Data-Wrap">
    <div class="Spaceship-Info-Data-Section">
<div class="Spaceship-Info-Data-Section">{{#if:{{{manufacturer|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Manufacturer</span> <span class="Spaceship-Info-Data-Cell-Body">{{{manufacturer}}}</span></div>}}{{#if:{{{operator|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Operator</span> <span class="Spaceship-Info-Data-Cell-Body">{{{operator}}}</span></div>}}{{#if: {{{class|}}} | {{#if: {{{type|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Class and Type</span> <span class="Spaceship-Info-Data-Cell-Body"><i>{{{class}}}</i>-class {{{type}}}</span></div> | <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Class</span> <span class="Spaceship-Info-Data-Cell-Body"><i>{{{class}}}</i>-class</span></div> }} | {{#if: {{{type|}}} | <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Type</span> <span class="Spaceship-Info-Data-Cell-Body">{{{type}}}</span></div>}}}}{{#if:{{{purpose|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">General Purpose</span> <span class="Spaceship-Info-Data-Cell-Body">{{{purpose}}}</span></div>}}{{#if:{{{production|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Production State</span> <span class="Spaceship-Info-Data-Cell-Body">{{{production}}}</span></div>}}   
      {{#if:{{{manufacturer|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">Manufacturer</span> <span class="Device-Info-Data-Cell-Body">{{{manufacturer}}}</span></div>}}
</div>
      {{#if:{{{operator|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">Operator</span> <span class="Device-Info-Data-Cell-Body">{{{operator}}}</span></div>}}
<div class="Spaceship-Info-Data-Section-Header">General Characteristics</div>
  {{#if: {{{class|}}} | {{#if: {{{type|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Class and Type</span> <span class="Spaceship-Info-Data-Cell-Body"><i>{{{class}}}</i>-class {{{type}}}</span></div> | <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Class</span> <span class="Spaceship-Info-Data-Cell-Body"><i>{{{class}}}</i>-class</span></div> }} | {{#if: {{{type|}}} | <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Type</span> <span class="Spaceship-Info-Data-Cell-Body">{{{type}}}</span></div>}}}}
<div class="Spaceship-Info-Data-Section">{{#if:{{{dimensions|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Dimensions</span> <span class="Spaceship-Info-Data-Cell-Body">{{{dimensions}}}</span></div>}}{{#if:{{{mass|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Mass</span> <span class="Spaceship-Info-Data-Cell-Body">{{{mass}}}</span></div>}}{{#if:{{{hull|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Hull</span> <span class="Spaceship-Info-Data-Cell-Body">{{{hull}}}</span></div>}}{{#if:{{{decks|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Decks</span> <span class="Spaceship-Info-Data-Cell-Body">{{{decks}}}</span></div>}}{{#if:{{{range|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Range</span> <span class="Spaceship-Info-Data-Cell-Body">{{{range}}}</span></div>}}{{#if:{{{topSpeed|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Top Speed</span> <span class="Spaceship-Info-Data-Cell-Body">{{{topSpeed}}}</span></div>}}{{#if:{{{flightTime|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Flight Time</span> <span class="Spaceship-Info-Data-Cell-Body">{{{flightTime}}}</span></div>}}{{#if:{{{YOLOL|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">YOLOL</span> <span class="Spaceship-Info-Data-Cell-Body">{{{YOLOL}}}</span></div>}}{{#if:{{{FCUType|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">FCU Type</span> <span class="Spaceship-Info-Data-Cell-Body">{{{FCUType}}}</span></div>}}{{#if:{{{propulsion|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Propulsion</span> <span class="Spaceship-Info-Data-Cell-Body">{{{propulsion}}}</span></div>}}{{#if:{{{propellant|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Propellant</span> <span class="Spaceship-Info-Data-Cell-Body">{{{propellant}}}</span></div>}}{{#if:{{{power|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Power</span> <span class="Spaceship-Info-Data-Cell-Body">{{{power}}}</span></div>}}{{#if:{{{crew|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Crew</span> <span class="Spaceship-Info-Data-Cell-Body">{{{crew}}}</span></div>}}{{#if:{{{nebulaSafe|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Nebula Safe?</span> <span class="Spaceship-Info-Data-Cell-Body">{{{nebulaSafe}}}</span></div>}}{{#if:{{{unitCost|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Unit Cost</span> <span class="Spaceship-Info-Data-Cell-Body">{{{unitCost}}}</span></div>}}
  {{#if:{{{purpose|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">General Purpose</span> <span class="Device-Info-Data-Cell-Body">{{{purpose}}}</span></div>}}
</div>
  {{#if:{{{production|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">Production State</span> <span class="Device-Info-Data-Cell-Body">{{{production}}}</span></div>}}   
<div class="Spaceship-Info-Data-Section-Header">Equipment</div>
    </div>
<div class="Spaceship-Info-Data-Section">{{#if:{{{armaments|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Armaments</span> <span class="Spaceship-Info-Data-Cell-Body">{{{armaments}}}</span></div>}}{{#if:{{{mining|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Mining</span> <span class="Spaceship-Info-Data-Cell-Body">{{{mining}}}</span></div>}}{{#if:{{{cargo|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Cargo</span> <span class="Spaceship-Info-Data-Cell-Body">{{{cargo}}}</span></div>}}{{#if:{{{manufacturing|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Manufacturing</span> <span class="Spaceship-Info-Data-Cell-Body">{{{manufacturing}}}</span></div>}}{{#if:{{{reconstructionMachine|}}}| <div class="Spaceship-Info-Data-Cell"><span class="Spaceship-Info-Data-Cell-Header">Reconstruction Machines</span> <span class="Spaceship-Info-Data-Cell-Body">{{{reconstructionMachine}}}</span></div>}}
    <div class="Spaceship-Info-Data-Section-Header">General Characteristics</div>
</div>
    <div class="Spaceship-Info-Data-Section">
</div>
      {{#if:{{{dimensions|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">Dimensions</span> <span class="Device-Info-Data-Cell-Body">{{{dimensions}}}</span></div>}}
{{#if:{{{mass|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">Mass</span> <span class="Device-Info-Data-Cell-Body">{{{mass}}}</span></div>}}
{{#if:{{{hull|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">Hull</span> <span class="Device-Info-Data-Cell-Body">{{{hull}}}</span></div>}}
{{#if:{{{decks|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">Decks</span> <span class="Device-Info-Data-Cell-Body">{{{decks}}}</span></div>}}
{{#if:{{{range|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">Range</span> <span class="Device-Info-Data-Cell-Body">{{{range}}}</span></div>}}
{{#if:{{{topSpeed|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">Top Speed</span> <span class="Device-Info-Data-Cell-Body">{{{topSpeed}}}</span></div>}}
{{#if:{{{flightTime|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">Flight Time</span> <span class="Device-Info-Data-Cell-Body">{{{flightTime}}}</span></div>}}
{{#if:{{{YOLOL|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">YOLOL</span> <span class="Device-Info-Data-Cell-Body">{{{YOLOL}}}</span></div>}}
{{#if:{{{FCUType|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">FCU Type</span> <span class="Device-Info-Data-Cell-Body">{{{FCUType}}}</span></div>}}
{{#if:{{{propulsion|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">Propulsion</span> <span class="Device-Info-Data-Cell-Body">{{{propulsion}}}</span></div>}}
{{#if:{{{propellant|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">Propellant</span> <span class="Device-Info-Data-Cell-Body">{{{propellant}}}</span></div>}}
{{#if:{{{power|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">Power</span> <span class="Device-Info-Data-Cell-Body">{{{power}}}</span></div>}}
{{#if:{{{crew|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">Crew</span> <span class="Device-Info-Data-Cell-Body">{{{crew}}}</span></div>}}
{{#if:{{{nebulaeSafe|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">Nebulae Safe?</span> <span class="Device-Info-Data-Cell-Body">{{{nebulaeSafe}}}</span></div>}}
{{#if:{{{unitCost|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">Unit Cost</span> <span class="Device-Info-Data-Cell-Body">{{{unitCost}}}</span></div>}}
    </div>
<div class="Spaceship-Info-Data-Section-Header">Equipment</div>
    <div class="Spaceship-Info-Data-Section">
      {{#if:{{{armaments|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">Armaments</span> <span class="Device-Info-Data-Cell-Body">{{{armaments}}}</span></div>}}
  {{#if:{{{mining|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">Mining</span> <span class="Device-Info-Data-Cell-Body">{{{mining}}}</span></div>}}
  {{#if:{{{cargo|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">Cargo</span> <span class="Device-Info-Data-Cell-Body">{{{cargo}}}</span></div>}}
  {{#if:{{{manufacturing|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">Manufacturing</span> <span class="Device-Info-Data-Cell-Body">{{{manufacturing}}}</span></div>}}
  {{#if:{{{reconstructionMachine|}}}| <div class="Device-Info-Data-Cell"><span class="Device-Info-Data-Cell-Header">Reconstruction Machines</span> <span class="Device-Info-Data-Cell-Body">{{{reconstructionMachine}}}</span></div>}}
    </div>
  </div>
</div>
</div>


{{#css:
{{#css:
Line 69: Line 45:
}
}
.Spaceship-Info-Header img {
.Spaceship-Info-Header img {
  max-width:100%;
  max-height:250px;
   height: auto;
   height: auto;
   width: auto;
   width: 100%;
   background: linear-gradient(transparent, #3a806e1f);
   background: linear-gradient(transparent, #3a808045);
   display: block;
   display: block;
   outline: 2px solid #305e60;
   outline: 2px solid #305e60;
Line 101: Line 75:
   border-bottom: 1px solid #394442;
   border-bottom: 1px solid #394442;
   text-align: center;
   text-align: center;
}
.Spaceship-Info-Data-Cell {
  font-size:1.25em;
}
.Spaceship-Info-Data-Cell-Header {
  font-weight:bold;
}
}
.Spaceship-Info-Data-Cell {
.Spaceship-Info-Data-Cell {
Line 112: Line 80:
   text-align:left;
   text-align:left;
   padding:0 0.4em;
   padding:0 0.4em;
  font-size:1.25em
}
}
.Spaceship-Info-Data-Cell-Header {
.Spaceship-Info-Data-Cell-Header {
  font-weight:bold;
   flex:48%;
   flex:48%;
   min-width:min-content;
   min-width:min-content;
   margin-right:4%;
   margin-right:4%;
}
}
.Spaceship-Info-Faction-Logo {
.Spaceship-Info-Faction-Logo img {
    background: url('https://wiki.starbasegame.com/images/2/26/Logo_of_empire.png') center no-repeat;
  max-width: 15%;
        background-size: contain;
  width:auto;
    width: 80px;
  height:auto;
    height: 80px;
  position: absolute;
    position: absolute;
  bottom: 0.25em;
    bottom: 0;
  right: 0.25em;
    right: 0;
  opacity: 0.8;
    opacity: 0.8;
  outline:none;
  background:none;
}
}
.Spaceship-Info-Image-Wrap {
.Spaceship-Info-Image-Wrap {
Line 133: Line 104:
.Spaceship-Info-Data-Cell-Body {
.Spaceship-Info-Data-Cell-Body {
   flex:50%;
   flex:50%;
  white-space:pre;
   margin: auto;
   margin: auto;
}
}
/* Gallery specific support */
.Device-Info .mw-gallery-slideshow-buttons, .oo-ui-layout oo-ui-panelLayout {
  padding: 0 !important;
  margin: 0 auto !important;
  width:100%;
  position: absolute!important;
  bottom: 0!important;
}
.Device-Info .mw-gallery-slideshow-caption {
  line-height: 1em!important;
  margin-bottom: 3em!important;
}
.Device-Info .mw-gallery-slideshow {
  margin:0!important;
}
/* Supporting mobile mode without flexbox = :'( */
/* Portrait orientation. Also, low-res viewports */
/* Portrait orientation. Also, low-res viewports */
@media
@media
Line 162: Line 115:
only screen and (                min-resolution: 2dppx) and (orientation: portrait),
only screen and (                min-resolution: 2dppx) and (orientation: portrait),
only screen and (max-width: 800px) and (orientation: portrait) {  
only screen and (max-width: 800px) and (orientation: portrait) {  
 
   .Spaceship-Infobox {
   .Device-Info {
     width:auto;
     width:auto;
     float:none;
     float:none;
Line 169: Line 121:
     font-size:1.5em;
     font-size:1.5em;
   }
   }
}
}


/* Landscape orientation. Also, low-res viewports */
@media
@media
only screen and (-webkit-min-device-pixel-ratio: 2) and (orientation: landscape),
only screen and (-webkit-min-device-pixel-ratio: 2) and (orientation: landscape),
Line 178: Line 131:
only screen and (        min-device-pixel-ratio: 2) and (orientation: landscape),
only screen and (        min-device-pixel-ratio: 2) and (orientation: landscape),
only screen and (                min-resolution: 192dpi) and (orientation: landscape),
only screen and (                min-resolution: 192dpi) and (orientation: landscape),
only screen and (                min-resolution: 2dppx) and (orientation: landscape)
only screen and (                min-resolution: 2dppx) and (orientation: landscape) {
{  
   .Spaceship-Infobox {
   .Device-Info {
    width:40%;
width:40%;
    font-size:0.9em;
font-size:0.9em;
  }
}
}
}
/* Possibly trash
.Device-Info-Data-Construction ~ .Device-Info-Data-Section .Device-Info-Data-Cell {
  width: 45%;
  display:inline-flex;
  padding: 0 2%;
  margin:0;
}
.Device-Info-Data-Construction ~ .Device-Info-Data-Section .Device-Info-Data-Cell:nth-child(odd) {
  border-right: 1px solid #424242;
}
.Device-Info-Data-Construction ~ .Device-Info-Data-Section .Device-Info-Data-Cell .Device-Info-Data-Cell-Body {
  flex:0;
}*/
}}
}}
</includeonly>
</includeonly>

Latest revision as of 15:29, 14 May 2021

Gallery mode can be utilized in the image field with:

|image=<gallery mode="slideshow">
Image:Memory_relay.png|"Caption"
Image:Logo_of_empire.png|"Caption"
</gallery>


Cookies help us deliver our services. By using our services, you agree to our use of cookies.