From d6b9cd4ba15389ab5e3c9152af4e7b300029cd0a Mon Sep 17 00:00:00 2001 From: Denis Walker <dez@sucs.org> Date: Sat, 13 Nov 2010 01:30:01 +0000 Subject: [PATCH] Switches menu rendering to border-radius with exception of IE --- htdocs/css/ie.css | 15 +++++++++++++++ htdocs/css/sucs.css | 15 ++++++++++----- templates/menu.tpl | 6 +++--- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/htdocs/css/ie.css b/htdocs/css/ie.css index 55a84ae..ad9e076 100644 --- a/htdocs/css/ie.css +++ b/htdocs/css/ie.css @@ -21,3 +21,18 @@ height: 100%; background: url('/images/right-bottom-corner.png') bottom right no-repeat; } + +/* -------------------------------------------------- + Menu + -------------------------------------------------- */ +#navigationC ul li a { + background: #e76808 url('/images/menu-top-right.png') no-repeat top right; +} +#navigationC ul ul li a span { + background: url('/images/menu-bottom-right.png') no-repeat bottom right; +} + +#navigationC ul li a span { + display: block; + background: url('/images/menu-bottom-right.png') no-repeat bottom right; +} diff --git a/htdocs/css/sucs.css b/htdocs/css/sucs.css index 6623e92..9bab370 100644 --- a/htdocs/css/sucs.css +++ b/htdocs/css/sucs.css @@ -160,7 +160,9 @@ a:hover { line-height: 1.5em; font-size: 95%; color: #ffc62b; - background: #e76808 url('/images/menu-top-right.png') no-repeat top right; + background: #e76808; + border-top-right-radius: 7px; + border-bottom-right-radius: 7px; padding-left: 1em; margin-bottom: 2px; } @@ -171,6 +173,7 @@ a:hover { #navigationC ul li a.select { color: #fff0cd; + border-bottom-right-radius: 0; } /* --- Submenu item */ @@ -179,6 +182,8 @@ a:hover { font-weight: normal; padding-left: 2em; background: #ffa405; + border-top-right-radius: 0; + border-bottom-right-radius: 0; color: #d45e08; } @@ -191,13 +196,13 @@ a:hover { } -#navigationC ul ul li a span { - background: url('/images/menu-bottom-right.png') no-repeat bottom right; +#navigationC ul ul li#lastsub a { + border-bottom-right-radius: 7px; } -#navigationC ul li a span { +#navigationC ul li#lastsub a { display: block; - background: url('/images/menu-bottom-right.png') no-repeat bottom right; + border-bottom-right-radius: 7px; } /* -------------------------------------------------- diff --git a/templates/menu.tpl b/templates/menu.tpl index 9ed0c7c..3bb6fc3 100644 --- a/templates/menu.tpl +++ b/templates/menu.tpl @@ -1,13 +1,13 @@ <div id="navigationC"> <ul> {foreach name=menu from=$menu key=name item=target} - <li>{if is_array($target)}<a href="{$baseurl}/{$name}"{if $select==$name} class="select"{/if}>{$name}</a> + {if is_array($target)}<li><a href="{$baseurl}/{$name}"{if $select==$name} class="select"{/if}>{$name}</a> <ul> {foreach name=submenu from=$target key=subitem item=subname} - <li><a href="{$baseurl}{$subname}"{if $subselect==$subitem} class="select"{/if}>{if $smarty.foreach.submenu.last}<span>{/if}{$subitem}{if $smarty.foreach.submenu.last}</span>{/if}</a></li> + <li{if $smarty.foreach.submenu.last} id="lastsub"{/if}><a href="{$baseurl}{$subname}"{if $subselect==$subitem} class="select"{/if}>{if $smarty.foreach.submenu.last}<span>{/if}{$subitem}{if $smarty.foreach.submenu.last}</span>{/if}</a></li> {/foreach} </ul> - {else}<a href="{$baseurl}{$target}"{if $select==$name} class="select"{/if}><span>{$name}</span></a>{/if}</li> + {else}<li id="lastsub"><a href="{$baseurl}{$target}"{if $select==$name} class="select"{/if}><span>{$name}</span></a>{/if}</li> {/foreach} </ul> </div> -- GitLab