Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
258 lines (198 sloc) 9.07 KB
<!doctype html>
<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7" lang="en" manifest="manifest.appcache"> <![endif]-->
<!--[if IE 7]> <html class="lt-ie9 lt-ie8" lang="en" manifest="manifest.appcache"> <![endif]-->
<!--[if IE 8]> <html class="lt-ie9" lang="en" manifest="manifest.appcache"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en" manifest="manifest.appcache"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Architect - Javascript Template Editor</title>
<meta name="description" content="Edit Javascript templates in various engines">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-responsive.min.css">
<link rel="stylesheet" href="css/style.css">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<link rel="apple-touch-icon-precomposed" href="apple-touch-icon-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="apple-touch-icon-72x72-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="apple-touch-icon-114x114-precomposed.png">
<script src="js/modernizr.min.js"></script>
</head>
<body class="container-fluid">
<header role="banner" class="page-header">
<h1>
Architect
<small>Edit Javascript templates in various engines</small>
</h1>
<span class="offline label label-success">offline enabled</span>
</header>
<div role="main">
<div id="unsupported" role="alert" aria-hidden="true"></div>
<div id="app" aria-hidden="true">
<div class="row-fluid">
<div class="span12">
<label>
Engine:
<select id="engine" aria-controls="template view engine-info"></select>
</label>
<button id="reset" class="btn btn-small" aria-controls="template view">
<i class="icon-repeat"></i>
Reset
</button>
<span id="engine-info"></span>
</div>
</div>
<div class="row-fluid">
<section class="span6">
<span id="template-error"
class="editor-error"
role="alert"
aria-hidden="true">
</span>
<h2>Template</h2>
<div id="template"
role="application"
aria-invalid="false"
aria-controls="result template-error">
</div>
</section>
<section class="span6">
<span id="view-error"
class="editor-error"
role="alert"
aria-hidden="true">
</span>
<h2>View</h2>
<div id="view"
role="application"
aria-invalid="false"
aria-controls="result view-error">
</div>
</section>
</div>
<div class="row-fluid">
<section class="span12">
<h2>Result</h2>
<div id="result" role="application"></div>
</section>
</div>
</div>
</div>
<footer role="contentinfo">
<a id="html5"
href="http://www.w3.org/html/logo/"
title="HTML5 Powered with CSS3 / Styling, Performance &amp; Integration, Semantics, and Offline &amp; Storage"></a>
By <address class="vcard">
<a class="url fn" href="http://rolandwarmerdam.co.nz/" rel="author">
Roland Warmerdam
</a>
</address>
<a rel="license"
id="license"
href="http://creativecommons.org/licenses/by-sa/3.0/"
title="Creative Commons Attribution-ShareAlike 3.0 Unported License"></a>
<a href="https://github.com/Rowno/architect" id="ribbon-link">
Fork me on GitHub
</a>
</footer>
<a id="ribbon" href="https://github.com/Rowno/architect" title="Fork me on GitHub"></a>
<script id="engine-template" type="text/x-mustache">
<option value="{{id}}" {{#selected}}selected{{/selected}}>{{name}}</option>
</script>
<script id="engine-info-template" type="text/x-mustache">
<span role="separator">&raquo;</span>
<span class="label">version</span> {{version}}
<span role="separator">&raquo;</span>
<span class="label">size</span> <span title="minified and gzipped">{{size}}KB</span>
<span role="separator">&raquo;</span>
<a href="{{source}}" target="_blank">github</a>
<span role="separator">&raquo;</span>
<a href="js/engines/{{id}}.min.js" download>download</a>
</script>
<script id="template-default-dot" type="text/x-dot"><h1>{{=it.header}}</h1>
<select>
{{ for (var i=0; i < it.items.length; i++) { }}
<option value="{{=it.items[i].id}}"{{ if (it.items[i].active) { }} selected{{ } }}>{{=it.items[i].name}}</option>
{{ } }}
</select></script>
<script id="template-default-ejs" type="text/x-ejs"><h1><%=header%></h1>
<select>
<% for (var i=0; i < items.length; i++) { %>
<option value="<%=items[i].id%>"<% if (items[i].active) { %> selected<% } %>><%=items[i].name%></option>
<% } %>
</select></script>
<script id="template-default-handlebars" type="text/x-mustache"><h1>{{header}}</h1>
<select>
{{#items}}
<option value="{{id}}"{{#active}} selected{{/active}}>{{name}}</option>
{{/items}}
</select></script>
<script id="template-default-hogan" type="text/x-mustache"><h1>{{header}}</h1>
<select>
{{#items}}
<option value="{{id}}"{{#active}} selected{{/active}}>{{name}}</option>
{{/items}}
</select></script>
<script id="template-default-jade" type="text/x-jade">h1 #{header}
select
each item in items
if item.active
option(value=item.id, selected) #{item.name}
else
option(value=item.id) #{item.name}</script>
<script id="template-default-mustache" type="text/x-mustache"><h1>{{header}}</h1>
<select>
{{#items}}
<option value="{{id}}"{{#active}} selected{{/active}}>{{name}}</option>
{{/items}}
</select></script>
<script id="template-default-underscore" type="text/x-underscore"><h1><%=header%></h1>
<select>
<% for (var i=0; i < items.length; i++) { %>
<option value="<%=items[i].id%>"<% if (items[i].active) { %> selected<% } %>><%=items[i].name%></option>
<% } %>
</select></script>
<script id="view-default" type="application/json">{
"header": "Colors",
"items": [
{"id": 1, "name": "Red", "active": true},
{"id": 2, "name": "Green"},
{"id": 3, "name": "Blue"}
]
}</script>
<script>
Modernizr.html5please = function(opts){ var passes = true; var features = opts.features.split('+'); var feat; for (var i = -1, len = features.length; ++i < len; ){ feat = features[i]; if (Modernizr[feat] === undefined) window.console && console.warn('Modernizr.' + feat + ' test not found'); if (Modernizr[feat] === false) passes = false; } if (passes){ opts.yep && opts.yep(); return passes; } Modernizr.html5please.cb = opts.nope; var script = document.createElement('script'); var ref = document.getElementsByTagName('script')[0]; var url = 'http://api.html5please.com/' + features.join('+') + '.json?callback=Modernizr.html5please.cb' + (opts.options ? ('&' + opts.options) : '') + '&html'; script.src = url; ref.parentNode.insertBefore(script, ref); return false; };
Modernizr.html5please({
features: 'webworkers+json',
options: 'texticon',
yep: function () {
Modernizr.load({
load: [
'js/ace/ace.js',
'js/ace/mode-json.js',
'js/ace/mode-html.js',
'js/engines/hogan.min.js',
'js/script.js'
],
complete: function () {
Architect.init();
}
});
},
nope: function (result) {
var unsupportedElement = document.getElementById('unsupported');
unsupportedElement.innerHTML=result.html;
unsupportedElement.setAttribute('aria-hidden', false);
}
});
</script>
<script>
var _gaq=[['_setAccount','UA-21361814-4'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=true;
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
</body>
</html>
Something went wrong with that request. Please try again.