Skip to content

bugfix -- Pisces scheme sidebar positioning error - #1261

Merged
iissnan merged 1 commit into
iissnan:masterfrom
81735595:master
Dec 2, 2016
Merged

iissnan merged 1 commit into
iissnan:masterfrom
81735595:master

Conversation

@81735595

Copy link
Copy Markdown

Use pisces scheme, when the first time open a page, if the browser window is less
than 991 px, and then adjust the browser window more than 991
px, the #sidebar margin-top error.

I add a media change event listener to fix it.

Comment thread source/js/src/schemes/pisces.js Outdated
if(e.matches){
setSidebarMarginTop(getSidebarTop())
}
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

Comment thread source/js/src/schemes/pisces.js Outdated
setSidebarMarginTop(getSidebarTop()).show()
mql.addListener(function(e){
if(e.matches){
setSidebarMarginTop(getSidebarTop())

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

Comment thread source/js/src/schemes/pisces.js Outdated
var mql = window.matchMedia("(min-width: 991px)")

$('#sidebar').css({ 'margin-top': sidebarTop }).show();
setSidebarMarginTop(getSidebarTop()).show()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

Comment thread source/js/src/schemes/pisces.js Outdated
var setSidebarMarginTop = function(sidebarTop){
return $sidebar.css({ 'margin-top': sidebarTop })
}
var mql = window.matchMedia("(min-width: 991px)")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixed double and single quotes.
Missing semicolon.

Comment thread source/js/src/schemes/pisces.js Outdated
}
var setSidebarMarginTop = function(sidebarTop){
return $sidebar.css({ 'margin-top': sidebarTop })
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

Comment thread source/js/src/schemes/pisces.js Outdated
return $headerInner.height() + 10
}
var setSidebarMarginTop = function(sidebarTop){
return $sidebar.css({ 'margin-top': sidebarTop })

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

Comment thread source/js/src/schemes/pisces.js Outdated
var $sidebar = $('#sidebar');
var getSidebarTop = function(){
return $headerInner.height() + 10
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

Comment thread source/js/src/schemes/pisces.js Outdated
var $headerInner = $('.header-inner')
var $sidebar = $('#sidebar');
var getSidebarTop = function(){
return $headerInner.height() + 10

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

Comment thread source/js/src/schemes/pisces.js Outdated
@@ -1,5 +1,18 @@
$(document).ready(function () {
var sidebarTop = $('.header-inner').height() + 10;
var $headerInner = $('.header-inner')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

Comment thread source/js/src/schemes/pisces.js Outdated
var setSidebarMarginTop = function(sidebarTop){
return $sidebar.css({ 'margin-top': sidebarTop });
};
var mql = window.matchMedia("(min-width: 991px)");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixed double and single quotes.

* When the first time open a page, if the browser window is less
than 991 px, and then adjust the browser window more than 991
px, the #sidebar margin-top error
@iissnan
iissnan merged commit b6c4161 into iissnan:master Dec 2, 2016
@iissnan

iissnan commented Dec 2, 2016

Copy link
Copy Markdown
Owner

Thanks. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants