diff options
author | Alexander Alexeev | 2016-12-10 04:18:57 +0700 |
---|---|---|
committer | Alexander Alexeev | 2016-12-10 04:18:57 +0700 |
commit | 8e873bad558342b723e215923e585e58eb7dd266 (patch) | |
tree | 16c2e2ddab3cb653c66061f27013e11c8cb4b328 /juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial | |
parent | 613b5e1a6c84d7a44e8f5c03464aacdaa98010f8 (diff) |
template layout fixes
Diffstat (limited to 'juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial')
-rw-r--r-- | juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/footer.html | 70 | ||||
-rw-r--r-- | juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/navigation.html | 33 |
2 files changed, 58 insertions, 45 deletions
diff --git a/juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/footer.html b/juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/footer.html index 6fbaecf2..cc165af7 100644 --- a/juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/footer.html +++ b/juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/footer.html @@ -1,32 +1,40 @@ -<div id="footer"> - <div id="footer-right"> - <a href="/settings" rel="nofollow">Настройки</a> · - <a href="/help/ru/contacts" rel="nofollow">Контакты</a> · - <a href="/help/" rel="nofollow">Справка</a> · - <a href="/help/ru/adv" rel="nofollow">Реклама</a> +<!DOCTYPE html> +<html xmlns:th="http://www.thymeleaf.org" + xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"> + +<body layout:fragment="footer"> + <div id="footer"> + <div id="footer-right"> + <a href="/settings" th:href="@{/settings}" rel="nofollow">Настройки</a> · + <a href="/help/ru/contacts" th:href="@{/help/ru/contacts}" rel="nofollow">Контакты</a> · + <a href="/help/" th:href="@{/help/}" rel="nofollow">Справка</a> · + <a href="/help/ru/adv" th:href="@{/help/ru/adv}" rel="nofollow">Реклама</a> + </div> + <div id="footer-social"> + <a href="https://twitter.com/Juick" rel="nofollow" class="ico32-twi">Twitter</a> + <a href="https://vk.com/juick" rel="nofollow" class="ico32-vk">VK</a> + <a href="https://www.facebook.com/JuickCom" rel="nofollow" class="ico32-fb">Facebook</a> + </div> + <div id="footer-left"> + juick.com © 2008-2016 + <th:block th:if="${links != null}"/><br/>Спонсоры: <span th:text="${links}"> </span></th:block> + </div> </div> - <div id="footer-social"> - <a href="https://twitter.com/Juick" rel="nofollow" class="ico32-twi">Twitter</a> - <a href="https://vk.com/juick" rel="nofollow" class="ico32-vk">ВКонтакте</a> - <a href="https://www.facebook.com/JuickCom" rel="nofollow" class="ico32-fb">Facebook</a> - </div> - <div id="footer-left">juick.com © 2008-2016 - <br th:if="${links}"/>Спонсоры: ${links} - </div> -</div> -<script> - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) - })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); - ga('create','UA-385578-4','juick.com'); - ga('require','displayfeatures'); - ga('send','pageview'); -<th:block th:if="${sapeon}"> - var _acic={dataProvider:10}; - (function(){ - var e=document.createElement('script');e.type='text/javascript';e.async=true;e.src='//www2.aci'+'nt.net/aci.js'; - var t=document.getElementsByTagName('script')[0];t.parentNode.insertBefore(e,t); - })(); -</th:block> -</script>
\ No newline at end of file + <script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + ga('create','UA-385578-4','juick.com'); + ga('require','displayfeatures'); + ga('send','pageview'); + <th:block th:if="${sapeon}"> + var _acic={dataProvider:10}; + (function(){ + var e=document.createElement('script');e.type='text/javascript';e.async=true;e.src='//www2.aci'+'nt.net/aci.js'; + var t=document.getElementsByTagName('script')[0];t.parentNode.insertBefore(e,t); + })(); + </th:block> + </script> +</body> +</html>
\ No newline at end of file diff --git a/juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/navigation.html b/juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/navigation.html index bd6359d7..79b41211 100644 --- a/juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/navigation.html +++ b/juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/navigation.html @@ -1,38 +1,43 @@ -<header> +<!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="/">Juick</a></div> <nav id="global"> <ul> - <li><a href="/">Популярные</a></li> - <li><a href="/?show=all" rel="nofollow">Все сообщения</a></li> - <li><a href="/?show=photos" rel="nofollow">Фотографии</a></li> + <li><a href="/" th:href="@{/}">Популярные</a></li> + <li><a href="/?show=all" th:href="@{/?show=all}" rel="nofollow">Все сообщения</a></li> + <li><a href="/?show=photos" th:href="@{/?show=photos}" rel="nofollow">Фотографии</a></li> </ul> </nav> <div id="search"> <form action="/"> - <input type="text" name="search" class="text" placeholder="Поиск" th:value="${search}"/> + <input type="text" name="search" class="text" placeholder="Поиск" th:value="${param.search}"/> </form> </div> <section id="headdiv" th:switch="${visitor.getUid() > 0}"> <th:block th:case="true"> <nav id="user"> <ul> - <li><a href="/?show=my">Моя лента</a></li> - <li><a href="/pm/inbox">Приватные</a></li> - <li><a href="/?show=discuss">Обсуждения</a></li> - <li><a href="/?show=recommended">Рекомендации</a></li> + <li><a href="/?show=my" th:href="@{/?show=my}">Моя лента</a></li> + <li><a href="/pm/inbox" th:href="@{/pm/inbox}">Приватные</a></li> + <li><a href="/?show=discuss" th:href="@{/?show=discuss}">Обсуждения</a></li> + <li><a href="/?show=recommended" th:href="@{/?show=recommended}">Рекомендации</a></li> </ul> </nav> <nav id="actions"> <ul> - <li><a href="/#post">Написать</a></li> - <li><a href="/${visitor.getName()}" th:text="@${visitor.getName()}">@ugnich</a></li> - <li><a href="/logout">Выйти</a></li> + <li><a href="/#post" th:href="@{/#post}">Написать</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}">Выйти</a></li> </ul> </nav> </th:block> <th:block th:case="false"> - <p>Чтобы добавлять сообщения и комментарии, <a href="/login">представьтесь</a>. + <p>Чтобы добавлять сообщения и комментарии, <a href="/login" th:href="@{/login}">представьтесь</a>. </p> </th:block> </section> -</header> +</body> +</html> |