kiwix / kiwix-tools

Command line Kiwix tools: kiwix-serve, kiwix-manage, ...
https://download.kiwix.org/release/kiwix-tools/
GNU General Public License v3.0
407 stars 79 forks source link

Improve initial landing page - format of tiles #653

Open eroyee opened 6 months ago

eroyee commented 6 months ago

With earlier versions of kiwix-serve the initial landing page would display 15 tiles in a 3x5 table format (11.6" screen) thus:

kiwix_small

In later versions, using the same screen, it's possible to see only 4, and about 3/4 of another four in a 4x 1-3/4 format:

kiwix_large

While the later format gives an extra column it takes much more away in terms of rows because of the much larger display size for each tile. As can be seen from the provided example there is much unused white space in the later form that contributes nothing to the user. I suspect that for some people this is a retrograde step, meaning they could need to scroll somewhat before finding the zim/tile they want for no evident advantage - in fact it seems rather inefficient to me.

I mentioned this here https://github.com/kiwix/kiwix-tools/issues/538#issuecomment-1169567036, and although I acknowledge that I was rather late in doing so there was no response so I'm not certain it was ever considered.

Therefore I bring this up again and ask whether there is a possibility that this could be addressed either by:

(1) reverting to the original panel sizing (even better with 4 columns) or (2) include a command-line switch option for the two layouts?

Possible (3): I see that in later versions of kiwix-serve there is a '-c' option for customIndex. It may be that I'm looking at this incorrectly, but if the matter could be addressed via this option I wonder if some kind person could provide an example of how the original layout format might be reproduced?

eroyee commented 6 months ago

I spent some time today messing around with the customIndex option.

From that I conclude that, if one knew what one was doing, it looks as if it should be possible to achieve something like the previous initial screen?

Interestingly I was able to get close to a simple index list of zims without any fancy icons etc, although this occurred as a result of my breaking something, rather than by design :) I will carry on with some experimenting and if anything useful comes from that will post about it, otherwise a little guidance on how to go about such changes would be useful I'm sure!

Note: I did follow the detail around customIndex in https://github.com/kiwix/libkiwix, however if I used the example code, with the example body text added, the result was a blank page.