Hallo zusammen,
ich wollte auch mal meinen Beitrag leisten und folgende Anleitung veröffentlichen. Die Anleitung beruht auf dem FixedNavigationTutorial (
http://tympanus.net/codrops/2009/11/30/beautiful-slide-out-navigation-a-css-and-jquery-tutorial/) und hier ist eine Demo zu sehen:
http://tympanus.net/Tutorials/FixedNavigationTutorial/So!
Als erstes in der Index.html eures Templates dies:
<ul id="topmenu">
<li><a href="{$index}">{#link_index#}</a></li>
<li><a href="{$cart}">{#link_cart#}</a></li>
{if $account}
<li><a href="{$account}">{#link_account#}</a></li>
{/if}
{if $smarty.session.customers_status.customers_status_id == '1'}
<li><a href="{php}echo xtc_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL');{/php}">{#new_customer#}</a></li>
{/if}
<li><a href="{$checkout}">{#link_checkout#}</a></li>
{if $smarty.session.customer_id}
<li><a href="{$logoff}">{#link_logoff#}</a></li>
{else}
<li><a href="{$login}">{#link_login#}</a></li>
{/if}
</ul>
mit dem ersetzen:
<ul id="navigation">
<li class="home"><a href="{$index}" title="{#link_index#}">{#link_index#}</a></li>
<li class="cart"><a href="{$cart}" title="{#link_cart#}">{#link_cart#}</a></li>
{if $account}
<li class="account"><a href="{$account}" title="{#link_account#}">{#link_account#}</a></li>
{/if}
{if $smarty.session.customers_status.customers_status_id == '1'}
<li class="newcustomer"><a href="{php}echo xtc_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL');{/php}" title="{#new_customer#}">{#new_customer#}</a></li>
{/if}
<li class="checkout"><a href="{$checkout}" title="{#link_checkout#}">{#link_checkout#}</a></li>
{if $smarty.session.customer_id}
<li class="logoff"><a href="{$logoff}" title="{#link_logoff#}">{#link_logoff#}</a></li>
{else}
<li class="login"><a href="{$login}" title="{#link_login#}">{#link_login#}</a></li>
{/if}
</ul>
In der Stylesheet.css einfügen:
ul#navigation {
position: fixed;
margin: 0px;
padding: 0px;
top: 10px;
left: 0px;
list-style: none;
z-index:9999;
}
ul#navigation li {
width: 100px;
}
ul#navigation li a {
display: block;
margin-left: -2px;
width: 100px;
height: 70px;
background-color:#CFCFCF;
background-repeat:no-repeat;
background-position:center center;
border:1px solid #AFAFAF;
-moz-border-radius:0px 10px 10px 0px;
-webkit-border-bottom-right-radius: 10px;
-webkit-border-top-right-radius: 10px;
-khtml-border-bottom-right-radius: 10px;
-khtml-border-top-right-radius: 10px;
/*-moz-box-shadow: 0px 4px 3px #000;
-webkit-box-shadow: 0px 4px 3px #000;
*/
opacity: 0.9;
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=90);
}
ul#navigation .home a{
}
ul#navigation .cart a {
}
ul#navigation .account a {
}
ul#navigation .newcustomer a {
}
ul#navigation .checkout a {
}
ul#navigation .logoff a {
}
ul#navigation .login a {
}
Im Teplatesordner/ euer template / Javascript/ die general.js.php wie folgt abaändern:
ca. Zeile 19 einfügen:
<script src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/javascript/jquery-1.3.2.js"type="text/javascript"></script>
am Ende der Datei einfügen:
<script type="text/javascript">
$(function() {
$('#navigation a').stop().animate({'marginLeft':'-85px'},1000);
$('#navigation > li').hover(
function () {
$('a',$(this)).stop().animate({'marginLeft':'-2px'},200);
},
function () {
$('a',$(this)).stop().animate({'marginLeft':'-85px'},200);
}
);
});
</script>
Jetzt müsst Ihr nurnoch die Jquery-1.3.2.js in den Ordner /Teplates/ euer template / Javascript/ einfügen und das ganze sollte funktionieren.
In der Stylesheet.css kann an dieser folgender Stelle nuch background Bilder eingefügt werden.
ul#navigation .home a{
}
ul#navigation .cart a {
}
ul#navigation .account a {
}
ul#navigation .newcustomer a {
}
ul#navigation .checkout a {
}
ul#navigation .logoff a {
}
ul#navigation .login a {
}
So nun viel Spaß damit!
Gruß
Flan
Linkback: https://www.modified-shop.org/forum/index.php?topic=20393.0