Module:Icon: Difference between revisions

LVL (talk | contribs)
Added shorthand support. Can now use flags like "icon-only" or sizes like "40px" without typing "size=" or "=true". Old syntax still works..
LVL (talk | contribs)
Made icons have a link.
Line 107: Line 107:
     end
     end


     local iconHtml = string.format('<span %s>[[File:%s|%s|link=]]</span>', style, iconData.image, size)
    -- 4. Generate icon HTML (with link if not disabled)
    local imageLink = noLink and "" or link
     local iconHtml = string.format('<span %s>[[File:%s|%s|link=%s]]</span>', style, iconData.image, size, imageLink)


     if iconOnly or displayName == "" then
     if iconOnly or displayName == "" then