Skip to content

Instantly share code, notes, and snippets.

@chrismatheson
Last active January 22, 2016 12:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrismatheson/0d008225890267cc64a6 to your computer and use it in GitHub Desktop.
Save chrismatheson/0d008225890267cc64a6 to your computer and use it in GitHub Desktop.
Dream code, that can be pre-processed by a static site get and produce the right stuff
<html>
<head>
<link rel="import" href="/path/to/imports/site-header.html">
<style type="test/less">
@base: #f938ab;
@import "theme.less";
form {
background-color: @base;
}
</style>
<script type="application/typescript" onload="render()">
import {form} from "sharedComponenets";
import {render} from "react-dom";
const signup = form('signup for stuff');
render(singup, document.querySelector('main'));
</script>
</head>
<body>
<site-header/>
<main></main>
</body>
</html>
<html>
<head>
<style type="test/css">
</style>
<script type="application/javascript"></script>
</head>
<body>
<header>this is my awesome site</header>
<div reat-id="fgdsh"
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment