How to use the @lrnwebcomponents/haxcms-elements/lib/core/haxcms-site-store.js.store.siteTitle function in @lrnwebcomponents/haxcms-elements

To help you get started, we’ve selected a few @lrnwebcomponents/haxcms-elements examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github elmsln / lrnwebcomponents / elements / haxcms-elements / lib / ui-components / site / site-print-button.js View on Github external
currentdate.getMinutes() +
      ":" +
      currentdate.getSeconds();
    let element = document.createElement("div");
    element.innerHTML = `
<style>
  @media print {
    body {
      padding: 0 15px 5px;
      color: #000;
      background-color: #ffffff;
      border-top: 1px solid #aaa;
    }
  }
</style>
<h1>${store.siteTitle}</h1>

<p>${datetime}</p>
${content}`;
    // From https://stackoverflow.com/questions/1071962/how-do-i-print-part-of-a-rendered-html-page-in-javascript#answer-1072151
    let print = window.open(
      "",
      "",
      "left=0,top=0,width=800,height=800,toolbar=0,scrollbars=0,status =0"
    );
    // ensure base tag moves with it if set
    if (document.head.getElementsByTagName("base")) {
      let base = document.createElement("base");
      base.href = document.head
        .getElementsByTagName("base")[0]
        .getAttribute("href");
      print.document.head.appendChild(base);
github elmsln / lrnwebcomponents / elements / haxcms-elements / lib / ui-components / site / site-title.js View on Github external
autorun(reaction => {
      this.siteTitle = toJS(store.siteTitle);
      this.__disposer.push(reaction);
    });
    autorun(reaction => {
github elmsln / lrnwebcomponents / elements / haxcms-elements / lib / ui-components / layout / site-footer.js View on Github external
autorun(reaction => {
      this.siteTitle = toJS(store.siteTitle);
      this.__disposer.push(reaction);
    });
  }

@lrnwebcomponents/haxcms-elements

HAX CMS series of elements to provide a full on CMS

Apache-2.0
Latest version published 5 months ago

Package Health Score

69 / 100
Full package analysis

Popular @lrnwebcomponents/haxcms-elements functions