Page 1 of 1

Footer button up

Posted: 27 Jul 2017, 11:23
by Kat
Hello Karl,

Is there is a way to add a button "up" for a gallery,  in a sidebar layout like in topbar layout ?

Also did you considered a "load more" or pagination for long gallery ?

Thank's 

Re: Footer button up

Posted: 28 Jul 2017, 00:21
by mjau-mjau
Kat wrote:Is there is a way to add a button "up" for a gallery,  in a sidebar layout like in topbar layout ?
Good observation. I will add this to next release ... Until then, it would have to be custom javascript + CSS.
Kat wrote:Also did you considered a "load more" or pagination for long gallery ?
Yes, but I'm not convinced. X3 already loads images only once they are scrolled into view, and I don't really see how "load more" will offer any benefits. Sounds like "I want to scroll to the footer of page without having to load all images", which in itself is not a logical requirement. Pagination is a bit of an outdated concept, and would require page URL's to reflect upon this, for example /gallery/holidays/{page-number}/ (bad for SEO, URL referencing and caching concepts).

All in all, there may be a few arguments to consider "load more", but there are also many CONS.

Re: Footer button up

Posted: 28 Jul 2017, 06:28
by Kat
mjau-mjau wrote: Good observation. I will add this to next release ... Until then, it would have to be custom javascript + CSS.
Thank you for that ! In the meantime can you please help me to implement custom javascript and  css and in which module to add the css tag ?
Not sure it's right thing to do and what next ?
Code
.footerup {
    position: absolute;
    width: 100%;
    top: 0;
} 
.footerup button {
    color: inherit;
    border-radius: 0 0 60px 60px;
    height: 30px;
    width: 60px;
    font-size: 1.6em;
    padding-bottom: 5px;
    background-color: #151b1e;
}
mjau-mjau wrote: All in all, there may be a few arguments to consider "load more", but there are also many CONS.
I understand. I already asked this in "new feature" and here something similar was asked https://forum.photo.gallery/viewtopic.php?f=57&t=9142

Re: Footer button up

Posted: 28 Jul 2017, 12:37
by mjau-mjau
Kat wrote:In the meantime can you please help me to implement custom javascript and  css and in which module to add the css tag ?
Not sure it's right thing to do and what next ?
Code
.footerup {
    position: absolute;
    width: 100%;
    top: 0;
} 
.footerup button {
    color: inherit;
    border-radius: 0 0 60px 60px;
    height: 30px;
    width: 60px;
    font-size: 1.6em;
    padding-bottom: 5px;
    background-color: #151b1e;
}
Where did you get this code? Did you somehow add the html also? If it already displays a fixed button to your liking, then we can work with that. It would be a simple fix, as I don't have resources to write a dedicated custom "scroll to top" plugin per forum request, which would need 1. Custom HTML injected, 2. Custom CSS to fix the button to a specific location and 3. Javascript to target the button and cause a scroll-to-top on click, and 4. Ultimately it should exhibit smart behavior to not scroll to top if it's already almost at top.

Re: Footer button up

Posted: 28 Jul 2017, 19:03
by Kat
mjau-mjau wrote:Where did you get this code? Did you somehow add the html also? If it already displays a fixed button to your liking, then we can work with that. It would be a simple fix, as I don't have resources to write a dedicated custom "scroll to top" plugin per forum request, which would need 1. Custom HTML injected, 2. Custom CSS to fix the button to a specific location and 3. Javascript to target the button and cause a scroll-to-top on click, and 4. Ultimately it should exhibit smart behavior to not scroll to top if it's already almost at top.
I inspected the html code from a topbar layout page which is
Code
<div class="up">
<button style="display: inline-block;">::before</button>
</div>
and wanted adapt a custom css. But i don't know how and where to add this html to display the button. I understand that you can't write a dedicated custom code.

Thank you anyway for your answer.  I will wait your next update and hopefully find this feature for the sidebar layout as well.

Re: Footer button up

Posted: 28 Jul 2017, 23:43
by mjau-mjau
Thanks, I think better wait until next update ... The scroll-button for topbar layout is attached to footer, so for sidebar layouts, it will have to be re-designed so to speak and implemented into the templates. I would probably just create a small half-circle "up" button attached to the very bottom of page.

I could create a separate "scroll-to-top plugin" similar to the one used in control panel. The button itself is fixed bottom right (always visible on page, unless scroll position is at top), but I am not sure this is necessary.

Re: Footer button up

Posted: 29 Jul 2017, 09:12
by Kat
mjau-mjau wrote:I would probably just create a small half-circle "up" button attached to the very bottom of page.
I give my vote for this cleaner solution, without the distraction of the fixed bottom right always visible
mjau-mjau wrote: The button itself is fixed bottom right (always visible on page, unless scroll position is at top), but I am not sure this is necessary.
I agree with you that this is not necessary 

Thank you in advance Karl

Re: Footer button up

Posted: 25 Nov 2017, 11:30
by mjau-mjau
FYI, "scroll to top" button is now added to sidebar and slidemenu layouts since X3.24.0.
https://forum.photo.gallery/viewtopic.php?f=51&t=9445