Commit Graph

21 Commits

Author SHA1 Message Date
Matt Mascarenhas 8aa67a386a Fix the 3-way filter associating
Add the data-searchLocation attribute to the search results
2020-05-17 23:00:12 +01:00
Matt Mascarenhas 877dbab5bd Fix global search page generation and filter
This change makes GenerateGlobalSearchPage() pass the Config to
BuffersToHTML(), which in turn passes it on to GenerateNavigation(),
thus preventing a null-pointer deference when setting the Theme.

It also fixes the filter by using all three of baseURL, searchLocation
and playerLocation to associate the filter and index elements.
2020-05-17 20:35:04 +01:00
Matt Mascarenhas 9dfdc117be Fix search_ and player_location related bugs
On the search pages use the search_location and player_location, in
addition to the base_url, to associate filter and index entries, such
that the filter actually works.

Fix the .index file location for projects with a search_location. As
this is now consistent, we happen to fix a crash that happened when
changing the search_location.

New config option:

    deny_bespoke_templates
         Indexers may use the "template" attribute in the video node of
         an .hmml file to set a bespoke template for that entry,
         superseding any configured player_template. Setting
         "deny_bespoke_templates" to true prevents this.
2020-05-17 02:04:26 +01:00
Matt Mascarenhas 05518781c4 cinera.c: Config
Database version 5

Major features:
    Config file parsing
    Multiple projects per instance
    Searching across multiple projects
    Art sprites, usable by project, medium and support

Minor features:
    The search results are now sortable
    Optimised the search page sorting

Fixes:
    More reliable file system monitoring
    Well-formed templates are now valid, even with the absence of assets
    Correctly resove ~ in paths
    Gracefully handle the lack of an internet connection
    Renamed "annotator" to "indexer"
    Removed PlayerURLPrefix, in favour of .hmml "output" parameter

Replaced the flags collection with:
    -0 Dry-run mode
    -c Set the config file path
    -e Examine the database
    -v Print version
    -h Print help

New template tags:
    __CINERA_NAV__ dropdown
    __CINERA_NAV__ horizontal
    __CINERA_NAV__ plain
    __CINERA_PROJECT_PLAIN__

Deleted template tags:
    __CINERA_MENUS__
    __CINERA_SCRIPT__
2020-05-09 18:33:25 +01:00
Matt Mascarenhas 9278390a38 cinera.c: Put sort button on query box's line 2019-03-03 23:32:58 +00:00
Matt Mascarenhas d6e633cf3e cinera.css: Search page mobile style
cinera_search.js: Conditionally display the results summary
2019-03-03 00:44:05 +00:00
Matt Mascarenhas f3b728ee6f cinera_search.js: Mitigate flickering 2018-07-15 23:52:52 +01:00
Matt Mascarenhas 8607ca87ea cinera: Finer-grained search input autofocus 2018-07-05 20:13:25 +01:00
Matt Mascarenhas aa0a8ba327 cinera: Single browser tab and no autofocus mode
This allows search result links to open in the same tab, and prevents
automatic scrolling to the search input box on page load
2018-07-03 15:26:17 +01:00
Asaf Gartner 6136a45886 Attempting to speed up rendering without hurting framerate. 2018-06-23 14:32:01 +00:00
Matt Mascarenhas e77d208645 cinera.c: Remove spurious file I/O
Don't \-escape anything in the index

Document server's security header (recommended) requirements
2018-05-01 22:05:44 +01:00
Matt Mascarenhas be37ea234a cinera: Replace all inline CSS and JS
We no longer prevent enforcement of strict server security policies (to
be documented)

Add bounds-checking to the Copy string functions, fixing buffer sizes

Fix the marker skipping (e.g. :afk)
2018-04-22 21:57:31 +01:00
Matt Mascarenhas e5d592dc11 cinera_search.js: Remove console.log 2018-01-28 21:57:35 +00:00
Matt Mascarenhas 0f27c96b29 cinera_search.js: Prevent crashes caused by | 2018-01-28 21:56:40 +00:00
Matt Mascarenhas 3d7add5b66 cinera: Handle sorting state separately from UI
Also add user-select: none
2018-01-21 19:30:54 +00:00
Matt Mascarenhas d7d27f59b7 cinera: Sortable index 2018-01-21 18:59:09 +00:00
Matt Mascarenhas 0aa585a15d cinera: Allow custom output paths
Relative to the Base:
    -a sets the player location
    -n sets the index location

Tweak flags, and add -B to set Base URL (necessary if setting -a or -n)

New template tags:
    __CINERA_URL__
    __CINERA_VIDEO_ID__

Bump DB version: 2
    index_header now contains the Index and Player Locations
2017-12-12 23:24:10 +00:00
Matt Mascarenhas f07cc87629 cinera.c: Namespacing 2017-12-10 00:17:19 +00:00
Matt Mascarenhas 6f751dd2b2 cinera.c: Add support for alternative URL prefixes
This is hardcoded for now, for ease of use, pending the config system

Also add Medium to the ProjectInfo array, to save users having to set
this with -m (which option remains available to them)

Reorganise the CSS, Images and JS files back to their location in the
same directory, since a default invocation of the program assumes they
are in the same directory as the Root Directory, to hopefully alleviate
some potential user frustration thanks to the requirement to set their
locations (with -c, -i and -j) before any usable output is produced
2017-12-07 21:07:36 +00:00
Matt Mascarenhas f454e01e28 Add -s flag, project info and CINERA_PROJECT tag
-s flag sets the style / theme
Also some general code clean-up and repo organisation
2017-12-07 01:15:13 +00:00
Matt Mascarenhas 4572817837 cinera.c: Search [#7]
Also put the stuff in a new directory called cinera, that contains only
the files needed to get going, with example template files.
2017-11-11 00:34:47 +00:00