-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes and enhancements. [13] #1898
Conversation
getContentVisibilityHeight: function () { | ||
var docHeight = $('#content').height(), | ||
winHeight = $(window).height(), | ||
contentVisibilityHeight = (docHeight > winHeight) ? (docHeight - winHeight) : ($(document).height() - winHeight); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
Scrolling to center active TOC element if TOC content is taller then viewport.
@@ -17,6 +17,9 @@ $(document).ready(function () { | |||
|
|||
removeCurrentActiveClass(); | |||
$currentActiveElement.addClass('active-current'); | |||
|
|||
// Scrolling to center active TOC element if TOC content is taller then viewport. | |||
$tocElement.scrollTop($currentActiveElement.offset().top - $tocElement.offset().top + $tocElement.scrollTop() - ($tocElement.height() / 2)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
source/js/src/schemes/pisces.js
Outdated
$('.sidebar-inner').affix({ | ||
offset: { | ||
top: headerOffset - CONFIG.sidebar.offset, | ||
bottom: footerOffset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'footerOffset' is not defined.
source/js/src/schemes/pisces.js
Outdated
|
||
footerInner = $('.footer-inner'), | ||
footerMargin = footerInner.outerHeight(true) - footerInner.outerHeight(), | ||
footerOffset = footerInner.outerHeight(true) + footerMargin; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'footerInner' is not defined.
'footerMargin' is not defined.
'footerOffset' is not defined.
source/js/src/schemes/pisces.js
Outdated
headerOffset = (headerHeight + CONFIG.sidebar.offset) | ||
|
||
footerInner = $('.footer-inner'), | ||
footerMargin = footerInner.outerHeight(true) - footerInner.outerHeight(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'footerInner' is not defined.
'footerMargin' is not defined.
source/js/src/schemes/pisces.js
Outdated
var headerHeight = $('.header-inner').height(), | ||
headerOffset = (headerHeight + CONFIG.sidebar.offset) | ||
|
||
footerInner = $('.footer-inner'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'footerInner' is not defined.
source/js/src/schemes/pisces.js
Outdated
|
||
function initAffix () { | ||
var headerHeight = $('.header-inner').height(), | ||
headerOffset = (headerHeight + CONFIG.sidebar.offset) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
Fix for changing TOC dimensions at window resize.
Add `resizeListener()` to sidebar.
source/js/src/schemes/pisces.js
Outdated
|
||
function recalculateAffixPosition () { | ||
$(window).off('.affix') | ||
sidebarInner.removeData('bs.affix').removeClass('affix affix-top affix-bottom') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
source/js/src/schemes/pisces.js
Outdated
} | ||
|
||
function recalculateAffixPosition () { | ||
$(window).off('.affix') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
source/js/src/schemes/pisces.js
Outdated
} | ||
|
||
function resizeListener () { | ||
var mql = window.matchMedia('(min-width: 991px)') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
Not affix if sidebar taller then content (to prevent bottom jumping).
1. Replace display style for sidebar top alignment with margin-left. 2. Add motion for sidebar in Pisces | Gemini.
Add `post_block` motion effects on `.pagination` and `.comments` [2].
1. Add `post_block` motion effects on `.pagination` and `.comments` [3]. 2. Add motion for sidebar in Pisces | Gemini [2].
1. NexT logo (SVG, 512x512). 2. Apple icon (PNG, 180x180). 3. Favicon (PNG, 32x32). 4. Favicon (PNG, 16x16).
Remove excess margin for better economy in all schemes.
Note to remember `$border-radius` values.
1. Changed `margin-bottom` on `margin-top` in main blocks offsets & add siblings metod to detect blocks with offsets. 2. Rewrited shadows in all blocks with offsets & added forgotten borders. 3. Removed unused (commented) values.
Used `.post-body` to filter `<h>` tags & refactored fonts sizes.
PART 1. Some small fixes & refactorings.
Files modified:
getContentHeight()
to variable. 028fe60MOD: rename
getContentHeight()
togetContentVisibilityHeight()
. 61086aamotion
on Mist & Muse schemes. 9ce276fGlobal code changes:
getContentVisibilityHeight()
inutils.js
.What's this?
#content
visible height in js from anywhere.Before:
After:
PART 2. Sidebar scrollable in all schemes.
Issue Number(s): #1888.
Files modified:
Global code changes:
initAffix()
frompost-details.js
topisces.js
(to affix sidebar in Pisces | Gemini only).Remove unneeded anymore
needAffix()
fromutils.js
.resizeListener()
inpisces.js
.getSidebarSchemePadding()
inutils.js
..site-overview-wrap
style in globalsidebar.styl
.offset_float
from NexT_config.yml
.initTOCDimension()
frompost-details.js
toutils.js
(for init not only TOC, but Sidebar dimensions too).Rename
initTOCDimension()
intoinitSidebarDimension
.getSidebarb2tHeight()
inutils.js
.How it looks?
Live demo here.
How to use?
In Next
_config.yml
:PART 3. Enhancements for Gemini scheme.
Some fixes and enhancements in Gemini scheme styles.
Pull Number(s): #1697 (PART 9. Add Gemini scheme).
Files modified:
Global code changes:
source/css/_variables/base.styl
:$content-tablet-paddin = 10px
$content-mobile-padding = 8px
source/css/_schemes/Gemini/index.styl
:line-height
for syncronize post titles in homepage and posts.border-bottom
on H2-H3 / H3-H4 (ifseo
) headers like on Github.em
values » autoadaptive for all resolutions.mobile_style_economy
option (may be used in schemes).margin-bottom
onmargin-top
in main blocks offsets & add siblings metod to detect blocks with offsets..post-body
to filter<h>
tags & refactored fonts sizes.source/css/_common/scaffolding/mobile.styl
:+mobile()
section to Geminiindex.styl
..post-block
with main margins & paddings..post-nav
(wich actually need to remake into flex style).How it looks?
Live demo here.
How to use?
In Next
_config.yml
:PART 4. Responsive favicons options.
For now can set all of possible favicons wich geted by various devices.
Files modified:
How it looks?
Live demo here.
How to use?
To get favicons visit: https://realfavicongenerator.net
In Next
_config.yml
:Old configuration:
New configuration:
PART 5. Post custom copyright feature.
Added custom copyright on any post u want. If no custom
author
/url
specified, will be used default values (config.author
/post.permalink
).Issue Number(s): #1843, #1767, #1463, #1036.
Files modified:
How it looks?
Live demo here.
How to use?
In Next
_config.yml
:In
*.md
file: