Difference between revisions of "Template:Duration"

From Stardew Valley Wiki
Jump to navigation Jump to search
(added inline class (optional))
m (Undo revision 140756 by IBugOne (talk) didn't need that change at all)
Tag: Undo
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly><span id="nametemplate" {{#switch:{{{class|}}}  
+
<includeonly><templatestyles src="Template:Duration/styles.css" /><span class="durationtemplate{{#ifeq:{{{class|}}}|inline|inline|}}">[[File:Time Icon.png|24px|link=]] {{{1|}}}</span></includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude>
|inline = class="nametemplate inline" style="display:inline; margin-right:0;"
 
|#default = class="nametemplate"}}>[[File:Time_Icon.png|24px|link=]] {{{1|}}}{{#if: {{{2|}}}|&nbsp;({{{2|}}})|}}</span></includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude>
 

Latest revision as of 16:45, 9 August 2022

Description

This template is used to insert File:Time Icon.png inline with text.

Use

This template can be used by entering the following onto a relevant page.

{{Duration|length of time}}

which results in... Time Icon.png length of time


Inline Styling

Inline styling can be applied with class=inline.

Example:

The normal length of time is {{Duration|11m 25s|class=inline}}, but can be extended to {{Duration|25m|class=inline}} under the proper conditions.

results in...

The normal length of time is Time Icon.png 11m 25s, but can be extended to Time Icon.png 25m under the proper conditions.