first commit

This commit is contained in:
2025-06-17 11:53:18 +02:00
commit 9f0f7ba12b
8804 changed files with 1369176 additions and 0 deletions

View File

@ -0,0 +1,17 @@
.com-content-categories__item {
border-bottom: 1px solid #dfe3e7;
}
.com-content-categories__item-title-wrapper {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: .5rem 0;
}
.com-content-categories__children {
flex-basis: 100%;
padding-inline-start: 1.5rem;
border-top: 1px solid #dfe3e7;
}
.com-content-categories__children .com-content-categories__item:last-child {
border-bottom: none;
}

View File

@ -0,0 +1 @@
.com-content-categories__item{border-bottom:1px solid #dfe3e7}.com-content-categories__item-title-wrapper{-webkit-box-pack:justify;-ms-flex-pack:justify;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;justify-content:space-between;padding:.5rem 0}.com-content-categories__children{-ms-flex-preferred-size:100%;-webkit-padding-start:1.5rem;border-top:1px solid #dfe3e7;flex-basis:100%;padding-inline-start:1.5rem}.com-content-categories__children .com-content-categories__item:last-child{border-bottom:none}

View File

@ -0,0 +1,35 @@
{
"$schema": "https://developer.joomla.org/schemas/json-schema/web_assets.json",
"name": "com_categories",
"version": "4.0.0",
"description": "Joomla CMS",
"license": "GPL-2.0-or-later",
"assets": [
{
"name": "com_categories.shared-categories-accordion",
"type": "preset",
"dependencies": [
"com_categories.shared-categories-accordion#style",
"com_categories.shared-categories-accordion#script"
]
},
{
"name": "com_categories.shared-categories-accordion",
"type": "script",
"uri": "com_categories/shared-categories-accordion.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "39ae85"
},
{
"name": "com_categories.shared-categories-accordion",
"type": "style",
"uri": "com_categories/shared-categories-accordion.min.css",
"version": "b93a2b"
}
]
}

View File

@ -0,0 +1,40 @@
/**
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
if (!Joomla || !Joomla.Text) {
throw new Error('core.js was not properly initialised');
}
// Selectors used by this script
const buttonsSelector = '[id^=category-btn-]';
/**
* Handle the category toggle button click event
* @param event
*/
const handleCategoryToggleButtonClick = ({
currentTarget
}) => {
const button = currentTarget;
const icon = button.querySelector('span');
// Toggle icon class
icon.classList.toggle('icon-plus');
icon.classList.toggle('icon-minus');
// Toggle aria label, aria-expanded
const ariaLabel = button.getAttribute('aria-label');
const ariaExpanded = button.getAttribute('aria-expanded');
button.setAttribute('aria-label', ariaLabel === Joomla.Text._('JGLOBAL_EXPAND_CATEGORIES') ? Joomla.Text._('JGLOBAL_COLLAPSE_CATEGORIES') : Joomla.Text._('JGLOBAL_EXPAND_CATEGORIES'));
button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');
const {
categoryId
} = button.dataset;
const target = document.getElementById(`category-${categoryId}`);
target.toggleAttribute('hidden');
};
Array.from(document.querySelectorAll(buttonsSelector)).forEach(button => {
button.addEventListener('click', handleCategoryToggleButtonClick);
});

View File

@ -0,0 +1 @@
if(!Joomla||!Joomla.Text)throw new Error("core.js was not properly initialised");const buttonsSelector="[id^=category-btn-]",handleCategoryToggleButtonClick=({currentTarget:t})=>{const e=t,o=e.querySelector("span");o.classList.toggle("icon-plus"),o.classList.toggle("icon-minus");const a=e.getAttribute("aria-label"),r=e.getAttribute("aria-expanded");e.setAttribute("aria-label",a===Joomla.Text._("JGLOBAL_EXPAND_CATEGORIES")?Joomla.Text._("JGLOBAL_COLLAPSE_CATEGORIES"):Joomla.Text._("JGLOBAL_EXPAND_CATEGORIES")),e.setAttribute("aria-expanded","false"===r?"true":"false");const{categoryId:l}=e.dataset;document.getElementById(`category-${l}`).toggleAttribute("hidden")};Array.from(document.querySelectorAll(buttonsSelector)).forEach((t=>{t.addEventListener("click",handleCategoryToggleButtonClick)}));