Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #143 from open-qhm/bootstrap-icons
Browse files Browse the repository at this point in the history
iconプラグインをBootstrap Iconsに対応させる
  • Loading branch information
big2men authored Feb 22, 2022
2 parents 6bec3d9 + 2225b9d commit dc7476f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// PukiWiki version / Copyright / Licence

define('S_VERSION', '1.4.7');
define('QHM_VERSION', '7.3.9'); //絶対に編集しないで下さい
define('QHM_VERSION', '7.4.0'); //絶対に編集しないで下さい
define('QHM_OPTIONS', 'update=download; support=false; banner=true');
define('S_COPYRIGHT',
'powered by <strong><a href="https://haik-cms.jp/">HAIK</a> ' . QHM_VERSION . '</strong><br />' .
Expand Down
16 changes: 16 additions & 0 deletions plugin/icon.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ function plugin_icon_inline()
{
$icon_options = " {$icon_prefix}{$arg}";
}
// Bootstrap Icons
else if ($arg === 'bootstrap-icons' OR $arg === 'bi')
{
$icon_base = 'bi';
$icon_prefix = $icon_base . '-';
plugin_icon_set_bootstrap_icons();
}
else if ($arg !== '')
{
$icon_name = $arg;
Expand Down Expand Up @@ -87,3 +94,12 @@ function plugin_icon_set_font_awesome($search_pseudo_elements = false)
}
$qt->appendv_once('plugin_icon_font_awesome', 'beforescript', $js);
}

function plugin_icon_set_bootstrap_icons()
{
$qt = get_qt();
$head = <<<HTML
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
HTML;
$qt->appendv_once('plugin_icon_bootstrap_icons', 'beforescript', $head);
}

0 comments on commit dc7476f

Please sign in to comment.