-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
179 lines (157 loc) · 6.84 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<!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>The HACKER TRIBUNE</title>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Cinzel&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Cinzel:wght@500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU"
crossorigin="anonymous">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<!-- color overwritten by CSS to get shade I liked -->
<nav class="navbar navbar-expand-lg navbar-dark bg-primary mb-5">
<a class="nav-link navbar-brand" href="#" id="nav-all"><i class="far fa-newspaper"></i><h1 > The HACKER TRIBUNE</h1></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse main-nav-links" id="navbarNavAltMarkup">
<div class="navbar-nav ml-auto">
<ul class="navbar-nav mt-2">
<li>
<a class="nav-item nav-link mx-3 active" href="#" id="nav-submit">Submit</a>
</li>
<li>
<a class="nav-item nav-link mx-3 " href="#" id="nav-my-favorites">Favorites</a>
</li>
<li>
<a class="nav-item nav-link mx-3" href="#" id="nav-my-stories">my stories</a>
</li>
<li>
<a class="nav-item nav-link mx-3" href="#" id="nav-login">login/create user</a>
</li>
<li>
<span class="nav-item nav-link mx-3 hidden" id="nav-welcome">
<a href="#" id="nav-user-profile"></a>
</span>
</li>
<li>
<a class="nav-item nav-link mx-3 hidden" id="nav-logout" href="#">
<small>(logout)</small>
</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- ----------------------------------------- NEW ARTICLE FORM -------------------------------------->
<section class="articles-container container form-group mt-5">
<form action="" class="hidden" id="submit-form">
<div>
<!-- <label for="author">author</label> -->
<input type="text" class="form-control" id="author" placeholder="author name" aria-describedby="author" required>
</div>
<div>
<!-- <label for="title">title</label> -->
<input type="text" class="form-control" id="title" placeholder="article title" aria-describedby="title" required>
</div>
<div>
<!-- <label for="url">url</label> -->
<input type="url" class="form-control" id="url" placeholder="article url" aria-describedby="URL" required>
</div>
<div>
<button class="btn btn-primary" type="submit" id="add-story-btn">submit</button>
</div>
<hr>
</form>
<!-- ------------------------------------------------------------------ -------------------------------------->
<article>
<ol id="all-articles-list" class="articles-list">
<h3>Loading...</h3>
</ol>
</article>
<article>
<ul id="favorited-articles" class="hidden articles-list">
<h3>Loading...</h3>
</ul>
</article>
<article>
<ul id="filtered-articles" class="hidden articles-list">
<h3>Loading...</h3>
</ul>
</article>
<article>
<ul id="my-articles" class="hidden articles-list">
<h3>Loading...</h3>
</ul>
</article>
</section>
<section class="edit-article-container container">
<form action="#" id="edit-article-form" class="hidden" method="post">
<h4>Article Information</h4>
<div class="edit-input">
<label for="edit-title">Title</label>
<input id="edit-title" type="text">
<button type="submit">change</button>
</div>
</form>
</section>
<section class="account-forms-container container">
<form action="#" id="login-form" class="account-form hidden" method="post">
<h4>Login</h4>
<div class="login-input">
<label for="login-username">username</label>
<input id="login-username" type="text">
</div>
<div class="login-input">
<label for="login-password">password</label>
<input id="login-password" type="password">
</div>
<button type="submit">login</button>
<hr>
</form>
<form action="#" id="create-account-form" class="account-form hidden" method="post">
<h4>Create Account</h4>
<div class="login-input">
<label for="create-account-name">name</label>
<input id="create-account-name" type="text">
</div>
<div class="login-input">
<label for="create-account-username">username</label>
<input id="create-account-username" type="text">
</div>
<div class="login-input">
<label for="create-account-password">password</label>
<input id="create-account-password" type="password">
</div>
<button type="submit">create account</button>
</form>
</section>
<!-- ----------------------------------- DONE: JAVASCRIPT TO DISPLAY NAME/USRNM/DATE -------------------- -->
<section id="user-profile" class="container hidden">
<h4>User Profile Info</h4>
<section>
<div id="profile-name">Name: </div>
<div id="profile-username">Username: </div>
<div id="profile-account-date">Account Created: </div>
</section>
</section>
</body>
<script src="https://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
crossorigin="anonymous"></script>
<script src="https://unpkg.com/axios/dist/axios.js"></script>
<script src="api-classes.js"></script>
<script src="ui.js"></script>
</html>