-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
88 lines (71 loc) · 4.17 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
<html lang="en" >
<head>
<title>NASA space photos</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Angular Material style sheet -->
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.0/angular-material.min.css">
<!-- Material Icons style sheet -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!-- Google Analytics tracking code -->
<script>
(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','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-53154916-8', 'auto');
ga('send', 'pageview');
</script>
</head>
<body ng-app="photoApp" ng-controller="photoCtrl" ng-init="" ng-cloak>
<!--
Your HTML content here
-->
<div ng-include="'navMenu.htm'"></div>
<md-content layout-xs="column" layout-sm="column" layout="row" layout-padding>
<md-card flex-gt-sm="100" flex-md="60" flex-lg="40" md-whiteframe="9">
<img ng-src="{{ photo.url }}" ng-if="photo.media_type === 'image'" style="padding-bottom: 8px;">
<iframe ng-src="{{ videoUrl }}" ng-if="photo.media_type === 'video'" width="100%" height="100%"></iframe>
<div>
<span ng-show="photo.copyright"><em>Copyright: {{ photo.copyright }}</em></span>
<!-- UI components for tablets and desktop computers -->
<span hide-xs>
<md-button class="md-raised md-primary" ng-href="{{ photo.url }}" ng-if="photo.media_type === 'image'" download><md-icon>file_download</md-icon> DOWNLOAD</md-button>
<md-button class="md-raised md-primary" ng-href="{{ photo.hdurl }}" ng-if="photo.media_type === 'image'" download><md-icon>file_download</md-icon> HD VERSION</md-button>
<md-datepicker ng-model="customDate" ng-change="loadPhoto(customUrl + convertDate(customDate), token)" md-max-date="maxDate"></md-datepicker>
</span>
<!-- UI components for mobile devices -->
<span hide-gt-xs>
<md-button class="md-fab md-primary"><md-icon>file_download</md-icon></md-button>
<md-button class="md-fab md-primary"><md-icon>high_quality</md-icon></md-button>
</span>
</div>
</md-card>
<md-card flex-gt-sm="100" flex-md="40" flex-lg="30" layout-padding>
<h1>{{ photo.title }}</h1>
<md-divider></md-divider>
<p>{{ photo.explanation }}</p>
</md-card>
<md-card flex-gt-sm="100" hide-md flex-lg="30" layout-align="center center">
<h3>NASA Astronomy Photo of the Day</h3>
<md-divider></md-divider>
<p><strong>{{ customDate.toDateString() }}</strong></p>
<md-calendar ng-model="customDate" ng-change="loadPhoto(customUrl + convertDate(customDate), token)" md-min-date="minDate" md-max-date="maxDate"></md-calendar>
<md-button ng-hide="convertDate(customDate) === convertDate(maxDate)" class="md-raised md-primary" ng-click="customDate=maxDate;loadPhoto(customUrl + convertDate(customDate), token)"><md-icon>today</md-icon> RETURN TO TODAY'S PHOTO</md-button>
</md-card>
</div>
<!-- Angular Material requires Angular.js Libraries -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-animate.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-aria.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-messages.min.js"></script>
<!-- Angular Material Library -->
<script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.0/angular-material.min.js"></script>
<!-- Your application bootstrap -->
<script type="text/javascript" src="app.js"></script>
</md-content>
<div ng-include="'footer.htm'"></div>
</html>
<!--
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that can be in foundin the LICENSE file at http://material.angularjs.org/license.
-->