aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2015-10-25 02:02:32 +0300
committerGravatar Vitaly Takmazov2015-10-25 02:02:32 +0300
commitbbfab6a72a3821c7171078613663f9501c17f5b7 (patch)
treed8888c18e6df85418a353d4adf5c5340e3e68684 /src
parentc34205861a0a00dc69ebb30a2839c5c55fd03ce2 (diff)
responsive ad unit
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/juick/http/www/PageTemplates.java2
-rw-r--r--src/main/webapp/style.css6
2 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/com/juick/http/www/PageTemplates.java b/src/main/java/com/juick/http/www/PageTemplates.java
index 6873bbd6..509b4371 100644
--- a/src/main/java/com/juick/http/www/PageTemplates.java
+++ b/src/main/java/com/juick/http/www/PageTemplates.java
@@ -132,7 +132,7 @@ public class PageTemplates {
out.println("</script>");
*/
out.println("<script async src='//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'></script>");
- out.println("<ins class='adsbygoogle' data-ad-client='ca-pub-2439005094311303' data-ad-slot='2131891641'></ins>");
+ out.println("<ins class='adsbygoogle adslot1' data-ad-client='ca-pub-2439005094311303' data-ad-slot='2131891641'></ins>");
out.println("<script>");
out.println("(adsbygoogle = window.adsbygoogle || []).push({})");
out.println("</script>");
diff --git a/src/main/webapp/style.css b/src/main/webapp/style.css
index ea069c25..2cff895e 100644
--- a/src/main/webapp/style.css
+++ b/src/main/webapp/style.css
@@ -69,7 +69,11 @@ article textarea { width: 530px; padding: 2px; resize: vertical; vertical-align:
article input { width: 50px; margin-left: 6px; vertical-align: top; border: 1px solid #CCC; background: #EEE; color: #999; }
#yandex_ad_728 { width: 728px; height: 90px; margin: 20px 0; padding: 15px 0; background: #FFF; }
-.adsbygoogle { display: inline-block; width: 728px; height: 90px; margin: 10px 0 20px 0; }
+.adslot1 { display: inline-block; width: 320px; height: 90px; }
+
+@media (min-width:500px) {.adslot1 {width: 468px; height: 60px;}}
+@media (min-width:800px) {.adslot1 {width: 728px; height: 90px; margin: 10px 0 20px 0; }}
+
#geomap { width: 700px; height: 300px; margin-top: 1em; overflow: hidden; }