Skip to content

Commit

Permalink
mermaid: remove jQuery matcornic#452
Browse files Browse the repository at this point in the history
  • Loading branch information
McShelby committed Feb 4, 2023
1 parent 03c2bf5 commit 5f7df12
Show file tree
Hide file tree
Showing 16 changed files with 56 additions and 649 deletions.
8 changes: 8 additions & 0 deletions exampleSite/content/basics/migration/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ This document shows you what's new in the latest release. For a detailed list of

## 5.11.0 (not yet released)

- {{% badge style="note" title=" " %}}Change{{% /badge %}} The theme removed the popular [jQuery](https://jquery.com) library from its distribution.

In case you made changes to the theme that are dependend on this library you can place a copy of jQuery into your `static/js` directory and load it from your own `layouts/partials/custom-header.html` like this:

````html
<script src="{{"js/jquery.min.js"| relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" defer></script>
````

- {{% badge style="note" title=" " %}}Change{{% /badge %}} In the effort to comply with WCAG standards, the implementation of the [`expand` shortcode]({{% relref "shortcodes/expand" %}}) was changed. The functionality of the new implementation does not work with old browsers (Internet Explorer 11).

- {{% badge style="note" title=" " %}}Change{{% /badge %}} The JavaScript code for handling image lightboxes (provided by [Featherlight](https://noelboss.github.io/featherlight)) was replaced by a CSS-only solution.
Expand Down
11 changes: 9 additions & 2 deletions exampleSite/content/more/credits/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,16 @@ Many thanks to [Andy Miller](https://github.com/rhukster) for initially creating

- [autoComplete](https://github.com/Pixabay/JavaScript-autoComplete) - A lightweight and powerful vanilla JavaScript completion suggester
- [clipboard.js](https://clipboardjs.com) - A modern approach to copy text to clipboard
- [d3-zoom](https://github.com/d3/d3-zoom) - Pan and zoom SVG, HTML or Canvas using mouse or touch input - plus dependencies
- [d3-color](https://github.com/d3/d3-color) - Color spaces! RGB, HSL, Cubehelix, CIELAB, and more
- [d3-dispatch](https://github.com/d3/d3-dispatch) - Register named callbacks and call them with arguments
- [d3-ease](https://github.com/d3/d3-ease) - Easing functions for smooth animation
- [d3-interpolate](https://github.com/d3/d3-interpolate) - Interpolate numbers, colors, strings, arrays, objects, whatever
- [d3-selection](https://github.com/d3/d3-selection) - Transform the DOM by selecting elements and joining to data
- [d3-timer](https://github.com/d3/d3-timer) - An efficient queue for managing thousands of concurrent animations
- [d3-transition](https://github.com/d3/d3-transition) - Animated transitions for D3 selections
- [d3-drag](https://github.com/d3/d3-drag) - Drag and drop SVG, HTML or Canvas using mouse or touch input
- [Font Awesome](https://fontawesome.com) - The internet's icon library and toolkit
- [jQuery](https://jquery.com) - The "Write less, do more" JavaScript library
- [jquery-svg-zoom-pan](https://github.com/DanielHoffmann/jquery-svg-pan-zoom) - A jQuery plugin to enable pan and zoom in SVG images
- [Lunr](https://lunrjs.com) - Enables a great search experience without the need for external, server-side, search services
- [Lunr Languages](https://github.com/MihaiValentin/lunr-languages) - A collection of languages stemmers and stopwords for Lunr Javascript library
- [MathJax](https://mathjax.org/) - Beautiful math and chemical formulae in all browsers
Expand Down
10 changes: 9 additions & 1 deletion layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,15 @@
{{- end }}
{{- $wantsMermaid := or (.Page.Store.Get "hasMermaid") (and (.Page.Store.Get (printf "%sIsNested" $outputFormat)) (.Page.Store.Get "nestedHasMermaid")) }}
{{- if $wantsMermaid }}
<script src="{{"js/jquery.svg.pan.zoom.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>
<script src="{{"js/d3/d3-color.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>
<script src="{{"js/d3/d3-dispatch.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>
<script src="{{"js/d3/d3-drag.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>
<script src="{{"js/d3/d3-ease.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>
<script src="{{"js/d3/d3-interpolate.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>
<script src="{{"js/d3/d3-selection.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>
<script src="{{"js/d3/d3-timer.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>
<script src="{{"js/d3/d3-transition.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>
<script src="{{"js/d3/d3-zoom.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>
{{- if isset .Params "custommermaidurl" }}
<script src="{{ .Params.customMermaidURL }}" defer></script>
{{- else if isset .Site.Params "custommermaidurl" }}
Expand Down
1 change: 0 additions & 1 deletion layouts/partials/stylesheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,4 @@
{{- end }}
window.variants && variants.init( [ {{ delimit $quotedthemevariants ", " | safeJS }} ] );
</script>
<script src="{{"js/jquery.min.js"| relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" defer></script>
{{- end }}
2 changes: 2 additions & 0 deletions static/js/d3/d3-color.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions static/js/d3/d3-dispatch.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5f7df12

Please sign in to comment.