summaryrefslogtreecommitdiff
path: root/views/header.ejs
blob: 2628f8d5acd384094a214cd8c5bd6022e1d3be30 (plain)
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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1">
<% if (typeof refresh !== 'undefined' && refresh > 0) { _%>
<meta http-equiv="refresh" content="<%= refresh %>">
<% } _%>
<title><%= title %></title>
<link rel="icon" href="/favicon.svg">
<link rel="stylesheet" href="/fonts/fonts.css">
<link rel="stylesheet" href="/style.css">
</head>
<body>
<header>
<a href="/"><img src="/images/rally-the-troops.svg" width="48" height="48"></a>
<nav>
<a href="/about">About</a>
<a href="/forum">Forum</a>
<%_ if (user) { _%>
<%_ if (user.unread > 0) { _%>
<a href="/inbox">Inbox (<%= unread %>)</a>
<%_ } else { _%>
<a href="/inbox">Inbox</a>
<%_ } _%>
<a href="/profile">Profile (<%= user.name %>)</a>
<%_ } else { _%>
<a href="/signup">Signup</a>
<a href="/login">Login</a>
<%_ } _%>
</nav>
</header>
<article>
<h1><%= title %></h1>
<%_ if (typeof flash !== 'undefined' && flash.length > 0) { _%>
<p class="error"><%= flash %></p>
<%_ } _%>