diff --git a/exampleSite/content.en/_index.md b/exampleSite/content.en/_index.md index 342ea6a..674fa94 100644 --- a/exampleSite/content.en/_index.md +++ b/exampleSite/content.en/_index.md @@ -31,7 +31,6 @@ It is an attempt to create a sustainable web project. - ### Shortcodes {anchor=false} Pretty good shortcodes are included to enhance content: [Columns](/docs/content/shortcodes/columns/), - [Cards](/docs/content/shortcodes/experimental/cards/), [Tabs](/docs/content/shortcodes/tabs/), [Images](/docs/content/shortcodes/experimental/images/), [Asciinema](/docs/content/shortcodes/asciinema/), diff --git a/exampleSite/content.en/docs/content/shortcodes/experimental/badges.md b/exampleSite/content.en/docs/content/shortcodes/experimental/badges.md deleted file mode 100644 index 5305285..0000000 --- a/exampleSite/content.en/docs/content/shortcodes/experimental/badges.md +++ /dev/null @@ -1,43 +0,0 @@ -# Badges - -Inline labels for annotating content with status, versions, or metadata. - -## Syntax - -```tpl -{{}} -``` - -## Styles - -| Shortcode | Output | -| -- | -- | -| `{{}}` | {{< badge style="info" title="Hugo" value="0.158" >}} | -| `{{}}` | {{< badge style="success" title="Build" value="Passing" >}} | -| `{{}}` | {{< badge style="warning" title="Coverage" value="25%" >}} | -| `{{}}` | {{< badge style="danger" title="Issues" value="120" >}} | -| | | -| `{{}}` | {{< badge style="info" title="Title" >}} | -| `{{}}` | {{< badge style="info" value="Value" >}} | -| `{{}}` | {{< badge value="Default" >}} | - -## Use in Links - -Wrap a badge in a markdown link - -```tpl -[{{}}](https://github.com/gohugoio/hugo/releases/tag/v0.158.0) -``` - -[{{< badge title="Hugo" value="0.158" >}}](https://github.com/gohugoio/hugo/releases/tag/v0.158.0) - -## Parameters - -`style` -: Visual style. One of: `default`, `info`, `success`, `warning`, `danger`, `note`, `tip`, `important`, `caution`. - -`title` -: Label text (left side). - -`value` -: Value text (right side). diff --git a/exampleSite/content.en/docs/content/shortcodes/experimental/cards.md b/exampleSite/content.en/docs/content/shortcodes/experimental/cards.md deleted file mode 100644 index 7853b36..0000000 --- a/exampleSite/content.en/docs/content/shortcodes/experimental/cards.md +++ /dev/null @@ -1,47 +0,0 @@ -# Cards - -Content blocks with optional images and links. Often used with [Columns](/docs/content/shortcodes/columns/) for grid layouts. - -## Syntax - -```tpl -{{}} -Markdown content -{{}} -``` - -## Example - -{{% columns %}} -- {{< card image="placeholder.svg" >}} - ### With Image - Cards can display an image above the content. - {{< /card >}} - -- {{< card href="/docs/content/shortcodes/experimental/cards/" >}} - ### With Link {anchor=false} - When `href` is set, the entire card becomes clickable. - {{< /card >}} - -- {{< card title="Card" >}} - ### Plain Card - A basic card with no image or link, used for grouping related content. - {{< /card >}} -{{% /columns %}} - -## Parameters - -`href` -: Makes the card a link. The entire card area becomes clickable. - -`image` -: Path to an image displayed above the card content. Supports page resources and URLs. - -`title` -: Accessible title for the card. - -`alt` -: Alt text for the card image. - -`class` -: Additional CSS classes. diff --git a/layouts/_shortcodes/badge.html b/layouts/_shortcodes/badge.html deleted file mode 100644 index ad6abeb..0000000 --- a/layouts/_shortcodes/badge.html +++ /dev/null @@ -1,12 +0,0 @@ -{{- $style := or (.Get "style") (.Get 0) "default" -}} -{{- $attributes := partial "docs/text/mapper" (dict - "attributes" (cond .IsNamedParams .Params dict) - "merge" (dict - "class" (slice "book-badge" $style) - ) -) -}} - - {{- with or (.Get "title") (.Get 1) -}}{{ . | plainify }}{{- end -}} - {{- with or (.Get "value") (.Get 2) -}}{{ . | plainify }}{{- end -}} - -{{- /* remove whitespaces */ -}} diff --git a/layouts/_shortcodes/card.html b/layouts/_shortcodes/card.html deleted file mode 100644 index cf3aefc..0000000 --- a/layouts/_shortcodes/card.html +++ /dev/null @@ -1,20 +0,0 @@ -{{- with .Get "href" -}} -{{- $destination := partial "docs/links/portable-link" (dict "Page" $.Page "Destination" .) -}} -
-{{- template "book-card-content" $ -}} -
-{{- else -}} -
-{{- template "book-card-content" $ -}} -
-{{- end -}} - -{{- define "book-card-content" -}} -{{- with .Get "image" -}} - {{- $destination := partial "docs/links/portable-image" (dict "Page" $.Page "Destination" .) -}} - {{ partial - {{- end -}} -
-{{ with .Inner }}{{ . }}{{ end -}} -
-{{- end -}}