Commit Graph

62 Commits

Author SHA1 Message Date
66c40817ee Fix the OPDS stream to handle custom ROOT prefix
As we render the entry's xml in a separated steps, we need to pass the
rootLocation to all the internal rendering.

Testing with and without root is not so easy.
I've simply made all server tests using a ROOT prefix.
We can assume that if the ROOT is present everywhere we need it, it will not
when we don't need. (As long as we don't hardcode "ROOT" in the server.)
2022-01-04 11:15:18 +01:00
22e5327dcf Do not create a dummy illustration if library.xml doesn't contain one.
Fix #644
2022-01-04 11:12:32 +01:00
f7b853373c Less confusing 404 errors from /random endpoint
Before this fix the /random endpoint could return a 404 Not Found page
saying

  The requested URL "/random" was not found on this server.

Error cases producing such a result were:

- `/random?content=NON-EXISTING-BOOK` (can happen when a server is
restarted or the library is reloaded and the current book is no longer
available).

- Failure of the libkiwix routine for picking a random article.

Now a proper message is shown for each of those cases.
2021-12-22 17:12:34 +01:00
ab53e0cff1 Improve kiwix-serve topbar accessibility 2021-12-11 14:56:51 +01:00
db06b6b797 Renave static/home.css to static/index.css 2021-11-16 12:10:15 +00:00
c0bda426b4 Removed duplication across two mustache templates
Deduplicated the mustache templates static/templates/catalog_v2_entries.xml
and static/templates/catalog_v2_complete_entry.xml (the latter was
renamed to static/templates/catalog_v2_entry.xml).
2021-09-09 12:19:22 +04:00
b3f7556096 Added partial entries feed to the OPDS root feed 2021-09-09 12:19:22 +04:00
4c657c082e /catalog/v2/partial_entries OPDS API endpoint 2021-09-09 12:19:22 +04:00
e773a29f29 Rearranged elements in OPDS entry XML 2021-09-09 12:19:22 +04:00
e15a0f4338 /catalog/v2/entry/<entry_id> OPDS API endpoint 2021-09-09 12:19:22 +04:00
12d9b69806 OPDSDumper::dumpOPDSCompleteEntry() 2021-09-09 12:19:22 +04:00
5e8f3a5505 added use of lang and category api for select boxes on welcome page 2021-08-07 02:39:50 +05:30
e5168d8b3d Support for multiple illustrations in OPDS entry 2021-08-05 22:21:13 +04:00
ab3095745e Languages OPDS feed includes book counts 2021-08-03 11:32:38 +02:00
45adda44b3 Got rid of <content> node in languages OPDS entry 2021-08-03 11:32:38 +02:00
8a4248e48e Language code in /catalog/v2/languages entries 2021-08-03 11:32:38 +02:00
5f90f5ee2a Preliminary version of /catalog/v2/languages 2021-08-03 11:32:38 +02:00
b2027b397c List of languages entry in /catalog/v2/root.xml
Added a new entry in /catalog/v2/root.xml that points to a
not-yet-existing list of languages navigation feed.
2021-08-03 11:32:38 +02:00
646502f9cf changed font style for modal 2021-07-13 20:00:43 +05:30
a8a96a99f4 corrected working of magnet link 2021-07-13 00:23:38 +05:30
a517d3b529 added modal for downloading zim file on welcome page 2021-07-12 17:59:26 +05:30
2ed9a50eca fixed button allignment 2021-07-08 12:33:28 +02:00
ad7a63a471 minor change in UI 2021-07-08 12:33:28 +02:00
0590f27fa1 corrected select box and search bar design 2021-07-08 12:33:28 +02:00
2effb3490e minoor changes in responsive behaviour 2021-07-08 12:33:28 +02:00
55672b0288 revamped basic layout and cards 2021-07-08 12:33:28 +02:00
8d39b2c4c1 Added content ZIM home button on 404 2021-06-17 12:51:27 +05:30
78083f1f4a Moved OPDS templates under static/templates 2021-06-08 20:37:00 +04:00
1ccafe2d97 minor changes in fadeout effect 2021-06-07 15:38:31 +02:00
d6c62b3cd3 corrected spinner and fadeout effect 2021-06-07 15:37:20 +02:00
f39c558d2a added fade out 2021-06-07 15:37:20 +02:00
5b46ad5934 added spinned 2021-06-07 15:37:20 +02:00
49dbd0aa52 fixed reset filters link 2021-06-07 15:37:20 +02:00
179f0faeb1 added minor features 2021-06-07 15:37:20 +02:00
bb92f26b60 added filter functionality 2021-06-07 15:37:20 +02:00
063bb8cd65 added dynamic and subset loading of zim-files in kiwix-serve 2021-06-01 19:33:42 +05:30
2736a46cfe Revert "Kiwix Serve welcome page dynamic and subset loading (OPDS based)" 2021-05-25 17:30:05 +02:00
012973d14a added dynamic and subset loading of zim-files in kiwix-serve 2021-05-25 02:41:12 +05:30
5fdc51b23e fixed suggestion system 2021-04-28 14:34:24 +02:00
611146aa37 Added Search Link for bad bookName/articleName on 404 2021-04-12 21:31:47 +05:30
5cb276a933 adding kind and path attributes to suggest response object and using it in autocomplete 2021-04-07 21:04:33 +05:30
c557bb271b injecting root link directly and renamed head_part to head_taskbar 2021-03-24 02:10:16 +05:30
fb26f6b9c5 moved autocomplete from head_part.html to taskbar.js 2021-03-15 18:10:10 +05:30
c7d77395e7 label field of suggestions is also HTML escaped
Without this if the suggestion text contains a double quote, the
response stops being a valid json.
2021-03-04 14:18:58 +01:00
a7fea462b0 HTML decoding of suggestions in the frontend
Since the `value` field of the search suggestion results is HTML
escaped/encoded in the backend (see static/templates/suggestion.json) it
must be decoded in the frontend.
2021-03-04 14:18:58 +01:00
eea10ec3f5 Typo fix in error message 2021-02-09 09:38:18 +01:00
1657b1744c Set fixed size for favicon in home page listing
While [spec](https://wiki.openzim.org/wiki/Metadata#Favicon) says that the favicon
should be a 48x48 image, ZIM creators might not respect it.

If a ZIM contains a larger favicon, the UI is broken. This fixes it ans ensures all
favicon have equal sizes, removing the unpleasing lack of harmony that we can see sometimes.

Note that ZIM will smaller size favicon would get blurry as those would be upscaled.
2020-08-12 14:47:37 +02:00
c74b935a9b added pageLength for search_pagination 2020-08-12 02:08:02 +05:30
34a8144f51 cleaned-up external link blocker page
- removed useless JS/CSS
- set specific title
2020-03-30 14:42:51 +00:00
d04d9bf7f3 Unblock external link in catch page in JS code
Instead of disabling the blocking for the handler, the JS code detects it is
displaying the handler and allows external links to go through
2020-03-27 12:26:22 +00:00