GithubHelp home page GithubHelp logo

ebiwd / bioimaging-banner-demonstration Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 7.97 MB

Home Page: https://ebiwd.github.io/bioimaging-banner-demonstration/

JavaScript 65.36% SCSS 14.75% Nunjucks 19.89%

bioimaging-banner-demonstration's Introduction

BioImaging banner demonstration

This is built with the VF 2.0 architecture for a high level of compatibility with other site CSS and JS

View a demo

Adding the banner to your site

Option 1. Manually

<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.

Option 2. As a VF 2.0 component

⚠️ 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.

  1. Install this component
    yarn add @visual-framework/vf-bioimaging-banner`
    
  2. Import the JS:
    import { vfBioimagingBanner } from 'vf-bioimaging-banner/vf-bioimaging-banner';
    vfBioimagingBanner();
    
  3. Import the CSS:
    /* Euro-BioImaging banner */
    @import 'vf-bioimaging-banner/vf-bioimaging-banner.scss';
    
  4. Insert the HTML template:
    {% render "@vf-bioimaging-banner" %}
    
    or with optional theming:
    {% render "@vf-bioimaging-banner", {color_background: "blue", color_foreground: "orange"} %}
    

Local development

You'll need to install npm and then:

  1. If you don't have yarn, install it
  2. Install all the things
    • yarn install
  3. Generate the site in /build
    • gulp dev renders and serves
    • gulp build build static assets

bioimaging-banner-demonstration's People

Contributors

khawkins98 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.