Skip to content

Instantly share code, notes, and snippets.

@rarous
Last active December 6, 2019 12:38
Show Gist options
  • Save rarous/ac3aa106ff26bc952089bbbb64ff4e4c to your computer and use it in GitHub Desktop.
Save rarous/ac3aa106ff26bc952089bbbb64ff4e4c to your computer and use it in GitHub Desktop.
lit-html workshop

https://www.hlidacshopu.cz/app/

https://github.com/topmonks/topmonks-webs/blob/master/www.hlidacshopu.cz/src/html/app/index.html

Actually, we will use one handy tool ;)

npm i -D browsersync

Bootstrap your code

<!-- Required styles for MDC Web -->
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.css">

<!-- Required MDC Web JavaScript library -->
<script src="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.js"></script>

<div id="app"></div>

<script type="module">
  import { html, svg, render } from "https://unpkg.com/lit-html@1.1.1/lit-html.js?module";
  const root = document.getElemntByID("app");
  const apiUrl = detailUri => `https://api.hlidacshopu.cz/shop?url=${encodeURIComponent(detailUri)}&metadata=1`;
  
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment