progress on webpage

This commit is contained in:
2023-05-22 08:43:22 +02:00
parent e621cc7a7c
commit 7872038aaf
22 changed files with 44 additions and 81 deletions

View File

@@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>nav</title>
<link rel="stylesheet" href="/css/navstyle.css">
<meta name="robots" content="noindex">
</head>
<body>
<div id="nav-menu">
@@ -16,7 +17,6 @@
<a class="navitem inactive" id="info" href="/info">Details</a>
<a class="navitem inactive" id="examples" href="/examples">Examples</a>
<a class="navitem inactive" id="contact" href="/contact">Contact</a>
<a class="navitem inactive" id="order" href="/order">Order</a>
</div>
</div>
</div>
@@ -28,7 +28,7 @@
<script>
let offset = 0;
let menuOpen = false;
const offsetList = { 'home': 0, 'info': -200, 'examples': -400, 'contact': -600, 'order': -800 };
const offsetList = { 'home': 0, 'info': -200, 'examples': -400, 'contact': -600 };
$( document ).ready( function () {
if ( sessionStorage.getItem( 'menuOpen' ) == 'true' ) {
$( '#nav-menu' ).hide( 700 );
@@ -58,10 +58,8 @@
$( '#nav-menu' ).css( 'background-position', `${200 + offset}px` );
} else if ( obj == 'examples' ) {
$( '#nav-menu' ).css( 'background-position', `${400 + offset}px` );
} else if ( obj == 'contact' ) {
} else if ( obj == 'contact' ) {
$( '#nav-menu' ).css( 'background-position', `${600 + offset}px` );
} else if ( obj == 'order' ) {
$( '#nav-menu' ).css( 'background-position', `${800 + offset}px` );
}
} )
$( '.inactive' ).mouseleave ( function () {