Revert "Revert "removed old slide-in code""

This reverts commit 3e712cafe1.
main
psychobunny 10 years ago
parent 3dcd10e8bf
commit 137a24a8a6

@ -18,7 +18,7 @@
@import "posts_list";
@import "register";
@import "slide-menu";
@import "mobile";
@import "helpers";
@import "keyframes";

@ -1,50 +0,0 @@
@media (max-width: @screen-xs-max) {
#header-menu #nav-dropdown.navbar-slide-in {
width: 45%;
background: @gray-dark;
right: -45%;
min-height: 1000px;
position: fixed;
margin-top: -20px;
padding: 20px;
box-shadow: inset 2px 0px 12px black;
top: 0px;
a, a:hover, a:focus, a:active {
color: @gray-lighter;
}
> ul {
overflow: hidden;
> li {
.transition(.40s ease-in-out transform);
transform: translate3d(-50px, 0, 0);
-webkit-transform: translate3d(-50px, 0, 0);
}
border-bottom: 1px solid lighten(@gray-dark, 10%);
}
}
#header-menu .navbar-nav>.active>a,
#header-menu .navbar-nav>.active>a:focus,
#header-menu .navbar-nav>.open>a,
#header-menu .navbar-nav>.open>a:focus {
background: inherit;
}
body {
.transition(.40s ease-in-out transform);
&.slide-in {
transform: translate3d(-45%, 0, 0);
-webkit-transform: translate3d(-45%, 0, 0);
#header-menu #nav-dropdown.navbar-slide-in > ul > li {
transform: translate3d(0, 0, 0);
-webkit-transform: translate3d(0, 0, 0);
}
}
}
}

@ -3,7 +3,8 @@
/*globals ajaxify, config, utils, NProgress*/
$(document).ready(function() {
setupSlideMenu();
setupNProgress();
setupTaskbar();
setupEditedByIcon();
setupPaginator();
@ -15,50 +16,17 @@ $(document).ready(function() {
});
}
function setupSlideMenu() {
$('[data-toggle="slide-in"]').on('click', function(ev) {
$('body').toggleClass('slide-in');
if ($('body').hasClass('slide-in')) {
var top = ($('html').scrollTop() || $('body').scrollTop()) + $('header-menu').height(),
transform = 'translate3d(0, ' + top + 'px, 0)';
$('#header-menu').css({
'-webkit-transform': transform,
'-moz-transform': transform,
'-ms-transform': transform,
'-o-transform': transform,
'transform': transform
});
$('html').css('overflow-y', 'hidden');
} else {
$('body').one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend", function() {
$('#header-menu').css({
'-webkit-transform': 'none',
'-moz-transform': 'none',
'-ms-transform': 'none',
'-o-transform': 'none',
'transform': 'none'
});
$('html').css('overflow-y', '');
});
}
});
function setupNProgress() {
$(window).on('action:ajaxify.start', function() {
if ($('body').hasClass('slide-in')) {
$('.navbar-header button').click();
}
NProgress.set(0.7);
});
$(window).on('action:ajaxify.end', function() {
NProgress.done();
});
}
function setupTaskbar() {
$(window).on('filter:taskbar.push', function(ev, data) {
data.options.className = 'taskbar-' + data.module;
@ -188,6 +156,4 @@ $(document).ready(function() {
$(window).on('action:posts.loading', appendPageNumber);
}
});

@ -1,5 +1,5 @@
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="slide-in" data-target=".navbar-slide-in">
<button type="button" class="navbar-toggle">
<span class="notification-icon fa fa-fw fa-bell-o" data-content="0"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
@ -20,7 +20,7 @@
</div>
</div>
<div class="navbar-slide-in" id="nav-dropdown">
<div id="nav-dropdown">
<!-- IF !maintenanceHeader -->
<!-- IF loggedIn -->

Loading…
Cancel
Save