Link list

Information

Folder
src/components/link-list

Files

Schema
// src/components/link-list/schema.json

{
  "$schema": "http://json-schema.org/draft-07/schema",
  "required": [
    "headlineType",
    "links",
    "title"
  ],
  "properties": {
    "headlineType": {
      "type": "string"
    },
    "links": {
      "type": "array"
    },
    "title": {
      "type": "string"
    }
  }
}
Mocks
// src/components/link-list/mocks.json

{
  "title": "Developed by…",
  "headlineType": "3",
  "links": [
    {
      "$tpl": "components/link",
      "label": "mgrossklaus.de",
      "url": "https://mgrossklaus.de"
    },
    {
      "$tpl": "components/link",
      "label": "twitter.com/mgrossklaus",
      "url": "https://twitter.com/mgrossklaus"
    },
    {
      "$tpl": "components/link",
      "label": "github.com/mgrsskls",
      "url": "https://github.com/mgrsskls"
    }
  ]
}
Template
// src/components/link-list/index.hbs

<div class="LinkList">
  <h{{headlineType}} class="LinkList-title">{{title}}</h{{headlineType}}>
  <ul class="LinkList-list">
    {{#each links}}
      <li class="LinkList-item">
        {{{this}}}
      </li>
    {{/each}}
  </ul>
</div>

Variants

default
Open