Add Community Builder component overrides with mobile responsive design

Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-22 23:18:28 +00:00
parent 5fc186c009
commit 01414563f5
10 changed files with 1177 additions and 0 deletions

View File

@@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@@ -0,0 +1,112 @@
<?php
/**
* @package Community Builder
* @subpackage com_comprofiler
*
* @copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* Mobile responsive override for Community Builder login view
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
$return = $this->return ?? '';
$showRegisterLink = $this->showRegisterLink ?? true;
$showLostPasswordLink = $this->showLostPasswordLink ?? true;
?>
<div class="cb-login-responsive cb-component">
<div class="cb-login__container">
<div class="cb-login__header">
<h1 class="cb-login__title">
<?php echo Text::_('COM_COMPROFILER_LOGIN'); ?>
</h1>
</div>
<form action="<?php echo Route::_('index.php?option=com_comprofiler&view=login'); ?>"
method="post"
class="cb-login__form"
aria-label="<?php echo Text::_('COM_COMPROFILER_LOGIN_FORM'); ?>">
<div class="cb-login__field">
<label for="cb-username" class="cb-login__label">
<?php echo Text::_('COM_COMPROFILER_USERNAME'); ?>
<span class="cb-login__required" aria-label="<?php echo Text::_('COM_COMPROFILER_REQUIRED'); ?>">*</span>
</label>
<input type="text"
id="cb-username"
name="username"
class="cb-login__input"
required
aria-required="true"
autocomplete="username"
placeholder="<?php echo Text::_('COM_COMPROFILER_USERNAME'); ?>">
</div>
<div class="cb-login__field">
<label for="cb-password" class="cb-login__label">
<?php echo Text::_('COM_COMPROFILER_PASSWORD'); ?>
<span class="cb-login__required" aria-label="<?php echo Text::_('COM_COMPROFILER_REQUIRED'); ?>">*</span>
</label>
<input type="password"
id="cb-password"
name="passwd"
class="cb-login__input"
required
aria-required="true"
autocomplete="current-password"
placeholder="<?php echo Text::_('COM_COMPROFILER_PASSWORD'); ?>">
</div>
<?php if ($this->showRememberMe ?? true) : ?>
<div class="cb-login__remember">
<div class="form-check">
<input type="checkbox"
id="cb-remember"
name="remember"
class="form-check-input cb-login__remember-checkbox"
value="yes">
<label for="cb-remember" class="form-check-label cb-login__remember-label">
<?php echo Text::_('COM_COMPROFILER_REMEMBER_ME'); ?>
</label>
</div>
</div>
<?php endif; ?>
<div class="cb-login__actions">
<button type="submit" class="cb-login__btn cb-login__btn--submit btn btn-primary">
<span class="icon-lock" aria-hidden="true"></span>
<?php echo Text::_('COM_COMPROFILER_LOGIN'); ?>
</button>
</div>
<input type="hidden" name="task" value="login">
<input type="hidden" name="return" value="<?php echo htmlspecialchars($return, ENT_QUOTES, 'UTF-8'); ?>">
<?php echo $this->token ?? ''; ?>
</form>
<div class="cb-login__links">
<?php if ($showRegisterLink) : ?>
<div class="cb-login__link">
<a href="<?php echo Route::_('index.php?option=com_comprofiler&view=registers'); ?>" class="cb-login__link-item">
<span class="icon-user-plus" aria-hidden="true"></span>
<?php echo Text::_('COM_COMPROFILER_REGISTER_NEW_ACCOUNT'); ?>
</a>
</div>
<?php endif; ?>
<?php if ($showLostPasswordLink) : ?>
<div class="cb-login__link">
<a href="<?php echo Route::_('index.php?option=com_comprofiler&view=lostpassword'); ?>" class="cb-login__link-item">
<span class="icon-question" aria-hidden="true"></span>
<?php echo Text::_('COM_COMPROFILER_FORGOT_PASSWORD'); ?>
</a>
</div>
<?php endif; ?>
</div>
</div>
</div>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@@ -0,0 +1,136 @@
<?php
/**
* @package Community Builder
* @subpackage com_comprofiler
*
* @copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* Mobile responsive override for Community Builder registration view
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
// Get form and fields
$form = $this->form ?? null;
$tabs = $this->tabs ?? null;
?>
<div class="cb-register-responsive cb-component">
<div class="cb-register__header">
<h1 class="cb-register__title">
<?php echo Text::_('COM_COMPROFILER_REGISTER'); ?>
</h1>
<?php if ($this->introduction ?? null) : ?>
<div class="cb-register__intro">
<?php echo $this->introduction; ?>
</div>
<?php endif; ?>
</div>
<?php if ($form) : ?>
<form action="<?php echo $this->action ?? ''; ?>"
method="post"
class="cb-register__form"
enctype="multipart/form-data"
aria-label="<?php echo Text::_('COM_COMPROFILER_REGISTRATION_FORM'); ?>">
<?php if ($tabs) : ?>
<?php foreach ($tabs as $tab) : ?>
<?php if (isset($tab->fields) && !empty($tab->fields)) : ?>
<fieldset class="cb-register__fieldset">
<?php if ($tab->title) : ?>
<legend class="cb-register__legend">
<?php echo htmlspecialchars($tab->title, ENT_QUOTES, 'UTF-8'); ?>
</legend>
<?php endif; ?>
<?php if ($tab->description) : ?>
<div class="cb-register__tab-description">
<?php echo $tab->description; ?>
</div>
<?php endif; ?>
<div class="cb-register__fields">
<?php foreach ($tab->fields as $field) : ?>
<div class="cb-register__field<?php echo $field->required ? ' cb-register__field--required' : ''; ?>">
<label for="<?php echo htmlspecialchars($field->name, ENT_QUOTES, 'UTF-8'); ?>"
class="cb-register__label">
<?php echo htmlspecialchars($field->title, ENT_QUOTES, 'UTF-8'); ?>
<?php if ($field->required) : ?>
<span class="cb-register__required" aria-label="<?php echo Text::_('COM_COMPROFILER_REQUIRED'); ?>">*</span>
<?php endif; ?>
</label>
<?php if ($field->description) : ?>
<div class="cb-register__field-description" id="<?php echo htmlspecialchars($field->name, ENT_QUOTES, 'UTF-8'); ?>-desc">
<?php echo $field->description; ?>
</div>
<?php endif; ?>
<div class="cb-register__input-wrapper">
<?php echo $field->input; ?>
</div>
<?php if (isset($field->error) && $field->error) : ?>
<div class="cb-register__error" role="alert">
<?php echo $field->error; ?>
</div>
<?php endif; ?>
</div>
<?php endforeach; ?>
</div>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
<?php if ($this->showCaptcha ?? false) : ?>
<div class="cb-register__captcha">
<?php echo $this->captcha; ?>
</div>
<?php endif; ?>
<?php if ($this->showTerms ?? false) : ?>
<div class="cb-register__terms">
<div class="form-check">
<input type="checkbox"
id="cb-terms"
name="agreedToTerms"
class="form-check-input cb-register__terms-checkbox"
required
aria-required="true"
aria-describedby="cb-terms-text">
<label for="cb-terms" class="form-check-label cb-register__terms-label" id="cb-terms-text">
<?php echo Text::_('COM_COMPROFILER_AGREE_TO_TERMS'); ?>
<a href="<?php echo $this->termsUrl ?? ''; ?>" target="_blank" rel="noopener noreferrer">
<?php echo Text::_('COM_COMPROFILER_TERMS_CONDITIONS'); ?>
</a>
</label>
</div>
</div>
<?php endif; ?>
<div class="cb-register__actions">
<button type="submit" class="cb-register__btn cb-register__btn--submit btn btn-primary">
<span class="icon-check" aria-hidden="true"></span>
<?php echo Text::_('COM_COMPROFILER_REGISTER_SUBMIT'); ?>
</button>
<a href="<?php echo $this->loginUrl ?? ''; ?>" class="cb-register__btn cb-register__btn--cancel btn btn-secondary">
<span class="icon-cancel" aria-hidden="true"></span>
<?php echo Text::_('JCANCEL'); ?>
</a>
</div>
<?php echo $this->token ?? ''; ?>
</form>
<?php else : ?>
<div class="alert alert-warning" role="alert">
<?php echo Text::_('COM_COMPROFILER_REGISTRATION_NOT_AVAILABLE'); ?>
</div>
<?php endif; ?>
</div>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@@ -0,0 +1,100 @@
<?php
/**
* @package Community Builder
* @subpackage com_comprofiler
*
* @copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* Mobile responsive override for Community Builder user profile view
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
// Get user object
$user = $this->user ?? null;
$tabs = $this->tabs ?? null;
?>
<div class="cb-profile-responsive cb-component">
<?php if ($user) : ?>
<div class="cb-profile__header">
<?php if ($user->getField('avatar', null, 'html', 'none', 'profile')) : ?>
<div class="cb-profile__avatar">
<?php echo $user->getField('avatar', null, 'html', 'none', 'profile'); ?>
</div>
<?php endif; ?>
<div class="cb-profile__header-info">
<h1 class="cb-profile__name">
<?php echo htmlspecialchars($user->getField('formatname', null, 'html', 'none', 'profile'), ENT_QUOTES, 'UTF-8'); ?>
</h1>
<?php if ($user->getField('onlinestatus', null, 'html', 'none', 'profile')) : ?>
<div class="cb-profile__status">
<?php echo $user->getField('onlinestatus', null, 'html', 'none', 'profile'); ?>
</div>
<?php endif; ?>
</div>
</div>
<?php if ($tabs) : ?>
<div class="cb-profile__tabs">
<ul class="cb-profile__tabs-nav" role="tablist" aria-label="<?php echo Text::_('COM_COMPROFILER_PROFILE_TABS'); ?>">
<?php foreach ($tabs as $tab) : ?>
<?php if (isset($tab->fields) && !empty($tab->fields)) : ?>
<li class="cb-profile__tab-item" role="presentation">
<a href="#<?php echo htmlspecialchars($tab->id, ENT_QUOTES, 'UTF-8'); ?>"
class="cb-profile__tab-link"
role="tab"
aria-controls="<?php echo htmlspecialchars($tab->id, ENT_QUOTES, 'UTF-8'); ?>"
aria-selected="false">
<?php echo htmlspecialchars($tab->title, ENT_QUOTES, 'UTF-8'); ?>
</a>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<div class="cb-profile__tabs-content">
<?php foreach ($tabs as $tab) : ?>
<?php if (isset($tab->fields) && !empty($tab->fields)) : ?>
<div id="<?php echo htmlspecialchars($tab->id, ENT_QUOTES, 'UTF-8'); ?>"
class="cb-profile__tab-pane"
role="tabpanel"
aria-labelledby="<?php echo htmlspecialchars($tab->id, ENT_QUOTES, 'UTF-8'); ?>-tab">
<?php if ($tab->description) : ?>
<div class="cb-profile__tab-description">
<?php echo $tab->description; ?>
</div>
<?php endif; ?>
<div class="cb-profile__fields">
<?php foreach ($tab->fields as $field) : ?>
<?php if ($field->value) : ?>
<div class="cb-profile__field">
<div class="cb-profile__field-label">
<?php echo htmlspecialchars($field->title, ENT_QUOTES, 'UTF-8'); ?>
</div>
<div class="cb-profile__field-value">
<?php echo $field->value; ?>
</div>
</div>
<?php endif; ?>
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>
<?php else : ?>
<div class="alert alert-warning" role="alert">
<?php echo Text::_('COM_COMPROFILER_USER_NOT_FOUND'); ?>
</div>
<?php endif; ?>
</div>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@@ -0,0 +1,123 @@
<?php
/**
* @package Community Builder
* @subpackage com_comprofiler
*
* @copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* Mobile responsive override for Community Builder users list view
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
// Get users list
$users = $this->users ?? [];
$pagination = $this->pagination ?? null;
$search = $this->search ?? '';
$listid = $this->listid ?? 0;
?>
<div class="cb-userslist-responsive cb-component">
<div class="cb-userslist__header">
<h1 class="cb-userslist__title">
<?php echo Text::_('COM_COMPROFILER_USERLIST'); ?>
</h1>
<?php if ($this->showSearch ?? true) : ?>
<div class="cb-userslist__search">
<form action="<?php echo Route::_('index.php?option=com_comprofiler&view=userslist&listid=' . $listid); ?>"
method="post"
class="cb-userslist__search-form"
role="search"
aria-label="<?php echo Text::_('COM_COMPROFILER_SEARCH_USERS'); ?>">
<div class="cb-userslist__search-wrapper">
<label for="cb-userslist-search" class="visually-hidden">
<?php echo Text::_('COM_COMPROFILER_SEARCH'); ?>
</label>
<input type="search"
id="cb-userslist-search"
name="search"
class="cb-userslist__search-input"
placeholder="<?php echo Text::_('COM_COMPROFILER_SEARCH_USERS'); ?>"
value="<?php echo htmlspecialchars($search, ENT_QUOTES, 'UTF-8'); ?>"
aria-label="<?php echo Text::_('COM_COMPROFILER_SEARCH'); ?>">
<button type="submit"
class="cb-userslist__search-btn btn btn-primary"
aria-label="<?php echo Text::_('COM_COMPROFILER_SEARCH'); ?>">
<span class="icon-search" aria-hidden="true"></span>
<span class="cb-userslist__search-text"><?php echo Text::_('COM_COMPROFILER_SEARCH'); ?></span>
</button>
</div>
</form>
</div>
<?php endif; ?>
</div>
<?php if (!empty($users)) : ?>
<div class="cb-userslist__grid">
<?php foreach ($users as $user) : ?>
<div class="cb-userslist__user-card">
<?php if ($user->getField('avatar', null, 'html', 'none', 'list')) : ?>
<div class="cb-userslist__avatar">
<a href="<?php echo $user->getField('canvas', null, 'html', 'none', 'profile'); ?>"
aria-label="<?php echo Text::sprintf('COM_COMPROFILER_VIEW_PROFILE', htmlspecialchars($user->getField('formatname', null, 'html', 'none', 'list'), ENT_QUOTES, 'UTF-8')); ?>">
<?php echo $user->getField('avatar', null, 'html', 'none', 'list'); ?>
</a>
</div>
<?php endif; ?>
<div class="cb-userslist__user-info">
<h3 class="cb-userslist__username">
<a href="<?php echo $user->getField('canvas', null, 'html', 'none', 'profile'); ?>">
<?php echo htmlspecialchars($user->getField('formatname', null, 'html', 'none', 'list'), ENT_QUOTES, 'UTF-8'); ?>
</a>
</h3>
<?php if ($user->getField('onlinestatus', null, 'html', 'none', 'list')) : ?>
<div class="cb-userslist__status">
<?php echo $user->getField('onlinestatus', null, 'html', 'none', 'list'); ?>
</div>
<?php endif; ?>
<?php if (isset($user->fields) && !empty($user->fields)) : ?>
<div class="cb-userslist__fields">
<?php foreach ($user->fields as $field) : ?>
<?php if ($field->value) : ?>
<div class="cb-userslist__field">
<span class="cb-userslist__field-label"><?php echo htmlspecialchars($field->title, ENT_QUOTES, 'UTF-8'); ?>:</span>
<span class="cb-userslist__field-value"><?php echo $field->value; ?></span>
</div>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
<div class="cb-userslist__actions">
<a href="<?php echo $user->getField('canvas', null, 'html', 'none', 'profile'); ?>"
class="cb-userslist__btn btn btn-primary btn-sm">
<span class="icon-user" aria-hidden="true"></span>
<?php echo Text::_('COM_COMPROFILER_VIEW_PROFILE'); ?>
</a>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
<?php if ($pagination) : ?>
<div class="cb-userslist__pagination">
<?php echo $pagination->getPagesLinks(); ?>
</div>
<?php endif; ?>
<?php else : ?>
<div class="alert alert-info" role="alert">
<?php echo Text::_('COM_COMPROFILER_NO_USERS_FOUND'); ?>
</div>
<?php endif; ?>
</div>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><title></title>