Fix language selector issue

The language selector is not working. We are getting ERR_CONNECTION_CLOSED
when fetching jquery-3.3.1.min.js from code.jquery.com. The failure of
jquery is breaking other scripts such as jquery-ui-1.12.1.min.js,
script.js, bootstrap.min.js etc.

This PR changes the head partial to use cached version of
jquery-3.3.1.min.js in hope we fix the language selector issue and
possibly other relate problems.
This commit is contained in:
Qiming Teng 2020-07-18 20:09:24 +08:00
parent 1943aaafd6
commit 026989d5c5
2 changed files with 4 additions and 4 deletions

View File

@ -34,7 +34,7 @@
{{ end }}
{{ partialCached "head-css.html" . "asdf" }}
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
src="{{ "js/jquery-3.3.1.min.js" | relURL }}"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
{{ if and (.Site.Params.offlineSearch) (not .Site.Params.gcs_engine_id) }}

View File

@ -1,6 +1,6 @@
{{/* Link directly to documentation etc., if possible. */}}
{{ $langPage := cond (gt (len .Translations) 0) . .Site.Home }}
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ $langPage.Language.LanguageName }}
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownMenuLink">