Summary
Summaries in the form of text, headlines and often imagery for a range of types of content, including: articles, jobs, news and people profiles.
The vf-summary--profile
component has been deprecated. Please use the vf-profile
component.
Cancer is a group of diseases involving abnormal cell growth with the potential to invade or spread to other parts of the body.
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 (exampe), 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": "block",
"summary__title": "What is Cancer?",
"summary__text": "Cancer is a group of diseases involving abnormal cell growth with the potential to invade or spread to other parts of the body.",
"image": "/assets/vf-summary/assets/vf-icon--avatar.svg",
"name": "FirstName Surname",
"summary__href": "JavaScript:Void(0);"
}
%}
{% include "../path_to/vf-summary/vf-summary.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 '@vf-summary', {
"component-type": "block",
"summary__title": "What is Cancer?",
"summary__text": "Cancer is a group of diseases involving abnormal cell growth with the potential to invade or spread to other parts of the body.",
"image": "/assets/vf-summary/assets/vf-icon--avatar.svg",
"name": "FirstName Surname",
"summary__href": "JavaScript:Void(0);"
} %}
HTML
<article class="vf-summary">
<h3 class="vf-summary__title">
<a href="JavaScript:Void(0);" class="vf-summary__link">What is Cancer?</a>
</h3>
<p class="vf-summary__text">Cancer is a group of diseases involving abnormal cell growth with the potential to invade or spread to other parts of the body.</p>
</article>
I want to take a look back at my first full year as EMBL's social media manager. So what worked best over 2017 and what can I learn from this? My basic goals for VF’s social media are to build community and develop a shared understanding of who we as an organisation are. Consequently, I care about what resonates on the different social sites much more than driving traffic back to Visual Framework websites, although traffic is obviously a by-product.
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 (exampe), 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": "block",
"summary__title": "What is Cancer?",
"summary__text": "Cancer is a group of diseases involving abnormal cell growth with the potential to invade or spread to other parts of the body.",
"image": "/assets/vf-summary/assets/vf-icon--avatar.svg",
"name": "FirstName Surname",
"summary__href": "JavaScript:Void(0);"
}
%}
{% include "../path_to/vf-summary/vf-summary.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 '@vf-summary', {
"component-type": "block",
"summary__title": "What is Cancer?",
"summary__text": "Cancer is a group of diseases involving abnormal cell growth with the potential to invade or spread to other parts of the body.",
"image": "/assets/vf-summary/assets/vf-icon--avatar.svg",
"name": "FirstName Surname",
"summary__href": "JavaScript:Void(0);"
} %}
HTML
<article class="vf-summary vf-summary--article">
<h3 class="vf-summary__title">
<a href="JavaScript:Void(0);" class="vf-summary__link">EMBL's top social media posts of 2017 and what we learned from them</a>
</h3>
<div class="vf-summary__meta">
<a href="JavaScript:Void(0);" class="vf-summary__author vf-summary__link">Laura Howes</a>
<p class="vf-summary__date">06 February 2018</p>
<a href="JavaScript:Void(0);" class="vf-summary__link">Leave Comment</a>
</div>
<p class="vf-summary__text">I want to take a look back at my first full year as EMBL's social media manager. So what worked best over 2017 and what can I learn from this? My basic goals for VF’s social media are to build community and develop a shared understanding of who we as an organisation are. Consequently, I care about what resonates on the different social sites much more than driving traffic back to Visual Framework websites, although traffic is obviously a by-product.</p>
</article>
04 September
This Masters development programme is aimed at current Research Infrastructures managers and leaders who wish to develop the competencies required to meet the needs of Research Infrastructures in the planning, construction and operation phases.
EMBO Workshop
Heidelberg
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 (exampe), 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": "block",
"summary__title": "What is Cancer?",
"summary__text": "Cancer is a group of diseases involving abnormal cell growth with the potential to invade or spread to other parts of the body.",
"image": "/assets/vf-summary/assets/vf-icon--avatar.svg",
"name": "FirstName Surname",
"summary__href": "JavaScript:Void(0);"
}
%}
{% include "../path_to/vf-summary/vf-summary.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 '@vf-summary', {
"component-type": "block",
"summary__title": "What is Cancer?",
"summary__text": "Cancer is a group of diseases involving abnormal cell growth with the potential to invade or spread to other parts of the body.",
"image": "/assets/vf-summary/assets/vf-icon--avatar.svg",
"name": "FirstName Surname",
"summary__href": "JavaScript:Void(0);"
} %}
HTML
<article class="vf-summary vf-summary--event">
<p class="vf-summary__date">04 September</p>
<h3 class="vf-summary__title">
<a href="###" class="vf-summary__link">Executive Masters in Management of Research Infrastructures</a>
</h3>
<p class="vf-summary__text">This Masters development programme is aimed at current Research Infrastructures managers and leaders who wish to develop the competencies required to meet the needs of Research Infrastructures in the planning, construction and operation phases.</p>
<p class="vf-summary__text">EMBO Workshop</p>
<p class="vf-summary__location">Heidelberg</p>
</article>
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 (exampe), 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": "block",
"summary__title": "What is Cancer?",
"summary__text": "Cancer is a group of diseases involving abnormal cell growth with the potential to invade or spread to other parts of the body.",
"image": "/assets/vf-summary/assets/vf-icon--avatar.svg",
"name": "FirstName Surname",
"summary__href": "JavaScript:Void(0);"
}
%}
{% include "../path_to/vf-summary/vf-summary.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 '@vf-summary', {
"component-type": "block",
"summary__title": "What is Cancer?",
"summary__text": "Cancer is a group of diseases involving abnormal cell growth with the potential to invade or spread to other parts of the body.",
"image": "/assets/vf-summary/assets/vf-icon--avatar.svg",
"name": "FirstName Surname",
"summary__href": "JavaScript:Void(0);"
} %}
HTML
<a href="JavaScript:Void(0);" class="vf-summary vf-summary--event | vf-summary--is-link vf-summary--easy vf-summary-theme--primary">
<p class="vf-summary__date">04 September</p>
<h3 class="vf-summary__title">EMBL Course: Data Visualisation for Biology: A Practical Workshop on Design, Techniques and Tools</h3>
<p class="vf-summary__text">EMBO Workshop</p>
<p class="vf-summary__location">Heidelberg</p>
<svg class="vf-summary__icon | vf-icon vf-icon-arrow--right" width="24" height="24" xmlns="http://www.w3.org/2000/svg">
<path d="M23.6 11.289l-9.793-9.7a2.607 2.607 0 00-3.679.075 2.638 2.638 0 00-.068 3.689l3.871 3.714a.25.25 0 01-.173.43H2.135A2.28 2.28 0 00.1 12c0 .815.448 2.51 2 2.51h11.679a.25.25 0 01.177.427l-3.731 3.733a2.66 2.66 0 003.758 3.754l9.625-9.72a1 1 0 00-.008-1.415z" fill="" fill-rule="nonzero" />
</svg>
</a>
A database describing biological samples and providing links to associated experimental data.
Not all lists with images have an image for every item.
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 (exampe), 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": "block",
"summary__title": "What is Cancer?",
"summary__text": "Cancer is a group of diseases involving abnormal cell growth with the potential to invade or spread to other parts of the body.",
"image": "/assets/vf-summary/assets/vf-icon--avatar.svg",
"name": "FirstName Surname",
"summary__href": "JavaScript:Void(0);"
}
%}
{% include "../path_to/vf-summary/vf-summary.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 '@vf-summary', {
"component-type": "block",
"summary__title": "What is Cancer?",
"summary__text": "Cancer is a group of diseases involving abnormal cell growth with the potential to invade or spread to other parts of the body.",
"image": "/assets/vf-summary/assets/vf-icon--avatar.svg",
"name": "FirstName Surname",
"summary__href": "JavaScript:Void(0);"
} %}
HTML
<article class="vf-summary vf-summary--has-image">
<a href="JavaScript:Void(0);" class="vf-summary__link">
<img class="vf-summary__image vf-summary__image--thumbnail" src="https://www.ebi.ac.uk/biosamples/images/logo_biosamples.png" alt="BioSamples" loading="lazy">
</a>
<h3 class="vf-summary__title">
<a href="JavaScript:Void(0);" class="vf-summary__link">
BioSamples
</a>
</h3>
<p class="vf-summary__text">
A database describing biological samples and providing links to associated experimental data.
</p>
</article>
<article class="vf-summary vf-summary--has-image">
<h3 class="vf-summary__title">
<a href="JavaScript:Void(0);" class="vf-summary__link">
Imageless sample
</a>
</h3>
<p class="vf-summary__text">
Not all lists with images have an image for every item.
</p>
</article>
Science Faculty
in
Heidelberg
We are seeking to recruit outstanding group leaders who wish to carry out cutting-edge molecular cell biology research and/or technology development.
Apply Now
Closes in 8 days. Posted 11th August 2018
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 (exampe), 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": "block",
"summary__title": "What is Cancer?",
"summary__text": "Cancer is a group of diseases involving abnormal cell growth with the potential to invade or spread to other parts of the body.",
"image": "/assets/vf-summary/assets/vf-icon--avatar.svg",
"name": "FirstName Surname",
"summary__href": "JavaScript:Void(0);"
}
%}
{% include "../path_to/vf-summary/vf-summary.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 '@vf-summary', {
"component-type": "block",
"summary__title": "What is Cancer?",
"summary__text": "Cancer is a group of diseases involving abnormal cell growth with the potential to invade or spread to other parts of the body.",
"image": "/assets/vf-summary/assets/vf-icon--avatar.svg",
"name": "FirstName Surname",
"summary__href": "JavaScript:Void(0);"
} %}
HTML
<article class="vf-summary vf-summary--job">
<p class="vf-summary__meta">
<a href="JavaScript:Void(0);" class="vf-summary__link">Science Faculty</a>
in
<a href="JavaScript:Void(0);" class="vf-summary__link">Heidelberg</a>
</p>
<h3 class="vf-summary__title">
<a href="JavaScript:Void(0);" class="vf-summary__link">
Group Leader - Cell and Biophysics
</a>
</h3>
<p class="vf-summary__text">
We are seeking to recruit outstanding group leaders who wish to carry out cutting-edge molecular cell biology research and/or technology development.
</p>
<a href="JavaScript:Void(0);" class="vf-summary__button | vf-button vf-button--primary vf-button--outline">Apply Now</a>
<p class="vf-summary__date"><span>Closes in 8 days.</span> Posted 11th August 2018</p>
</article>
22 June 2018
General
Combinations of cancer drugs can be quickly and cheaply tested using a novel microfluidic device.
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 (exampe), 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": "block",
"summary__title": "What is Cancer?",
"summary__text": "Cancer is a group of diseases involving abnormal cell growth with the potential to invade or spread to other parts of the body.",
"image": "/assets/vf-summary/assets/vf-icon--avatar.svg",
"name": "FirstName Surname",
"summary__href": "JavaScript:Void(0);"
}
%}
{% include "../path_to/vf-summary/vf-summary.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 '@vf-summary', {
"component-type": "block",
"summary__title": "What is Cancer?",
"summary__text": "Cancer is a group of diseases involving abnormal cell growth with the potential to invade or spread to other parts of the body.",
"image": "/assets/vf-summary/assets/vf-icon--avatar.svg",
"name": "FirstName Surname",
"summary__href": "JavaScript:Void(0);"
} %}
HTML
<article class="vf-summary vf-summary--news">
<span class="vf-summary__date">22 June 2018</span>
<h3 class="vf-summary__title">
<a href="JavaScript:Void(0);" class="vf-summary__link">
What is Cancer?
</a>
</h3>
<p class="vf-summary__text">
<span class="vf-summary__category">
General
</span>
Combinations of cancer drugs can be quickly and cheaply tested using a novel microfluidic device.
</p>
</article>
22 June 2018
Combinations of cancer drugs can be quickly and cheaply tested using a novel microfluidic device.
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 (exampe), 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": "block",
"summary__title": "What is Cancer?",
"summary__text": "Cancer is a group of diseases involving abnormal cell growth with the potential to invade or spread to other parts of the body.",
"image": "/assets/vf-summary/assets/vf-icon--avatar.svg",
"name": "FirstName Surname",
"summary__href": "JavaScript:Void(0);"
}
%}
{% include "../path_to/vf-summary/vf-summary.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 '@vf-summary', {
"component-type": "block",
"summary__title": "What is Cancer?",
"summary__text": "Cancer is a group of diseases involving abnormal cell growth with the potential to invade or spread to other parts of the body.",
"image": "/assets/vf-summary/assets/vf-icon--avatar.svg",
"name": "FirstName Surname",
"summary__href": "JavaScript:Void(0);"
} %}
HTML
<article class="vf-summary vf-summary--news">
<span class="vf-summary__date">22 June 2018</span>
<img class="vf-summary__image" src="../../assets/vf-summary/assets/vf-summary--news-has-image.jpg" alt="News image alt" loading="lazy">
<h3 class="vf-summary__title">
<a href="JavaScript:Void(0);" class="vf-summary__link">
What is Cancer?
</a>
</h3>
<p class="vf-summary__text">
Combinations of cancer drugs can be quickly and cheaply tested using a novel microfluidic device.
</p>
</article>
Jimenez RC, Albar JP, Bhak J, Blatter MC, Blicher T, Brazas MD, Brooksbank C, Budd A, De Las Rivas J, Dreyer J, van Driel MA, Dunn MJ, Fernandes PL, van Gelder CW, Hermjakob H, Ioannidis V, Judge DP, Kahlem P, Korpelainen E, Kraus HJ, Loveland J, Mayer C, McDowall J, Moran F, Mulder N, Nyronen T, Rother K, Salazar GA, Schneider R, Via A, Villaveces JM, Yu P, Schneider MV, Attwood TK, Corpas M.
The Journal of cell biology
2019
144(23):4214-4225. doi: 10.1242/dev.151274.
Europe
PMC
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 (exampe), 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": "block",
"summary__title": "What is Cancer?",
"summary__text": "Cancer is a group of diseases involving abnormal cell growth with the potential to invade or spread to other parts of the body.",
"image": "/assets/vf-summary/assets/vf-icon--avatar.svg",
"name": "FirstName Surname",
"summary__href": "JavaScript:Void(0);"
}
%}
{% include "../path_to/vf-summary/vf-summary.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 '@vf-summary', {
"component-type": "block",
"summary__title": "What is Cancer?",
"summary__text": "Cancer is a group of diseases involving abnormal cell growth with the potential to invade or spread to other parts of the body.",
"image": "/assets/vf-summary/assets/vf-icon--avatar.svg",
"name": "FirstName Surname",
"summary__href": "JavaScript:Void(0);"
} %}
HTML
<article class="vf-summary vf-summary--publication">
<h3 class="vf-summary__title">
<a href="JavaScript:Void(0);" class="vf-summary__link">
Computer modeling in developmental biology: growing today, essential tomorrow.
</a>
</h3>
<p class="vf-summary__author">
Jimenez RC, Albar JP, Bhak J, Blatter MC, Blicher T, Brazas MD, Brooksbank C, Budd A, De Las Rivas J, Dreyer J, van Driel MA, Dunn MJ, Fernandes PL, van Gelder CW, Hermjakob H, Ioannidis V, Judge DP, Kahlem P, Korpelainen E, Kraus HJ, Loveland J, Mayer C, McDowall J, Moran F, Mulder N, Nyronen T, Rother K, Salazar GA, Schneider R, Via A, Villaveces JM, Yu P, Schneider MV, Attwood TK, Corpas M.
</p>
<p class="vf-summary__source">
The Journal of cell biology
<span class="vf-summary__date">2019</span>
</p>
<p class="vf-summary__text">
144(23):4214-4225. doi: 10.1242/dev.151274.
<a class="vf-link" href="JavaScript:Void(0);">Europe</a>
<a class="vf-link" href="JavaScript:Void(0);">PMC</a>
</p>
</article>
Usage
Publications Summary
The vf-summary--publication
can be nested inside a vf-box where it takes the vf-box colours.
If the vf-summary__author
list is truncated to a certain number of authors you will need to add vf-u-text--et-al to the <p>
- <p class="vf-summary__author | vf-u-text--et-al">
- for it to add et al to the end of the list.
Installation info
This component is distributed with npm. After installing npm, you can install the vf-summary
with this command.
$ yarn add --dev @visual-framework/vf-summary
Sass/CSS
The source files included are written in Sass(scss
). You can point your Sass include-path
at your node_modules
directory and import it like this.
@import "@visual-framework/vf-summary/index.scss";
Make sure you import Sass requirements along with the modules. You can use a project boilerplate or the vf-sass-starter
Changelog
Changelog
1.0.23
- small change to cards on homepage
1.0.18
1.0.17
1.0.16
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
1.0.6
- begin to make more pattern/boilerplate guidance
- minor templating updates
1.0.5
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/vf-summary