diff --git a/_dt/css/main.css b/_dt/css/main.css index 78c4c3d..d08fcb8 100644 --- a/_dt/css/main.css +++ b/_dt/css/main.css @@ -21,6 +21,23 @@ GNU General Public License for more details. background: rgba(62, 62, 62, 0.62); } +::-webkit-scrollbar { + width: 4px; + height: 4px; +} + +::-webkit-scrollbar-track { + background: transparent; +} + +::-webkit-scrollbar-thumb { + background: #d43539; +} + +.scrollable::-webkit-scrollbar-thumb { + background: rgba(0, 0, 0, 0.2); +} + a, button { -o-transition:.5s; @@ -34,7 +51,8 @@ a { color: #c11f23; } -a:hover { +a:hover, +a:focus { color: #781316; text-decoration: none; } @@ -56,14 +74,14 @@ body { font-size: 12px; background-color: #edecec; margin-bottom: 50px; + width: 100%; + height: 100%; + margin-bottom: 0; } .main-body { padding: 0; -} - -.main-body.pad120 { - padding: 0; + background-color: #edecec; } .always-bar { @@ -78,7 +96,7 @@ body { /******** NavBar estilos *********/ /*********************************/ .navbar-evenge i { - font-size: 2em; + font-size: 1.7em; } .navbar-evenge a { @@ -91,8 +109,7 @@ body { .navbar-evenge { z-index: 10; - height: 50px; - padding: 0; + padding: 0 5px; width: 100%; top: 0; background-color: #C11F23; @@ -130,12 +147,14 @@ body { } #menu-bottom { - margin-top: -1px; - padding: 0 10px 0 7px; + margin: 0px; + padding: 0 15px; background: none; border: none; border-radius: 0; color: #fff; + line-height: 50px; + height: 50px; } #menu-bottom:hover, @@ -175,6 +194,7 @@ body { .navbar-evenge .navbar-nav li a.nav-li i { line-height: 50px; + font-size: 1.3em; } .navbar-evenge .navbar-nav li:focus { @@ -189,23 +209,13 @@ body { .navbar-evenge .navbar-nav .dropdown .dropdown-menu { background: white; - right: 0; + right: 2px; + top: 45px; left: auto; min-width: 260px; text-align: center; border-radius: 0; -} - -.navbar-evenge .dropdown-menu:before { - content: ''; - display: inline-block; - border-left: 7px solid transparent; - border-right: 7px solid transparent; - border-bottom: 7px solid #fff; - border-bottom-color: #ffffff; - position: absolute; - top: -7px; - right: 18px; + box-shadow: 0 2px 10px rgba(0,0,0,.2) } .navbar-evenge .navbar-nav .dropdown .dropdown-menu a { @@ -248,6 +258,72 @@ body { #buscadorHeader::-moz-placeholder { color: fff; } #buscadorHeader::-moz-placeholder { color: fff; } +/************** advanced options *****************/ +.advanced-options { + background: #fff; + padding: 20px 100px; + display: none; +} + +.advanced-options .adv { + list-style: none; +} + +.advanced-options .adv li a { + color: #d44549; + font-size: 1.08em; + padding: 5px 0; +} + +.advanced-options .adv .adv-h1 { + padding: 5px 0; + margin: 0; + color: #898989; + font-size: 12px; +} + +.advanced-options-bottom { + color: #898989; + font-size: 13px; + position: absolute; + padding: 0; + margin: 0; + top: 8px; + right: 20px; +} + +.advanced-options-bottom:hover, +.advanced-options-bottom:focus { + color: #898989; +} + +.advanced-options-bottom img { + height: 25px; + opacity: 0.5; + filter: alpha(opacity=50); +} + +.adv .input-group { + padding: 5px 0; +} + +.adv .input-group .input-group-addon { + border: 1px solid #d44549; + border-right: none; + background: white; + color: #d44549; +} + +.adv .input-group .form-control { + border: 1px solid #d44549; + border-left: none; +} + +.adv .input-group .form-control:focus { + box-shadow: none; + border-color: #c11f23; +} + /*************************************************/ /************** template Ponentes ****************/ /*************************************************/ @@ -263,29 +339,49 @@ body { /*************************************************/ /*************** menu estilos ********************/ /*************************************************/ -#menu-div { - /*display: none;*/ -} - -.menu-content { +#menuM { position: fixed; + left: 0; top: 0; bottom: 0; - left: 0; - z-index: 1000; - display: block; + right: 0; + z-index: 0; + width: 256px; + overflow: hidden; + -webkit-overflow-scrolling: touch; + display: none; padding: 0; - width: 0; - min-height: 100%; - overflow-x: hidden; +} + +.scrollable { overflow-y: auto; + height: 100%; +} + +#panel { + position: relative; + z-index: 1; + min-height: 100vh; +} + +.menu-open, +.menu-open body, +.menu-open #panel { + overflow: hidden; +} + +.menu-open #menuM { + display: block; +} + +.menu-content { background-color: #c11f23; } .menu-content .menu-title { width: 100%; height: 50px; - background: #aa1b1f; + border-right: 1px solid #aa1b1f; } .menu-content .menu-title h1 { @@ -299,38 +395,32 @@ body { } .menu-content .menu-user { - width: 100%; - padding-top: 10px; - border-bottom: 1px solid #ae1c20; + padding: 15px 0; + background: #ae1c20; } .menu-content .menu-user .gravatar { - width: 80px; - height: 80px; - background: #d43539; - margin-left: auto; - margin-right: auto; - border-radius: 100px; - line-height: 95px; - text-align: center; + height: 95%; + width: 95%; + padding: 0; } -.menu-content .menu-user .gravatar h1 { - padding: 0; - margin: 0; - display: inline-block; - font-size: 2.3em; - color: #fff; +.menu-content .menu-user .gravatar img { + max-width: 100%; + max-height: 100%; + border-radius: 100px; + display: block; + margin-left: auto; + margin-right: auto; } .menu-content .menu-user h1 { padding: 0; margin: 0; color: #fff; - text-align: center; - font-size: 1.2em; + font-size: 1em; font-weight: bold; - padding: 10px 0; + padding: 5px 0; } .menu-content .menu-user h1 a { @@ -398,11 +488,26 @@ body { margin-top: 3px; } +.menu-content .menu .title-menu { + padding: 10px; + margin: 0; + font-size: 10px; + color: rgba(255, 255, 255, 0.5); +} + .divisor { - width: 80%; padding-top: 10px; - border-top: 1px solid #b2b2b2; - margin-left: 20px; + width: 100%; + border-top: 4px solid #ae1c20; +} + +.menu { + padding: 0; + overflow-y: auto; +} + +.menu-user .name { + padding: 0; } /*************************************************/ @@ -415,14 +520,13 @@ body { .individual-menu-cont { padding: 0; margin: 0; + background-color: white; + border-bottom: 1px solid #ccc; } .individual-menu { width: 100%; display: block; - height: 40px; - background-color: white; - border-bottom: 1px solid #ccc; text-align: center; } @@ -586,3 +690,66 @@ form .btn-form:focus { .consejos ul li { margin-bottom: 5px; } + +/* notifications panel */ +.noti-drop { + padding: 0; +} + +.noti-drop .noti-title { + border-bottom: 1px solid #e1e1e1; +} + +.noti-drop .noti-title h1 { + padding: 10px; + margin: 0; + color: #262626; + font-size: 1.1em; +} + +.noti-drop ul { + padding: 0; +} + +.noti-drop .notificacion { + +} + +.noti-drop .notificacion p, +.noti-drop .notificacion i { + font-size: 14px; +} + +.noti-drop .notificacion p { + color: #888888; + padding: 20px 0; + margin: 0; +} + +.noti-drop .clear-all { + border-top: 1px solid #f7f7f7; + color: #e1e1e1; + height: 30px; + margin: 0; + padding: 0; +} + +.noti-drop .clear-all a { + font-size: 10px; + text-align: center; + margin: 0; + padding: 0; + line-height: 30px; +} + +.notifications-content .notifications li a:after { + content: ""; + display: block; + width: 80%; + margin-left: auto; + margin-right: auto; + height: 1px; + background: rgba(212, 53, 57, 0.49); + position: absolute; + bottom: 0; +} diff --git a/_dt/img/advanced_icon.png b/_dt/img/advanced_icon.png new file mode 100644 index 0000000..4367e61 Binary files /dev/null and b/_dt/img/advanced_icon.png differ diff --git a/_dt/js/general.js b/_dt/js/general.js index aacc88b..10516d7 100644 --- a/_dt/js/general.js +++ b/_dt/js/general.js @@ -15,40 +15,84 @@ /*jslint browser: true*/ /*global $, jQuery, alert*/ -jQuery.validator.addMethod("twitter", function(value, element) { +//variable para obtener el prefijo del navegador +var prefix = (function prefix() { + var regex = /^(Webkit|Khtml|Moz|ms|O)(?=[A-Z])/; + var styleDeclaration = document.getElementsByTagName('script')[0].style; + for (var prop in styleDeclaration) { + if (regex.test(prop)) { + return '-' + prop.match(regex)[0].toLowerCase() + '-'; + } + } + // Nothing found so far? Webkit does not enumerate over the CSS properties of the style object. + // However (prop in style) returns the correct value, so we'll have to test for + // the precence of a specific property + if ('WebkitOpacity' in styleDeclaration) { return '-webkit-'; } + if ('KhtmlOpacity' in styleDeclaration) { return '-khtml-'; } + return ''; +}()); + +//inicializamos las opciones del menu +var _menu = document.getElementById('menuM'), + _panel = document.getElementById('panel'), + _opened = false, + _duration = 300; + +//inicializamos variables opciones avanzadas +var _openedA = false; + +jQuery.validator.addMethod("twitter", function (value, element) { return this.optional(element) || /@([A-Za-z0-9_])+/.test(value); }, "No es una cuenta de twitter correcta"); -jQuery.validator.addMethod("web", function(value, element) { +jQuery.validator.addMethod("web", function (value, element) { return this.optional(element) || /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \?=.-]*)*\/?$/.test(value); }, "No es una web correcta"); -jQuery.validator.addMethod("telefono", function(value, element) { +jQuery.validator.addMethod("telefono", function (value, element) { return this.optional(element) || /^((\+?34([ \t|\-])?)?[9|6|7]((\d{1}([ \t|\-])?[0-9]{3})|(\d{2}([ \t|\-])?[0-9]{2}))([ \t|\-])?[0-9]{2}([ \t|\-])?[0-9]{2})$/.test(value); }, "No es un telefono correcto"); -jQuery.validator.addMethod("mail", function(value, element) { +jQuery.validator.addMethod("mail", function (value, element) { return this.optional(element) || /^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/.test(value); }, "No es un email correcto"); +function setTransform(offset) { + _panel.style[prefix + 'transform'] = _panel.style.transform = 'translate3d('+offset+'px, 0, 0)'; +} + +function setTransition() { + _panel.style[prefix + 'transform'] = _panel.style.transition = prefix + 'transform ' +_duration+'ms ease'; +} + +function open() { + $('html').addClass( "menu-open"); + setTransition(); + _opened = true; + setTimeout( function () { + setTransform(256); + }, _duration + 50); +} + +function close() { + setTransition() + _opened = false; + setTransform(0); + setTimeout( function () { + $('html').removeClass('menu-open'); + }, _duration + 50); +} + $(document).ready(function () { 'use strict'; + $('#menu-bottom').on('click', function (evt) { - if ($(this).hasClass('active')) { - $(this).removeClass('active'); - $(function () { - $(".menu-content").animate({width: '0'}, { duration: 200, queue: false }); - $(".pad120").animate({padding: '0'}, { duration: 200, queue: false }); - }); + if ( _opened ) { + close(); } else { - $(this).addClass('active'); - $(function () { - $(".menu-content").animate({width: '220px'}, { duration: 200, queue: false }); - $(".pad120").animate({padding: '0 0 0 220px'}, { duration: 200, queue: false }); - }); + open(); } evt.preventDefault(); - evt.stopPropagation(); }); $('.menu-content .dropdown').on('show.bs.dropdown', function(e) { @@ -60,6 +104,26 @@ $(document).ready(function () { $(this).find('.dropdown-menu').first().stop(true, true).slideUp(); }); + $('.navbar-nav .dropdown').on('show.bs.dropdown', function(e) { + $(this).find('.dropdown-menu').first().stop(true, true).show('slide', {direction: 'right'}, 300); + }); + + // ADD SLIDEUP ANIMATION TO DROPDOWN // + $('.navbar-nav .dropdown').on('hide.bs.dropdown', function(e) { + $(this).find('.dropdown-menu').first().stop(true, true).hide('slide', {direction: 'right'}, 300); + }); + + $('.advanced-options-bottom').on('click', function () { + if (_openedA) { + $('.advanced-options').slideUp(); + _openedA = false; + } else { + $('.advanced-options').slideDown(); + _openedA = true; + } + }); + + }); !function (d, s, id) { diff --git a/templates/index.html b/templates/index.html index 8e0f5a8..517b341 100644 --- a/templates/index.html +++ b/templates/index.html @@ -47,66 +47,92 @@ {% if usuario %} -
-