Template:Path: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
(Using /strings translations.) |
||
Line 4: | Line 4: | ||
<includeonly><onlyinclude><!-- | <includeonly><onlyinclude><!-- | ||
--><span title="{{#switch:{{{icon}}} | --><span title="{{#switch:{{{icon}}} | ||
|#default=Path | |#default={{Path/strings|Path}} {{{1|}}}{{#if:{{{2|}}}|.{{{2}}}|}} | ||
|audio|sound|music=Audio | |audio|sound|music={{Path/strings|Audio}} - {{{1|}}}{{#if:{{{2|}}}|.{{{2}}}|}}<!-- TODO: Automatically change the icon based of file format--> | ||
|video|movie=Video | |video|movie=V{{Path/strings|Video}} - {{{1|}}}{{#if:{{{2|}}}|.{{{2}}}|}} | ||
|image|picture=Image | |image|picture={{Path/strings|Image}} - {{{1|}}}{{#if:{{{2|}}}|.{{{2}}}|}} | ||
|texture= | |texture={{Path/strings|Textures}} - {{{1|}}}{{#if:{{{2|}}}|.{{{2}}}|}} | ||
|generic|file=File - {{{1|}}}{{#if:{{{2|}}}|.{{{2}}}|}} | |generic|file={{Path/strings|File}} - {{{1|}}}{{#if:{{{2|}}}|.{{{2}}}|}} | ||
}}" style="display:inline-flex; align-items:center; line-height:1.35em"><!-- | }}" style="display:inline-flex; align-items:center; line-height:1.35em"><!-- | ||
--><span style="background-color:{{#if:{{{2|}}}|#984EDDCC|#536FFFCC}}; border-radius:4px 0 0 4px; padding:0 3px 0 4px; user-select:none; pointer-events:none"><!-- | --><span style="background-color:{{#if:{{{2|}}}|#984EDDCC|#536FFFCC}}; border-radius:4px 0 0 4px; padding:0 3px 0 4px; user-select:none; pointer-events:none"><!-- | ||
Line 20: | Line 20: | ||
|generic|file=File:Icon-File-filled-cropped.png | |generic|file=File:Icon-File-filled-cropped.png | ||
}}|baseline|alt={{#switch:{{{icon}}} | }}|baseline|alt={{#switch:{{{icon}}} | ||
|#default=Folder | |#default={{Path/strings|Folder}} | ||
|audio|sound|music={{Unicode|♪}} | |audio|sound|music={{Unicode|♪}} | ||
|video|movie={{Unicode|[►]}} | |video|movie={{Unicode|[►]}} | ||
|image|picture= | |image|picture={{Path/strings|ImageIconFallback}} | ||
|texture= | |texture={{Path/strings|TexturesIconFallback}} | ||
|generic|file=File <!--alt parameter will be used for unicode fallback if the icon doesnt load properly. | |generic|file={{Path/strings|File}} <!--alt parameter will be used for unicode fallback if the icon doesnt load properly. | ||
Emojis are not recommended as older OS usually may lacking certain emojis, unicode symbols is used instead.--> | Emojis are not recommended as older OS usually may lacking certain emojis, unicode symbols is used instead.--> | ||
}}|15px]]</span><!-- | }}|15px]]</span><!-- |
Revision as of 03:57, 25 June 2023
Todo: Automatically use music icon if {{{2}}} is "wav", "mp3", "ogg", "vsnd_c" or any other audio formats.
Automatically use video icon if {{{2}}} is "bik", "avi", "wmv", "mov", "webm", "mp4" or any other video formats.
Automatically use picture icon if {{{2}}} is "jpg", "bmp", "tga", "vtf" or any other image and texture formats.
Automatically use video icon if {{{2}}} is "bik", "avi", "wmv", "mov", "webm", "mp4" or any other video formats.
Automatically use picture icon if {{{2}}} is "jpg", "bmp", "tga", "vtf" or any other image and texture formats.
Todo: Generic "file" icon (sheet of paper with bent corner), to use if path target is file.
The above documentation is transcluded from Template:Path/doc. (Edit | Page history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.