EMBL Breadcrumbs lookup github location npm version

This requires and builds atop the vf-breadcrumbs and embl-content-meta-properties components for EMBL pages. This component reads meta properties and then performs a lookup to the EMBL contentHub. Returned are appropriate primary and secondary breadcrumbs. Notes: If a non-primairy breadcrumb value is "notSet", a value will be inferred from the primairy breadcrumb's respective who, what or where Matching is performed on internal names first, display names second. UUID matching is still to be implemented If no URL for a term is found a search link will be generated If no primairy facet is provided, no breadcrumbs will be generated


Variants


Nunjucks syntax

Depending on your environment you'll want to use render or include. As a rule of thumb: server-side use include, precompiled browser use render. If you're using vf-eleventy you should use include.

Using include

You'll need to pass a context object from your code or Yaml file (example), as well as the path to the Nunjucks template. Nunjucks' include is an abstraction of render and provides some additional portability.


{% set context fromYourYamlFile %}
- or -
{% set context = {
  "component-type": "embl-block",
  "meta-who": "Strategy and Communications",
  "meta-what": "Visual Framework",
  "meta-where": "EMBL",
  "meta-active": "what",
  "meta-utility": -8,
  "meta-reach": -5,
  "meta-maintainer": "Strategy and Communications",
  "meta-last-review": "2019-01-20",
  "meta-review-cycle": 180,
  "meta-expiry": "2019-06-20"
}
 %}
{% include "../path_to/embl-breadcrumbs-lookup/embl-breadcrumbs-lookup.njk" %}
                

Using render

This approach is best for bare-bones Nunjucks environments, such as precompiled templates with the Nunjucks slim runtime where include is not be available.

{% render '@embl-breadcrumbs-lookup', {
  "component-type": "embl-block",
  "meta-who": "Strategy and Communications",
  "meta-what": "Visual Framework",
  "meta-where": "EMBL",
  "meta-active": "what",
  "meta-utility": -8,
  "meta-reach": -5,
  "meta-maintainer": "Strategy and Communications",
  "meta-last-review": "2019-01-20",
  "meta-review-cycle": 180,
  "meta-expiry": "2019-06-20"
} %}
                
HTML
<nav class="vf-breadcrumbs embl-breadcrumbs-lookup" aria-label="Breadcrumb" data-embl-js-breadcrumbs-lookup>
  <div class="vf-list vf-list--inline | vf-breadcrumbs__list | embl-breadcrumbs-lookup--ghosting"></div>
</nav>
              
Nunjucks syntax

Depending on your environment you'll want to use render or include. As a rule of thumb: server-side use include, precompiled browser use render. If you're using vf-eleventy you should use include.

Using include

You'll need to pass a context object from your code or Yaml file (example), as well as the path to the Nunjucks template. Nunjucks' include is an abstraction of render and provides some additional portability.


{% set context fromYourYamlFile %}
- or -
{% set context = {
  "component-type": "embl-block",
  "meta-who": "Strategy and Communications",
  "meta-what": "Visual Framework",
  "meta-where": "EMBL",
  "meta-active": "what",
  "meta-utility": -8,
  "meta-reach": -5,
  "meta-maintainer": "Strategy and Communications",
  "meta-last-review": "2019-01-20",
  "meta-review-cycle": 180,
  "meta-expiry": "2019-06-20"
}
 %}
{% include "../path_to/embl-breadcrumbs-lookup/embl-breadcrumbs-lookup.njk" %}
                

Using render

This approach is best for bare-bones Nunjucks environments, such as precompiled templates with the Nunjucks slim runtime where include is not be available.

{% render '@embl-breadcrumbs-lookup', {
  "component-type": "embl-block",
  "meta-who": "Strategy and Communications",
  "meta-what": "Visual Framework",
  "meta-where": "EMBL",
  "meta-active": "what",
  "meta-utility": -8,
  "meta-reach": -5,
  "meta-maintainer": "Strategy and Communications",
  "meta-last-review": "2019-01-20",
  "meta-review-cycle": 180,
  "meta-expiry": "2019-06-20"
} %}
                
HTML
<!-- Content descriptors -->
<meta name="embl:who" content=""> <!-- the people, groups and teams involved -->
<meta name="embl:where" content="EMBL Heidelberg"> <!-- at which EMBL sites the content applies -->
<meta name="embl:what" content="Cuylen Group"> <!-- the activities covered -->
<meta name="embl:active" content="what"> <!-- which of the who/what/where is active -->

<!-- Content role -->
<meta name="embl:utility" content="-8"> <!-- if content is task and work based or if is meant to inspire -->
<meta name="embl:reach" content="-5"> <!-- if content is externally (public) or internally focused (those that work at EMBL) -->

<!-- Page infromation -->
<meta name="embl:maintainer" content=""> <!-- the contact person or group responsible for the page -->
<meta name="embl:last-review" content="NaN"> <!-- the last time the page was reviewed or updated -->
<meta name="embl:review-cycle" content=""> <!-- how long in days before the page should be checked -->
<meta name="embl:expiry" content=""> <!-- if there is a fixed point in time when the page is no longer relevant -->

<nav class="vf-breadcrumbs embl-breadcrumbs-lookup" aria-label="Breadcrumb" data-embl-js-breadcrumbs-lookup>
  <div class="vf-list vf-list--inline | vf-breadcrumbs__list | embl-breadcrumbs-lookup--ghosting"></div>
</nav>
              

Changelog

Changelog

1.1.2

  • Implements updated vf-search markup.
  • Changes a few pages on how it works with nunjucks and markdown.

1.1.0

  • updates Design Tokens homepage.
  • adds neutral colour tokens
  • adds 'status banners' for components in the documentation page.
  • Adds the form options as their own set of components in the list.
  • https://github.com/visual-framework/vf-core/pull/1390/files
  • Updates to use 11ty 0.12.1
  • https://github.com/visual-framework/vf-core/pull/1435

1.0.24

  • changes the vf-intro so it's a white background, removes the padding.
  • changes the links in vf-intro to be the 'correct' buttons.

1.0.23

  • small change to cards on homepage

1.0.18

  • dependency bump

1.0.17

  • dependency bump

1.0.16

  • dependency bump

1.0.13

  • dependency bump
  • adds roamap and consultation docs

1.0.12

  • design token documenation now lives in the component libary

1.0.7

  • adds updates blog

1.0.6

  • begin to make more pattern/boilerplate guidance
  • minor templating updates

1.0.5

  • dependency bump

1.0.4

  • uses vf-favicon
  • adds meta attributes

1.0.3

  • run vf-component-assets:everything on local dev
  • remove reference to removed /css/app.css

1.0.2

  • Add 404
  • Fix component CSS generation

1.0.1

  • Also generate per-component CSS with vf-css:generate-component-css

1.0.0

  • Initial release to be used with vf-core 2.2.0

Assets



File system location: components/embl-breadcrumbs-lookup

Find an issue on this page? Propose a change or discuss it.