-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
57 lines (57 loc) · 1.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="./styles.css">
</head>
<body>
<div id="app">
<header>
<h1>Hacker News - Client</h1>
<ol class="storynav">
<storytypes
v-for="storyType of storyTypes"
v-bind:storytype = "storyType"
v-on:story="changeStoryType">
</storytypes>
</ol>
<div v-if="showstories" class="pagenav">
<pagenav
v-bind:direction = "prev"
v-on:changepage = "handlePageNav"
v-bind:isdisabled = "prevDisable">
</pagenav>
<span>{{ activePageNumber }}</span>
<pagenav
v-bind:direction = "next"
v-on:changepage = "handlePageNav"
v-bind:isdisabled = "nextDisable">
</pagenav>
</div>
</header>
<main>
<ol v-if="showstories" class="items">
<stories
v-for="story of toBeRendered"
v-bind:key="story.id"
v-on:rencomment="setParentId"
v-bind:story = "story">
<stories>
</ol>
<ol v-else-if="showcomments" class="comments">
<p v-html="text"></p>
<comments
v-for="comment of toBeRendered"
v-bind:key="comment.id"
v-on:renreplies="setChildId"
v-bind:comment="comment">
</comments>
</ol>
</main>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
<script src="./vuecomponents.js"></script>
<script src="./render.js"></script>
<script src="./fetchManager.js"></script>
</body>
</html>