Move support-specific script into support form lego

Context: tpo/web/lego#58
This commit is contained in:
kez 2022-12-20 11:00:31 -08:00
parent b57eb8153b
commit 86f94a89e7
3 changed files with 13 additions and 1 deletions

View File

@ -0,0 +1,11 @@
// Coming from search result page click
if(window.location.hash !== "") {
// Somehow collapse is not working sync and calling show directly after
// yields no effect and there is no callback when it is ready
setTimeout(() => {
// Folds out the answer manually
$(window.location.hash).collapse('show')
// Avoids the answer being hidden by the floating header
window.scrollTo(0, $(window.location.hash).position().top)
}, 500)
}

2
lego

@ -1 +1 @@
Subproject commit eed421981c7524670c61b0d5143f8670fa7631d5
Subproject commit 05e0f876a860783799530e16391d7ad39ca68ce9

View File

@ -5,6 +5,7 @@
<meta name="description" content="{{ _('Defend yourself against tracking and surveillance. Circumvent censorship.') }} | {{ this.title }}">
<link rel="stylesheet" href="{{ '/static/css/bootstrap.css'|asseturl }}">
<link rel="stylesheet" href="{{ '/static/fonts/fontawesome/css/all.min.css'|asseturl }}" rel="stylesheet">
<script src="{{ '/static/fix-scroll.js'|asseturl }}" ></script>
<!-- Standard favicon -->
<link rel="icon" type="image/x-icon" href="{{ '/static/images/favicon.ico'|asseturl }}">
<!-- Recommended favicon format -->