From 84e5ac3a172e15f11b04203cf9e93c9d5c8174ed Mon Sep 17 00:00:00 2001
From: Ugnich Anton
Date: Tue, 1 Jan 2013 18:18:05 +0700
Subject: Yandex advertising
---
src/java/com/juick/http/www/Blogs.java | 4 ++-
src/java/com/juick/http/www/PageTemplates.java | 36 ++++++++++++++++++++++++--
web/scripts3.js | 5 ++++
web/style3.css | 6 +++--
4 files changed, 46 insertions(+), 5 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("
" + getTags(sql, 36) + "
");
out.println("");
- out.println("");
+ out.println("");
+ PageTemplates.pageYandexAd(out, visitor == null ? 2 : 3); // разный ID для залогиненых и нет
+ out.println("
");
out.println(""); // 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("");
out.println("");
out.println(" " + title + "");
- out.println(" ");
+ out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
- out.println(" ");
+ out.println(" ");
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("");
+ out.println("");
+ }
+
public static void pageDialogTemplate(PrintWriter out, Locale locale) {
ResourceBundle rb = ResourceBundle.getBundle("Global", locale);
out.println("");
@@ -178,6 +209,7 @@ public class PageTemplates {
}
out.println("");
out.println("");
+ out.println("");
}
public static String formatTags(ArrayList tags, com.juick.User user) {
diff --git a/web/scripts3.js b/web/scripts3.js
index 8a33351e..ca1fafa1 100644
--- a/web/scripts3.js
+++ b/web/scripts3.js
@@ -391,14 +391,19 @@ $(document).ready(function() {
$(window).scroll(function() {
var windowTop = $(window).scrollTop();
var column=$('#column');
+ var rcol=$('#rcol');
if (stickyTop < windowTop) {
if(column.hasClass('fix')==false) {
column.removeClass('abs');
column.addClass('fix');
+ rcol.removeClass('abs');
+ rcol.addClass('fix');
}
} else if(column.hasClass('fix')==true) {
column.removeClass('fix');
column.addClass('abs');
+ rcol.removeClass('fix');
+ rcol.addClass('abs');
}
});
}
diff --git a/web/style3.css b/web/style3.css
index 8e8e82e8..6f0b42bf 100644
--- a/web/style3.css
+++ b/web/style3.css
@@ -92,7 +92,7 @@ hr { height: 1px; background: #CCC; }
/********/
-#rcol { float: left; margin-left: -200px; }
+#rcol { width: 190px; top: 0; margin: 10px 0 0 810px; padding-top: 10px; overflow: hidden; font-size: smaller; }
/********/
@@ -134,8 +134,10 @@ hr { height: 1px; background: #CCC; }
.msg-header { margin-bottom: 6px; }
.msg-ts { clear: both; float: none; margin: 0 0 4px 58px; }
.msg-txt { clear: both; margin: 8px 0 0 0; }
+ .msg-media { overflow: scroll; }
.msg-media,.msg-links,.msg-comment,.msg-comments,.msg-recomms { margin-left: 0px; }
.fix,.abs { position: static; }
- #column { clear: both; margin: 0 auto; width: 50%; }
+ #column { clear: both; margin: 0 3%; width: 44%; float: left; }
+ #rcol { float: left; width: 44%; margin: 20px 3% 0 3%; }
}
\ No newline at end of file
--
cgit v1.2.3