chore: another attemp
Browse files
app.py
CHANGED
@@ -538,18 +538,23 @@ CSS = """
|
|
538 |
"""
|
539 |
back_to_top_btn_html = '''
|
540 |
|
541 |
-
<
|
542 |
-
|
|
|
543 |
|
|
|
544 |
function scrollToTop() {
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
|
|
|
|
550 |
}
|
551 |
</script>
|
552 |
|
|
|
553 |
'''
|
554 |
|
555 |
if __name__ == "__main__":
|
|
|
538 |
"""
|
539 |
back_to_top_btn_html = '''
|
540 |
|
541 |
+
<button onclick="scrollToTop()" style="color:white; text-decoration:none;">
|
542 |
+
Back to Top!
|
543 |
+
</button>
|
544 |
|
545 |
+
<script>
|
546 |
function scrollToTop() {
|
547 |
+
// Check if the parentIFrame exists and use it for scrolling if available
|
548 |
+
if ('parentIFrame' in window) {
|
549 |
+
window.parentIFrame.scrollTo({top: 0, behavior: 'smooth'});
|
550 |
+
} else {
|
551 |
+
// Use the standard scrollIntoView method for scrolling
|
552 |
+
document.documentElement.scrollIntoView({behavior: 'smooth'});
|
553 |
+
}
|
554 |
}
|
555 |
</script>
|
556 |
|
557 |
+
|
558 |
'''
|
559 |
|
560 |
if __name__ == "__main__":
|