Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add button back to top of report #198

Merged
merged 1 commit into from
Jul 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ <h1 class="pf-c-title pf-m-4xl">{{ self.title() }}</h1>

{% endblock %}
</div>
<div id="back-to-top-button" class="pf-c-back-to-top" style="visibility: hidden;">
<a class="pf-c-button pf-m-primary" href="#top">
Back to top
<span class="pf-c-button__icon pf-m-end">
<i class="fas fa-angle-up" aria-hidden="true"></i>
</span>
</a>
</div>
</section>
<footer class="pf-c-page__main-section pf-m-no-fill">
<div class="footer-content">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ document.querySelector('main').addEventListener('scroll', () => {
if ((window.innerHeight + window.scrollY) >= document.body.offsetHeight) {
show_next_rules();
}
document.getElementById('back-to-top-button').style.visibility = 'visible';
}, false);

function show_next_rules() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
{% block content %}

{% if report.profile_info.title|length and report.profile_info.description|length -%}
<h2 class="pf-c-title pf-m-3xl">About profile</h2>
<h2 id="top" class="pf-c-title pf-m-3xl">About profile</h2>
<br>
{% include 'profile_info.html' %}
<br>
Expand Down