first commit
This commit is contained in:
88
templates/cassiopeia/component.php
Normal file
88
templates/cassiopeia/component.php
Normal file
@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Templates.cassiopeia
|
||||
*
|
||||
* @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
|
||||
/** @var Joomla\CMS\Document\HtmlDocument $this */
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$wa = $this->getWebAssetManager();
|
||||
|
||||
// Color Theme
|
||||
$paramsColorName = $this->params->get('colorName', 'colors_standard');
|
||||
$assetColorName = 'theme.' . $paramsColorName;
|
||||
$wa->registerAndUseStyle($assetColorName, 'media/templates/site/cassiopeia/css/global/' . $paramsColorName . '.css');
|
||||
|
||||
// Use a font scheme if set in the template style options
|
||||
$paramsFontScheme = $this->params->get('useFontScheme', false);
|
||||
$fontStyles = '';
|
||||
|
||||
if ($paramsFontScheme) {
|
||||
if (stripos($paramsFontScheme, 'https://') === 0) {
|
||||
$this->getPreloadManager()->preconnect('https://fonts.googleapis.com/', ['crossorigin' => 'anonymous']);
|
||||
$this->getPreloadManager()->preconnect('https://fonts.gstatic.com/', ['crossorigin' => 'anonymous']);
|
||||
$this->getPreloadManager()->preload($paramsFontScheme, ['as' => 'style', 'crossorigin' => 'anonymous']);
|
||||
$wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, [], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'', 'crossorigin' => 'anonymous']);
|
||||
|
||||
if (preg_match_all('/family=([^?:]*):/i', $paramsFontScheme, $matches) > 0) {
|
||||
$fontStyles = '--cassiopeia-font-family-body: "' . str_replace('+', ' ', $matches[1][0]) . '", sans-serif;
|
||||
--cassiopeia-font-family-headings: "' . str_replace('+', ' ', $matches[1][1] ?? $matches[1][0]) . '", sans-serif;
|
||||
--cassiopeia-font-weight-normal: 400;
|
||||
--cassiopeia-font-weight-headings: 700;';
|
||||
}
|
||||
} else {
|
||||
$wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, ['version' => 'auto'], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'']);
|
||||
$this->getPreloadManager()->preload($wa->getAsset('style', 'fontscheme.current')->getUri() . '?' . $this->getMediaVersion(), ['as' => 'style']);
|
||||
}
|
||||
}
|
||||
|
||||
// Enable assets
|
||||
$wa->usePreset('template.cassiopeia.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr'))
|
||||
->useStyle('template.active.language')
|
||||
->useStyle('template.user')
|
||||
->useScript('template.user')
|
||||
->addInlineStyle(":root {
|
||||
--hue: 214;
|
||||
--template-bg-light: #f0f4fb;
|
||||
--template-text-dark: #495057;
|
||||
--template-text-light: #ffffff;
|
||||
--link-color: var(--link-color);
|
||||
--template-special-color: #001B4C;
|
||||
$fontStyles
|
||||
}");
|
||||
|
||||
|
||||
// Override 'template.active' asset to set correct ltr/rtl dependency
|
||||
$wa->registerStyle('template.active', '', [], [], ['template.cassiopeia.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr')]);
|
||||
|
||||
// Browsers support SVG favicons
|
||||
$this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon.svg', '', [], true, 1), 'icon', 'rel', ['type' => 'image/svg+xml']);
|
||||
$this->addHeadLink(HTMLHelper::_('image', 'favicon.ico', '', [], true, 1), 'alternate icon', 'rel', ['type' => 'image/vnd.microsoft.icon']);
|
||||
$this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon-pinned.svg', '', [], true, 1), 'mask-icon', 'rel', ['color' => '#000']);
|
||||
|
||||
// Defer font awesome
|
||||
$wa->getAsset('style', 'fontawesome')->setAttribute('rel', 'lazy-stylesheet');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
|
||||
<head>
|
||||
<jdoc:include type="metas" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<jdoc:include type="styles" />
|
||||
<jdoc:include type="scripts" />
|
||||
</head>
|
||||
<body class="<?php echo $this->direction === 'rtl' ? 'rtl' : ''; ?>">
|
||||
<jdoc:include type="message" />
|
||||
<jdoc:include type="component" />
|
||||
</body>
|
||||
</html>
|
||||
213
templates/cassiopeia/error.php
Normal file
213
templates/cassiopeia/error.php
Normal file
@ -0,0 +1,213 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Templates.cassiopeia
|
||||
*
|
||||
* @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
/** @var Joomla\CMS\Document\ErrorDocument $this */
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$input = $app->getInput();
|
||||
$wa = $this->getWebAssetManager();
|
||||
|
||||
// Detecting Active Variables
|
||||
$option = $input->getCmd('option', '');
|
||||
$view = $input->getCmd('view', '');
|
||||
$layout = $input->getCmd('layout', '');
|
||||
$task = $input->getCmd('task', '');
|
||||
$itemid = $input->getCmd('Itemid', '');
|
||||
$sitename = htmlspecialchars($app->get('sitename'), ENT_QUOTES, 'UTF-8');
|
||||
$menu = $app->getMenu()->getActive();
|
||||
$pageclass = $menu !== null ? $menu->getParams()->get('pageclass_sfx', '') : '';
|
||||
|
||||
// Template path
|
||||
$templatePath = 'media/templates/site/cassiopeia';
|
||||
|
||||
// Color Theme
|
||||
$paramsColorName = $this->params->get('colorName', 'colors_standard');
|
||||
$assetColorName = 'theme.' . $paramsColorName;
|
||||
$wa->registerAndUseStyle($assetColorName, $templatePath . '/css/global/' . $paramsColorName . '.css');
|
||||
|
||||
// Use a font scheme if set in the template style options
|
||||
$paramsFontScheme = $this->params->get('useFontScheme', false);
|
||||
$fontStyles = '';
|
||||
|
||||
if ($paramsFontScheme) {
|
||||
if (stripos($paramsFontScheme, 'https://') === 0) {
|
||||
$this->getPreloadManager()->preconnect('https://fonts.googleapis.com/', ['crossorigin' => 'anonymous']);
|
||||
$this->getPreloadManager()->preconnect('https://fonts.gstatic.com/', ['crossorigin' => 'anonymous']);
|
||||
$this->getPreloadManager()->preload($paramsFontScheme, ['as' => 'style', 'crossorigin' => 'anonymous']);
|
||||
$wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, [], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'', 'crossorigin' => 'anonymous']);
|
||||
|
||||
if (preg_match_all('/family=([^?:]*):/i', $paramsFontScheme, $matches) > 0) {
|
||||
$fontStyles = '--cassiopeia-font-family-body: "' . str_replace('+', ' ', $matches[1][0]) . '", sans-serif;
|
||||
--cassiopeia-font-family-headings: "' . str_replace('+', ' ', $matches[1][1] ?? $matches[1][0]) . '", sans-serif;
|
||||
--cassiopeia-font-weight-normal: 400;
|
||||
--cassiopeia-font-weight-headings: 700;';
|
||||
}
|
||||
} else {
|
||||
$wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, ['version' => 'auto'], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'']);
|
||||
$this->getPreloadManager()->preload($wa->getAsset('style', 'fontscheme.current')->getUri() . '?' . $this->getMediaVersion(), ['as' => 'style']);
|
||||
}
|
||||
}
|
||||
|
||||
// Enable assets
|
||||
$wa->usePreset('template.cassiopeia.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr'))
|
||||
->useStyle('template.active.language')
|
||||
->useStyle('template.user')
|
||||
->useScript('template.user')
|
||||
->addInlineStyle(":root {
|
||||
--hue: 214;
|
||||
--template-bg-light: #f0f4fb;
|
||||
--template-text-dark: #495057;
|
||||
--template-text-light: #ffffff;
|
||||
--link-color: var(--link-color);
|
||||
--template-special-color: #001B4C;
|
||||
$fontStyles
|
||||
}");
|
||||
|
||||
// Override 'template.active' asset to set correct ltr/rtl dependency
|
||||
$wa->registerStyle('template.active', '', [], [], ['template.cassiopeia.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr')]);
|
||||
|
||||
// Browsers support SVG favicons
|
||||
$this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon.svg', '', [], true, 1), 'icon', 'rel', ['type' => 'image/svg+xml']);
|
||||
$this->addHeadLink(HTMLHelper::_('image', 'favicon.ico', '', [], true, 1), 'alternate icon', 'rel', ['type' => 'image/vnd.microsoft.icon']);
|
||||
$this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon-pinned.svg', '', [], true, 1), 'mask-icon', 'rel', ['color' => '#000']);
|
||||
|
||||
// Logo file or site title param
|
||||
if ($this->params->get('logoFile')) {
|
||||
$logo = HTMLHelper::_('image', Uri::root(false) . htmlspecialchars($this->params->get('logoFile'), ENT_QUOTES), $sitename, ['loading' => 'eager', 'decoding' => 'async'], false, 0);
|
||||
} elseif ($this->params->get('siteTitle')) {
|
||||
$logo = '<span title="' . $sitename . '">' . htmlspecialchars($this->params->get('siteTitle'), ENT_COMPAT, 'UTF-8') . '</span>';
|
||||
} else {
|
||||
$logo = HTMLHelper::_('image', 'logo.svg', $sitename, ['class' => 'logo d-inline-block', 'loading' => 'eager', 'decoding' => 'async'], true, 0);
|
||||
}
|
||||
|
||||
// Container
|
||||
$wrapper = $this->params->get('fluidContainer') ? 'wrapper-fluid' : 'wrapper-static';
|
||||
|
||||
$this->setMetaData('viewport', 'width=device-width, initial-scale=1');
|
||||
|
||||
// Defer font awesome
|
||||
$wa->getAsset('style', 'fontawesome')->setAttribute('rel', 'lazy-stylesheet');
|
||||
|
||||
// Get the error code
|
||||
$errorCode = $this->error->getCode();
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
|
||||
<head>
|
||||
<jdoc:include type="metas" />
|
||||
<jdoc:include type="styles" />
|
||||
<jdoc:include type="scripts" />
|
||||
</head>
|
||||
|
||||
<body class="site error_site <?php echo $option
|
||||
. ' ' . $wrapper
|
||||
. ' view-' . $view
|
||||
. ($layout ? ' layout-' . $layout : ' no-layout')
|
||||
. ($task ? ' task-' . $task : ' no-task')
|
||||
. ($itemid ? ' itemid-' . $itemid : '')
|
||||
. ' ' . $pageclass;
|
||||
echo ($this->direction == 'rtl' ? ' rtl' : '');
|
||||
?>">
|
||||
<header class="header container-header full-width">
|
||||
<?php if ($this->params->get('brand', 1)) : ?>
|
||||
<div class="grid-child">
|
||||
<div class="navbar-brand">
|
||||
<a class="brand-logo" href="<?php echo $this->baseurl; ?>/">
|
||||
<?php echo $logo; ?>
|
||||
</a>
|
||||
<?php if ($this->params->get('siteDescription')) : ?>
|
||||
<div class="site-description"><?php echo htmlspecialchars($this->params->get('siteDescription')); ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->countModules('menu') || $this->countModules('search')) : ?>
|
||||
<div class="grid-child container-nav">
|
||||
<?php if ($this->countModules('menu')) : ?>
|
||||
<jdoc:include type="modules" name="menu" style="none" />
|
||||
<?php endif; ?>
|
||||
<?php if ($this->countModules('search')) : ?>
|
||||
<div class="container-search">
|
||||
<jdoc:include type="modules" name="search" style="none" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</header>
|
||||
|
||||
<div class="site-grid">
|
||||
<div class="grid-child container-component">
|
||||
<?php if ($this->countModules('error-' . $errorCode)) : ?>
|
||||
<div class="container">
|
||||
<jdoc:include type="modules" name="error-<?php echo $errorCode; ?>" style="none" />
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<h1 class="page-header"><?php echo Text::_('JERROR_LAYOUT_PAGE_NOT_FOUND'); ?></h1>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<jdoc:include type="message" />
|
||||
<p><strong><?php echo Text::_('JERROR_LAYOUT_ERROR_HAS_OCCURRED_WHILE_PROCESSING_YOUR_REQUEST'); ?></strong></p>
|
||||
<p><?php echo Text::_('JERROR_LAYOUT_NOT_ABLE_TO_VISIT'); ?></p>
|
||||
<ul>
|
||||
<li><?php echo Text::_('JERROR_LAYOUT_AN_OUT_OF_DATE_BOOKMARK_FAVOURITE'); ?></li>
|
||||
<li><?php echo Text::_('JERROR_LAYOUT_MIS_TYPED_ADDRESS'); ?></li>
|
||||
<li><?php echo Text::_('JERROR_LAYOUT_SEARCH_ENGINE_OUT_OF_DATE_LISTING'); ?></li>
|
||||
<li><?php echo Text::_('JERROR_LAYOUT_YOU_HAVE_NO_ACCESS_TO_THIS_PAGE'); ?></li>
|
||||
</ul>
|
||||
<p><?php echo Text::_('JERROR_LAYOUT_GO_TO_THE_HOME_PAGE'); ?></p>
|
||||
<p><a href="<?php echo $this->baseurl; ?>/index.php" class="btn btn-secondary"><span class="icon-home" aria-hidden="true"></span> <?php echo Text::_('JERROR_LAYOUT_HOME_PAGE'); ?></a></p>
|
||||
<hr>
|
||||
<p><?php echo Text::_('JERROR_LAYOUT_PLEASE_CONTACT_THE_SYSTEM_ADMINISTRATOR'); ?></p>
|
||||
<blockquote>
|
||||
<span class="badge bg-secondary"><?php echo $this->error->getCode(); ?></span> <?php echo htmlspecialchars($this->error->getMessage(), ENT_QUOTES, 'UTF-8'); ?>
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->debug) : ?>
|
||||
<div>
|
||||
<?php echo $this->renderBacktrace(); ?>
|
||||
<?php // Check if there are more Exceptions and render their data as well ?>
|
||||
<?php if ($this->error->getPrevious()) : ?>
|
||||
<?php $loop = true; ?>
|
||||
<?php // Reference $this->_error here and in the loop as setError() assigns errors to this property and we need this for the backtrace to work correctly ?>
|
||||
<?php // Make the first assignment to setError() outside the loop so the loop does not skip Exceptions ?>
|
||||
<?php $this->setError($this->_error->getPrevious()); ?>
|
||||
<?php while ($loop === true) : ?>
|
||||
<p><strong><?php echo Text::_('JERROR_LAYOUT_PREVIOUS_ERROR'); ?></strong></p>
|
||||
<p><?php echo htmlspecialchars($this->_error->getMessage(), ENT_QUOTES, 'UTF-8'); ?></p>
|
||||
<?php echo $this->renderBacktrace(); ?>
|
||||
<?php $loop = $this->setError($this->_error->getPrevious()); ?>
|
||||
<?php endwhile; ?>
|
||||
<?php // Reset the main error object to the base error ?>
|
||||
<?php $this->setError($this->error); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($this->countModules('footer')) : ?>
|
||||
<footer class="container-footer footer full-width">
|
||||
<div class="grid-child">
|
||||
<jdoc:include type="modules" name="footer" style="none" />
|
||||
</div>
|
||||
</footer>
|
||||
<?php endif; ?>
|
||||
|
||||
<jdoc:include type="modules" name="debug" style="none" />
|
||||
</body>
|
||||
</html>
|
||||
63
templates/cassiopeia/html/layouts/chromes/card.php
Normal file
63
templates/cassiopeia/html/layouts/chromes/card.php
Normal file
@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Templates.cassiopeia
|
||||
*
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
$module = $displayData['module'];
|
||||
$params = $displayData['params'];
|
||||
$attribs = $displayData['attribs'];
|
||||
|
||||
if ($module->content === null || $module->content === '') {
|
||||
return;
|
||||
}
|
||||
|
||||
$moduleTag = $params->get('module_tag', 'div');
|
||||
$moduleAttribs = [];
|
||||
$moduleAttribs['class'] = $module->position . ' card ' . htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_QUOTES, 'UTF-8');
|
||||
$headerTag = htmlspecialchars($params->get('header_tag', 'h3'), ENT_QUOTES, 'UTF-8');
|
||||
$headerClass = htmlspecialchars($params->get('header_class', ''), ENT_QUOTES, 'UTF-8');
|
||||
$headerAttribs = [];
|
||||
$headerAttribs['class'] = $headerClass;
|
||||
|
||||
// Only output a header class if it is not card-title
|
||||
if ($headerClass !== 'card-title') :
|
||||
$headerAttribs['class'] = 'card-header ' . $headerClass;
|
||||
endif;
|
||||
|
||||
// Add class from attributes if any
|
||||
if (!empty($attribs['class'])) {
|
||||
$moduleAttribs['class'] .= ' ' . htmlspecialchars($attribs['class'], ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
|
||||
// Only add aria if the moduleTag is not a div
|
||||
if ($moduleTag !== 'div') {
|
||||
if ($module->showtitle) :
|
||||
$moduleAttribs['aria-labelledby'] = 'mod-' . $module->id;
|
||||
$headerAttribs['id'] = 'mod-' . $module->id;
|
||||
else :
|
||||
$moduleAttribs['aria-label'] = $module->title;
|
||||
endif;
|
||||
}
|
||||
|
||||
$header = '<' . $headerTag . ' ' . ArrayHelper::toString($headerAttribs) . '>' . $module->title . '</' . $headerTag . '>';
|
||||
?>
|
||||
<<?php echo $moduleTag; ?> <?php echo ArrayHelper::toString($moduleAttribs); ?>>
|
||||
<?php if ($module->showtitle && $headerClass !== 'card-title') : ?>
|
||||
<?php echo $header; ?>
|
||||
<?php endif; ?>
|
||||
<div class="card-body">
|
||||
<?php if ($module->showtitle && $headerClass === 'card-title') : ?>
|
||||
<?php echo $header; ?>
|
||||
<?php endif; ?>
|
||||
<?php echo $module->content; ?>
|
||||
</div>
|
||||
</<?php echo $moduleTag; ?>>
|
||||
52
templates/cassiopeia/html/layouts/chromes/noCard.php
Normal file
52
templates/cassiopeia/html/layouts/chromes/noCard.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Templates.cassiopeia
|
||||
*
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
$module = $displayData['module'];
|
||||
$params = $displayData['params'];
|
||||
$attribs = $displayData['attribs'];
|
||||
|
||||
if ($module->content === null || $module->content === '') {
|
||||
return;
|
||||
}
|
||||
|
||||
$moduleTag = $params->get('module_tag', 'div');
|
||||
$moduleAttribs = [];
|
||||
$moduleAttribs['class'] = $module->position . ' no-card ' . htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_QUOTES, 'UTF-8');
|
||||
$headerTag = htmlspecialchars($params->get('header_tag', 'h3'), ENT_QUOTES, 'UTF-8');
|
||||
$headerClass = htmlspecialchars($params->get('header_class', ''), ENT_QUOTES, 'UTF-8');
|
||||
$headerAttribs = [];
|
||||
|
||||
// Only output a header class if one is set
|
||||
if ($headerClass !== '') {
|
||||
$headerAttribs['class'] = $headerClass;
|
||||
}
|
||||
|
||||
// Only add aria if the moduleTag is not a div
|
||||
if ($moduleTag !== 'div') {
|
||||
if ($module->showtitle) :
|
||||
$moduleAttribs['aria-labelledby'] = 'mod-' . $module->id;
|
||||
$headerAttribs['id'] = 'mod-' . $module->id;
|
||||
else :
|
||||
$moduleAttribs['aria-label'] = $module->title;
|
||||
endif;
|
||||
}
|
||||
|
||||
$header = '<' . $headerTag . ' ' . ArrayHelper::toString($headerAttribs) . '>' . $module->title . '</' . $headerTag . '>';
|
||||
?>
|
||||
<<?php echo $moduleTag; ?> <?php echo ArrayHelper::toString($moduleAttribs); ?>>
|
||||
<?php if ($module->showtitle) : ?>
|
||||
<?php echo $header; ?>
|
||||
<?php endif; ?>
|
||||
<?php echo $module->content; ?>
|
||||
</<?php echo $moduleTag; ?>>
|
||||
31
templates/cassiopeia/html/mod_custom/banner.php
Normal file
31
templates/cassiopeia/html/mod_custom/banner.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_custom
|
||||
*
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
$modId = 'mod-custom' . $module->id;
|
||||
|
||||
if ($params->get('backgroundimage')) {
|
||||
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
|
||||
$wa = $app->getDocument()->getWebAssetManager();
|
||||
$wa->addInlineStyle('
|
||||
#' . $modId . '{background-image: url("' . Uri::root(true) . '/' . HTMLHelper::_('cleanImageURL', $params->get('backgroundimage'))->url . '");}
|
||||
', ['name' => $modId]);
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="mod-custom custom banner-overlay" id="<?php echo $modId; ?>">
|
||||
<div class="overlay">
|
||||
<?php echo $module->content; ?>
|
||||
</div>
|
||||
</div>
|
||||
26
templates/cassiopeia/html/mod_menu/collapse-metismenu.php
Normal file
26
templates/cassiopeia/html/mod_menu/collapse-metismenu.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_menu
|
||||
*
|
||||
* @copyright (C) 2021 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
HTMLHelper::_('bootstrap.collapse');
|
||||
?>
|
||||
|
||||
<nav class="navbar navbar-expand-lg" aria-label="<?php echo htmlspecialchars($module->title, ENT_QUOTES, 'UTF-8'); ?>">
|
||||
<button class="navbar-toggler navbar-toggler-right" type="button" data-bs-toggle="collapse" data-bs-target="#navbar<?php echo $module->id; ?>" aria-controls="navbar<?php echo $module->id; ?>" aria-expanded="false" aria-label="<?php echo Text::_('MOD_MENU_TOGGLE'); ?>">
|
||||
<span class="icon-menu" aria-hidden="true"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbar<?php echo $module->id; ?>">
|
||||
<?php require __DIR__ . '/dropdown-metismenu.php'; ?>
|
||||
</div>
|
||||
</nav>
|
||||
107
templates/cassiopeia/html/mod_menu/dropdown-metismenu.php
Normal file
107
templates/cassiopeia/html/mod_menu/dropdown-metismenu.php
Normal file
@ -0,0 +1,107 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_menu
|
||||
*
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Helper\ModuleHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
/** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
|
||||
$wa = $app->getDocument()->getWebAssetManager();
|
||||
$wa->registerAndUseScript('metismenu', 'media/templates/site/cassiopeia/js/mod_menu/menu-metismenu.min.js', [], ['defer' => true], ['metismenujs']);
|
||||
|
||||
$attributes = [];
|
||||
$attributes['class'] = 'mod-menu mod-menu_dropdown-metismenu metismenu mod-list ' . $class_sfx;
|
||||
|
||||
if ($tagId = $params->get('tag_id', '')) {
|
||||
$attributes['id'] = $tagId;
|
||||
}
|
||||
|
||||
$start = (int) $params->get('startLevel', 1);
|
||||
|
||||
?>
|
||||
<ul <?php echo ArrayHelper::toString($attributes); ?>>
|
||||
<?php foreach ($list as $i => $item) {
|
||||
// Skip sub-menu items if they are set to be hidden in the module's options
|
||||
if (!$showAll && $item->level > $start) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$itemParams = $item->getParams();
|
||||
$class = [];
|
||||
$class[] = 'metismenu-item item-' . $item->id . ' level-' . ($item->level - $start + 1);
|
||||
|
||||
if ($item->id == $default_id) {
|
||||
$class[] = 'default';
|
||||
}
|
||||
|
||||
if ($item->id == $active_id || ($item->type === 'alias' && $itemParams->get('aliasoptions') == $active_id)) {
|
||||
$class[] = 'current';
|
||||
}
|
||||
|
||||
if (in_array($item->id, $path)) {
|
||||
$class[] = 'active';
|
||||
} elseif ($item->type === 'alias') {
|
||||
$aliasToId = $itemParams->get('aliasoptions');
|
||||
|
||||
if (count($path) > 0 && $aliasToId == $path[count($path) - 1]) {
|
||||
$class[] = 'active';
|
||||
} elseif (in_array($aliasToId, $path)) {
|
||||
$class[] = 'alias-parent-active';
|
||||
}
|
||||
}
|
||||
|
||||
if ($item->type === 'separator') {
|
||||
$class[] = 'divider';
|
||||
}
|
||||
|
||||
if ($showAll) {
|
||||
if ($item->deeper) {
|
||||
$class[] = 'deeper';
|
||||
}
|
||||
|
||||
if ($item->parent) {
|
||||
$class[] = 'parent';
|
||||
}
|
||||
}
|
||||
|
||||
echo '<li class="' . implode(' ', $class) . '">';
|
||||
|
||||
switch ($item->type) :
|
||||
case 'separator':
|
||||
case 'component':
|
||||
case 'heading':
|
||||
case 'url':
|
||||
require ModuleHelper::getLayoutPath('mod_menu', 'dropdown-metismenu_' . $item->type);
|
||||
break;
|
||||
|
||||
default:
|
||||
require ModuleHelper::getLayoutPath('mod_menu', 'dropdown-metismenu_url');
|
||||
endswitch;
|
||||
|
||||
switch (true) :
|
||||
// The next item is deeper.
|
||||
case $showAll && $item->deeper:
|
||||
echo '<ul class="mm-collapse">';
|
||||
break;
|
||||
|
||||
// The next item is shallower.
|
||||
case $item->shallower:
|
||||
echo '</li>';
|
||||
echo str_repeat('</ul></li>', $item->level_diff);
|
||||
break;
|
||||
|
||||
// The next item is on the same level.
|
||||
default:
|
||||
echo '</li>';
|
||||
break;
|
||||
endswitch;
|
||||
}
|
||||
?></ul>
|
||||
@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_menu
|
||||
*
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\Filter\OutputFilter;
|
||||
|
||||
$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;
|
||||
}
|
||||
|
||||
if ($item->id == $active_id) {
|
||||
$attributes['aria-current'] = 'location';
|
||||
|
||||
if ($item->current) {
|
||||
$attributes['aria-current'] = 'page';
|
||||
}
|
||||
}
|
||||
|
||||
$linktype = $item->title;
|
||||
|
||||
if ($item->menu_icon) {
|
||||
// The link is an icon
|
||||
if ($itemParams->get('menu_text', 1)) {
|
||||
// If the link text is to be displayed, the icon is added with aria-hidden
|
||||
$linktype = '<span class="p-2 ' . $item->menu_icon . '" aria-hidden="true"></span>' . $item->title;
|
||||
} else {
|
||||
// If the icon itself is the link, it needs a visually hidden text
|
||||
$linktype = '<span class="p-2 ' . $item->menu_icon . '" aria-hidden="true"></span><span class="visually-hidden">' . $item->title . '</span>';
|
||||
}
|
||||
} elseif ($item->menu_image) {
|
||||
// The link is an image, maybe with an own class
|
||||
$image_attributes = [];
|
||||
|
||||
if ($item->menu_image_css) {
|
||||
$image_attributes['class'] = $item->menu_image_css;
|
||||
}
|
||||
|
||||
$linktype = HTMLHelper::_('image', $item->menu_image, $item->title, $image_attributes);
|
||||
|
||||
if ($itemParams->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(OutputFilter::ampReplace(htmlspecialchars($item->flink, ENT_COMPAT, 'UTF-8', false)), $linktype, $attributes);
|
||||
|
||||
if ($showAll && $item->deeper) {
|
||||
echo '<button class="mm-collapsed mm-toggler mm-toggler-link" aria-haspopup="true" aria-expanded="false" aria-label="' . $item->title . '"></button>';
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_menu
|
||||
*
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
$attributes = [];
|
||||
|
||||
if ($item->anchor_title) {
|
||||
$attributes['title'] = $item->anchor_title;
|
||||
}
|
||||
|
||||
$attributes['class'] = 'mod-menu__heading nav-header';
|
||||
$attributes['class'] .= $item->anchor_css ? ' ' . $item->anchor_css : null;
|
||||
|
||||
$linktype = $item->title;
|
||||
|
||||
if ($item->menu_icon) {
|
||||
// The link is an icon
|
||||
if ($itemParams->get('menu_text', 1)) {
|
||||
// If the link text is to be displayed, the icon is added with aria-hidden
|
||||
$linktype = '<span class="p-2 ' . $item->menu_icon . '" aria-hidden="true"></span>' . $item->title;
|
||||
} else {
|
||||
// If the icon itself is the link, it needs a visually hidden text
|
||||
$linktype = '<span class="p-2 ' . $item->menu_icon . '" aria-hidden="true"></span><span class="visually-hidden">' . $item->title . '</span>';
|
||||
}
|
||||
} elseif ($item->menu_image) {
|
||||
// The link is an image, maybe with an own class
|
||||
$image_attributes = [];
|
||||
|
||||
if ($item->menu_image_css) {
|
||||
$image_attributes['class'] = $item->menu_image_css;
|
||||
}
|
||||
|
||||
$linktype = HTMLHelper::_('image', $item->menu_image, $item->title, $image_attributes);
|
||||
|
||||
if ($itemParams->get('menu_text', 1)) {
|
||||
$linktype .= '<span class="image-title">' . $item->title . '</span>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($showAll && $item->deeper) {
|
||||
$attributes['class'] .= ' mm-collapsed mm-toggler mm-toggler-nolink';
|
||||
$attributes['aria-haspopup'] = 'true';
|
||||
$attributes['aria-expanded'] = 'false';
|
||||
echo '<button ' . ArrayHelper::toString($attributes) . '>' . $linktype . '</button>';
|
||||
} else {
|
||||
echo '<span ' . ArrayHelper::toString($attributes) . '>' . $linktype . '</span>';
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_menu
|
||||
*
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
$attributes = [];
|
||||
|
||||
if ($item->anchor_title) {
|
||||
$attributes['title'] = $item->anchor_title;
|
||||
}
|
||||
|
||||
$attributes['class'] = 'mod-menu__separator separator';
|
||||
$attributes['class'] .= $item->anchor_css ? ' ' . $item->anchor_css : null;
|
||||
|
||||
$linktype = $item->title;
|
||||
|
||||
if ($item->menu_icon) {
|
||||
// The link is an icon
|
||||
if ($itemParams->get('menu_text', 1)) {
|
||||
// If the link text is to be displayed, the icon is added with aria-hidden
|
||||
$linktype = '<span class="p-2 ' . $item->menu_icon . '" aria-hidden="true"></span>' . $item->title;
|
||||
} else {
|
||||
// If the icon itself is the link, it needs a visually hidden text
|
||||
$linktype = '<span class="p-2 ' . $item->menu_icon . '" aria-hidden="true"></span><span class="visually-hidden">' . $item->title . '</span>';
|
||||
}
|
||||
} elseif ($item->menu_image) {
|
||||
// The link is an image, maybe with an own class
|
||||
$image_attributes = [];
|
||||
|
||||
if ($item->menu_image_css) {
|
||||
$image_attributes['class'] = $item->menu_image_css;
|
||||
}
|
||||
|
||||
$linktype = HTMLHelper::_('image', $item->menu_image, $item->title, $image_attributes);
|
||||
|
||||
if ($itemParams->get('menu_text', 1)) {
|
||||
$linktype .= '<span class="image-title">' . $item->title . '</span>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($showAll && $item->deeper) {
|
||||
$attributes['class'] .= ' mm-collapsed mm-toggler mm-toggler-nolink';
|
||||
$attributes['aria-haspopup'] = 'true';
|
||||
$attributes['aria-expanded'] = 'false';
|
||||
echo '<button ' . ArrayHelper::toString($attributes) . '>' . $linktype . '</button>';
|
||||
} else {
|
||||
echo '<span ' . ArrayHelper::toString($attributes) . '>' . $linktype . '</span>';
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_menu
|
||||
*
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\Filter\OutputFilter;
|
||||
|
||||
$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_icon) {
|
||||
// The link is an icon
|
||||
if ($itemParams->get('menu_text', 1)) {
|
||||
// If the link text is to be displayed, the icon is added with aria-hidden
|
||||
$linktype = '<span class="p-2 ' . $item->menu_icon . '" aria-hidden="true"></span>' . $item->title;
|
||||
} else {
|
||||
// If the icon itself is the link, it needs a visually hidden text
|
||||
$linktype = '<span class="p-2 ' . $item->menu_icon . '" aria-hidden="true"></span><span class="visually-hidden">' . $item->title . '</span>';
|
||||
}
|
||||
} elseif ($item->menu_image) {
|
||||
// The link is an image, maybe with an own class
|
||||
$image_attributes = [];
|
||||
|
||||
if ($item->menu_image_css) {
|
||||
$image_attributes['class'] = $item->menu_image_css;
|
||||
}
|
||||
|
||||
$linktype = HTMLHelper::_('image', $item->menu_image, $item->title, $image_attributes);
|
||||
|
||||
if ($itemParams->get('menu_text', 1)) {
|
||||
$linktype .= '<span class="image-title">' . $item->title . '</span>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($item->browserNav == 1) {
|
||||
$attributes['target'] = '_blank';
|
||||
$attributes['rel'] = 'noopener noreferrer';
|
||||
|
||||
if ($item->anchor_rel == 'nofollow') {
|
||||
$attributes['rel'] .= ' nofollow';
|
||||
}
|
||||
} elseif ($item->browserNav == 2) {
|
||||
$options = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,' . $params->get('window_open');
|
||||
|
||||
$attributes['onclick'] = "window.open(this.href, 'targetWindow', '" . $options . "'); return false;";
|
||||
}
|
||||
|
||||
echo HTMLHelper::link(OutputFilter::ampReplace(htmlspecialchars($item->flink, ENT_COMPAT, 'UTF-8', false)), $linktype, $attributes);
|
||||
|
||||
if ($showAll && $item->deeper) {
|
||||
echo '<button class="mm-collapsed mm-toggler mm-toggler-link" aria-haspopup="true" aria-expanded="false" aria-label="' . $item->title . '"></button>';
|
||||
}
|
||||
1
templates/cassiopeia/html/tinymce/index.html
Normal file
1
templates/cassiopeia/html/tinymce/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
257
templates/cassiopeia/index.php
Normal file
257
templates/cassiopeia/index.php
Normal file
@ -0,0 +1,257 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Templates.cassiopeia
|
||||
*
|
||||
* @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
/** @var Joomla\CMS\Document\HtmlDocument $this */
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$input = $app->getInput();
|
||||
$wa = $this->getWebAssetManager();
|
||||
|
||||
// Browsers support SVG favicons
|
||||
$this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon.svg', '', [], true, 1), 'icon', 'rel', ['type' => 'image/svg+xml']);
|
||||
$this->addHeadLink(HTMLHelper::_('image', 'favicon.ico', '', [], true, 1), 'alternate icon', 'rel', ['type' => 'image/vnd.microsoft.icon']);
|
||||
$this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon-pinned.svg', '', [], true, 1), 'mask-icon', 'rel', ['color' => '#000']);
|
||||
|
||||
// Detecting Active Variables
|
||||
$option = $input->getCmd('option', '');
|
||||
$view = $input->getCmd('view', '');
|
||||
$layout = $input->getCmd('layout', '');
|
||||
$task = $input->getCmd('task', '');
|
||||
$itemid = $input->getCmd('Itemid', '');
|
||||
$sitename = htmlspecialchars($app->get('sitename'), ENT_QUOTES, 'UTF-8');
|
||||
$menu = $app->getMenu()->getActive();
|
||||
$pageclass = $menu !== null ? $menu->getParams()->get('pageclass_sfx', '') : '';
|
||||
|
||||
// Color Theme
|
||||
$paramsColorName = $this->params->get('colorName', 'colors_standard');
|
||||
$assetColorName = 'theme.' . $paramsColorName;
|
||||
$wa->registerAndUseStyle($assetColorName, 'media/templates/site/cassiopeia/css/global/' . $paramsColorName . '.css');
|
||||
|
||||
// Use a font scheme if set in the template style options
|
||||
$paramsFontScheme = $this->params->get('useFontScheme', false);
|
||||
$fontStyles = '';
|
||||
|
||||
if ($paramsFontScheme) {
|
||||
if (stripos($paramsFontScheme, 'https://') === 0) {
|
||||
$this->getPreloadManager()->preconnect('https://fonts.googleapis.com/', ['crossorigin' => 'anonymous']);
|
||||
$this->getPreloadManager()->preconnect('https://fonts.gstatic.com/', ['crossorigin' => 'anonymous']);
|
||||
$this->getPreloadManager()->preload($paramsFontScheme, ['as' => 'style', 'crossorigin' => 'anonymous']);
|
||||
$wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, [], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'', 'crossorigin' => 'anonymous']);
|
||||
|
||||
if (preg_match_all('/family=([^?:]*):/i', $paramsFontScheme, $matches) > 0) {
|
||||
$fontStyles = '--cassiopeia-font-family-body: "' . str_replace('+', ' ', $matches[1][0]) . '", sans-serif;
|
||||
--cassiopeia-font-family-headings: "' . str_replace('+', ' ', $matches[1][1] ?? $matches[1][0]) . '", sans-serif;
|
||||
--cassiopeia-font-weight-normal: 400;
|
||||
--cassiopeia-font-weight-headings: 700;';
|
||||
}
|
||||
} elseif ($paramsFontScheme === 'system') {
|
||||
$fontStylesBody = $this->params->get('systemFontBody', '');
|
||||
$fontStylesHeading = $this->params->get('systemFontHeading', '');
|
||||
|
||||
if ($fontStylesBody) {
|
||||
$fontStyles = '--cassiopeia-font-family-body: ' . $fontStylesBody . ';
|
||||
--cassiopeia-font-weight-normal: 400;';
|
||||
}
|
||||
if ($fontStylesHeading) {
|
||||
$fontStyles .= '--cassiopeia-font-family-headings: ' . $fontStylesHeading . ';
|
||||
--cassiopeia-font-weight-headings: 700;';
|
||||
}
|
||||
} else {
|
||||
$wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, ['version' => 'auto'], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'']);
|
||||
$this->getPreloadManager()->preload($wa->getAsset('style', 'fontscheme.current')->getUri() . '?' . $this->getMediaVersion(), ['as' => 'style']);
|
||||
}
|
||||
}
|
||||
|
||||
// Enable assets
|
||||
$wa->usePreset('template.cassiopeia.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr'))
|
||||
->useStyle('template.active.language')
|
||||
->useStyle('template.user')
|
||||
->useScript('template.user')
|
||||
->addInlineStyle(":root {
|
||||
--hue: 214;
|
||||
--template-bg-light: #f0f4fb;
|
||||
--template-text-dark: #495057;
|
||||
--template-text-light: #ffffff;
|
||||
--template-link-color: var(--link-color);
|
||||
--template-special-color: #001B4C;
|
||||
$fontStyles
|
||||
}");
|
||||
|
||||
// Override 'template.active' asset to set correct ltr/rtl dependency
|
||||
$wa->registerStyle('template.active', '', [], [], ['template.cassiopeia.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr')]);
|
||||
|
||||
// Logo file or site title param
|
||||
if ($this->params->get('logoFile')) {
|
||||
$logo = HTMLHelper::_('image', Uri::root(false) . htmlspecialchars($this->params->get('logoFile'), ENT_QUOTES), $sitename, ['loading' => 'eager', 'decoding' => 'async'], false, 0);
|
||||
} elseif ($this->params->get('siteTitle')) {
|
||||
$logo = '<span title="' . $sitename . '">' . htmlspecialchars($this->params->get('siteTitle'), ENT_COMPAT, 'UTF-8') . '</span>';
|
||||
} else {
|
||||
$logo = HTMLHelper::_('image', 'logo.svg', $sitename, ['class' => 'logo d-inline-block', 'loading' => 'eager', 'decoding' => 'async'], true, 0);
|
||||
}
|
||||
|
||||
$hasClass = '';
|
||||
|
||||
if ($this->countModules('sidebar-left', true)) {
|
||||
$hasClass .= ' has-sidebar-left';
|
||||
}
|
||||
|
||||
if ($this->countModules('sidebar-right', true)) {
|
||||
$hasClass .= ' has-sidebar-right';
|
||||
}
|
||||
|
||||
// Container
|
||||
$wrapper = $this->params->get('fluidContainer') ? 'wrapper-fluid' : 'wrapper-static';
|
||||
|
||||
$this->setMetaData('viewport', 'width=device-width, initial-scale=1');
|
||||
|
||||
$stickyHeader = $this->params->get('stickyHeader') ? 'position-sticky sticky-top' : '';
|
||||
|
||||
// Defer fontawesome for increased performance. Once the page is loaded javascript changes it to a stylesheet.
|
||||
$wa->getAsset('style', 'fontawesome')->setAttribute('rel', 'lazy-stylesheet');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
|
||||
|
||||
<head>
|
||||
<jdoc:include type="metas" />
|
||||
<jdoc:include type="styles" />
|
||||
<jdoc:include type="scripts" />
|
||||
</head>
|
||||
|
||||
<body class="site <?php echo $option
|
||||
. ' ' . $wrapper
|
||||
. ' view-' . $view
|
||||
. ($layout ? ' layout-' . $layout : ' no-layout')
|
||||
. ($task ? ' task-' . $task : ' no-task')
|
||||
. ($itemid ? ' itemid-' . $itemid : '')
|
||||
. ($pageclass ? ' ' . $pageclass : '')
|
||||
. $hasClass
|
||||
. ($this->direction == 'rtl' ? ' rtl' : '');
|
||||
?>">
|
||||
<header class="header container-header full-width<?php echo $stickyHeader ? ' ' . $stickyHeader : ''; ?>">
|
||||
|
||||
<?php if ($this->countModules('topbar')) : ?>
|
||||
<div class="container-topbar">
|
||||
<jdoc:include type="modules" name="topbar" style="none" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->countModules('below-top')) : ?>
|
||||
<div class="grid-child container-below-top">
|
||||
<jdoc:include type="modules" name="below-top" style="none" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->params->get('brand', 1)) : ?>
|
||||
<div class="grid-child">
|
||||
<div class="navbar-brand">
|
||||
<a class="brand-logo" href="<?php echo $this->baseurl; ?>/">
|
||||
<?php echo $logo; ?>
|
||||
</a>
|
||||
<?php if ($this->params->get('siteDescription')) : ?>
|
||||
<div class="site-description"><?php echo htmlspecialchars($this->params->get('siteDescription')); ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->countModules('menu', true) || $this->countModules('search', true)) : ?>
|
||||
<div class="grid-child container-nav">
|
||||
<?php if ($this->countModules('menu', true)) : ?>
|
||||
<jdoc:include type="modules" name="menu" style="none" />
|
||||
<?php endif; ?>
|
||||
<?php if ($this->countModules('search', true)) : ?>
|
||||
<div class="container-search">
|
||||
<jdoc:include type="modules" name="search" style="none" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</header>
|
||||
|
||||
<div class="site-grid">
|
||||
<?php if ($this->countModules('banner', true)) : ?>
|
||||
<div class="container-banner full-width">
|
||||
<jdoc:include type="modules" name="banner" style="none" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->countModules('top-a', true)) : ?>
|
||||
<div class="grid-child container-top-a">
|
||||
<jdoc:include type="modules" name="top-a" style="card" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->countModules('top-b', true)) : ?>
|
||||
<div class="grid-child container-top-b">
|
||||
<jdoc:include type="modules" name="top-b" style="card" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->countModules('sidebar-left', true)) : ?>
|
||||
<div class="grid-child container-sidebar-left">
|
||||
<jdoc:include type="modules" name="sidebar-left" style="card" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="grid-child container-component">
|
||||
<jdoc:include type="modules" name="breadcrumbs" style="none" />
|
||||
<jdoc:include type="modules" name="main-top" style="card" />
|
||||
<jdoc:include type="message" />
|
||||
<main>
|
||||
<jdoc:include type="component" />
|
||||
</main>
|
||||
<jdoc:include type="modules" name="main-bottom" style="card" />
|
||||
</div>
|
||||
|
||||
<?php if ($this->countModules('sidebar-right', true)) : ?>
|
||||
<div class="grid-child container-sidebar-right">
|
||||
<jdoc:include type="modules" name="sidebar-right" style="card" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->countModules('bottom-a', true)) : ?>
|
||||
<div class="grid-child container-bottom-a">
|
||||
<jdoc:include type="modules" name="bottom-a" style="card" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->countModules('bottom-b', true)) : ?>
|
||||
<div class="grid-child container-bottom-b">
|
||||
<jdoc:include type="modules" name="bottom-b" style="card" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->countModules('footer', true)) : ?>
|
||||
<footer class="container-footer footer full-width">
|
||||
<div class="grid-child">
|
||||
<jdoc:include type="modules" name="footer" style="none" />
|
||||
</div>
|
||||
</footer>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->params->get('backTop') == 1) : ?>
|
||||
<a href="#top" id="back-top" class="back-to-top-link" aria-label="<?php echo Text::_('TPL_CASSIOPEIA_BACKTOTOP'); ?>">
|
||||
<span class="icon-arrow-up icon-fw" aria-hidden="true"></span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<jdoc:include type="modules" name="debug" style="none" />
|
||||
</body>
|
||||
|
||||
</html>
|
||||
110
templates/cassiopeia/joomla.asset.json
Normal file
110
templates/cassiopeia/joomla.asset.json
Normal file
@ -0,0 +1,110 @@
|
||||
{
|
||||
"$schema": "https://developer.joomla.org/schemas/json-schema/web_assets.json",
|
||||
"name": "cassiopeia",
|
||||
"version": "4.0.0",
|
||||
"description": "This file contains details of the assets used by Cassiopeia, the default Joomla 4 site template.",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"assets": [
|
||||
{
|
||||
"name": "template.cassiopeia.ltr",
|
||||
"description": "The css file to be used when the site is left to right (LTR).",
|
||||
"type": "style",
|
||||
"uri": "template.min.css",
|
||||
"dependencies": [
|
||||
"fontawesome"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "template.cassiopeia.rtl",
|
||||
"description": "The css file to be used when the site is right to left (RTL).",
|
||||
"type": "style",
|
||||
"uri": "template-rtl.min.css",
|
||||
"dependencies": [
|
||||
"fontawesome"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "template.offline",
|
||||
"description": "The css file to be used when the site is offline and offline.php is being used.",
|
||||
"type": "style",
|
||||
"uri": "offline.css"
|
||||
},
|
||||
{
|
||||
"name": "template.active.language",
|
||||
"description": "An asset to allow language specific css, eg 'language/[lang-CODE]/[lang-CODE].css', to use it as a dependency to the active template",
|
||||
"type": "style",
|
||||
"uri": "",
|
||||
"class": "LangActiveAssetItem",
|
||||
"dependencies": [
|
||||
"template.active"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "template.user",
|
||||
"description": "A file where a user can add their own css.",
|
||||
"type": "style",
|
||||
"uri": "user.css",
|
||||
"weight": 500,
|
||||
"dependencies": [
|
||||
"template.active",
|
||||
"template.active.language"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "template.cassiopeia",
|
||||
"description": "The file containing the javascript for this template.",
|
||||
"type": "script",
|
||||
"uri": "template.js",
|
||||
"attributes" : {
|
||||
"type": "module"
|
||||
},
|
||||
"dependencies": [
|
||||
"core"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "template.active",
|
||||
"description": "A dummy asset to allow extensions to use it as a dependency to the active template.",
|
||||
"type": "script",
|
||||
"uri": "",
|
||||
"dependencies": [
|
||||
"template.cassiopeia"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "template.user",
|
||||
"description": "The name of a file where a user can add their own javascript",
|
||||
"type": "script",
|
||||
"uri": "user.js",
|
||||
"dependencies": [
|
||||
"template.active"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "template.cassiopeia.ltr",
|
||||
"type": "preset",
|
||||
"dependencies": [
|
||||
"template.cassiopeia.ltr#style",
|
||||
"template.cassiopeia#script"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "template.cassiopeia.rtl",
|
||||
"type": "preset",
|
||||
"dependencies": [
|
||||
"template.cassiopeia.rtl#style",
|
||||
"template.cassiopeia#script"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "searchtools",
|
||||
"type": "style",
|
||||
"uri": "system/searchtools/searchtools.min.css"
|
||||
},
|
||||
{
|
||||
"name": "fontawesome",
|
||||
"type": "style",
|
||||
"uri": "system/joomla-fontawesome.min.css"
|
||||
}
|
||||
]
|
||||
}
|
||||
185
templates/cassiopeia/offline.php
Normal file
185
templates/cassiopeia/offline.php
Normal file
@ -0,0 +1,185 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Templates.cassiopeia
|
||||
*
|
||||
* @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Helper\AuthenticationHelper;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
/** @var Joomla\CMS\Document\HtmlDocument $this */
|
||||
|
||||
$extraButtons = AuthenticationHelper::getLoginButtons('form-login');
|
||||
$app = Factory::getApplication();
|
||||
$wa = $this->getWebAssetManager();
|
||||
|
||||
$fullWidth = 1;
|
||||
|
||||
// Template path
|
||||
$templatePath = 'media/templates/site/cassiopeia';
|
||||
|
||||
// Color Theme
|
||||
$paramsColorName = $this->params->get('colorName', 'colors_standard');
|
||||
$assetColorName = 'theme.' . $paramsColorName;
|
||||
$wa->registerAndUseStyle($assetColorName, $templatePath . '/css/global/' . $paramsColorName . '.css');
|
||||
|
||||
// Use a font scheme if set in the template style options
|
||||
$paramsFontScheme = $this->params->get('useFontScheme', false);
|
||||
$fontStyles = '';
|
||||
|
||||
if ($paramsFontScheme) {
|
||||
if (stripos($paramsFontScheme, 'https://') === 0) {
|
||||
$this->getPreloadManager()->preconnect('https://fonts.googleapis.com/', ['crossorigin' => 'anonymous']);
|
||||
$this->getPreloadManager()->preconnect('https://fonts.gstatic.com/', ['crossorigin' => 'anonymous']);
|
||||
$this->getPreloadManager()->preload($paramsFontScheme, ['as' => 'style', 'crossorigin' => 'anonymous']);
|
||||
$wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, [], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'', 'crossorigin' => 'anonymous']);
|
||||
|
||||
if (preg_match_all('/family=([^?:]*):/i', $paramsFontScheme, $matches) > 0) {
|
||||
$fontStyles = '--cassiopeia-font-family-body: "' . str_replace('+', ' ', $matches[1][0]) . '", sans-serif;
|
||||
--cassiopeia-font-family-headings: "' . str_replace('+', ' ', $matches[1][1] ?? $matches[1][0]) . '", sans-serif;
|
||||
--cassiopeia-font-weight-normal: 400;
|
||||
--cassiopeia-font-weight-headings: 700;';
|
||||
}
|
||||
} else {
|
||||
$wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, ['version' => 'auto'], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'']);
|
||||
$this->getPreloadManager()->preload($wa->getAsset('style', 'fontscheme.current')->getUri() . '?' . $this->getMediaVersion(), ['as' => 'style']);
|
||||
}
|
||||
}
|
||||
|
||||
// Enable assets
|
||||
$wa->usePreset('template.cassiopeia.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr'))
|
||||
->useStyle('template.active.language')
|
||||
->useStyle('template.offline')
|
||||
->useStyle('template.user')
|
||||
->useScript('template.user')
|
||||
->addInlineStyle(":root {
|
||||
--hue: 214;
|
||||
--template-bg-light: #f0f4fb;
|
||||
--template-text-dark: #495057;
|
||||
--template-text-light: #ffffff;
|
||||
--link-color: var(--link-color);
|
||||
--template-special-color: #001B4C;
|
||||
$fontStyles
|
||||
}");
|
||||
|
||||
// Override 'template.active' asset to set correct ltr/rtl dependency
|
||||
$wa->registerStyle('template.active', '', [], [], ['template.cassiopeia.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr')]);
|
||||
|
||||
// Logo file or site title param
|
||||
$sitename = htmlspecialchars($app->get('sitename'), ENT_QUOTES, 'UTF-8');
|
||||
|
||||
// Browsers support SVG favicons
|
||||
$this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon.svg', '', [], true, 1), 'icon', 'rel', ['type' => 'image/svg+xml']);
|
||||
$this->addHeadLink(HTMLHelper::_('image', 'favicon.ico', '', [], true, 1), 'alternate icon', 'rel', ['type' => 'image/vnd.microsoft.icon']);
|
||||
$this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon-pinned.svg', '', [], true, 1), 'mask-icon', 'rel', ['color' => '#000']);
|
||||
|
||||
if ($this->params->get('logoFile')) {
|
||||
$logo = HTMLHelper::_('image', Uri::root(false) . htmlspecialchars($this->params->get('logoFile'), ENT_QUOTES), $sitename, ['loading' => 'eager', 'decoding' => 'async'], false, 0);
|
||||
} elseif ($this->params->get('siteTitle')) {
|
||||
$logo = '<span title="' . $sitename . '">' . htmlspecialchars($this->params->get('siteTitle'), ENT_COMPAT, 'UTF-8') . '</span>';
|
||||
} else {
|
||||
$logo = HTMLHelper::_('image', 'logo.svg', $sitename, ['class' => 'logo d-inline-block', 'loading' => 'eager', 'decoding' => 'async'], true, 0);
|
||||
}
|
||||
|
||||
// Defer font awesome
|
||||
$wa->getAsset('style', 'fontawesome')->setAttribute('rel', 'lazy-stylesheet');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
|
||||
<head>
|
||||
<jdoc:include type="metas" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<jdoc:include type="styles" />
|
||||
<jdoc:include type="scripts" />
|
||||
</head>
|
||||
<body class="site">
|
||||
<div class="outer">
|
||||
<div class="offline-card">
|
||||
<div class="header">
|
||||
<?php if (!empty($logo)) : ?>
|
||||
<h1><?php echo $logo; ?></h1>
|
||||
<?php else : ?>
|
||||
<h1><?php echo $sitename; ?></h1>
|
||||
<?php endif; ?>
|
||||
<?php if ($app->get('offline_image')) : ?>
|
||||
<?php echo HTMLHelper::_('image', $app->get('offline_image'), $sitename, [], false, 0); ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($app->get('display_offline_message', 1) == 1 && str_replace(' ', '', $app->get('offline_message')) != '') : ?>
|
||||
<p><?php echo $app->get('offline_message'); ?></p>
|
||||
<?php elseif ($app->get('display_offline_message', 1) == 2) : ?>
|
||||
<p><?php echo Text::_('JOFFLINE_MESSAGE'); ?></p>
|
||||
<?php endif; ?>
|
||||
<div class="logo-icon">
|
||||
<svg version="1.1" xmlns="https://www.w3.org/2000/svg" x="0px" y="0px"
|
||||
viewBox="0 0 74.8 74.8" enable-background="new 0 0 74.8 74.8" xml:space="preserve">
|
||||
<g id="brandmark">
|
||||
<path id="j-green" fill="#1C3D5C" d="M13.5,37.7L12,36.3c-4.5-4.5-5.8-10.8-4.2-16.5c-4.5-1-7.8-5-7.8-9.8c0-5.5,4.5-10,10-10 c5,0,9.1,3.6,9.9,8.4c5.4-1.3,11.3,0.2,15.5,4.4l0.6,0.6l-7.4,7.4l-0.6-0.6c-2.4-2.4-6.3-2.4-8.7,0c-2.4,2.4-2.4,6.3,0,8.7l1.4,1.4 l7.4,7.4l7.8,7.8l-7.4,7.4l-7.8-7.8L13.5,37.7L13.5,37.7z"/>
|
||||
<path id="j-orange" fill="#1C3D5C" d="M21.8,29.5l7.8-7.8l7.4-7.4l1.4-1.4C42.9,8.4,49.2,7,54.8,8.6C55.5,3.8,59.7,0,64.8,0 c5.5,0,10,4.5,10,10c0,5.1-3.8,9.3-8.7,9.9c1.6,5.6,0.2,11.9-4.2,16.3l-0.6,0.6l-7.4-7.4l0.6-0.6c2.4-2.4,2.4-6.3,0-8.7 c-2.4-2.4-6.3-2.4-8.7,0l-1.4,1.4L37,29l-7.8,7.8L21.8,29.5L21.8,29.5z"/>
|
||||
<path id="j-red" fill="#1C3D5C" d="M55,66.8c-5.7,1.7-12.1,0.4-16.6-4.1l-0.6-0.6l7.4-7.4l0.6,0.6c2.4,2.4,6.3,2.4,8.7,0 c2.4-2.4,2.4-6.3,0-8.7L53,45.1l-7.4-7.4l-7.8-7.8l7.4-7.4l7.8,7.8l7.4,7.4l1.5,1.5c4.2,4.2,5.7,10.2,4.4,15.7 c4.9,0.7,8.6,4.9,8.6,9.9c0,5.5-4.5,10-10,10C60,74.8,56,71.3,55,66.8L55,66.8z"/>
|
||||
<path id="j-blue" fill="#1C3D5C" d="M52.2,46l-7.8,7.8L37,61.2l-1.4,1.4c-4.3,4.3-10.3,5.7-15.7,4.4c-1,4.5-5,7.8-9.8,7.8 c-5.5,0-10-4.5-10-10C0,60,3.3,56.1,7.7,55C6.3,49.5,7.8,43.5,12,39.2l0.6-0.6L20,46l-0.6,0.6c-2.4,2.4-2.4,6.3,0,8.7 c2.4,2.4,6.3,2.4,8.7,0l1.4-1.4l7.4-7.4l7.8-7.8L52.2,46L52.2,46z"/>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="login">
|
||||
<jdoc:include type="message" />
|
||||
<form action="<?php echo Route::_('index.php', true); ?>" method="post" id="form-login">
|
||||
<fieldset>
|
||||
<label for="username"><?php echo Text::_('JGLOBAL_USERNAME'); ?></label>
|
||||
<input name="username" class="form-control" id="username" type="text">
|
||||
|
||||
<label for="password"><?php echo Text::_('JGLOBAL_PASSWORD'); ?></label>
|
||||
<input name="password" class="form-control" id="password" type="password">
|
||||
|
||||
<?php foreach ($extraButtons as $button) :
|
||||
$dataAttributeKeys = array_filter(array_keys($button), function ($key) {
|
||||
return substr($key, 0, 5) == 'data-';
|
||||
});
|
||||
?>
|
||||
<div class="mod-login__submit form-group">
|
||||
<button type="button"
|
||||
class="btn btn-secondary w-100 mt-4 <?php echo $button['class'] ?? '' ?>"
|
||||
<?php foreach ($dataAttributeKeys as $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>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<button type="submit" name="Submit" class="btn btn-primary"><?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 base64_encode(Uri::base()); ?>">
|
||||
<?php echo HTMLHelper::_('form.token'); ?>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
223
templates/cassiopeia/templateDetails.xml
Normal file
223
templates/cassiopeia/templateDetails.xml
Normal file
@ -0,0 +1,223 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<extension type="template" client="site">
|
||||
<name>cassiopeia</name>
|
||||
<version>1.0</version>
|
||||
<creationDate>2017-02</creationDate>
|
||||
<author>Joomla! Project</author>
|
||||
<authorEmail>admin@joomla.org</authorEmail>
|
||||
<copyright>(C) 2017 Open Source Matters, Inc.</copyright>
|
||||
<description>TPL_CASSIOPEIA_XML_DESCRIPTION</description>
|
||||
<inheritable>1</inheritable>
|
||||
<files>
|
||||
<filename>component.php</filename>
|
||||
<filename>error.php</filename>
|
||||
<filename>index.php</filename>
|
||||
<filename>joomla.asset.json</filename>
|
||||
<filename>offline.php</filename>
|
||||
<filename>templateDetails.xml</filename>
|
||||
<folder>html</folder>
|
||||
</files>
|
||||
<media destination="templates/site/cassiopeia" folder="media">
|
||||
<folder>js</folder>
|
||||
<folder>css</folder>
|
||||
<folder>scss</folder>
|
||||
<folder>images</folder>
|
||||
</media>
|
||||
<positions>
|
||||
<position>topbar</position>
|
||||
<position>below-top</position>
|
||||
<position>menu</position>
|
||||
<position>search</position>
|
||||
<position>banner</position>
|
||||
<position>top-a</position>
|
||||
<position>top-b</position>
|
||||
<position>main-top</position>
|
||||
<position>main-bottom</position>
|
||||
<position>breadcrumbs</position>
|
||||
<position>sidebar-left</position>
|
||||
<position>sidebar-right</position>
|
||||
<position>bottom-a</position>
|
||||
<position>bottom-b</position>
|
||||
<position>footer</position>
|
||||
<position>debug</position>
|
||||
<!-- used directly in the error.php and included here so the position will appear in the list of available positions -->
|
||||
<position>error-403</position>
|
||||
<position>error-404</position>
|
||||
</positions>
|
||||
<languages folder="language">
|
||||
<language tag="en-GB">en-GB/tpl_cassiopeia.ini</language>
|
||||
<language tag="en-GB">en-GB/tpl_cassiopeia.sys.ini</language>
|
||||
</languages>
|
||||
<config>
|
||||
<fields name="params">
|
||||
<fieldset name="advanced">
|
||||
<field
|
||||
name="brand"
|
||||
type="radio"
|
||||
label="TPL_CASSIOPEIA_BRAND_LABEL"
|
||||
default="1"
|
||||
layout="joomla.form.field.radio.switcher"
|
||||
filter="boolean"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="logoFile"
|
||||
type="media"
|
||||
default=""
|
||||
label="TPL_CASSIOPEIA_LOGO_LABEL"
|
||||
showon="brand:1"
|
||||
/>
|
||||
|
||||
<field
|
||||
name="siteTitle"
|
||||
type="text"
|
||||
default=""
|
||||
label="TPL_CASSIOPEIA_TITLE"
|
||||
filter="string"
|
||||
showon="brand:1"
|
||||
/>
|
||||
|
||||
<field
|
||||
name="siteDescription"
|
||||
type="text"
|
||||
default=""
|
||||
label="TPL_CASSIOPEIA_TAGLINE_LABEL"
|
||||
description="TPL_CASSIOPEIA_TAGLINE_DESC"
|
||||
filter="string"
|
||||
showon="brand:1"
|
||||
/>
|
||||
|
||||
<field
|
||||
name="useFontScheme"
|
||||
type="groupedlist"
|
||||
label="TPL_CASSIOPEIA_FONT_LABEL"
|
||||
default="0"
|
||||
>
|
||||
<option value="0">JNONE</option>
|
||||
<group label="TPL_CASSIOPEIA_FONT_SYSTEM">
|
||||
<option value="system">TPL_CASSIOPEIA_FONT_SYSTEM_SELECT</option>
|
||||
</group>
|
||||
<group label="TPL_CASSIOPEIA_FONT_GROUP_LOCAL">
|
||||
<option value="media/templates/site/cassiopeia/css/global/fonts-local_roboto.css">Roboto (local)</option>
|
||||
</group>
|
||||
<group label="TPL_CASSIOPEIA_FONT_GROUP_WEB">
|
||||
<option value="https://fonts.googleapis.com/css2?family=Fira+Sans:wght@100;300;400;700&display=swap">Fira Sans (web)</option>
|
||||
<option value="https://fonts.googleapis.com/css2?family=Noto+Sans:wght@100;300;400;700&family=Roboto:wght@100;300;400;700&display=swap">Roboto + Noto Sans (web)</option>
|
||||
</group>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="systemFontBody"
|
||||
type="list"
|
||||
label="TPL_CASSIOPEIA_FONT_SYSTEM_BODY"
|
||||
default=""
|
||||
validate="options"
|
||||
showon="useFontScheme:system"
|
||||
>
|
||||
<option value="">JSELECT</option>
|
||||
<option value="Charter, 'Bitstream Charter', 'Sitka Text', Cambria, serif">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_TRANSITIONAL</option>
|
||||
<option value="'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_OLDSTYLE</option>
|
||||
<option value="Seravek, 'Gill Sans Nova', Ubuntu, Calibri, 'DejaVu Sans', source-sans-pro, sans-serif">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_HUMANIST</option>
|
||||
<option value="Avenir, 'Avenir Next LT Pro', Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_GEOMETRIC</option>
|
||||
<option value="Optima, Candara, 'Noto Sans', source-sans-pro, sans-serif">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_CLASSICAL</option>
|
||||
<option value="Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_GROTESQUE</option>
|
||||
<option value="'Nimbus Mono PS', 'Courier New', 'Cutive Mono', monospace">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_MONOSPACE</option>
|
||||
<option value="ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_CODE</option>
|
||||
<option value="Bahnschrift, 'DIN Alternate', 'Franklin Gothic Medium', 'Nimbus Sans Narrow', sans-serif-condensed, sans-serif">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_INDUSTRIAL</option>
|
||||
<option value="ui-rounded, 'Hiragino Maru Gothic ProN', Quicksand, Comfortaa, Manjari, 'Arial Rounded MT Bold', Calibri, source-sans-pro, sans-serif">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_ROUNDED</option>
|
||||
<option value="Rockwell, 'Rockwell Nova', 'Roboto Slab', 'DejaVu Serif', 'Sitka Small', serif">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_SLAB</option>
|
||||
<option value="Superclarendon, 'Bookman Old Style', 'URW Bookman', 'URW Bookman L', 'Georgia Pro', Georgia, serif">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_ANTIQUE</option>
|
||||
<option value="Didot, 'Bodoni MT', 'Noto Serif Display', 'URW Palladio L', P052, Sylfaen, serif">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_DIDONE</option>
|
||||
<option value="'Segoe Print', 'Bradley Hand', Chilanka, TSCu_Comic, casual, cursive">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_HANDWRITTEN</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="systemFontHeading"
|
||||
type="list"
|
||||
label="TPL_CASSIOPEIA_FONT_SYSTEM_HEADING"
|
||||
default=""
|
||||
validate="options"
|
||||
showon="useFontScheme:system"
|
||||
>
|
||||
<option value="">JSELECT</option>
|
||||
<option value="Charter, 'Bitstream Charter', 'Sitka Text', Cambria, serif">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_TRANSITIONAL</option>
|
||||
<option value="'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_OLDSTYLE</option>
|
||||
<option value="Seravek, 'Gill Sans Nova', Ubuntu, Calibri, 'DejaVu Sans', source-sans-pro, sans-serif">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_HUMANIST</option>
|
||||
<option value="Avenir, 'Avenir Next LT Pro', Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_GEOMETRIC</option>
|
||||
<option value="Optima, Candara, 'Noto Sans', source-sans-pro, sans-serif">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_CLASSICAL</option>
|
||||
<option value="Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_GROTESQUE</option>
|
||||
<option value="'Nimbus Mono PS', 'Courier New', 'Cutive Mono', monospace">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_MONOSPACE</option>
|
||||
<option value="ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_CODE</option>
|
||||
<option value="Bahnschrift, 'DIN Alternate', 'Franklin Gothic Medium', 'Nimbus Sans Narrow', sans-serif-condensed, sans-serif">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_INDUSTRIAL</option>
|
||||
<option value="ui-rounded, 'Hiragino Maru Gothic ProN', Quicksand, Comfortaa, Manjari, 'Arial Rounded MT Bold', Calibri, source-sans-pro, sans-serif">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_ROUNDED</option>
|
||||
<option value="Rockwell, 'Rockwell Nova', 'Roboto Slab', 'DejaVu Serif', 'Sitka Small', serif">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_SLAB</option>
|
||||
<option value="Superclarendon, 'Bookman Old Style', 'URW Bookman', 'URW Bookman L', 'Georgia Pro', Georgia, serif">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_ANTIQUE</option>
|
||||
<option value="Didot, 'Bodoni MT', 'Noto Serif Display', 'URW Palladio L', P052, Sylfaen, serif">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_DIDONE</option>
|
||||
<option value="'Segoe Print', 'Bradley Hand', Chilanka, TSCu_Comic, casual, cursive">TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_HANDWRITTEN</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="noteFontScheme"
|
||||
type="note"
|
||||
description="TPL_CASSIOPEIA_FONT_NOTE_TEXT"
|
||||
class="alert alert-warning"
|
||||
/>
|
||||
|
||||
<field
|
||||
name="colorName"
|
||||
type="filelist"
|
||||
label="TPL_CASSIOPEIA_COLOR_NAME_LABEL"
|
||||
default="colors_standard"
|
||||
fileFilter="^custom.+[^min]\.css$"
|
||||
exclude="^colors.+"
|
||||
stripext="true"
|
||||
hide_none="true"
|
||||
hide_default="true"
|
||||
directory="media/templates/site/cassiopeia/css/global/"
|
||||
validate="options"
|
||||
>
|
||||
<option value="colors_standard">TPL_CASSIOPEIA_COLOR_NAME_STANDARD</option>
|
||||
<option value="colors_alternative">TPL_CASSIOPEIA_COLOR_NAME_ALTERNATIVE</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="fluidContainer"
|
||||
type="radio"
|
||||
layout="joomla.form.field.radio.switcher"
|
||||
default="0"
|
||||
label="TPL_CASSIOPEIA_FLUID_LABEL"
|
||||
>
|
||||
<option value="0">TPL_CASSIOPEIA_STATIC</option>
|
||||
<option value="1">TPL_CASSIOPEIA_FLUID</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="stickyHeader"
|
||||
type="radio"
|
||||
label="TPL_CASSIOPEIA_STICKY_LABEL"
|
||||
layout="joomla.form.field.radio.switcher"
|
||||
default="0"
|
||||
filter="integer"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="backTop"
|
||||
type="radio"
|
||||
label="TPL_CASSIOPEIA_BACKTOTOP_LABEL"
|
||||
layout="joomla.form.field.radio.switcher"
|
||||
default="0"
|
||||
filter="integer"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
||||
1
templates/index.html
Normal file
1
templates/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
38
templates/system/build_incomplete.html
Normal file
38
templates/system/build_incomplete.html
Normal file
File diff suppressed because one or more lines are too long
28
templates/system/component.php
Normal file
28
templates/system/component.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Template.system
|
||||
*
|
||||
* @copyright (C) 2005 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
\defined('_JEXEC') or die;
|
||||
|
||||
/** @var Joomla\CMS\Document\HtmlDocument $this */
|
||||
|
||||
// Styles
|
||||
$this->getWebAssetManager()->registerAndUseStyle('template.system.general', 'media/system/css/system-site-general.css');
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
|
||||
<head>
|
||||
<jdoc:include type="head" />
|
||||
</head>
|
||||
<body class="contentpane">
|
||||
<jdoc:include type="message" />
|
||||
<jdoc:include type="component" />
|
||||
</body>
|
||||
</html>
|
||||
104
templates/system/error.php
Normal file
104
templates/system/error.php
Normal file
@ -0,0 +1,104 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Template.system
|
||||
*
|
||||
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
\defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
/** @var Joomla\CMS\Document\ErrorDocument $this */
|
||||
|
||||
if (!isset($this->error)) {
|
||||
$this->error = new Exception(Text::_('JERROR_ALERTNOAUTHOR'));
|
||||
$this->debug = false;
|
||||
}
|
||||
|
||||
// Load template CSS file
|
||||
$this->getWebAssetManager()->registerAndUseStyle('template.system.error', 'media/system/css/system-site-error.css');
|
||||
|
||||
if ($this->direction === 'rtl') {
|
||||
$this->getWebAssetManager()->registerAndUseStyle('template.system.error_rtl', 'media/system/css/system-site-error_rtl.css');
|
||||
}
|
||||
|
||||
// Set page title
|
||||
$this->setTitle($this->error->getCode() . ' - ' . htmlspecialchars($this->error->getMessage(), ENT_QUOTES, 'UTF-8'));
|
||||
|
||||
// Get the error code
|
||||
$errorCode = $this->error->getCode();
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
|
||||
<head>
|
||||
<jdoc:include type="metas" />
|
||||
<jdoc:include type="styles" />
|
||||
<jdoc:include type="scripts" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="error">
|
||||
<div id="outline">
|
||||
<div id="errorboxoutline">
|
||||
<?php if ($this->countModules('error-' . $errorCode)) : ?>
|
||||
<jdoc:include type="modules" name="error-<?php echo $errorCode; ?>" style="none" />
|
||||
<?php else : ?>
|
||||
<div id="errorboxheader"><?php echo $this->error->getCode(); ?> - <?php echo htmlspecialchars($this->error->getMessage(), ENT_QUOTES, 'UTF-8'); ?></div>
|
||||
<div id="errorboxbody">
|
||||
<p><strong><?php echo Text::_('JERROR_LAYOUT_NOT_ABLE_TO_VISIT'); ?></strong></p>
|
||||
<ul>
|
||||
<li><?php echo Text::_('JERROR_LAYOUT_AN_OUT_OF_DATE_BOOKMARK_FAVOURITE'); ?></li>
|
||||
<li><?php echo Text::_('JERROR_LAYOUT_SEARCH_ENGINE_OUT_OF_DATE_LISTING'); ?></li>
|
||||
<li><?php echo Text::_('JERROR_LAYOUT_MIS_TYPED_ADDRESS'); ?></li>
|
||||
<li><?php echo Text::_('JERROR_LAYOUT_YOU_HAVE_NO_ACCESS_TO_THIS_PAGE'); ?></li>
|
||||
<li><?php echo Text::_('JERROR_LAYOUT_REQUESTED_RESOURCE_WAS_NOT_FOUND'); ?></li>
|
||||
<li><?php echo Text::_('JERROR_LAYOUT_ERROR_HAS_OCCURRED_WHILE_PROCESSING_YOUR_REQUEST'); ?></li>
|
||||
</ul>
|
||||
<p><strong><?php echo Text::_('JERROR_LAYOUT_PLEASE_TRY_ONE_OF_THE_FOLLOWING_PAGES'); ?></strong></p>
|
||||
<ul>
|
||||
<li><a href="<?php echo Uri::root(true); ?>/index.php"><?php echo Text::_('JERROR_LAYOUT_HOME_PAGE'); ?></a></li>
|
||||
</ul>
|
||||
<p><?php echo Text::_('JERROR_LAYOUT_PLEASE_CONTACT_THE_SYSTEM_ADMINISTRATOR'); ?></p>
|
||||
<?php endif; ?>
|
||||
<div id="techinfo">
|
||||
<p>
|
||||
<?php echo htmlspecialchars($this->error->getMessage(), ENT_QUOTES, 'UTF-8'); ?>
|
||||
<?php if ($this->debug) : ?>
|
||||
<br><?php echo htmlspecialchars($this->error->getFile(), ENT_QUOTES, 'UTF-8');?>:<?php echo $this->error->getLine(); ?>
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
<?php if ($this->debug) : ?>
|
||||
<div>
|
||||
<?php echo $this->renderBacktrace(); ?>
|
||||
<?php // Check if there are more Exceptions and render their data as well?>
|
||||
<?php if ($this->error->getPrevious()) : ?>
|
||||
<?php $loop = true; ?>
|
||||
<?php // Reference $this->_error here and in the loop as setError() assigns errors to this property and we need this for the backtrace to work correctly?>
|
||||
<?php // Make the first assignment to setError() outside the loop so the loop does not skip Exceptions?>
|
||||
<?php $this->setError($this->_error->getPrevious()); ?>
|
||||
<?php while ($loop === true) : ?>
|
||||
<p><strong><?php echo Text::_('JERROR_LAYOUT_PREVIOUS_ERROR'); ?></strong></p>
|
||||
<p>
|
||||
<?php echo htmlspecialchars($this->_error->getMessage(), ENT_QUOTES, 'UTF-8'); ?>
|
||||
<br><?php echo htmlspecialchars($this->_error->getFile(), ENT_QUOTES, 'UTF-8');?>:<?php echo $this->_error->getLine(); ?>
|
||||
</p>
|
||||
<?php echo $this->renderBacktrace(); ?>
|
||||
<?php $loop = $this->setError($this->_error->getPrevious()); ?>
|
||||
<?php endwhile; ?>
|
||||
<?php // Reset the main error object to the base error?>
|
||||
<?php $this->setError($this->error); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<jdoc:include type="modules" name="debug" style="none" />
|
||||
</body>
|
||||
</html>
|
||||
38
templates/system/fatal-error.html
Normal file
38
templates/system/fatal-error.html
Normal file
File diff suppressed because one or more lines are too long
51
templates/system/fatal.php
Normal file
51
templates/system/fatal.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Template.system
|
||||
*
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
\defined('_JEXEC') or die;
|
||||
|
||||
use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer;
|
||||
|
||||
/**
|
||||
* Note: This file is only used when unrecoverable errors happen,
|
||||
* normally at boot up stages, and therefore it cannot be assumed
|
||||
* that any part of Joomla is available (Eg: a Factory or application)
|
||||
*
|
||||
* For "normal" error handling, use error.php not this file.
|
||||
*
|
||||
* @var HtmlErrorRenderer $this object containing charset
|
||||
* @var string $statusText exception error message
|
||||
* @var string $statusCode exception error code
|
||||
*/
|
||||
|
||||
// Fallback template
|
||||
$template = '{{statusCode_statusText}}';
|
||||
|
||||
// Joomla supplied fatal error page
|
||||
if (file_exists(__DIR__ . '/fatal-error.html')) {
|
||||
$template = file_get_contents(__DIR__ . '/fatal-error.html');
|
||||
}
|
||||
|
||||
/**
|
||||
* User supplied fatal error page.
|
||||
*
|
||||
* Allow overriding Joomla supplied page to prevent changes being wiped on Joomla upgrade.
|
||||
* We allow it to be a PHP file so that any post-processing, alerting etc can happen.
|
||||
*/
|
||||
if (file_exists(__DIR__ . '/fatal-error.custom.php')) {
|
||||
require __DIR__ . '/fatal-error.custom.php';
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
echo str_replace(
|
||||
['{{statusCode_statusText}}', '{{statusCode}}', '{{statusText}}'],
|
||||
[$statusCode . ' - ' . $statusText, $statusCode, $statusText],
|
||||
$template
|
||||
);
|
||||
38
templates/system/incompatible.html
Normal file
38
templates/system/incompatible.html
Normal file
File diff suppressed because one or more lines are too long
13
templates/system/index.php
Normal file
13
templates/system/index.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Template.system
|
||||
*
|
||||
* @copyright (C) 2007 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
\defined('_JEXEC') or die;
|
||||
|
||||
include __DIR__ . '/component.php';
|
||||
79
templates/system/offline.php
Normal file
79
templates/system/offline.php
Normal file
@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Template.system
|
||||
*
|
||||
* @copyright (C) 2005 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
\defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
/** @var Joomla\CMS\Document\HtmlDocument $this */
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$wa = $this->getWebAssetManager();
|
||||
|
||||
// Styles
|
||||
$wa->registerAndUseStyle('template.system.offline', 'media/system/css/system-site-offline.css');
|
||||
|
||||
if ($this->direction === 'rtl') {
|
||||
$wa->registerAndUseStyle('template.system.offline_rtl', 'media/system/css/system-site-offline_rtl.css');
|
||||
}
|
||||
|
||||
$wa->registerAndUseStyle('template.system.general', 'media/system/css/system-site-general.css');
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<jdoc:include type="head" />
|
||||
</head>
|
||||
<body>
|
||||
<jdoc:include type="message" />
|
||||
<div id="frame" class="outline">
|
||||
<?php if ($app->get('offline_image') && file_exists($app->get('offline_image'))) : ?>
|
||||
<img src="<?php echo $app->get('offline_image'); ?>" alt="<?php echo htmlspecialchars($app->get('sitename'), ENT_COMPAT, 'UTF-8'); ?>" />
|
||||
<?php endif; ?>
|
||||
<h1>
|
||||
<?php echo htmlspecialchars($app->get('sitename'), ENT_COMPAT, 'UTF-8'); ?>
|
||||
</h1>
|
||||
<?php if ($app->get('display_offline_message', 1) == 1 && str_replace(' ', '', $app->get('offline_message')) !== '') : ?>
|
||||
<p>
|
||||
<?php echo $app->get('offline_message'); ?>
|
||||
</p>
|
||||
<?php elseif ($app->get('display_offline_message', 1) == 2 && str_replace(' ', '', Text::_('JOFFLINE_MESSAGE')) !== '') : ?>
|
||||
<p>
|
||||
<?php echo Text::_('JOFFLINE_MESSAGE'); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<form action="<?php echo Route::_('index.php', true); ?>" method="post" id="form-login">
|
||||
<fieldset class="input">
|
||||
<p id="form-login-username">
|
||||
<label for="username"><?php echo Text::_('JGLOBAL_USERNAME'); ?></label>
|
||||
<input name="username" id="username" type="text" class="inputbox" alt="<?php echo Text::_('JGLOBAL_USERNAME'); ?>" autocomplete="off" autocapitalize="none" />
|
||||
</p>
|
||||
<p id="form-login-password">
|
||||
<label for="passwd"><?php echo Text::_('JGLOBAL_PASSWORD'); ?></label>
|
||||
<input type="password" name="password" class="inputbox" alt="<?php echo Text::_('JGLOBAL_PASSWORD'); ?>" id="passwd" />
|
||||
</p>
|
||||
<p id="submit-button">
|
||||
<button type="submit" name="Submit" class="button login"><?php echo Text::_('JLOGIN'); ?></button>
|
||||
</p>
|
||||
<input type="hidden" name="option" value="com_users" />
|
||||
<input type="hidden" name="task" value="user.login" />
|
||||
<input type="hidden" name="return" value="<?php echo base64_encode(Uri::base()); ?>" />
|
||||
<?php echo HTMLHelper::_('form.token'); ?>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user