-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
76 lines (70 loc) · 2.33 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Mission to Mars</title>
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
/>
</head>
<body>
<div class="container">
<!-- Add Jumbotron to Header -->
<div class="jumbotron text-center">
<h1>Mission to Mars</h1>
<!-- Add a button to activate scraping script -->
<p><a class="btn btn-primary btn-lg" href="/scrape" role="button">Scrape New Data</a></p>
</div>
<!-- Add section for Mars News -->
<div class="row" id="mars-news">
<div class="col-md-12">
<div class="media">
<div class="media-body">
<h2>Latest Mars News</h2>
<h4 class="media-heading">{{ mars.news_title }}</h4>
<p>{{ mars.news_paragraph }}</p>
</div>
</div>
</div>
</div>
<!-- Section for Featured Image and Facts table -->
<div class="row" id="mars-featured-image">
<div class="col-md-8">
<h2>Featured Mars Image</h2>
<!-- if images is False/None/non-existent, then default to error message -->
<img
src="{{mars.featured_image | default('static/images/error.png', true) }}"
class="img-responsive"
alt="Responsive image"
/>
</div>
<div class="col-md-4">
<!-- Mars Facts -->
<div class="row" id="mars-facts">
<h4>Mars Facts</h4>
{{ mars.facts | safe }}
</div>
</div>
</div>
<!-- Section for Mars Hemispheres -->
<div class="row" id="mars-hemispheres">
<div class="page-header">
<h2 class="text-center">Mars Hemispheres</h2>
</div>
{% for hemisphere in mars.hemispheres %}
<div class="col-md-6">
<div class="thumbnail">
<img src="{{hemisphere.img_url | default('static/images/error.png', true)}}" alt="...">
<div class="caption">
<h3>{{hemisphere.title}}</h3>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</body>
</html>