-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from dragomano/develop
Update to 1.9.4
- Loading branch information
Showing
44 changed files
with
445 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
Sources/LightPortal/addons/BootstrapIcons/BootstrapIcons.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?php | ||
|
||
/** | ||
* BootstrapIcons | ||
* | ||
* @package Light Portal | ||
* @link https://github.com/dragomano/Light-Portal | ||
* @author Bugo <bugo@dragomano.ru> | ||
* @copyright 2021 Bugo | ||
* @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later | ||
* | ||
* @version 1.9 | ||
*/ | ||
|
||
namespace Bugo\LightPortal\Addons\BootstrapIcons; | ||
|
||
use Bugo\LightPortal\Addons\Plugin; | ||
use Bugo\LightPortal\Helpers; | ||
|
||
/** | ||
* Generated by Plugin Maker | ||
*/ | ||
class BootstrapIcons extends Plugin | ||
{ | ||
/** @var string */ | ||
public $type = 'other'; | ||
|
||
/** | ||
* @return void | ||
*/ | ||
public function init() | ||
{ | ||
loadCSSFile('https://cdn.jsdelivr.net/npm/bootstrap-icons@1/font/bootstrap-icons.min.css', array('external' => true, 'seed' => false)); | ||
} | ||
|
||
/** | ||
* @param string $template | ||
* @param string $icon | ||
* @return void | ||
*/ | ||
public function prepareIconTemplate(string &$template, string $icon) | ||
{ | ||
$template = '<i class="bi bi-' . $icon . '"></i> '; | ||
} | ||
|
||
/** | ||
* @param array $all_icons | ||
* @param string $template | ||
* @return void | ||
*/ | ||
public function prepareIconList(array &$all_icons, string &$template) | ||
{ | ||
$content = file_get_contents('https://raw.githubusercontent.com/twbs/icons/main/font/bootstrap-icons.json'); | ||
$icons = json_decode($content); | ||
|
||
if (!empty($icons)) { | ||
foreach ($icons as $icon => $id) { | ||
$all_icons[] = $icon; | ||
} | ||
} | ||
|
||
$template = '<i class="bi bi-%1$s"></i> %1$s'; | ||
} | ||
|
||
/** | ||
* @param array $links | ||
* @return void | ||
*/ | ||
public function credits(array &$links) | ||
{ | ||
$links[] = array( | ||
'title' => 'Bootstrap Icons', | ||
'link' => 'https://github.com/twbs/icons', | ||
'author' => 'The Bootstrap Authors', | ||
'license' => array( | ||
'name' => 'the MIT License', | ||
'link' => 'https://github.com/twbs/icons/blob/main/LICENSE.md' | ||
) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
// Try to handle it with the upper level index.php. (it should know what to do.) | ||
if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) | ||
include (dirname(dirname(__FILE__)) . '/index.php'); | ||
else | ||
exit; | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
|
||
return [ | ||
'description' => 'Support for <a class="bbc_link" href="https://icons.getbootstrap.com/" target="_blank" rel="noopener">Bootstrap Icons</a>.', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
// Try to handle it with the upper level index.php. (it should know what to do.) | ||
if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) | ||
include (dirname(dirname(__FILE__)) . '/index.php'); | ||
else | ||
exit; | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
|
||
return [ | ||
'description' => 'Поддержка иконок <a class="bbc_link" href="https://getbootstrap.su" target="_blank" rel="noopener">Bootstrap</a>.', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?php | ||
|
||
return [ | ||
'description' => 'Adds the ability to display Disqus comments on portal pages.', | ||
'shortname' => 'Website shortname', | ||
'shortname_subtext' => 'This is used to uniquely identify your website on Disqus.<br>Copy your site <strong>shortname</strong> from <a class="bbc_link" href="https://disqus.com/admin/settings/general/" target="_blank" rel="noopener">the Disqus settings</a> and paste here.', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?php | ||
|
||
return [ | ||
'description' => 'Добавляет возможность отображать комментарии Disqus на страницах портала.', | ||
'shortname' => 'Короткое имя сайта', | ||
'shortname_subtext' => 'Используется для идентификации вашего сайта в Disqus.<br>Скопируйте значение <strong>shortname</strong> из <a class="bbc_link" href="https://disqus.com/admin/settings/general/" target="_blank" rel="noopener">настроек сайта в Disqus</a> и вставьте сюда.', | ||
]; |
Oops, something went wrong.