Skip to content

Commit

Permalink
feature 2587: theme elegant, script & theme update
Browse files Browse the repository at this point in the history
git-svn-id: http://piwigo.org/svn/trunk@13479 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
Zaphod committed Mar 4, 2012
1 parent 27e26d5 commit 6c5a97c
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 33 deletions.
68 changes: 50 additions & 18 deletions themes/elegant/scripts.js
Expand Up @@ -2,33 +2,65 @@

var menubar=jQuery("#menubar");
var content=jQuery("#content");

if ( (menubar.length == 1) && (content.length ==1)) {
menubar.after("<div id=\"menuswitcher\">«</div>");
/* if (!content.hasClass('content')) content.addClass('content');*/
}
/*»*/

jQuery("#menuswitcher").click(function(){
if (jQuery("#menubar").is(":hidden")) {
jQuery("#menuswitcher").click(function(){
if (jQuery("#menubar").is(":hidden")) {
showMenu(0);
return false;
} else {
hideMenu(0);
return false;
}
});

// creates a variable with the contents of the cookie side-menu
var sidemenu = jQuery.cookie('side-menu');

// if cookie says the menu is hiding, keep it hidden!
if (sidemenu == 'hiding') {
hideMenu(0);
} else {
showMenu(0);
return false;
}

}

var comments=jQuery("#thePicturePage #comments");
if (comments.length == 1) {
var comments_button=jQuery("#comments h3");

if (comments_button.length == 0) {
jQuery("#addComment").before("<h3>Comments</h3>");
comments_button=jQuery("#comments h3");
}

if (jQuery.cookie('comments') == 'visible') {
comments_button.addClass("comments_toggle").addClass("comments_toggle_off");
} else {
hideMenu(0);
return false;
comments.addClass("comments_hidden");
comments_button.addClass("comments_toggle").addClass("comments_toggle_on");
}
});

comments_button.click(function() {

// creates a variable with the contents of the cookie side-menu
var sidemenu = jQuery.cookie('side-menu');
var comments=jQuery("#thePicturePage #comments");
if (comments.hasClass("comments_hidden")) {
comments.removeClass("comments_hidden");
comments_button.addClass("comments_toggle_off").removeClass("comments_toggle_on");;
jQuery.cookie('comments', 'visible', {path: "/"});
} else {
comments.addClass("comments_hidden");
comments_button.addClass("comments_toggle_on").removeClass("comments_toggle_off");;
jQuery.cookie('comments', 'hidden', {path: "/"});
}

});

// if cookie says the menu is hiding, keep it hidden!
if (sidemenu == 'hiding') {
hideMenu(0);
} else {
showMenu(0);
}


});

Expand Down
29 changes: 14 additions & 15 deletions themes/elegant/theme.css
Expand Up @@ -35,13 +35,15 @@ a:hover {border-bottom:none;}
#content.menuhidden, #the_page > .content.menuhidden { margin-left:35px;}
#content, #the_page > .content { margin-right:0;}

.content {
#content,.content {
background-color: #222;
border-bottom: 2px solid #444;
margin-bottom: 4px;
padding-bottom: 4px;
}

#thePicturePage #content {padding-bottom:0;}

.content .titrePage {
background-color: #111;
border-bottom: 2px solid #444;
Expand Down Expand Up @@ -108,27 +110,22 @@ INPUT.rateButtonSelected /* <= why IE doesn't inherit this ? */ {
border: 1px solid #000;
}

#imageToolBar {
border-bottom: 1px solid #000;
}

FIELDSET, INPUT, SELECT, TEXTAREA {
border: 1px solid gray;
}


.thumbnails IMG {margin-bottom:0; vertical-align:middle;}
.thumbnailCategory DIV.illustration {margin: 2px; text-align:center;}

/* picture page */
#thePicturePage {background-color:#111;}
#imageHeaderBar {
border: solid 0 #444;
padding:0 35px;
}
#content #imageHeaderBar {padding:0;}
#imageHeaderBar { border: solid 0 #444; padding:0 0 0 10px;}
.contentWithMenu #imageHeaderBar {padding:0;}
#copyright {border-top-width:2px;}
#imageHeaderBar {border-bottom-width:2px; width:auto;}
#imageHeaderBar, #imageToolBar, #copyright {background:none;}
#imageToolBar {margin-top: -28px;}
#theImage, #imageInfos, #comments {background:#222;}
#imageHeaderBar {border-bottom-width:2px; width:auto; background:#111}
#imageToolBar {background:none;}
#imageToolBar {margin-top: -28px; margin-bottom:0;}
#theImage {padding-top:10px;}
#imageHeaderBar .browsePath {display:inline-block; float:none; font-size:120%; line-height:20px; padding: 8px 0 0 2px; font-weight:bold; margin:0;}
#imageHeaderBar .imageNumber {display:inline-block; float:none; line-height:20px; padding: 8px 0 0 12px; font-weight:bold; margin:0;}
Expand All @@ -140,6 +137,8 @@ FIELDSET, INPUT, SELECT, TEXTAREA {
#imageToolBar {float:right;}

#thePicturePage #comments {padding-top:12px; padding-bottom:12px;}
#thePicturePage #comments h3 {margin-top:10px; margin-bottom:10px;}
#thePicturePage #comments form { margin-bottom:10px;}
#thePicturePage #comments fieldset{margin-top: 0; margin-bottom:0;}
.noCommentText {display:block;}
#copyright {padding:4px 4px 0 0; text-align:right;}
Expand All @@ -148,7 +147,7 @@ FIELDSET, INPUT, SELECT, TEXTAREA {
#thePicturePage .comments_toggle_off:before {content:'(-) '}

.comments_hidden ul, .comments_hidden form {display:none;}
.thumbnailCategory {background-color: #303030;}
.thumbnailCategory {background-color: #333;}
.comments_toggle {cursor: pointer;}
.comments_toggle:hover {color:#fff;}

Expand Down

0 comments on commit 6c5a97c

Please sign in to comment.