Template:Path: Difference between revisions
Jump to navigation
Jump to search
m (frogor) |
m (New folder icon) |
||
Line 6: | Line 6: | ||
<includeonly><onlyinclude><!-- | <includeonly><onlyinclude><!-- | ||
--><span style="display:inline-flex; align-items:center; line-height:1.35em"><!-- | --><span style="display:inline-flex; align-items:center; line-height:1.35em"><!-- | ||
--><span style="background-color:{{#if:{{{2|}}}|#984EDDCC| | --><span style="background-color:{{#ifeq:{{{icon|}}}|reg|rgb(100 145 230 / 35%)| {{#ifeq:{{{icon|}}}|regv|rgb(100 145 230 / 35%)| {{#if:{{{2|}}}|#984EDDCC|rgba(230 145 100 / 25%)}} }} }}; border-radius:4px 0 0 4px; padding:0 3px 0 4px; user-select:none; pointer-events:none"><!-- | ||
--><span style="position:relative; top:1px">[[File:{{#if:{{{icon|}}}|{{#switch:{{{icon}}}<!-- path to folder --> | --><span style="position:relative; top:{{#if:{{{icon|}}}{{{2|}}}|1px|2px}}">[[File:{{#if:{{{icon|}}}|{{#switch:{{{icon}}}<!-- path to folder --> | ||
|#default=icon-folder | |#default=icon-gnome-folder alt.png | ||
|APP|app|BAT|bat|COM|com|EXE|exe|SH|sh|EXECUTABLE|executable=Icon-Windows_Executable.png | |APP|app|BAT|bat|COM|com|EXE|exe|SH|sh|EXECUTABLE|executable=Icon-Windows_Executable.png | ||
|APK|apk=Icon-Android.png | |APK|apk=Icon-Android.png | ||
Line 28: | Line 28: | ||
|GENERIC|generic|FILE|file=Icon-File-filled-cropped.png | |GENERIC|generic|FILE|file=Icon-File-filled-cropped.png | ||
}}|{{#switch:{{{2}}}<!-- with "{{{2}}}" aka file extensions specified. --> | }}|{{#switch:{{{2}}}<!-- with "{{{2}}}" aka file extensions specified. --> | ||
|#default=icon-folder | |#default=icon-gnome-folder alt.png | ||
|APP|app|BAT|bat|COM|com|EXE|exe|SH|sh=Icon-Windows_Executable.png | |APP|app|BAT|bat|COM|com|EXE|exe|SH|sh=Icon-Windows_Executable.png | ||
|APK|apk=Icon-Android.png | |APK|apk=Icon-Android.png | ||
Line 82: | Line 82: | ||
}}|15px]]</span><!-- | }}|15px]]</span><!-- | ||
--></span><!-- | --></span><!-- | ||
--><code style="background-color: | --><code style="background-color:rgb({{#ifeq:{{{icon|}}}|reg|100 145 230 / 15%| {{#ifeq:{{{icon|}}}|regv|100 145 230 / 15%| {{#if:{{{2|}}}|152 78 221 / 25%|230 145 100 / 15%}} }} }}); border-radius:0 4px 4px 0; color:#CCC; padding:0 4px; {{#if:{{{select|}}}|user-select:{{{select}}}|}}">{{{1|}}}{{#if:{{{2|}}}|.{{#ifexist: {{{2}}} | [[{{{2}}}]] | {{{2}}} }}|}}</code><!-- | ||
--></span></onlyinclude></includeonly> | --></span></onlyinclude></includeonly> |
Revision as of 11:50, 4 May 2024
Todo: Fall back to generic file icon instead of folder icon if {{{2}}} is present.
Todo: Icons for models, maps, compressed archives, and uncompressed packages. Syntax exists, and just needs to be uncommented when the icons are ready.
Todo: Icons for linked libraries (DLL, SO, DYLIB).
Todo: Separate designation for compressed vs uncompressed archives.
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.