Compare commits

...

13 Commits

16 changed files with 160 additions and 112 deletions

18
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,18 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9000,
"pathMappings": {
"/var/www/html": "${workspaceRoot:joomla}",
"/var/www/html/templates": "${workspaceRoot:template}"
}
}
]
}

View File

@ -23,7 +23,7 @@ npm:
slt.tar.gz: npm slt/templateDetails.xml
# cd slt ; tar czf ../$@ *
tar czf $@ -C slt \
css/dynamic-styles.css.php css/index.html css/style.css css/.htaccess \
css/index.html css/style.css css/.htaccess \
html \
images \
js \

BIN
releases/slt-1.1.3.tar.gz Normal file

Binary file not shown.

21
releases/slt-1.1.3.xml Normal file
View File

@ -0,0 +1,21 @@
<update>
<name>SLT Template</name>
<description>Template for the SLT for the Joomla! CMS</description>
<element>slt</element>
<type>template</type>
<client>site</client>
<version>1.1.3</version>
<downloads>
<downloadurl type="full" format="tar.gz">$DL_PREFIX/slt-1.1.3.tar.gz</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
<!-- <tag>rc</tag> -->
<!--<tag>beta</tag>-->
<!--<tag>alpha</tag>-->
<!--<tag>dev</tag>-->
</tags>
<maintainer>Christian Wolf</maintainer>
<targetplatform name="joomla" version="4[.].*"/>
<sha512>6efb161e0ef05cf30231d39f304221f01cf29c615cc581b5eeede8d00e34f5cfb624379a588319d363ecc2301f7c836f7874b124e736672ebf377c1ae3f314b2</sha512>
</update>

BIN
releases/slt-1.1.4.tar.gz Normal file

Binary file not shown.

21
releases/slt-1.1.4.xml Normal file
View File

@ -0,0 +1,21 @@
<update>
<name>SLT Template</name>
<description>Template for the SLT for the Joomla! CMS</description>
<element>slt</element>
<type>template</type>
<client>site</client>
<version>1.1.4</version>
<downloads>
<downloadurl type="full" format="tar.gz">$DL_PREFIX/slt-1.1.4.tar.gz</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
<!-- <tag>rc</tag> -->
<!--<tag>beta</tag>-->
<!--<tag>alpha</tag>-->
<!--<tag>dev</tag>-->
</tags>
<maintainer>Christian Wolf</maintainer>
<targetplatform name="joomla" version="4[.].*"/>
<sha512>45fa3583aa96ac8107c3927979c48a9de5449303b08717c33036f758abf2ede399b734eefca7ecfa8bb2106df94f4741ec1d560cd656ec16cf84c0d1437e1cde</sha512>
</update>

View File

@ -68,6 +68,7 @@
<!--<field name="fgcolor1" type='color' default='#fff' label='TPL_SLT_FOREGROUND_COLOR_1'></field>-->
<field name="mainfgcolor" type='color' default='#000' label='TPL_SLT_FOREGROUND_COLOR_MAIN'></field>
<field name="mainlicolor" type='color' default='#222' label='TPL_SLT_LINK_COLOR_MAIN'></field>
<field name="headercolor" type='color' default='#000' label='Color of header (normally foreground link color or black/white)'></field>
<field name="mainbgcolortop" type='color' default='#ddd' label='TPL_SLT_BACKGROUND_COLOR_MAIN_TOP'></field>
<field name="mainbgcolorbot" type='color' default='#fff' label='TPL_SLT_BACKGROUND_COLOR_MAIN_BOTTOM'></field>

View File

@ -1 +1 @@
2
4

1
slt/.prettierignore Normal file
View File

@ -0,0 +1 @@
/html/

View File

@ -0,0 +1,22 @@
.btn-primary {
color: white;
background-color: var(--color-main-link);
border: none;
&:hover {
color: white;
background-color: var(--color-main-link);
}
}
.pagination {
a {
color: var(--color-main-link);
}
.page-item.active .page-link {
color: var(--color-fg-top);
background-color: var(--color-bg-top);
border: none;
}
}

View File

@ -53,4 +53,13 @@ h2,
h3,
h4 {
line-height: 150%;
/* stylelint-disable no-descending-specificity -- Keep the block of a elements together */
a,
a:hover,
a:active,
a:visited {
color: var(--color-header-link, #000);
}
/* stylelint-enable no-descending-specificity */
}

View File

@ -1,2 +1,3 @@
@use 'core';
@use 'default-classes';
@use 'buttons';

View File

@ -1,76 +0,0 @@
<?php
define('_JEXEC', 1);
define('JPATH_BASE', '../../../');
require_once JPATH_BASE . '/includes/defines.php';
require_once JPATH_BASE . '/includes/framework.php';
$container = \Joomla\CMS\Factory::getContainer();
$container->alias(\Joomla\Session\SessionInterface::class, 'session.web.site');
$mainframe = $container->get(\Joomla\CMS\Application\SiteApplication::class);
$template = $mainframe->getTemplate(true);
$params = $template->params;
header('content-type: text/css');
// duration of cached content (1 hour)
$offset = 60 * 60;
// cache control to process
header("Cache-Control: must-revalidate, max-age=$offset, public");
// expiration header format
// $ExpStr = "Expires: " . gmdate("D, d M Y H:i:s",time() + $offset) . " GMT";
// send cache expiration header to broswer
// header($ExpStr);
$leftImageValue = empty($params['imgleft'])
? 'none'
: "url(\"" . JPATH_BASE . $params['imgleft'] . "\")";
$rightImageValue = empty($params['imgright'])
? 'none'
: "url(\"" . JPATH_BASE . $params['imgright'] . "\")";
?>
<?php if ($params['titlepage'] === '1') {
echo "#left-menu { display: none; }\n";
} ?>
:root {
--color-fg-top: <?php echo $params['topfgcolor1']; ?>;
--color-bg-top: <?php echo $params['topbgcolor1']; ?>;
--color-fg-top-dark: <?php echo $params['topfgcolor2']; ?>;
--color-bg-top-dark: <?php echo $params['topbgcolor2']; ?>;
--color-fg-top-light: <?php echo $params['topfgcolor3']; ?>;
--color-bg-top-light: <?php echo $params['topbgcolor3']; ?>;
--color-main: <?php echo $params['mainfgcolor']; ?>;
--color-main-link: <?php echo $params['mainlicolor']; ?>;
--color-page-bg-top: <?php echo $params['mainbgcolortop']; ?>;
--color-page-bg-bottom: <?php echo $params['mainbgcolorbot']; ?>;
--color-menu: <?php echo $params['fgcolor1']; ?>;
--color-menu-background: <?php echo $params['bgcolor1']; ?>;
--color-menu-active: <?php echo $params['fgcolor2']; ?>;
--color-menu-background-active: <?php echo $params['bgcolor2']; ?>;
--color-effect: <?php echo $params['fgeffect']; ?>;
--color-effect-background: <?php echo $params['bgeffect']; ?>;
--color-effect-header: <?php echo $params['fgeffecthdr']; ?>;
--color-effect-background-header: <?php echo $params['bgeffecthdr']; ?>;
--color-side-background: <?php echo $params['bgcolorside']; ?>;
--image-left-side: <?php echo $leftImageValue; ?>;
--image-right-side: <?php echo $rightImageValue; ?>;
}
<?php // Stop execution here, the rest is for debugging
exit(); ?>
:root {
--color-effect: blue;
--color-effect-background: red;
--color-effect-header: yellow;
--color-effect-background-header: green;
}

View File

@ -6,6 +6,7 @@
@include abstract.for-desktop {
display: flex;
flex-flow: row;
margin-top: 25px;
// width: 100%;
justify-content: space-around;

View File

@ -7,6 +7,7 @@ use Joomla\CMS\Uri\Uri;
//JHTML::_('behavior.framework', true);
$app = JFactory::getApplication();
$doc = JFactory::getDocument();
$wa = $this->getWebAssetManager();
// Add JavaScript Frameworks
JHtml::_('bootstrap.framework');
@ -25,11 +26,40 @@ JHtml::_('stylesheet', 'style.css', ['version' => 'auto', 'relative' => true]);
$doc->addStyleSheet(
$this->baseurl . '/media/system/css/joomla-fontawesome.css'
);
$doc->addStyleSheet(
$this->baseurl .
'/templates/slt/css/dynamic-styles.css.php?Itemid=' .
$app->input->getInt('Itemid')
);
$params = $this->params;
$leftImageValue = empty($params['imgleft'])
? 'none'
: "url(\"" . JPATH_BASE . $params['imgleft'] . "\")";
$rightImageValue = empty($params['imgright'])
? 'none'
: "url(\"" . JPATH_BASE . $params['imgright'] . "\")";
$wa->addInlineStyle(":root {
--color-fg-top: {$params['topfgcolor1']};
--color-bg-top: {$params['topbgcolor1']};
--color-fg-top-dark: {$params['topfgcolor2']};
--color-bg-top-dark: {$params['topbgcolor2']};
--color-fg-top-light: {$params['topfgcolor3']};
--color-bg-top-light: {$params['topbgcolor3']};
--color-main: {$params['mainfgcolor']};
--color-main-link: {$params['mainlicolor']};
--color-header-link: {$params['headercolor']};
--color-page-bg-top: {$params['mainbgcolortop']};
--color-page-bg-bottom: {$params['mainbgcolorbot']};
--color-menu: {$params['fgcolor1']};
--color-menu-background: {$params['bgcolor1']};
--color-menu-active: {$params['fgcolor2']};
--color-menu-background-active: {$params['bgcolor2']};
--color-effect: {$params['fgeffect']};
--color-effect-background: {$params['bgeffect']};
--color-effect-header: {$params['fgeffecthdr']};
--color-effect-background-header: {$params['bgeffecthdr']};
--color-side-background: {$params['bgcolorside']};
--image-left-side: {$leftImageValue};
--image-right-side: {$rightImageValue};
}");
// Add Javascript for mobile menu
JHtml::_('script', 'mobile.js', ['version' => 'auto', 'relative' => true]);
@ -40,7 +70,6 @@ JHtml::_('stylesheet', 'user.css', ['version' => 'auto', 'relative' => true]);
// Check for a custom js file
JHtml::_('script', 'user.js', ['version' => 'auto', 'relative' => true]);
?>
<?php echo '<!DOCTYPE html>'; ?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>" >

56
slt/package-lock.json generated
View File

@ -572,9 +572,9 @@
}
},
"node_modules/flatted": {
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz",
"integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==",
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz",
"integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==",
"dev": true
},
"node_modules/fs.realpath": {
@ -1673,9 +1673,9 @@
}
},
"node_modules/sass": {
"version": "1.54.4",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.54.4.tgz",
"integrity": "sha512-3tmF16yvnBwtlPrNBHw/H907j8MlOX8aTBnlNX1yrKx24RKcJGPyLhFUwkoKBKesR3unP93/2z14Ll8NicwQUA==",
"version": "1.54.8",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.54.8.tgz",
"integrity": "sha512-ib4JhLRRgbg6QVy6bsv5uJxnJMTS2soVcCp9Y88Extyy13A8vV0G1fAwujOzmNkFQbR3LvedudAMbtuNRPbQww==",
"dev": true,
"dependencies": {
"chokidar": ">=3.0.0 <4.0.0",
@ -1805,9 +1805,9 @@
}
},
"node_modules/spdx-license-ids": {
"version": "3.0.11",
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz",
"integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==",
"version": "3.0.12",
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz",
"integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==",
"dev": true
},
"node_modules/string-width": {
@ -1855,14 +1855,14 @@
"dev": true
},
"node_modules/stylelint": {
"version": "14.10.0",
"resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.10.0.tgz",
"integrity": "sha512-VAmyKrEK+wNFh9R8mNqoxEFzaa4gsHGhcT4xgkQDuOA5cjF6CaNS8loYV7gpi4tIZBPUyXesotPXzJAMN8VLOQ==",
"version": "14.11.0",
"resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.11.0.tgz",
"integrity": "sha512-OTLjLPxpvGtojEfpESWM8Ir64Z01E89xsisaBMUP/ngOx1+4VG2DPRcUyCCiin9Rd3kPXPsh/uwHd9eqnvhsYA==",
"dev": true,
"dependencies": {
"@csstools/selector-specificity": "^2.0.2",
"balanced-match": "^2.0.0",
"colord": "^2.9.2",
"colord": "^2.9.3",
"cosmiconfig": "^7.0.1",
"css-functions-list": "^3.1.0",
"debug": "^4.3.4",
@ -1897,7 +1897,7 @@
"svg-tags": "^1.0.0",
"table": "^6.8.0",
"v8-compile-cache": "^2.3.0",
"write-file-atomic": "^4.0.1"
"write-file-atomic": "^4.0.2"
},
"bin": {
"stylelint": "bin/stylelint.js"
@ -2608,9 +2608,9 @@
}
},
"flatted": {
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz",
"integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==",
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz",
"integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==",
"dev": true
},
"fs.realpath": {
@ -3394,9 +3394,9 @@
}
},
"sass": {
"version": "1.54.4",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.54.4.tgz",
"integrity": "sha512-3tmF16yvnBwtlPrNBHw/H907j8MlOX8aTBnlNX1yrKx24RKcJGPyLhFUwkoKBKesR3unP93/2z14Ll8NicwQUA==",
"version": "1.54.8",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.54.8.tgz",
"integrity": "sha512-ib4JhLRRgbg6QVy6bsv5uJxnJMTS2soVcCp9Y88Extyy13A8vV0G1fAwujOzmNkFQbR3LvedudAMbtuNRPbQww==",
"dev": true,
"requires": {
"chokidar": ">=3.0.0 <4.0.0",
@ -3495,9 +3495,9 @@
}
},
"spdx-license-ids": {
"version": "3.0.11",
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz",
"integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==",
"version": "3.0.12",
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz",
"integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==",
"dev": true
},
"string-width": {
@ -3536,14 +3536,14 @@
"dev": true
},
"stylelint": {
"version": "14.10.0",
"resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.10.0.tgz",
"integrity": "sha512-VAmyKrEK+wNFh9R8mNqoxEFzaa4gsHGhcT4xgkQDuOA5cjF6CaNS8loYV7gpi4tIZBPUyXesotPXzJAMN8VLOQ==",
"version": "14.11.0",
"resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.11.0.tgz",
"integrity": "sha512-OTLjLPxpvGtojEfpESWM8Ir64Z01E89xsisaBMUP/ngOx1+4VG2DPRcUyCCiin9Rd3kPXPsh/uwHd9eqnvhsYA==",
"dev": true,
"requires": {
"@csstools/selector-specificity": "^2.0.2",
"balanced-match": "^2.0.0",
"colord": "^2.9.2",
"colord": "^2.9.3",
"cosmiconfig": "^7.0.1",
"css-functions-list": "^3.1.0",
"debug": "^4.3.4",
@ -3578,7 +3578,7 @@
"svg-tags": "^1.0.0",
"table": "^6.8.0",
"v8-compile-cache": "^2.3.0",
"write-file-atomic": "^4.0.1"
"write-file-atomic": "^4.0.2"
}
},
"stylelint-config-recommended": {