-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.handlebars
More file actions
53 lines (46 loc) · 1.78 KB
/
main.handlebars
File metadata and controls
53 lines (46 loc) · 1.78 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 lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- font awesome for the trashcan icon -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
<title>{{{appName}}}</title>
<link rel="stylesheet" href="/css/style.css">
</head>
<body class="wrapper">
<header>
<div class="logo">
<img src="images/logo.jpeg" class="header-logo">
<h1>{{{appName}}}</h1>
</div>
<nav>
<ul>
<!-- conditional rendering based on variables - Is the user logged in?-->
{{#if loggedIn}}
<li><a href="/">Home</a></li>
<li><a href="/profile">Profile</a></li>
<li><a href="/logout">Logout <span>{{user.username}}</span> </a></li>
<div class="user-info">
<!-- conditional rendering based on variables -->
<img src="{{#if user.avatar_url}}
{{user.avatar_url}}
{{else}}
/avatar/{{user.username}}
{{/if}}"
alt="User Avatar"
class="header-avatar">
</div>
{{else}}
<li><a href="/">Home</a></li>
<li><a href="/login">Login/Register</a></li>
{{/if}}
</ul>
</nav>
</header>
{{{body}}}
<footer>
<p>© {{{copyrightYear}}} {{{appName}}}. All rights reserved.</p>
</footer>
</body>
</html>