-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
52 lines (49 loc) · 1.07 KB
/
index.html
File metadata and controls
52 lines (49 loc) · 1.07 KB
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
<!DOCTYPE html>
<html>
<head>
<title>
Nomad News |
{% if order_by == 'new' %}
New
{% elif order_by == 'popular'%}
Popular
{% endif %}
</title>
<link href="https://andybrewer.github.io/mvp/mvp.css" rel="stylesheet"></link>
</head>
<body>
<header>
<h1>Nomad News</h1>
<div>
Order by:
{% if order_by == 'new' %}
<a href="/?order_by=popular">Popular</a>
{% else %}
<strong>Popular</strong>
{% endif %}
|
{% if order_by == 'popular' %}
<a href="/?order_by=new">New</a>
{% else %}
<strong>New</strong>
{% endif %}
</div>
</header>
<main>
{% for result in results %}
<div>
<div>
<a href="/{{result.objectID}}">
<h3>{{result.title}}</h3>
</a>
(<a href="{{result.url}}" target="_blanl">{{result.url}}</a>)
</div>
<div>
{{result.points}} points | By: {{result.author}} | {{result.num_comments}} comments
</div>
</div>
<hr />
{% endfor %}
</main>
</body>
</html>