diff options
author | 2016-11-23 16:19:26 +0700 | |
---|---|---|
committer | 2016-11-23 13:03:09 +0300 | |
commit | e7fd58f1023ce9e1c9ab880bf27c5c0b2a3cffca (patch) | |
tree | 5ce36019dffc5f6eb4f71756a9f91068d5efbd54 /juick-spring-www/src/main/webapp | |
parent | 37a171892ba11c578ea947103ee7488801785eac (diff) |
thymeleaf layout plugin used
Diffstat (limited to 'juick-spring-www/src/main/webapp')
7 files changed, 102 insertions, 50 deletions
diff --git a/juick-spring-www/src/main/webapp/WEB-INF/templates/divideByZero.html b/juick-spring-www/src/main/webapp/WEB-INF/templates/divideByZero.html deleted file mode 100644 index 7e03d74a..00000000 --- a/juick-spring-www/src/main/webapp/WEB-INF/templates/divideByZero.html +++ /dev/null @@ -1,11 +0,0 @@ -<!DOCTYPE html> -<html xmlns:th="http://www.thymeleaf.org"> -<head> - <meta charset="UTF-8"> - <title>Title</title> -</head> -<body> -00000000000000000000000000000000000000000000000000000000000000000000000 - -</body> -</html>
\ No newline at end of file diff --git a/juick-spring-www/src/main/webapp/WEB-INF/templates/index.html b/juick-spring-www/src/main/webapp/WEB-INF/templates/index.html index a5c5b348..5687985d 100644 --- a/juick-spring-www/src/main/webapp/WEB-INF/templates/index.html +++ b/juick-spring-www/src/main/webapp/WEB-INF/templates/index.html @@ -1,11 +1,15 @@ <!DOCTYPE html> -<html xmlns:th="http://www.thymeleaf.org"> +<html xmlns:th="http://www.thymeleaf.org" + xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" + layout:decorate="~{layout/mainLayout}"> <head> - <meta charset="UTF-8"> - <title>Title</title> + <title>Главная страница</title> </head> + <body> -<h1>Index page</h1> +<section layout:fragment="content"> + <p>Главная страница !</p> +</section> </body> </html>
\ No newline at end of file diff --git a/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/footer.html b/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/footer.html deleted file mode 100644 index 1182e61d..00000000 --- a/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/footer.html +++ /dev/null @@ -1,3 +0,0 @@ -<!DOCTYPE html> -<html xmlns:th="http://www.thymeleaf.org"> -</html>
\ No newline at end of file diff --git a/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/mainLayout.html b/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/mainLayout.html index 659a3fb0..34891b45 100644 --- a/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/mainLayout.html +++ b/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/mainLayout.html @@ -1,12 +1,65 @@ <!DOCTYPE html> -<html xmlns:th="http://www.thymeleaf.org"> +<html xmlns:th="http://www.thymeleaf.org" + xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"> <head> - <meta charset="utf-8" /> - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - <script type="text/javascript" src="/scripts.js"></script> - <link rel="stylesheet" type="text/css" href="/style.css" /> + <meta charset="UTF-8" /> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"/> + + <link rel="stylesheet" href="/style.css" th:href="@{/style.css}"/> + + <script type="text/javascript" src="/scripts.js" th:href="@{/scripts.js}"></script> + + <title>Layout title</title> + + <link rel="icon" href="//i.juick.com/favicon.png"/> + <!--[if lt IE 9 & (!IEMobile 7)]> + <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script> + <![endif]--> </head> + <body> +<section layout:fragment="content"> + <p>Page content goes here</p> +</section> + +<footer> + <div layout:fragment="custom-footer">Custom footer here</div> + <div id="footer"> + <div id="footer-right"> + <a href="/settings" th:href="@{/settings}" rel="nofollow" th:text="#{link.settings}">Настройки</a> · + <a href="/help/contacts" th:href="@{/help/contacts}" rel="nofollow" th:text="#{link.contacts}">Контакты</a> · + <a href="/help/" th:href="@{/help}" rel="nofollow" th:text="#{link.help}">Справка</a> · + <a href="/help/adv" th:href="@{/help/adv}" rel="nofollow" th:text="#{link.adv}">Реклама</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 + <div th:replace="${@settingsHolder.isShowSponsors()} ? ~{layout/sponsors :: sponsors} : _"></div> + </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'); + </script> + <script th:if="${@settingsHolder.isShowSape()}"> + 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); + })(); + </script> + </div> +</footer> </body> </html>
\ No newline at end of file diff --git a/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/sponsors.html b/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/sponsors.html new file mode 100644 index 00000000..6c68a867 --- /dev/null +++ b/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/sponsors.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<html xmlns:th="http://www.thymeleaf.org"> +<body> +<div th:fragment="sponsors"> + <span th:text="#{label.sponsors}">Спонсоры:</span> +</div> +</body> +</html>
\ No newline at end of file diff --git a/juick-spring-www/src/main/webapp/WEB-INF/templates/postNotFound.html b/juick-spring-www/src/main/webapp/WEB-INF/templates/postNotFound.html index c8712c9f..4162aa8b 100644 --- a/juick-spring-www/src/main/webapp/WEB-INF/templates/postNotFound.html +++ b/juick-spring-www/src/main/webapp/WEB-INF/templates/postNotFound.html @@ -1,22 +1,23 @@ <!DOCTYPE html> -<html xmlns:th="http://www.thymeleaf.org"> +<html xmlns:th="http://www.thymeleaf.org" + xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" + layout:decorate="~{layout/mainLayout}"> <head> - <meta charset="UTF-8"> <title th:text="#{error.pageNotFound}">Страница не найдена</title> - <link rel="stylesheet" type="text/css" href="/style.css" th:href="@{/style.css}"/> </head> - <body> -<div id="pagetitle"> - <h1 th:text="#{error.pageNotFound}">Страница не найдена</h1> -</div> +<section layout:fragment="content"> + <div id="pagetitle"> + <h1 th:text="#{error.pageNotFound}">Страница не найдена</h1> + </div> -<div id="wrapper"> - <p th:text="#{errors.pageNotFound.extended(${messageId})}">Похоже, пользователь удалил страницу, возможна она и не была создана.</p> -</div> -<div> - <a th:href="@{/}" href="/"><span th:text="#{return.toMain}">Вернуться на главную</span></a> -</div> + <div id="wrapper"> + <p th:text="#{errors.pageNotFound.extended(${messageId})}">Похоже, пользователь удалил страницу, возможна она и не была создана.</p> + </div> + <div> + <a th:href="@{/}" href="/"><span th:text="#{link.returnToMain}">Вернуться на главную</span></a> + </div> +</section> </body> </html>
\ No newline at end of file diff --git a/juick-spring-www/src/main/webapp/WEB-INF/templates/userNotFound.html b/juick-spring-www/src/main/webapp/WEB-INF/templates/userNotFound.html index 300b7730..de1a97a0 100644 --- a/juick-spring-www/src/main/webapp/WEB-INF/templates/userNotFound.html +++ b/juick-spring-www/src/main/webapp/WEB-INF/templates/userNotFound.html @@ -1,22 +1,22 @@ <!DOCTYPE html> -<html xmlns:th="http://www.thymeleaf.org"> +<html xmlns:th="http://www.thymeleaf.org" + xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" + layout:decorate="~{layout/mainLayout}"> <head> - <meta charset="UTF-8"> <title th:text="#{error.userNotFound}">Пользователь не найден</title> - <link rel="stylesheet" type="text/css" href="/style.css" th:href="@{/style.css}"/> </head> - <body> +<section layout:fragment="content"> + <div id="pagetitle"> + <h1 th:text="#{error.userNotFound}">Пользователь не найден</h1> + </div> -<div id="pagetitle"> - <h1 th:text="#{error.userNotFound}">Пользователь не найден</h1> -</div> - -<div id="wrapper"> - <p th:text="#{errors.userNotFound.extended(${userName})}">Пользователь не найден.</p> -</div> -<div> - <a th:href="@{/}" href="/"><span th:text="#{return.toMain}">Вернуться на главную</span></a> -</div> + <div id="wrapper"> + <p th:text="#{errors.userNotFound.extended(${userName})}">Пользователь не найден.</p> + </div> + <div> + <a th:href="@{/}" href="/"><span th:text="#{link.returnToMain}">Вернуться на главную</span></a> + </div> +</section> </body> </html>
\ No newline at end of file |