index.ejs 1.52 KB
Newer Older
Vytor Calixto's avatar
Vytor Calixto committed
1
2
3
<html>
<% include partials/head %>
<body>
Vytor Calixto's avatar
Vytor Calixto committed
4
5
6
7
8
    <% if (message.length > 0) { message = JSON.parse(message); %>
        <script>
            swal('<%= message.title %>', '<%= message.message %>', '<%= message.type %>');
        </script>
    <% } %>
Vytor Calixto's avatar
Vytor Calixto committed
9
10
11
12
13
14
15
16
17
18
19
20
    <div class="page-wrap">
        <div class="clearfix padding-horizontal">
            <div class="float-right">
                <% if (!user) { %>
                    <a href="/login">Entrar</a>
                <% } %>
                <% if (user) { %>
                <a href="/conta">Sua conta</a>
                    <% if (user.moderador) { %>
                    <span>|</span>
                    <a href="/admin">Admin</a>
                    <% } %>
Vytor Calixto's avatar
Vytor Calixto committed
21
22
                    <span>|</span>
                    <a href="/logout">Sair</a>
Vytor Calixto's avatar
Vytor Calixto committed
23
24
25
26
27
28
29
30
                <% } %>
            </div>
            <section class="index">
                <h1>Farol</h1>
                <form method="post" action="/search">
                    <input type="search" placeholder="O que você procura?" name="query"
                        class="search-bar two-thirds" autofocus required>
                    <!-- Value do submit foi retirado daqui: http://fortawesome.github.io/Font-Awesome/cheatsheet/-->
31
                    <input type="submit" class="icon-button dark" value="&#xf002;" >
Vytor Calixto's avatar
Vytor Calixto committed
32
33
34
35
36
37
38
39
                </form>
            </section>
            <p><a id="upload" class="upload-link" href="/upload">Faça o upload de uma prova ou trabalho!</a></p>
        </div>
    </div>
    <% include partials/footer %>
</body>
</html>