#links {
position: fixed;
top: 0;
- width: 9em;
+ width: 10em;
left: 0;
text-align: right;
background: #333;
}
#main {
- margin-left: 12em;
+ margin-left: 13em;
position: relative;
z-index: 10;
padding-right: 5%;
#links li:last-child {
position: fixed;
bottom: 1em;
- width: 9em;
+ width: 10em;
}
#links li:last-child a:before {
letter-spacing:-5px;
}
+.listmode .entrie {
+ width: 100%!important;
+ margin-left: 0!important;
+}
+
+.listmode .entrie p {
+ display: none;
+}
+
.list-entries + .results {
margin-bottom: 2em;
}
letter-spacing:normal;
box-shadow: 0 3px 7px rgba(0,0,0,0.3);
display: inline-block;
- width: 32%;
+ width: 32%!important;
margin-bottom: 1.5em;
vertical-align: top;
- margin-left: 1.5%;
+ margin-left: 1.5%!important;
position: relative;
overflow: hidden;
padding: 1.5em 1.5em 3em 1.5em;
}
.entrie:nth-child(3n+1) {
- margin-left: 0;
+ margin-left: 0!important;
}
.results {
display: none;
}
+#bagit-form {
+ background: rgba(0,0,0,0.8);
+ position: fixed;
+ top: 0;
+ left: 10em;
+ z-index: 20;
+ height: 100%;
+ width: 100%;
+ margin: 0;
+ padding: 2em;
+ display: none;
+}
+
+#bagit-form form {
+ background: #FFF;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ z-index: 20;
+ border: 10px solid #000;
+ width: 600px;
+ height: 300px;
+ margin: -150px 0 0 -300px;
+ padding: 2em;
+}
+
+
/* ==========================================================================
3 = Pictos
========================================================================== */
-$(document).ready(function() {
+$.fn.ready(function() {
+
+ var $listmode = $('#listmode'),
+ $listentries = $("#list-entries"),
+ $bagit = $('#bagit'),
+ $bagitForm = $('#bagit-form');
+
+ /* ==========================================================================
+ Menu
+ ========================================================================== */
$("#menu").click(function(){
$("#links").toggle();
});
+ /* ==========================================================================
+ List mode or Table Mode
+ ========================================================================== */
- $("#listmode").click(function(){
+ $listmode.click(function(){
if ( $.cookie("listmode") == 1 ) {
- $(".entrie").css("width", "");
- $(".entrie").css("margin-left", "");
-
+ // Cookie
$.removeCookie("listmode");
- $("#listmode").removeClass("tablemode");
- $("#listmode").addClass("listmode");
+
+ $listentries.removeClass("listmode");
+ $listmode.removeClass("tablemode");
+ $listmode.addClass("listmode");
}
else {
+ // Cookie
$.cookie("listmode", 1, {expires: 365});
- $(".entrie").css("width", "100%");
- $(".entrie").css("margin-left", "0");
- $("#listmode").removeClass("listmode");
- $("#listmode").addClass("tablemode");
+ $listentries.addClass("listmode");
+ $listmode.removeClass("listmode");
+ $listmode.addClass("tablemode");
}
});
+ /* ==========================================================================
+ Cookie listmode
+ ========================================================================== */
+
if ( $.cookie("listmode") == 1 ) {
- $(".entrie").css("width", "100%");
- $(".entrie").css("margin-left", "0");
- $("#listmode").removeClass("listmode");
- $("#listmode").addClass("tablemode");
+ $listentries.addClass("listmode");
+ $listmode.removeClass("listmode");
+ $listmode.addClass("tablemode");
}
+ /* ==========================================================================
+ bag it link
+ ========================================================================== */
+
+ $bagit.click(function(){
+ $bagitForm.toggle();
+ });
+
+ /* ==========================================================================
+ Keyboard gestion
+ ========================================================================== */
+
+ $(window).keydown(function(e){
+ switch (e.keyCode) {
+ // s letter
+ case 83:
+ $bagitForm.toggle();
+ break;
+ case 27:
+ $bagitForm.hide();
+ break;
+ }
+ })
+
-});
+});
\ No newline at end of file