Actions

Template

Difference between revisions of "LevelGallery"

From Sonic Retro

(Created page with '<includeonly><DPL> category={{{1}}} include={LevelBob}:levelscreen,{LevelBob}:levelscreen,{LevelBob}:game,{LevelBob}:game ordermethod=title order=ascending mode = userformat secs…')
 
m
 
(79 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<includeonly><DPL>
+
<includeonly><!--{{#css:
category={{{1}}}
+
.levelGalleryText {
include={LevelBob}:levelscreen,{LevelBob}:levelscreen,{LevelBob}:game,{LevelBob}:game
+
  background:#000;
ordermethod=title
+
  filter: alpha(opacity=80);
order=ascending
+
  opacity: 0.8;
mode = userformat
+
  left:0;
secseparators = <div class="posrel shadow" style="float:left;margin:10px">{{#ifexist:File:,,|[[Image:,,{{!}}x144px{{!}}link=%PAGE%]]|[[Image:Image upload.svg{{!}}x144px{{!}}link=%PAGE%]]}}<br><span class="posabs" style="background:#000;-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=80)';filter: alpha(opacity=80);opacity: 0.8;left:0;bottom:0;right:0;padding:5px;text-align:left;"><span style="font-size:110%">'''[[%PAGE%|<font color=#fff>%PAGE%</font>]]'''</span><br />''[[,,|<font color=#fff>,</font>]]''</span></div>  \n  
+
  bottom:0;
</DPL></includeonly><noinclude>
+
  right:0;
 +
  padding:5px;
 +
  text-align:left;
 +
}
 +
}}-->{{#dpl:
 +
|categorymatch={{{1}}}
 +
|include={LevelBob}:levelscreen,{LevelBob}:levelscreen,{LevelBob}:name,{LevelBob}:name,{LevelBob}:game
 +
|ordermethod=title
 +
|order=ascending
 +
|mode = userformat
 +
|secseparators = <div class="posrel shadow" style="float:left;margin:10px">²{#ifexist:File:,,¦²{Bobscreen¦,,¦height=144¦link=%PAGE%}²¦[[Image:Notavailable.svg{{!}}x144px{{!}}link=%PAGE%]]}²<br><div class="posabs" style="background:#000;opacity:0.8;left:0;bottom:0;right:0;padding:5px;text-align:left;">²{#if:,,¦'''[[,,]]'''¦'''[[%PAGE%]]'''}² ²{#ifeq:{{{gameTitle}}}¦hide¦<span style="display:none">¦<br />''[[,]]''²{#ifeq:{{{gameTitle}}}¦hide¦</span>¦}²</div></div>  \n  
 +
}}{{clear}}</includeonly><noinclude>
 
==Usage==
 
==Usage==
Use with a category that includes level articles to create a gallery of those levels.  For example, this:
+
Use with a category that includes level articles to create a gallery of those levels.  In order for this to work properly, level articles need to be using [[:Template:LevelBob]].  For example, this:
  <pre>{{LevelGallery|Sonic CD Levels}}</pre>
+
  <pre>{{LevelGallery|Sonic Heroes levels}}</pre>
 
produces this:
 
produces this:
{{LevelGallery|Sonic CD Levels}}
+
{{LevelGallery|Sonic Heroes levels}}
[[Category:Navigational Templates|{{PAGENAME}}]]
+
 
 +
Add <tt>gameTitle=hide</tt> to hide the game title:
 +
<pre>{{LevelGallery|Sonic Chaos levels|gameTitle=hide}}</pre>
 +
{{LevelGallery|Sonic Chaos levels|gameTitle=hide}}
 +
 
 +
[[Category:Navigational templates|{{PAGENAME}}]]
 
</noinclude>
 
</noinclude>

Latest revision as of 11:20, 12 March 2021