forked from evancohen/smart-mirror
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
156 lines (149 loc) · 6.91 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<!DOCTYPE html>
<html ng-app="SmartMirror">
<head ng-controller="Theme">
<meta charset="utf-8">
<title>Smart Mirror</title>
<script src="js/annyang.js"></script>
<!-- bower:js -->
<script src="bower_components/moment/min/moment-with-locales.min.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/angular-animate/angular-animate.js"></script>
<script src="bower_components/angular-dynamic-locale/src/tmhDynamicLocale.js"></script>
<!-- endbower -->
<script src="js/inc/skycons.js"></script>
<!-- App -->
<script src="config.js"></script>
<script src="js/translations.js"></script>
<script src="js/rrule.js"></script>
<script src="js/app.js"></script>
<script src="js/annyang-service.js"></script>
<script src="js/weather-service.js"></script>
<script src="js/comic-service.js"></script>
<script src="js/map-service.js"></script>
<script src="js/hue-service.js"></script>
<script src="js/giphy-service.js"></script>
<script src="js/geolocation-service.js"></script>
<script src="js/calendar-service.js"></script>
<script src="js/traffic-service.js"></script>
<script src="js/controller.js"></script>
<!-- Styles and Resources -->
<link rel="shortcut icon" href="favicon.ico" />
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,800,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" ng-href="css/{{ layoutName }}.css" />
<link rel="stylesheet" href="css/weather-icons.css">
<!-- bower:css -->
<!-- endbower -->
</head>
<body ng-controller="MirrorCtrl as commands" ng-cloak>
<div class="top">
<div class="top-left">
<div class="date grey">{{date.format('dddd')}}, {{date.format('LL')}}</div>
<div class="time">{{date.format('LT')}}</div>
<ul class="calendar fade" ng-show="focus == 'default'">
<li class="event" ng-repeat="event in calendar">
<div class="event-details">
<span class="day">{{event.start.format('dddd') | uppercase}}</span>
<span class="summary">{{event.SUMMARY}}</span>
<div class="details">{{event.start.format('LLL')}}</div>
</div>
</li>
</ul>
</div>
<div class="top-right">
<div class="weather">
<div class="weather-today">
<span class="icon dimmed wi {{currentForcast.wi}}"></span>
<canvas id="icon_weather_current" width="90" height="70"></canvas>
<span class="tempreture">{{currentForcast.temperature}}°</span>
</div>
<div class="weather-week-descriptor">
<span>{{hourlyForcast.summary}}</span>
<span>{{weeklyForcast.summary}}</span>
</div>
<div class="weather-week" ng-repeat="forcast in weeklyForcast.data" ng-if="$index > 0">
<div class="weather-week-day">
<span class="day light-grey">{{forcast.day}}</span>
<canvas id="icon_weather_{{forcast.counter}}" width="33" height="25"></canvas>
<span class="icon-small dimmed wi wi-fw {{forcast.wi}}"></span>
<span class="tempreture tempreture-min">{{forcast.temperatureMin}}°</span>
<span class="tempreture tempreture-max">{{forcast.temperatureMax}}°</span>
</div>
</div>
<!-- Workaround: -->
<div style="display: none;" ng-repeat="forcast in weeklyForcast.data" ng-if="$index > 0">
<span ng-init="iconLoad('icon_weather_'+forcast.counter, forcast.iconAnimation)"></span>
</div>
</div>
<div class="traffic">
<div ng-show="!traffic.error" class="traffic-information">
<span class="time-to">Time to {{traffic.destination}}:</span>
<span>{{traffic.duration.humanize()}}</span>
</div>
</div>
</div>
</div>
<div class="container">
<div class="middle-center">
<h1>{{greeting}}</h1>
<h3 ng-show="!(user.name === undefined)">{{user.name}}</h3>
<!-- <div class="listening" ng-show="listening">Ready: {{focus}}</div> -->
<div class="contents-box map animate-grow" ng-show="focus == 'map'">
<img class="contents map animate-grow" ng-src="{{map}}"/>
</div>
<div class="contents-box gif animate-grow" ng-show="focus == 'gif'">
<img class="contents gif animate-grow" ng-src="{{gifimg}}"/>
</div>
<div class="xkcd-container animate-grow" ng-show="focus == 'xkcd'">
<img class="xkcd animate-grow" ng-src="{{xkcd}}"/>
</div>
<div class="dilbert-container animate-grow" ng-show="focus == 'dilbert'">
<img class="dilbert animate-grow" ng-src="{{dilbert.content}}"/>
<div class="comic-title">{{dilbert.title}}</div>
</div>
</div>
<div class="bottom-center">
<!-- Command list -->
<div class="commands animate-grow" ng-show="focus == 'commands'">
<h2>Available Commands</h2>
<dl>
<dt ng-repeat-start="command in commands">{{command['text']}}</dt>
<dd ng-repeat-end>{{command['description']}}</dd>
</dl>
<small>
We are using node <script>document.write(process.versions.node)</script>,
Chrome <script>document.write(process.versions.chrome)</script>,
and Electron <script>document.write(process.versions.electron)</script>.
</small>
</div>
<div class="interim-result" ng-bind="interimResult"></div>
</div>
<div class="colors animate-grow" ng-show="focus == 'colors'">
<div class="color-block" ng-repeat="color in colors" style="background-color:{{color}}"></div>
</div>
</div>
<!-- Debug Buttons -->
<div class="debug-info">
<!--<button ng-click="debug = true">Open Debug</button>-->
</div>
<div class="debug-info" ng-show="debug == true">
<button ng-click="focus = (focus == 'map')?'default':'map'">Map</button>
<button ng-click="focus = (focus == 'colors')?'default':'colors'">Colors</button>
<button ng-click="focus = (focus == 'commands')?'default':'commands'">Commands</button>
<button ng-click="focus = (focus == 'gif')?'default':'gif'">Gif</button>
<button ng-click="debug = false">Close Debug</button>
<!-- Has results -->
<div ng-show="commands.results.length > 0">
<button class="btn btn-default" ng-click="commands.clearResults()">Clear</button>
<hr/>
<ul class="list-group">
<li class="list-group-item" ng-repeat="result in commands.results">
<span class="badge">{{ result.date | date : 'EEE MMM, yyyy hh:mm:ss a' }}</span>
{{ result.content }}
</li>
</ul>
</div>
</div>
<!-- Sleep cover -->
<div ng-show="focus == 'sleep'" class="sleep-cover fade"></div>
</body>
</html>