Commits

shl...@cec68495-dca5-4e2b-845c-11fdaaa4f967  committed cb2fa26

r4994@telaviv1: shlomi | 2008-05-11 20:12:12 +0300
Added ads to the right at the bottom of the section side bar.

  • Participants
  • Parent commits 53c858c

Comments (0)

Files changed (3)

File common/style.css.ttml

     margin-top: 3pt;
     margin-bottom: 7pt;
 }
+.menu_floaty
+{
+    float: right;
+    width:25%;
+    min-width:275px;
+    margin-left: 7pt;
+    margin-right: 10pt;
+}
 .sub_menu
 {
     background-color: #C0C0C0;
     padding-top: 7pt;
     padding-bottom: 7pt;
-    float: right;
-    margin-left: 7pt;
-    margin-right: 10pt;
     padding-right:5pt;
     padding-left:5pt;
-    width:25%;
-    min-width:275px;
+    margin-bottom: 1em;
 }
 .sub_menu ul
 {

File lib/Shlomif/Homepage/SectionMenu.pm

 use HTML::Widgets::NavMenu;
 
 __PACKAGE__->mk_accessors(qw(
+    bottom_code
     current_host
     empty
     menu
     $self->empty(0);
     $self->current_host($args{current_host});
     $self->root($args{root});
+    $self->bottom_code($args{bottom_code});
 
     my $current_sect;
     SECTION_LOOP: foreach my $sect (@{$self->sections()})
     }
     else
     {
-        return qq{<div class="sub_menu">\n} .
+        return 
+            qq{<div class="menu_floaty">} .
+            qq{<div class="sub_menu">\n} .
             qq{<h2>} . $self->title() . qq{</h2>\n} .
             $self->get_nav_links() .
             qq{<a id="toggle_sect_menu" href="javascript:toggle_sect_menu()" class="toggle_sect_menu">Hide</a>\n} .
             qq{<div id="sect_menu_wrapper">\n} .
             join("\n", @{$self->results()->{html}}) .
-            qq{\n</div>\n</div>\n};
+            qq{\n</div>\n} .
+            qq{\n</div>\n} .
+            (defined($self->bottom_code()) ? $self->bottom_code() : "") .
+            qq{\n</div>\n};
     }
 }
 

File lib/rest-of-template.wml

 <:{
     use MySectNavData;
 
+
     use vars (qw($section_nav_menu));
 
     sub init_section_nav_menu
     {
+        my $ads_side = <<"EOF_ADS_CODE";
+<google_adsense_code_side />
+EOF_ADS_CODE
+    
         if (defined($section_nav_menu))
         {
             return;
         'path_info' => $filename,
         'current_host' => "<latemp_default_val "<get-var latemp_server />" "$(LATEMP_SERVER)" />",
         'root' => "$(ROOT)",
+        'bottom_code' => $ads_side,
         );
 
 return;