Skip to content

Commit

Permalink
Fix known issues (#1213)
Browse files Browse the repository at this point in the history
  • Loading branch information
1v9 authored and stevenjoezhang committed Oct 19, 2019
1 parent 32e9348 commit 3d485d8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 7 additions & 3 deletions layout/_partials/sidebar/site-overview.swig
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,15 @@
{%- for name, link in theme.social %}
<span class="links-of-author-item">
{%- set sidebarURL = link.split('||')[0] | trim %}
{%- if not (theme.social_icons.enable) or (not theme.social_icons.icons_only) %}
{%- set sidebarText = name %}
{%- endif %}
{%- if theme.social_icons.enable %}
{%- set sidebarIcon = '<i class="fa fa-fw fa-' + link.split('||')[1] | trim + '"></i>' %}
{%- else %}
{%- set sidebarIcon = '' %}
{%- endif %}
{%- if theme.social_icons.enable and theme.social_icons.icons_only %}
{%- set sidebarText = '' %}
{%- else %}
{%- set sidebarText = name %}
{%- endif %}
{{ next_url(sidebarURL, sidebarIcon + sidebarText, {title: name + ' &rarr; ' + sidebarURL}) }}
</span>
Expand Down
6 changes: 4 additions & 2 deletions source/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ NexT.utils = {
index = sections.indexOf(entry.target);
return index === 0 ? 0 : index - 1;
}
for (;index < entries.length; index++) {
for (; index < entries.length; index++) {
if (entries[index].boundingClientRect.top <= 0) {
entry = entries[index];
} else {
Expand All @@ -301,7 +301,9 @@ NexT.utils = {
rootMargin: marginTop + 'px 0px -100% 0px',
threshold : 0
});
sections.forEach(item => intersectionObserver.observe(item));
sections.forEach(item => {
item && intersectionObserver.observe(item);
});
}
createIntersectionObserver(document.documentElement.scrollHeight);
},
Expand Down

0 comments on commit 3d485d8

Please sign in to comment.