1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372
|
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content=" ">
<meta name="author" content="Jean-Francois Rebaud"/>
<title>Menu viacable</title>
<!--<link rel="stylesheet" href="/js/lightbox2/css/lightbox.min.css">-->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<style>
/*==================================================================================================*/
/*============ Définitions de départ ====================*/
/*==================================================================================================*/
* {
margin: 0; /* Mettons TOUTES les marges extérieures à zéro */
padding: 0; /* Mettons TOUS les espaces intérieures à zéro */
box-sizing: border-box; /* largeur des boites= width+padding+border */
}
html, body {
height: 100%; /* Toute la hauteur de l'écran */
font-size: 100%; /* 100%=16px=1rem */
}
body {
font-family: "Times New Roman", Times, serif; /* Définition des polices de base */
font-size: 100%; /* 100%=16px=1em */
}
/*==================================================================================================*/
/*============ Définitions des éléments de la page ====================*/
/*============ PENSEZ à définir pour mobile en premier! ====================*/
/*==================================================================================================*/
#page {
position: relative; /* mettons en position relative pour les autres */
display: -webkit-flex; /* préfixe -webkit- pour chrome */
display: flex;
-webkit-flex-direction: column;
flex-direction: column;
}
/*==========================================================================================================*/
/*============ Définitions du menu de navigation navmain ====================*/
/*==========================================================================================================*/
nav#navMain {
position: relative;
width: 100vw;
height: auto;
margin: 0 auto;
padding: 0;
font-style: italic;
font-size: 90%;
}
#navMain ul {
list-style-type: none;
opacity: 0.98;
}
#navMain ul li {
position: relative;
width: 180px;
margin: 0 auto;
padding: 1px;
}
#navMain a {
height: 35px;
display: block;
padding: 5px 0;
font: bold 12px/25px Arial, Helvetica;
text-align: center;
background: linear-gradient(#3c71fc, #000026);
color: #ececec;
text-decoration: none;
}
#navMain li:hover a {
text-decoration: underline;
}
#navMain > ul > li:hover > a {
background: #001847;
color: #fff;
}
#navMain ul ul > li a {
background: #333;
color: #fff;
}
#navMain ul ul > li:hover a {
background: #7b7b7b;
}
#navMain li:hover > a {
text-decoration: underline;
}
#navMain li.hasSub > ul {
display: none;
}
/* ------------------------------- */
/* fleche, avec rotation */
#navMain .hasSub:after {
position: absolute;
content: '\25BC';
display: block;
font-size: 0.7em;
color: #fff;
top: 14px;
right: 6px;
cursor: pointer;
-webkit-transform: rotate(0deg);
-webkit-transition: -webkit-transform 0.5s;
transform: rotate(0deg);
transition: transform 0.5s;
}
#navMain .hasSub.open:after {
-webkit-transform: rotate(180deg);
-webkit-transition: -webkit-transform 0.5s;
transform: rotate(180deg);
transition: transform 0.5s;
}
/* TEST : menu full vertical */
#navMain {
max-width: 960px;
}
/*============== décoration ===============*/
#navMain > ul li {
padding: 1px 0 0 0;
}
/*==========================================================================================================*/
/* Définition pour Tablette et Desktop */
/* Tablette ---> 740px et 1024px */
/* Desktop ---> 1024px et 1600px */
/*==========================================================================================================*/
@media screen and (min-width:1024px) {
main {
margin-top: 215px;
}
#page, #page > nav#navMain {
width: 960px;
margin: 0 auto;
}
main {
margin-top: 215px;
}
nav#navMain {
width: 100%;
position: fixed;
top: 176px;
right: 0;
left: 0;
z-index: 1;
order: 0; /* on remet la navigation après le bandeau */
}
#navMain > ul {
width: 100%;
margin: 0 auto;
display: -webkit-flex;
display: flex;
justify-content: center;
}
#navMain > ul > li {
margin-left:1px;
}
#navMain ul li {
width: 160px;
}
navMain a {
}
#navMain > ul > li {
-webkit-flex: 1 1 1%;
flex: 1 1 1%;
}
#navMain > ul > li > ul {
position: absolute;
width: 100%;
z-index: 1;
}
#navMain > ul > li:last-child > ul li {
width:120px;
}
}
</style>
</head>
<body>
<div id="page">
<nav id="navMain">
<ul>
<li><a href="/index.php">Accueil</a></li>
<li><a href="#">Satellite</a>
<ul>
<li><a href="#">gratuit</a>
<ul>
<li><a href="/tntsat.php">tntsat</a></li>
<li><a href="/fransat.php">fransat</a></li>
<li><a href="/recepteursat.php">récepteur</a></li>
</ul>
</li>
<li><a href="#">Payant</a>
<ul>
<li><a href="/canalplussat.php">Canal+</a></li>
<li><a href="/canalsat.php">Canalsat</a></li>
<li><a href="/bistv.php">bis TV</a></li>
</ul>
</li>
</ul>
</li>
<!---->
<li><a href="#">Câble-Fibre</a>
<ul>
<li><a href="/numerifibre.php">Numericable</a></li>
</ul>
</li>
<!---->
<li><a href="#">TNT</a>
<ul>
<li><a href="#">Gratuite</a>
<ul>
<li><a href="/sedea150.php">Sedea 150 HD</a></li>
<li><a href="/sedea750.php">Sedea 750 HD</a></li>
</ul>
</li>
<li><a href="#">Payante</a>
<ul>
<li><a href="/canalplustnt.php">Canal+ CanalSat</a></li>
<li><a href="/minipack.php">Mini-Pack</a></li>
</ul>
</li>
</ul>
</li>
<!---->
<li><a href="#">Internet</a>
<ul>
<li><a href="/orange.php">Orange</a></li>
<li><a href="/archives/nordnet-old.php">NordNet</a></li>
<li><a href="/nordnetpro.php">NordNet pro</a></li>
</ul>
</li>
<!---->
<li><a href="#">Domotique</a>
<ul>
<li><a href="#">Casanova</a>
<ul>
<li><a href="/hvdi.php">Hvdi</a></li>
<li><a href="/hvdifibre.php">Hvdi optique</a></li>
</ul>
</li>
<li><a href="/videoprotection.php">Vidéo surveillance</a></li>
</ul>
</li>
<li><a href="#">Home Cinéma</a>
<ul>
<li><a href="#">Nos réalisations</a>
<ul>
<li><a href="/antenne.php">Antenne</a></li>
<li><a href="/realisation5.php">Rueil</a></li>
<li><a href="/realisation1.php">Salle</a></li>
<li><a href="/realisation2.php">Salon</a></li>
<li><a href="/realisation3.php">Salle</a></li>
<li><a href="/realisation4.php">Chambre</a></li>
</ul>
</li>
<li><a href="#">Son multiroom</a>
<ul>
<li><a href="/sonos.php">Sonos</a></li>
</ul>
</li>
<li><a href="/homecinefeel.php">Home Ciné feel</a></li>
</ul>
</li>
<li><a href="#">Programme</a>
<ul>
<li><a href="/video.php">Tous les programmes</a></li>
</ul>
</li>
<li><a href="#">Contact</a>
<ul>
<li><a href="/contact.php">Nous écrire</a></li>
<li><a href="/plan.php">Plan d\'accès</a></li>
</ul>
</li>
</ul>
</nav>
<main>
<section>
<article>
<div>
<a class="example-image-link" href="http://lokeshdhakar.com/projects/lightbox2/images/image-3.jpg" data-lightbox="example-set" data-title="Click the right half of the image to move forward."><img class="example-image" src="http://lokeshdhakar.com/projects/lightbox2/images/thumb-3.jpg" alt=""/></a>
<a class="example-image-link" href="http://lokeshdhakar.com/projects/lightbox2/images/image-4.jpg" data-lightbox="example-set" data-title="Or press the right arrow on your keyboard."><img class="example-image" src="http://lokeshdhakar.com/projects/lightbox2/images/thumb-4.jpg" alt="" /></a>
<a class="example-image-link" href="http://lokeshdhakar.com/projects/lightbox2/images/image-5.jpg" data-lightbox="example-set" data-title="The next image in the set is preloaded as you're viewing."><img class="example-image" src="http://lokeshdhakar.com/projects/lightbox2/images/thumb-5.jpg" alt="" /></a>
<a class="example-image-link" href="http://lokeshdhakar.com/projects/lightbox2/images/image-6.jpg" data-lightbox="example-set" data-title="Click anywhere outside the image or the X to the right to close."><img class="example-image" src="http://lokeshdhakar.com/projects/lightbox2/images/thumb-6.jpg" alt="" /></a>
</div>
</article>
</section>
</main>
</div>
<script type="text/javascript">
// JavaScript Document
// De Jreaux62
// ------------------------------------------------
// jquery.dropdown.js (depends on: jquery.hoverIntent.js)
// ------------------------------------------------
$.fn.dropdown = function(options) {
var defaults = {};
var opts = $.extend(defaults, options);
// Apply class=hasSub on those items with children
this.each(function() {
$(this)
.find("li")
.each(function() {
if ($(this).find("ul").length > 0) {
$(this).addClass("hasSub");
}
});
});
return this;
};
// ------------------------------------------------
// MENU MAIN
$(function() {
var navMainId = "#navMain";
// -------------------
// Calling the jquery dropdown
$(navMainId).dropdown();
// -------------------
//Sous-Menu ouvert par defaut
$(navMainId + " ul > li.active").addClass("open");
$(navMainId + " ul > li.active > ul").slideDown("fast");
// -------------------
// ouverture/fermeture sous-menu (click/touch)
$(navMainId + " ul > li").on("click", function(event) {
event.stopPropagation(); /* important */
$(this)
.parent()
.find("li:not(:hover)")
.removeClass("open");
$(this).toggleClass("open");
$(this)
.parent()
.find("li:not(:hover) ul")
.slideUp("fast");
if ($(this).hasClass("hasSub")) {
$(this)
.children("ul")
.slideToggle("fast");
}
});
// -------------------
// on désactive les liens des Menus AVEC Sous-Menus (obligatoire pour Tablettes TACTILES / Smartphones)
$(navMainId + " > ul > li.hasSub > a").on("click", function(event) {
event.preventDefault();
});
// -------------------
});
// ------------------------------------------------
// Scrollbar si menu plus grand que la hauteur de fenêtre
$(window).on("load resize", function() {
var navMainId = "#navMain";
// $(navMainId).height( Math.min( $(window).height(), $(navMainId).height() ) ); // A ADAPTER par rapport à la hauteur effectivement disponible : hors header, footer,....
// $(navMainId).css({ "overflow-y": "auto" });
});
// ------------------------------------------------
// ------------------------------------------------
// De NoSmoKing
// mettre un « écouteur de click » sur le document et de refermer ce qui est ouvert
$(document).on("click",function() {
$("#navMain ul > li.open")
.removeClass("open")
.children("ul")
.slideUp("fast")
});
</script>
<!--<script src="/js/lightbox2/js/lightbox-plus-jquery.min.js"></script>-->
</body>
</html> |
Partager