LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   HTML website navigation structure help (https://www.linuxquestions.org/questions/linux-newbie-8/html-website-navigation-structure-help-4175548493/)

Daravon 07-20-2015 09:12 PM

HTML website navigation structure help
 
I have a few years of experience coding basic HTML-related stuff on webservers, whether writing basic static webpages or perl/javascript reports, always basic reports, always oriented to "bite size" single pages that are easy to link to from a "link farm" index page. However I'm becoming interested in longer web documents.

I recently started a project to digitize a large collection of film negatives. The images will be automatically uploaded to my webserver, and I want to be able to browse through the pictures on the web. Sure there are probably web frameworks or CMS's that automagically do slideshows etc., but for pedagogical and stubbornness reasons I'm specifically interested in how to do this with plain-Jane HTML. I'm going to have a script to automatically upload the pictures as I scan them; I have freedom to create any filenames that I want, generating thumbnails is no big deal, and it's no problem to generate HTML pages to go with them, but I need to have some idea of a sane navigation structure in mind first. I would like this archive to be something I can add to for years to come.

I look at websites like this one, and I like how they have a main index page that links to each topic, while each topic itself has "next", "previous", "home" links on it, so it's almost like paging through a slideshow. This appeals to me in being simple and fast.

http://www.tldp.org/LDP/abs/html/regexp.html

I could do something like this in my film digitization project by generating and uploading an html document with every picture or every group of N pictures. I can have an incrementing number in the image filenames, so that I can populate the "next" and "previous" links correctly etc. Creating N static html pages for N images will be easy to do, but if I'm overlooking an opportunity to do this a smarter way I would like input. Does this make sense? This will form something like a linked list of html pages which COULD become a maintenance nightmare if I delete an image or something. PHP can do directory listing, for example, and then I could maybe have only one PHP page that would act as a slideshow providing, as in the static html case, I impose a sensible filename convention.

I prefer to avoid using any frameworks or CMS's, or databases if possible, because I just like to run as bare-bones as possible.

JaseP 07-21-2015 01:06 AM

I am not sure why you want to create static HTML pages, when you can,... using PHP,... create a template for dealing with the directory structure you are trying to create, on the fly, with specific PHP code for dealing with different use cases (adding images, deleting images, etc.). ?!?! Makes sense,.. No?!?!

Sefyir 07-21-2015 11:06 AM

Maybe a static website generator like nanoc?

Done right, it should give you the control you want and the automation to make it easier to maintain.
You can define the layout in a single file - so a next, previous, etc shouldn't be a problem.

Since you're dealing with negatives it seems like you could follow a online comic structure.
Each page is similar with slightly different content (title, image) and increments up.
xkcd is a good example.

dugan 07-21-2015 11:35 AM

This should do most of what you want:

https://larsjung.de/h5ai/


All times are GMT -5. The time now is 05:08 AM.