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

slideshow auto refresh example #6

Open
lbesnard opened this issue Jul 30, 2021 · 0 comments
Open

slideshow auto refresh example #6

lbesnard opened this issue Jul 30, 2021 · 0 comments

Comments

@lbesnard
Copy link

this is fantastic! thanks so much for this. I always wanted to put a slideshow with piwigo on one of my old tablet gathering dust.

For others who might want to do the same thing (and aren't really familiar with php/html like me), I found that making this little html (based of course on your examples) with a refresh ever 10 seconds works beautifully. Could be worth maybe adding this as a use case in your examples?

<!DOCTYPE html>
<meta http-equiv="refresh" content="10" />

<html>
  <head>
    <meta charset="UTF-8" />
    <title>Random images</title>
  </head>
  <body>

    <div id="styled_random_image">
      <style type="text/css" scoped>
    /* Frame and margin around the image */
    #styled_random_image img {border: solid 1px grey; padding:5px; margin:5px;}
    /* Change opacity on mouse over */
    #styled_random_image img:hover {opacity: .8}
    #styled_random_image {text-align:right; display: inline; background-color: white;}
    /* Don't display the image on small screens */
    @media all and (max-device-width: 599px),
    all and (max-width: 599px)
    {
    #styled_random_image {display: none}
    }
      </style>
      <script type="text/javascript"
        src="//MYPIWIGO.COM/piwigo-random-backend.php?element_name=styled_random_image&amp;size=large"
          async>
      </script>
    </div>

  </body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant