YOP-gallery is a library that allows easy creating pagination for content
To download the library you need to use cURL or Git with the commands in terminal:
To download repository with Git you need to open the terminal with supporting git and then run a command
git clone https://github.com/1mpossible-code/yop-gallery.git
Then you will have the versions in a such folders (P.S. the last version is 0.1)
Copy the script to your script folder:
cp yop-gallery/0.1/yop-gallery.min.js /your/path/
To download the minimal version of YOP-gallery use cURL by running command in terminal: Open your project script's folder:
cd /your/path/
and download YOP-gallery:
curl -O https://raw.githubusercontent.com/1mpossible-code/yop-gallery/master/0.1/yop-gallery.min.js
Link it in the footer NOT IN THE HEADER of your HTML file
<script src="/your/path/yop-gallery.min.js"></script>
Then you need to create elements:
- With class
yop_gal
(elements that will be paginated) - With id
yop-paginator
(If you need a button "show more") - With id
yop-navigation-paginator
(It's a paginator)
You can put the elements into other tags and give them few more classes, it will not break the program
You can see the example of using YOP-gallery in a folder exapmle
GitBook documentation coming soon
To edit preferences you have 3 options which situated on the start of the file yop-gallery.min.js
:
let maxPhotosImages=3,whatVisible=1,currentPage=1;
maxPhotosImages
is the number of max content blocks with classyop_gal
on a one pagewhatVisible
is the number of page that is visible right nowcurrentPage
is the number of active page
P.S. If you use different whatVisible
and currentPage
it can break the script!
- Minified version
- Object oriented version of program
- GitBook Documentation
- Easy configuring
- Contributing page
If you have a good idea or concept for the program, please contact the author
Now contributing page is not created.
If you want to contribute the project, contact the author
You can mail to 1mpossible@disroot.org
to contact the author
Copyright © 2020 1mpossible-code. This project is GPLv3 licensed.