@cagovweb/cal-ds-banner

0.0.1-beta3 • Public • Published

cal-ds-banner

Banner for the top of any page

<html>
  ...
  <body>
    <cal-ds-banner>
      <template>
        <p>Banner on the top</p>
      </template>
    </cal-ds-banner>

    <cal-ds-banner data-target="header">
      <template>
        <p>Banner on the top of the HEADER</p>
      </template>
    </cal-ds-banner>

    <cal-ds-banner data-target="header > span">
      <template>
        <p>Banner on the top of the first direct SPAN in HEADER</p>
      </template>
    </cal-ds-banner>

Try this on any page on the web!

Place this in the web console

document.head.appendChild(Object.assign(document.createElement("script"), {src: "https://cdn.jsdelivr.net/npm/@cagovweb/cal-ds-banner",type:"module"}));document.body.innerHTML += `<cal-ds-banner><template><strong>Live now:</strong> Press conference | <a href="">Priorities</a></template></cal-ds-banner>`;

/@cagovweb/cal-ds-banner/

    Package Sidebar

    Install

    npm i @cagovweb/cal-ds-banner

    Weekly Downloads

    8

    Version

    0.0.1-beta3

    License

    ISC

    Unpacked Size

    18.3 kB

    Total Files

    9

    Last publish

    Collaborators

    • guzmanjd
    • kkoryaka
    • jon-grant
    • carter.medlin