Skip to content

Instantly share code, notes, and snippets.

@oncomouse
Last active January 17, 2021 17:42
Show Gist options
  • Save oncomouse/2d208726cf2d714eb502591ff8f821aa to your computer and use it in GitHub Desktop.
Save oncomouse/2d208726cf2d714eb502591ff8f821aa to your computer and use it in GitHub Desktop.
Simple Tracery Demo Template
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<title>
Page Title
</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/cutestrap/1.3.1/css/cutestrap.min.css" />
</head>
<body>
<div class="wrapper-small">
<h1 class="page-title">
Page Title
</h1>
<p>
Page Description
</p>
</div>
<div class="wrapper-small">
<div id="story" class="tracery fw-semibold fs-large"></div>
<form>
<label for="numberOfStories" class="textfield">
<input type="number" id="numberOfStories" value="1">
<span class="textfield__label">Number of Stories to Generate:</span>
</label>
<div class="ta-center">
<input type="button" value="Create a New Story" id="newStory" class="btn">
</div>
</form>
</div>
<!-- Your Grammar Goes in the <script> tag below: -->
<script id="grammar" type="application/json">
{
"origin": "Hello"
}
</script>
<script src="https://cdn.rawgit.com/oncomouse/oncomouse.github.io/9b1cb417/javascripts/tracery/tracery.min.js"></script>
<script src="https://cdn.rawgit.com/oncomouse/oncomouse.github.io/b719c6da/javascripts/tracery/controls.min.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment