0.0.1-beta3 • Published 19 days ago

@cagovweb/cal-ds-banner v0.0.1-beta3

Weekly downloads
-
License
ISC
Repository
github
Last release
19 days ago

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>`;