kensanata / sitelen-mute

a static image gallery creator
https://alexschroeder.ch/software/Sitelen_Mute
GNU General Public License v3.0
75 stars 7 forks source link

No JavaScript version in noscript.html via URL redirected from index.html? #6

Closed 0-ast-0 closed 6 years ago

0-ast-0 commented 6 years ago

In the recent merge (what I called "from pkgsrc") there were some loose ends... The most obvious one to be cleaned up is the decision on JavaScript-impaired. I have left in both variants but that should not be the final "2.0.0" (or whatever) release of this new-fangled fgallery.

My design decision to go with a separate file was so that index.html can be static and canned in a static area (the shared/fgallery/view directory). The noscript.html file is generated by the Perl script and mimics what JS does using the data.json file. The noscript.html might want some "social media" additions although I actually doubt anyone could ever use social media portals without JS enabled ;-).

I'll leave the final decision to Alex how he wants to do that but fgallery really needs only one non-JS mechanism.

kensanata commented 6 years ago

Can you explain the benefit of keeping noscript.html separate from index.html again? Here are the drawbacks I see right now:

That's why I think we should write data into the noscript tags of index.html. Is there a benefit I'm not seeing?

0-ast-0 commented 6 years ago

Your points are valid (even the lynx one;-) With JS, index.html can be completely static as the “src” is in data. json; hence it can be in view/ subdir and symlinked into dir above. That is why I split non-JS off into noscript.html which can be tested/viewed with JS left enabled. In this sense data.json and noscript.html are the “src”. My thinking was that there might be different flavors of noscript.html (which would give rise to different view/index_flavors.html and the “chosen” one would be symlinked into ../index.html

kensanata commented 6 years ago

I reverted the separate noscript.html file with d4471a3.

  1. The index.html already contains individual content if you provide --title, --description and --url.
  2. I don't like the redirect.
  3. I'm willing to accept the increase in unused plain HTML payload because it's is small compared to the images themselves.