This repository has been archived by the owner on Oct 1, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.tpl.html
107 lines (95 loc) · 4.28 KB
/
index.tpl.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html lang="en"<% if (env === 'PROD') {%> manifest="cache.manifest"<% } %>>
<head>
<title>TaskOnFly - Task manager</title>
<meta name="description" content="Simple, light and offline task manager. Manage your tasks and lists of tasks on the fly. You can work with TaskOnFly when you offline, all your tasks are stored locally in the browser">
<meta name="author" content="Valerii Zinchenko">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="shortcut icon" href="favicon.png" type="image/png">
<style><%= insertHTML('css/main.css') %></style>
</head>
<body>
<% var pages = ['home', 'editor', 'about']; %>
<% var progressSteps = pages.length + 1; // 1 for scripts %>
<div id="loading" class="container-fluid">
<div class="progress">
<div id="progressBar" class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
<script>
var progressBar = document.getElementById('progressBar');
var progress = 0;
var step = 0;
var total = <%= progressSteps %>;
function setProgress() {
step++;
progress = step/total * 100;
progressBar.style.width = progress + "%";
progressBar.setAttribute("aria-valuenow", progress);
}
</script>
<% pages.forEach(function(page, index) { %>
<div id="<%= page %>" class="page hidden">
<%= insertHTML('html/pages/' + page + '.html') %>
</div>
<script>
setProgress();
</script>
<% }, this); %>
<% if (env === 'PROD') { %>
<script src="js/all.js" type="text/javascript" charset="utf-8"></script>
<% } else { %>
<script src="http://localhost:8081/target/target-script-min.js"></script>
<script src="./build/3rd-party/jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="./build/3rd-party/lodash.js" type="text/javascript" charset="utf-8"></script>
<script src="./build/3rd-party/bootstrap.js" type="text/javascript" charset="utf-8"></script>
<script src="./build/3rd-party/require.js" type="text/javascript" charset="utf-8"></script>
<script src="./build/3rd-party/HashRouter.js" type="text/javascript" charset="utf-8"></script>
<script src="./node_modules/class-wrapper/lib/ClassBuilder.js" type="text/javascript" charset="utf-8"></script>
<script src="./node_modules/class-wrapper/lib/Class.js" type="text/javascript" charset="utf-8"></script>
<script src="./node_modules/class-wrapper/lib/SingletonClass.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/core/utils.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/core/AStateComponent.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/core/AControl.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/core/AView.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/core/StaticView.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/core/DynamicView.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/core/ADecorator.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/core/State.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/core/AFState.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/core/MVCModule.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/core/AFMVCModule.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/core/EventHandler.js" type="text/javascript" charset="utf-8"></script>
<script>
requirejs.config({
baseUrl: "js"
});
requirejs([
"boot"
], function(){
var $loading = $('#loading');
$loading.css('opacity', '0');
setTimeout(function(){
$loading.css('display', 'none');
}, 500);
});
</script>
<% } %>
<script>
setProgress();
<% if (env === 'PROD') { %>
var $loading = $('#loading');
$loading.css('opacity', '0');
setTimeout(function(){
$loading.css('display', 'none');
}, 500);
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-66399411-1', 'auto');
ga('send', 'pageview');
<% } %>
</script>
</body>
</html>