Jump to content

Template:Executable name: Difference between revisions

From Stardew Valley Wiki
imported>Pathoschild
change cursor over tooltip area
imported>Pathoschild
+ support for custom extension (e.g. for .bat files)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<code>[[File:{{{2}}}|20px]]&nbsp;{{{1}}}<span style="opacity: 0.4; border-bottom: 1px dashed #000; cursor: help;" title="May appear as '{{{1}}}' without the '.exe' depending on your settings.">.exe</span></code><noinclude>
<code>{{#if:{{{2|}}}
  |[[File:{{{2}}}|20px]]&nbsp;
  |{{#switch:{{{1}}}
    |StardewValley|Stardew Valley = [[File:Stardew Valley executable icon.png|20px]]&nbsp;
    |StardewModdingAPI = [[File:SMAPI mascot.png|20px]]&nbsp;
  }}
}}{{{1}}}<span style="opacity: 0.4; border-bottom: 1px dashed #000; cursor: help;" title="May appear as '{{{1}}}' without the '.{{#if:{{{extension|}}}|{{{extension}}}|exe}}' depending on your settings.">.{{#if:{{{extension|}}}|{{{extension}}}|exe}}</span></code><noinclude>
{{{{FULLPAGENAME}}/doc}}</noinclude>
{{{{FULLPAGENAME}}/doc}}</noinclude>

Latest revision as of 16:33, 3 July 2022

{{{1}}}.exe

Description

This template formats an executable file's name & icon for consistency in documentation pages.

Use

The template can be used by placing {{executable name|executable name without file extension|wiki icon name}} on the page. If the icon field is omitted, it'll be auto-populated if the name is Stardew Valley, StardewValley, or StardewModdingAPI.

For example:

code result
{{executable name|Stardew Valley|Stardew Valley executable icon.png}}
 Stardew Valley.exe
{{executable name|Stardew Valley}}
 Stardew Valley.exe
{{executable name|StardewModdingAPI}}
 StardewModdingAPI.exe

You can also set a different executable file extension:

code result
{{executable name|install on Windows|extension=bat}}
install on Windows.bat