mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-26 07:35:44 -03:00
feat: add back-to-top button and update its positioning
This commit is contained in:
@@ -260,8 +260,8 @@
|
|||||||
/* Back to Top Button */
|
/* Back to Top Button */
|
||||||
.back-to-top {
|
.back-to-top {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 20px;
|
bottom: 85px;
|
||||||
right: 20px;
|
right: 30px;
|
||||||
width: 36px;
|
width: 36px;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
|||||||
@@ -311,11 +311,8 @@ export function initFolderTagsVisibility() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function initBackToTop() {
|
export function initBackToTop() {
|
||||||
const button = document.createElement('button');
|
const button = document.getElementById('backToTopBtn');
|
||||||
button.className = 'back-to-top';
|
if (!button) return;
|
||||||
button.innerHTML = '<i class="fas fa-chevron-up"></i>';
|
|
||||||
button.title = 'Back to top';
|
|
||||||
document.body.appendChild(button);
|
|
||||||
|
|
||||||
// Get the scrollable container
|
// Get the scrollable container
|
||||||
const scrollContainer = document.querySelector('.page-content');
|
const scrollContainer = document.querySelector('.page-content');
|
||||||
|
|||||||
@@ -76,6 +76,11 @@
|
|||||||
{% include 'components/progress_panel.html' %}
|
{% include 'components/progress_panel.html' %}
|
||||||
{% block additional_components %}{% endblock %}
|
{% block additional_components %}{% endblock %}
|
||||||
|
|
||||||
|
<!-- Add back-to-top button here -->
|
||||||
|
<button id="backToTopBtn" class="back-to-top" title="Back to top">
|
||||||
|
<i class="fas fa-chevron-up"></i>
|
||||||
|
</button>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{% if is_initializing %}
|
{% if is_initializing %}
|
||||||
<!-- Show initialization component when initializing -->
|
<!-- Show initialization component when initializing -->
|
||||||
|
|||||||
Reference in New Issue
Block a user