Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Iconography #44771

Open
wants to merge 1 commit into
base: 5.3-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion administrator/components/com_cpanel/tmpl/cpanel/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Helper\ModuleHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
Expand Down Expand Up @@ -64,7 +65,8 @@
data-joomla-dialog="<?php echo htmlspecialchars(json_encode($popupOptions, JSON_UNESCAPED_SLASHES)) ?>"
data-close-on-message data-reload-on-close>
<div class="cpanel-add-module-icon">
<span class="icon-plus-square" aria-hidden="true"></span>
<!-- <span class="icon-plus-square" aria-hidden="true"></span> -->
<svg class="j-iconx2" aria-hidden="true"><use href="#<?= HTMLHelper::_('svgicon.add', 'j--square-plus'); ?>"></svg>
</div>
<span><?php echo Text::_('COM_CPANEL_ADD_DASHBOARD_MODULE'); ?></span>
</button>
Expand Down
3 changes: 2 additions & 1 deletion administrator/modules/mod_frontend/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
title="<?php echo Text::sprintf('MOD_FRONTEND_PREVIEW', $sitename); ?>"
target="_blank">
<div class="header-item-icon">
<span class="icon-external-link-alt" aria-hidden="true"></span>
<!-- <span class="icon-external-link-alt" aria-hidden="true"></span> -->
<svg class="j-icon" aria-hidden="true"><use href="#<?= HTMLHelper::_('svgicon.add', 'j--arrow-up-right-from-square'); ?>"></svg>
</div>
<div class="header-item-text">
<?php echo HTMLHelper::_('string.truncate', $sitename, 28, false, false); ?>
Expand Down
6 changes: 4 additions & 2 deletions administrator/modules/mod_guidedtours/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;

Expand Down Expand Up @@ -77,7 +78,7 @@

if (!isset($allTours[$key])) :
$lang->load("$key.sys", JPATH_ADMINISTRATOR)
|| $lang->load("$key.sys", JPATH_ADMINISTRATOR . '/components/' . $key);
|| $lang->load("$key.sys", JPATH_ADMINISTRATOR . '/components/' . $key);

$allTours[$key] = [];
endif;
Expand All @@ -103,7 +104,8 @@
<div class="header-item-content dropdown header-tours d-none d-sm-block">
<button class="dropdown-toggle d-flex align-items-center ps-0 py-0" data-bs-toggle="dropdown" type="button" title="<?php echo Text::_('MOD_GUIDEDTOURS_MENU'); ?>">
<div class="header-item-icon">
<span class="icon-map-signs" aria-hidden="true"></span>
<!-- <span class="icon-map-signs" aria-hidden="true"></span> -->
<svg class="j-icon" aria-hidden="true"><use href="#<?= HTMLHelper::_('svgicon.add', 'j--signs-post'); ?>"></svg>
</div>
<div class="header-item-text">
<?php echo Text::_('MOD_GUIDEDTOURS_MENU'); ?>
Expand Down
4 changes: 3 additions & 1 deletion administrator/modules/mod_logged/tmpl/disabled.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

?>
<div class="mb-4">
<p class="fw-bold text-center text-muted">
<span class="icon-users" aria-hidden="true"></span>
<!-- <span class="icon-users" aria-hidden="true"></span> -->
<svg class="j-icon" aria-hidden="true"><use href="#<?= HTMLHelper::_('svgicon.add', 'j--users'); ?>"></svg>
<?php echo Text::_('MOD_LOGGED_NO_SESSION_METADATA'); ?>
</p>
</div>
61 changes: 31 additions & 30 deletions administrator/modules/mod_login/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Utilities\ArrayHelper;

/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $app->getDocument()->getWebAssetManager();
Expand All @@ -22,6 +23,13 @@

Text::script('JSHOWPASSWORD');
Text::script('JHIDEPASSWORD');
HTMLHelper::_('svgicon.add', 'j--eye-slash');

$linkAttribs = [
'target' => '_blank',
'rel' => 'noopener nofollow',
'title' => Text::sprintf('JBROWSERTARGET_NEW_TITLE', Text::_('MOD_LOGIN_CREDENTIALS'))
];
?>
<form class="form-validate" action="<?php echo Route::_('index.php', true); ?>" method="post" id="form-login">
<fieldset>
Expand All @@ -39,8 +47,7 @@
class="form-control"
required="required"
autofocus
autocomplete="username"
>
autocomplete="username">
</div>
</div>
<div class="form-group">
Expand All @@ -55,10 +62,10 @@ class="form-control"
type="password"
class="form-control input-full"
required="required"
autocomplete="current-password"
>
autocomplete="current-password">
<button type="button" class="btn btn-primary input-password-toggle">
<span class="icon-eye icon-fw" aria-hidden="true"></span>
<!-- <span class="icon-eye icon-fw" aria-hidden="true"></span> -->
<svg class="j-icon" aria-hidden="true"><use href="#<?= HTMLHelper::_('svgicon.add', 'j--eye'); ?>"></svg>
<span class="visually-hidden"><?php echo Text::_('JSHOWPASSWORD'); ?></span>
</button>

Expand All @@ -78,29 +85,28 @@ class="form-control input-full"
$dataAttributeKeys = array_filter(array_keys($button), function ($key) {
return substr($key, 0, 5) == 'data-';
});
?>
<div class="form-group">
<button type="button"
?>
<div class="form-group">
<button type="button"
class="btn btn-secondary w-100 <?php echo $button['class'] ?? '' ?>"
<?php foreach ($dataAttributeKeys as $key) : ?>
<?php echo $key ?>="<?php echo $button[$key] ?>"
<?php echo $key ?>="<?php echo $button[$key] ?>"
<?php endforeach; ?>
<?php if ($button['onclick']) : ?>
onclick="<?php echo $button['onclick'] ?>"
<?php endif; ?>
title="<?php echo Text::_($button['label']) ?>"
id="<?php echo $button['id'] ?>"
>
<?php if (!empty($button['icon'])) : ?>
<span class="<?php echo $button['icon'] ?>"></span>
<?php elseif (!empty($button['image'])) : ?>
<?php echo $button['image']; ?>
<?php elseif (!empty($button['svg'])) : ?>
<?php echo $button['svg']; ?>
<?php endif; ?>
<?php echo Text::_($button['label']) ?>
</button>
</div>
id="<?php echo $button['id'] ?>">
<?php if (!empty($button['icon'])) : ?>
<span class="<?php echo $button['icon'] ?>"></span>
<?php elseif (!empty($button['image'])) : ?>
<?php echo $button['image']; ?>
<?php elseif (!empty($button['svg'])) : ?>
<?php echo $button['svg']; ?>
<?php endif; ?>
<?php echo Text::_($button['label']) ?>
</button>
</div>
<?php endforeach; ?>
<div class="form-group">
<button type="submit" id="btn-login-submit" class="btn btn-primary w-100 btn-lg"><?php echo Text::_('JLOGIN'); ?></button>
Expand All @@ -114,14 +120,9 @@ class="btn btn-secondary w-100 <?php echo $button['class'] ?? '' ?>"
</form>
<div class="text-center">
<div>
<?php echo HTMLHelper::link(
Text::_('MOD_LOGIN_CREDENTIALS_LINK'),
Text::_('MOD_LOGIN_CREDENTIALS'),
[
'target' => '_blank',
'rel' => 'noopener nofollow',
'title' => Text::sprintf('JBROWSERTARGET_NEW_TITLE', Text::_('MOD_LOGIN_CREDENTIALS'))
]
); ?>
<a href="<?= Text::_('MOD_LOGIN_CREDENTIALS_LINK'); ?>" <?= ArrayHelper::toString($linkAttribs); ?>>
<svg class="j-icon" aria-hidden="true"><use href="#<?= HTMLHelper::_('svgicon.add', 'j--arrow-up-right-from-square'); ?>"></svg>
<?= Text::_('MOD_LOGIN_CREDENTIALS'); ?>
</a>
</div>
</div>
6 changes: 3 additions & 3 deletions administrator/modules/mod_loginsupport/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<li>
<?php echo HTMLHelper::link(
$params->get('forum_url'),
Text::_('MOD_LOGINSUPPORT_FORUM'),
'<svg class="j-icon" aria-hidden="true"><use href="#' . HTMLHelper::_('svgicon.add', 'j--arrow-up-right-from-square') . '"></svg>' . Text::_('MOD_LOGINSUPPORT_FORUM'),
[
'target' => '_blank',
'rel' => 'nofollow noopener',
Expand All @@ -31,7 +31,7 @@
<li>
<?php echo HTMLHelper::link(
$params->get('documentation_url'),
Text::_('MOD_LOGINSUPPORT_DOCUMENTATION'),
'<svg class="j-icon" aria-hidden="true"><use href="#' . HTMLHelper::_('svgicon.add', 'j--arrow-up-right-from-square') . '"></svg>' . Text::_('MOD_LOGINSUPPORT_DOCUMENTATION'),
[
'target' => '_blank',
'rel' => 'nofollow noopener',
Expand All @@ -42,7 +42,7 @@
<li>
<?php echo HTMLHelper::link(
$params->get('news_url'),
Text::_('MOD_LOGINSUPPORT_NEWS'),
'<svg class="j-icon" aria-hidden="true"><use href="#' . HTMLHelper::_('svgicon.add', 'j--arrow-up-right-from-square') . '"></svg>' . Text::_('MOD_LOGINSUPPORT_NEWS'),
[
'target' => '_blank',
'rel' => 'nofollow noopener',
Expand Down
4 changes: 3 additions & 1 deletion administrator/modules/mod_messages/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;

Expand All @@ -24,7 +25,8 @@
<a class="header-item-content" href="<?php echo Route::_($route); ?>" title="<?php echo Text::_('MOD_MESSAGES_PRIVATE_MESSAGES'); ?>">
<div class="header-item-icon">
<div class="w-auto">
<span class="icon-envelope icon-fw" aria-hidden="true"></span>
<!-- <span class="icon-envelope icon-fw" aria-hidden="true"></span> -->
<svg class="j-icon" aria-hidden="true"><use href="#<?= HTMLHelper::_('svgicon.add', 'j--language'); ?>"></svg>
<small class="header-item-count"><?php echo $countUnread; ?></small>
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion administrator/modules/mod_multilangstatus/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;

Expand All @@ -31,7 +32,8 @@
<button type="button" class="header-item-content multilanguage" title="<?php echo htmlspecialchars(Text::_('MOD_MULTILANGSTATUS')); ?>"
data-joomla-dialog="<?php echo htmlspecialchars(json_encode($popupOptions, JSON_UNESCAPED_SLASHES)) ?>">
<div class="header-item-icon">
<span class="icon-language" aria-hidden="true"></span>
<!-- <span class="icon-language" aria-hidden="true"></span> -->
<svg class="j-icon" aria-hidden="true"><use href="#<?= HTMLHelper::_('svgicon.add', 'j--language'); ?>"></svg>
</div>
<div class="header-item-text">
<?php echo Text::_('MOD_MULTILANGSTATUS'); ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;

Expand All @@ -25,7 +26,8 @@
title="<?php echo Text::_('MOD_POST_INSTALLATION_MESSAGES'); ?>">
<div class="header-item-icon">
<div class="w-auto">
<span class="icon-bell icon-fw" aria-hidden="true"></span>
<!-- <span class="icon-bell icon-fw" aria-hidden="true"></span> -->
<svg class="j-icon" aria-hidden="true"><use href="#<?= HTMLHelper::_('svgicon.add', 'j--bell'); ?>"></svg>
<small class="header-item-count"><?php echo $messagesCount; ?></small>
</div>
</div>
Expand Down
10 changes: 7 additions & 3 deletions administrator/modules/mod_privacy_status/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;

Expand All @@ -29,17 +30,20 @@
<td>
<?php if ($privacyPolicyInfo['published'] && $privacyPolicyInfo['articlePublished']) : ?>
<span class="badge bg-success">
<span class="icon-check-square" aria-hidden="true"></span>
<!-- <span class="icon-check-square" aria-hidden="true"></span> -->
<svg class="j-icon" aria-hidden="true"><use href="#<?= HTMLHelper::_('svgicon.add', 'j--check-square'); ?>"></svg>
<?php echo Text::_('JPUBLISHED'); ?>
</span>
<?php elseif ($privacyPolicyInfo['published'] && !$privacyPolicyInfo['articlePublished']) : ?>
<span class="badge bg-warning">
<span class="icon-exclamation-triangle" aria-hidden="true"></span>
<!-- <span class="icon-exclamation-triangle" aria-hidden="true"></span> -->
<svg class="j-icon" aria-hidden="true"><use href="#<?= HTMLHelper::_('svgicon.add', 'j--exclamation-triangle'); ?>"></svg>
<?php echo Text::_('JUNPUBLISHED'); ?>
</span>
<?php else : ?>
<span class="badge bg-warning">
<span class="icon-exclamation-triangle" aria-hidden="true"></span>
<!-- <span class="icon-exclamation-triangle" aria-hidden="true"></span> -->
<svg class="j-icon" aria-hidden="true"><use href="#<?= HTMLHelper::_('svgicon.add', 'j--exclamation-triangle'); ?>"></svg>
<?php echo Text::_('COM_PRIVACY_STATUS_CHECK_NOT_AVAILABLE'); ?>
</span>
<?php endif; ?>
Expand Down
7 changes: 5 additions & 2 deletions administrator/modules/mod_sampledata/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

$app->getDocument()->getWebAssetManager()
Expand All @@ -28,11 +29,13 @@
<li class="list-group-item sampledata-<?php echo $item->name; ?>">
<div class="d-flex justify-content-between align-items-center">
<div class="sample-data__title">
<span class="sample-data__icon icon-<?php echo $item->icon; ?> me-1" aria-hidden="true"></span>
<!-- <span class="sample-data__icon icon-<?php echo $item->icon; ?> me-1" aria-hidden="true"></span> -->
<svg class="j-icon" aria-hidden="true"><use href="#<?= HTMLHelper::_('svgicon.add', 'j--'. $item->icon); ?>"></svg>
<?php echo htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8'); ?>
</div>
<button type="button" class="btn btn-primary btn-sm apply-sample-data" data-type="<?php echo $item->name; ?>" data-steps="<?php echo $item->steps; ?>">
<span class="icon-upload" aria-hidden="true"></span> <?php echo Text::_('JLIB_INSTALLER_INSTALL'); ?>
<span class="icon-upload" aria-hidden="true"></span>
<?php echo Text::_('JLIB_INSTALLER_INSTALL'); ?>
<span class="visually-hidden"><?php echo $item->title; ?></span>
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function getStatsData(Registry $params, CMSApplication $app, DatabaseInte
if ($serverinfo) {
$rows[$i] = new \stdClass();
$rows[$i]->title = Text::_('MOD_STATS_PHP');
$rows[$i]->icon = 'cogs';
$rows[$i]->icon = 'gears';
$rows[$i]->data = PHP_VERSION;
$i++;

Expand All @@ -66,7 +66,7 @@ public function getStatsData(Registry $params, CMSApplication $app, DatabaseInte

$rows[$i] = new \stdClass();
$rows[$i]->title = Text::_('MOD_STATS_CACHING');
$rows[$i]->icon = 'tachometer-alt';
$rows[$i]->icon = 'gauge-high';
$rows[$i]->data = $app->get('caching') ? Text::_('JENABLED') : Text::_('JDISABLED');
$i++;

Expand Down
6 changes: 5 additions & 1 deletion administrator/modules/mod_stats_admin/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

use Joomla\CMS\HTML\HTMLHelper;

defined('_JEXEC') or die;

\Joomla\CMS\Factory::getApplication()->getDocument()->addScriptDeclaration('
Expand Down Expand Up @@ -37,7 +39,9 @@
<ul class="list-group list-group-flush stats-module">
<?php foreach ($list as $item) : ?>
<li class="list-group-item">
<span class="me-2 icon-<?php echo $item->icon; ?> icon-fw" aria-hidden="true"></span> <?php echo $item->title; ?>
<!-- <span class="me-2 icon-<?php echo $item->icon; ?> icon-fw" aria-hidden="true"></span> -->
<svg class="j-icon" aria-hidden="true"><use href="#<?= HTMLHelper::_('svgicon.add', 'j--' . $item->icon); ?>"></svg>
<?php echo $item->title; ?>

<?php if (isset($item->link)) : ?>
<a class="btn btn-info btn-sm js-revert" href="<?php echo $item->link; ?>"><?php echo $item->data; ?></a>
Expand Down
Loading