This is built with the VF 2.0 architecture for a high level of compatibility with other site CSS and JS
<script src="https://ebiwd.github.io/bioimaging-banner-demonstration/scripts/scripts.js"></script>
<link rel="stylesheet" media="all" href="https://ebiwd.github.io/bioimaging-banner-demonstration/css/styles.css" />
<!-- You can set custom colours for BioImaging banner,
this must come before the html snippet -->
<style>
/*
:root {
--vf-bioimaging-banner__color--background: var(--vf-color-gray-dark);
--vf-bioimaging-banner__color--foreground: var(--vf-ui-color-white);
}
*/
</style>
<div data-vf-js-bioimaging-banner class="vf-banner vf-bioimaging-banner vf-banner--static vf-banner--notice">
<div class="vf-banner__content vf-bioimaging-banner__content" data-vf-js-bioimaging-banner-text>
</div>
</div>
The JS will then add the appropriate content.
⚠️ Coming soon: This pattern is ⚠️
⚠️ not yet available from `vf-core` ⚠️
⚠️ Use option 1 for now ⚠️
If you're using the full Visual Framework ecosystem.
- Install this component
yarn add @visual-framework/vf-bioimaging-banner`
- Import the JS:
import { vfBioimagingBanner } from 'vf-bioimaging-banner/vf-bioimaging-banner'; vfBioimagingBanner();
- Import the CSS:
/* Euro-BioImaging banner */ @import 'vf-bioimaging-banner/vf-bioimaging-banner.scss';
- Insert the HTML template:
or with optional theming:
{% render "@vf-bioimaging-banner" %}
{% render "@vf-bioimaging-banner", {color_background: "blue", color_foreground: "orange"} %}
You'll need to install npm and then:
- If you don't have
yarn
, install it - Install all the things
yarn install
- Generate the site in
/build
gulp dev
renders and servesgulp build
build static assets