Commit Graph

30 Commits (80b9ccd641b8c0b124747047487847a85d30db43)

Author SHA1 Message Date
Tim Bannister b9afbb97c1
Upgrade to Mermaid 8.13.0
static/js/mermaid.min.js as fetched from https://cdn.jsdelivr.net/npm/mermaid@8.13.0/dist/mermaid.min.js
2021-12-21 18:55:19 +00:00
Tim Bannister 7738ba16fc Mark when JavaScript is available
This might be useful for custom styling, or for using
a pure-CSS fallback for some scripted behavior.

There is already a no-js class set on the <html> element;
this change removes it when JavaScript is running OK.
2021-10-03 17:14:11 +01:00
chrismetz09 cbff3ec4ea upgrade to mermaid 8.11.2 2021-08-26 10:53:18 -07:00
chrismetz09 51ccd736f5 fixed render problem for mermaid picts on ingress page 2021-06-14 21:13:05 -07:00
Qiming Teng b3214813a4 Cache scripts locally
The current layout partial is using scripts from a site not accessible
from behind the dam great firewall. This is a fix to cache the scripts
as we do before so that tabs, top menu works for everyone.
2021-01-31 21:58:42 +08:00
Tim Bannister 735410f17b Only load copy-and-paste helper on pages that use it
This change helps improve load times for key non-documentation pages
such as https://kubernetes.io/
2020-09-30 23:42:00 +01:00
Karen Bradshaw e84e0c0b75 update tab component, remove jquery-ui 2020-09-30 12:03:20 -04:00
Karen Bradshaw 160364d548 move search.md
add search bar to search page

fix bing anchors
2020-08-28 15:37:46 -04:00
Qiming Teng 8a1ccddfd4 Remove customization of 'anchors'
The AnchorsJS module has been killed recently in #22311 prematurely. Now we don't
have a global variable 'anchors' to customize. This PR removes the related code
in script.js in hope everything else is still working correctly.
2020-07-18 21:08:19 +08:00
Kubernetes Prow Robot 1943aaafd6
Merge pull request #22311 from sabazubair/remove-anchor.js
Remove /static/js/anchor-4.1.1-min.js
2020-07-15 18:58:35 -07:00
Kubernetes Prow Robot e5be21ef4d
Merge pull request #22283 from thekad/issue-22044
Removing duplicate custom-jekyll js
2020-07-14 09:55:21 -07:00
Qiming Teng bb07d99f08 Address review feedbacks 2020-07-06 06:52:46 +08:00
Qiming Teng 162e5edb39 Clean up shared assets for API reference
This PR promotes the CSS, JS and FONTS files used by API reference to
the `static/css`, `static/js` and `static/fonts` directories
respectively. The intent is that for future releases, when generating
API reference docs, only the `index.html` and `navData.js` files need to
be copied from the generator tools.

Details of changes:

- `jquery-3.2.1.min.js` file is replaced by `jquery-3.3.1.min.js` to
  align with the version used by Docsy. We can investigate in the future
  whether this can be shared. Converging to the same version at least
  can reduce the risks of compatibility.
- `jquery.scrollTo.min.js` moved to `static/js` file and renamed to
  `jquery.scrollTo-2.1.2.min.js` so we know the version from file name.
- `scroll.js` moved to `static/js` and renamed to `scroll-apiref.js` to
  siginify that it is used by API reference.
- A `README.md` file is added to `static/js` directory for describing
  the purposes of the these files.
- `bootstrap.min.css` moved to `static/css` and renamed to
  `bootstrap-4.3.1.min.css` so that it can be shared and its version can
  be easily discovered.
- `font-awesome.min.css` moved to `static/css` and renamed to
  `fontawesome-4.7.0.min.css` for the same reason.
- `stylesheet.css` moved to `static/css` and renamed to
  `style_apiref.css` to siginify its purpose.
- A `README.md` file is added to `static/css` directory for describing
  the purposes of the these files.
- FontAwesome fonts files moved to `static/fonts` so that they can be
  shared across API reference versions.
- Current API reference (1.18) is modified to reference the relocated
  files. Upstream generator change on the way
  (kubernetes-sigs/reference-tools/#161).

Related: #22016, #22023, #22041, #22024, #22064
2020-07-05 13:43:03 +08:00
Saba Zubair 9aad658f6a removed anchor-4.1.1-min.js file from static/js/anchor-4.1.1 and the corresponding call in /layouts/partial/head.html#L77. This completes #22040 and serves as my first contribution to an OS project. 🎉 2020-07-03 21:12:27 -04:00
Jorge Gallegos f34fe97ba0 Removing duplicate custom-jekyll js
After docsy theme got merged these scripts aren't needed anymore.  Confirmed
after removing it (and all `<script>` references to it) the tooltip
functionality is still there.
Also removed the reference in `config.toml` to it, which may have stripped some
dangling whitespace.
2020-07-02 16:35:51 -05:00
TAKAHASHI Shuuji 412b4ef0ed Fix the no search result error when the keyword includes spaces. 2020-06-17 00:43:46 +09:00
Aidan Ranney 0625ced466
Revise the Kubernetes website to use Docsy (#20874)
* Add Docsy, required packages and config

* Apply Docsy integration work to k8s website

This encompasses significant changes to the style system, layout files,
as well as changes to some of the static assets. To examine this work
and the iterations that were performed, the original repository can be
found at https://github.com/gearbox-built/kubernetes-hugo.git

* Address issues found in review

The styling and positioning of the header, footer, some shortcodes and
main container elements are improved. A new partial is added for
favicons. The sidebars, as well as inner table of contents, have been
altered for better positioning and rendering of content. Localization
has also been addressed.

* Enable announcements

The recent Black Lives Matter announcement surfaced issues which have
been addressed.
2020-06-15 12:09:57 -07:00
Jim Angel bea8e2b1be adding mermaidjs shortcode with example 2020-04-19 14:48:22 -05:00
Jie Shen a34bbe4365
Cleanup user journeys related configs and scripts (#18814) 2020-01-30 17:46:19 -08:00
mohamed chiheb ben jemaa 63eb064d96 update sweetAlert and fix scrolling after copy (#15542) 2019-08-21 17:20:32 -07:00
Rémy Léone 871ba61574 Update bootstrap js because bootstrap 3.3.7 is vulnerable (#14775)
https://snyk.io/vuln/npm:bootstrap?lh=3.3.7&utm_source=lighthouse&utm_medium=ref&utm_campaign=audit
2019-06-07 19:01:08 -07:00
Bjørn Erik Pedersen 1b5ff98a44 Make the home page into reusable and translatable blocks (#10071)
* Make navigation and UI strings i18n friendly

This commit

* Extracts most UI strings into i18n bundles so they can be translated
* Makes a proper Hugo menu out of the hardcoded menu that is shown on smaller screens
* Changes the language selector logic to navigate to the current page in the other language if possible (e.g. the translation). If not possible, it takes you to the home page for that language.

For testing, this commit also adds Norwegian as a new language. This is turned off.

* Make the home page into reusable and translatable blocks

This commit adds a set of block type shortcodes that is then used to build the home page.

* These shortcodes gets common image resources from a new headless bundle. These resources can be inherited or overridden by translations.
* The hardcoded case studies section on the home page is replaced with a query and a loop.
* The hardcoded feature list on the home page is replaed qith a query and a loop.
2018-09-14 14:47:24 -07:00
Luc Perkins 9ce0cd0906 Add AnchorJS logic for header links (#10155)
* Add AnchorJS JavaScript

* Remove existing inpage_heading logic

* Remove underline from anchor tags

* Use single icon and add touch visibility

* Use paragraph link icon for AnchorJS

* Update Sass to use code formatting in docsContent headers

* Update header size coverage to H3-H6
2018-09-10 13:09:36 -07:00
Diego Fagundes 88a76d7632 china verification at search improve (#10166) 2018-08-31 12:08:34 -07:00
Luc Perkins e25a377509 Use local assets over CDN assets (#10153)
* Use local assets over CDN assets

* Add versions to JS filenames
2018-08-30 20:24:28 -07:00
Ben c2b26de572 Verify Google Analytics client is accessible before sending events (#9887) 2018-08-20 08:42:37 -07:00
Math Costa fcc03c3474 Bing search for China users (#9845)
* Updates readme's site building instructions

* Alters dockerfile to use extended hugo build

This is necessary for the pipes used w/ TOCSS since node-sass was dropped

* WIP for bing search implementation

* Implements Bing search instead of google

* Makes bing the default result provider and uses google and it's available

* Adds pagination to bing and replaces the $.get call with a $.ajax call

* front adjust

* bing limit pagination

* Adds break if there are less than 10 pages worth of results on bing search

* Adds proper google script ref and proper config id

* Removes console.log call
2018-08-16 11:47:07 -07:00
Chandan Kumar edeeac6368 Fix the content inside docs/home (#9458)
- fix button inside `I am` section in docs/home
- fix content inside `I want to` section in docs/home

Signed-off-by: chandan kumar <chandan.kr404@gmail.com>
2018-07-11 20:13:25 -07:00
Zach Arnold 2d302e6604 Fix Initial User Journey (#9141)
* remove the call to setup inital card state

* undo accidental checkin of file
2018-06-19 00:56:30 -07:00
Bjørn Erik Pedersen 7f3b633aa0 Convert site to Hugo (#8316)
This commit converts content and layout to use Hugo.
2018-05-05 09:00:51 -07:00