| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
The sixth limit repeated 2 * YEAR, so an age of two years or more ran
one place past the classes, which is why the suffixes and units
repeated their last entry and the class needed a clamp. It now stops
on the years bucket itself.
|
|
The anchors' scroll margin of half the window already centres a line
scrolled to the top of the view, which is where the browser puts a
single line. Asking to centre a range as well centred the margin with
it, and in Chromium, WebKit and Firefox the first line of a range
landed 73% of the way down the window against 49% for a single line.
|
|
getElementsByClassName returns a live collection, so an age moved to
the next unit dropped out of it mid-loop and the age after it was
skipped until the next pass, which can be a day away. On a cached page
that has crossed a unit boundary every second age stayed stale.
querySelectorAll returns a static list of the same elements.
|
|
A window too narrow for the tabs wrapped the last of them onto a second
row, held apart from the line under the others, as an iPhone showed on
every repository page. The row now scrolls sideways instead, keeping
the active tab in view and fading the side that hides more of them, and
the tabs draw closer as the window narrows so all seven still fit at
360 pixels.
|
|
The bar was measured from the table's border edge, a pixel above where
its offset counts from, and covered only the digits of each number. Its
width was the part of the table in view, so scrolling a long line
sideways left the highlight behind.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
AUTHORS now records the upstream developers as the project's history
rather than as maintainers of the fork.
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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>
|
|
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>
|