aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/src')
-rw-r--r--juick-www/src/main/java/com/juick/www/PM.java8
-rw-r--r--juick-www/src/main/resources/layouts/content.html24
-rw-r--r--juick-www/src/main/resources/views/partial/footer.html34
-rw-r--r--juick-www/src/main/resources/views/partial/tags.html6
4 files changed, 53 insertions, 19 deletions
diff --git a/juick-www/src/main/java/com/juick/www/PM.java b/juick-www/src/main/java/com/juick/www/PM.java
index e64a3606..f912f0b6 100644
--- a/juick-www/src/main/java/com/juick/www/PM.java
+++ b/juick-www/src/main/java/com/juick/www/PM.java
@@ -39,6 +39,8 @@ import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
+import static com.juick.www.PageTemplates.sape;
+
/**
*
* @author Ugnich Anton
@@ -51,7 +53,7 @@ public class PM {
String title = "PM: Inbox";
List<com.juick.Message> msgs = PMQueries.getLastPMInbox(sql, visitor.getUID());
msgs.forEach(m -> m.setText(Utils.formatMessage(m.getText())));
-
+ String links = sape.getPageLinks(request.getRequestURI(), request.getCookies()).render();
response.setContentType("text/html; charset=UTF-8");
try (PrintWriter out = response.getWriter()) {
PebbleTemplate template = Utils.getEngine().getTemplate("views/pm_inbox.html");
@@ -60,6 +62,10 @@ public class PM {
context.put("visitor", visitor);
context.put("msgs", msgs);
context.put("tags", TagQueries.getPopularTags(sql));
+ if (visitor.getUID() == 0) {
+ context.put("showAdv", true);
+ context.put("links", links);
+ }
template.evaluate(out, context);
}
}
diff --git a/juick-www/src/main/resources/layouts/content.html b/juick-www/src/main/resources/layouts/content.html
index 4cc1e2bf..ef12382c 100644
--- a/juick-www/src/main/resources/layouts/content.html
+++ b/juick-www/src/main/resources/layouts/content.html
@@ -1,22 +1,19 @@
<!DOCTYPE html>
<html>
-<head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <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"/>
+ <link rel="stylesheet" type="text/css" href="/style.css" />
{% block headers %}
{{ headers | raw }}
{% endblock %}
<title>{{ title }}</title>
- <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"/>
- <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>
-{% include "views/partial/navigation.html" %}
+ <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
+ <link rel="icon" href="//i.juick.com/favicon.png" />
+ </head>
+ <body>
+ {% include "views/partial/navigation.html" %}
<section id="content">
{% block content %}
{% endblock %}
@@ -25,5 +22,6 @@
{% block column %}
{% endblock %}
</aside>
-</body>
+ {% include "views/partial/footer.html" %}
+ </body>
</html> \ No newline at end of file
diff --git a/juick-www/src/main/resources/views/partial/footer.html b/juick-www/src/main/resources/views/partial/footer.html
new file mode 100644
index 00000000..6978a2c0
--- /dev/null
+++ b/juick-www/src/main/resources/views/partial/footer.html
@@ -0,0 +1,34 @@
+<div id="footer">
+ <div id="footer-right">
+ <a href="/settings" rel="nofollow">Настройки</a> &#183;
+ <a href="/help/ru/contacts" rel="nofollow">Контакты</a> &#183;
+ <a href="/help/" rel="nofollow">Справка</a> &#183;
+ <a 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">ВКонтакте</a>
+ <a href="https://www.facebook.com/JuickCom" rel="nofollow" class="ico32-fb">Facebook</a>
+ </div>
+ <div id="footer-left">juick.com &copy; 2008-2016
+ {% if links %}
+ <br/>Спонсоры: {{ links }}
+ {% endif %}
+ </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');
+ {% 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);
+ })();
+ {% endif %}
+</script> \ No newline at end of file
diff --git a/juick-www/src/main/resources/views/partial/tags.html b/juick-www/src/main/resources/views/partial/tags.html
index a2906ef0..4d05b7fb 100644
--- a/juick-www/src/main/resources/views/partial/tags.html
+++ b/juick-www/src/main/resources/views/partial/tags.html
@@ -1,7 +1,3 @@
{% for tag in tags %}
-<span>
- <!-- TODO: tagscloud: font-size: small, large, x-large, xx-large !-->
- <a href="/{{ user.getUName() }}/?tag={{tag.getName()}}"
- title="{{ tag.getName() }}" class="usage_{{ tag.UsageCnt }}">{{ tag.getName() }}</a>
-</span>
+ <a href="/tag/{{ tag | urlencode }}" title="{{ tag }}">{{ tag }}</a>
{% endfor %} \ No newline at end of file