Icons

From semantic-mediawiki.org


This page is in reference to Cindy's contribution 'Smart iconography on your wiki' to SMW Con Fall 2019 It show approaches how to use Icons in your Wiki.

Icon sources[edit]

for usage in skins, see Help:Skins

BITPlan's approaches[edit]

UTF-8[edit]

Template:UtfIcon😊

Font Awesome[edit]

  1. http://wiki.bitplan.com/index.php/Icons
  2. http://wiki.bitplan.com/index.php/Template:Icon

Updating Icons[edit]

#!/bin/bash
# WF 2024-08-12
# aided by ChatGPT

# Directory containing SVG files
SVG_DIR="/var/www/fontawesome/svgs/regular"

# MediaWiki page output file
OUTPUT_FILE=/tmp/"icons.wiki"

# Loop through all SVG files in the directory
for f in "$SVG_DIR"/*.svg
do
  # Get the basename of the file (without the path and extension)
  basename=$(basename "$f" .svg)

  # Append the MediaWiki markup to the output file using cat << EOF
  cat << EOF >> "$OUTPUT_FILE"
{{Icon
|name=$basename
|style=regular
|size=48
|storemode=subobject
}}

EOF

done

echo "Icon MediaWiki markup now at $OUTPUT_FILE"

Material Design Icons[edit]

  1. https://google.github.io/material-design-icons/#icon-font-for-the-web
  2. https://material.io/resources/icons/?style=baseline
  3. https://stackoverflow.com/a/37626669/1497139
  4. https://cdn.materialdesignicons.com/1.1.34/
  5. http://wiki.bitplan.com/index.php/Template:MdiIcon

Bigstock pictures[edit]

  1. http://wiki.bitplan.com/index.php/Template:Bigstock
  2. http://wiki.bitplan.com/index.php/BigstockPaid

Example Icons in this wiki[edit]

Edit Icon.svg