Cards

The cards shortcode displays your content in a grouped set of cards.

  • Terminal Example

    For guys who like to tinker around.

    echo "Hello World!"
  • C Example

    For the connoisseur of programming.

    printf("Hello World!");

Usage

{{< cards >}}
{{% card href="https://example.com" title="Python Example" %}}
The AI native programming language.

```python
print("Hello World!")
```
{{% /card %}}
{{% card title="Terminal Example" %}}
For guys who like to tinker around.

```bash
echo "Hello World!"
```
{{% /card %}}
{{% card title="C Example" %}}
For the connoisseur of programming.

```c
printf("Hello World!");
```
{{% /card %}}
{{< /cards >}}
{{ partial "shortcodes/cards.html" (dict
  "page" .
  "content" (slice
    (dict
      "content" "The AI native programming language.\n\n```python\nprint(\"Hello World!\")\n```"
      "href" "https://example.com"
      "title" "Python Example"
    )
    (dict
      "content" "For guys who like to tinker around.\n\n```bash\necho \"Hello World!\"\n```"
      "title" "Terminal Example"
    )
    (dict
      "content" "For the connoisseur of programming.\n\n```c\nprintf(\"Hello World!\");\n```"
      "title" "C Example"
    )
  )
)}}

If you just want a single card you can instead call the card shortcode standalone.

Also follow the above link to see the parameter for each nested card.

Parameters

Name Default Notes
template default The template to be used to display all cards in the set. Can be overridden for each card.

- default: The standard layout
- debug: A debug layout helping you in development

See the card shortcode how to use your own templates.
<content> <empty> Arbitrary number of cards defined with the card sub-shortcode.

Examples

Lots of Cards

{{< cards >}}
{{% card title="Python" %}}The AI native programming language.{{% /card %}}
{{% card title="Terminal" %}}For guys who like to tinker around.{{% /card %}}
{{% card title="C" %}}For the connoisseur of programming.{{% /card %}}
{{% card title="C++" %}}For the guys that can cope with syntax.{{% /card %}}
{{% card title="C#" %}}For guys that need two destructors.{{% /card %}}
{{< /cards >}}
{{ partial "shortcodes/cards.html" (dict
  "page" .
  "content" (slice
    (dict
      "content" "The AI native programming language."
      "title" "Python"
    )
    (dict
      "content" "For guys who like to tinker around."
      "title" "Terminal"
    )
    (dict
      "content" "For the connoisseur of programming."
      "title" "C"
    )
    (dict
      "content" "For the guys that can cope with syntax."
      "title" "C++"
    )
    (dict
      "content" "For guys that need two destructors."
      "title" "C#"
    )
  )
)}}
  • Python
    The AI native programming language.
  • Terminal
    For guys who like to tinker around.
  • C
    For the connoisseur of programming.
  • C++
    For the guys that can cope with syntax.
  • C#
    For guys that need two destructors.

Lots of Cards with Templates

{{< cards template="debug" >}}
{{% card title="Python" %}}The AI native programming language.{{% /card %}}
{{% card template="default" title="Terminal" %}}For guys who like to tinker around.{{% /card %}}
{{% card title="C" %}}For the connoisseur of programming.{{% /card %}}
{{% card title="C++" %}}For the guys that can cope with syntax.{{% /card %}}
{{% card title="C#" %}}For guys that need two destructors.{{% /card %}}
{{< /cards >}}
{{ partial "shortcodes/cards.html" (dict
  "page" .
  "content" (slice
    (dict
      "content" "The AI native programming language."
      "title" "Python"
    )
    (dict
      "content" "For guys who like to tinker around."
      "template" "default"
      "title" "Terminal"
    )
    (dict
      "content" "For the connoisseur of programming."
      "title" "C"
    )
    (dict
      "content" "For the guys that can cope with syntax."
      "title" "C++"
    )
    (dict
      "content" "For guys that need two destructors."
      "title" "C#"
    )
  )
  "template" "debug"
)}}
  • Python

    All Parameter

    {
      "color": "",
      "content": "The AI native programming language.",
      "href": "",
      "hrefattributes": {},
      "icon": "",
      "image": null,
      "imageattributes": {},
      "page": {
        "PageWithoutContent": {
          "Date": "0001-01-01T00:00:00Z",
          "Lastmod": "0001-01-01T00:00:00Z",
          "PublishDate": "0001-01-01T00:00:00Z",
          "ExpiryDate": "0001-01-01T00:00:00Z",
          "Aliases": [],
          "BundleType": "branch",
          "Description": "Show content in a set of cards",
          "Draft": false,
          "IsHome": false,
          "Keywords": null,
          "Kind": "section",
          "Layout": "",
          "LinkTitle": "Cards",
          "IsNode": true,
          "IsPage": false,
          "Path": "/shortcodes/cards",
          "Slug": "",
          "Lang": "en",
          "IsSection": true,
          "Section": "shortcodes",
          "Sitemap": {
            "ChangeFreq": "",
            "Priority": -1,
            "Filename": "sitemap.xml",
            "Disable": false
          },
          "Type": "shortcodes",
          "Weight": 0
        },
        "TableOfContentsProvider": {
          "Date": "0001-01-01T00:00:00Z",
          "Lastmod": "0001-01-01T00:00:00Z",
          "PublishDate": "0001-01-01T00:00:00Z",
          "ExpiryDate": "0001-01-01T00:00:00Z",
          "Aliases": [],
          "BundleType": "branch",
          "Description": "Show content in a set of cards",
          "Draft": false,
          "IsHome": false,
          "Keywords": null,
          "Kind": "section",
          "Layout": "",
          "LinkTitle": "Cards",
          "IsNode": true,
          "IsPage": false,
          "Path": "/shortcodes/cards",
          "Slug": "",
          "Lang": "en",
          "IsSection": true,
          "Section": "shortcodes",
          "Sitemap": {
            "ChangeFreq": "",
            "Priority": -1,
            "Filename": "sitemap.xml",
            "Disable": false
          },
          "Type": "shortcodes",
          "Weight": 0
        },
        "MarkupProvider": 0,
        "ContentProvider": 0
      },
      "params": null,
      "style": "filled",
      "template": "debug",
      "title": "Python"
    }
      </div>
    </div>
    
  • Terminal
    For guys who like to tinker around.
  • C

    All Parameter

    {
      "color": "",
      "content": "For the connoisseur of programming.",
      "href": "",
      "hrefattributes": {},
      "icon": "",
      "image": null,
      "imageattributes": {},
      "page": {
        "PageWithoutContent": {
          "Date": "0001-01-01T00:00:00Z",
          "Lastmod": "0001-01-01T00:00:00Z",
          "PublishDate": "0001-01-01T00:00:00Z",
          "ExpiryDate": "0001-01-01T00:00:00Z",
          "Aliases": [],
          "BundleType": "branch",
          "Description": "Show content in a set of cards",
          "Draft": false,
          "IsHome": false,
          "Keywords": null,
          "Kind": "section",
          "Layout": "",
          "LinkTitle": "Cards",
          "IsNode": true,
          "IsPage": false,
          "Path": "/shortcodes/cards",
          "Slug": "",
          "Lang": "en",
          "IsSection": true,
          "Section": "shortcodes",
          "Sitemap": {
            "ChangeFreq": "",
            "Priority": -1,
            "Filename": "sitemap.xml",
            "Disable": false
          },
          "Type": "shortcodes",
          "Weight": 0
        },
        "TableOfContentsProvider": {
          "Date": "0001-01-01T00:00:00Z",
          "Lastmod": "0001-01-01T00:00:00Z",
          "PublishDate": "0001-01-01T00:00:00Z",
          "ExpiryDate": "0001-01-01T00:00:00Z",
          "Aliases": [],
          "BundleType": "branch",
          "Description": "Show content in a set of cards",
          "Draft": false,
          "IsHome": false,
          "Keywords": null,
          "Kind": "section",
          "Layout": "",
          "LinkTitle": "Cards",
          "IsNode": true,
          "IsPage": false,
          "Path": "/shortcodes/cards",
          "Slug": "",
          "Lang": "en",
          "IsSection": true,
          "Section": "shortcodes",
          "Sitemap": {
            "ChangeFreq": "",
            "Priority": -1,
            "Filename": "sitemap.xml",
            "Disable": false
          },
          "Type": "shortcodes",
          "Weight": 0
        },
        "MarkupProvider": 0,
        "ContentProvider": 0
      },
      "params": null,
      "style": "filled",
      "template": "debug",
      "title": "C"
    }
      </div>
    </div>
    
  • C++

    All Parameter

    {
      "color": "",
      "content": "For the guys that can cope with syntax.",
      "href": "",
      "hrefattributes": {},
      "icon": "",
      "image": null,
      "imageattributes": {},
      "page": {
        "PageWithoutContent": {
          "Date": "0001-01-01T00:00:00Z",
          "Lastmod": "0001-01-01T00:00:00Z",
          "PublishDate": "0001-01-01T00:00:00Z",
          "ExpiryDate": "0001-01-01T00:00:00Z",
          "Aliases": [],
          "BundleType": "branch",
          "Description": "Show content in a set of cards",
          "Draft": false,
          "IsHome": false,
          "Keywords": null,
          "Kind": "section",
          "Layout": "",
          "LinkTitle": "Cards",
          "IsNode": true,
          "IsPage": false,
          "Path": "/shortcodes/cards",
          "Slug": "",
          "Lang": "en",
          "IsSection": true,
          "Section": "shortcodes",
          "Sitemap": {
            "ChangeFreq": "",
            "Priority": -1,
            "Filename": "sitemap.xml",
            "Disable": false
          },
          "Type": "shortcodes",
          "Weight": 0
        },
        "TableOfContentsProvider": {
          "Date": "0001-01-01T00:00:00Z",
          "Lastmod": "0001-01-01T00:00:00Z",
          "PublishDate": "0001-01-01T00:00:00Z",
          "ExpiryDate": "0001-01-01T00:00:00Z",
          "Aliases": [],
          "BundleType": "branch",
          "Description": "Show content in a set of cards",
          "Draft": false,
          "IsHome": false,
          "Keywords": null,
          "Kind": "section",
          "Layout": "",
          "LinkTitle": "Cards",
          "IsNode": true,
          "IsPage": false,
          "Path": "/shortcodes/cards",
          "Slug": "",
          "Lang": "en",
          "IsSection": true,
          "Section": "shortcodes",
          "Sitemap": {
            "ChangeFreq": "",
            "Priority": -1,
            "Filename": "sitemap.xml",
            "Disable": false
          },
          "Type": "shortcodes",
          "Weight": 0
        },
        "MarkupProvider": 0,
        "ContentProvider": 0
      },
      "params": null,
      "style": "filled",
      "template": "debug",
      "title": "C++"
    }
      </div>
    </div>
    
  • C#

    All Parameter

    {
      "color": "",
      "content": "For guys that need two destructors.",
      "href": "",
      "hrefattributes": {},
      "icon": "",
      "image": null,
      "imageattributes": {},
      "page": {
        "PageWithoutContent": {
          "Date": "0001-01-01T00:00:00Z",
          "Lastmod": "0001-01-01T00:00:00Z",
          "PublishDate": "0001-01-01T00:00:00Z",
          "ExpiryDate": "0001-01-01T00:00:00Z",
          "Aliases": [],
          "BundleType": "branch",
          "Description": "Show content in a set of cards",
          "Draft": false,
          "IsHome": false,
          "Keywords": null,
          "Kind": "section",
          "Layout": "",
          "LinkTitle": "Cards",
          "IsNode": true,
          "IsPage": false,
          "Path": "/shortcodes/cards",
          "Slug": "",
          "Lang": "en",
          "IsSection": true,
          "Section": "shortcodes",
          "Sitemap": {
            "ChangeFreq": "",
            "Priority": -1,
            "Filename": "sitemap.xml",
            "Disable": false
          },
          "Type": "shortcodes",
          "Weight": 0
        },
        "TableOfContentsProvider": {
          "Date": "0001-01-01T00:00:00Z",
          "Lastmod": "0001-01-01T00:00:00Z",
          "PublishDate": "0001-01-01T00:00:00Z",
          "ExpiryDate": "0001-01-01T00:00:00Z",
          "Aliases": [],
          "BundleType": "branch",
          "Description": "Show content in a set of cards",
          "Draft": false,
          "IsHome": false,
          "Keywords": null,
          "Kind": "section",
          "Layout": "",
          "LinkTitle": "Cards",
          "IsNode": true,
          "IsPage": false,
          "Path": "/shortcodes/cards",
          "Slug": "",
          "Lang": "en",
          "IsSection": true,
          "Section": "shortcodes",
          "Sitemap": {
            "ChangeFreq": "",
            "Priority": -1,
            "Filename": "sitemap.xml",
            "Disable": false
          },
          "Type": "shortcodes",
          "Weight": 0
        },
        "MarkupProvider": 0,
        "ContentProvider": 0
      },
      "params": null,
      "style": "filled",
      "template": "debug",
      "title": "C#"
    }
      </div>
    </div>