-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from probabl-ai/more-templates
More templates
- Loading branch information
Showing
4 changed files
with
85 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title> | ||
Template Sketchpad | ||
</title> | ||
<script src="https://cdn.tailwindcss.com?plugins=forms,typography"></script> | ||
<script src="//unpkg.com/alpinejs" defer></script> | ||
<script src="https://cdn.jsdelivr.net/npm/vega@5"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/vega-lite@5"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/vega-embed@6"></script> | ||
<script src="https://cdn.jsdelivr.net/gh/koaning/justcharts/justcharts.js"></script> | ||
<script src="https://unpkg.com/[email protected]" integrity="sha384-ujb1lZYygJmzgSwoxRggbCHcjc0rB2XoQrxeTUQyRjrOnlCoYta87iKBWq3EsdM2" crossorigin="anonymous"></script> | ||
</head> | ||
<body> | ||
<main> | ||
<div class="m-4"> | ||
<h1 class="text-4xl font-bold">Template Sketchpad</h1> | ||
<small class="text-gray-400">The template can be edited on the right and will be live updated.</small> | ||
<div class="flex pt-4"> | ||
<div class="w-1/2 m-2"> | ||
<form name="main" id="template-form"> | ||
{% for child in children %}<br/> | ||
<a href="/sketchpad/{{child}}" class='text-sm text-gray-400'>{{child}}</a> | ||
{% endfor %} | ||
<p class="text-md font-bold">Template</p> | ||
<textarea name='template' class="w-full h-64 p-2 bg-gray-100 rounded-md font-mono" placeholder="Enter ManderMarkdown text here"></textarea> | ||
</form> | ||
<button class="btn primary rounded-md bg-gray-100" hx-trigger='click' hx-post='/render/{{mander_path}}' hx-include="#template-form" hx-target="#template-out" >Submit</button> | ||
</div> | ||
<div class="w-1/2 m-2"> | ||
<p class="text-md font-bold">Rendered output</p> | ||
<div class="w-full border-dotted border-2 rounded-md"> | ||
<article class="prose p-2"> | ||
<div id="template-out"></div> | ||
</article> | ||
<br/><br/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</main> | ||
</body> | ||
</html> |