Coder Social home page Coder Social logo

inspirationlabs / il-site-loader Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 124 KB

Site loader for web projects based on Stencil. Renders dynamic content based on the URL.

Home Page: https://github.com/INSPIRATIONlabs/stencil-seo-starter

License: MIT License

CSS 0.82% TypeScript 99.18%
static-site-generator stencil-seo-starter stencil webcomponents

il-site-loader's Introduction

Stencil site loader

The stencil site loader component is able to dynamically load JSON based contents and render pages with webcomponents based on the JSON structure.

il-site-loader's People

Contributors

dominicboettger avatar

Stargazers

Andrea S avatar Mr. Potato Wizard avatar

Watchers

 avatar James Cloos avatar alexanderknapstein avatar

il-site-loader's Issues

feat: Add option to inject dynamic template component

It should be possible to add a page template or to fall back to a default one.

Currently there is only some default set which renders the header informations and a default set of components into the html body.

The template should itself be webcomponent.

The current render function in the site loader:

render() {
    // should stay here to remove old headers
    this.renderHeader();
    this.renderHtmlLangTag();
    if (this.data && this.data.data) {
      const output = [];
      if (this.data.menu && this.data.menu.main) {
        output.push(<il-menu-main data={this.data.menu.main}></il-menu-main>);
      }
      this.data.data.map(item => {
        output.push(this.renderItems(item));
      });
      if (this.data.menu && this.data.menu.footer) {
        output.push(<il-menu-footer data={this.data.menu.footer}></il-menu-footer>);
      }
      return (
        <Host>
          {output.map(out => {
            return out;
          })}
        </Host>
      );
    }
  }

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.