summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--SHORTCODES.md127
-rw-r--r--i18n/en.yaml8
-rw-r--r--i18n/it.yaml8
m---------themes/danix-xyz-hacker0
4 files changed, 140 insertions, 3 deletions
diff --git a/SHORTCODES.md b/SHORTCODES.md
index 7164fe6..691e45a 100644
--- a/SHORTCODES.md
+++ b/SHORTCODES.md
@@ -425,16 +425,137 @@ Basic download button:
{{< actions url="https://github.com/user/project/archive.zip" desc="Download ZIP" >}}
```
-With custom styling:
+Centered button:
+```
+{{< actions url="https://example.com/file.zip" desc="Download" outclass="flex justify-center" >}}
+```
+
+Right-aligned button:
+```
+{{< actions url="https://example.com/file.zip" desc="Download" outclass="flex justify-end" >}}
+```
+
+Extra vertical spacing:
+```
+{{< actions url="https://example.com/file.zip" desc="Download" outclass="my-10" >}}
+```
+
+Centered with extra spacing:
+```
+{{< actions url="https://example.com/file.zip" desc="Download" outclass="flex justify-center my-10" >}}
+```
+
+### Common `outclass` Values (wrapper `<div>`)
+
+| Class | Effect |
+|-------|--------|
+| `flex justify-center` | Center button horizontally |
+| `flex justify-end` | Align button to the right |
+| `flex justify-start` | Align button to the left (default flow) |
+| `my-4` / `my-6` / `my-10` | Vertical margin (small / default / large) |
+| `flex justify-center my-10` | Centered with large vertical spacing |
+
+### Common `inclass` Values (anchor `<a>`)
+
+| Class | Effect |
+|-------|--------|
+| `text-sm` | Smaller button text |
+| `text-lg` | Larger button text |
+| `px-6 py-3` | Larger padding |
+| `w-full justify-center` | Full-width button |
+| `font-bold` | Bold label text |
+
+## Callout
+
+Display a semantic callout box for notes, tips, warnings, and other inline asides. All 6 types are styled via CSS — no extra configuration required.
+
+### Syntax
+
+```
+{{< callout type="note" >}}
+Your content here. Supports **markdown**.
+{{< /callout >}}
+```
+
+### Parameters
+
+| Parameter | Required | Default | Description |
+|-----------|----------|---------|-------------|
+| `type` | Yes | — | One of: `note`, `tip`, `info`, `warning`, `danger`, `success` |
+| `title` | No | Translated label for type | Overrides the default title |
+
+### Examples
+
+Note:
+```
+{{< callout type="note" >}}
+This behavior changed in v2.0. Check the migration guide before upgrading.
+{{< /callout >}}
+```
+
+Tip:
+```
+{{< callout type="tip" >}}
+Pass `--fast` to skip the slow validation step in dev.
+{{< /callout >}}
+```
+
+Info:
+```
+{{< callout type="info" >}}
+This feature is available on all plans including the free tier.
+{{< /callout >}}
+```
+
+Warning:
```
-{{< actions url="https://example.com/guide.pdf" desc="Download PDF Guide" outclass="my-6" inclass="primary" >}}
+{{< callout type="warning" >}}
+Watch out for this edge case when deploying to production.
+{{< /callout >}}
```
+Danger:
+```
+{{< callout type="danger" >}}
+This action is irreversible. All data will be permanently deleted.
+{{< /callout >}}
+```
+
+Success:
+```
+{{< callout type="success" >}}
+Build completed. 234 pages generated in 392ms.
+{{< /callout >}}
+```
+
+Custom title:
+```
+{{< callout type="warning" title="Heads up" >}}
+Custom title overrides the default i18n label.
+{{< /callout >}}
+```
+
+### Accessibility Notes
+
+- `role="alert"` on `danger` type — screen readers announce immediately
+- `role="note"` on all other types — non-intrusive
+- Feather icons are decorative (`aria-hidden="true"`) — title text always conveys the type
+
+### Common `type` Values
+
+| Type | Color | Feather Icon | Use for |
+|------|-------|-------------|---------|
+| `note` | Purple (`--accent`) | `edit-2` | Extra context, side remarks |
+| `tip` | Green (`--accent2`) | `zap` | Best practices, shortcuts |
+| `info` | Cyan (`--type-link`) | `info` | Neutral information |
+| `warning` | Amber (`--type-life`) | `alert-triangle` | Potential pitfalls |
+| `danger` | Red (`#ef4444`) | `x-circle` | Destructive actions, breaking changes |
+| `success` | Green (`--accent2`) | `check-circle` | Confirmed results, completed steps |
+
## Future Shortcodes
The following shortcodes are planned for future releases:
-- **Callout**: Highlighted information boxes for notes, warnings, and tips
- **Tabs**: Tabbed content sections for organizing related information
- **Code**: Enhanced code blocks with syntax highlighting and line numbers
- **Audio**: Audio player for podcast episodes and sound files
diff --git a/i18n/en.yaml b/i18n/en.yaml
index dcad3d2..3875a14 100644
--- a/i18n/en.yaml
+++ b/i18n/en.yaml
@@ -181,3 +181,11 @@ repo_example_1_desc:
# other: "Various SlackBuild scripts, following SlackBuilds.org conventions wherever is possible."
# repo_example_3_desc:
# other: "SlackBuild scripts for Example Package 3. Utility package for system administration and configuration."
+
+# Callout shortcode titles
+callout_note: "Note"
+callout_tip: "Tip"
+callout_info: "Info"
+callout_warning: "Warning"
+callout_danger: "Danger"
+callout_success: "Success"
diff --git a/i18n/it.yaml b/i18n/it.yaml
index e0e7733..d8cee81 100644
--- a/i18n/it.yaml
+++ b/i18n/it.yaml
@@ -183,3 +183,11 @@ repo_example_1_desc:
# other: "Vari script SlackBuild, seguo gli standard di SlackBuilds.org ovunque possibile."
# repo_example_3_desc:
# other: "Script SlackBuild per Pacchetto Esempio 3. Pacchetto di utilità per amministrazione di sistema e configurazione."
+
+# Titoli shortcode callout
+callout_note: "Nota"
+callout_tip: "Suggerimento"
+callout_info: "Informazione"
+callout_warning: "Attenzione"
+callout_danger: "Pericolo"
+callout_success: "Successo"
diff --git a/themes/danix-xyz-hacker b/themes/danix-xyz-hacker
-Subproject 997ea90b7f85329476771e8b30a38fb86c18a07
+Subproject 504b0cb102d87530cd1363cc00f5ca75e093e21