This repository has been archived by the owner on Apr 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
50 lines (49 loc) · 2 KB
/
index.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
<!doctype html>
<html data-ng-app="c2capp">
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width" />
<meta charset="utf-8" />
<title>Camptocamp.org application</title>
<link rel="stylesheet" type="text/css" media="all" href="css/main.css" />
</head>
<body>
<nav data-ng-cloak data-ng-controller="NavCtrl">
<ul id="navigation" data-ng-class="$location.path()|substr:1">
<li data-ng-repeat="i in pages" class="nav-item {{i|lowercase}} gps_{{gps()}}"><a data-ng-href="#/{{i|lowercase}}">{{i|i18n}}</a></li>
</ul>
</nav>
<div data-ng-view></div>
<script src="phonegap.js"></script>
<!--<script src="lib/zepto-1.0rc1.js"></script>-->
<script src="lib/angular-1.0.2.js"></script>
<script src="js/app.js"></script>
<script>
(function () {
// load localization files
// Note that we cannot rely on navigator.language of the webview,
// which is always 'en', at least with Android/PhoneGap
// We thus default to 'fr', and use localStorage to store the prefered value
// localStorage should be supported by our target platforms (Android, iOS, BlackBerry)
var lang = window.localStorage && window.localStorage.getItem('c2capp_lang') || 'fr';
// TODO maybe rather use script.js and bootstrap when all js files are loaded? (see angular seed async) (might be anyway needed with phonegap start)
switch (lang) {
case 'fr':
case 'it':
case 'de':
case 'es':
case 'ca':
case 'eu':
document.write('<script src="lib/angular-locale_'+lang+'.js"><\/script>');
document.write('<script src="js/i18n_'+lang+'.js"><\/script>');
break;
default:
document.write('<script src="js/i18n_en.js"><\/script>');
break;
}
})();
</script>
<script src="js/controllers.js"></script>
<script src="js/filters.js"></script>
<script src="js/services.js"></script>
</body>
</html>