From 95ddcd68011f54c7e598d029a81d43c895440691 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 25 Jan 2008 15:04:20 -0600 Subject: [PATCH] Experimenting with styles for OPAC cart and lists button. Unfinished. Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- koha-tmpl/opac-tmpl/prog/en/css/opac.css | 129 ++++++++++++++++-- .../opac-tmpl/prog/en/includes/masthead.inc | 8 +- koha-tmpl/opac-tmpl/prog/en/js/script.js | 16 ++- 3 files changed, 139 insertions(+), 14 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index d6e62e4159..e83ddb9473 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -695,20 +695,11 @@ a.reserve { } #opac-main-search a.cart { - background : #FFC url(../../images/cart-small.gif) 7px center no-repeat; - border : 1px solid white; - color : #6699cc; - padding : 5px; - padding-left : 25px; - text-decoration: none; + } #opac-main-search a.lists { - background : #FFC; - border : 1px solid white; - color : #6699cc; - padding : 5px; - text-decoration: none; + } .pages { @@ -941,11 +932,22 @@ margin-top : .4em; } #fluid-content-1 { +float: left; +width: 65%; margin : .3em -1px 0 2%; display: inline /* fix IE6 */; line-height : 15px; } +#fluid-content-2 { +float: left; +width: 28%; +margin-left: 2%; +display: inline /* fix IE6 */; +margin-right: -1px /* fix IE6 */; +line-height : 25px; +} + .clearfix:after { content: "."; display: block; @@ -1002,4 +1004,109 @@ div.message { color : #e5ebff; font-weight : normal; text-decoration : none; +} +* html .btn span, +* html .btn i { + float : left; + width : auto; + background-image : none; + cursor : pointer; +} + +.btn { + display : block; + position : relative; + background : #adc2eb; + margin-left : 10px; + padding : 5px; + float : left; + color : #fff; + text-decoration : none; + cursor : pointer; +} + +.btn * { + font-style : normal; + background-image : url(../../images/button-background2.png); + background-repeat : no-repeat; + display : block; + position : relative; +} + +.btn i { + background-position : top left; + position : absolute; + margin-bottom : -5px; + top : 0; + left : 0; + width : 5px; + height : 5px; +} + +.btn span { + background-position : bottom left; + left : -5px; + padding : 0 0 5px 10px; + margin-bottom : -5px; +} + +.btn span i { + background-position : bottom right; + margin-bottom : 0; + position : absolute; + left : 100%; + width : 10px; + height : 100%; + top : 0; +} + +.btn span span { + background-position : top right; + position : absolute; + right : -10px; + margin-left : 10px; + top : -5px; + height : 0; +} + +.btn[class] { + background-image : url(../../images/shade.png); + background-position : bottom; +} + +.button:link, +.button:visited, +.button:hover {border:none;} +* html #wrap {width:50em} +/* End Demo page styling */ + +.button:link, +.button:visited { /* Top left corner, top edge */ + float:left; + color:#ddd; + background:#333 url(../../images/button-center.gif) no-repeat; + text-decoration:none; +} +.button * {display:block;} +.button span { /* Top right corner */ + padding:13px 0 0; + background:url(../../images/button-corners.gif) no-repeat right top; +} +.button span span { /* Bottom left corner, left and bottom edges */ + padding:0 0 0 13px; + background:url(../../images/button-center.gif) no-repeat left bottom; +} +.button span span span { /* Bottom right corner */ + padding:0 0 13px; + background:url(../../images/button-corners.gif) no-repeat right bottom; +} +.button span span span span { /* Right edge */ + padding:3px 12px 3px 13px; /* Extra padding (3px vertical, 13px horizontal) added to give the text some breathing room */ + background:url(../../images/button-center.gif) no-repeat right center; +} +.button:hover, +.button:focus, +.button:active { /* Make the button more visible on :hover and :focus */ + outline:2px solid #ff0; /* Not supported by IE/Win :-( */ + color:#fff; } \ No newline at end of file diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc index cc7d29df95..d7f6ca47ab 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc @@ -28,7 +28,7 @@ - value="" style="width: 30%;" /> + value="" style="width: 40%;" /> " type="hidden" /> @@ -38,7 +38,7 @@ Book Bag Lists - +
  • Lists <-- ! FIXME: Owen, you can take it from here! Make it "barshelves" for proof/demo. --> @@ -56,6 +56,10 @@ + diff --git a/koha-tmpl/opac-tmpl/prog/en/js/script.js b/koha-tmpl/opac-tmpl/prog/en/js/script.js index 140aa34450..dc3460ef90 100644 --- a/koha-tmpl/opac-tmpl/prog/en/js/script.js +++ b/koha-tmpl/opac-tmpl/prog/en/js/script.js @@ -35,4 +35,18 @@ function confirmDelete(message) { function Dopop(link) { newin=window.open(link,'popup','width=500,height=400,toolbar=false,scrollbars=yes'); } - + +/*$(document).ready(function(){ + $('#masthead').each(function(){ + $('a.button').each(function(){ + var b = $(this); + var tt = b.text() || b.val(); + if ($(':submit,:button',this)) { + b = $('').insertAfter(this).addClass('btn').attr('id',this.id).attr('href',this.href); + $(this).remove(); + } + b.text('').css({cursor:'pointer'}). prepend('').append($(''). + text(tt).append('')); + }); + }); + });*/ -- 2.39.5