diff --git a/.gitignore b/.gitignore index 726a684..c62c072 100644 --- a/.gitignore +++ b/.gitignore @@ -202,3 +202,8 @@ hypothesis/ profile.ps1 .mcp.json + +# ============================================================ +# Wiki (managed separately via Gitea wiki) +# ============================================================ +wiki/ diff --git a/.mokogitea/manifest.xml b/.mokogitea/manifest.xml index a5da9f5..a135cae 100644 --- a/.mokogitea/manifest.xml +++ b/.mokogitea/manifest.xml @@ -9,6 +9,7 @@ MokoJoomHero MokoConsulting A Joomla Module designed to provide a random image from a folder with content on top as a Hero. + 01.00.20 GNU General Public License v3 @@ -20,6 +21,8 @@ PHP joomla + module + mod_mokojoomhero src/ diff --git a/.mokogitea/workflows/cascade-dev.yml b/.mokogitea/workflows/cascade-dev.yml index 23b11a2..f7f0b3c 100644 --- a/.mokogitea/workflows/cascade-dev.yml +++ b/.mokogitea/workflows/cascade-dev.yml @@ -52,7 +52,7 @@ jobs: - name: Discover target branches id: branches env: - GA_TOKEN: ${{ secrets.GA_TOKEN }} + GA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} run: | API="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" @@ -61,7 +61,7 @@ jobs: ALL_BRANCHES="" while true; do BATCH=$(curl -sS \ - -H "Authorization: token ${GA_TOKEN}" \ + -H "Authorization: token ${GITEA_TOKEN}" \ "${API}/branches?page=${PAGE}&limit=50" \ | jq -r '.[].name // empty') [ -z "$BATCH" ] && break @@ -93,7 +93,7 @@ jobs: - name: Cascade to all target branches if: steps.branches.outputs.targets != '' env: - GA_TOKEN: ${{ secrets.GA_TOKEN }} + GA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} run: | API="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" SHORT_SHA="${GITHUB_SHA:0:7}" @@ -111,7 +111,7 @@ jobs: # Check if branch is already up to date ENCODED_BRANCH=$(echo "$BRANCH" | sed 's|/|%2F|g') RESPONSE=$(curl -sS \ - -H "Authorization: token ${GA_TOKEN}" \ + -H "Authorization: token ${GITEA_TOKEN}" \ "${API}/compare/${ENCODED_BRANCH}...main") AHEAD=$(echo "$RESPONSE" | jq '.total_commits // 0') @@ -126,7 +126,7 @@ jobs: # Check for existing cascade PR EXISTING=$(curl -sS \ - -H "Authorization: token ${GA_TOKEN}" \ + -H "Authorization: token ${GITEA_TOKEN}" \ "${API}/pulls?state=open&head=${GITEA_ORG}:main&base=${ENCODED_BRANCH}&limit=1") EXISTING_COUNT=$(echo "$EXISTING" | jq 'length') @@ -139,7 +139,7 @@ jobs: # Create cascade PR PR_RESPONSE=$(curl -sS -w "\n%{http_code}" \ -X POST \ - -H "Authorization: token ${GA_TOKEN}" \ + -H "Authorization: token ${GITEA_TOKEN}" \ -H "Content-Type: application/json" \ -d "{ \"title\": \"chore: cascade main → ${BRANCH} (${SHORT_SHA}) [skip ci]\", @@ -165,7 +165,7 @@ jobs: # Try auto-merge PR_DATA=$(curl -sS \ - -H "Authorization: token ${GA_TOKEN}" \ + -H "Authorization: token ${GITEA_TOKEN}" \ "${API}/pulls/${PR_NUMBER}") MERGEABLE=$(echo "$PR_DATA" | jq -r '.mergeable // false') @@ -178,7 +178,7 @@ jobs: MERGE_RESPONSE=$(curl -sS -w "\n%{http_code}" \ -X POST \ - -H "Authorization: token ${GA_TOKEN}" \ + -H "Authorization: token ${GITEA_TOKEN}" \ -H "Content-Type: application/json" \ -d "{ \"Do\": \"merge\", diff --git a/.mokogitea/workflows/ci-joomla.yml b/.mokogitea/workflows/ci-joomla.yml index f883fef..de2d9eb 100644 --- a/.mokogitea/workflows/ci-joomla.yml +++ b/.mokogitea/workflows/ci-joomla.yml @@ -43,9 +43,9 @@ jobs: - name: Clone MokoStandards env: - GA_TOKEN: ${{ secrets.GA_TOKEN || secrets.GA_TOKEN || github.token }} - MOKO_CLONE_TOKEN: ${{ secrets.GA_TOKEN || secrets.GA_TOKEN || github.token }} - MOKO_CLONE_HOST: ${{ secrets.GA_TOKEN && 'git.mokoconsulting.tech/MokoConsulting' || 'github.com/mokoconsulting-tech' }} + GA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN || secrets.MOKOGITEA_TOKEN || github.token }} + MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN || secrets.MOKOGITEA_TOKEN || github.token }} + MOKO_CLONE_HOST: ${{ secrets.MOKOGITEA_TOKEN && 'git.mokoconsulting.tech/MokoConsulting' || 'github.com/mokoconsulting-tech' }} run: | git clone --depth 1 --branch main --quiet \ "https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoStandards-API.git" \ @@ -53,7 +53,7 @@ jobs: - name: Install dependencies env: - COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GA_TOKEN || github.token }}"}}' + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.MOKOGITEA_TOKEN || github.token }}"}}' run: | if [ -f "composer.json" ]; then composer install \ @@ -346,7 +346,7 @@ jobs: - name: Install dependencies env: - COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GA_TOKEN || github.token }}"}}' + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.MOKOGITEA_TOKEN || github.token }}"}}' run: | if [ -f "composer.json" ]; then composer install \ @@ -391,7 +391,7 @@ jobs: - name: Install dependencies env: - COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GA_TOKEN || github.token }}"}}' + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.MOKOGITEA_TOKEN || github.token }}"}}' run: | if [ -f "composer.json" ]; then composer install --no-interaction --prefer-dist --optimize-autoloader @@ -458,10 +458,10 @@ jobs: steps: - name: Trigger pre-release build env: - GA_TOKEN: ${{ secrets.GA_TOKEN }} + GA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} REPO: ${{ github.repository }} BRANCH: ${{ github.head_ref }} run: | - curl -s -X POST "${GITEA_URL:-https://git.mokoconsulting.tech}/api/v1/repos/${REPO}/actions/workflows/pre-release.yml/dispatches" -H "Authorization: token ${GA_TOKEN}" -H "Content-Type: application/json" -d "{\"ref\":\"${BRANCH}\",\"inputs\":{\"stability\":\"release-candidate\"}}" + curl -s -X POST "${GITEA_URL:-https://git.mokoconsulting.tech}/api/v1/repos/${REPO}/actions/workflows/pre-release.yml/dispatches" -H "Authorization: token ${GITEA_TOKEN}" -H "Content-Type: application/json" -d "{\"ref\":\"${BRANCH}\",\"inputs\":{\"stability\":\"release-candidate\"}}" echo "### Pre-Release" >> $GITHUB_STEP_SUMMARY echo "Triggered RC build on branch \`${BRANCH}\`" >> $GITHUB_STEP_SUMMARY diff --git a/.mokogitea/workflows/cleanup.yml b/.mokogitea/workflows/cleanup.yml index a890001..29ca4d4 100644 --- a/.mokogitea/workflows/cleanup.yml +++ b/.mokogitea/workflows/cleanup.yml @@ -33,17 +33,17 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - token: ${{ secrets.GA_TOKEN }} + token: ${{ secrets.MOKOGITEA_TOKEN }} - name: Delete merged branches env: - GA_TOKEN: ${{ secrets.GA_TOKEN }} + GA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} run: | echo "=== Merged Branch Cleanup ===" API="${GITEA_URL}/api/v1/repos/${{ github.repository }}" # List branches via API - BRANCHES=$(curl -sS -H "Authorization: token ${GA_TOKEN}" \ + BRANCHES=$(curl -sS -H "Authorization: token ${GITEA_TOKEN}" \ "${API}/branches?limit=50" | jq -r '.[].name') DELETED=0 @@ -56,7 +56,7 @@ jobs: # Check if branch is merged into main if git merge-base --is-ancestor "origin/${BRANCH}" origin/main 2>/dev/null; then echo " Deleting merged branch: ${BRANCH}" - curl -sS -X DELETE -H "Authorization: token ${GA_TOKEN}" \ + curl -sS -X DELETE -H "Authorization: token ${GITEA_TOKEN}" \ "${API}/branches/${BRANCH}" 2>/dev/null || true DELETED=$((DELETED + 1)) fi @@ -66,20 +66,20 @@ jobs: - name: Clean old workflow runs env: - GA_TOKEN: ${{ secrets.GA_TOKEN }} + GA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} run: | echo "=== Workflow Run Cleanup ===" API="${GITEA_URL}/api/v1/repos/${{ github.repository }}" CUTOFF=$(date -d "30 days ago" +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -v-30d +%Y-%m-%dT%H:%M:%SZ) # Get old completed runs - RUNS=$(curl -sS -H "Authorization: token ${GA_TOKEN}" \ + RUNS=$(curl -sS -H "Authorization: token ${GITEA_TOKEN}" \ "${API}/actions/runs?status=completed&limit=50" | \ jq -r ".workflow_runs[] | select(.created_at < \"${CUTOFF}\") | .id" 2>/dev/null) DELETED=0 for RUN_ID in $RUNS; do - curl -sS -X DELETE -H "Authorization: token ${GA_TOKEN}" \ + curl -sS -X DELETE -H "Authorization: token ${GITEA_TOKEN}" \ "${API}/actions/runs/${RUN_ID}" 2>/dev/null || true DELETED=$((DELETED + 1)) done diff --git a/.mokogitea/workflows/pr-check.yml b/.mokogitea/workflows/pr-check.yml index b045d2f..df06523 100644 --- a/.mokogitea/workflows/pr-check.yml +++ b/.mokogitea/workflows/pr-check.yml @@ -204,11 +204,11 @@ jobs: steps: - name: Trigger RC pre-release env: - GA_TOKEN: ${{ secrets.GA_TOKEN }} + GA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} REPO: ${{ github.repository }} BRANCH: ${{ github.head_ref }} GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} run: | - curl -s -X POST "${GITEA_URL}/api/v1/repos/${REPO}/actions/workflows/pre-release.yml/dispatches" -H "Authorization: token ${GA_TOKEN}" -H "Content-Type: application/json" -d "{\"ref\":\"${BRANCH}\",\"inputs\":{\"stability\":\"release-candidate\"}}" + curl -s -X POST "${GITEA_URL}/api/v1/repos/${REPO}/actions/workflows/pre-release.yml/dispatches" -H "Authorization: token ${GITEA_TOKEN}" -H "Content-Type: application/json" -d "{\"ref\":\"${BRANCH}\",\"inputs\":{\"stability\":\"release-candidate\"}}" echo "### Pre-Release" >> $GITHUB_STEP_SUMMARY echo "Triggered RC build on branch \`${BRANCH}\`" >> $GITHUB_STEP_SUMMARY diff --git a/.mokogitea/workflows/repo-health.yml b/.mokogitea/workflows/repo-health.yml index d738ad7..be52e37 100644 --- a/.mokogitea/workflows/repo-health.yml +++ b/.mokogitea/workflows/repo-health.yml @@ -49,7 +49,7 @@ env: SCRIPTS_ALLOWED_DIRS: scripts,scripts/fix,scripts/lib,scripts/release,scripts/run,scripts/validate # Repo health policy - REPO_REQUIRED_ARTIFACTS: README.md,LICENSE,CHANGELOG.md,CONTRIBUTING.md,CODE_OF_CONDUCT.md,.gitea/workflows/ + REPO_REQUIRED_ARTIFACTS: README.md,LICENSE,CHANGELOG.md,CONTRIBUTING.md,CODE_OF_CONDUCT.md,.mokogitea/workflows/ REPO_OPTIONAL_FILES: SECURITY.md,GOVERNANCE.md,.editorconfig,.gitattributes,.gitignore,README.md,docs/ REPO_DISALLOWED_DIRS: REPO_DISALLOWED_FILES: TODO.md,todo.md @@ -60,7 +60,7 @@ env: # File / directory variables DOCS_INDEX: docs/docs-index.md SCRIPT_DIR: scripts - WORKFLOWS_DIR: .gitea/workflows + WORKFLOWS_DIR: .mokogitea/workflows SHELLCHECK_PATTERN: '*.sh' SPDX_FILE_GLOBS: '*.sh,*.php,*.js,*.ts,*.css,*.xml,*.yml,*.yaml' FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true @@ -81,7 +81,7 @@ jobs: - name: Check actor permission (admin only) id: perm env: - TOKEN: ${{ secrets.GA_TOKEN || secrets.GA_TOKEN || github.token }} + TOKEN: ${{ secrets.MOKOGITEA_TOKEN || secrets.MOKOGITEA_TOKEN || github.token }} REPO: ${{ github.repository }} ACTOR: ${{ github.actor }} run: | diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 9e68438..cdf3819 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -14,7 +14,7 @@ DEFGROUP: INGROUP: Project.Documentation REPO: - VERSION: 04.04.01 + VERSION: 01.00.20 PATH: ./CODE_OF_CONDUCT.md BRIEF: Reference + packaging repo for Moko Consulting Developer GPT Other Default --> diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c0b4858..0a6190f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,161 +1,128 @@ -# Contributing to Moko Consulting Projects + + +# Contributing + +Thank you for your interest in contributing to **MokoJoomHero**! + +This repository is governed by **[MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards)** — the authoritative source of coding standards, workflows, and policies for all Moko Consulting repositories. + +## Branch Strategy + +| Branch | Purpose | Deploys To | +|--------|---------|------------| +| `main` | Bleeding edge — all development merges here | CI only | +| `dev/XX.YY.ZZ` | Feature development | Dev server (version: "development") | +| `version/XX.YY` | Stable frozen snapshot | Demo + RS servers | + +### Development Workflow ``` -feature/* ──PR──> dev ──draft PR──> (renamed to rc) ──merge──> main +1. Create branch: git checkout -b dev/XX.YY.ZZ/my-feature +2. Develop + test (dev server auto-deploys on push) +3. Open PR → main (squash merge only) +4. Auto-release (version branch + tag + GitHub Release created automatically) ``` -### Step by step +### Branch Naming -1. **Create a feature branch** from `dev`: - ```bash - git checkout dev && git pull - git checkout -b feature/my-change - ``` +| Prefix | Use | +|--------|-----| +| `dev/XX.YY.ZZ` | Feature development (e.g., `dev/02.00.00/add-extrafields`) | +| `version/XX.YY` | Stable release (auto-created, never manually pushed) | +| `chore/` | Automated sync branches (managed by MokoStandards) | -2. **Work and commit** on your feature branch. Push to origin. +> **Never use** `feature/`, `hotfix/`, or `release/` prefixes — they are not part of the MokoStandards branch strategy. -3. **Open a PR**: `feature/my-change` → `dev`. After review and checks, merge it. +## Commit Conventions -4. **When ready for release**, open a **draft PR**: `dev` → `main`. - - This automatically renames the source branch to `rc` (release candidate) - - An RC pre-release is built and uploaded - -5. **Alpha and beta branches** are created by manually renaming the branch before the RC stage: - - Rename `dev` to `alpha` for early testing → alpha pre-release is built - - Rename `alpha` to `beta` for feature-complete testing → beta pre-release is built - - When the draft PR is created, the branch is renamed to `rc` - -6. **Once PR checks pass** on the `rc` branch, mark the PR as ready and merge to `main`. - -7. **Merging to main** triggers the stable release pipeline: - - Minor version bump (e.g., `02.09.xx` → `02.10.00`) - - Stability suffix stripped (clean version) - - Gitea release created with ZIP/tar.gz packages - - `updates.xml` updated (Joomla extensions) - - `dev` branch recreated from `main` - -### Branch summary - -| Branch | Purpose | Created by | -|--------|---------|-----------| -| `feature/*` | New features and fixes | Developer | -| `dev` | Integration branch | Auto-recreated after release | -| `alpha` | Alpha pre-release testing | Manual rename from `dev` | -| `beta` | Beta pre-release testing | Manual rename from `alpha` | -| `rc` | Release candidate | Auto-renamed on draft PR to main | -| `main` | Stable releases | Protected, merge only | -| `version/XX.YY.ZZ` | Archived release snapshots | Auto-created by CI | - -### Protected branches - -| Branch | Direct push | Merge via | -|--------|------------|-----------| -| `main` | Blocked (CI bot whitelisted) | PR merge only | -| `dev` | Blocked (CI bot whitelisted) | PR merge from feature/* | -| `rc` | Blocked (CI bot whitelisted) | Auto-created on draft PR | -| `alpha` | Blocked (CI bot whitelisted) | Manual rename | -| `beta` | Blocked (CI bot whitelisted) | Manual rename | -| `feature/*` | Open | N/A (source branch) | - -## Version Policy - -### Format - -All versions use `XX.YY.ZZ` — three two-digit segments, zero-padded: - -- **XX** — Major version (breaking changes) -- **YY** — Minor version (new features, bumped on release to main) -- **ZZ** — Patch version (auto-incremented on every push to dev/feature branches) - -Rollover: patch `99` → `00` increments minor; minor `99` → `00` increments major. - -### Stability suffixes - -Each branch appends a suffix to indicate stability: - -| Branch | Suffix | Example | -|--------|--------|---------| -| `main` | (none) | `02.09.00` | -| `dev` | `-dev` | `02.09.01-dev` | -| `feature/*` | `-dev` | `02.09.01-dev` | -| `alpha` | `-alpha` | `02.09.01-alpha` | -| `beta` | `-beta` | `02.09.01-beta` | -| `rc` | `-rc` | `02.09.01-rc` | - -### Auto version bump - -On every push to `dev`, `feature/*`, or `patch/*`: - -1. Patch version incremented -2. Stability suffix `-dev` applied -3. All version-bearing files updated (manifests, CHANGELOG, PHP headers, etc.) -4. Commit created with `[skip ci]` to avoid loops - -### Release version flow - -Version bumps happen at specific release events: - -| Event | Bump | Example | -|-------|------|---------| -| Feature merged to dev | Patch bump after dev release | `02.09.01-dev` → release → `02.09.02-dev` | -| Dev promoted to RC | Minor bump | `02.09.02-dev` → `02.10.00-rc` | -| RC merged to main | Minor bump | `02.10.00-rc` → `02.11.00` (stable) | -| Dev recreated from main | Patch bump | `02.11.00` → `02.11.01-dev` | - -### Release stream copies - -When a higher-stability release is published, copies are created for all lesser streams with the same base version: - -- **RC `02.10.00-rc`** also creates: `02.10.00-dev`, `02.10.00-alpha`, `02.10.00-beta` -- **Stable `02.11.00`** also creates: `02.11.00-dev`, `02.11.00-alpha`, `02.11.00-beta`, `02.11.00-rc` - -This ensures Joomla sites on ANY stability channel see the update (Joomla only shows versions higher than what's installed). - -### Version files - -The version tools update all files containing version stamps: - -- `.mokogitea/manifest.xml` (canonical source) -- Joomla XML manifests (`` tag) -- `README.md`, `CHANGELOG.md` (`VERSION:` pattern) -- `package.json`, `pyproject.toml` -- Any text file with a `VERSION: XX.YY.ZZ` label - -Files synced from other repos (with a `# REPO:` header) are not touched. - -## Code Standards - -- **PHP**: PSR-12, tabs for indentation -- **Copyright**: all files must include the Moko Consulting copyright header -- **License**: SPDX identifier `GPL-3.0-or-later` (or as specified per repo) -- **Attribution**: use `Authored-by: Moko Consulting` in commits, not individual names - -## Commit Messages - -Use conventional commit format: +Use [conventional commits](https://www.conventionalcommits.org/): ``` -type(scope): short description - -Optional body with context. - -Authored-by: Moko Consulting +feat(scope): add new extrafield for invoice tracking +fix(sql): correct column type in llx_mytable +docs(readme): update installation instructions +chore(deps): bump enterprise library to 04.02.30 ``` -Types: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `test`, `ci` +**Valid types:** `feat` | `fix` | `docs` | `chore` | `ci` | `refactor` | `style` | `test` | `perf` | `revert` | `build` -Special flags in commit messages: -- `[skip ci]` — skip all CI workflows -- `[skip bump]` — skip auto version bump only +## Pull Request Workflow -## Reporting Issues +1. **Branch** from `main` using `dev/XX.YY.ZZ/description` format +2. **Bump** the patch version in `README.md` before opening the PR +3. **Title** must be a valid conventional commit subject line +4. **Target** `main` — squash merge only (merge commits are disabled) +5. **CI checks** must pass before merge -Use the repository's issue tracker with the appropriate template. +### What Happens on Merge + +When your PR is merged to `main`, these workflows run automatically: + +1. **sync-version-on-merge** — auto-bumps patch version, propagates to all file headers +2. **auto-release** — creates `version/XX.YY` branch, git tag, and GitHub Release +3. **deploy-demo / deploy-rs** — deploys to demo and RS servers (if `src/**` changed) + +## Coding Standards + +All contributions must follow [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards): + +| Standard | Reference | +|----------|-----------| +| Coding Style | [coding-style-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/coding-style-guide.md) | +| File Headers | [file-header-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/file-header-standards.md) | +| Branching | [branch-release-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/branch-release-strategy.md) | +| Merge Strategy | [merge-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/merge-strategy.md) | +| Scripting | [scripting-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/scripting-standards.md) | +| Build & Release | [build-release.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/workflows/build-release.md) | + +## PR Checklist + +- [ ] Branch named `dev/XX.YY.ZZ/description` +- [ ] Patch version bumped in `README.md` +- [ ] Conventional commit format for PR title +- [ ] All new files have FILE INFORMATION headers +- [ ] `declare(strict_types=1)` in all PHP files +- [ ] PHPDoc on all public methods +- [ ] Tests pass +- [ ] CHANGELOG.md updated +- [ ] No secrets, tokens, or credentials committed + +## Custom Workflows + +Place repo-specific workflows in `.github/workflows/custom/` — they are **never overwritten or deleted** by MokoStandards sync: + +``` +.github/workflows/ +├── deploy-dev.yml ← Synced from MokoStandards +├── auto-release.yml ← Synced from MokoStandards +└── custom/ ← Your custom workflows (safe) + └── my-custom-ci.yml +``` + +## License + +By contributing, you agree that your contributions will be licensed under the [GPL-3.0-or-later](LICENSE) license. --- -*Moko Consulting * +*This file is synced from [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards). Do not edit directly — changes will be overwritten on the next sync.* diff --git a/Makefile b/Makefile index ac012bb..91bde1f 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ # Extension Configuration EXTENSION_NAME := mokojoomhero -EXTENSION_TYPE := template +EXTENSION_TYPE := module # Options: module, plugin, component, package, template EXTENSION_VERSION := 1.0.0 diff --git a/README.md b/README.md index cd734e3..af47af3 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ # FILE INFORMATION REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero FILE: ./README.md - VERSION: 01.00.01 + VERSION: 01.00.20 BRIEF: MokoJoomHero - Joomla Module --> diff --git a/SECURITY.md b/SECURITY.md index 5a7fba6..4630973 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -23,7 +23,7 @@ DEFGROUP: [PROJECT_NAME] INGROUP: [PROJECT_NAME].Documentation REPO: [REPOSITORY_URL] PATH: /SECURITY.md -VERSION: 04.04.01 +VERSION: 01.00.20 BRIEF: Security vulnerability reporting and handling policy --> diff --git a/src/component.php b/src/component.php deleted file mode 100644 index 3895ecb..0000000 --- a/src/component.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * This file is part of a Moko Consulting project. - * - * SPDX-License-Identifier: GPL-3.0-or-later - * - * FILE INFORMATION - * DEFGROUP: MokoJoomHero.Template - * INGROUP: MokoJoomHero - * REPO: https://github.com/mokoconsulting-tech/MokoJoomHero - * PATH: /src/component.php - * VERSION: 01.00.01 - * BRIEF: Component-only output — used when ?tmpl=component strips all template chrome - */ - -defined('_JEXEC') or die; - -use Joomla\CMS\Document\HtmlDocument; - -/** @var HtmlDocument $this */ - -$wa = $this->getWebAssetManager(); -$wa->usePreset('template.tpl_mokojoomhero'); - -?> - - - - - - - - - - - - - diff --git a/src/css/template.css b/src/css/template.css deleted file mode 100644 index 3397338..0000000 --- a/src/css/template.css +++ /dev/null @@ -1,330 +0,0 @@ -/* Copyright (C) 2026 Moko Consulting - * - * SPDX-License-Identifier: GPL-3.0-or-later - * - * FILE INFORMATION - * DEFGROUP: MokoJoomHero.Template.Assets - * INGROUP: MokoJoomHero.Template - * REPO: https://github.com/mokoconsulting-tech/MokoJoomHero - * PATH: /src/css/template.css - * VERSION: 01.00.01 - * BRIEF: Main template stylesheet — base layout, typography, and module chrome - */ - -/* ============================================================ - CSS Custom Properties - ============================================================ */ -:root { - --brand-color: #1a73e8; - --brand-color-dark: #1557b0; - --text-color: #333; - --text-muted: #666; - --bg-color: #fff; - --bg-light: #f8f9fa; - --border-color: #dee2e6; - --header-height: 64px; - --sidebar-width: 260px; - --container-max: 1200px; - --spacing-xs: 0.25rem; - --spacing-sm: 0.5rem; - --spacing-md: 1rem; - --spacing-lg: 2rem; - --spacing-xl: 3rem; - --radius: 6px; - --shadow: 0 2px 8px rgba(0, 0, 0, 0.08); - --transition: 0.2s ease; -} - -/* ============================================================ - Reset & Base - ============================================================ */ -*, -*::before, -*::after { - box-sizing: border-box; -} - -html { - scroll-behavior: smooth; -} - -body { - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; - font-size: 1rem; - line-height: 1.6; - color: var(--text-color); - background-color: var(--bg-color); -} - -img { - max-width: 100%; - height: auto; -} - -a { - color: var(--brand-color); - text-decoration: none; -} - -a:hover { - color: var(--brand-color-dark); - text-decoration: underline; -} - -/* ============================================================ - Container - ============================================================ */ -.container { - width: 100%; - max-width: var(--container-max); - margin-inline: auto; - padding-inline: var(--spacing-md); -} - -.container-fluid { - width: 100%; - padding-inline: var(--spacing-md); -} - -/* ============================================================ - Header - ============================================================ */ -.site-header { - background: var(--bg-color); - border-bottom: 1px solid var(--border-color); - z-index: 100; -} - -.site-header.sticky-header { - position: sticky; - top: 0; -} - -.header-inner { - display: flex; - align-items: center; - justify-content: space-between; - min-height: var(--header-height); - gap: var(--spacing-md); -} - -.site-brand a { - display: flex; - align-items: center; - gap: var(--spacing-sm); - text-decoration: none; -} - -.site-logo { - height: 40px; - width: auto; -} - -.site-title { - font-size: 1.25rem; - font-weight: 700; - color: var(--text-color); -} - -.site-description { - font-size: 0.875rem; - color: var(--text-muted); - margin: 0; -} - -/* ============================================================ - Navigation - ============================================================ */ -.site-navigation ul { - list-style: none; - margin: 0; - padding: 0; - display: flex; - gap: var(--spacing-sm); -} - -.site-navigation a { - display: block; - padding: var(--spacing-sm) var(--spacing-md); - color: var(--text-color); - border-radius: var(--radius); - transition: background var(--transition); -} - -.site-navigation a:hover, -.site-navigation a.active { - background: var(--bg-light); - text-decoration: none; - color: var(--brand-color); -} - -/* ============================================================ - Topbar - ============================================================ */ -.topbar { - background: var(--bg-light); - border-bottom: 1px solid var(--border-color); - font-size: 0.875rem; - padding: var(--spacing-xs) 0; -} - -/* ============================================================ - Hero Section - ============================================================ */ -.hero-section { - padding: var(--spacing-xl) 0; - background: linear-gradient(135deg, var(--brand-color) 0%, var(--brand-color-dark) 100%); - color: #fff; -} - -.hero-section h1, -.hero-section h2 { - color: #fff; -} - -/* ============================================================ - Breadcrumbs - ============================================================ */ -.breadcrumbs-area { - padding: var(--spacing-sm) 0; - background: var(--bg-light); - border-bottom: 1px solid var(--border-color); - font-size: 0.875rem; -} - -/* ============================================================ - Main Content Layout - ============================================================ */ -.site-main { - padding: var(--spacing-lg) 0; - min-height: 50vh; -} - -.content-area { - display: flex; - gap: var(--spacing-lg); -} - -.content-body { - flex: 1; - min-width: 0; -} - -.sidebar { - flex: 0 0 var(--sidebar-width); -} - -/* ============================================================ - Module Chrome — card style - ============================================================ */ -.card { - background: var(--bg-color); - border: 1px solid var(--border-color); - border-radius: var(--radius); - box-shadow: var(--shadow); - margin-bottom: var(--spacing-md); - overflow: hidden; -} - -.card .card-header { - padding: var(--spacing-md); - border-bottom: 1px solid var(--border-color); - font-weight: 600; -} - -.card .card-body { - padding: var(--spacing-md); -} - -/* ============================================================ - Footer - ============================================================ */ -.site-footer { - background: var(--bg-light); - border-top: 1px solid var(--border-color); - padding: var(--spacing-lg) 0; - margin-top: var(--spacing-xl); -} - -.footer-copyright { - text-align: center; - font-size: 0.875rem; - color: var(--text-muted); -} - -.footer-copyright p { - margin: 0; -} - -/* ============================================================ - Back to Top - ============================================================ */ -.back-to-top { - position: fixed; - bottom: 2rem; - right: 2rem; - width: 40px; - height: 40px; - display: flex; - align-items: center; - justify-content: center; - background: var(--brand-color); - color: #fff; - border-radius: 50%; - text-decoration: none; - box-shadow: var(--shadow); - opacity: 0; - visibility: hidden; - transition: opacity var(--transition), visibility var(--transition); - z-index: 99; -} - -.back-to-top.visible { - opacity: 1; - visibility: visible; -} - -.back-to-top:hover { - background: var(--brand-color-dark); - color: #fff; - text-decoration: none; -} - -/* ============================================================ - System Messages - ============================================================ */ -.alert { - padding: var(--spacing-md); - margin-bottom: var(--spacing-md); - border: 1px solid transparent; - border-radius: var(--radius); -} - -.alert-message { background: #d1ecf1; border-color: #bee5eb; color: #0c5460; } -.alert-warning { background: #fff3cd; border-color: #ffeeba; color: #856404; } -.alert-error { background: #f8d7da; border-color: #f5c6cb; color: #721c24; } - -/* ============================================================ - Responsive - ============================================================ */ -@media (max-width: 768px) { - .header-inner { - flex-direction: column; - align-items: flex-start; - padding: var(--spacing-sm) 0; - } - - .site-navigation ul { - flex-direction: column; - width: 100%; - } - - .content-area { - flex-direction: column; - } - - .sidebar { - flex: 1 1 auto; - } -} diff --git a/src/error.php b/src/error.php deleted file mode 100644 index 9cbb9a5..0000000 --- a/src/error.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * This file is part of a Moko Consulting project. - * - * SPDX-License-Identifier: GPL-3.0-or-later - * - * FILE INFORMATION - * DEFGROUP: MokoJoomHero.Template - * INGROUP: MokoJoomHero - * REPO: https://github.com/mokoconsulting-tech/MokoJoomHero - * PATH: /src/error.php - * VERSION: 01.00.01 - * BRIEF: Error page template — displayed for 403, 404, 500, etc. - */ - -defined('_JEXEC') or die; - -use Joomla\CMS\Factory; -use Joomla\CMS\Language\Text; -use Joomla\CMS\Uri\Uri; - -/** @var Joomla\CMS\Document\ErrorDocument $this */ - -$app = Factory::getApplication(); - -// Error details -$error_code = $this->error->getCode(); -$error_message = $this->error->getMessage(); - -if (!in_array($error_code, [400, 401, 403, 404, 500])) { - $error_code = 500; -} - -?> - - - - - - <?php echo $error_code; ?> - <?php echo htmlspecialchars($error_message, ENT_QUOTES, 'UTF-8'); ?> - - - - -
-

-

- - - -
- - diff --git a/src/images/index.html b/src/images/index.html deleted file mode 100644 index 2efb97f..0000000 --- a/src/images/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/index.php b/src/index.php deleted file mode 100644 index 603a111..0000000 --- a/src/index.php +++ /dev/null @@ -1,181 +0,0 @@ - - * - * This file is part of a Moko Consulting project. - * - * SPDX-License-Identifier: GPL-3.0-or-later - * - * FILE INFORMATION - * DEFGROUP: MokoJoomHero.Template - * INGROUP: MokoJoomHero - * REPO: https://github.com/mokoconsulting-tech/MokoJoomHero - * PATH: /src/index.php - * VERSION: 01.00.01 - * BRIEF: Main template entry point — renders the full HTML page - */ - -defined('_JEXEC') or die; - -use Joomla\CMS\Document\HtmlDocument; -use Joomla\CMS\Factory; -use Joomla\CMS\HTML\HTMLHelper; -use Joomla\CMS\Uri\Uri; - -/** @var HtmlDocument $this */ - -$app = Factory::getApplication(); -$wa = $this->getWebAssetManager(); -$params = $app->getTemplate(true)->params; - -// Register and use template assets via Web Asset Manager -$wa->usePreset('template.tpl_mokojoomhero'); - -// Template parameters -$logo = $params->get('logoFile', ''); -$site_description = $params->get('siteDescription', ''); -$brand_color = $params->get('brandColor', '#1a73e8'); -$fluid = (bool) $params->get('fluidContainer', 0); -$sticky_header = (bool) $params->get('stickyHeader', 1); -$back_to_top = (bool) $params->get('backToTop', 1); - -$container_class = $fluid ? 'container-fluid' : 'container'; - -// Inject brand color as CSS custom property -$this->addHeadStyle(':root { --brand-color: ' . htmlspecialchars($brand_color, ENT_QUOTES, 'UTF-8') . '; }'); - -?> - - - - - - - - - - - countModules('topbar')) : ?> -
-
- -
-
- - - -
-
-
- - - - - countModules('menu')) : ?> - - -
-
-
- - - countModules('banner')) : ?> - - - - - countModules('hero')) : ?> -
-
- -
-
- - - - countModules('breadcrumbs')) : ?> - - - - -
-
- countModules('main-top')) : ?> -
- -
- - -
- - countModules('sidebar-left')) : ?> - - - - -
- - -
- - - countModules('sidebar-right')) : ?> - - -
- - countModules('main-bottom')) : ?> -
- -
- -
-
- - -
-
- countModules('footer')) : ?> - - - -
-
- - - - - - - - - - - - diff --git a/src/js/template.js b/src/js/template.js deleted file mode 100644 index 7ec6480..0000000 --- a/src/js/template.js +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Copyright (C) 2026 Moko Consulting - * - * SPDX-License-Identifier: GPL-3.0-or-later - * - * FILE INFORMATION - * DEFGROUP: MokoJoomHero.Template.Assets - * INGROUP: MokoJoomHero.Template - * REPO: https://github.com/mokoconsulting-tech/MokoJoomHero - * PATH: /src/js/template.js - * VERSION: 01.00.01 - * BRIEF: Main template JavaScript — back-to-top toggle and lightweight UI helpers - */ - -'use strict'; - -document.addEventListener('DOMContentLoaded', function () { - // Back-to-top button visibility toggle - var backToTop = document.querySelector('.back-to-top'); - - if (backToTop) { - window.addEventListener('scroll', function () { - if (window.scrollY > 300) { - backToTop.classList.add('visible'); - } else { - backToTop.classList.remove('visible'); - } - }, { passive: true }); - - backToTop.addEventListener('click', function (e) { - e.preventDefault(); - window.scrollTo({ top: 0, behavior: 'smooth' }); - }); - } -}); diff --git a/src/language/en-GB/mod_mokojoomhero.ini b/src/language/en-GB/mod_mokojoomhero.ini new file mode 100644 index 0000000..c2cf827 --- /dev/null +++ b/src/language/en-GB/mod_mokojoomhero.ini @@ -0,0 +1,58 @@ +; Copyright (C) 2026 Moko Consulting +; SPDX-License-Identifier: GPL-3.0-or-later +; +; FILE INFORMATION +; DEFGROUP: MokoJoomHero.Module.Language +; INGROUP: MokoJoomHero.Module +; REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero +; PATH: /src/language/en-GB/mod_mokojoomhero.ini +; VERSION: 01.00.20 +; BRIEF: Language strings for MokoJoomHero module (frontend + admin form fields) + +MOD_MOKOJOOMHERO_NO_CONTENT="Add content to this module to display it over the hero image." + +; Content fieldset +MOD_MOKOJOOMHERO_FIELDSET_CONTENT="Hero Content" +MOD_MOKOJOOMHERO_CONTENT_LABEL="Content" +MOD_MOKOJOOMHERO_CONTENT_DESC="HTML content displayed on the hero. Use the editor to add headings, text, buttons, or any HTML." +MOD_MOKOJOOMHERO_SHOW_CARD_LABEL="Show Card" +MOD_MOKOJOOMHERO_SHOW_CARD_DESC="Wrap the content in a card with a white background and shadow." + +; Hero mode +MOD_MOKOJOOMHERO_MODE_LABEL="Hero Mode" +MOD_MOKOJOOMHERO_MODE_DESC="Choose between a slideshow of images or a background video." +MOD_MOKOJOOMHERO_MODE_IMAGES="Images" +MOD_MOKOJOOMHERO_MODE_VIDEO="Video" + +; Image settings +MOD_MOKOJOOMHERO_IMAGE_FOLDER_LABEL="Image Folder" +MOD_MOKOJOOMHERO_IMAGE_FOLDER_DESC="Path to folder containing hero images, relative to Joomla root (e.g. images/heroes)." +MOD_MOKOJOOMHERO_IMAGE_COUNT_LABEL="Number of Images" +MOD_MOKOJOOMHERO_IMAGE_COUNT_DESC="How many random images to include in the slideshow (1–5)." +MOD_MOKOJOOMHERO_SLIDE_INTERVAL_LABEL="Slide Interval (ms)" +MOD_MOKOJOOMHERO_SLIDE_INTERVAL_DESC="Time between slides in milliseconds (e.g. 5000 = 5 seconds)." + +; Video settings +MOD_MOKOJOOMHERO_VIDEO_FILE_LABEL="Video URL" +MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="Local file path, YouTube URL, or Vimeo URL. Any format works — the module auto-detects the source." + +; Hero height +MOD_MOKOJOOMHERO_HERO_HEIGHT_LABEL="Hero Height" +MOD_MOKOJOOMHERO_HERO_HEIGHT_DESC="Height of the hero section. Use px for fixed pixels (e.g. 400px) or vh for viewport height (e.g. 60vh for 60%% of screen)." +MOD_MOKOJOOMHERO_HERO_HEIGHT_HINT="e.g. 60vh or 400px" + +; Overlay fieldset +MOD_MOKOJOOMHERO_FIELDSET_OVERLAY="Overlay & Text" +MOD_MOKOJOOMHERO_OVERLAY_COLOR_LABEL="Overlay Colour" +MOD_MOKOJOOMHERO_OVERLAY_COLOR_DESC="Background colour of the overlay on top of the hero image." +MOD_MOKOJOOMHERO_OVERLAY_OPACITY_LABEL="Overlay Opacity" +MOD_MOKOJOOMHERO_OVERLAY_OPACITY_DESC="Transparency of the overlay (0 = fully transparent, 1 = fully opaque)." +MOD_MOKOJOOMHERO_TEXT_ALIGN_LABEL="Text Alignment" +MOD_MOKOJOOMHERO_TEXT_ALIGN_DESC="Horizontal alignment of the overlay text." +MOD_MOKOJOOMHERO_TEXT_COLOR_LABEL="Text Colour" +MOD_MOKOJOOMHERO_TEXT_COLOR_DESC="Colour of the text displayed over the hero image." + +; Alignment options +MOD_MOKOJOOMHERO_ALIGN_LEFT="Left" +MOD_MOKOJOOMHERO_ALIGN_CENTER="Centre" +MOD_MOKOJOOMHERO_ALIGN_RIGHT="Right" diff --git a/src/language/en-GB/mod_mokojoomhero.sys.ini b/src/language/en-GB/mod_mokojoomhero.sys.ini new file mode 100644 index 0000000..880b35f --- /dev/null +++ b/src/language/en-GB/mod_mokojoomhero.sys.ini @@ -0,0 +1,59 @@ +; Copyright (C) 2026 Moko Consulting +; SPDX-License-Identifier: GPL-3.0-or-later +; +; FILE INFORMATION +; DEFGROUP: MokoJoomHero.Module.Language +; INGROUP: MokoJoomHero.Module +; REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero +; PATH: /src/language/en-GB/mod_mokojoomhero.sys.ini +; VERSION: 01.00.20 +; BRIEF: System language strings — used in admin Extension Manager and Module Manager + +MOD_MOKOJOOMHERO="Module - MokoJoomHero" +MOD_MOKOJOOMHERO_DESCRIPTION="Displays a random hero image slideshow or background video with content overlaid. Designed for MokoOnyx template. By Moko Consulting." + +; Content fieldset +MOD_MOKOJOOMHERO_FIELDSET_CONTENT="Hero Content" +MOD_MOKOJOOMHERO_CONTENT_LABEL="Content" +MOD_MOKOJOOMHERO_CONTENT_DESC="HTML content displayed on the hero. Use the editor to add headings, text, buttons, or any HTML." +MOD_MOKOJOOMHERO_SHOW_CARD_LABEL="Show Card" +MOD_MOKOJOOMHERO_SHOW_CARD_DESC="Wrap the content in a card with a white background and shadow." + +; Hero mode +MOD_MOKOJOOMHERO_MODE_LABEL="Hero Mode" +MOD_MOKOJOOMHERO_MODE_DESC="Choose between a slideshow of images or a background video." +MOD_MOKOJOOMHERO_MODE_IMAGES="Images" +MOD_MOKOJOOMHERO_MODE_VIDEO="Video" + +; Image settings +MOD_MOKOJOOMHERO_IMAGE_FOLDER_LABEL="Image Folder" +MOD_MOKOJOOMHERO_IMAGE_FOLDER_DESC="Path to folder containing hero images, relative to Joomla root (e.g. images/heroes)." +MOD_MOKOJOOMHERO_IMAGE_COUNT_LABEL="Number of Images" +MOD_MOKOJOOMHERO_IMAGE_COUNT_DESC="How many random images to include in the slideshow (1–5)." +MOD_MOKOJOOMHERO_SLIDE_INTERVAL_LABEL="Slide Interval (ms)" +MOD_MOKOJOOMHERO_SLIDE_INTERVAL_DESC="Time between slides in milliseconds (e.g. 5000 = 5 seconds)." + +; Video settings +MOD_MOKOJOOMHERO_VIDEO_FILE_LABEL="Video URL" +MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="Local file path, YouTube URL, or Vimeo URL. Any format works — the module auto-detects the source." + +; Hero height +MOD_MOKOJOOMHERO_HERO_HEIGHT_LABEL="Hero Height" +MOD_MOKOJOOMHERO_HERO_HEIGHT_DESC="Height of the hero section. Use px for fixed pixels (e.g. 400px) or vh for viewport height (e.g. 60vh for 60%% of screen)." +MOD_MOKOJOOMHERO_HERO_HEIGHT_HINT="e.g. 60vh or 400px" + +; Overlay fieldset +MOD_MOKOJOOMHERO_FIELDSET_OVERLAY="Overlay & Text" +MOD_MOKOJOOMHERO_OVERLAY_COLOR_LABEL="Overlay Colour" +MOD_MOKOJOOMHERO_OVERLAY_COLOR_DESC="Background colour of the overlay on top of the hero image." +MOD_MOKOJOOMHERO_OVERLAY_OPACITY_LABEL="Overlay Opacity" +MOD_MOKOJOOMHERO_OVERLAY_OPACITY_DESC="Transparency of the overlay (0 = fully transparent, 1 = fully opaque)." +MOD_MOKOJOOMHERO_TEXT_ALIGN_LABEL="Text Alignment" +MOD_MOKOJOOMHERO_TEXT_ALIGN_DESC="Horizontal alignment of the overlay text." +MOD_MOKOJOOMHERO_TEXT_COLOR_LABEL="Text Colour" +MOD_MOKOJOOMHERO_TEXT_COLOR_DESC="Colour of the text displayed over the hero image." + +; Alignment options +MOD_MOKOJOOMHERO_ALIGN_LEFT="Left" +MOD_MOKOJOOMHERO_ALIGN_CENTER="Centre" +MOD_MOKOJOOMHERO_ALIGN_RIGHT="Right" diff --git a/src/language/en-GB/tpl_mokojoomhero.ini b/src/language/en-GB/tpl_mokojoomhero.ini deleted file mode 100644 index 79af3f4..0000000 --- a/src/language/en-GB/tpl_mokojoomhero.ini +++ /dev/null @@ -1,13 +0,0 @@ -; Copyright (C) 2026 Moko Consulting -; SPDX-License-Identifier: GPL-3.0-or-later -; -; FILE INFORMATION -; DEFGROUP: MokoJoomHero.Template.Language -; INGROUP: MokoJoomHero.Template -; REPO: https://github.com/mokoconsulting-tech/MokoJoomHero -; PATH: /src/language/en-GB/tpl_mokojoomhero.ini -; VERSION: 01.00.01 -; BRIEF: Front-end language strings for MokoJoomHero template - -TPL_MOKOJOOMHERO_MAIN_NAV="Main Navigation" -TPL_MOKOJOOMHERO_BACK_TO_TOP="Back to top" diff --git a/src/language/en-GB/tpl_mokojoomhero.sys.ini b/src/language/en-GB/tpl_mokojoomhero.sys.ini deleted file mode 100644 index eaca64e..0000000 --- a/src/language/en-GB/tpl_mokojoomhero.sys.ini +++ /dev/null @@ -1,25 +0,0 @@ -; Copyright (C) 2026 Moko Consulting -; SPDX-License-Identifier: GPL-3.0-or-later -; -; FILE INFORMATION -; DEFGROUP: MokoJoomHero.Template.Language -; INGROUP: MokoJoomHero.Template -; REPO: https://github.com/mokoconsulting-tech/MokoJoomHero -; PATH: /src/language/en-GB/tpl_mokojoomhero.sys.ini -; VERSION: 01.00.01 -; BRIEF: System language strings — used in admin Extension Manager and Template Manager - -TPL_MOKOJOOMHERO="MokoJoomHero" -TPL_MOKOJOOMHERO_DESCRIPTION="A modern, accessible Joomla template by Moko Consulting. Features a hero section, flexible module positions, sticky header, and customisable brand colour." -TPL_MOKOJOOMHERO_LOGO_FILE_LABEL="Logo" -TPL_MOKOJOOMHERO_LOGO_FILE_DESC="Select an image to use as the site logo." -TPL_MOKOJOOMHERO_SITE_DESCRIPTION_LABEL="Site Description" -TPL_MOKOJOOMHERO_SITE_DESCRIPTION_DESC="A short tagline displayed next to the logo." -TPL_MOKOJOOMHERO_BRAND_COLOR_LABEL="Brand Colour" -TPL_MOKOJOOMHERO_BRAND_COLOR_DESC="Primary accent colour used throughout the template." -TPL_MOKOJOOMHERO_FLUID_LABEL="Fluid Container" -TPL_MOKOJOOMHERO_FLUID_DESC="Use a full-width container instead of a fixed-width one." -TPL_MOKOJOOMHERO_STICKY_HEADER_LABEL="Sticky Header" -TPL_MOKOJOOMHERO_STICKY_HEADER_DESC="Keep the header visible when scrolling." -TPL_MOKOJOOMHERO_BACK_TO_TOP_LABEL="Back to Top Button" -TPL_MOKOJOOMHERO_BACK_TO_TOP_DESC="Show a floating button that scrolls the page to the top." diff --git a/src/language/en-US/mod_mokojoomhero.ini b/src/language/en-US/mod_mokojoomhero.ini new file mode 100644 index 0000000..e3f89c0 --- /dev/null +++ b/src/language/en-US/mod_mokojoomhero.ini @@ -0,0 +1,58 @@ +; Copyright (C) 2026 Moko Consulting +; SPDX-License-Identifier: GPL-3.0-or-later +; +; FILE INFORMATION +; DEFGROUP: MokoJoomHero.Module.Language +; INGROUP: MokoJoomHero.Module +; REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero +; PATH: /src/language/en-US/mod_mokojoomhero.ini +; VERSION: 01.00.20 +; BRIEF: Language strings for MokoJoomHero module (en-US, frontend + admin form fields) + +MOD_MOKOJOOMHERO_NO_CONTENT="Add content to this module to display it over the hero image." + +; Content fieldset +MOD_MOKOJOOMHERO_FIELDSET_CONTENT="Hero Content" +MOD_MOKOJOOMHERO_CONTENT_LABEL="Content" +MOD_MOKOJOOMHERO_CONTENT_DESC="HTML content displayed on the hero. Use the editor to add headings, text, buttons, or any HTML." +MOD_MOKOJOOMHERO_SHOW_CARD_LABEL="Show Card" +MOD_MOKOJOOMHERO_SHOW_CARD_DESC="Wrap the content in a card with a white background and shadow." + +; Hero mode +MOD_MOKOJOOMHERO_MODE_LABEL="Hero Mode" +MOD_MOKOJOOMHERO_MODE_DESC="Choose between a slideshow of images or a background video." +MOD_MOKOJOOMHERO_MODE_IMAGES="Images" +MOD_MOKOJOOMHERO_MODE_VIDEO="Video" + +; Image settings +MOD_MOKOJOOMHERO_IMAGE_FOLDER_LABEL="Image Folder" +MOD_MOKOJOOMHERO_IMAGE_FOLDER_DESC="Path to folder containing hero images, relative to Joomla root (e.g. images/heroes)." +MOD_MOKOJOOMHERO_IMAGE_COUNT_LABEL="Number of Images" +MOD_MOKOJOOMHERO_IMAGE_COUNT_DESC="How many random images to include in the slideshow (1-5)." +MOD_MOKOJOOMHERO_SLIDE_INTERVAL_LABEL="Slide Interval (ms)" +MOD_MOKOJOOMHERO_SLIDE_INTERVAL_DESC="Time between slides in milliseconds (e.g. 5000 = 5 seconds)." + +; Video settings +MOD_MOKOJOOMHERO_VIDEO_FILE_LABEL="Video URL" +MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="Local file path, YouTube URL, or Vimeo URL. Any format works - the module auto-detects the source." + +; Hero height +MOD_MOKOJOOMHERO_HERO_HEIGHT_LABEL="Hero Height" +MOD_MOKOJOOMHERO_HERO_HEIGHT_DESC="Height of the hero section. Use px for fixed pixels (e.g. 400px) or vh for viewport height (e.g. 60vh for 60% of screen)." +MOD_MOKOJOOMHERO_HERO_HEIGHT_HINT="e.g. 60vh or 400px" + +; Overlay fieldset +MOD_MOKOJOOMHERO_FIELDSET_OVERLAY="Overlay & Text" +MOD_MOKOJOOMHERO_OVERLAY_COLOR_LABEL="Overlay Color" +MOD_MOKOJOOMHERO_OVERLAY_COLOR_DESC="Background color of the overlay on top of the hero image." +MOD_MOKOJOOMHERO_OVERLAY_OPACITY_LABEL="Overlay Opacity" +MOD_MOKOJOOMHERO_OVERLAY_OPACITY_DESC="Transparency of the overlay (0 = fully transparent, 1 = fully opaque)." +MOD_MOKOJOOMHERO_TEXT_ALIGN_LABEL="Text Alignment" +MOD_MOKOJOOMHERO_TEXT_ALIGN_DESC="Horizontal alignment of the overlay text." +MOD_MOKOJOOMHERO_TEXT_COLOR_LABEL="Text Color" +MOD_MOKOJOOMHERO_TEXT_COLOR_DESC="Color of the text displayed over the hero image." + +; Alignment options +MOD_MOKOJOOMHERO_ALIGN_LEFT="Left" +MOD_MOKOJOOMHERO_ALIGN_CENTER="Center" +MOD_MOKOJOOMHERO_ALIGN_RIGHT="Right" diff --git a/src/language/en-US/mod_mokojoomhero.sys.ini b/src/language/en-US/mod_mokojoomhero.sys.ini new file mode 100644 index 0000000..0f978d5 --- /dev/null +++ b/src/language/en-US/mod_mokojoomhero.sys.ini @@ -0,0 +1,59 @@ +; Copyright (C) 2026 Moko Consulting +; SPDX-License-Identifier: GPL-3.0-or-later +; +; FILE INFORMATION +; DEFGROUP: MokoJoomHero.Module.Language +; INGROUP: MokoJoomHero.Module +; REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero +; PATH: /src/language/en-US/mod_mokojoomhero.sys.ini +; VERSION: 01.00.20 +; BRIEF: System language strings — used in admin Extension Manager and Module Manager (en-US) + +MOD_MOKOJOOMHERO="Module - MokoJoomHero" +MOD_MOKOJOOMHERO_DESCRIPTION="Displays a random hero image slideshow or background video with content overlaid. Designed for MokoOnyx template. By Moko Consulting." + +; Content fieldset +MOD_MOKOJOOMHERO_FIELDSET_CONTENT="Hero Content" +MOD_MOKOJOOMHERO_CONTENT_LABEL="Content" +MOD_MOKOJOOMHERO_CONTENT_DESC="HTML content displayed on the hero. Use the editor to add headings, text, buttons, or any HTML." +MOD_MOKOJOOMHERO_SHOW_CARD_LABEL="Show Card" +MOD_MOKOJOOMHERO_SHOW_CARD_DESC="Wrap the content in a card with a white background and shadow." + +; Hero mode +MOD_MOKOJOOMHERO_MODE_LABEL="Hero Mode" +MOD_MOKOJOOMHERO_MODE_DESC="Choose between a slideshow of images or a background video." +MOD_MOKOJOOMHERO_MODE_IMAGES="Images" +MOD_MOKOJOOMHERO_MODE_VIDEO="Video" + +; Image settings +MOD_MOKOJOOMHERO_IMAGE_FOLDER_LABEL="Image Folder" +MOD_MOKOJOOMHERO_IMAGE_FOLDER_DESC="Path to folder containing hero images, relative to Joomla root (e.g. images/heroes)." +MOD_MOKOJOOMHERO_IMAGE_COUNT_LABEL="Number of Images" +MOD_MOKOJOOMHERO_IMAGE_COUNT_DESC="How many random images to include in the slideshow (1-5)." +MOD_MOKOJOOMHERO_SLIDE_INTERVAL_LABEL="Slide Interval (ms)" +MOD_MOKOJOOMHERO_SLIDE_INTERVAL_DESC="Time between slides in milliseconds (e.g. 5000 = 5 seconds)." + +; Video settings +MOD_MOKOJOOMHERO_VIDEO_FILE_LABEL="Video URL" +MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="Local file path, YouTube URL, or Vimeo URL. Any format works - the module auto-detects the source." + +; Hero height +MOD_MOKOJOOMHERO_HERO_HEIGHT_LABEL="Hero Height" +MOD_MOKOJOOMHERO_HERO_HEIGHT_DESC="Height of the hero section. Use px for fixed pixels (e.g. 400px) or vh for viewport height (e.g. 60vh for 60% of screen)." +MOD_MOKOJOOMHERO_HERO_HEIGHT_HINT="e.g. 60vh or 400px" + +; Overlay fieldset +MOD_MOKOJOOMHERO_FIELDSET_OVERLAY="Overlay & Text" +MOD_MOKOJOOMHERO_OVERLAY_COLOR_LABEL="Overlay Color" +MOD_MOKOJOOMHERO_OVERLAY_COLOR_DESC="Background color of the overlay on top of the hero image." +MOD_MOKOJOOMHERO_OVERLAY_OPACITY_LABEL="Overlay Opacity" +MOD_MOKOJOOMHERO_OVERLAY_OPACITY_DESC="Transparency of the overlay (0 = fully transparent, 1 = fully opaque)." +MOD_MOKOJOOMHERO_TEXT_ALIGN_LABEL="Text Alignment" +MOD_MOKOJOOMHERO_TEXT_ALIGN_DESC="Horizontal alignment of the overlay text." +MOD_MOKOJOOMHERO_TEXT_COLOR_LABEL="Text Color" +MOD_MOKOJOOMHERO_TEXT_COLOR_DESC="Color of the text displayed over the hero image." + +; Alignment options +MOD_MOKOJOOMHERO_ALIGN_LEFT="Left" +MOD_MOKOJOOMHERO_ALIGN_CENTER="Center" +MOD_MOKOJOOMHERO_ALIGN_RIGHT="Right" diff --git a/src/media/css/mod_mokojoomhero.css b/src/media/css/mod_mokojoomhero.css new file mode 100644 index 0000000..68f0f3c --- /dev/null +++ b/src/media/css/mod_mokojoomhero.css @@ -0,0 +1,154 @@ +/* Copyright (C) 2026 Moko Consulting + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: MokoJoomHero.Module.Assets + * INGROUP: MokoJoomHero.Module + * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero + * PATH: /src/css/template.css + * VERSION: 01.00.20 + * BRIEF: Hero module stylesheet — slideshow, video background, overlay + */ + +/* ============================================================ + Hero container + ============================================================ */ +.mokojoomhero { + position: relative; + overflow: hidden; + display: flex; + align-items: center; + justify-content: center; +} + +/* ============================================================ + Image slides + ============================================================ */ +.mokojoomhero__slide { + position: absolute; + inset: 0; + background-size: cover; + background-position: center; + background-repeat: no-repeat; + opacity: 0; + transition: opacity 1s ease; +} + +.mokojoomhero__slide--active { + opacity: 1; +} + +/* ============================================================ + Video background + ============================================================ */ +/* Native