2015-03-14 14:36:03 +01:00
@ extends ( 'frontend/template' )
@ section ( 'content' )
@ if ( $referents != [])
2015-03-24 12:22:49 +01:00
< div id = " infoHome " style = " @if( $cookie == 'open')display: none @endif;text-align:center;background-color: #fcfc6b; padding:10px; margin:auto;font-size:18px; " >
2015-03-23 15:27:01 +01:00
< a href = " # " onClick = " cache(); " style = " float:right; text-decoration:none; color:red; " >< span class = " icon-cross " ></ span ></ a >
2015-03-17 17:21:37 +01:00
< h1 class = " homeTitle " > Les jeux du Musée des Augustins </ h1 >
2015-03-17 19:24:29 +01:00
L 'objectif de ce site est de permettre aux enfants de jouer à des jeux tout en leur apportant de l' intérêt pour les différentes oeuvres d ' art exposées dans le fameux musée toulousain .< br >
2015-03-17 19:35:31 +01:00
< span style = " color:red; " > Lorsque vous aurez choisit un référent , il faudra appuyer pendant 3 secondes sur l ' icone de votre référent afin de revenir sur cette page .</ span >< br >
2015-03-24 12:22:49 +01:00
Si vous n ' avez pas de référent , vous pouvez toujours < span style = " color:#37378e; " >< a href = " / " > cliquer ici pour jouer aux jeux </ a ></ span > , sinon cliquez sur leur image .
</ div >
< div id = " txt_show " style = " @if( $cookie == 'close')display: none; @endif text-align:center;background-color: #fcfc6b; padding:10px; margin:auto;font-size:18px; " >
< a href = " # " style = " text-align:center;background-color: #fcfc6b; padding:10px; margin:auto;font-size:18px; " onClick = " cache(); " > À Propos </ a >
2015-03-17 17:21:37 +01:00
</ div >
2015-03-14 14:36:03 +01:00
< nav >
2015-03-17 11:40:24 +01:00
< input name = " searchterm " class = " icon-search " id = " searchterm " placeholder = "  Rechercher un référent " type = " text " >
</ nav >
2015-03-14 14:36:03 +01:00
< div id = " referents " class = " referents " >
@ foreach ( $referents as $referent )
< div class = " referent "
onclick = 'location.href = "{{ URL::to(' changerref ', $referent->id) }}";'
2015-03-23 13:21:37 +01:00
style = " background-image:url(' { { URL::to('/') }}/ { { $referent -> image }}') " >
2015-03-14 14:36:03 +01:00
< div class = " infos " > {{ $referent -> prenom }} {{ $referent -> nom }} </ div >
</ div >
@ endforeach
</ div >
@ else
< h1 > Aucun référent trouvé </ h1 >
@ endif
@ endsection
2015-03-17 11:40:24 +01:00
@ section ( 'page-css' )
2015-03-23 13:21:37 +01:00
< link href = " { { URL::to('css/fonts/style.css')}} " rel = " stylesheet " type = " text/css " >
2015-03-17 11:40:24 +01:00
@ endsection
2015-03-14 14:36:03 +01:00
@ section ( 'page-scripts' )
< script src = " //cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js " ></ script >
< script type = " text/javascript " >
$ ( " #searchterm " ) . on ( 'input' , function ( e ){
var q = $ ( " #searchterm " ) . val ();
2015-03-23 13:21:37 +01:00
var url = ( q == " " ) ? '{{URL::to(' api / searchRef ')}}' : '{{URL::to(' api / searchRef ')}}/' + q ;
2015-03-14 14:36:03 +01:00
$ . getJSON ( url , function ( data ) {
$ ( " #referents " ) . empty ();
$ . each ( data , function ( i , item ){
2015-03-23 13:21:37 +01:00
$ ( " #referents " ) . append ( '<div class="referent" onclick=\'location.href = "{{ URL::to(' changerref ') }}/' + item . id + '"\' style="background-image:url(\'{{ URL::to(' / ') }}/' + item . image + '\')"><div class="infos">' + item . prenom + " " + item . nom + '</div></div>' );
2015-03-14 14:36:03 +01:00
});
});
});
</ script >
2015-03-23 01:51:07 +01:00
< script >
2015-03-24 12:22:49 +01:00
2015-03-23 01:51:07 +01:00
function cache () {
2015-03-24 12:22:49 +01:00
$ . get ( " toogleInfoBar " , function () {});
// Toogle
$ ( '#infoHome' ) . toggle ( 'display' );
$ ( '#txt_show' ) . toggle ( 'display' );
2015-03-23 01:51:07 +01:00
}
</ script >
2015-03-14 14:36:03 +01:00
@ endsection