AgeCommit message (Collapse)AuthorLines
Add stable markup hooks for site themesBryce Kwon-6/+20
Clean up the whole treeBryce Kwon-6/+3
Trim the comments and dead code across the treeBryce Kwon-27/+24
Remove the auto-submitting selectsBryce Kwon-25/+4
Remove the theme toggleBryce Kwon-94/+4
Reformat the stylesheet and script to two spacesBryce Kwon-113/+113
Match the client age buckets to the server'sBryce Kwon-100/+152
Settle the theme and header before the first paintBryce Kwon-10/+21
Replace the browser markdown renderer with a filterBryce Kwon-164/+0
The readme is now escaped plain text unless `about-filter` points at the new `about-render.lua`, which renders markdown, man pages and plain text server-side. `enable-markdown` goes away with the renderer.
Highlight and center fragment-targeted linesBryce Kwon-0/+48
Move syntax highlighting to a Lua source filterBryce Kwon-228/+2
Keep line structure in plaintext readmesBryce Kwon-0/+3
Submit option forms without inline handlersBryce Kwon-0/+18
Point the fork's links and credits at itselfBryce Kwon-1/+1
AUTHORS now records the upstream developers as the project's history rather than as maintainers of the fork.
Clamp negative ages in the age refresherBryce Kwon-0/+6
Render README markdown in the browserBryce Kwon-0/+161
cgit had no markdown support of its own, so a readme was rendered through an external python filter or not at all. Escaping the source and formatting it in cgit.js keeps the work in the browser like the blob highlighter, and the page stays readable as plain text without scripting.
Add built-in syntax highlightingBryce Kwon-0/+226
Highlighting previously required a source filter shelling out to something like Pygments. A configured source filter still takes precedence, every character is preserved so the line gutter stays aligned, and large files are skipped.
Add a light and dark theme toggleBryce Kwon-0/+56
The button is emitted hidden and only revealed by the script, so a browser without JavaScript never shows a control that cannot work and the page keeps tracking the system theme.
Reorganize into source, assets and librariesBryce Kwon-0/+0
The C sources move to source/, the served files to assets/, the bundled Git submodule to libraries/git and the filter scripts to extensions/. Everything the build generates now lands in build/, so a clean is a single remove and the tree stays clean.
js: add dynamic age updateAndy Green-0/+61
This patch updates the emitted "ages" dynamically on the client side. After updating on completion of the document load, it sets a timer to update according to the smallest age it found. If there are any ages listed in minutes, then it will update again in 10s. When the most recent age is in hours, it updates every 5m. If days, then every 30m and so on. This keeps the cost of the dynamic updates at worst once per 10s. The updates are done entirely on the client side without contact with the server. To make this work reliably, since parsing datetimes is unreliable in browser js, the unix time is added as an attribute to all age spans. To make that reliable cross-platform, the unix time is treated as a uint64_t when it is formatted for printing. The rules for display conversion of the age is aligned with the existing server-side rules in ui-shared.h. If the client or server-side time are not synchronized by ntpd etc, ages shown on the client will not relate to the original ages computed at the server. The client updates the ages immediately when the DOM has finished loading, so in the case the times at the server and client are not aligned, this patch changes what the user sees on the page to reflect patch age compared to client time. If the server and client clocks are aligned, this patch makes no difference to what is seen on the page. Signed-off-by: Andy Green <andy@warmcat.com> Signed-off-by: Christian Hesse <mail@eworm.de>
config: add jsAndy Green-0/+7
Just like the config allows setting css URL path, add a config for setting the js URL path Signed-off-by: Andy Green <andy@warmcat.com> Reviewed-by: John Keeping <john@keeping.me.uk> Signed-off-by: Christian Hesse <mail@eworm.de>