Commit Graph

50 Commits

Author SHA1 Message Date
Sebastiaan van Stijn 3c3b037d9a
js/docs.js: small cleanup in walkTree() function
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-26 18:58:12 +01:00
Sebastiaan van Stijn d01d3e8ccd
js/docs.js: cleanup unused parts
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-15 15:06:27 +02:00
Sebastiaan van Stijn e46cfab03c
Load toc.js asynchronously as JSON
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-14 22:08:50 +02:00
Sebastiaan van Stijn 6b6ef9fe0d
js: move theme switcher to its own script, and use localstorage
rewrite the script to not depend on jQuery, so that it can be run as
soon as possible.

Also switch to use localstorage instead of cookies, which is a more
suitable mechanism for this, and use the same HTML include as was
used on the landing-page for the whole site.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-14 17:37:21 +02:00
Sebastiaan van Stijn 68911c8d45
js/docs.js: remove temporary hack for side menu
Looks like everything works without this

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-14 15:00:13 +02:00
Sebastiaan van Stijn eaf40137dc
Remove "position: sticky" stickyfill polyfill
From the script's repository: https://github.com/wilddeer/stickyfill

> Stickyfill did a good job while the browsers were implementing position: sticky
> support. You can now safely use stickies without a polyfill, all modern browsers
> support them natively:
>
> https://caniuse.com/?search=position%3Asticky

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-12 13:27:15 +02:00
Sebastiaan van Stijn 1ba81da1bd
js/docs: don't traverse full TOC if we have a direct match
There's no need to traverse the whole TOC if the URL matches
the current URL.

Also some small cleaning up / refactoring.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-08 16:39:01 +02:00
Sebastiaan van Stijn fc89461836
Generate top-navigation instead of using javascript
This makes sure the top-navigation works, even if javascript
is disabled.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-08 16:38:55 +02:00
Sebastiaan van Stijn f4e9565b22
js/docs: remove special casing of glossary
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-08 16:36:34 +02:00
Usha Mandya 674c5eb115
Merge pull request #11508 from thaJeztah/left_nav_focus
js/docs: scroll TOC to active menu item
2020-10-08 15:14:56 +01:00
Sebastiaan van Stijn db85f983a3
Remove glossary left-overs
Looks like removing the front-matter in f17ebae568
caused the output to break, resulting in a JavaScript error.

Looking at where this file was used, it turned out that it was loaded, but
never used anywhere.

This commit removes the remaining parts of the glossary search functionality,
which was not used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-08 15:50:05 +02:00
Sebastiaan van Stijn c515c773b8
js/docs: scroll TOC to active menu item
This helps keeping the currently selected menu item into
view on pages that have many menu-items (such as the docker
engine CLI reference)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-08 15:35:39 +02:00
Jérémie Drouet 20ff61b942 handle archive feature toggling with css
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
2020-05-28 10:13:31 +02:00
Jérémie Drouet dbe4953982 move navbar to burger menu on mobile
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
2020-05-26 11:12:22 +02:00
Sebastiaan van Stijn 501b13e68c
docs.js: be slightly more consistent with double/single quotes
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-14 09:10:35 +01:00
Sebastiaan van Stijn 0871044294
docs.js: remove dead code and debug comments
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-14 09:10:32 +01:00
Sebastiaan van Stijn 65938675db
docs.js: fix some linting issues
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-14 09:10:30 +01:00
Sebastiaan van Stijn 923f7012d4
docs.js: reformat code
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-14 09:10:27 +01:00
Adrian Plata a1875f4d56
Reworking glossary to a table and removing left-side ToC (#1387) (#9769)
* Reworking glossary to a table and removing left-side ToC

Signed-off-by: Adrian Plata <adrian.plata@docker.com>

* modifying CSS

* Fixing desktop links.

* Fixing swarm mode links.
2019-10-30 13:15:39 -07:00
Usha Mandya a556c61cf7
Merge pull request #9351 from thaJeztah/remove_library_samples
Remove library samples, and link to Docker Hub instead
2019-09-23 16:21:57 +02:00
Vadim Klimenko ec3da7c84d Show dark version of site when prefers-color-scheme:dark (#8921) 2019-09-06 11:30:17 +01:00
Sebastiaan van Stijn d78dc92278
Remove javascripts related to generating library collection navigation
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-04 00:37:42 +02:00
allejo 888c061228 Don't spam browser history when scrolling thru page
Fixes #6299
2018-10-11 22:41:48 -07:00
Joao Fernandes d8a829662e
Make logs less noisy (#6062) 2018-02-23 11:49:59 -08:00
Misty Stanley-Jones 08e7715762
Make archive easier (#5231)
* Fix archive butterbar margin-top

* Add archive script and layout
2018-01-29 16:55:37 -08:00
John Mulhausen d17340d394
Speed up site rendering for authors (#5241)
* rough pass at tabs, jsonification

* GHPages 147, authoring YML, sitemap via plugin, working JS

* Update Gemfile

* Removing dk.rb artifact

* Simplifying authoring YML even more

* More YML simplification

* Remove jekyll-seo -- even more perf gain

* Glossary support

* Collections support

* Incremental off; GH Pages 172 gets build time to 50 seconds
2017-12-19 18:15:15 -08:00
Misty Stanley-Jones c6391e5998 Enable hide/show of elements that don't apply to archives (#4798) 2017-10-04 14:59:29 -07:00
John Mulhausen 102c00e071 Docker Library import (#3063)
* Docker Library import

* Auto-gen Samples TOC

* Modular hovers on Glossary page

* TOC sync fix
2017-05-17 12:33:09 -07:00
John Mulhausen a36d37dae6 Fix for glossary 2017-04-21 14:31:32 -07:00
Vladimir Jimenez f466f24742 Fix sidebar scrolling (#2860)
* Simplify both left and right sidebars

- Rewrite the sidebars to use the same CSS class instead of having two
  very similar classes. This involves removing all affix related
  attributes and functionality from the sidebars and replaced them with
  `position: sticky`.
- The table of content elements should not be floated
- Removed unused CSS rules related to the sidebars
- Remove JavaScript used to resize the sidebars

* Improve the mobile menu to be fixed

- Simply JS used to hide/display the navigation bar on mobile viewports
- The mobile menu should be fixed so it can be viewable from the bottom
  of the page. Before this change, you would have to scroll up to see
  the menu that `position: absolute`

* Fix disappearing top navbar on homepage

- Change the calculation of the affix offset for the navbar on the home
  page to ensure the navbar never leaves the viewport. This change also
  takes into account the change of how the sidebars' offsets are used

* Fix auto scrolling on overflow

* Add polyfill for 'position: sticky' on IE

* Fix hamburger menu at incorrect breakpoint

* Fix left nav hidden after expanding from mobile

If you expand and collapse the left nav while on mobile and expand to a
desktop view, the left nav would be hidden; this has been fixed

* Unify navbar on homepage with rest of website
2017-04-21 11:04:19 -05:00
Josh south 492074c717 Various post-launch fixes (#2549)
* WIP #2052

- Adding sass
- Test components
- Night mode
- docker con banner
- archive legacy css

* add compressed css

* Update branding for cloud api docs

* split out global header

* rescale mods

* adjust viewport rescaling

* sync

* test

* testing deploy

* john rules, please update man

* test: removing all styles

* trying to make netlify work

* add min-height to sidebars

* testing

* Update style.css

manually add css

* testing

* test

* Update style.css

* adding dockercon svg

* add svgs

add svgs

* remove css

* re-add

* s/container-fluid/container
2017-03-31 16:07:37 -07:00
Misty Stanley-Jones c6aca8acee Improve bootstrap tabs (#2546)
Use data-target instead of href
Move tab-syncing code into site-wide JS so everyone can use it
Add example for syncing tab groups on the same page
2017-03-30 12:57:37 -07:00
John Mulhausen 56940587a8 Fix for anchor links 2017-03-02 10:35:12 -08:00
John Mulhausen 6ea1e97916 Add scrolling to hamburger menu 2017-03-02 05:34:29 -08:00
John Mulhausen 3f7d989c9e Restore hamburger (partial) 2017-03-02 05:26:16 -08:00
John Mulhausen 1b62d79f39 Fix for black space on mobile 2017-03-02 05:08:07 -08:00
John Mulhausen 02bb0de07d Anchor links fix 2017-03-02 04:37:13 -08:00
John Mulhausen 910dd4c588 Share images, JS fixes, Marketo removal 2017-03-02 03:59:35 -08:00
John Mulhausen 919b46bebd JS error fixes 2017-03-01 22:47:55 -08:00
John Mulhausen 384eae4483 Fix for JS error on homepage 2017-03-01 22:28:46 -08:00
John Mulhausen 3e12e75626 Fix for overzealous resizing, JS redundancies 2017-03-01 22:13:14 -08:00
John Mulhausen 18a7003915
Left and right nav resizing w/footer scroll and window resize 2017-03-01 20:18:29 -08:00
John Mulhausen 397c29a661
Slightly slower right-nav highlighting, correct version 2017-03-01 15:57:37 -08:00
John Mulhausen af58236190
Right-nav highlighting and auto-scroll 2017-03-01 15:21:44 -08:00
Josh south e88f2b25bb Newsite tabs (#2004)
* Layout updates, dark themes, tons o stuff

* Update themes

Theme updates + scaffolding
2017-02-27 13:48:48 -08:00
John Mulhausen 20c91a529b
Add cookie saving for day/night mode 2017-02-24 16:24:16 -08:00
Josh south 12c25322c3 Layout updates, dark themes, tons o stuff (#1971) 2017-02-24 12:24:59 -08:00
John Mulhausen aa7614f695
Fixing JS error 2017-02-16 15:46:12 -08:00
John Mulhausen f478f1bf0a Hooking up nav to real TOC data, formatting fixes 2017-02-16 03:20:03 -08:00
Josh south b5c9366474 Theme Start (#1709) 2017-02-15 17:07:36 -08:00