xref: /template/mikio/icons/icons.php (revision a8eebd8223c9e7a29443b978b64e79b827875f04)
1<?php
2/**
3 * DokuWiki Mikio Template Icons
4 *
5 * @link    http://dokuwiki.org/template:mikio
6 * @author  James Collins <james.collins@outlook.com.au>
7 * @license GPLv2 (http://www.gnu.org/licenses/gpl-2.0.html)
8 */
9global $MIKIO_ICONS;
10
11
12/*
13    You can add custom icon libraries into this file and use them
14    with the theme.
15
16    - Copy the CSS and FONT files into its own folder inside the
17      icons folder
18
19    - Add an array to the $MIKIO_ICONS array with the following keys:
20
21        name    this is the name used to identify the icon in the
22                <icon> tag
23        css     the CSS file to load. If your icon collection has
24                subtypes (like FontAwesome 5), you can create
25                multiple entries with the same CSS file. The theme
26                will prevent duplicate loadings of CSS files. You can
27                also use CDN paths
28        insert  what to insert in place of the icon tag. Use $1 to
29                tell the theme where to insert the icon-type specified
30                by the page content
31
32    The icon tag use can use on the DokuWiki page is:
33
34        <icon name icon-type[ extra]>
35
36    If no name is specified in the tag, the theme will use the first
37    entry in $MIKIO_ICONS
38
39    If a name is not found in the $MIKIO_ICONS array, the tag is
40    removed from the output
41
42    If you are using a SVG library, you can also use the extra parameters
43    of the icon tag. Each parameter (seperated by space) can be put
44    into the insert key as $2 - $9
45
46    If you include a key named as the parameter, if that parameter is
47    not defined in the icon tag, then this will be used as the
48    default value
49
50    An example below is the twbs svg icon library. The extra parameter
51    is used to define the svg fill color. You can use $0 for the URI
52    path to the icons folder (defined by the dir key)
53*/
54
55/* Font Awesome 4 */
56$MIKIO_ICONS[] = ['name' => 'fa', 'css' => 'fontawesome/css/all.min.css', 'insert' => '<i class="fa fa-$1"></i>'];
57
58/* Font Awesome 4 - CDN */
59/* $MIKIO_ICONS[] = ['name' => 'fa', 'css' => 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css', 'insert' => '<i class="fa fa-$1"></i>']; */
60
61/* Font Awesome 5 */
62/* $fa5 = 'fontawesome5/css/all.min.css'; */
63/* $MIKIO_ICONS[] = ['name' => 'fas', 'css' => $fa5, 'insert' => '<i class="fas fa-$1"></i>']; */
64/* $MIKIO_ICONS[] = ['name' => 'far', 'css' => $fa5, 'insert' => '<i class="far fa-$1"></i>']; */
65/* $MIKIO_ICONS[] = ['name' => 'fal', 'css' => $fa5, 'insert' => '<i class="fal fa-$1"></i>']; */
66/* $MIKIO_ICONS[] = ['name' => 'fab', 'css' => $fa5, 'insert' => '<i class="fab fa-$1"></i>']; */
67
68/* Font Awesome 5 - CDN */
69/* $fa5 = 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.1/css/all.min.css'; */
70/* $MIKIO_ICONS[] = ['name' => 'fas', 'css' => $fa5, 'insert' => '<i class="fas fa-$1"></i>']; */
71/* $MIKIO_ICONS[] = ['name' => 'far', 'css' => $fa5, 'insert' => '<i class="far fa-$1"></i>']; */
72/* $MIKIO_ICONS[] = ['name' => 'fal', 'css' => $fa5, 'insert' => '<i class="fal fa-$1"></i>']; */
73/* $MIKIO_ICONS[] = ['name' => 'fab', 'css' => $fa5, 'insert' => '<i class="fab fa-$1"></i>']; */
74
75/* Elusive 2 */
76/* $MIKIO_ICONS[] = ['name' => 'el', 'css' => 'elusive/css/elusive-icons.min.css', 'insert' => '<i class="el el-$1"></i>']; */
77
78/* Elusive 2 - CDN */
79/* $MIKIO_ICONS[] = ['name' => 'el', 'css' => '//maxcdn.bootstrapcdn.com/elusive-icons/2.0.0/css/elusive-icons.min.css', 'insert' => '<i class="el el-$1"></i>']; */
80
81/* TWBS - https://github.com/twbs/icons/releases */
82/* $MIKIO_ICONS[] = [
83    'name' => 'bi',
84    'dir' => 'bootstrap-icons',
85    'css' => 'bootstrap-icons/bi.css',
86    'insert' => '<span class="bi-icon" style="background-color:$2; mask-image:url($0svg/$1.svg); -webkit-mask-image:url($0svg/$1.svg);"></span>',
87    '$2' => 'black',
88]; */
89
90?>