quick toc at top of docs, free up horizontal space #8

wants to merge 3 commits into


None yet
3 participants

Proposed changes per my message here: http://news.php.net/php.webmaster/14786

  • Quick toc is displayed horizontally at top of the page, and becomes fixed once the user scrolls passed it.
  • The "current section" (based on scroll position) is distinguished as the user scrolls.
  • Removed some of the right-padding to free up more screen real estate.

I would still prefer fluid 100% width, but that's a more dramatic change and looks a little strange with the logo/navigation/search being in the center. Perhaps all the header content could be left-aligned? (As old fashioned as that sounds.)

schweickism added some commits Oct 1, 2012

Update styles/doc.css
display quick toc horizontally at top of doc entry and added some styles for switching to fixed pos when the user scrolls passed it.
also removed right margin on .docs #layout .layout-content to free up more horizontal space.
Update js/common.js
switch quick toc from static pos to fixed when the user scrolls passed it.
distinguish the current section link based on scroll position.
Update include/shared-manual.inc
moved .links above .content in quick toc
removed seemingly erroneous extra closing aside after quick toc.

LawnGnome commented Dec 27, 2012

I don't mind the theory on this — the sidebar TOC has real problems on narrow displays, in particular, but I'm not totally sold on the styling of this as yet. Might end up being something to play with post-launch (assuming we launch soon as I hope).

I'll have a think about it. Sorry we haven't been as diligent on the PRs as we should have been!

Thanks for the response. I had another thought: What if the TOC simply hides off the side of the screen and only expands when you mouseover it? The language, report a bug, and edit options could have additional inline links at the bottom of the page for those 1% of users w/out javascript.

Is there any chance for reducing the side margins before this is launched? I pointed out on the news group that mktime, for example, is particularly hard to follow with the large font and rather restrictive content area.


bjori commented Jan 8, 2013

I like the idea!
Not a fan of the actual layout of it, but I like the idea of it floating at the top for quick navigation...
Unsure how useful it is though :]


bjori commented Jun 25, 2013

Closing.. No longer applies and never updated

@bjori bjori closed this Jun 25, 2013

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