Template:Path: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
| No edit summary | No edit summary | ||
| (3 intermediate revisions by one other user not shown) | |||
| Line 8: | Line 8: | ||
| <onlyinclude><!-- | <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| | 	--><span style="background-color:{{#ifeq:{{{icon|}}}|reg|rgba(100, 145, 230, 0.1)| {{#ifeq:{{{icon|}}}|regv|rgba(100, 145, 230, 0.1)| {{#if:{{{2|}}}|#984EDD20|rgba(230, 145, 100, 0.1)}} }} }};padding:0 3px 0 4px; user-select:none; pointer-events:none"><!-- | ||
| 		--><span style="position:relative; top:{{#if:{{{icon|}}}{{{2|}}}|1px|3px}}"><!-- | 		--><span style="position:relative; top:{{#if:{{{icon|}}}{{{2|}}}|1px|3px}}"><!-- | ||
| 			-->[[File:{{#if:{{{icon|}}} | 			-->[[File:{{#if:{{{icon|}}} | ||
| 			       | {{#switch:{{{icon}}} | 			       | {{#switch: {{lc:{{{icon}}}}} | ||
| 				 <!-- if specified, replaces the icon even if the file extension is specified in {{{2}}} --> | 				 <!-- if specified, replaces the icon even if the file extension is specified in {{{2}}} --> | ||
| 				 | #default = icon-gnome-folder alt.png | 				 | #default = icon-gnome-folder alt.png | ||
| 				 | custom = {{{customico}}} | |||
| 				 | app|bat|com|exe|sh|executable = Icon-Windows_Executable.png | |||
| 				 | apk = Icon-Android.png | |||
| 				 | code | 				 | code|c|h|c++|hpp|cpp= Cpp-16px.png | ||
| 				 | java|jar= Icon_java.png | |||
| 				 | msi | 				 | msi|flatpak|installer|setup = Icon-Windows_Installer.png | ||
| 				 | reg|regedit|registry|regvalue|regv = Icon-regedit-2D-PathTemplate.png | |||
| 				 | audio|sound|music = Icon-Music-Note.png | |||
| 				 | fmv|video|movie = Icon-Video_File-filled.png | |||
| 				 | image|picture = Icon-Image-filled.png | |||
| 				 | 7z | 				 | 7z|tar.gz|tgz|zip|zipx|rar|vpk|pak = Folder_zip_icon.png | ||
| 				 | vmf|hammer= Icon-Hammer_4.x.png | |||
| 				 | texture = Icon-Image-filled.png<!-- Texture file currently same icon as image, but the tooltip will remain different --> | |||
| 				 <!--  | 				 <!-- |pak|package=Icon-Package.png --> | ||
| 				 <!--  | 				 <!-- |zip|archive=Icon-Archive.png --> | ||
| 				 <!--  | 				 <!-- |mdl|model=Icon-Model.png --> | ||
| 				 <!--  | 				 <!-- |map=Icon-Map.png --> | ||
| 				 | generic|file = Icon-File-filled-cropped.png | |||
| 				 }} | 				 }} | ||
| 			       | {{#switch:{{{2}}} | 			       | {{#switch: {{lc:{{{2}}}}} | ||
| 				 <!-- if the file extension is specified in {{{2}}} and {{{icon}}} was not specified, this will be used --> | 				 <!-- if the file extension is specified in {{{2}}} and {{{icon}}} was not specified, this will be used --> | ||
| 				 | #default = icon-gnome-folder alt.png | 				 | #default = icon-gnome-folder alt.png | ||
| 				 | app|bat|com|exe|sh = Icon-Windows_Executable.png | |||
| 				 | apk = Icon-Android.png | |||
| 				 | java|jar = Icon_java.png | |||
| 				 | code | 				 | code|c|h|c++|hpp|cpp = Cpp-16px.png | ||
| 				 | msi | 				 | msi|flatpak|deb = Icon-Windows_Installer.png | ||
| 				 | wav|mp3|ogg|opus|flac|wma|xwv|vsnd_c|sound.cache = Icon-Music-Note.png | |||
| 				 | avi|bik|mkv|mov|mp4|wmv|webm|ogv = Icon-Video_File-filled.png | |||
| 				 | txt|rtf|wpd = Icon-edit-filled.png | |||
| 				 | fxc = Icon-shader.png | |||
| 				 | py|pyc = Python-16px.png | |||
| 				 | nut|nuc = Sq-highres.png | |||
| 				 | lua = Lua-16px.png | |||
| 				 | chm = Icon-help.png | |||
| 				 | config|cfg=Icon-settings_applications.png | |||
| 				 | apng|bmp|jpg|jpeg|pcx|png|tga|tif|tiff|webp|svg|vsvg|vsvg_c = Icon-Image-filled.png | |||
| 				 | dds|spr|vtf|vtex_c|wal = Icon-Image-filled.png<!--currently same icon as image--> | |||
| 				 | 7z | 				 | 7z|tar.gz|tgz|zip|zipx|rar|vpk|pak|wad|tar|bz2|pk3 = Folder_zip_icon.png | ||
| 				 | vmap = Icon-Hammer_5.x.png | |||
| 				 | vmf|vmx|hammer = Icon-Hammer_4.x.png | |||
| 				 | rmf|rmx|map = Icon-Hammer_3.x.png | |||
| 				 | jmf|jmx = jack_icon.png | |||
| 				 <!-- |TAR|tar|PAK|pak|WAD|wad|VPK|vpk = Icon-Package.png --> | 				 <!-- |TAR|tar|PAK|pak|WAD|wad|VPK|vpk = Icon-Package.png --> | ||
| 				 <!-- |MDL|mdl|MD2|md2|MD3|md3|VMDL|vmdl|VMDL_C|vmdl_c|PHY|phy|VTX|vtx|VVD|vvd = Icon-Model.png --> | 				 <!-- |MDL|mdl|MD2|md2|MD3|md3|VMDL|vmdl|VMDL_C|vmdl_c|PHY|phy|VTX|vtx|VVD|vvd = Icon-Model.png --> | ||
| 				 <!-- |BSP|bsp|VMAP_C|vmap_c|VMF|vmf = Icon-Map.png --> | 				 <!-- |BSP|bsp|VMAP_C|vmap_c|VMF|vmf = Icon-Map.png --> | ||
| 				 }} | 				 }} | ||
| 			       }}|baseline|alt={{#switch:{{{icon}}} | 			       }}|baseline|alt={{#switch: {{lc:{{{icon}}}}} | ||
| 						<!-- fallback if icons are not loaded properly --> | 						<!-- fallback if icons are not loaded properly --> | ||
| 						| #default = 🖿 | 						| #default = 🖿 | ||
| 						| custom = Custom Icon | |||
| 						| app|bat|com|exe = Windows Executable | |||
| 						| apk = Android APK | |||
| 						| code | 						| code= Code | ||
| 						| c++|cpp= C++ code | |||
| 						| h = C++ Header File | |||
| 						| java|jar = Java Executable | |||
| 						| msi = Windows Installer | |||
| 						| flatpak | 						| flatpak = Flatpak Installer | ||
| 						| installer | 						| installer|setup = Installer | ||
| 						| reg|regedit|registry = Registry Path | |||
| 						| regvalue|regv = Registry Value | |||
| 						| audio|sound|music = 🎜 | |||
| 						| fmv|video|movie = 🎬︎ | |||
| 						| txt|rtf|wpd = Text File | |||
| 						| fxc = Shader File | |||
| 						| image|picture = 🖼{{Path/strings|ImageIconFallback}} | |||
| 						| 7z | 						| 7z|tar.gz|tgz|zip|zipx|rar|vpk|pak = 🗂️ (Compressed) | ||
| 						| vmf|hammer = VMF <small>(Valve Map Format)</small> | |||
| 						| texture|tex = {{Path/strings|TexturesIconFallback}} | |||
| 						<!-- |PAK|pak|PACKAGE|package={{Path/strings|PackageIconFallback}} --> | 						<!-- |PAK|pak|PACKAGE|package={{Path/strings|PackageIconFallback}} --> | ||
| 						<!-- |ZIP|zip|ARCHIVE|archive={{Path/strings|ArchiveIconFallback}} --> | 						<!-- |ZIP|zip|ARCHIVE|archive={{Path/strings|ArchiveIconFallback}} --> | ||
| 						<!-- |MDL|mdl|MODEL|model={{Path/strings|ModelIconFallback}} --> | 						<!-- |MDL|mdl|MODEL|model={{Path/strings|ModelIconFallback}} --> | ||
| 						<!-- |MAP|map={{Path/strings|MapIconFallback}} --> | 						<!-- |MAP|map={{Path/strings|MapIconFallback}} --> | ||
| 						| generic|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=]]<!-- | 						}}|15px|link=]]<!-- | ||
| Line 100: | Line 100: | ||
| 	--></span><!-- | 	--></span><!-- | ||
| 	--><code  | 	--><code>{{{1|}}}{{#if:{{{2|}}}|.{{#switch: {{lc:{{{2}}}}} | ||
| 			| exe = [[w:.exe|<span style="color:grey">exe</span>]] | |||
| 			| txt = txt | |||
| 			| svg = [[w:SVG|svg]] | |||
| 			| vsvg = [[w:SVG|vsvg]] | |||
| 			| vsvg_c = [[w:SVG|vsvg_c]] | |||
| 			| #default = [[{{lc:{{{2}}}}}|{{{2}}}]]}} | |||
| }}</code><!-- | |||
| --></span></onlyinclude> | --></span></onlyinclude> | ||
| </includeonly> | </includeonly> | ||
Latest revision as of 13:50, 25 October 2025
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.
























 Available doc translations
 Available doc translations 
 
  
  
  
 








