ajout bouton afficher/cacher

This commit is contained in:
Jerome Morjon 2015-03-23 01:51:07 +01:00
parent 0d4894d709
commit 88d55f2b1c
6 changed files with 34 additions and 7 deletions

Binary file not shown.

View File

@ -14,4 +14,5 @@
<glyph unicode="&#xe604;" d="M512 864c-229.76 0-416-186.24-416-416s186.24-416 416-416 416 186.24 416 416-186.24 416-416 416zM577.248 294.944c-31.392-47.136-63.328-83.456-117.056-83.456-36.672 5.984-51.744 32.256-43.808 59.040l69.12 228.928c1.696 5.6-1.12 11.584-6.24 13.408-5.088 1.792-15.072-4.832-23.712-14.304l-41.792-50.272c-1.12 8.448-0.128 22.4-0.128 28.032 31.392 47.136 82.976 84.32 117.952 84.32 33.248-3.392 48.992-29.984 43.2-59.2l-69.6-230.048c-0.928-5.184 1.824-10.464 6.528-12.128 5.12-1.792 15.872 4.832 24.544 14.304l41.76 50.24c1.12-8.448-0.768-23.232-0.768-28.864zM567.936 593.952c-26.432 0-47.872 19.264-47.872 47.616s21.44 47.584 47.872 47.584 47.872-19.264 47.872-47.584c0-28.384-21.44-47.616-47.872-47.616z" />
<glyph unicode="&#xe984;" d="M1024 576h-384l143.53 143.53c-72.53 72.526-168.96 112.47-271.53 112.47s-199-39.944-271.53-112.47c-72.526-72.53-112.47-168.96-112.47-271.53s39.944-199 112.47-271.53c72.53-72.526 168.96-112.47 271.53-112.47s199 39.944 271.528 112.472c6.056 6.054 11.86 12.292 17.456 18.668l96.32-84.282c-93.846-107.166-231.664-174.858-385.304-174.858-282.77 0-512 229.23-512 512s229.23 512 512 512c141.386 0 269.368-57.326 362.016-149.984l149.984 149.984v-384z" />
<glyph unicode="&#xe986;" d="M992.262 88.604l-242.552 206.294c-25.074 22.566-51.89 32.926-73.552 31.926 57.256 67.068 91.842 154.078 91.842 249.176 0 212.078-171.922 384-384 384-212.076 0-384-171.922-384-384s171.922-384 384-384c95.098 0 182.108 34.586 249.176 91.844-1-21.662 9.36-48.478 31.926-73.552l206.294-242.552c35.322-39.246 93.022-42.554 128.22-7.356s31.892 92.898-7.354 128.22zM384 320c-141.384 0-256 114.616-256 256s114.616 256 256 256 256-114.616 256-256-114.614-256-256-256z" />
<glyph unicode="&#xea0f;" d="M1014.662 137.34c-0.004 0.004-0.008 0.008-0.012 0.010l-310.644 310.65 310.644 310.65c0.004 0.004 0.008 0.006 0.012 0.010 3.344 3.346 5.762 7.254 7.312 11.416 4.246 11.376 1.824 24.682-7.324 33.83l-146.746 146.746c-9.148 9.146-22.45 11.566-33.828 7.32-4.16-1.55-8.070-3.968-11.418-7.31 0-0.004-0.004-0.006-0.008-0.010l-310.648-310.652-310.648 310.65c-0.004 0.004-0.006 0.006-0.010 0.010-3.346 3.342-7.254 5.76-11.414 7.31-11.38 4.248-24.682 1.826-33.83-7.32l-146.748-146.748c-9.148-9.148-11.568-22.452-7.322-33.828 1.552-4.16 3.97-8.072 7.312-11.416 0.004-0.002 0.006-0.006 0.010-0.010l310.65-310.648-310.65-310.652c-0.002-0.004-0.006-0.006-0.008-0.010-3.342-3.346-5.76-7.254-7.314-11.414-4.248-11.376-1.826-24.682 7.322-33.83l146.748-146.746c9.15-9.148 22.452-11.568 33.83-7.322 4.16 1.552 8.070 3.97 11.416 7.312 0.002 0.004 0.006 0.006 0.010 0.010l310.648 310.65 310.648-310.65c0.004-0.002 0.008-0.006 0.012-0.008 3.348-3.344 7.254-5.762 11.414-7.314 11.378-4.246 24.684-1.826 33.828 7.322l146.746 146.748c9.148 9.148 11.57 22.454 7.324 33.83-1.552 4.16-3.97 8.068-7.314 11.414z" />
</font></defs></svg>

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Binary file not shown.

View File

@ -1,10 +1,10 @@
@font-face {
font-family: 'icomoon';
src:url('icomoon.eot?-68zv75');
src:url('icomoon.eot?#iefix-68zv75') format('embedded-opentype'),
url('icomoon.woff?-68zv75') format('woff'),
url('icomoon.ttf?-68zv75') format('truetype'),
url('icomoon.svg?-68zv75#icomoon') format('svg');
src:url('icomoon.eot?-72yuc9');
src:url('icomoon.eot?#iefix-72yuc9') format('embedded-opentype'),
url('icomoon.woff?-72yuc9') format('woff'),
url('icomoon.ttf?-72yuc9') format('truetype'),
url('icomoon.svg?-72yuc9#icomoon') format('svg');
font-weight: normal;
font-style: normal;
}
@ -51,3 +51,7 @@
content: "\e984";
}
.icon-cross:before {
content: "\ea0f";
}

View File

@ -2,14 +2,16 @@
@section('content')
@if ($referents != [])
<div style="text-align:center;background-color: #fcfc6b; padding:10px; margin:auto;font-size:18px;">
<div id="infoHome" style="text-align:center;background-color: #fcfc6b; padding:10px; margin:auto;font-size:18px; display:block;">
<a href="#" onClick="cache();"><span class="icon-cross"></span></a>
<h1 class="homeTitle">Les jeux du Musée des Augustins</h1>
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>
<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>
Si vous n'avez pas de référent, vous pouvez toujours <span style="color:#37378e;">cliquer ici pour jouer aux jeux</span>, sinon cliquez sur leur image.
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>
<a href="#" onClick="cache();"><span id="txt_show" style="display:none;">Afficher</span></a>
<nav>
<input name="searchterm" class="icon-search" id="searchterm" placeholder="&#xe986; Rechercher un référent" type="text">
</nav>
@ -50,4 +52,24 @@
});
</script>
<script>
function cache() {
var txt = document.getElementById('infoHome');
var span = document.getElementById('txt_show');
if (txt.style.display == "block")
{
//si le texte est afficher on cache le txt et on affiche le span cache
span.style.display = "block";
txt.style.display = "none";
}
else
{
//sinon on affiche le texte et on cache le span
span.style.display = "none";
txt.style.display = "block";
}
}
</script>
@endsection