kiwix / libkiwix

Common code base for all Kiwix ports
https://download.kiwix.org/release/libkiwix/
GNU General Public License v3.0
112 stars 55 forks source link

No JS fallback for kiwix-serve welcome page #615

Closed rgaudin closed 1 year ago

rgaudin commented 2 years ago

The new kiwix-serve UI is more practical but it's now impossible to use kiwix-serve without JS enabled.

There are many ways to solve this but if we consider no-js to be an edge case, we could, at least have a <noscript /> tag pointing to a separate endpoint with a static list of contents.

Screen Shot 2021-09-13 at 10 25 23
thavelick commented 2 years ago

@kelson42 - I'd be happy to work on this if there's need and no one else is tackling it. I've been considering updating kiwix-serve to do something like this regardless.

kelson42 commented 2 years ago

@thavelick Yes, you are welcome to work on this ticket.

mgautierfr commented 2 years ago

we could, at least have a \

We don't have this static list now (except raw xml catalog opds feed)


Somehow related to #716, if we don't have js support, we probably want to have this list to point to the "nojs viewer" (raw content) of the zim. Don't know where/when to handle this, but to keep in mind.

kelson42 commented 2 years ago

@thavelick Any news?

kelson42 commented 1 year ago

I guess, @thavelick has abandonned the idea to propose an alternative here. We should really define what we want to build exactly.

mgautierfr commented 1 year ago

We don't have this static list now (except raw xml catalog opds feed) Don't know where/when to handle this, but to keep in mind.

I now have something in mind 🙂

The current frontpage is a js page which does specific request to opds catalog, parse the xml result and render the what is parsed dynamically. We could simply render the catalog "odps" feed with hmtl. The opds catalog is rendered to xml using OpdsDumper which is using mustache templates to generate xml. If we use different templates, we should be able to generate html/css content without too much trouble on our side. User would simply directly browse the (user friendly view of the) catalog.

We may loose some features (as the list of categories) but it should mostly works.


veloman-yunkan commented 1 year ago

We could simply render the catalog "odps" feed with hmtl.

@mgautierfr If I read that sentence literally, I think that hardly there is anyone who can do it at all :wink:

kelson42 commented 1 year ago

I'm not sure where everywhere there is javascript. But could we maybe first implement #750 in C++ (instead of the js we have currently) first? This would be better from a UX as well.

juuz0 commented 1 year ago

Following mgautierfr's words above, I was able to get the same design of tiles without JS (injecting details using mustache in html file): image

Haven't looked into how language/category filtering concretely for this. But maybe a <a> link for every language/category filtered catalog? Needs discussion here

Current draft: #897

kelson42 commented 1 year ago

Bravo @juuz0 !

juuz0 commented 1 year ago

Yay, finally! :confetti_ball: