Commit Graph

54896 Commits

Author SHA1 Message Date
Sebastiaan van Stijn 034c23319b
_scss: combine some overlapping rules, and move some to the right section
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-15 15:06:23 +02:00
Sebastiaan van Stijn 5cdbdac592
_scss: remove unneeded vendor-prefixes, and combine some styles
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-15 15:06:21 +02:00
Sebastiaan van Stijn 2bef56ee81
_scss/_night-mode.scss: remove styles not related to color
Dimensions, padding, etc, should not differ between "night mode" and "regular mode".

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-15 15:06:18 +02:00
Usha Mandya da58e4098c
Merge pull request #11543 from thaJeztah/async_json
Load metadata and toc asynchronous
2020-10-15 13:55:37 +01:00
Usha Mandya cf1fdf58bd
Merge pull request #11549 from docker/stephen-turner-patch-1
Fix broken link due to incorrect build number
2020-10-15 11:30:24 +01:00
Stephen Turner f23cfa0f2d
Fix broken link due to incorrect build number 2020-10-15 10:30:44 +01:00
Sebastiaan van Stijn 5c8580c3f0
search: load metadata asynchronous as JSON
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-14 22:08:54 +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
Usha Mandya 0d28c3cb14
Merge pull request #11542 from thaJeztah/separate_themeswitcher
js: move theme switcher to its own script, and use localstorage
2020-10-14 16:48:24 +01: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
Usha Mandya 934e125ea9
Merge pull request #11541 from thaJeztah/move_polldaddy
Move polldaddy script to an include, and update some options
2020-10-14 16:30:36 +01:00
Usha Mandya 6bf479a1fc
Merge pull request #11540 from thaJeztah/some_cleanups
Various cleanups and some improvements in theme
2020-10-14 16:24:33 +01:00
Sebastiaan van Stijn 8bf577084a
Move polldaddy script to an include, and update some options
- use a config-variable for the ID
- exclude the script if no ID is set
- set default font and font-color

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-14 15:33:16 +02:00
Sebastiaan van Stijn 77cbdc4fbe
Remove broken "NOT_EDITED_HERE" symlink
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-14 15:04:22 +02:00
Sebastiaan van Stijn 383455e1ee
js: remove modernizr script as it was unused
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-14 15:03:33 +02:00
Sebastiaan van Stijn 017b8823a2
js: remove unused js/menu.js
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-14 15:00:19 +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 a12ac448d2
_scss: cleanup and reformat comments, remove commented styles
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-14 14:52:24 +02:00
Sebastiaan van Stijn f0ee00befc
css: remove highlightjs styles as we no longer use them
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-14 14:39:55 +02:00
Sebastiaan van Stijn 1c2a455346
styles.css: include code-highlight styles in main css document
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-14 14:39:53 +02:00
Sebastiaan van Stijn 4a7d872cbe
_includes/body-landing.html: unwrap elements
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-14 14:39:50 +02:00
Usha Mandya 9bebb666d9
Merge pull request #11535 from usha-mandya/desktop-3326
Remove osxfs topics from Desktop docs
2020-10-13 19:24:37 +01:00
Usha Mandya beb163481d
Merge pull request #11536 from thaJeztah/fix_metadata
js/metadata.js: fix missing titles and descriptions
2020-10-13 12:43:37 +01:00
Usha Mandya e827815c56
Merge pull request #11534 from thaJeztah/accessibility_fixes
Small (accessibility-)fixes
2020-10-13 12:11:44 +01:00
Sebastiaan van Stijn 373343070e
js/metadata.js: fix missing titles and descriptions
Similar changes to how we generate missing titles and descriptions
for upstream resources.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-13 12:51:19 +02:00
Usha Mandya 2d8b420d3c
Merge pull request #11533 from thaJeztah/fixup_links
Various link fixes
2020-10-13 11:42:10 +01:00
Usha Mandya d400d938e6 Remove osxfs topics from Desktop docs
Signed-off-by: Usha Mandya <usha.mandya@docker.com>
2020-10-13 11:30:29 +01:00
Sebastiaan van Stijn b3104f4eb9
_includes/head.html: add "theme-color" meta
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-13 12:29:07 +02:00
Sebastiaan van Stijn 5923b22117
Add image dimensions to logos and video-icons
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-13 12:28:48 +02:00
Sebastiaan van Stijn d61d68cbb0
accessibility: fix active menu item low contrast in night-mode
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-13 12:17:56 +02:00
Sebastiaan van Stijn b6b666a41f
accessibility: add label to search input
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-13 12:15:25 +02:00
Sebastiaan van Stijn c119ed174e
Use https:// for links and examples
Found these using `http://[^lp10\*`<][^o]` (to exclude "localhost" and IP-addresses)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-13 12:09:11 +02:00
Sebastiaan van Stijn bec50329b9
Fix links not having a trailing /
This avoids resulting in a redirect to the URL with /

Found these using `href="[^#][^#"]+[^/]"`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-13 12:06:06 +02:00
Sebastiaan van Stijn ac9a25c8e3
get started: update link title for accessibility
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-13 12:04:42 +02:00
Usha Mandya a17a06c6a1
Merge pull request #11527 from thaJeztah/nosticky
Remove "position: sticky" stickyfill polyfill
2020-10-12 12:58:38 +01:00
Usha Mandya c923e95684
Merge pull request #11526 from thaJeztah/noopener
Add "rel=noopener" and fix canonical links
2020-10-12 12:58:12 +01:00
Sebastiaan van Stijn a90b5b1ae3
Merge pull request #11472 from 123aswin123/name-menu
Added label for menu toggle to improve site accessibility on screen readers
2020-10-12 13:55:55 +02:00
Aswin Vayiravan 79cf7e841e
added label for menu toggle 2020-10-12 13:40:00 +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 cafd5a9943
Use full URLs for canonical links
Canonical links are expected to be full URLs, not relative.

For this to work, the Dockerfile had to be updated, because we're stripping
the domain-name from links ("<a href..."), but the script currently also included
"<link rel='canonical' .." tags.

With the change, canonical links are left alone;

These hrefs will be replaced

    echo '<a class=foo href="https://docs.docker.com/foo">hello</a>' | sed -e 's#\(<a[^>]* href="\)https://docs.docker.com/#\1/#g'
    # <a class=foo href="/foo">hello</a>
    echo '<a href="https://docs.docker.com/foo">hello</a>' | sed -e 's#\(<a[^>]* href="\)https://docs.docker.com/#\1/#g'
    # <a href="/foo">hello</a>

But, for example, this one is left alone

    echo '<link rel="canonical" href="https://docs.docker.com/foo/bar" />' | sed -e 's#\(<a[^>]* href="?\)https://docs.docker.com/#\1/#g'
    # <link rel="canonical" href="https://docs.docker.com/foo/bar" />

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-12 13:09:32 +02:00
Sebastiaan van Stijn 393d3f6566
Add rel="noopener" to external links
See https://web.dev/external-anchors-use-rel-noopener/

Using noopener, as that addresses the security issue. "noreferer" blocks
the REFERER header, which may still be useful for some target URLs.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-12 13:09:30 +02:00
Usha Mandya b753eb089f
Merge pull request #11520 from Lax/master
[doc] Fix parameter error in compose rails document
2020-10-12 10:34:33 +01:00
Usha Mandya 9364113254
Merge pull request #11516 from usha-mandya/desktop-3294
Move wsl 2 best practices
2020-10-12 09:40:09 +01:00
Liu Lantao 2a40c14676
update according to reviewer suggestion
Signed-off-by: Liu Lantao <liulantao@gmail.com>
2020-10-11 13:03:54 +08:00
Liu Lantao c59542a042
Update rails.md
Fix parameter error in compose document.
2020-10-11 13:02:37 +08:00
Usha Mandya 906605a92a
Merge pull request #11517 from thaJeztah/fix_metas
_includes/head.html: fix escaping in generated descriptions and titles
2020-10-09 17:48:04 +01:00
Usha Mandya df45a7c960 Update Win system requirements 2020-10-09 17:05:40 +01:00
Sebastiaan van Stijn fc407908d7
_includes/head.html: fix escaping in generated descriptions and titles
Commits 7e5352f1ae and e72030d2c6
added automatic generation of page titles and descriptions from the page's content
if no front-matter metadata was present.

Some pages may include characters that should be escaped before using as a HTML
attribute or JSON field.

This patch adds escaping to those texts to prevent the HTML or JSON from being
invalid.

Before this:

HTML meta:

    <meta name="description" content="docker build: The `docker build` command builds Docker images from a Dockerfile and a " context".="" a="" build's="" context="" is="" the="" set="" of="" files="" located="" in="" specified="" `path`="" or="" `url`...."="" />

JSON meta:

    <script type="application/ld+json">{"@context":"http://schema.org","@type":"WebPage","headline":"docker build","description":"docker build: The `docker build` command builds Docker images from a Dockerfile and a "context". A build's context is the set of files located in the specified `PATH` or `URL`....","url":"https://docs.docker.com/engine/reference/commandline/build/"}</script>

After this:

HTML meta:

    <meta name="description" content="docker build: The `docker build` command builds Docker images from a Dockerfile and a &quot;context&quot;. A build&#39;s context is the set of files located in the specified `PATH` or `URL`...." />

JSON meta:

    <script type="application/ld+json">{"@context":"http://schema.org","@type":"WebPage","headline":"docker build","description":"docker build: The `docker build` command builds Docker images from a Dockerfile and a \"context\". A build's context is the set of files located in the specified `PATH` or `URL`....","url":"https://docs.docker.com/engine/reference/commandline/build/"}</script>

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-09 16:16:42 +02:00
Usha Mandya cb912718f7 Move wsl 2 best practices
Signed-off-by: Usha Mandya <usha.mandya@docker.com>
2020-10-09 11:45:59 +01:00
Usha Mandya 4ac8fc0dc8
Merge pull request #11512 from kietct/patch-1
Update formatting.md
2020-10-09 10:56:21 +01:00