Commit Graph

48 Commits

Author SHA1 Message Date
Martin Taillefer 435d00ecfb
Site improvements (#4051)
* Site improvements (#4049)

- Add missing ARIA annotations on the See Also entry in the right-hand TOC

- Add missing ARIA annotations on the FAQ pages, and switch from a UL to an OL
list for the questions in order to get rid of the bullets.

(cherry picked from commit 469667b184)

* Site improvements

- Fix highlighting of TOC entries in the Chinese version of the site.
I wasn't doing the right escaping to deal with UTF-8 chars.

(cherry picked from commit f124e190de)
2019-04-25 22:56:19 -07:00
Martin Taillefer 942c4e66d7 Site improvements. (#4015)
- Substantially simplify logic that deals with releases & release notes.

- Make it easier to add a new release to the site. THere are fewer things to
change as the site infra can figure more stuff out on its own.

- Make it so release notes can be added in one language without require them
to be added in the other language.

- Replace the ugly "a new version is available" callout on older release note
pages with a popup that only shows up when you click on the download button.

(cherry picked from commit d458423cf4)
2019-04-22 09:46:35 -07:00
Martin Taillefer fe0e67bdde Fix handling of embedded HTML in bash command output. (#3968) 2019-04-09 08:25:47 -07:00
Martin Taillefer e5735d4a3f
Site improvements (#3942)
- Fix multi-line snippets when loading a text block from a URL.

- Fix outputis for text blocks loaded from a URL

- Fix @@ expansion for text blocks loaded from a URL.

- Added more text block test cases
2019-04-05 05:00:09 -07:00
Martin Taillefer c31a8fdefd Site improvements (#3928)
- Added the text_hack shortcode to embed text blocks in a tabset in a list. This fixes the
indenting problem in that case. It's a hack, thus the name, but it works.

- Added a download button in the footer of each page.

- Tweaked the rendering of the horizontal lines in the panels on the home page to
improve appearance and avoid occasional funny rendering.

- Run the SVG optimizer on the site content to reduce the size of a few newly added/updated
files.
2019-04-03 10:26:46 -07:00
Martin Taillefer 97d1cff1f9
Fix copy to clipboard feature. (#3922) 2019-04-02 09:27:11 -07:00
Martin Taillefer 8e0aa39ec7
Fix handling of HTML entities in text blocks sometimes showing up as " in the output. (#3909) 2019-03-31 22:12:32 -07:00
mtail ba0fb5cda9 Port scripts to TypeScript.
- Port all the JavaScript to TypeScript. Finally, a typed language to
eliminate a whole class of avoidable errors. This ends up being a line-
by-line affair, mostly about adding type information on functions and
some function calls. This also involved adding quite a few null checks
(since TypeScript tracks nullness). This results in the code being
inherently more robust in the face of somehow malformed HTML which
doesn't contain what the script code is expecting to find.

- Ditch the recently added JSHint linter in favor of tslint.
2019-03-31 21:16:16 -07:00
Martin Taillefer 5affd1fc9b
Add linting for our JavaScript. (#3903)
Fix a few uncovered linters issues snd a real functional bug.
2019-03-30 21:34:22 -07:00
Martin Taillefer 0880b7450d
Fix a bunch of lint-related errors. (#3897) 2019-03-29 22:04:29 -07:00
Martin Taillefer 7d729c190b
Refix text blocks. (#3864)
This undoes the previous fix for bad indent in text blocks in lists in tabs.
Therefore, thst bug has returned. However, the much more serious bug around
all other text boxes is gone.

I've spent many hours banging my head around some of Hugo's behaviors and have
bottomed out at two different Hugo bugs for which I haven't found a clean
workaround.

My next step is to implement a specialized version of the {{< text >}} sequence
designed specifically for the case of "text block in a list in a tab". This will
let me do custom stuff to work around the Hugo bug.
2019-03-27 10:25:23 -07:00
Martin Taillefer c16e425e72
Fix badly indented text blocks. (#3847) 2019-03-26 06:36:58 -07:00
Martin Taillefer 6cd5b7d468
Site fixes. (#3834)
- Implement missing keyboard support in the sidebar.

- Fix keyboard logic in tabs, preventing the strip from being
navigated into.

- Fix keyboard navigation to the print/download/copy buttons in text blocks.
When using the keyboard, those buttons didn't become visible.

- Use common code for menu, tabset, and sidebar navigation logic.

- Fix menu width to use font-size scaling instead of a fixed pixel with.
Also made the menu a bit wider to avoid unsightly wrapping in the menu.

- Set a minimum width for text boxes in order to avoid the print/download/copy
buttons from rendering poorly.
2019-03-23 07:19:24 -07:00
Martin Taillefer 7729ef584d
Cherry picks from master (#3801)
* zh: sync /docs/setup/kubernetes/prepare/platform-setup/azure/index.md (#3783)

(cherry picked from commit 698f98c4bd)

* zh: removed content_zh/help/faq/telemetry/initial-zipkin-header.md (#3777)

(cherry picked from commit b92beb332c)

* zh: /help/faq/distributed-tracing/mixer-role.md (#3776)

* zh: /help/faq/distributed-tracing/mixer-role.md

* typo

(cherry picked from commit 414b87bde8)

* zh: /help/ops/telemetry/envoy-stats/index.md (#3779)

(cherry picked from commit d4852e1673)

* zh: sync /boilerplates/helm-security-warning.md (#3780)

(cherry picked from commit f3f2453152)

* zh: content/docs/tasks/telemetry/logs/fluentd/index.md (#3796)

* fluentd

* updated

* updated

(cherry picked from commit 482edc366f)

* zh: add content_zh/docs/tasks/telemetry/metrics/using-istio-dashboard/index.md (#3795)

* zh: add content_zh/docs/tasks/telemetry/metrics/using-istio-dashboard/index.md

* Update index.md

* retest

* Update index.md

(cherry picked from commit c9c7e684a8)

* Site improvements

- Darken the text color of the selected tab in a tab set.

- Remove extra bottom border line in collapsed sidebar panels.

- Cleaned up accessibility annotations for the sidebar.

(cherry picked from commit 3f6e52e399)
2019-03-20 09:56:18 -07:00
Martin Taillefer 28bb1d2ce1 Fix a few text block bugs (#3769)
- HTML tags appearing in bash text block output weren't being escaped properly, making them
disappear.

- Never call prism when syntax coloring is turned off, otherwise things
fail with an exception.
2019-03-19 07:26:41 -07:00
mtail 78b8cb3e29 Fix a couple bugs when the site is switched to release mode. 2019-03-19 06:21:00 -07:00
Martin Taillefer c85c0ca03a Fix tab selection on non-Chrome browsers. (#3733) 2019-03-18 07:56:43 -07:00
Martin Taillefer 2258d0b03b
Improve text blocks. (#3727)
- Add tests for the various text block features.

- Combine text_file and text_dynamic into text_import

- Add support for snippet extraction for text downloaded from a URL

- Add support for formatting output blocks in a different style for
content downloaded from a URL

- Report some errors when unable to fetch content from a URL.

- Fixed a few small bugs along the way.
2019-03-18 06:31:26 -07:00
Martin Taillefer 69830194de
Finish accessibility support in tab sets. (#3720) 2019-03-16 06:55:45 -07:00
Martin Taillefer 0951a97b5f
Text block download fixes. (#3711) 2019-03-15 14:05:08 -07:00
Martin Taillefer 1cc06a6e9c
Site improvements (#3677)
- Added call-to-action buttons in the 1.1 announcements. We can use the same
buttons in future release announcements.

- Fixed broken large warning icon on the 404 error page.

- Fix oerder of blog posts in the side bar.

- Add support to not expand @@ notations in text blocks and use
it for a text blocks that's currently triggering a build failure

- Fixed broken rendering of some text blocks when syntax coloring
is turned off via the menu.
2019-03-13 21:53:55 -07:00
Martin Taillefer b67e5126b4
Fix tab problem. (#3614) 2019-03-10 10:55:57 -07:00
Martin Taillefer 74e7ef56b1
Finish keyboard navigation for header & menu. (#3607) 2019-03-10 07:57:42 -07:00
mtail 373916fcfa Improve accessibility
- Increase the constrast for links, per LightHouse analysis.

- Add support for disabling syntax coloring in example text blocks. This
can be controlled from the menu.
2019-03-09 11:56:32 -08:00
Martin Taillefer 4d20265c5c
Bunch of site improvements. (#3601)
- Work on keyboard navigation support. It's not totally done yet,
but its a lot better than it's ever been.

- Fix incorrect font use for code blocks. They were coming out way
smaller than intended.

- Improve the HTML in a variety of ways to make it better for
screen readers.
2019-03-09 07:31:29 -08:00
mtail c4ea43e386 Tweak the menu display.
Use animation to bring the menu up, and support the ESC
key to hide it.
2019-03-06 18:18:26 -08:00
mtail b02af28135 Fix bugs around highlighting the current section in the TOC. 2019-03-06 06:23:01 -08:00
Martin Taillefer d093f22d0c
Bunch of structural improvements. (#3488)
- Make better use of html semantic elements to help
search & screen readers.

- Add or improve ARIA annotations for accessibility

- Improve print-time formatting.
2019-03-04 07:26:48 -08:00
Martin Taillefer 1d7a4a161e
Fix problem with disappearing hamburger menu on Android. (#3482) 2019-03-03 12:05:51 -08:00
Martin Taillefer 5a9f78e843
Add a fast language switcher button in preliminary mode. (#3464)
Also, when switching languages, the site now stays at the same page if possible.
This should help with translation work.
2019-03-02 17:39:32 -08:00
Martin Taillefer 18ce618eda
Simplify sidebar logic. (#3463) 2019-03-02 14:45:30 -08:00
Martin Taillefer bedbc83da6
JavaScript cleanup. (#3427)
- Now that the scripts are loaded with 'defer', no need to trigger all
behavior via a DOMContentLoaded event handler as the scripts will all
naturally run after the DOM has been loaded.

- Use a considerably simpler approach to copy to the clipboard in code
blocks. This saves around 10K of script code believe it or not.
2019-02-28 01:38:52 -08:00
Martin Taillefer 5ce2285a01
Script cleanup (#3372) 2019-02-25 07:19:06 -08:00
Martin Taillefer 19f40b74b7
Redo theming logic. (#3370)
This all got much simpler, more robust, and faster to load by using
CSS variables.
2019-02-24 11:15:17 -08:00
mtail aadab8322c Implement a hack to ensure deep-linked table rows don't land under the page header. 2019-02-23 06:46:00 -08:00
Martin Taillefer 591815c72f
Eliminate the use of bootstrap and jquery. (#3323)
This removes two very large dependencies which ends up making
each page load considerably faster, especially on mobile. Plus,
not using bootstrap actually made several things simpler throughout
the site's logic.
2019-02-21 09:40:10 -08:00
mtail 405ad98764 A few infrastructure fixes
- Added some missing styling on the landing page.

- Fixed extra margin values in the dropdown menu.

- Improved popover positioning on small screens.
2019-02-20 07:44:55 -08:00
Martin Taillefer 959da91043
Infrastructure improvements. (#3306)
- Stop using Bootstrap's tab component.

- Improve the formatting of the hesder on mobile.
2019-02-20 06:41:40 -08:00
Martin Taillefer d5a9610fde
Implement custom navbar logic. (#3292)
- Stop using the bootstrap navbar. This new logic is considerably
simpler and gives a much better experience on mobile.
2019-02-19 07:55:45 -08:00
Martin Taillefer 532fe7d365
Add an icon in the title area of glossary term popovers. (#3286) 2019-02-18 13:34:04 -08:00
Martin Taillefer 2dac7e0ff3
Site infra cleanup. (#3281)
- Refactor script code into smaller more manageable files.

- Use consistent naming style in script code.

- Stop using Bootstrap's dropdowns and popovers in favor of custom implementation.
There are only a few uses of Bootstrap to purge before I can ditch
the dependency on the Bootstrap & JQuery libraries, which will speed
up page loads.

- Find a few more static strings that should come from the xlation
dictionary instead.
2019-02-18 07:35:37 -08:00
mtail c8e6f0e285 Make switching site versions smarter.
When you select a different version of the site from the gear menu,
we now try to put you on the same page in the other version if that
page exists. If the same page can't be found, then you land at the
root of the other site, like you did before.
2019-02-14 21:34:52 -08:00
mtail a846186fc3 Eliminate manipulation of styles from JavaScript, only deal with classes. 2019-02-14 11:52:47 -08:00
mtail 0077232110 Fix style switching problem in the updated JavaScript. 2019-02-13 20:34:17 -08:00
mtail 995ade5d61 Fix a null reference in JavaScript. 2019-02-13 20:02:34 -08:00
mtail 27ee224471 NOP changes to see if this will fix Chrome caching issues. 2019-02-13 15:51:16 -08:00
Martin Taillefer 3eba576a89
JavaScript cleanup (#3253)
- Upgrade from UglifyJS to Babel as a JS preprocessor. This lets me use modern ES6 syntax
in the JS code.

- Update JS code to leverage ES6.

- Remove most dependencies on JQuery for faster & smaller code. Once I remove the
dependency on the Bootstrap library, then the dependency on JQuery will also completely
go away.
2019-02-13 10:10:28 -08:00
Martin Taillefer e9112e7a65
More style cleanup. (#3230) 2019-02-11 21:07:03 -08:00