Related T1477
Details
Details
- Reviewers
anlambert - Group Reviewers
Reviewers - Commits
- rDWAPPSa9ea27d2ca89: Hide back-to-top when on top
Diff Detail
Diff Detail
- Repository
- rDWAPPS Web applications
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Comment Actions
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/450/ for more details.
swh/web/templates/layout.html | ||
---|---|---|
214–222 ↗ | (On Diff #4975) | Apart script that require input embedded in the Django templates, Javascript code should be handled by webpack. Thus this implementation should be moved in the file assets/src/bundles/webapp/webapp-utils.js at the end of the $(document).ready() callback starting at line 58. All JS code handled by webpack can use jQuery and ES6 syntax so I would rather use the following implementation here: let scrollThreshold = 0; scrollThreshold += $('.swh-top-bar').height() || 0; scrollThreshold += $('.navbar').height() || 0; $(window).scroll(() => { if ($(window).scrollTop() > scrollThreshold) { $('#back-to-top').css('display', 'block'); } else { $('#back-to-top').css('display', 'none'); } }); |
Comment Actions
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/451/ for more details.