Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>{{title}}</title>
- <meta charset="utf-8">
- <meta http-equiv="Cache-control" content="public">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <script src="jquery.min.js.gz"></script>
- </head>
- <body class="body">
- <div id="content">
- </div>
- <script>
- var template;
- $(document)
- .ready(
- function () {
- loadCSS = function (href) {
- var cssLink = $("<link rel='stylesheet' type='text/css' href='" + href + "'>");
- $("head").append(cssLink);
- };
- loadJS = function (src) {
- var jsLink = $("<script type='text/javascript' src='" + src + "'>");
- $("head").append(jsLink);
- };
- loadCSS("bootstrap.min.css.gz");
- loadCSS("bootstrap-theme.min.css.gz");
- loadCSS("site.css");
- loadJS("bootstrap.min.js.gz");
- loadJS("handlebars.min.js.gz");
- var source = $("#template").html();
- $("#template").remove();
- template = Handlebars.compile(source);
- $.post($(location).attr("href"), function (data) {
- var output = template(data);
- $("#content").html(output);
- document.title = $("#title").html();
- });
- });
- </script>
- <template id="template" type="text/x-handlebars-template">
- Remote temp age: {{age1}}<br/>
- Remote temp: {{temp1}}C<br/>
- Temp: {{temp2}}C<br/>
- Humidity: {{humi2}}%<br/>
- Need temp: {{needTemp}}C<br/>
- Compared to temp: {{usedTemp}}C<br/>
- Program: {{program}}<br/>
- Program time remaining: {{programln}}<br/>
- State: {{state}}<br/>
- Uptime: {{uptime}}<br/>
- Time: {{time}}<br/>
- <title id="title">{{title}}</title>
- <input type="button" class="btn btn-primary" name="Reload"
- value="Reload" onclick="
- $.post($(location).attr('href'), function (data) {
- var output = template(data);
- $('#content').html(output);
- });
- "></input>
- <input type="button" class="btn btn-primary" name="Manage"
- value="Manage" onclick="window.location.href = '/login'"></input>
- </template>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment