Changeset 13479


Ignore:
Timestamp:
Mar 4, 2012, 10:45:11 PM (12 years ago)
Author:
Zaphod
Message:

feature 2587: theme elegant, script & theme update

Location:
trunk/themes/elegant
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/themes/elegant/scripts.js

    r13464 r13479  
    33        var menubar=jQuery("#menubar");
    44        var content=jQuery("#content");
    5        
     5
    66        if ( (menubar.length == 1) && (content.length ==1)) {
    77                menubar.after("<div id=\"menuswitcher\">«</div>");
    8 /*              if (!content.hasClass('content')) content.addClass('content');*/
     8       
     9                jQuery("#menuswitcher").click(function(){
     10                        if (jQuery("#menubar").is(":hidden")) {
     11                                showMenu(0);
     12                                return false;
     13                        } else {
     14                                hideMenu(0);
     15                                return false;
     16                        }
     17                });
     18
     19                // creates a variable with the contents of the cookie side-menu
     20                var sidemenu = jQuery.cookie('side-menu');
     21               
     22                // if cookie says the menu is hiding, keep it hidden!
     23                if (sidemenu == 'hiding') {
     24                        hideMenu(0);
     25                } else {
     26                        showMenu(0);
     27                }
     28
    929        }
    10         /*»*/
    1130       
    12         jQuery("#menuswitcher").click(function(){
    13                 if (jQuery("#menubar").is(":hidden")) {
    14                         showMenu(0);
    15                         return false;
     31        var comments=jQuery("#thePicturePage #comments");
     32        if (comments.length == 1) {
     33                var comments_button=jQuery("#comments h3");
     34
     35                if (comments_button.length == 0) {
     36                        jQuery("#addComment").before("<h3>Comments</h3>");
     37                        comments_button=jQuery("#comments h3");
     38                }
     39       
     40                if (jQuery.cookie('comments') == 'visible') {
     41                        comments_button.addClass("comments_toggle").addClass("comments_toggle_off");
    1642                } else {
    17                         hideMenu(0);
    18                         return false;
     43                        comments.addClass("comments_hidden");
     44                        comments_button.addClass("comments_toggle").addClass("comments_toggle_on");
    1945                }
    20         });
     46               
     47                comments_button.click(function() {
    2148
    22         // creates a variable with the contents of the cookie side-menu
    23         var sidemenu = jQuery.cookie('side-menu');
     49                        var comments=jQuery("#thePicturePage #comments");
     50                        if (comments.hasClass("comments_hidden")) {
     51                                        comments.removeClass("comments_hidden");
     52                                        comments_button.addClass("comments_toggle_off").removeClass("comments_toggle_on");;
     53                                        jQuery.cookie('comments', 'visible', {path: "/"});
     54                                } else {
     55                                        comments.addClass("comments_hidden");
     56                                        comments_button.addClass("comments_toggle_on").removeClass("comments_toggle_off");;
     57                                        jQuery.cookie('comments', 'hidden', {path: "/"});
     58                                }
     59                       
     60                });
    2461       
    25         // if cookie says the menu is hiding, keep it hidden!
    26         if (sidemenu == 'hiding') {
    27                 hideMenu(0);
    28         } else {
    29                 showMenu(0);
    3062        }
    31 
     63       
    3264       
    3365});
  • trunk/themes/elegant/theme.css

    r13474 r13479  
    3636#content, #the_page > .content { margin-right:0;}
    3737
    38 .content {
     38#content,.content {
    3939        background-color: #222;
    4040        border-bottom: 2px solid #444;
     
    4242        padding-bottom: 4px;
    4343}
     44
     45#thePicturePage #content {padding-bottom:0;}
    4446
    4547.content .titrePage {
     
    109111}
    110112
    111 #imageToolBar {
    112         border-bottom: 1px solid #000;
    113 }
    114 
    115113FIELDSET, INPUT, SELECT, TEXTAREA {
    116114        border: 1px solid gray;
     
    118116
    119117
     118.thumbnails IMG {margin-bottom:0; vertical-align:middle;}
     119.thumbnailCategory DIV.illustration {margin: 2px; text-align:center;}
     120
    120121/* picture page */
    121122#thePicturePage {background-color:#111;}
    122 #imageHeaderBar {
    123         border: solid 0 #444;
    124         padding:0 35px;
    125 }
    126 #content #imageHeaderBar {padding:0;}
     123#imageHeaderBar { border: solid 0 #444; padding:0 0 0 10px;}
     124.contentWithMenu #imageHeaderBar {padding:0;}
    127125#copyright {border-top-width:2px;}
    128 #imageHeaderBar {border-bottom-width:2px; width:auto;}
    129 #imageHeaderBar, #imageToolBar, #copyright      {background:none;}
    130 #imageToolBar {margin-top: -28px;}
    131 #theImage, #imageInfos, #comments {background:#222;}
     126#imageHeaderBar {border-bottom-width:2px; width:auto; background:#111}
     127#imageToolBar   {background:none;}
     128#imageToolBar {margin-top: -28px; margin-bottom:0;}
    132129#theImage {padding-top:10px;}
    133130#imageHeaderBar .browsePath {display:inline-block; float:none; font-size:120%; line-height:20px; padding: 8px 0 0 2px; font-weight:bold; margin:0;}
     
    141138
    142139#thePicturePage #comments {padding-top:12px; padding-bottom:12px;}
     140#thePicturePage #comments h3 {margin-top:10px; margin-bottom:10px;}
     141#thePicturePage #comments form { margin-bottom:10px;}
    143142#thePicturePage #comments fieldset{margin-top: 0; margin-bottom:0;}
    144143.noCommentText {display:block;}
     
    149148
    150149.comments_hidden ul, .comments_hidden form {display:none;}
    151 .thumbnailCategory {background-color: #303030;}
     150.thumbnailCategory {background-color: #333;}
    152151.comments_toggle {cursor: pointer;}
    153152.comments_toggle:hover {color:#fff;}
Note: See TracChangeset for help on using the changeset viewer.