diff --git a/data/System/MimeIconPlugin.txt b/data/System/MimeIconPlugin.txt index 5abbccc..53a1eb9 100644 --- a/data/System/MimeIconPlugin.txt +++ b/data/System/MimeIconPlugin.txt @@ -1,4 +1,4 @@ -%META:TOPICINFO{author="ProjectContributor" comment="" date="1541516230" format="1.1" version="1"}% +%META:TOPICINFO{author="ProjectContributor" comment="" date="1543254682" format="1.1" version="1"}% ---+!! %TOPIC% %FORMFIELD{"Description"}% @@ -82,6 +82,7 @@ redirects to ---++ Change History %TABLE{columnwidths="7em" tablewidth="100%"}% +| 26 Nov 2018: | (3.11) docu fixes | | 12 Nov 2018: | (3.10) added =class= parameter | | 06 Nov 2018: | (3.00) added papirus icon set | | 16 Aug 2018: | (2.01) disabled error message writing to stderr | @@ -101,6 +102,6 @@ redirects to %META:FIELD{name="Repository" title="Repository" value="https://github.com/foswiki/%25TOPIC%25"}% %META:FIELD{name="Support" title="Support" value="Foswiki:Support/%25TOPIC%25"}% %META:FIELD{name="Version" title="Version" value="%25$VERSION%25"}% -%META:FILEATTACHMENT{name="MimeIconPluginSnap2.png" attachment="MimeIconPluginSnap2.png" attr="" comment="" date="1541516230" size="41588" user="ProjectContributor" version="1"}% -%META:FILEATTACHMENT{name="MimeIconPluginSnap1.png" attachment="MimeIconPluginSnap3.png" attr="" comment="" date="1541516230" size="18836" user="ProjectContributor" version="1"}% -%META:FILEATTACHMENT{name="MimeIconPluginSnap3.png" attachment="MimeIconPluginSnap3.png" attr="" comment="" date="1541516230" size="12291" user="ProjectContributor" version="1"}% +%META:FILEATTACHMENT{name="MimeIconPluginSnap2.png" attachment="MimeIconPluginSnap2.png" attr="" comment="" date="1543254682" size="41588" user="ProjectContributor" version="1"}% +%META:FILEATTACHMENT{name="MimeIconPluginSnap1.png" attachment="MimeIconPluginSnap3.png" attr="" comment="" date="1543254682" size="18836" user="ProjectContributor" version="1"}% +%META:FILEATTACHMENT{name="MimeIconPluginSnap3.png" attachment="MimeIconPluginSnap3.png" attr="" comment="" date="1543254682" size="12291" user="ProjectContributor" version="1"}% diff --git a/data/System/VarMIMEICON.txt b/data/System/VarMIMEICON.txt index 1f1159f..4c2762f 100644 --- a/data/System/VarMIMEICON.txt +++ b/data/System/VarMIMEICON.txt @@ -1,4 +1,4 @@ -%META:TOPICINFO{author="ProjectContributor" comment="" date="1541516230" format="1.1" version="1"}% +%META:TOPICINFO{author="ProjectContributor" comment="" date="1543254682" format="1.1" version="1"}% %META:TOPICPARENT{name="MimeIconPlugin"}% #VarMIMEICON ---+++ MIMEICON{"filename"} -- return a meaningful icon for this filename @@ -8,7 +8,14 @@ | ="filename"= | filenam or file extension to display an icon for | required | | =size="..."= | icon size; available sizes are depending on the icon set; common sizes are: 16, 32, 48, 64, 128 | 48; when the size isn't found in the icon set a best fitting size available will be chosen automatically | | =theme="oxygen,crystal,papirus"= | name of the icon set to chose from; for now only these two are supported | papirus or defined in =configure= | - | =format="..."= | format string for the img tag returned by this macro; within the format string the variables =%NAME%=, =%URL%= and =%SIZE%= are replaced with the concrete values for the icon being rendered | see =mimeicon.theme.tmpl= | + | =class="..."= | css class to be applied to the img tag | + | =format="..."= | format string for the img tag ; | =<img src='$url' class='$class' width='$size' height='$size' alt='$name' />= | + +The format parameter may contain the following variables: + * =$name=: the name of the icon (alias: =%NAME%=) + * =$size=: the requested icon size (alias: =%URL%=) + * =$url=: the url to the icon (alias: =%URL%=) + * =$class=: list of css classes applied to the img tag: =foswikiIcon=, the =$class= parameter as well as the theme name *Examples*: diff --git a/lib/Foswiki/Plugins/MimeIconPlugin.pm b/lib/Foswiki/Plugins/MimeIconPlugin.pm index 8adf2b5..e23308b 100644 --- a/lib/Foswiki/Plugins/MimeIconPlugin.pm +++ b/lib/Foswiki/Plugins/MimeIconPlugin.pm @@ -26,8 +26,8 @@ use warnings; use Foswiki::Func (); -our $VERSION = '3.10'; -our $RELEASE = '12 Nov 2018'; +our $VERSION = '3.11'; +our $RELEASE = '26 Nov 2018'; our $SHORTDESCRIPTION = 'Icon sets for mimetypes'; our $NO_PREFS_IN_TOPIC = 1; our $baseWeb;