aboutsummaryrefslogtreecommitdiff
path: root/juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/navigation.html
blob: 51489194ca272f6a7d131c0011883828dc3865fc (plain) (blame)
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
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">

<body layout:fragment="nav">
    <div id="logo"><a href="/" th:href="@{/}">Juick</a></div>
    <nav id="global">
        <ul>
            <li><a href="/" th:href="@{/}" th:text="#{link.popular}">Популярные</a></li>
            <li><a href="/?show=all" th:href="@{/?show=all}" rel="nofollow" th:text="#{link.allMessages}">Все сообщения</a></li>
            <li><a href="/?show=photos" th:href="@{/?show=photos}" rel="nofollow" th:text="#{link.withPhotos}">Фотографии</a></li>
        </ul>
    </nav>
    <div id="search">
        <form action="/">
            <input type="text" name="search" class="text" placeholder="Поиск" th:placeholder="#{label.search}" th:value="${param.search}"/>
        </form>
    </div>
    <section id="headdiv" th:switch="${visitor.isAnonym()}">
        <th:block th:case="false">
            <nav id="user">
                <ul>
                    <li><a href="/?show=my" th:href="@{/?show=my}" th:text="#{link.my}">Моя лента</a></li>
                    <li><a href="/pm/inbox" th:href="@{/pm/inbox}" th:text="#{link.privateMessages}">Приватные</a></li>
                    <li><a href="/?show=discuss" th:href="@{/?show=discuss}" th:text="#{link.discuss}">Обсуждения</a></li>
                    <li><a href="/?show=recommended" th:href="@{/?show=recommended}" th:text="#{link.recommended}">Рекомендации</a></li>
                </ul>
            </nav>
            <nav id="actions">
                <ul>
                    <li><a href="/#post" th:href="@{/#post}" th:text="#{link.postMessage}">Написать</a></li>
                    <li><a href="/ugnich" th:href="@{/{userName}(userName=${visitor.name})}" th:text="'@'+${visitor.name}">@ugnich</a></li>
                    <li><a href="/logout" th:href="@{/logout}" th:text="#{link.logout}">Выйти</a></li>
                </ul>
            </nav>
        </th:block>
        <th:block th:case="true">
            <p>[(#{message.loginForSending(@{/login})})]</p>
        </th:block>
    </section>
</body>
</html>