Template:Path: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (Code cleanup) |
||
Line 3: | Line 3: | ||
{{todo|Icons for linked libraries (DLL, SO, DYLIB).}} | {{todo|Icons for linked libraries (DLL, SO, DYLIB).}} | ||
{{todo|Separate designation for compressed vs uncompressed archives.}} | {{todo|Separate designation for compressed vs uncompressed archives.}} | ||
{{ | {{Documentation}} | ||
<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:{{#ifeq:{{{icon|}}}|reg|rgb(100 145 230 / 35%)| {{#ifeq:{{{icon|}}}|regv|rgb(100 145 230 / 35%)| {{#if:{{{2|}}}|#984EDDCC|rgba(230 145 100 / 30%)}} }} }}; border-radius:4px 0 0 4px; padding:0 3px 0 4px; user-select:none; pointer-events:none"><!-- | --><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 / 30%)}} }} }}; border-radius:4px 0 0 4px; padding:0 3px 0 4px; user-select:none; pointer-events:none"><!-- | ||
--><span style="position:relative; top:{{#if:{{{icon|}}}{{{2|}}}|1px|3px}}">[[File:{{#if:{{{icon|}}}|{{#switch:{{{icon}}}<!-- | --><span style="position:relative; top:{{#if:{{{icon|}}}{{{2|}}}|1px|3px}}"><!-- | ||
-->[[File:{{#if:{{{icon|}}} | |||
| {{#switch:{{{icon}}} | |||
<!-- if specified, replaces the icon even if the file extension is specified in {{{2}}} --> | |||
| #default = icon-gnome-folder alt.png | |||
| CUSTOM|custom = {{{customico}}} | |||
| APP|app|BAT|bat|COM|com|EXE|exe|SH|sh|EXECUTABLE|executable = Icon-Windows_Executable.png | |||
| APK|apk = Icon-Android.png | |||
| code|CODE|c|C|h|H|C++|c++|hpp|HPP|cpp|CPP = Cpp-16px.png | |||
| Java|java|jar|JAR = Icon_java.png | |||
| msi|MSI|flatpak|FLATPAK|installer|INSTALLER|SETUP|setup = Icon-Windows_Installer.png | |||
| REG|reg|REGEDIT|regedit|REGISTRY|registry|REGVALUE|regvalue|REGV|regv = Icon-regedit-2D-PathTemplate.png | |||
| AUDIO|audio|SOUND|sound|MUSIC|music = Icon-Music-Note.png | |||
| FMV|fmv|VIDEO|video|MOVIE|movie = Icon-Video_File-filled.png | |||
| IMAGE|image|PICTURE|picture = Icon-Image-filled.png | |||
| 7z|7Z|tar.gz|TAR.GZ|tgz|TGZ|zip|ZIP|zipx|ZIPX|rar|RAR|VPK|vpk|PAK|pak = Folder_zip_icon.png | |||
| VMF|vmf|hammer|HAMMER = Icon-Hammer_4.x.png | |||
| TEXTURE|texture = Icon-Image-filled.png<!-- Texture file currently same icon as image, but the tooltip will remain different --> | |||
<!-- |PAK|pak|PACKAGE|package=Icon-Package.png --> | |||
<!-- |ZIP|zip|ARCHIVE|archive=Icon-Archive.png --> | |||
<!-- |MDL|mdl|MODEL|model=Icon-Model.png --> | |||
<!-- |MAP|map=Icon-Map.png --> | |||
| GENERIC|generic|FILE|file = Icon-File-filled-cropped.png | |||
}} | |||
| {{#switch:{{{2}}} | |||
<!-- if the file extension is specified in {{{2}}} and {{{icon}}} was not specified, this will be used --> | |||
| #default = icon-gnome-folder alt.png | |||
| APP|app|BAT|bat|COM|com|EXE|exe|SH|sh = Icon-Windows_Executable.png | |||
| APK|apk = Icon-Android.png | |||
| JAVA|java|JAR|jar = Icon_java.png | |||
| code|CODE|c|C|h|H|C++|c++|hpp|HPP|cpp|CPP = Cpp-16px.png | |||
| msi|MSI|flatpak|FLATPAK = Icon-Windows_Installer.png | |||
| WAV|wav|MP3|mp3|OGG|ogg|OPUS|opus|VSND_C|vsnd_c|SOUND.CACHE|sound.cache = Icon-Music-Note.png | |||
| AVI|avi|BIK|bik|MKV|mkv|MOV|mov|MP4|mp4|WMV|wmv|WEBM|webm = Icon-Video_File-filled.png | |||
| TXT|txt|RTF|rtf|WPD|wpd = Icon-edit-filled.png | |||
| FXC|fxc = Icon-shader.png | |||
| PY|py = Python-16px.png | |||
| NUT|nut|NUC|nuc = Sq-highres.png | |||
| LUA|lua = Lua-16px.png | |||
| CHM|chm = Icon-help.png | |||
| CONFIG|config|CFG|cfg=Icon-settings_applications.png | |||
| APNG|apng|BMP|bmp|JPG|jpg|JPEG|jpeg|PCX|pcx|PNG|png|TGA|tga|TIF|tif|TIFF|tiff|WEBP|WebP|webp|SVG|svg|VSVG|vsvg|VSVG_C|vsvg_c = Icon-Image-filled.png | |||
| DDS|dds|SPR|spr|VTF|vtf|VTEX_c|vtex_c = Icon-Image-filled.png | |||
| 7z|7Z|tar.gz|TAR.GZ|tgz|TGZ|zip|ZIP|zipx|ZIPX|rar|RAR|VPK|vpk|PAK|pak = Folder_zip_icon.png | |||
| VMF|vmf|hammer|HAMMER = Icon-Hammer_4.x.png | |||
| RMF|rmf = Icon-Hammer_3.x.png | |||
<!-- |TAR|tar|PAK|pak|WAD|wad|VPK|vpk = Icon-Package.png --> | |||
<!-- |7Z|7z|BZ2|bz2|PK3|pk3|RAR|rar|ZIP|zip = Icon-Archive.png --> | |||
<!-- |MDL|mdl|MD2|md2|MD3|md3|VMDL|vmdl|VMDL_C|vmdl_c|PHY|phy|VTX|vtx|VVD|vvd = Icon-Model.png --> | |||
<!-- |BSP|bsp|JMF|jmf|MAP|map|VMAP|vmap|VMAP_C|vmap_c|VMF|vmf = Icon-Map.png --> | |||
}} | |||
}}|baseline|alt={{#switch:{{{icon}}} | |||
| #default = 🖿 | |||
| CUSTOM|custom = Custom Icon | |||
| APP|app|BAT|bat|COM|com|EXE|exe = Windows Executable | |||
| APK|apk = Android APK | |||
| code|CODE = Code | |||
| C++|c++|cpp|CPP = C++ code | |||
| H|h = C++ Header File | |||
| Java|java|jar|JAR = Java Executable | |||
| MSI|msi = Windows Installer | |||
| flatpak|FLATPAK = Flatpak Installer | |||
| installer|INSTALLER|SETUP|setup = Installer | |||
| RED|reg|REGEDIT|regedit|REGISTRY|registry = Registry Path | |||
| REGVALUE|regvalue|REGV|regv = Registry Value | |||
| AUDIO|audio|SOUND|sound|MUSIC|music = 🎜 | |||
| FMV|fmv|VIDEO|video|MOVIE|movie = 🎬︎ | |||
| TXT|txt|RTF|rtf|WPD|wpd = Text File | |||
| FXC|fxc = Shader File | |||
| IMAGE|image|PICTURE|picture = 🖼{{Path/strings|ImageIconFallback}} | |||
| 7z|7Z|tar.gz|TAR.GZ|tgz|TGZ|zip|ZIP|zipx|ZIPX|rar|RAR|VPK|vpk|PAK|pak = 🗂️ (Compressed) | |||
| VMF|vmf|hammer|HAMMER = VMF <small>(Valve Map Format)</small> | |||
| TEXTURE|texture|TEX|tex = {{Path/strings|TexturesIconFallback}} | |||
<!-- |PAK|pak|PACKAGE|package={{Path/strings|PackageIconFallback}} --> | |||
<!-- |ZIP|zip|ARCHIVE|archive={{Path/strings|ArchiveIconFallback}} --> | |||
<!-- |MDL|mdl|MODEL|model={{Path/strings|ModelIconFallback}} --> | |||
<!-- |MAP|map={{Path/strings|MapIconFallback}} --> | |||
| GENERIC|generic|FILE|file = {{Path/strings|File}} <!-- alt parameter will be used for Unicode fallback if the icon doesn't load properly. | |||
Emojis are not recommended as older OSes may lack certain emojis.--> | Emojis are not recommended as older OSes may lack certain emojis.--> | ||
}}|15px|link=]]<!-- | |||
--></span><!-- | |||
--></span><!-- | --></span><!-- | ||
--><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><!-- | --><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 04:33, 1 August 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.