Token导航 LogoToken导航TokenDH.com
前端设计操作浏览器github未标认证来源可访问许可证需确认审计通过

joomla-frontend-integrationjoomla 前端集成

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

282

周安装

12

GitHub Stars

1

下载量

99
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:joomla-frontend-integration(joomla 前端集成)
来源仓库:https://github.com/nicolasflores9/skills
仓库路径:skills/joomla-frontend-integration
安装命令:
npx skills add https://github.com/nicolasflores9/skills --skill joomla-frontend-integration
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/nicolasflores9/skills --skill joomla-frontend-integration

简介

joomla-frontend-integration 用于辅助前端页面、组件、样式和交互逻辑的开发与维护,适合生成 React、Vue 等相关代码。

  • 适用于需要组件结构整理、布局问题定位或性能优化的前端开发场景。
  • 使用时需结合项目现有设计系统、路由和构建方式,避免只生成孤立片段。
  • 涉及页面改动时应配合本地预览和构建检查确认视觉效果。
  • 该技能归类为前端设计工具,主要用于 Joomla 前端集成支持。

SKILL.md

Frontend Integration in Joomla 5/6 with Helix Framework

Comprehensive guide to mastering CSS/JavaScript, WebAssetManager, and responsive design in Joomla 5/6 using Helix Framework and Bootstrap 5.


1. WebAssetManager: The Modern System

The WebAssetManager (\Joomla\CMS\WebAsset\WebAssetManager) is the official way to manage assets in Joomla 5/6. It replaces HTMLHelper and Document API (deprecated in 5.3+).

Lifecycle

  1. Registered: Asset declared in joomla.asset.json
  2. Used: Activated with $wa->useScript() or $wa->useStyle()
  3. Rendered: Inserted into HTML by <jdoc:include type="head" />
  4. Loaded: Downloaded by browser with automatic versioning

Getting an Instance

$wa = \Joomla\CMS\Factory::getApplication()
      ->getDocument()
      ->getWebAssetManager();

// Load assets
$wa->useScript('jquery');
$wa->useStyle('bootstrap');

Loading Levels in Joomla

1. media/vendor/joomla.asset.json
2. media/system/joomla.asset.json
3. media/legacy/joomla.asset.json
4. media/com_active/joomla.asset.json
5. templates/active_template/joomla.asset.json

2. joomla.asset.json Structure

JSON file that declares all assets in a centralized way. It is loaded automatically.

Basic Structure

{
  "$schema": "https://json.schemastore.org/joomla-manifest-schema.json",
  "name": "myext",
  "version": "1.0.0",
  "assets": [
    {
      "name": "my-script",
      "type": "script",
      "uri": "js/myfile.js",
      "dependencies": ["jquery"],
      "attributes": {
        "defer": true,
        "async": false
      },
      "version": "auto"
    },
    {
      "name": "my-style",
      "type": "style",
      "uri": "css/myfile.css",
      "dependencies": [],
      "version": "auto"
    }
  ]
}

Locations by Type

  • Module: /mod_mymod/joomla.asset.json
  • Component: /com_mycomp/joomla.asset.json
  • Plugin: /plg_group_name/joomla.asset.json
  • Template: /templates/mytemplate/joomla.asset.json

Automatic Versioning

"version": "auto"  // Uses last modification date
"version": "1.0.0" // Manual version

3. Loading CSS and JavaScript Correctly

Method 1: WebAssetManager (RECOMMENDED)

// In helper.php, layout, or component
$wa = \Joomla\CMS\Factory::getApplication()
      ->getDocument()
      ->getWebAssetManager();

// Scripts
$wa->useScript('jquery');
$wa->useScript('bootstrap');
$wa->useScript('my-custom-script');

// Styles
$wa->useStyle('bootstrap');
$wa->useStyle('my-custom-style');

Alternatives (Dynamic, CDN, Legacy)

// Register dynamically
$wa->registerAndUseScript('my-dynamic', 'js/dynamic.js',
    ['dependencies' => ['jquery']], ['defer' => true]);

// From CDN in joomla.asset.json
{"name": "lib", "type": "script",
 "uri": "https://cdn.example.com/lib.min.js"}

// Legacy (avoid)
\Joomla\CMS\HTML\HTMLHelper::script('js/file.js');

4. Bootstrap 5 with Helix Framework

Helix includes Bootstrap 5.2.3+ automatically. 12-column grid, flexbox, utilities.

Responsive Grid

<!-- Integrated Bootstrap grid -->
<div class="container">
  <div class="row">
    <div class="col-12 col-md-6 col-lg-4">
      <!-- Content: 100% mobile, 50% tablet, 33% desktop -->
    </div>
  </div>
</div>

Bootstrap Breakpoints

/* xs: 0px (mobile first) */
/* sm: 576px (landscape phones) */
/* md: 768px (tablets) */
/* lg: 992px (desktops) */
/* xl: 1200px (large desktops) */
/* xxl: 1400px (very large) */

Media Queries

/* Mobile first: base styles for mobile */
.card {
  padding: 1rem;
  font-size: 14px;
}

/* Enhance for tablets */
@media (min-width: 768px) {
  .card {
    padding: 2rem;
    font-size: 16px;
  }
}

/* Enhance for desktops */
@media (min-width: 992px) {
  .card {
    padding: 3rem;
    font-size: 18px;
  }
}

Do Not Break Bootstrap

/* INCORRECT: overriding Bootstrap classes */
.btn { background: red; }

/* CORRECT: create custom classes */
.btn-custom { background: red; }
.btn-custom:hover { background: darkred; }

5. Custom Modules with Assets

Structure:

/mod_mymodule/
  ├── joomla.asset.json
  ├── helper.php
  ├── mod_mymodule.php
  ├── tmpl/default.php
  ├── js/module.js
  └── css/module.css

Activate in helper.php or template:

$wa = \Joomla\CMS\Factory::getApplication()
      ->getDocument()
      ->getWebAssetManager();
$wa->useScript('mod_mymodule.script');
$wa->useStyle('mod_mymodule.style');

See complete example in references/02-modulo-testimonios-completo.php.


6. SP Page Builder: Assets in Addons

Native CSS: Row/Column > Custom CSS (CodeMirror editor available).

Custom JS: Create a sppagebuilder type plugin (native JS not supported).

See complete example in references/06-sp-page-builder-addon-plugin.php.


7. Dependencies Between Assets

Automatic load order resolution system.

Simple Dependency

{
  "name": "my-plugin",
  "type": "script",
  "uri": "js/plugin.js",
  "dependencies": ["jquery"]
}

Multiple Dependencies

{
  "name": "advanced-plugin",
  "type": "script",
  "uri": "js/advanced.js",
  "dependencies": [
    "jquery",
    "bootstrap.util",
    "popper"
  ]
}

Dependency with Specific Type

{
  "name": "my-component",
  "type": "script",
  "uri": "js/component.js",
  "dependencies": [
    "jquery#script",
    "bootstrap.util#script",
    "theme-dark#style"
  ]
}

Preset (Dependency Group)

{
  "name": "admin-bundle",
  "type": "preset",
  "uri": "",
  "dependencies": [
    "jquery#script",
    "popper#script",
    "bootstrap#script",
    "bootstrap#style"
  ]
}

8. Inline Scripts and Styles

For small or dynamic code.

Inline Script

$wa = Factory::getApplication()
      ->getDocument()
      ->getWebAssetManager();

$wa->addInlineScript('
  document.addEventListener("DOMContentLoaded", function() {
    console.log("Inline script executed");
  });
');

Inline Style

$wa->addInlineStyle('
  .banner-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
  }
');

Named Inline (as a Dependency)

$wa->registerAndUseScript(
    'my-init',
    'document.addEventListener("DOMContentLoaded", function() { /* init */ });'
);

// Use as a dependency
$wa->registerAndUseScript(
    'my-app',
    'js/app.js',
    ['dependencies' => ['my-init']]
);

9. Defer, Async, and Optimization

Critical attributes for performance.

Defer

Executes AFTER HTML is loaded. Recommended for most cases.

{
  "name": "my-script",
  "type": "script",
  "uri": "js/my-script.js",
  "attributes": {
    "defer": true,
    "async": false
  }
}

Use for:

  • jQuery
  • Bootstrap
  • Custom scripts that depend on jQuery

Async

Executes WHEN ready. For independent code.

{
  "name": "analytics",
  "type": "script",
  "uri": "https://analytics.example.com/track.js",
  "attributes": {
    "defer": false,
    "async": true
  }
}

Use for:

  • Google Analytics
  • Tracking scripts
  • Chat widgets
  • Independent code

Decision Matrix

jQuery / Bootstrap          -> defer: true, async: false
Custom JS that uses jQuery  -> defer: true, async: false
Analytics / Tracking        -> defer: false, async: true
3rd party widget            -> async: true

10. Web Components

Native W3C standard. Joomla includes joomla-core-loader.

// Create Web Component
class MyComponent extends HTMLElement {
  connectedCallback() {
    this.innerHTML = `<div>${this.getAttribute('title')}</div>`;
  }
}
customElements.define('my-component', MyComponent);

// Register in joomla.asset.json
// {"name": "my-comp", "type": "script", "uri": "js/my-comp.js",
//  "attributes": {"type": "module", "defer": true}}

See complete example in references/07-web-component-custom.js.


11. Custom Code in Helix

Admin > Templates > [Your Template] > Template Options > Custom Code tab.

Global CSS:

.site-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.custom-button {
  padding: 12px 24px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

Global JS & Google Fonts: See examples in references/08-template-helix-custom.css and references/10-ejemplos-codigo-rapido.md.


12. Best Practices: Do Not Break Helix

NEVER Edit

/template/css/template.css        X
/template/css/bootstrap.css        X
/template/js/template.js           X

ALWAYS Create/Use

/template/css/custom.css           OK
/template/scss/custom.scss         OK
/template/js/custom.js             OK
Custom Code section in admin       OK

Safe CSS Cascade

/* template.css loads first */
.btn { padding: 8px 12px; }

/* custom.css loads last - has priority */
.btn { padding: 10px 16px; }

Preserve Bootstrap Classes

/* INCORRECT: modifies Bootstrap class */
.btn { background: purple; }

/* CORRECT: creates custom class */
.btn-primary-custom { background: purple; }

<!-- Use custom class -->
<button class="btn btn-primary-custom">Button</button>

13. Quick Troubleshooting

Assets not loading: Check <jdoc:include type="head" /> in template, path in joomla.asset.json, permissions (755), Joomla cache.

Incorrect order: Verify dependencies, check Network tab in DevTools.

Bootstrap not working: Confirm $wa->useStyle('bootstrap'), do not override variables, use classes correctly.

Helix breaks: Do not edit core files, use custom.css, check Custom Code.

More details in references/09-checklist-desarrollo.md.


14. Quick References and Resources

See references/09-checklist-desarrollo.md and references/10-ejemplos-codigo-rapido.md for detailed guides and additional examples.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.06%
按下载量换算36

Claude

31.35%
按下载量换算31

Cursor

18.7%
按下载量换算19

Gemini CLI

9.64%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills