Website Gallery Template
A downloadable website assets package
This set of fully customizable HTML, CSS and JavaScript template files creates a sleek gallery to showcase your art and photos on your personal website!
Includes a demo of how the template can be used as well as a blank version!
Features:
- Responsive layout for mobile and desktop
- Dark mode
- Tagging and filtering system
- Detailed view when clicking on an item
- Keyboard support for switching between pictures with the arrow keys
- "To top"-button that appears after scrolling down
Also available on my ko-fi shop! This pack is available for free, but if you enjoy what I've made then I'd hugely appreciate a tip <3
| Status | Released |
| Category | Tool |
| Release date | Sep 11, 2024 |
| Rating | Rated 5.0 out of 5 stars (7 total ratings) |
| Author | werewolf-girlfriend |
| Tags | Internet, neocities, resources, web |
| Code license | GNU General Public License v3.0 (GPL) |
| Asset license | Creative Commons Zero v1.0 Universal |
| Average session | A few seconds |
| Languages | English |
| Content | No generative AI was used |
Download
Install instructions
Thank you for choosing to download my template!!
The template .zip contains:
- index.html and blank.html: a demo of how the template can be used, and a blank version you can fill out!
- gallery.css: a basic style for the .html files, but you can go crazy with it!
- gallery.js: provides the interactive parts of the gallery, including the tag system and detailed view for the gallery items!
- "img" folder: contains some example images for the demo :)
This template is a complete package and can readily be added to your personal website (potentially inside a subdirectory) as is!
I have included instructions on how to use the template within the HTML code of the demo file (index.html) itself! If anything is unclear then feel free to leave a comment here or contact me, and I might be able to help :)
Happy websiting!
Development log
- Version 1.1 - small update!Oct 02, 2024





Comments
Log in with itch.io to leave a comment.
hello! this is probably a really stupid question i know exactly 0 about coding or anything, but how do i add more images to the code? ๐ every time i try to copy and paste the code for the image to the end there's an error and every time i try to put one in the middle the lightbox doesn't work... sorry for the dumb question ๐
Not a dumb question at all! I think we've all been there when starting out :)
Since I can't see your code nor the error you're getting I can't concretely say what's going wrong, and since web development relies on a lot of different things working together, there's many places where the issue could stem from! Off the cuff I suggest checking that the syntax of your HTML file is correct (do all element tags close properly, for example), and that you aren't inadvertently trying to do something HTML isn't designed to allow (having multiple elements with the same id-attribute, for example). You should also check that the path/link to your image works correctly; I believe that the path/link needs to lead directly to an image file for the HTML to know what to output, so your path/link should end with a file extension such as ".png"/".jpeg"/".webp", to name a few.
The way I intended for adding more images to the gallery to work, is for a user to add more copies of the "<div class="item">"-object that sits right inside the main <div id="gallery">-object. The copies of the item-div should all sit within the gallery-div, and there shouldn't be multiple gallery-divs. Within a freshly copied, blank item-div you should be able to fill out the src-attribute in the <img class="item-img">-element with the path/link to the image, which should make your image show up in the gallery upon a refresh of the webpage (assuming that you have a way to view the webpage as you work on it - it's a very helpful feature!). By default, you shouldn't need to alter the HTML for the lightbox at all.
That's all I can think off of the top of my head, I hope you can find a solution to your issue :) If you need more help with coding in the future, then I recommend getting as specific/precise as possible when describing what you're trying to do and what error you're getting; ideally include screenshots of the code that isn't working, if you're able to. It's the fastest way to get good feedback in my experience!
yeah, i was doing that but it wasnt working for some reason... i just redid and tested it with the blank code and it worked so i think i might have deleted or added something somewhere somehow ToT but thank you! other than that its been super easy to mess with so thank u ๐๐
Aw I'm glad to hear you got it solved!! Good luck with the rest as well :D
hi! first off, thank you so so much for providing such an amazing resource and providing support on it, means the world. and as for my question, i wanted to know if there is a way to make the tags shown on an image work the way the tags on top do?
Hi!! Thank you so much, I'm really happy to hear that my little template has been helpful :D
I've also thought about whether it would be possible to make the tags shown in the lightbox function the same as the list of tags on the gallery view... I think it would take a bit of work with the javascript to make sure no weird side-effects come from the change, but it should be possible to make it work! Although it's not a feature I've looked into much, so it could either be simpler or more difficult than what I'm imagining ^^;
I'll keep it in mind for the next time I get to sit down and work on version 2.0 of the template :) (it might be a while yet, hah... busy life!)
hi is there a way to have multiple galleries on one page? or to create sections? idk i'm just trying to find a way to collapse sections of my gallery to make it more organized when coding. i cant have <section>, <article>, or other divs inside the gallery div without breaking it.
Hi! The way I originally wrote the template I only intended for there to be one gallery per page, but I think having multiple galleries on one page should be possible. How much work it will take to implement it will depend on whether you want the galleries to be fully distinct from each other, or if just "visually" breaking up one large gallery would be satisfactory.
By "fully distinct galleries" I mean each gallery on your page has their own separate list of tags and their own list of items that belong to that specific gallery - for this I think you'll need to adapt the Javascript and HTML files of the template to accommodate this behaviour.
If you don't need the sections of the gallery on the page to be divided that harshly, then you can use a single, large gallery with, for example, headers and <div>s to visually break up the items in the gallery. I've seen this done on a couple of the pages that use the template; zhongvie's gallery is a good example.
That's about all I can say as a general answer, I hope you can find a good solution to your problem ^_^
i may try something like zhongvie and see if that works for me. thanks for the suggestion. idk javascript well enough to mess with it successfully.
This is seriously a lifesaver!! We know nothing about javascript, and somehow this template is even easier than all the other templates weโve seen that use javascript: you can just add a new tag, and it works right then and there! Wow!
This is amazing!! Do you think there will be any support for content warnings in the future? Some of my art I'd like to add warnings to before people click on them
Thank you!! I haven't had the time to develop this template further since releasing version 1.1, but if I come back to it one day then I'll keep content warnings in mind!
I've seen others use the template on several gallery subpages and then attaching warnings to the links between them, which could be one way of implementing content warnings. You're welcome to modify the template and javascript files if you can envision a better solution, of course :)
Thank you for giving my humble template a shot either way! May it serve you well