Giter Site home page Giter Site logo

nogalpaulina / myuw-badge Goto Github PK

View Code? Open in Web Editor NEW

This project forked from myuw-web-components/myuw-badge

0.0 1.0 0.0 315 KB

Web Component for stylized link to content in MyUW.

Home Page: https://myuw-web-components.github.io/pages/badge.html

License: Apache License 2.0

HTML 90.09% JavaScript 9.91%

myuw-badge's Introduction

myuw-badge

Screenshot showing 'Find it in MyUW' badge in each of the themes. A Madison-red theme including the Madison crest. A black theme with only the bare 'Find it in MyUW' text

A badge with two available themes to help users discover new widgets and content in MyUW.

Getting Started

Include the component in your page:

<!-- import the module -->
<script type="module" src="https://cdn.my.wisc.edu/@myuw-web-components/myuw-badge@latest/myuw-badge.min.mjs"></script>

<!-- fallback for browsers without ES2015 module support -->
<script nomodule scr="https://cdn.my.wisc.edu/@myuw-web-components/myuw-badge@latest/myuw-badge.min.js"></script>

<myuw-badge
  url=""
  dark-theme
  white-border
>
</myuw-badge>

Note: The evergreen "latest" version can be used for convenience, but in production settings it is recommended to use the latest release version specifically, and upgrade only after testing!

Configurable properties via attributes

  • url: (Required) Set the URL the badge should link to (e.g. The detail page for a MyUW widget)
  • dark-theme: If this attribute is present, the badge will use the black theme (red by default). The red theme is specific to UW-Madison; the black theme is appropriate for both UW-Madison and other MyUW contexts (e.g. my.wisconsin or my.uwrf)
  • white-border: If this attribute is present, the badge will have a white border (e.g. when using the badge on a dark background)

Development and contribution

To run the demo app locally and test the component, run the following commands:

$ npm install
$ npm start

myuw-badge's People

Contributors

thevoiceofzeke avatar apetro avatar paulerickson avatar

Watchers

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