Skip to content
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

[docs] Sticky Navigation #314

Closed

Conversation

adekunleoduye
Copy link
Member

@adekunleoduye adekunleoduye commented Mar 28, 2019

Summary:
Documentation nav becomes sticky when user scrolls down the page.

Screenshot:
15126189ffbfee2d47a0ce7b259d557e

To dos:

  • Removes inline styles from sass.js and put them into a sass files
  • abstract function out of sass.js into documentation.js
  • Give background color to nav
  • Add shim to content when nav is sticky

Closes #268

);
}),
(a.fn.smoothScroll.defaults = c);
});

Choose a reason for hiding this comment

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

Expected an assignment or function call and instead saw an expression.

.replace(/\/$/, "")
);
}),
(a.fn.smoothScroll.defaults = c);

Choose a reason for hiding this comment

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

Expected an assignment or function call and instead saw an expression.

}
}),
e.step && (q.step = e.step),
h.length ? h.stop().animate(p, q) : g(e);

Choose a reason for hiding this comment

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

Expected an assignment or function call and instead saw an expression.

: (h = a("html, body").firstScrollable(e.direction)),
e.beforeScroll.call(h, e),
(l = k.px
? k

Choose a reason for hiding this comment

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

Misleading line break before '?'; readers may interpret this as an expression boundary.

d && (k = f(d))),
(o = "left" === e.direction ? "scrollLeft" : o),
e.scrollElement
? ((h = e.scrollElement),

Choose a reason for hiding this comment

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

Misleading line break before '?'; readers may interpret this as an expression boundary.

) {
for (; l && j < h.length; ) f.is(c(h[j++])) && (l = !1);
for (; l && k < i.length; ) f.closest(i[k++]).length && (l = !1);
} else l = !1;

Choose a reason for hiding this comment

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

Expected '{' and instead saw 'l'.

(r && !a(r).length && (l = !1), g.scrollTarget || (p && q && r))
) {
for (; l && j < h.length; ) f.is(c(h[j++])) && (l = !1);
for (; l && k < i.length; ) f.closest(i[k++]).length && (l = !1);

Choose a reason for hiding this comment

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

Expected '{' and instead saw 'f'.
Expected an assignment or function call and instead saw an expression.

if (
(r && !a(r).length && (l = !1), g.scrollTarget || (p && q && r))
) {
for (; l && j < h.length; ) f.is(c(h[j++])) && (l = !1);

Choose a reason for hiding this comment

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

Expected '{' and instead saw 'f'.
Expected an assignment or function call and instead saw an expression.

smoothScroll: function(b, c) {
if ("options" === (b = b || {}))
return c
? this.each(function() {

Choose a reason for hiding this comment

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

Misleading line break before '?'; readers may interpret this as an expression boundary.

},
smoothScroll: function(b, c) {
if ("options" === (b = b || {}))
return c

Choose a reason for hiding this comment

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

Expected '{' and instead saw 'return'.

@jina
Copy link
Member

jina commented Mar 28, 2019

It looks like the content jumps to the left, assuming because the nav is pulled out of the flow. Perhaps a shim of some sort in its place so that the content doesn't shift over?

@adekunleoduye
Copy link
Member Author

@jina That sounds good to me. I'll added that to the todo list and update that PR.

@nex3
Copy link
Contributor

nex3 commented Mar 28, 2019

When I load this up and go to /documentation, when I scroll down far enough it just jumps back to the top of the page in a very jarring way.

When I go to /documentation/syntax/structure and scroll down, the page nav starts overlapping with the global nav:

nav

Are there plans for making the top-level nav sections expandable? What about for making page-level navs sticky?

I think it may be cleaner to just have the scrollbar present all the time, rather than flashing into existence once the user scrolls down far enough.

@nex3 nex3 force-pushed the wip.reference branch 3 times, most recently from ea9b6ed to b1ee5c8 Compare April 23, 2019 16:47
Gemfile Outdated
@@ -1,5 +1,5 @@
source "https://rubygems.org"
ruby "2.5.3"
ruby "2.5.1"
Copy link

Choose a reason for hiding this comment

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

Is there a good reason for why the ruby "2.5.3" version was replaced with an older ruby "2.5.1" version?

Copy link
Member Author

Choose a reason for hiding this comment

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

No specific reason, I was having trouble installing ruby "2.5.3"

this === document.documentElement &&
"smooth" === a(this).css("scrollBehavior") &&
(c = [this]),
c.length || "BODY" !== this.nodeName || (c = [this]);

Choose a reason for hiding this comment

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

Expected an assignment or function call and instead saw an expression.

return !document.scrollingElement ||
(this !== document.documentElement && this !== document.body)
? void (b[e]() > 0
? c.push(this)

Choose a reason for hiding this comment

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

Misleading line break before '?'; readers may interpret this as an expression boundary.

if (this !== document && this !== window)
return !document.scrollingElement ||
(this !== document.documentElement && this !== document.body)
? void (b[e]() > 0

Choose a reason for hiding this comment

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

Misleading line break before '?'; readers may interpret this as an expression boundary.

this.each(function() {
var b = a(this);
if (this !== document && this !== window)
return !document.scrollingElement ||

Choose a reason for hiding this comment

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

Expected '{' and instead saw 'return'.

? define(["jquery"], a)
: a(
"object" == typeof module && module.exports ? require("jquery") : jQuery
);

Choose a reason for hiding this comment

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

Expected an assignment or function call and instead saw an expression.

"function" == typeof define && define.amd
? define(["jquery"], a)
: a(
"object" == typeof module && module.exports ? require("jquery") : jQuery

Choose a reason for hiding this comment

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

'require' is not defined.

@@ -5,22 +5,209 @@
* Licensed MIT
*/

!(function(a) {
"function" == typeof define && define.amd
? define(["jquery"], a)

Choose a reason for hiding this comment

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

'define' is not defined.
Misleading line break before '?'; readers may interpret this as an expression boundary.

@@ -5,22 +5,209 @@
* Licensed MIT
*/

!(function(a) {
"function" == typeof define && define.amd

Choose a reason for hiding this comment

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

'define' is not defined.

@adekunleoduye
Copy link
Member Author

Since this PR is stale, I'm going to close it and open a new one.

@adekunleoduye adekunleoduye deleted the feat/stickyDocNav branch September 30, 2019 11:18
Friendly-users added a commit to Friendly-users/sass-site that referenced this pull request Jun 27, 2024
-----
It is inappropriate to include political and offensive content in public code repositories.

Public code repositories should be neutral spaces for collaboration and community, free from personal or political views that could alienate or discriminate against others. Political content, especially that which targets or disparages minority groups, can be harmful and divisive. It can make people feel unwelcome and unsafe, and it can create a hostile work environment.

Please refrain from adding such content to public code repositories.
---

 sass#300 sass#301 sass#302 sass#303 sass#304 sass#305 sass#306 sass#307 sass#308 sass#309 sass#310 sass#311 sass#312 sass#313 sass#314 sass#315 sass#316 sass#317 sass#318 sass#319 sass#320 sass#321 sass#322 sass#323 sass#324 sass#325 sass#326 sass#327 sass#328 sass#329 sass#330 sass#331 sass#332 sass#333 sass#334 sass#335 sass#336 sass#337 sass#338 sass#339 sass#340 sass#341 sass#342 sass#343 sass#344 sass#345 sass#346 sass#347 sass#348 sass#349 sass#350 sass#351 sass#352 sass#353 sass#354 sass#355 sass#356 sass#357 sass#358 sass#359 sass#360 sass#361 sass#362 sass#363 sass#364 sass#365 sass#366 sass#367 sass#368 sass#369 sass#370 sass#371 sass#372 sass#373 sass#374 sass#375 sass#376 sass#377 sass#378 sass#379 sass#380 sass#381 sass#382 sass#383 sass#384 sass#385 sass#386 sass#387 sass#388 sass#389 sass#390 sass#391 sass#392 sass#393 sass#394 sass#395 sass#396 sass#397 sass#398 sass#398 sass#399
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.

None yet

5 participants