Skip to content
Snippets Groups Projects
Commit a1649d51 authored by Loïc Faure-Lacroix's avatar Loïc Faure-Lacroix
Browse files

Petite modification pour avoir une image par défaut

parent 7b1ee3bd
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,7 @@ include('include/header.php'); ...@@ -9,6 +9,7 @@ include('include/header.php');
?> ?>
<div id="content"> <div id="content">
<div id="main-image">&nbsp;</div>
<ul class="gallery"> <ul class="gallery">
<?php <?php
// $imageDirectory = "./img/gallery"; // $imageDirectory = "./img/gallery";
...@@ -22,7 +23,7 @@ include('include/header.php'); ...@@ -22,7 +23,7 @@ include('include/header.php');
//<li><a href="img/gallery/<?php echo $file " title="Main Window"><img src="img/gallery/thumbs/<?php echo $file " alt="Main Window"></a></li> //<li><a href="img/gallery/<?php echo $file " title="Main Window"><img src="img/gallery/thumbs/<?php echo $file " alt="Main Window"></a></li>
//php endforeach; //php endforeach;
$images = array( $images = array(
array('assistant-1.png','File menu'), array('assistant-1.png','File menu', 'state' => 'active'),
array('main-edit.png','Edit menu'), array('main-edit.png','Edit menu'),
array('main-view.png','View menu'), array('main-view.png','View menu'),
array('main-help.png','Help menu'), array('main-help.png','Help menu'),
...@@ -46,7 +47,10 @@ include('include/header.php'); ...@@ -46,7 +47,10 @@ include('include/header.php');
foreach($images as $image){ foreach($images as $image){
$fileName = $image[0]; $fileName = $image[0];
$description = $image[1]; $description = $image[1];
echo "<li><a href='img/gallery/$fileName' title='$description'><img src='img/gallery/thumbs/$fileName' alt='$description'></a></li>"; echo "<li ";
if($image['state'] != null)
echo 'class="active" > ';
echo "<a href='img/gallery/$fileName' title='$description'><img src='img/gallery/thumbs/$fileName' alt='$description'></a></li>";
} }
?> ?>
...@@ -67,7 +71,7 @@ include('include/header.php'); ...@@ -67,7 +71,7 @@ include('include/header.php');
$('ul.gallery').galleria({ $('ul.gallery').galleria({
history : true, // activates the history object for bookmarking, back-button etc. history : true, // activates the history object for bookmarking, back-button etc.
clickNext : true, // helper for making the image clickable clickNext : true, // helper for making the image clickable
insert : '#main_image', // the containing selector for our main image insert : '#main-image',
onImage : function(image,caption,thumb) { // let's add some image effects for demonstration purposes onImage : function(image,caption,thumb) { // let's add some image effects for demonstration purposes
// fade in the image & caption // fade in the image & caption
...@@ -106,8 +110,9 @@ include('include/header.php'); ...@@ -106,8 +110,9 @@ include('include/header.php');
) )
} }
}); });
});
});
//$('ul.gallery > li:first > img').click();
</script> </script>
<?php <?php
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment