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:
parent
1943aaafd6
commit
026989d5c5
|
@ -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) }}
|
||||
|
@ -84,4 +84,4 @@
|
|||
|
||||
<script src="{{ "js/script.js" | relURL }}"></script>
|
||||
{{ with .Params.js }}{{ range (split . ",") }}<script src="{{ (trim . " ") | relURL }}"></script><!-- custom js added -->
|
||||
{{ end }}{{ else }}<!-- no custom js detected -->{{ end }}
|
||||
{{ end }}{{ else }}<!-- no custom js detected -->{{ end }}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{{/* 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">
|
||||
{{ range $langPage.Translations }}
|
||||
<a class="dropdown-item" href="{{ .RelPermalink }}">{{ .Language.LanguageName }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue