-
Notifications
You must be signed in to change notification settings - Fork 13
/
index.html
142 lines (114 loc) · 4.67 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
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!doctype html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<link href='src/css/style.css' rel='stylesheet' type='text/css'>
<script src="settings.js"></script>
</head>
<body ng-app="drivein">
<style>
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
display: none !important;
}
body{
height: 100%;
margin: 0;
padding:0;
}
</style>
<!-- layout ctrl handle google api stuff -->
<div id="drive-starter" ng-cloak ng-controller="starterCtrl">
<div id="layout" ng-cloak ng-controller="layoutCtrl">
<div id="menu-container">
<aside>
<h1>{{title}}</h1>
<ul>
<li class="{{path == ''? 'selected': ''}}" ng-if="metadata">
<a ng-if="metadata.raw.lang === 'fr'" ng-href="#/{{fileId}}">Accueil</a>
<a ng-if="metadata.raw.lang !== 'fr'" ng-href="#/{{fileId}}">Home</a>
</li>
<li ng-repeat="folder in folders" class="{{path == folder.slug? 'selected': ''}}">
<a ng-href="#/{{fileId}}/{{folder.slug}}">{{folder.title}}</a>
</li>
<li> </li>
<li class="{{path == 'references'? 'selected': ''}}" ng-if="bibliography && metadata">
<a ng-if="metadata.raw.lang === 'fr'" ng-href="#/{{fileId}}/d/references">Réferences</a>
<a ng-if="metadata.raw.lang !== 'fr'" ng-href="#/{{fileId}}/d/references">References</a>
</li>
<li class="{{path == 'credits'? 'selected': ''}}" ng-if="metadata">
<a ng-if="metadata.raw.lang === 'fr'" ng-href="#/{{fileId}}/d/credits">Crédits</a>
<a ng-if="metadata.raw.lang !== 'fr'" ng-href="#/{{fileId}}/d/credits">Credits</a>
</li>
</ul>
</aside>
</div>
<nav id="sections">
<h1>{{metadata.raw[metadata.keys[0]]}}</h1>
</nav>
<div id="wrapper">
<div class="inner">
<div id="login" ng-if="app_status == 'APP_STATUS_AUTHORIZATION_REQUIRED'">
<h2>login with your google account</h2>
<p>
Note that if the google drive-folder specified
it is not "public" it should be shared with your google account!
</p>
<button class="btn btn-primary" ng-click="authorize()">authorize drive-in
</button>
</div>
<div class="page" ng-view>
</div>
</div>
</div> <!-- cfr app.js and templates are under src/views -->
</div>
</div>
<!-- eof #drive-starter -->
<!-- cdn resources -->
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-csv/0.71/jquery.csv-0.71.min.js"></script>
<!--
bibtext/markdown interpreters
=============================
-->
<script src="src/js/libs/bibtex.js"></script>
<script src="src/js/libs/showdown.min.js"></script>
<script src="src/js/libs/showdown-twitter.min.js"></script>
<script src="src/js/libs/showdown-vimeo.js"></script>
<!--
angular libraries
==================
-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.9/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.9/angular-route.min.js"></script>
<!-- script src="src/js/libs/angular.min.js"></script>
<script src="src/js/libs/angular-route.min.js"></script -->
<!--
angular app
===========
-->
<script src="src/js/app.js"></script>
<script src="src/js/services/gdoc-parser.js"></script>
<script src="src/js/controllers/starter.js"></script>
<script src="src/js/controllers/layout.js"></script>
<script src="src/js/controllers/index.js"></script>
<script src="src/js/controllers/page.js"></script>
<script src="src/js/directives/gdoc.js"></script>
<!--
big init
========
-->
<script>
/*
Onload fnctio called after google drive api initialization (it takes more than one may expects)
*/
function load() {
console.log('google drive loaded.');
var scope = angular.element($("#drive-starter")).scope(); // cfr StarterCtrl in controllers.js
scope.$emit('GOOGLE_CLIENT_INITIALIZED', settings);
}
</script>
<script src="https://apis.google.com/js/client.js?onload=load"></script>
</body>
</html>