Commit graph

28 commits

Author SHA1 Message Date
Alex Cabal
7da87bf9e2 Use enums for HTTP methods in search forms 2025-03-31 12:05:32 -05:00
Alex Cabal
124e8343fc Completely type hint template functions and switch to named arguments 2025-03-04 20:32:20 -06:00
Mike Colagrosso
55e0428006 Add a Default EbookSortType
This allows the user to run a keyword search and then change the sort
order. `Default` is interpreted as `Relevance` if a query is present,
`Newest` if not.
2025-02-13 13:48:39 -06:00
Mike Colagrosso
5e10d3be6f Remove placeholder text from search box 2025-02-13 13:48:39 -06:00
Mike Colagrosso
1a71913794 Add a Relevance sort order and improve search
Here's what's in `IndexableText` right now:

1. Title
2. Collections
3. Authors
4. Tags
5. LocSubjects
6. TocEntries

Here is the proposed new ranking:

```
10 * Title +
8 * Authors +
3 * Collections +
IndexableText
```

New indices for existing DBs:

```
ALTER TABLE `Ebooks` ADD COLUMN `IndexableAuthors` text NOT NULL;
ALTER TABLE `Ebooks` ADD COLUMN `IndexableCollections` text NULL;
ALTER TABLE `Ebooks` ADD FULLTEXT `indexSearchTitle` (`Title`);
ALTER TABLE `Ebooks` ADD FULLTEXT `idxSearchAuthors` (`IndexableAuthors`);
ALTER TABLE `Ebooks` ADD FULLTEXT `idxSearchCollections` (`IndexableCollections`);
```
2025-02-13 13:48:39 -06:00
Alex Cabal
31633ee8ac Fix class in search form 2024-12-29 15:10:32 -06:00
Mike Colagrosso
1ab95df084 Add placeholders for ebooks 2024-12-13 11:46:36 -06:00
Alex Cabal
b7b63a4be5 Refactor functions out of Library 2024-11-10 23:05:31 -06:00
Alex Cabal
be5574eaec Move enums into their own namespace 2024-11-08 16:34:21 -06:00
Alex Cabal
c3c588cc1b Add more type hints and work on some code formatting 2024-11-08 14:20:06 -06:00
Alex Cabal
a9eab552ab Flesh out some PHPDocs, and consistently name enums 2024-05-14 15:40:56 -05:00
Alex Cabal
8cc661015c Add enum for view type and fix some type hints 2024-05-08 11:22:28 -05:00
Alex Cabal
00619080a8 Add icons to form elements across site, and remove some CSS classes in favor of :has() 2024-04-15 20:36:56 -05:00
Mike Colagrosso
d95d9b3349 Refactor Library::FilterEbooks and Template::SearchForm to accept EbookSort 2024-01-30 11:10:05 -06:00
Mike Colagrosso
980ed8cea9 Convert ebook SORT_ constants to an enum 2024-01-30 11:10:05 -06:00
Alex Cabal
f7ff76bf7d Rename some Formatter functions for clarity 2024-01-17 16:04:30 -06:00
Mike Colagrosso
4486a1e38d Turn off multiple selection on ereader browsers
For different reasons, setting multiple="multiple" on <select> tags
doesn't work on Kobo and Kindle browsers.

On Kobo:

    * the <option> tags don't appear
    * the <option> tags in other <select> tags also don't appear
    * the labels on the other form elements get offset

On Kindle:

    * the full set of <option> tags don't appear, and the <select>
      won't scroll to show them
2023-03-19 18:38:28 -05:00
Alex Cabal
4dea56407e Add RSS links to page headers for collections and authors 2022-07-19 15:27:01 -05:00
Alex Cabal
6c267497cc Adjust how tags URLs are calculated to support tags with non-ASCII characters like 'children’s' 2022-06-18 21:17:33 -05:00
Alex Cabal
3d905395d3 Clarify SE releaes date in search form 2020-12-23 11:26:18 -06:00
Alex Cabal
261e0621dd Tweak responsive modes of search form 2020-12-09 14:20:49 -06:00
Alex Cabal
96281c13f9 Tweak wording on sort box 2020-12-09 11:57:35 -06:00
Alex Cabal
658db66c2b Include ToC entries in search results for short and poetry compilations 2020-12-08 14:27:01 -06:00
Alex Cabal
1010b287a6 Add new sorting and filtering options to ebook browse page 2020-12-07 19:45:07 -06:00
Alex Cabal
79ec73946e Close all void HTML tags and remove HTML entities 2020-09-04 12:42:27 -05:00
Alex Cabal
986183a83f Remove trailing slashes from URLs 2020-05-02 21:03:22 -05:00
Alex Cabal
cfa54122d6 Add support for tag browsing and collection browsing 2019-02-26 17:05:23 -06:00
Alex Cabal
28c8a3f0ba Initial commit 2018-12-29 16:02:00 -06:00