aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/juick/http')
-rw-r--r--src/java/com/juick/http/www/Blogs.java4
-rw-r--r--src/java/com/juick/http/www/PageTemplates.java36
2 files changed, 37 insertions, 3 deletions
diff --git a/src/java/com/juick/http/www/Blogs.java b/src/java/com/juick/http/www/Blogs.java
index 548231ae..44c734d2 100644
--- a/src/java/com/juick/http/www/Blogs.java
+++ b/src/java/com/juick/http/www/Blogs.java
@@ -215,7 +215,9 @@ public class Blogs {
out.println(" <p>" + getTags(sql, 36) + "</p>");
out.println("</div>");
- out.println("<div id=\"rcol\"></div>");
+ out.println("<div id=\"rcol\" class=\"abs\">");
+ PageTemplates.pageYandexAd(out, visitor == null ? 2 : 3); // разный ID для залогиненых и нет
+ out.println("</div>");
out.println("</div>"); // topwrapper
diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java
index 628c9be9..67f036fc 100644
--- a/src/java/com/juick/http/www/PageTemplates.java
+++ b/src/java/com/juick/http/www/PageTemplates.java
@@ -55,11 +55,11 @@ public class PageTemplates {
out.println("<html>");
out.println("<head>");
out.println(" <title>" + title + "</title>");
- out.println(" <link rel=\"stylesheet\" href=\"//static.juick.com/style3.2012123100.css\"/>");
+ out.println(" <link rel=\"stylesheet\" href=\"//static.juick.com/style3.2013010101.css\"/>");
out.println(" <link rel=\"icon\" type=\"image/png\" href=\"//static.juick.com/favicon.png\"/>");
out.println(" <script type=\"text/javascript\" src=\"//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js\" defer=\"defer\"></script>");
out.println(" <script type=\"text/javascript\" src=\"//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js\" defer=\"defer\" async=\"async\"></script>");
- out.println(" <script type=\"text/javascript\" src=\"//static.juick.com/scripts3.2012122701.js\" defer=\"defer\"></script>");
+ out.println(" <script type=\"text/javascript\" src=\"//static.juick.com/scripts3.2013010100.js\" defer=\"defer\"></script>");
if (headers != null) {
out.println(headers);
}
@@ -148,6 +148,37 @@ public class PageTemplates {
out.println();
}
+ public static void pageYandexAd(PrintWriter out, int stat_id) {
+ out.println("<div id=\"yandex_ad\"></div>");
+ out.println("<script type=\"text/javascript\">");
+ out.println("(function(w, d, n, s, t) {");
+ out.println("w[n] = w[n] || [];");
+ out.println("w[n].push(function() {");
+ out.println("Ya.Direct.insertInto(84715, \"yandex_ad\", {");
+ out.println("stat_id: " + stat_id + ",");
+ out.println("site_charset: \"utf-8\",");
+ out.println("ad_format: \"direct\",");
+ out.println("font_size: 1,");
+ out.println("type: \"vertical\",");
+ out.println("limit: 1,");
+ out.println("title_font_size: 2,");
+ out.println("site_bg_color: \"EEEEE5\",");
+ out.println("title_color: \"006699\",");
+ out.println("url_color: \"000000\",");
+ out.println("text_color: \"000000\",");
+ out.println("hover_color: \"006699\"");
+ out.println("});");
+ out.println("});");
+ out.println("t = d.documentElement.firstChild;");
+ out.println("s = d.createElement(\"script\");");
+ out.println("s.type = \"text/javascript\";");
+ out.println("s.src = \"http://an.yandex.ru/system/context.js\";");
+ out.println("s.setAttribute(\"async\", \"true\");");
+ out.println("t.insertBefore(s, t.firstChild);");
+ out.println("})(window, document, \"yandex_context_callbacks\");");
+ out.println("</script>");
+ }
+
public static void pageDialogTemplate(PrintWriter out, Locale locale) {
ResourceBundle rb = ResourceBundle.getBundle("Global", locale);
out.println("<div id=\"dialogb\" onclick=\"$('#dialogb').hide();$('#dialogw').hide()\"></div>");
@@ -178,6 +209,7 @@ public class PageTemplates {
}
out.println("</div>");
out.println("</div></div>");
+ out.println("</body></html>");
}
public static String formatTags(ArrayList<String> tags, com.juick.User user) {