Add mobile responsive overrides for standard Joomla and Community Builder modules
Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
This commit is contained in:
100
src/templates/html/mod_articles_latest/default.php
Normal file
100
src/templates/html/mod_articles_latest/default.php
Normal file
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_articles_latest
|
||||
*
|
||||
* @copyright (C) 2025 Moko Consulting <hello@mokoconsulting.tech>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*
|
||||
* Mobile responsive override for mod_articles_latest module
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8');
|
||||
|
||||
// Add responsive wrapper class
|
||||
$wrapperClass = 'mod-articles-latest mod-articles-latest-responsive ' . $moduleclass_sfx;
|
||||
?>
|
||||
|
||||
<div class="<?php echo $wrapperClass; ?>">
|
||||
<?php if (!empty($list)) : ?>
|
||||
<ul class="mod-articles-latest__list">
|
||||
<?php foreach ($list as $item) : ?>
|
||||
<li class="mod-articles-latest__item" itemscope itemtype="https://schema.org/Article">
|
||||
<?php if ($params->get('show_introtext', 0) && !empty($item->introtext)) : ?>
|
||||
<div class="mod-articles-latest__article">
|
||||
<h<?php echo $params->get('item_heading', 4); ?> class="mod-articles-latest__title" itemprop="headline">
|
||||
<?php if ($params->get('link_titles', 1)) : ?>
|
||||
<a href="<?php echo $item->link; ?>" itemprop="url" class="mod-articles-latest__link">
|
||||
<?php echo htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8'); ?>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<?php echo htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8'); ?>
|
||||
<?php endif; ?>
|
||||
</h<?php echo $params->get('item_heading', 4); ?>>
|
||||
|
||||
<?php if ($params->get('show_author', 0) || $params->get('show_date', 0) || $params->get('show_category', 0) || $params->get('show_hits', 0)) : ?>
|
||||
<div class="mod-articles-latest__meta">
|
||||
<?php if ($params->get('show_author', 0)) : ?>
|
||||
<span class="mod-articles-latest__author" itemprop="author" itemscope itemtype="https://schema.org/Person">
|
||||
<span class="icon-user" aria-hidden="true"></span>
|
||||
<span itemprop="name"><?php echo $item->author; ?></span>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_date', 0)) : ?>
|
||||
<span class="mod-articles-latest__date">
|
||||
<span class="icon-calendar" aria-hidden="true"></span>
|
||||
<time datetime="<?php echo HTMLHelper::_('date', $item->publish_up, 'c'); ?>" itemprop="datePublished">
|
||||
<?php echo HTMLHelper::_('date', $item->publish_up, Text::_('DATE_FORMAT_LC3')); ?>
|
||||
</time>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_category', 0)) : ?>
|
||||
<span class="mod-articles-latest__category">
|
||||
<span class="icon-folder" aria-hidden="true"></span>
|
||||
<?php echo $item->displayCategoryTitle; ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_hits', 0)) : ?>
|
||||
<span class="mod-articles-latest__hits">
|
||||
<span class="icon-eye" aria-hidden="true"></span>
|
||||
<?php echo $item->displayHits; ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="mod-articles-latest__intro" itemprop="description">
|
||||
<?php echo $item->introtext; ?>
|
||||
</div>
|
||||
|
||||
<?php if ($params->get('readmore', 0)) : ?>
|
||||
<div class="mod-articles-latest__readmore">
|
||||
<a href="<?php echo $item->link; ?>" class="mod-articles-latest__readmore-link btn btn-secondary">
|
||||
<?php echo Text::_('MOD_ARTICLES_LATEST_READMORE'); ?>
|
||||
<span class="icon-chevron-right" aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<a href="<?php echo $item->link; ?>" class="mod-articles-latest__link" itemprop="url">
|
||||
<span itemprop="headline"><?php echo htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8'); ?></span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php else : ?>
|
||||
<div class="mod-articles-latest__empty">
|
||||
<p><?php echo Text::_('MOD_ARTICLES_LATEST_NO_ARTICLES'); ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
1
src/templates/html/mod_articles_latest/index.html
Normal file
1
src/templates/html/mod_articles_latest/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html><head><title></title></head><body></body></html>
|
||||
63
src/templates/html/mod_breadcrumbs/default.php
Normal file
63
src/templates/html/mod_breadcrumbs/default.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_breadcrumbs
|
||||
*
|
||||
* @copyright (C) 2025 Moko Consulting <hello@mokoconsulting.tech>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*
|
||||
* Mobile responsive override for mod_breadcrumbs module
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8');
|
||||
|
||||
// Add responsive wrapper class
|
||||
$wrapperClass = 'mod-breadcrumbs mod-breadcrumbs-responsive ' . $moduleclass_sfx;
|
||||
?>
|
||||
|
||||
<nav class="<?php echo $wrapperClass; ?>" aria-label="<?php echo Text::_('JGLOBAL_YOU_ARE_HERE'); ?>">
|
||||
<?php if ($params->get('showHereYouAre', 1)) : ?>
|
||||
<span class="mod-breadcrumbs__prefix"><?php echo Text::_('JGLOBAL_YOU_ARE_HERE'); ?>:</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<ol class="mod-breadcrumbs__list" itemscope itemtype="https://schema.org/BreadcrumbList">
|
||||
<?php if ($params->get('showHome', 1)) : ?>
|
||||
<li class="mod-breadcrumbs__item mod-breadcrumbs__item--home" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
||||
<?php $icon = $params->get('homeIcon', 'icon-home'); ?>
|
||||
<a itemprop="item" href="<?php echo $list[0]->link; ?>" class="mod-breadcrumbs__link">
|
||||
<span class="<?php echo $icon; ?>" aria-hidden="true"></span>
|
||||
<span itemprop="name" class="visually-hidden"><?php echo htmlspecialchars($list[0]->name, ENT_COMPAT, 'UTF-8'); ?></span>
|
||||
</a>
|
||||
<meta itemprop="position" content="1" />
|
||||
</li>
|
||||
<?php $position = 2; ?>
|
||||
<?php else : ?>
|
||||
<?php $position = 1; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$start = $params->get('showHome', 1) ? 1 : 0;
|
||||
$count = count($list);
|
||||
|
||||
for ($i = $start; $i < $count; $i++) :
|
||||
$isLast = ($i === $count - 1);
|
||||
?>
|
||||
<li class="mod-breadcrumbs__item <?php echo $isLast ? 'mod-breadcrumbs__item--active' : ''; ?>" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
||||
<?php if (!$isLast) : ?>
|
||||
<a itemprop="item" href="<?php echo $list[$i]->link; ?>" class="mod-breadcrumbs__link">
|
||||
<span itemprop="name"><?php echo htmlspecialchars($list[$i]->name, ENT_COMPAT, 'UTF-8'); ?></span>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<span itemprop="name" class="mod-breadcrumbs__current" aria-current="page">
|
||||
<?php echo htmlspecialchars($list[$i]->name, ENT_COMPAT, 'UTF-8'); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<meta itemprop="position" content="<?php echo $position++; ?>" />
|
||||
</li>
|
||||
<?php endfor; ?>
|
||||
</ol>
|
||||
</nav>
|
||||
1
src/templates/html/mod_breadcrumbs/index.html
Normal file
1
src/templates/html/mod_breadcrumbs/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html><head><title></title></head><body></body></html>
|
||||
159
src/templates/html/mod_cblogin/default.php
Normal file
159
src/templates/html/mod_cblogin/default.php
Normal file
@@ -0,0 +1,159 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Community Builder
|
||||
* @subpackage mod_cblogin
|
||||
*
|
||||
* @copyright (C) 2025 Moko Consulting <hello@mokoconsulting.tech>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*
|
||||
* Mobile responsive override for mod_cblogin module
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8');
|
||||
|
||||
// Add responsive wrapper class
|
||||
$wrapperClass = 'mod-cblogin mod-cblogin-responsive ' . $moduleclass_sfx;
|
||||
?>
|
||||
|
||||
<div class="<?php echo $wrapperClass; ?>">
|
||||
<?php if ($type === 'logout') : ?>
|
||||
<div class="mod-cblogin__logout">
|
||||
<?php if ($params->get('greeting', 1)) : ?>
|
||||
<div class="mod-cblogin__greeting">
|
||||
<?php if ($cbUser) : ?>
|
||||
<div class="mod-cblogin__avatar">
|
||||
<?php echo $cbUser->getField('avatar', null, 'html', 'none', 'list'); ?>
|
||||
</div>
|
||||
<div class="mod-cblogin__user-info">
|
||||
<span class="mod-cblogin__username">
|
||||
<?php echo htmlspecialchars($cbUser->getField('formatname', null, 'html', 'none', 'list'), ENT_COMPAT, 'UTF-8'); ?>
|
||||
</span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form action="<?php echo $action; ?>" method="post" class="mod-cblogin__form">
|
||||
<div class="mod-cblogin__actions">
|
||||
<?php if ($params->get('profileLink', 1) && $cbUser) : ?>
|
||||
<a href="<?php echo $cbUser->getField('canvas', null, 'html', 'none', 'profile'); ?>" class="mod-cblogin__btn mod-cblogin__btn--profile btn btn-secondary">
|
||||
<span class="icon-user" aria-hidden="true"></span>
|
||||
<?php echo Text::_('MOD_CBLOGIN_PROFILE'); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<button type="submit" name="Submit" class="mod-cblogin__btn mod-cblogin__btn--logout btn btn-primary">
|
||||
<span class="icon-sign-out" aria-hidden="true"></span>
|
||||
<?php echo Text::_('MOD_CBLOGIN_LOGOUT'); ?>
|
||||
</button>
|
||||
</div>
|
||||
<input type="hidden" name="op2" value="logout" />
|
||||
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
|
||||
<input type="hidden" name="return" value="<?php echo $return; ?>" />
|
||||
<?php echo $securityToken; ?>
|
||||
</form>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<form action="<?php echo $action; ?>" method="post" name="login<?php echo $moduleId; ?>" id="login<?php echo $moduleId; ?>" class="mod-cblogin__form mod-cblogin__form--login">
|
||||
<?php if ($params->get('pretext')) : ?>
|
||||
<div class="mod-cblogin__pretext">
|
||||
<?php echo $params->get('pretext'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="mod-cblogin__fields">
|
||||
<div class="mod-cblogin__field">
|
||||
<label for="modlogi username<?php echo $moduleId; ?>" class="mod-cblogin__label">
|
||||
<?php echo Text::_('MOD_CBLOGIN_USERNAME'); ?>
|
||||
</label>
|
||||
<input
|
||||
id="modlogi username<?php echo $moduleId; ?>"
|
||||
type="text"
|
||||
name="username"
|
||||
class="mod-cblogin__input form-control"
|
||||
placeholder="<?php echo Text::_('MOD_CBLOGIN_USERNAME'); ?>"
|
||||
autocomplete="username"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="mod-cblogin__field">
|
||||
<label for="modloginpass<?php echo $moduleId; ?>" class="mod-cblogin__label">
|
||||
<?php echo Text::_('MOD_CBLOGIN_PASSWORD'); ?>
|
||||
</label>
|
||||
<input
|
||||
id="modloginpass<?php echo $moduleId; ?>"
|
||||
type="password"
|
||||
name="passwd"
|
||||
class="mod-cblogin__input form-control"
|
||||
placeholder="<?php echo Text::_('MOD_CBLOGIN_PASSWORD'); ?>"
|
||||
autocomplete="current-password"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
<?php if ($params->get('remember_me', 1)) : ?>
|
||||
<div class="mod-cblogin__remember">
|
||||
<input
|
||||
id="modloginrememberme<?php echo $moduleId; ?>"
|
||||
type="checkbox"
|
||||
name="remember"
|
||||
class="mod-cblogin__checkbox"
|
||||
value="yes"
|
||||
/>
|
||||
<label for="modloginrememberme<?php echo $moduleId; ?>" class="mod-cblogin__remember-label">
|
||||
<?php echo Text::_('MOD_CBLOGIN_REMEMBER_ME'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="mod-cblogin__actions">
|
||||
<button type="submit" name="Submit" class="mod-cblogin__btn mod-cblogin__btn--submit btn btn-primary">
|
||||
<span class="icon-sign-in" aria-hidden="true"></span>
|
||||
<?php echo Text::_('MOD_CBLOGIN_LOGIN'); ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="mod-cblogin__links">
|
||||
<?php if ($params->get('lostpassword_link', 1)) : ?>
|
||||
<a href="<?php echo $lostPasswordLink; ?>" class="mod-cblogin__link">
|
||||
<?php echo Text::_('MOD_CBLOGIN_FORGOT_PASSWORD'); ?>
|
||||
<span class="icon-chevron-right" aria-hidden="true"></span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('lostusername_link', 1)) : ?>
|
||||
<a href="<?php echo $lostUsernameLink; ?>" class="mod-cblogin__link">
|
||||
<?php echo Text::_('MOD_CBLOGIN_FORGOT_USERNAME'); ?>
|
||||
<span class="icon-chevron-right" aria-hidden="true"></span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('registration_link', 1)) : ?>
|
||||
<a href="<?php echo $registrationLink; ?>" class="mod-cblogin__link">
|
||||
<?php echo Text::_('MOD_CBLOGIN_REGISTER'); ?>
|
||||
<span class="icon-chevron-right" aria-hidden="true"></span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ($params->get('posttext')) : ?>
|
||||
<div class="mod-cblogin__posttext">
|
||||
<?php echo $params->get('posttext'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<input type="hidden" name="op2" value="login" />
|
||||
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
|
||||
<input type="hidden" name="return" value="<?php echo $return; ?>" />
|
||||
<input type="hidden" name="message" value="0" />
|
||||
<input type="hidden" name="loginfrom" value="loginmodule" />
|
||||
<?php echo $securityToken; ?>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
1
src/templates/html/mod_cblogin/index.html
Normal file
1
src/templates/html/mod_cblogin/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html><head><title></title></head><body></body></html>
|
||||
94
src/templates/html/mod_comprofilerOnline/default.php
Normal file
94
src/templates/html/mod_comprofilerOnline/default.php
Normal file
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Community Builder
|
||||
* @subpackage mod_comprofilerOnline
|
||||
*
|
||||
* @copyright (C) 2025 Moko Consulting <hello@mokoconsulting.tech>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*
|
||||
* Mobile responsive override for mod_comprofilerOnline module
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8');
|
||||
|
||||
// Add responsive wrapper class
|
||||
$wrapperClass = 'mod-cb-online mod-cb-online-responsive ' . $moduleclass_sfx;
|
||||
?>
|
||||
|
||||
<div class="<?php echo $wrapperClass; ?>">
|
||||
<?php if (!empty($onlineUsers)) : ?>
|
||||
<div class="mod-cb-online__stats">
|
||||
<div class="mod-cb-online__count">
|
||||
<span class="mod-cb-online__count-number"><?php echo $totalOnline; ?></span>
|
||||
<span class="mod-cb-online__count-label">
|
||||
<?php echo $totalOnline == 1 ? Text::_('MOD_CB_ONLINE_USER') : Text::_('MOD_CB_ONLINE_USERS'); ?>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<?php if ($params->get('show_guest_count', 1)) : ?>
|
||||
<div class="mod-cb-online__breakdown">
|
||||
<span class="mod-cb-online__breakdown-item">
|
||||
<span class="icon-users" aria-hidden="true"></span>
|
||||
<?php echo $membersOnline; ?> <?php echo Text::_('MOD_CB_ONLINE_MEMBERS'); ?>
|
||||
</span>
|
||||
<span class="mod-cb-online__breakdown-item">
|
||||
<span class="icon-eye" aria-hidden="true"></span>
|
||||
<?php echo $guestsOnline; ?> <?php echo Text::_('MOD_CB_ONLINE_GUESTS'); ?>
|
||||
</span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ($params->get('show_user_list', 1) && !empty($onlineUsers)) : ?>
|
||||
<div class="mod-cb-online__users">
|
||||
<h<?php echo $params->get('header_level', 3); ?> class="mod-cb-online__heading">
|
||||
<?php echo Text::_('MOD_CB_ONLINE_WHO_IS_ONLINE'); ?>
|
||||
</h<?php echo $params->get('header_level', 3); ?>>
|
||||
|
||||
<ul class="mod-cb-online__list">
|
||||
<?php foreach ($onlineUsers as $user) : ?>
|
||||
<li class="mod-cb-online__user">
|
||||
<?php if ($params->get('show_avatar', 1) && !empty($user->avatar)) : ?>
|
||||
<div class="mod-cb-online__avatar">
|
||||
<?php echo $user->avatar; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="mod-cb-online__info">
|
||||
<?php if ($params->get('link_names', 1) && !empty($user->link)) : ?>
|
||||
<a href="<?php echo $user->link; ?>" class="mod-cb-online__name">
|
||||
<?php echo htmlspecialchars($user->name, ENT_COMPAT, 'UTF-8'); ?>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<span class="mod-cb-online__name">
|
||||
<?php echo htmlspecialchars($user->name, ENT_COMPAT, 'UTF-8'); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_status', 1) && !empty($user->status)) : ?>
|
||||
<span class="mod-cb-online__status">
|
||||
<?php echo htmlspecialchars($user->status, ENT_COMPAT, 'UTF-8'); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ($params->get('show_online_icon', 1)) : ?>
|
||||
<span class="mod-cb-online__indicator" title="<?php echo Text::_('MOD_CB_ONLINE_NOW'); ?>">
|
||||
<span class="icon-checkmark" aria-hidden="true"></span>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php else : ?>
|
||||
<div class="mod-cb-online__empty">
|
||||
<p><?php echo Text::_('MOD_CB_ONLINE_NO_USERS'); ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
1
src/templates/html/mod_comprofilerOnline/index.html
Normal file
1
src/templates/html/mod_comprofilerOnline/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html><head><title></title></head><body></body></html>
|
||||
168
src/templates/html/mod_login/default.php
Normal file
168
src/templates/html/mod_login/default.php
Normal file
@@ -0,0 +1,168 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_login
|
||||
*
|
||||
* @copyright (C) 2025 Moko Consulting <hello@mokoconsulting.tech>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*
|
||||
* Mobile responsive override for mod_login module
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Component\ComponentHelper;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
HTMLHelper::_('behavior.keepalive');
|
||||
HTMLHelper::_('bootstrap.tooltip', '.hasTooltip');
|
||||
|
||||
$usersConfig = ComponentHelper::getParams('com_users');
|
||||
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8');
|
||||
|
||||
// Add responsive wrapper class
|
||||
$wrapperClass = 'mod-login mod-login-responsive ' . $moduleclass_sfx;
|
||||
?>
|
||||
|
||||
<div class="<?php echo $wrapperClass; ?>">
|
||||
<?php if ($type === 'logout') : ?>
|
||||
<form action="<?php echo Route::_('index.php', true); ?>" method="post" id="login-form-<?php echo $module->id; ?>" class="mod-login__form mod-login__form--logout">
|
||||
<?php if ($params->get('greeting', 1)) : ?>
|
||||
<div class="mod-login__greeting">
|
||||
<?php if ($params->get('name', 0) == 0) : ?>
|
||||
<?php echo Text::sprintf('MOD_LOGIN_HINAME', htmlspecialchars($user->get('name'), ENT_COMPAT, 'UTF-8')); ?>
|
||||
<?php else : ?>
|
||||
<?php echo Text::sprintf('MOD_LOGIN_HINAME', htmlspecialchars($user->get('username'), ENT_COMPAT, 'UTF-8')); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="mod-login__actions">
|
||||
<button type="submit" name="Submit" class="mod-login__btn mod-login__btn--logout btn btn-secondary">
|
||||
<span class="icon-sign-out" aria-hidden="true"></span>
|
||||
<?php echo Text::_('JLOGOUT'); ?>
|
||||
</button>
|
||||
<input type="hidden" name="option" value="com_users" />
|
||||
<input type="hidden" name="task" value="user.logout" />
|
||||
<input type="hidden" name="return" value="<?php echo $return; ?>" />
|
||||
<?php echo HTMLHelper::_('form.token'); ?>
|
||||
</div>
|
||||
</form>
|
||||
<?php else : ?>
|
||||
<form action="<?php echo Route::_('index.php', true); ?>" method="post" id="login-form-<?php echo $module->id; ?>" class="mod-login__form mod-login__form--login">
|
||||
<?php if ($params->get('pretext')) : ?>
|
||||
<div class="mod-login__pretext">
|
||||
<?php echo $params->get('pretext'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="mod-login__fields">
|
||||
<div class="mod-login__field">
|
||||
<label for="modlogi username-<?php echo $module->id; ?>" class="mod-login__label">
|
||||
<?php echo Text::_('MOD_LOGIN_VALUE_USERNAME'); ?>
|
||||
</label>
|
||||
<input
|
||||
id="modlogi username-<?php echo $module->id; ?>"
|
||||
type="text"
|
||||
name="username"
|
||||
class="mod-login__input form-control"
|
||||
placeholder="<?php echo Text::_('MOD_LOGIN_VALUE_USERNAME'); ?>"
|
||||
autocomplete="username"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="mod-login__field">
|
||||
<label for="modloginpass-<?php echo $module->id; ?>" class="mod-login__label">
|
||||
<?php echo Text::_('JGLOBAL_PASSWORD'); ?>
|
||||
</label>
|
||||
<input
|
||||
id="modloginpass-<?php echo $module->id; ?>"
|
||||
type="password"
|
||||
name="password"
|
||||
class="mod-login__input form-control"
|
||||
placeholder="<?php echo Text::_('JGLOBAL_PASSWORD'); ?>"
|
||||
autocomplete="current-password"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
<?php if (count($twofactormethods) > 1) : ?>
|
||||
<div class="mod-login__field">
|
||||
<label for="modloginsecretkey-<?php echo $module->id; ?>" class="mod-login__label">
|
||||
<?php echo Text::_('JGLOBAL_SECRETKEY'); ?>
|
||||
</label>
|
||||
<input
|
||||
id="modloginsecretkey-<?php echo $module->id; ?>"
|
||||
type="text"
|
||||
name="secretkey"
|
||||
class="mod-login__input form-control"
|
||||
placeholder="<?php echo Text::_('JGLOBAL_SECRETKEY'); ?>"
|
||||
autocomplete="one-time-code"
|
||||
/>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('useLocale', 0)) : ?>
|
||||
<div class="mod-login__field">
|
||||
<label for="lang-<?php echo $module->id; ?>" class="mod-login__label">
|
||||
<?php echo Text::_('MOD_LOGIN_LANGUAGE'); ?>
|
||||
</label>
|
||||
<?php echo $languages; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('showRememberMe', 1)) : ?>
|
||||
<div class="mod-login__remember">
|
||||
<input
|
||||
id="modloginrememberme-<?php echo $module->id; ?>"
|
||||
type="checkbox"
|
||||
name="remember"
|
||||
class="mod-login__checkbox"
|
||||
value="yes"
|
||||
/>
|
||||
<label for="modloginrememberme-<?php echo $module->id; ?>" class="mod-login__remember-label">
|
||||
<?php echo Text::_('MOD_LOGIN_REMEMBER_ME'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="mod-login__actions">
|
||||
<button type="submit" name="Submit" class="mod-login__btn mod-login__btn--submit btn btn-primary">
|
||||
<span class="icon-sign-in" aria-hidden="true"></span>
|
||||
<?php echo Text::_('JLOGIN'); ?>
|
||||
</button>
|
||||
<input type="hidden" name="option" value="com_users" />
|
||||
<input type="hidden" name="task" value="user.login" />
|
||||
<input type="hidden" name="return" value="<?php echo $return; ?>" />
|
||||
<?php echo HTMLHelper::_('form.token'); ?>
|
||||
</div>
|
||||
|
||||
<?php if ($usersConfig->get('allowUserRegistration')) : ?>
|
||||
<div class="mod-login__links">
|
||||
<a href="<?php echo Route::_('index.php?option=com_users&view=registration'); ?>" class="mod-login__link">
|
||||
<?php echo Text::_('MOD_LOGIN_REGISTER'); ?>
|
||||
<span class="icon-chevron-right" aria-hidden="true"></span>
|
||||
</a>
|
||||
<a href="<?php echo Route::_('index.php?option=com_users&view=reset'); ?>" class="mod-login__link">
|
||||
<?php echo Text::_('MOD_LOGIN_FORGOT_YOUR_PASSWORD'); ?>
|
||||
<span class="icon-chevron-right" aria-hidden="true"></span>
|
||||
</a>
|
||||
<a href="<?php echo Route::_('index.php?option=com_users&view=remind'); ?>" class="mod-login__link">
|
||||
<?php echo Text::_('MOD_LOGIN_FORGOT_YOUR_USERNAME'); ?>
|
||||
<span class="icon-chevron-right" aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('posttext')) : ?>
|
||||
<div class="mod-login__posttext">
|
||||
<?php echo $params->get('posttext'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
1
src/templates/html/mod_login/index.html
Normal file
1
src/templates/html/mod_login/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html><head><title></title></head><body></body></html>
|
||||
40
src/templates/html/mod_menu/default.php
Normal file
40
src/templates/html/mod_menu/default.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_menu
|
||||
*
|
||||
* @copyright (C) 2025 Moko Consulting <hello@mokoconsulting.tech>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*
|
||||
* Mobile responsive override for mod_menu module
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Helper\ModuleHelper;
|
||||
|
||||
$id = '';
|
||||
|
||||
if ($tagId = $params->get('tag_id', '')) {
|
||||
$id = ' id="' . $tagId . '"';
|
||||
}
|
||||
|
||||
// The menu class is deprecated. Use mod-menu instead
|
||||
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8');
|
||||
|
||||
// Add responsive wrapper class
|
||||
$wrapperClass = 'mod-menu mod-menu-responsive ' . $moduleclass_sfx;
|
||||
|
||||
if ($params->get('layout', 'default') === 'default') {
|
||||
$wrapperClass .= ' mod-menu--default';
|
||||
}
|
||||
?>
|
||||
<nav class="<?php echo $wrapperClass; ?>"<?php echo $id; ?> aria-label="<?php echo htmlspecialchars($module->title, ENT_COMPAT, 'UTF-8'); ?>">
|
||||
<?php if ($params->get('showHeading', 0)) : ?>
|
||||
<h<?php echo $params->get('heading', 3); ?> class="mod-menu__heading">
|
||||
<?php echo $module->title; ?>
|
||||
</h<?php echo $params->get('heading', 3); ?>>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php require ModuleHelper::getLayoutPath('mod_menu', $params->get('layout', 'default') . '_' . $params->get('menutype')); ?>
|
||||
</nav>
|
||||
14
src/templates/html/mod_menu/default_component.php
Normal file
14
src/templates/html/mod_menu/default_component.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_menu
|
||||
*
|
||||
* @copyright (C) 2025 Moko Consulting <hello@mokoconsulting.tech>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*
|
||||
* Mobile responsive component for mod_menu
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
?>
|
||||
<span class="mod-menu__separator"><?php echo $item->title; ?></span>
|
||||
52
src/templates/html/mod_menu/default_url.php
Normal file
52
src/templates/html/mod_menu/default_url.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_menu
|
||||
*
|
||||
* @copyright (C) 2025 Moko Consulting <hello@mokoconsulting.tech>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*
|
||||
* Mobile responsive menu list for mod_menu
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
|
||||
$attributes = [];
|
||||
|
||||
if ($item->anchor_title) {
|
||||
$attributes['title'] = $item->anchor_title;
|
||||
}
|
||||
|
||||
if ($item->anchor_css) {
|
||||
$attributes['class'] = $item->anchor_css;
|
||||
}
|
||||
|
||||
if ($item->anchor_rel) {
|
||||
$attributes['rel'] = $item->anchor_rel;
|
||||
}
|
||||
|
||||
$linktype = $item->title;
|
||||
|
||||
if ($item->menu_image) {
|
||||
if ($item->menu_image_css) {
|
||||
$image_attributes['class'] = $item->menu_image_css;
|
||||
$linktype = HTMLHelper::_('image', $item->menu_image, $item->title, $image_attributes);
|
||||
} else {
|
||||
$linktype = HTMLHelper::_('image', $item->menu_image, $item->title);
|
||||
}
|
||||
|
||||
if ($item->params->get('menu_text', 1)) {
|
||||
$linktype .= '<span class="image-title">' . $item->title . '</span>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($item->browserNav == 1) {
|
||||
$attributes['target'] = '_blank';
|
||||
} elseif ($item->browserNav == 2) {
|
||||
$options = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes';
|
||||
$attributes['onclick'] = "window.open(this.href, 'targetWindow', '" . $options . "'); return false;";
|
||||
}
|
||||
|
||||
echo HTMLHelper::_('link', $item->flink, $linktype, $attributes);
|
||||
1
src/templates/html/mod_menu/index.html
Normal file
1
src/templates/html/mod_menu/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html><head><title></title></head><body></body></html>
|
||||
Reference in New Issue
Block a user