Compare commits

...
12 Commits
Author SHA1 Message Date
Duarte Santos bc3ac09c77 release: v1.2.11
Versions in both package.json files, the lockfile's two self-references and the
Android build (versionCode 11 -> 12, so the APK installs over the last one).
The website's download line goes from v1.2.9 to v1.2.11 — it had been left
behind by the previous release as well.

Changelog covers the six defects found reviewing v1.2.10, the two merge requests
from mflova, and the landing page.
2026-08-25 22:08:15 +02:00
Duarte Santos af4de8b8ff website: the relaunched landing page
This has been serving on opengym.duarte-santos.ch for a while without ever being
committed, so the repository and the live site had drifted apart — a deploy from
a clean checkout would have rolled the site back to the old page. This commits
what is actually running.

The page is rebuilt around a bento layout with real device frames, a mobile nav
that opens a proper menu instead of hiding the links, and a scroll reveal that
checks prefers-reduced-motion before animating anything. New "Elsewhere" section
collecting where the project actually lives: GitLab for code, issues and
releases, Discord, and Buy Me a Coffee.

The download line still reads v1.2.9 and the APK next to it is still the 1.2.9
build; both are corrected in the release commit, where the new APK exists.
2026-08-25 22:07:04 +02:00
Duarte Santos 9bec4bb785 settings: show the version, and let the rest timer be turned off
Two things people asked for on release day, both small, both awkward to live
without.

The version was not visible anywhere. mflova asked how to tell which build the
phone app is running and andi242 said he had wondered the same that morning;
issue #7 asks for it too. The support template in #install-help has been telling
people to read it off "the bottom of Settings" — where it was not. It is there
now, read from package.json at build time so it cannot drift from the release it
shipped in. On the phone there is no address bar and no about box, so this was
the only missing way to answer "did the update actually install".

The rest timer had no off switch. andi242, in the per-exercise-timers thread: "I
don't use rest timers, so I find it's a bit tedious to skip the timer every
time." v1.2.10 made that worse rather than better — it now rests after every set
except the last of the session, so an exercise that used to end quietly no
longer does, and there was still no way out. "Off" now sits at the top of the
same list as 60/90/120/150/180.

The guard is inside startRest rather than at the four places that call it, for
the same reason the rest-after-a-set rule became one shared condition: a rule
that has to be repeated is a rule that gets forgotten. 'Off' already exists in
all twelve locale packs, so this adds no translation work.
2026-08-25 22:05:07 +02:00
Duarte Santos fa879a8b40 stats: keep the e1RM chart's points stable, and note where stackedValue stops
Two follow-ups to !24 and !25, both about the same screen.

!25 makes LineChart drop its hover whenever `points` changes identity, which is
right — a new dataset has different coordinates and the old marker describes
nothing. But the e1RM branch built its array inline with .map(), so every render
of Stats handed the chart a brand-new array and cleared the tooltip out from
under the pointer. Hovering itself only re-renders LineChart, so it survives
that; anything else touching this screen did not. Memoising the .map() alone
would not have fixed it, because e1rmSeries was itself called fresh on every
render, so the memo's own dependency changed identity every time. Both are
memoised now, which also stops walking the whole workout history on every
render.

!24's grid is two columns, label/value and chevron, and does not place .lrow-i.
On a row that has an icon it would auto-place and shove the layout around. The
one call site has no icon, so this is latent rather than live — written down in
the rule so the next person to reach for stackedValue sees the limit first.
2026-08-25 22:02:32 +02:00
Duarte Santos 651b03cbd1 Merge merge request !25 (clear stale chart hover state) 2026-08-25 22:00:46 +02:00
Duarte Santos b0b9e9350f Merge merge request !24 (stack the Stats exercise selector value) 2026-08-25 21:59:51 +02:00
Duarte Santos ac66d90a3e plan sharing: send the intensifier too, and clamp what arrives
A shared plan carried the sets, reps, weight, progression rule, superset
grouping, note and — since v1.2.10 — the planned warm-ups. It did not carry the
intensifier, so a routine built as "3x5 with a double drop" reached the other
end as a plain 3x5. Silently: parsePlan's `dropped` counter only tracks
exercises it cannot resolve at all, so nothing said a prescription had gone
missing. Drop-sets and rest-pause are how the exercise is prescribed, not a
logging detail, and they belong in the file.

Both fields are now clamped on the way out and on the way in. warmupSets was
clamped only when the rows were built, so a hand-edited file's "999" was shown
verbatim by the config stepper. An intensifier of an unknown type is dropped
rather than passed through: a plan file is someone else's data. The floors are
the ones the config sheet and applyIntensifierPlan already enforce, not new
ones invented here.

There was no plan-share test file at all, which is how a whole prescription
field went missing without anyone noticing. There is one now.
2026-08-25 21:57:20 +02:00
Duarte Santos 3d30edddad notes: make the session note real, and stop losing it
v1.2.10 shipped the session note as one of three kinds of note, and the release
notes say so. Only two of them existed.

buildCompletedWorkout read `active.note` and carried it onto the finished
workout — with a test covering it — but nothing anywhere in the app ever wrote
that field. The only way to get a session note was to open a past workout in
history and type one there, which is a different and much smaller feature than
"notes you can write during a workout". So the workout screen now has one, next
to the finish button: wrapping up is when you know how the session went. It
writes `active.note`, which makes the path that was already there and already
tested actually reachable.

The history one then threw the text away. It saved on blur only, and Escape, the
Android back gesture and swipe-to-dismiss all close a sheet without ever moving
focus out of the textarea — type a note, press Escape, gone. It now flushes on
unmount as well, through a ref, because a cleanup closes over the note from its
own render, which is the empty string it started with. Writing only happens when
the text actually changed, and deleting the workout from that same sheet leaves
nothing to write to, which the guard covers.

The new sheet has a Save button rather than repeating the blur trick.

Also adds both note sheets to Workout.test.jsx's module mock. Workout.jsx reads
sessionNoteSheet during render, so a missing export there is a render crash
rather than a quiet no-op — which is exactly how this was caught.
2026-08-25 21:55:22 +02:00
Duarte Santos 287550df6c warm-ups: keep them out of volume, and make the ramp follow the weight
Three defects, all of them latent before v1.2.10 and live the moment a routine
started planning warm-ups by default.

workoutVolume counted warm-up rows. It was the only consumer that did — onerm,
muscles, recovery and progression all filter them — while the config sheet tells
users in so many words that warm-ups are "left out of volume, records and
progression", and a comment in this very file asserts it. Three planned warm-ups
on a 3x5 at 100kg reported 2562.5 instead of 1500, and that number is written
into the finished workout, so it would have stayed wrong forever.

The ramp aimed at last session's weight. buildSets prepends the warm-ups and
applyPrescription rewrites work rows only, by design — so nothing ever re-derived
the ramp once progression moved the target. Deload 100 -> 50 produced warm-ups of
50 and 75 under work sets of 50: the second "warm-up" heavier than everything it
was warming up for. applyPrescription now finishes by re-ramping, which is where
the invariant cannot be forgotten, rather than at the two call sites where it
already was. A logged warm-up keeps its weight and becomes what the next one
ramps from — it happened, and rewriting performed work is data loss.

insertWarmupRow's early return was unclamped. Once a warm-up sat above the work
weight, every warm-up added after it inherited that number. The clamp guarded
only the other branch. A hand-edited row stays as typed; what stops is the
inheritance.
2026-08-25 21:50:50 +02:00
doby-llm 0a69ee8450 Merge upstream main into fix/clear-line-chart-hover 2026-08-25 21:29:54 +02:00
Manuel 95474f955b fix: clear stale line chart hover state when points change 2026-08-25 18:55:43 +00:00
Manuel bcbde6245c fix: stack exercise progress selector value 2026-08-25 17:47:52 +00:00
42 changed files with 1746 additions and 531 deletions

No files matched your search

+56
View File
@@ -1,5 +1,61 @@
# Changelog
## v1.2.11 — 2026-08-25
A correction release. v1.2.10 landed planned warm-ups and notes, and reviewing that release
afterwards turned up six defects it had either introduced or made matter — three of them in the
warm-up work itself. None of them broke a test, which is the point: they were gaps beside the
tests rather than failures in them.
### Warm-ups
- ⚖️ **Warm-ups were counted in your session volume.** Every other part of the app leaves them
out — records, progression, the muscle map — and the routine screen says so in as many words
("left out of volume, records and progression"). Volume was the one place it was not true.
Three planned warm-ups on a 3×5 at 100 kg reported 2562.5 instead of 1500, and that number is
written into the finished workout, so it would have stayed wrong for good.
- 📉 **On a deload, the last warm-up came out heavier than the work sets.** The ramp was built
before progression had its say and nothing recalculated it, so a plan dropping from 100 kg to
50 kg gave you warm-ups of 50 and 75 under work sets of 50. The ramp is now derived after the
prescription, so it always aims at the weight you are actually about to lift. A warm-up you
have already logged keeps its weight — it happened.
- 🧱 **One too-heavy warm-up spread to the rest.** Editing a warm-up above the working weight
made every warm-up added after it inherit that number. Your own edit stays as you typed it;
what stops is the inheritance.
### Notes
- 📝 **The session note now exists.** v1.2.10 described three kinds of note and shipped two: the
code that saves a whole-session note was there, and tested, but nothing in the app ever wrote
one. There is a note field next to the finish button now — wrapping up is when you know how
the session went.
- 💾 **The session note stopped being thrown away.** In a past workout it only saved when the
field lost focus, and Escape, the Android back gesture and swipe-to-dismiss all close a sheet
without that ever happening. Type a note, press Escape, gone. It now saves on the way out too.
### Sharing, stats and settings
- 🔗 **Shared plans carry drop-sets and rest-pause.** A routine built as "3×5 with a double
drop" arrived at the other end as a plain 3×5, silently. Both the intensifier and the planned
warm-up count are now clamped in both directions, so a hand-edited plan file cannot put a
nonsense number in front of you either.
- 🔢 **The version is visible again**, at the bottom of Settings — which is where the support
template has been telling people to look for it. On the phone there is no address bar, so
there was no way to tell which build you had or whether an update installed. (issue #7)
- ⏹️ **The rest timer can be turned off.** v1.2.10 made this worse before it made it better: it
started resting after every set instead of finishing an exercise quietly, and there was still
no way out. "Off" now sits with the other durations.
- 📊 **The exercise picker in Stats no longer runs long names into the label** (mflova, !24), and
**a chart tooltip no longer lingers from the previous exercise** (mflova, !25). The estimated-1RM
series is memoised as well, so the tooltip stops vanishing under your finger while you read it.
### Website
- 🌐 **opengym.duarte-santos.ch has been rebuilt** — a bento layout with real device frames, a
mobile menu that opens instead of hiding, scroll reveals that respect `prefers-reduced-motion`,
and a section collecting where the project actually lives. It had been live for a while without
ever being committed, so the repository and the site had drifted apart.
## v1.2.10 — 2026-08-25
The first release since the move to GitLab that is mostly **other people's work**. Nine
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "gym-api",
"version": "1.2.10",
"version": "1.2.11",
"private": true,
"type": "module",
"main": "server.js",
+2 -2
View File
@@ -7,8 +7,8 @@ android {
applicationId "ch.duartesantos.opengym"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 11
versionName "1.2.10"
versionCode 12
versionName "1.2.11"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "opengym-frontend",
"version": "1.2.10",
"version": "1.2.11",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "opengym-frontend",
"version": "1.2.10",
"version": "1.2.11",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@capacitor/app": "^7.1.2",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "opengym-frontend",
"private": true,
"version": "1.2.10",
"version": "1.2.11",
"type": "module",
"scripts": {
"dev": "vite",
+6
View File
@@ -18,6 +18,12 @@ export default function LineChart({ points, h = 150, unit = '', color = 'var(--a
const tipRef = useRef(null)
const [hover, setHover] = useState(null) // { x, y, iso, v }
// A new dataset has different coordinates and meaning, so never carry the previous
// point selection into it. Layout timing removes the marker before the new chart paints.
useLayoutEffect(() => {
setHover(null)
}, [points])
// The tooltip is placed after layout, from its measured size, because the chart
// lives in an overflow-clipped box: a fixed half-width offset (what this used to
// do) hangs the label off the edge on the first and last point, and the clip then
+31 -1
View File
@@ -27,6 +27,15 @@ const point = (year, month, day, y) => ({
y
})
const firstPoints = [
{ t: Date.UTC(2026, 0, 1), y: 80, d: '2026-01-01' },
{ t: Date.UTC(2026, 0, 15), y: 82, d: '2026-01-15' },
]
const nextPoints = [
{ t: Date.UTC(2026, 1, 1), y: 78, d: '2026-02-01' },
{ t: Date.UTC(2026, 1, 15), y: 79, d: '2026-02-15' },
]
function renderChart(points) {
act(() => root.render(<LineChart points={points} axes={false} unit="kg" />))
}
@@ -71,4 +80,25 @@ describe('LineChart hover date', () => {
const lastIso = isoOf(new Date(last.t))
expect(hoverAt(340)).toBe(`${fmtDate(lastIso, true, true)} · 71 kg`)
})
})
})
describe('LineChart hover state', () => {
it('clears the tooltip and hover markers when points are replaced, then allows hovering again', () => {
renderChart(firstPoints)
hoverAt(170)
expect(container.querySelector('.ctip')).toBeTruthy()
expect(container.querySelector('.cvl')).toBeTruthy()
expect(container.querySelector('.chl')).toBeTruthy()
renderChart(nextPoints)
expect(container.querySelector('.ctip')).toBeNull()
expect(container.querySelector('.cvl')).toBeNull()
expect(container.querySelector('.chl')).toBeNull()
hoverAt(170)
expect(container.querySelector('.ctip')).toBeTruthy()
expect(container.querySelector('.cvl')).toBeTruthy()
})
})
+3 -2
View File
@@ -248,7 +248,7 @@ export function Row({ icon, iconTint, title, subtitle, value, accessory = 'none'
// theme entirely — on dark mode it flashes a white sheet — and can't show more
// than a bare label per option. This opens our own sheet with a checkmark on the
// current value, which is also how iOS itself handles a long option list.
export function SelectRow({ icon, iconTint, title, value, options, onChange, sheetTitle }) {
export function SelectRow({ icon, iconTint, title, value, options, onChange, sheetTitle, stackedValue = false }) {
const cur = options.find(o => o.value === value)
const open = () => {
const { openSheet } = require_ui()
@@ -270,7 +270,8 @@ export function SelectRow({ icon, iconTint, title, value, options, onChange, she
return h
}
return (
<Row icon={icon} iconTint={iconTint} title={title} value={cur ? cur.label : value} accessory="chevron" onClick={open} />
<Row icon={icon} iconTint={iconTint} title={title} value={cur ? cur.label : value} accessory="chevron" onClick={open}
className={stackedValue ? 'lrow-stack-value' : ''} />
)
}
+11
View File
@@ -241,6 +241,17 @@ h4.sec{
.lrow-c{color:var(--label);font-size:15px;flex:none;--icon-stroke:2.4}
.lrow-k{color:var(--acc);font-size:17px;flex:none;--icon-stroke:2.4}
.lrow.danger,.lrow.danger .lrow-t{color:var(--red)}
/* The Stats exercise name gets its own line so long names cannot run into the title.
Two columns only — label/value on the left, chevron on the right — so this is for rows
WITHOUT an icon. `.lrow-i` is not placed here; on a row that has one it would auto-place
into the grid and push the layout around. Give it a leading column before using this
anywhere else. */
.lrow.lrow-stack-value{
display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;
}
.lrow.lrow-stack-value .lrow-m{grid-column:1;grid-row:1}
.lrow.lrow-stack-value .lrow-v{grid-column:1;grid-row:2;text-align:left}
.lrow.lrow-stack-value .lrow-c{grid-column:2;grid-row:1 / span 2;align-self:center}
/* an (i) before a row's control: painted small and dim so the control stays the loud thing,
but with a finger-sized target like everything else — the padding is the hit area and the
vertical negative margin keeps it from making the row taller. The horizontal ones pull the
+44 -2
View File
@@ -388,7 +388,14 @@ export function workoutVolume(w) {
// No special case for unilateral work: a per-side set logs its total, so both sides are
// already in the rep count that arrives here. Drop-set drops and rest-pause bursts add their
// own weight x reps on top of the row's main/activation set (see extraVolumeOf).
w.entries.forEach(e => e.sets.forEach(s => { if (s.done) v += (s.w || 0) * (s.r || 0) + extraVolumeOf(s) }))
// Warm-ups are excluded here as everywhere else. The config sheet promises it in so many
// words ("left out of volume, records and progression") and every other consumer already
// does it; this line was the one that did not, which only stopped being harmless when a
// routine started planning warm-ups by default. The number is written into the saved
// workout, so an inflated one would stay wrong forever.
w.entries.forEach(e => e.sets.forEach(s => {
if (s.done && !isWarmupRow(s)) v += (s.w || 0) * (s.r || 0) + extraVolumeOf(s)
}))
return v
}
export function setsDone(w) {
@@ -460,6 +467,36 @@ export function cascadeWeight(rows, from, value) {
* `at` is 0, and reading `rows[-1]` used to fall through to the *last* row — the heaviest
* work set — so "add warm-up set" handed you a full-weight set to correct by hand.
*/
/**
* Recompute the warm-up block so it ramps toward the weight the work rows ACTUALLY carry.
*
* buildSets prepends the warm-ups before a prescription is applied, and applyPrescription
* deliberately rewrites work rows only — so without this the ramp still aims at last
* session's weight. On a deload that put the last warm-up above every work set, which is
* the exact opposite of what a warm-up is for.
*
* A warm-up already logged keeps its weight and becomes what the next one ramps from: it
* happened, and rewriting performed work is data loss. Entries with nothing to ramp toward
* — cardio, bodyweight, an unloaded hold — are returned untouched.
*/
export function rerampWarmups(rows, step = 2.5) {
const firstWork = rows.findIndex(x => !isWarmupRow(x))
if (firstWork <= 0) return rows
const target = rows[firstWork].w || 0
if (!(target > 0)) return rows
const out = rows.slice()
let from = 0
for (let i = 0; i < firstWork; i++) {
if (out[i].done) { from = out[i].w || 0; continue }
const w = target > from
? Math.max(0, Math.min(target, Math.floor((from + (target - from) / 2) / step) * step))
: target
out[i] = { ...out[i], w }
from = w
}
return out
}
export function insertWarmupRow(rows, mode, target, step = 2.5) {
const firstWork = rows.findIndex(x => !isWarmupRow(x))
const at = firstWork === -1 ? rows.length : firstWork
@@ -467,7 +504,12 @@ export function insertWarmupRow(rows, mode, target, step = 2.5) {
const work = firstWork === -1 ? null : rows[firstWork]
const rampTo = to => {
const from = prev ? (prev.w || 0) : 0
if (!(to > 0) || to <= from) return from
// Nothing to ramp toward: bodyweight, cardio, a timed hold with no load.
if (!(to > 0)) return 0
// Already at or past the work weight — which happens when a warm-up was edited by hand
// above it. Returning `from` here handed the next warm-up that same too-heavy number and
// let it propagate down the block. A warm-up is never heavier than the set it warms up for.
if (to <= from) return to
// Rounded DOWN to the step: a warm-up that lands a notch light costs nothing, one that
// lands a notch heavy is a set you have to strip plates off before you can use it.
return Math.max(0, Math.min(to, Math.floor((from + (to - from) / 2) / step) * step))
+35 -2
View File
@@ -9,7 +9,7 @@
// a page break — each exercise, and each routine that fits, stays in one place.
import { EXIDX, isBodyweightEq } from './exercises.js'
import { modeOf, fmtSec, isBw, isPerSide, sideReps } from './history.js'
import { modeOf, fmtSec, isBw, isPerSide, sideReps, MAX_PLANNED_WARMUPS } from './history.js'
import { uid, todayISO, DAYN, fmtNum, exCount } from './format.js'
import { t, exerciseNameFor } from './i18n-core.js'
@@ -46,10 +46,36 @@ function cleanEx(e) {
if (e.repsMax != null) o.repsMax = e.repsMax
if (e.sg) o.sg = e.sg
if (e.note) o.note = e.note
if (e.warmupSets) o.warmupSets = e.warmupSets
const warm = cleanWarmupSets(e.warmupSets)
if (warm) o.warmupSets = warm
// Drop-sets and rest-pause are part of how the exercise is prescribed, not a logging detail.
// Without this a shared "3x5 with a double drop" arrived at the other end as a plain 3x5,
// silently — parsePlan's `dropped` counter only tracks exercises it cannot resolve at all.
const intens = cleanIntensifier(e.intensifier)
if (intens) o.intensifier = intens
return o
}
/** Clamped the same way buildSets clamps it on the way out — the stepper showed a hand-edited
* plan file's "999" verbatim, because the clamp only happened when the rows were built. */
function cleanWarmupSets(v) {
const n = Math.round(Number(v)) || 0
return n > 0 ? Math.min(MAX_PLANNED_WARMUPS, n) : 0
}
/** Keep the floors the config sheet and applyIntensifierPlan already enforce, and nothing else:
* a plan file is someone else's data, so anything unrecognised is dropped rather than trusted. */
function cleanIntensifier(x) {
const type = x && x.type
if (type === 'dropset') {
return { type, count: Math.max(1, Math.round(Number(x.count)) || 1), pct: Math.max(5, Math.round(Number(x.pct)) || 20) }
}
if (type === 'restpause') {
return { type, totalReps: Math.max(1, Math.round(Number(x.totalReps)) || 1), restSec: Math.max(5, Math.round(Number(x.restSec)) || 15) }
}
return null
}
/** Build the shareable bundle: every routine, the week schedule, referenced customs. */
export function buildPlanBundle(S, name) {
const routines = (S.routines || []).map(r => ({
@@ -87,6 +113,13 @@ export function parsePlan(raw) {
const ok = !!e && (known.has(e.id) || !!EXIDX[e.id])
if (!ok) dropped++
return ok
}).map(e => {
// The exercises pass through as written, so the two fields that carry numbers into the
// planner get the same clamps on the way in that they get on the way out.
const warm = cleanWarmupSets(e.warmupSets)
const intens = cleanIntensifier(e.intensifier)
const { warmupSets, intensifier, ...rest } = e
return { ...rest, ...(warm ? { warmupSets: warm } : {}), ...(intens ? { intensifier: intens } : {}) }
})
}))
return {
+47
View File
@@ -0,0 +1,47 @@
import { describe, expect, it } from 'vitest'
import { buildPlanBundle, parsePlan } from './plan-share.js'
// There was no test file for plan sharing at all, which is how a whole prescription field
// went missing without anyone noticing.
const stateWith = ex => ({
routines: [{ id: 'r1', name: 'Push', ex: [{ id: '0025', sets: 3, reps: 5, weight: 100, ...ex }] }],
week: {}, customEx: [],
})
const roundTrip = ex => parsePlan(JSON.stringify(buildPlanBundle(stateWith(ex), 'Plan'))).routines[0].ex[0]
describe('what survives a shared plan', () => {
it('carries a drop-set prescription', () => {
expect(roundTrip({ intensifier: { type: 'dropset', count: 2, pct: 20 } }).intensifier)
.toEqual({ type: 'dropset', count: 2, pct: 20 })
})
it('carries a rest-pause prescription', () => {
expect(roundTrip({ intensifier: { type: 'restpause', totalReps: 12, restSec: 15 } }).intensifier)
.toEqual({ type: 'restpause', totalReps: 12, restSec: 15 })
})
it('carries planned warm-ups', () => {
expect(roundTrip({ warmupSets: 3 }).warmupSets).toBe(3)
})
it('drops an intensifier it does not recognise rather than passing it on', () => {
expect(roundTrip({ intensifier: { type: 'nonsense', count: 3 } }).intensifier).toBeUndefined()
})
it('clamps a hand-edited warm-up count instead of showing it verbatim', () => {
const bundle = { opengym_plan: 1, name: 'x', routines: [{ id: 'r', name: 'R', ex: [{ id: '0025', sets: 3, reps: 5, warmupSets: 999 }] }], week: {}, customEx: [] }
expect(parsePlan(bundle).routines[0].ex[0].warmupSets).toBe(5)
})
// The floors are the config sheet's own (count >= 1, pct >= 5); a value that is present but
// out of range is pulled up to the floor, while a missing one falls back to the default.
it('clamps out-of-range intensifier numbers to the floors the app enforces', () => {
const bundle = { opengym_plan: 1, name: 'x', routines: [{ id: 'r', name: 'R', ex: [{ id: '0025', sets: 3, reps: 5, intensifier: { type: 'dropset', count: 0, pct: -5 } }] }], week: {}, customEx: [] }
expect(parsePlan(bundle).routines[0].ex[0].intensifier).toEqual({ type: 'dropset', count: 1, pct: 5 })
})
it('falls back to the default drop percentage when the file omits it', () => {
const bundle = { opengym_plan: 1, name: 'x', routines: [{ id: 'r', name: 'R', ex: [{ id: '0025', sets: 3, reps: 5, intensifier: { type: 'dropset' } }] }], week: {}, customEx: [] }
expect(parsePlan(bundle).routines[0].ex[0].intensifier).toEqual({ type: 'dropset', count: 1, pct: 20 })
})
})
+6 -4
View File
@@ -16,7 +16,7 @@
// · fewer sets than prescribed → miss
// So a session that fell apart can never advance the load as though it had succeeded.
import { modeOf, repStep } from './history.js'
import { modeOf, repStep, rerampWarmups } from './history.js'
import { EXIDX } from './exercises.js'
import { isWarmupRow } from './workout-model.js'
@@ -250,7 +250,7 @@ export function nextPrescription(S, cfg, routine) {
* Apply a prescription to freshly built sets. Only the fields the policy actually decided
* are touched, and only on sets that have not been logged yet.
*/
export function applyPrescription(sets, p) {
export function applyPrescription(sets, p, step = 2.5) {
if (!p || p.kind === 'off' || p.kind === 'first') return sets
const out = sets.map(s => {
// Never rewrite a logged set, and never rewrite a warm-up: the prescription speaks to
@@ -270,7 +270,7 @@ export function applyPrescription(sets, p) {
if (p.sets > workRows.length) {
// An all-warm-up entry has no work row to seed growth from - growing warm-up copies
// would both invent work and never terminate the loop. Leave the entry untouched.
if (!workRows.length) return out
if (!workRows.length) return rerampWarmups(out, step)
const seed = workRows[workRows.length - 1]
// A freshly appended row hasn't been performed, so it never inherits a seed's already-
// logged drops/clusters — that would invent extra work the row never actually did. Its
@@ -279,5 +279,7 @@ export function applyPrescription(sets, p) {
const { drops, clusters, ...plainSeed } = seed
while (out.filter(s => !isWarmupRow(s)).length < p.sets) out.push({ ...plainSeed, done: false })
}
return out
// Last, because the work rows now carry their final weight: the warm-up block ramps toward
// what you are actually about to lift, not toward what you lifted last time.
return rerampWarmups(out, step)
}
+2 -2
View File
@@ -28,10 +28,10 @@ describe('Brazilian Portuguese locale', () => {
const fingerprint = createHash('sha256').update(JSON.stringify(inherited)).digest('hex')
expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(291)
expect(inherited).toHaveLength(447)
expect(inherited).toHaveLength(449)
// If this fails, review the changed keys and wording before accepting a new hash. From
// frontend/: node scripts/pt-br-inheritance-fingerprint.mjs --list
expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('5eca6d8b564c208b41f1be1890e3eaa0313e0ab901ed40a03b5d3071a65bd9f1')
expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('09c4fa5e04c8d3ea21916a6c07f074a35013b33d5d945ecfc13cd54cc8b7d41d')
})
test('does not leak European Portuguese UI terms', () => {
+73
View File
@@ -0,0 +1,73 @@
// @vitest-environment happy-dom
// The session note shipped with a hole in it: buildCompletedWorkout read `active.note` and
// nothing in the app ever wrote it, so the only way to get one was after the fact — and that
// path threw the text away unless you happened to tab out of the field first.
import { describe, expect, it, beforeEach, afterEach } from 'vitest'
import React, { act } from 'react'
import { createRoot } from 'react-dom/client'
import { useStore } from '../store/useStore.js'
import { useUI } from '../store/useUI.js'
import { sessionNoteSheet, workoutDetailSheet } from '../sheets.jsx'
import { buildCompletedWorkout } from './finish-workout.js'
const mounted = []
function render(open) {
open()
const sheet = useUI.getState().sheets.at(-1)
const host = document.createElement('div')
document.body.appendChild(host)
const root = createRoot(host)
mounted.push(root)
act(() => root.render(sheet.render(() => useUI.getState().closeSheet(sheet.id))))
return host
}
const type = (el, value) => {
Object.getOwnPropertyDescriptor(el.constructor.prototype, 'value').set.call(el, value)
el.dispatchEvent(new Event('input', { bubbles: true }))
}
const unmountAll = () => act(() => { mounted.splice(0).forEach(r => r.unmount()) })
const workout = () => ({
id: 'w1', d: '2026-08-25', start: 1, end: 2, name: 'Push', vol: 100,
entries: [{ id: 'bench', sets: [{ w: 100, r: 5, done: true }] }], prs: [],
})
describe('session note', () => {
beforeEach(() => {
globalThis.IS_REACT_ACT_ENVIRONMENT = true
useUI.setState({ sheets: [] })
document.body.innerHTML = ''
})
afterEach(unmountAll)
it('can be written during the workout and survives finishing', () => {
useStore.setState(s => ({
S: { ...s.S, active: { id: 'w1', d: '2026-08-25', start: 1, name: 'Push', entries: [{ id: 'bench', sets: [] }] } },
}))
const host = render(() => sessionNoteSheet())
act(() => { type(host.querySelector('textarea'), 'slept badly, still hit it') })
act(() => { [...host.querySelectorAll('button')].find(b => /save/i.test(b.textContent)).click() })
const A = useStore.getState().S.active
expect(A.note).toBe('slept badly, still hit it')
// The path buildCompletedWorkout already had a test for is now actually reachable.
expect(buildCompletedWorkout(A, { end: 2 }).note).toBe('slept badly, still hit it')
})
it('is kept when the history sheet is dismissed without blurring the field', () => {
useStore.setState(s => ({ S: { ...s.S, workouts: [workout()] } }))
const host = render(() => workoutDetailSheet(useStore.getState().S.workouts[0]))
act(() => { type(host.querySelector('textarea'), 'good session') })
// Escape / Android back / swipe all unmount without a blur.
unmountAll()
expect(useStore.getState().S.workouts[0].note).toBe('good session')
})
it('clearing it removes the note rather than storing an empty string', () => {
useStore.setState(s => ({ S: { ...s.S, workouts: [{ ...workout(), note: 'old' }] } }))
const host = render(() => workoutDetailSheet(useStore.getState().S.workouts[0]))
act(() => { type(host.querySelector('textarea'), ' ') })
unmountAll()
expect(useStore.getState().S.workouts[0].note).toBeUndefined()
})
})
@@ -0,0 +1,76 @@
import { describe, expect, it } from 'vitest'
import { workoutVolume, insertWarmupRow, buildSets } from './history.js'
import { applyPrescription } from './progression.js'
// The config sheet tells users warm-ups are "left out of volume, records and progression",
// and history.js repeats that as an invariant in a comment. Volume was the one place it
// was false — harmless while warm-ups were hand-added and rare, wrong now that a routine
// plans them by default and the number is written into the saved workout for good.
describe('warm-ups and volume', () => {
const w = {
entries: [{
id: 'bench',
sets: [
{ w: 50, r: 5, done: true, phase: 'warmup', warmup: true },
{ w: 75, r: 5, done: true, phase: 'warmup', warmup: true },
{ w: 87.5, r: 5, done: true, phase: 'warmup', warmup: true },
{ w: 100, r: 5, done: true },
{ w: 100, r: 5, done: true },
{ w: 100, r: 5, done: true },
],
}],
}
it('counts only the work sets', () => {
expect(workoutVolume(w)).toBe(1500)
})
it('a warm-up adds nothing, whatever it weighs', () => {
const heavy = { entries: [{ id: 'b', sets: [{ w: 200, r: 10, done: true, phase: 'warmup', warmup: true }] }] }
expect(workoutVolume(heavy)).toBe(0)
})
})
// A warm-up must never be heavier than the set it warms you up for. The ramp branch clamps
// to the work weight; the early-return branch did not, so a hand-edited warm-up above the
// work weight propagated into every warm-up added after it.
describe('a warm-up never outweighs the work set', () => {
// The 120 is something the user typed, and it stays: silently rewriting their own edit
// would be worse than leaving it. What must not happen is the NEW row inheriting it, which
// is how one bad number used to spread through the whole warm-up block.
it('does not copy a hand-edited warm-up that sits above the work weight', () => {
const rows = [{ warmup: true, phase: 'warmup', w: 120, r: 5 }, { w: 100, r: 5 }]
const out = insertWarmupRow(rows, 'reps', { reps: 5 }, 2.5)
expect(out.map(r => r.w)).toEqual([120, 100, 100])
expect(out[1].phase).toBe('warmup')
})
it('still ramps normally when the previous warm-up is below the work weight', () => {
const rows = [{ warmup: true, phase: 'warmup', w: 50, r: 5 }, { w: 100, r: 5 }]
const out = insertWarmupRow(rows, 'reps', { reps: 5 }, 2.5)
expect(out.filter(r => r.phase === 'warmup').map(r => r.w)).toEqual([50, 75])
})
})
// buildSets prepends the warm-ups, then applyPrescription rewrites the WORK rows only — so a
// ramp built against last session's weight is stale the moment progression moves. On a deload
// that put the last warm-up above every work set.
describe('the ramp follows the prescribed weight', () => {
const S = { workouts: [], exWeights: {}, routines: [] }
const cfg = { id: 'bench', sets: 3, reps: 5, weight: 100, warmupSets: 2 }
it('re-ramps after a deload instead of aiming at the old weight', () => {
const rows = applyPrescription(buildSets(S, cfg, { step: 2.5 }), { kind: 'deload', weight: 50 })
const warm = rows.filter(r => r.phase === 'warmup').map(r => r.w)
const work = rows.filter(r => r.phase !== 'warmup').map(r => r.w)
expect(work).toEqual([50, 50, 50])
for (const x of warm) expect(x).toBeLessThanOrEqual(50)
expect(warm).toEqual([25, 37.5])
})
it('re-ramps after a bump', () => {
const rows = applyPrescription(buildSets(S, cfg, { step: 2.5 }), { kind: 'up', weight: 150 })
expect(rows.filter(r => r.phase !== 'warmup').map(r => r.w)).toEqual([150, 150, 150])
expect(rows.filter(r => r.phase === 'warmup').map(r => r.w)).toEqual([75, 112.5])
})
})
+2
View File
@@ -687,6 +687,8 @@ export default {
'Seat height, pin position, a form cue — shown every session.': 'Sitzhöhe, Pin-Position, ein Hinweis zur Ausführung — bei jedem Training sichtbar.',
'From {0}:': 'Vom {0}:',
'Session note': 'Notiz zum Training',
'Add session note': 'Notiz zum Training',
'Edit session note': 'Notiz bearbeiten',
'How the session went as a whole.': 'Wie das Training insgesamt lief.',
'Rest-pause always trains as one warm-up set at this rep count, then one rest-pause work set — "Sets" is not used.': 'Rest-Pause trainiert immer als ein Aufwärmsatz mit dieser Wiederholungszahl und ein Rest-Pause-Arbeitssatz — „Sätze“ wird nicht verwendet.'
}
+2
View File
@@ -670,6 +670,8 @@ export default {
'Seat height, pin position, a form cue — shown every session.': 'Altura del asiento, posición del pin, una indicación técnica — visible en cada sesión.',
'From {0}:': 'Del {0}:',
'Session note': 'Nota de la sesión',
'Add session note': 'Añadir nota de la sesión',
'Edit session note': 'Editar nota de la sesión',
'How the session went as a whole.': 'Cómo fue la sesión en conjunto.',
'Rest-pause always trains as one warm-up set at this rep count, then one rest-pause work set — "Sets" is not used.': 'Rest-pause siempre entrena como una serie de calentamiento con estas reps y una serie de trabajo rest-pause — «Series» no se usa.'
}
+2
View File
@@ -670,6 +670,8 @@ export default {
'Seat height, pin position, a form cue — shown every session.': 'Hauteur du siège, position de la goupille, un rappel technique — visible à chaque séance.',
'From {0}:': 'Du {0} :',
'Session note': 'Note de séance',
'Add session note': 'Ajouter une note de séance',
'Edit session note': 'Modifier la note de séance',
'How the session went as a whole.': 'Comment la séance s’est passée dans l’ensemble.',
'Rest-pause always trains as one warm-up set at this rep count, then one rest-pause work set — "Sets" is not used.': 'Le rest-pause s’entraîne toujours comme une série d’échauffement à ce nombre de reps, puis une série de travail rest-pause — « Séries » n’est pas utilisé.'
}
+2
View File
@@ -670,6 +670,8 @@ export default {
'Seat height, pin position, a form cue — shown every session.': 'सीट की ऊँचाई, पिन की जगह, तकनीक का सुझाव — हर कसरत में दिखता है।',
'From {0}:': '{0} से:',
'Session note': 'सत्र का नोट',
'Add session note': 'सत्र का नोट जोड़ें',
'Edit session note': 'सत्र का नोट बदलें',
'How the session went as a whole.': 'पूरा सत्र कैसा रहा।',
'Rest-pause always trains as one warm-up set at this rep count, then one rest-pause work set — "Sets" is not used.': 'रेस्ट-पॉज़ हमेशा इसी रेप्स संख्या के एक वार्म-अप सेट और एक रेस्ट-पॉज़ वर्क सेट के रूप में किया जाता है — “सेट” का उपयोग नहीं होता।'
}
+2
View File
@@ -670,6 +670,8 @@ export default {
'Seat height, pin position, a form cue — shown every session.': 'Altezza del sedile, posizione del pin, un promemoria tecnico — visibile a ogni sessione.',
'From {0}:': 'Del {0}:',
'Session note': 'Nota della sessione',
'Add session note': 'Aggiungi nota della sessione',
'Edit session note': 'Modifica nota della sessione',
'How the session went as a whole.': 'Com’è andata la sessione nel complesso.',
'Rest-pause always trains as one warm-up set at this rep count, then one rest-pause work set — "Sets" is not used.': 'Il rest-pause si allena sempre come una serie di riscaldamento a queste ripetizioni e una serie di lavoro rest-pause — “Serie” non viene usato.'
}
+2
View File
@@ -670,6 +670,8 @@ export default {
'Seat height, pin position, a form cue — shown every session.': '시트 높이, 핀 위치, 자세 팁 — 매 운동마다 표시됩니다.',
'From {0}:': '{0}에서:',
'Session note': '운동 메모',
'Add session note': '운동 메모 추가',
'Edit session note': '운동 메모 편집',
'How the session went as a whole.': '이번 운동이 전체적으로 어땠는지.',
'Rest-pause always trains as one warm-up set at this rep count, then one rest-pause work set — "Sets" is not used.': '레스트포즈는 항상 이 횟수의 워밍업 세트 하나와 레스트포즈 작업 세트 하나로 진행됩니다 — ‘세트’는 사용하지 않습니다.'
}
+2
View File
@@ -670,6 +670,8 @@ export default {
'Seat height, pin position, a form cue — shown every session.': 'Wysokość siedziska, pozycja bolca, wskazówka techniczna — widoczne w każdej sesji.',
'From {0}:': 'Z {0}:',
'Session note': 'Notatka do sesji',
'Add session note': 'Dodaj notatkę do sesji',
'Edit session note': 'Edytuj notatkę do sesji',
'How the session went as a whole.': 'Jak przebiegła cała sesja.',
'Rest-pause always trains as one warm-up set at this rep count, then one rest-pause work set — "Sets" is not used.': 'Rest-pause zawsze trenuje się jako jedna seria rozgrzewkowa o tej liczbie powtórzeń i jedna seria robocza rest-pause — „Serie” nie są używane.'
}
+2
View File
@@ -670,6 +670,8 @@ export default {
'Seat height, pin position, a form cue — shown every session.': 'Altura do banco, posição do pino, uma indicação técnica — visível em todas as sessões.',
'From {0}:': 'De {0}:',
'Session note': 'Nota da sessão',
'Add session note': 'Adicionar nota da sessão',
'Edit session note': 'Editar nota da sessão',
'How the session went as a whole.': 'Como correu a sessão no seu todo.',
'Rest-pause always trains as one warm-up set at this rep count, then one rest-pause work set — "Sets" is not used.': 'O rest-pause treina sempre como uma série de aquecimento com estas repetições e uma série de trabalho rest-pause — «Séries» não é usado.'
}
+2
View File
@@ -670,6 +670,8 @@ export default {
'Seat height, pin position, a form cue — shown every session.': 'Высота сиденья, положение фиксатора, подсказка по технике — видно на каждой тренировке.',
'From {0}:': 'От {0}:',
'Session note': 'Заметка о тренировке',
'Add session note': 'Добавить заметку',
'Edit session note': 'Изменить заметку',
'How the session went as a whole.': 'Как прошла тренировка в целом.',
'Rest-pause always trains as one warm-up set at this rep count, then one rest-pause work set — "Sets" is not used.': 'Rest-pause всегда выполняется как один разминочный подход с этим числом повторений и один рабочий подход rest-pause — «Подходы» не используются.'
}
+2
View File
@@ -670,6 +670,8 @@ export default {
'Seat height, pin position, a form cue — shown every session.': 'Sehpa yüksekliği, pim konumu, bir teknik ipucu — her antrenmanda görünür.',
'From {0}:': '{0} tarihinden:',
'Session note': 'Antrenman notu',
'Add session note': 'Antrenman notu ekle',
'Edit session note': 'Antrenman notunu düzenle',
'How the session went as a whole.': 'Antrenmanın genel olarak nasıl geçtiği.',
'Rest-pause always trains as one warm-up set at this rep count, then one rest-pause work set — "Sets" is not used.': 'Rest-pause her zaman bu tekrar sayısında bir ısınma seti ve bir rest-pause çalışma seti olarak çalışılır — “Setler” kullanılmaz.'
}
+2
View File
@@ -670,6 +670,8 @@ export default {
'Seat height, pin position, a form cue — shown every session.': '座椅高度、插销位置、动作要点 —— 每次训练都会显示。',
'From {0}:': '来自 {0}:',
'Session note': '训练备注',
'Add session note': '添加训练备注',
'Edit session note': '编辑训练备注',
'How the session went as a whole.': '这次训练整体感觉如何。',
'Rest-pause always trains as one warm-up set at this rep count, then one rest-pause work set — "Sets" is not used.': 'Rest-pause 始终按这个次数练一个热身组,再加一个 rest-pause 正式组 —— 不使用“组数”。'
}
+48 -1
View File
@@ -923,6 +923,22 @@ function WorkoutDetail({ w, close }) {
const text = note.trim().slice(0, NOTE_MAX)
if (text) rec.note = text; else delete rec.note
})
// onBlur alone loses the note: Escape, the Android back gesture and swipe-to-dismiss all
// close the sheet without ever moving focus out of the textarea. Flush on unmount too. The
// ref is what makes that work — a cleanup closes over the note from its own render, which
// is the empty string this started with.
const latest = useRef(note)
latest.current = note
const initial = useRef(w.note || '')
useEffect(() => () => {
const text = latest.current.trim().slice(0, NOTE_MAX)
if (text === initial.current) return
update(s => {
const rec = s.workouts.find(x => x.id === w.id)
if (!rec) return // deleted from this very sheet
if (text) rec.note = text; else delete rec.note
})
}, [])
return <>
<h3>{w.name}</h3>
<div className="muted small" style={{ marginBottom: 12 }}>{[fmtDate(w.d, true), ...durPart(w.end - w.start), fmtVol(w.vol, st.unit), ...(w.bw ? [fmtNum(w.bw) + ' ' + st.unit] : [])].join(' · ')}</div>
@@ -1014,7 +1030,8 @@ export function beginWorkout(routineId, bw) {
// kept on the entry purely so the workout can explain the number it chose.
const entries = (r ? r.ex : []).map(cfg => {
const plan = nextPrescription(st, cfg, r)
const sets = applyIntensifierPlan(applyPrescription(buildSets(st, cfg, { step: defaultIncrement(cfg.id, st.unit) }), plan), cfg)
const step = defaultIncrement(cfg.id, st.unit)
const sets = applyIntensifierPlan(applyPrescription(buildSets(st, cfg, { step }), plan, step), cfg)
return { id: cfg.id, sg: cfg.sg, target: { ...cfg }, plan, sets }
})
update(s => {
@@ -1137,6 +1154,36 @@ function ExerciseNote({ entryIdx, close }) {
}
export const exerciseNoteSheet = entryIdx => ui().openSheet(close => <ExerciseNote entryIdx={entryIdx} close={close} />)
/* The session note: how the whole workout went, as opposed to how one exercise went. It lives
on the active session, so buildCompletedWorkout carries it onto the finished workout and it
shows up again in history — where it stays editable. Written here rather than only after the
fact because "notes you can write during a workout" is the point; a note you can only add
once the session is filed is a different, smaller feature. */
function SessionNote({ close }) {
const st = useStore(s => s.S)
const update = useStore(s => s.update)
const A = st.active
const [note, setNote] = useState(A?.note || '')
useEffect(() => { if (!A) close() }, [!A])
if (!A) return null
const save = () => {
const text = note.trim().slice(0, NOTE_MAX)
update(s => { if (!s.active) return; if (text) s.active.note = text; else delete s.active.note })
close()
}
return <>
<h3>{t('Session note')}</h3>
<textarea className="input" rows={4} maxLength={NOTE_MAX} value={note}
placeholder={t('How the session went as a whole.')}
onChange={e => setNote(e.target.value)} />
<div style={{ height: 18 }} />
<Button variant="primary" onClick={save}>{t('Save')}</Button>
</>
}
export const sessionNoteSheet = () => ui().openSheet(close => <SessionNote close={close} />)
/* Drop-set drops and rest-pause bursts are edited inline on the set row itself (Workout.jsx) —
no sheet, no timer. A planned exercise (see the "Intensifier" config below) arrives with them
already computed via applyIntensifierPlan; an unplanned straight set can still grow one live
+3
View File
@@ -76,6 +76,9 @@ export const useUI = create((set, get) => ({
startRest(sec) {
get().stopRest()
// Rest timer set to Off. Stopping and returning rather than starting a zero-length timer
// keeps every caller honest: the four places that start a rest do not each need to know.
if (!(sec > 0)) return
const endsAt = Date.now() + sec * 1000
set({ timer: { left: sec, total: sec, endsAt } })
requestRestNotificationPermission()
+28
View File
@@ -0,0 +1,28 @@
// @vitest-environment happy-dom
// useUI pulls in api.js, which reads navigator.userAgent at module scope.
import { describe, expect, it, beforeEach, afterEach, vi } from 'vitest'
import { useUI } from './useUI.js'
// "Off" has to hold at the timer itself, not at the four places that start one — the same
// reason the rest-after-a-set rule is a shared condition rather than four copies.
describe('rest timer set to Off', () => {
beforeEach(() => { vi.useFakeTimers(); useUI.setState({ timer: null }) })
afterEach(() => { useUI.getState().stopRest(); vi.useRealTimers() })
it('starts nothing', () => {
useUI.getState().startRest(0)
expect(useUI.getState().timer).toBe(null)
})
it('stops a rest that is already running', () => {
useUI.getState().startRest(90)
expect(useUI.getState().timer).not.toBe(null)
useUI.getState().startRest(0)
expect(useUI.getState().timer).toBe(null)
})
it('still runs for a real duration', () => {
useUI.getState().startRest(90)
expect(useUI.getState().timer.total).toBe(90)
})
})
+6 -2
View File
@@ -131,7 +131,7 @@ export default function Settings() {
<Section title={t('During a workout')} footer={wakeOK ? t('The screen stays on while a workout is running, so you don’t have to unlock your phone between sets.') : null}>
<SelectRow icon="timer" iconTint="var(--orange)" title={t('Rest timer')}
value={S.restSec} onChange={v => update(s => { s.restSec = v })}
options={[60, 90, 120, 150, 180].map(v => ({ value: v, label: v + 's' }))} />
options={[{ value: 0, label: t('Off') }, ...[60, 90, 120, 150, 180].map(v => ({ value: v, label: v + 's' }))]} />
{/* Default for a rest-pause burst added live on a plain set — a planned exercise's own
"Rest (s)" (in its Intensifier config) overrides this, same as the main rest timer
is the fallback whenever an exercise has no progression rule of its own. */}
@@ -223,8 +223,12 @@ export default function Settings() {
subtitle={t('to install openGym as a full-screen app.') + ' ' + (user ? t('Your data syncs with your profile — sign in anywhere to see it.') : t('Guest data stays on this device — export a backup now and then!'))} />
</Section>}
{/* The version, at the bottom of Settings — which is where the support template has been
telling people to look for it, and where it was not. On the phone build there is no
address bar and no about box, so without this there is no way to tell which build you
are running, or whether an update actually installed. */}
<div className="dim small" style={{ textAlign: 'center', marginTop: 4, lineHeight: 1.6 }}>
openGym · {t('free & open source (AGPL v3)')}<br />
openGym v{__APP_VERSION__} · {t('free & open source (AGPL v3)')}<br />
<a href="https://gitlab.com/DuarteSantos8/opengym" target="_blank" rel="noopener">source code</a> · exercise data: hasaneyldrm/exercises-dataset (MIT)<br />
exercise images and animations © <a href="https://gymvisual.com/" target="_blank" rel="noopener">Gym visual</a>
</div>
+11 -3
View File
@@ -360,7 +360,15 @@ export default function Stats() {
}
// Estimated 1RM (issue #18) — only reps-mode training produces one, so cardio and timed
// work simply have no points and the toggle stays hidden.
const e1Pts = curEx && curMode === 'reps' ? e1rmSeries(S, curEx) : []
// Both memoised on the same inputs, and it has to start at e1rmSeries: LineChart clears its
// hover whenever `points` changes identity, so a chart array rebuilt on every render made the
// tooltip vanish under your finger the moment anything else on this screen re-rendered.
// Memoising only the .map() would not have helped — its dependency was itself rebuilt each time.
const e1Pts = useMemo(
() => (curEx && curMode === 'reps' ? e1rmSeries(S, curEx) : []),
[S, curEx, curMode],
)
const e1ChartPts = useMemo(() => e1Pts.map(p => ({ t: p.t, y: p.y, d: p.d })), [e1Pts])
const e1Best = curEx && curMode === 'reps' ? best1RM(S, curEx) : null
const showE1 = e1Pts.length > 0
// Effort on this exercise, per session. It rides on the top-set curve as well as having a
@@ -419,14 +427,14 @@ export default function Stats() {
<h2>{t('Exercise progress')}</h2>
{exHist.length ? <>
<div className="sect-b" style={{ marginBottom: 10 }}>
<SelectRow title={t('Exercise')} sheetTitle={t('Exercise progress')} value={curEx} onChange={setExId}
<SelectRow title={t('Exercise')} sheetTitle={t('Exercise progress')} value={curEx} onChange={setExId} stackedValue
options={exHist.map(id => ({ value: id, label: nameOf(id) + (exCurrent[id].mx ? ' ' + '—' + ' ' + fmtNum(exCurrent[id].mx) + ' ' + exCurrent[id].unit : '') }))} />
</div>
{exOpts.length > 1 && <Segmented className="seg-range" value={onEff ? 'effort' : onE1 ? 'e1rm' : 'top'} onChange={setExMetric} options={exOpts} />}
<div className="chart">
{onEff
? <LineChart points={effPts} h={150} unit={hd} color="var(--yellow)" invert={kind === 'rir'} />
: <LineChart points={onE1 ? e1Pts.map(p => ({ t: p.t, y: p.y, d: p.d })) : topPts} h={150} unit={exUnit} color="var(--blue)" />}
: <LineChart points={onE1 ? e1ChartPts : topPts} h={150} unit={exUnit} color="var(--blue)" />}
</div>
<div style={{ marginTop: 8 }}>{exList.map((p, i) => <div key={i} className="row between small" style={{ padding: '6px 0', borderBottom: 'var(--hair) solid var(--sep)' }}>
<span className="muted">{fmtDate(p.d, true)}</span><span>{p.sets.map(s => setLabel(curEx, s, p.target)).join(' ')}</span></div>)}</div>
+11
View File
@@ -3,6 +3,8 @@ import { readFileSync } from 'node:fs'
import { bestWeightForEntry, metricModeForEntry, metricRowsForEntry } from '../lib/history.js'
const source = readFileSync(new URL('./Stats.jsx', import.meta.url), 'utf8')
const uiSource = readFileSync(new URL('../components/ui.jsx', import.meta.url), 'utf8')
const cssSource = readFileSync(new URL('../index.css', import.meta.url), 'utf8')
describe('Stats mixed-entry metric contract', () => {
it('selects authoritative reps rows before timed rows without stale topW', () => {
@@ -27,4 +29,13 @@ describe('Stats mixed-entry metric contract', () => {
expect(source).not.toContain('const loggedMode = entryMode(en)')
expect(source).not.toContain('(en.topW || 0)')
})
it('stacks the Stats exercise selector value without changing shared SelectRow defaults', () => {
expect(source).toContain("onChange={setExId} stackedValue")
expect(uiSource).toContain('sheetTitle, stackedValue = false')
expect(uiSource).toContain("className={stackedValue ? 'lrow-stack-value' : ''}")
expect(cssSource).toContain('.lrow.lrow-stack-value .lrow-m{grid-column:1;grid-row:1}')
expect(cssSource).toContain('.lrow.lrow-stack-value .lrow-v{grid-column:1;grid-row:2;text-align:left}')
expect(cssSource).toContain('overflow:hidden;text-overflow:ellipsis;white-space:nowrap')
})
})
+9 -2
View File
@@ -10,7 +10,7 @@ import { t, exerciseNameFor } from '../lib/i18n.js'
import { api } from '../lib/api.js'
import { setProgressHighWater, supersetFlowStep, restAfterSet, restOnRecheck } from '../lib/supersetFlow.js'
import Media from '../components/Media.jsx'
import { startFlow, exercisePicker, exConfigSheet, exerciseDetailSheet, topWeightSheet, finishWorkout, workoutCompleteSheet, confirmSheet, exerciseNoteSheet } from '../sheets.jsx'
import { startFlow, exercisePicker, exConfigSheet, exerciseDetailSheet, topWeightSheet, finishWorkout, workoutCompleteSheet, confirmSheet, exerciseNoteSheet, sessionNoteSheet } from '../sheets.jsx'
import Icon from '../components/Icon.jsx'
import { Button, Check, NumberField } from '../components/ui.jsx'
import { nextPrescription, applyPrescription, defaultIncrement } from '../lib/progression.js'
@@ -520,7 +520,7 @@ function ActiveWorkout() {
const full = { ...cfg, id: ex.id }
const plan = freestyle ? null : nextPrescription(s, full, s.routines.find(r => r.id === s.active.routineId))
const sets = buildSets(s, full, { step: defaultIncrement(ex.id, s.unit), ...(freestyle ? { preferLast: true } : {}) })
const progressed = freestyle ? sets : applyPrescription(sets, plan)
const progressed = freestyle ? sets : applyPrescription(sets, plan, defaultIncrement(ex.id, s.unit))
s.active.entries.push({ id: ex.id, target: { ...cfg }, plan, sets: applyIntensifierPlan(progressed, full) })
s.active.cur = s.active.entries.length - 1
}), null, routine, seed)
@@ -532,6 +532,13 @@ function ActiveWorkout() {
</div>
</>}
<div style={{ height: 10 }} />
{/* Wrapping up is when you know how the session went, so the note sits with the finish
button rather than somewhere in the header. */}
<div style={{ display: 'flex', justifyContent: 'center', marginBottom: 10 }}>
<Button size="sm" icon="pencil" variant={A.note ? 'tinted' : undefined} onClick={sessionNoteSheet}>
{A.note ? t('Edit session note') : t('Add session note')}
</Button>
</div>
{(() => {
const exDone = A.entries.filter(e => e.sets.length && e.sets.every(s => s.done)).length
const allDone = A.entries.length > 0 && exDone === A.entries.length
+4
View File
@@ -46,6 +46,10 @@ vi.mock('../sheets.jsx', () => ({
finishWorkout: vi.fn(),
workoutCompleteSheet: vi.fn(),
confirmSheet: vi.fn(),
// Both note sheets belong here even though the tests never open one: Workout.jsx reads
// sessionNoteSheet during render, so a missing export is a render crash, not a no-op.
exerciseNoteSheet: vi.fn(),
sessionNoteSheet: vi.fn(),
}))
vi.mock('../components/Media.jsx', () => ({ default: () => null }))
// api.js reads navigator.userAgent at module scope. This file installs its own DOM inside the
+7
View File
@@ -1,3 +1,4 @@
import { readFileSync } from 'node:fs'
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
@@ -28,7 +29,13 @@ const umami = {
}
}
// The version people are asked for in #install-help and on every bug report. Read from
// package.json so it cannot drift from the release it was built in, and inlined at build
// time so no runtime fetch is involved.
const pkgVersion = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8')).version
export default defineConfig({
define: { __APP_VERSION__: JSON.stringify(pkgVersion) },
plugins: [react(), umami],
base: './',
server: {
+12 -4
View File
@@ -15,7 +15,15 @@ Not in this folder (added at deploy time):
of exercise media stays out of it. It has to live on this host: the site frames it, and
`X-Frame-Options: SAMEORIGIN` would block it from anywhere else.
`site.js` fetches the star/issue counts and the release timeline from the public
gitlab.com API at view time. It pointed at api.github.com until that account was
suspended; the two URLs go back once it is restored, together with the notice
block at the top of `index.html` and the demo iframe.
`site.js` carries four independent pieces, each one failing soft so the page is
complete without any of them: the phone nav sheet, the scroll reveals, the demo
iframe (injected only once the frame is on screen, and never below 700 px, where
the CSS swaps it for an "open it full-screen" card), and the two things that come
from the public gitlab.com API at view time — the star/issue counts and the About
page's release timeline. Those two URLs pointed at api.github.com until that
account was suspended; they go back once it is restored, together with the notice
block at the top of all three pages.
`styles.css` and `site.js` are cache-busted with `?v=N` — nginx serves the site
with `no-cache, must-revalidate`, but the query bump is what saves a Cloudflare
edge from handing out an old stylesheet with new markup. Bump it on every change.
+62 -60
View File
@@ -2,14 +2,15 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<title>About — openGym</title>
<meta name="description" content="The story behind openGym: a gym tracker that started as a tiny personal app on a homelab server and grew into an open-source project.">
<meta name="theme-color" content="#0c0e12">
<meta name="theme-color" content="#000000">
<link rel="icon" type="image/png" sizes="512x512" href="icon-512.png">
<link rel="icon" type="image/png" sizes="180x180" href="icon-180.png">
<link rel="apple-touch-icon" href="icon-180.png">
<link rel="stylesheet" href="styles.css?v=3">
<link rel="stylesheet" href="styles.css?v=5">
<script>document.documentElement.className += ' js'</script>
<!-- Umami web analytics for opengym.duarte-santos.ch (self-hosted, cookieless). -->
<script defer src="https://stats.duarte-santos.ch/script.js" data-website-id="db36019e-50f4-453c-9c56-d0588aefe233"></script>
</head>
@@ -17,16 +18,19 @@
<nav><div class="wrap nav-in">
<a class="brand" href="/">
<img src="icon-180.png" alt="" width="26" height="26" style="border-radius:6px">
<img src="icon-180.png" alt="" width="24" height="24">
openGym
</a>
<div class="nav-links">
<a href="/#features" class="hide-s">Features</a>
<a href="/#screens" class="hide-s">Screenshots</a>
<a href="/#demo" class="hide-s">Demo</a>
<button class="nav-toggle" aria-expanded="false" aria-controls="menu" aria-label="Menu">
<span></span><span></span>
</button>
<div class="nav-links" id="menu">
<a href="/#features">Features</a>
<a href="/#screens">Screenshots</a>
<a href="/#demo">Demo</a>
<a href="docs.html">Docs</a>
<a href="about.html" class="hide-s">About</a>
<a href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener"><span data-gh="stars">GitLab</span></a>
<a href="about.html">About</a>
<a href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">GitLab <span data-gh="stars"></span></a>
<a href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord</a>
<a class="cta" href="/#download">Download</a>
</div>
@@ -34,66 +38,64 @@
<!-- TEMPORARY: GitHub account suspended -> repo lives on gitlab.com. Remove this block and
revert the links (+ site.js) to github.com once the account is restored. -->
<div class="alert" role="alert"><div class="wrap">
<div class="alert-tag">⚠️ Important notice</div>
<h2>My GitHub account has been suspended — the openGym repo is gone with it</h2>
<p><b>github.com/DuarteSantos8/openGym is offline.</b> The repository and the releases are
unreachable — not by choice. openGym itself is unaffected: the app, the APK on this page,
the demo (now hosted here) and every self-hosted install keep working exactly as before.</p>
<p>Until I get the account back, the code lives on GitLab — and the Discord is where I will
announce the moment it is resolved:</p>
<div class="alert-actions">
<a class="btn alert-btn" href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">gitlab.com/DuarteSantos8/opengym</a>
<a class="btn dc-btn" href="https://discord.gg/e62jY6fwVb" rel="noopener">Join the Discord</a>
</div>
<p class="alert-note">Every repository link on this site now points at GitLab — same code, same
AGPL-3.0 license, same history, and the releases, container images and APK builds are back.</p>
<div class="notice-wrap"><div class="wrap">
<aside class="notice" role="note">
<div class="notice-tag">Repository moved</div>
<h2>My GitHub account was suspended, and the openGym repo went with it.</h2>
<p><b>github.com/DuarteSantos8/openGym is offline</b> — not by choice. The app is
untouched: the APK, the demo and every self-hosted install work exactly as before. The
code, the releases, the container images and the APK builds now live on GitLab under
the same AGPL-3.0 license, and every repository link here points there.</p>
<div class="actions">
<a class="btn" href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">Open on GitLab</a>
<a class="btn dc-btn" href="https://discord.gg/e62jY6fwVb" rel="noopener">Join the Discord</a>
</div>
</aside>
</div></div>
<main class="wrap prose">
<h1>About openGym</h1>
<p class="lead">openGym wasn't planned as a product. It started as a tiny app I built for
one user: me.</p>
<p class="lead">openGym was not planned as a product. It started as a tiny app built for
exactly one user: me.</p>
<p>I wanted three things at the gym: log my workouts, track my body weight, and see whether
any of it was going anywhere. Every app I tried wanted a subscription, an account, or my
training data on someone else's servers — usually all three. So I did the homelab thing:
built a small mobile web page, put it on my own server, and started logging.</p>
training data on someone else's servers, and usually all three. So I did the homelab
thing: built a small mobile web page, put it on my own server, and started logging.</p>
<p>It turns out a tracker you build for yourself gets sharpened in a way products don't.
Every awkward tap at the squat rack became that evening's fix. The guided workout flow,
the weight pre-fills, the rest timer, the "ask my body weight before the first set"
ritual — none of that came from a feature list. It came from actually standing in the
gym with the thing in my hand.</p>
the weight pre-fills, the rest timer, the ritual of asking for body weight before the
first set: none of that came off a feature list. It came from standing in the gym with
the thing in my hand.</p>
<p>Then friends wanted in. That brought passkey profiles — sign in with your fingerprint,
no passwords, everyone's data separate — and sync, so the log survives any phone.
Somewhere along the way the little page got rewritten into a proper React app, learned
13 languages, grew a muscle map that reads three ways — where the volume went, what is
still recovering, and what each muscle is actually strong at — plus importers for
FitNotes, Strong, Hevy and Apple Health, and finally became a native Android app you can
install from this site.</p>
<p>Then friends wanted in. That brought passkey profiles, so everyone signs in with a
fingerprint and keeps their own data, and sync, so the log survives any phone. Somewhere
along the way the little page was rewritten into a proper React app, learned 13 languages,
grew a muscle map that reads three ways (where the volume went, what is still recovering,
and what each muscle is actually strong at), picked up importers for FitNotes, Strong,
Hevy and Apple Health, and finally became a native Android app you can install from
this site.</p>
<p>In July 2026 I open-sourced the whole thing under the <b>AGPL</b>. The license is the
point, not a footnote: your training data should be yours, the software that holds it
should be inspectable, and nobody — including me — should be able to take a closed,
paid version of it away from the community.</p>
should be inspectable, and nobody, me included, should be able to take a closed, paid
version of it away from the community.</p>
<p>openGym still runs on the same homelab server it started on, and I still log every
session with it. That's the quality bar: I'm the first user of every release.</p>
session with it. That is the quality bar: I am the first user of every release.</p>
<p class="who" style="color:var(--faint)">— <a href="https://duarte-santos.ch" rel="noopener">Duarte Santos</a></p>
<p class="who">— <a href="https://duarte-santos.ch" rel="noopener">Duarte Santos</a></p>
<h2>Milestones</h2>
<h2 id="milestones-h">Milestones</h2>
<!-- The releases below are a static fallback: site.js replaces them with the live list
of published GitHub releases, so this page never needs manual updating. Only the
first entry (pre-GitHub) is permanent. -->
of published GitLab releases, so this page never needs manual updating. Only the
first entry (pre-open-source) is permanent. -->
<ul class="tl" id="milestones">
<li><b>The personal app</b><span class="when">early summer 2026</span>
<p>A hand-written vanilla-JS page on my own server. One user, zero ambitions.</p></li>
<li data-fallback><b>v1.0.0 — open-sourced</b><span class="when">July 20, 2026</span>
<p>Docker-Compose self-hosting, passkey profiles, guided workouts, 1,324-exercise
<p>Docker Compose self-hosting, passkey profiles, guided workouts, a 1,324-exercise
library. AGPL from day one.</p></li>
<li data-fallback><b>Every release since</b><span class="when">ongoing</span>
<p>See the full list on <a href="https://gitlab.com/DuarteSantos8/opengym/-/releases" rel="noopener">GitLab → Releases</a>.</p></li>
@@ -101,33 +103,33 @@
<h2>Principles</h2>
<ul>
<li><b>Your data is yours.</b> Local-first, one-file backups, no lock-in — leaving
openGym must always be one export away.</li>
<li><b>No telemetry, ever.</b> If a feature needs analytics to justify itself, it
doesn't ship.</li>
<li><b>Dependency-light.</b> The backend is one Node file with a single dependency;
the frontend is React, a router and a store. Small enough to actually audit.</li>
<li><b>Open source that stays open.</b> AGPL-3.0, so every fork and every hosted
version owes its code back to everyone.</li>
<li><b>Your data is yours.</b> Local-first, one-file backups, no lock-in. Leaving openGym
must always be one export away.</li>
<li><b>No telemetry, ever.</b> If a feature needs analytics to justify itself, it does
not ship.</li>
<li><b>Dependency-light.</b> The backend is one Node file with a single dependency; the
frontend is React, a router and a store. Small enough to actually audit.</li>
<li><b>Open source that stays open.</b> AGPL-3.0, so every fork and every hosted version
owes its code back to everyone.</li>
</ul>
<div class="hero-btns" style="justify-content:flex-start;margin:30px 0 10px">
<div class="actions" style="margin:38px 0 0">
<a class="btn" href="/#download">Get openGym</a>
<a class="btn ghost" href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">Star it on GitLab</a>
<a class="link" href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">Star it on GitLab</a>
</div>
</main>
<footer><div class="wrap foot">
<span>openGym · AGPL-3.0 · © 2026 <a href="https://duarte-santos.ch" rel="noopener">Duarte Santos</a></span>
<span class="c">openGym · AGPL-3.0 · © 2026 <a href="https://duarte-santos.ch" rel="noopener">Duarte Santos</a></span>
<div class="links">
<a href="docs.html">Docs</a>
<a href="about.html" class="hide-s">About</a>
<a href="about.html">About</a>
<a href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">GitLab</a>
<a href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord</a>
<a href="/#download">Download</a>
</div>
</div></footer>
<script src="site.js" defer></script>
<script src="site.js?v=5" defer></script>
</body>
</html>
+30 -28
View File
@@ -2,14 +2,15 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<title>Docs — openGym</title>
<meta name="description" content="How to install openGym on Android, use it on iPhone, self-host it with Docker, import your training history, and keep backups.">
<meta name="theme-color" content="#0c0e12">
<meta name="theme-color" content="#000000">
<link rel="icon" type="image/png" sizes="512x512" href="icon-512.png">
<link rel="icon" type="image/png" sizes="180x180" href="icon-180.png">
<link rel="apple-touch-icon" href="icon-180.png">
<link rel="stylesheet" href="styles.css?v=3">
<link rel="stylesheet" href="styles.css?v=5">
<script>document.documentElement.className += ' js'</script>
<!-- Umami web analytics for opengym.duarte-santos.ch (self-hosted, cookieless). -->
<script defer src="https://stats.duarte-santos.ch/script.js" data-website-id="db36019e-50f4-453c-9c56-d0588aefe233"></script>
</head>
@@ -17,16 +18,19 @@
<nav><div class="wrap nav-in">
<a class="brand" href="/">
<img src="icon-180.png" alt="" width="26" height="26" style="border-radius:6px">
<img src="icon-180.png" alt="" width="24" height="24">
openGym
</a>
<div class="nav-links">
<a href="/#features" class="hide-s">Features</a>
<a href="/#screens" class="hide-s">Screenshots</a>
<a href="/#demo" class="hide-s">Demo</a>
<button class="nav-toggle" aria-expanded="false" aria-controls="menu" aria-label="Menu">
<span></span><span></span>
</button>
<div class="nav-links" id="menu">
<a href="/#features">Features</a>
<a href="/#screens">Screenshots</a>
<a href="/#demo">Demo</a>
<a href="docs.html">Docs</a>
<a href="about.html" class="hide-s">About</a>
<a href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener"><span data-gh="stars">GitLab</span></a>
<a href="about.html">About</a>
<a href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">GitLab <span data-gh="stars"></span></a>
<a href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord</a>
<a class="cta" href="/#download">Download</a>
</div>
@@ -34,23 +38,21 @@
<!-- TEMPORARY: GitHub account suspended -> repo lives on gitlab.com. Remove this block and
revert the links (+ site.js) to github.com once the account is restored. -->
<div class="alert" role="alert"><div class="wrap">
<div class="alert-tag">⚠️ Important notice</div>
<h2>My GitHub account has been suspended — the openGym repo is gone with it</h2>
<p><b>github.com/DuarteSantos8/openGym is offline.</b> The repository and the releases are
unreachable — not by choice. openGym itself is unaffected: the app, the APK on this page,
the demo (now hosted here) and every self-hosted install keep working exactly as before.</p>
<p>Until I get the account back, the code lives on GitLab — and the Discord is where I will
announce the moment it is resolved:</p>
<div class="alert-actions">
<a class="btn alert-btn" href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">gitlab.com/DuarteSantos8/opengym</a>
<a class="btn dc-btn" href="https://discord.gg/e62jY6fwVb" rel="noopener">Join the Discord</a>
</div>
<p class="alert-note">Every repository link on this site now points at GitLab — same code, same
AGPL-3.0 license, same history, and the releases, container images and APK builds are back.</p>
<div class="notice-wrap"><div class="wrap">
<aside class="notice" role="note">
<div class="notice-tag">Repository moved</div>
<h2>My GitHub account was suspended, and the openGym repo went with it.</h2>
<p><b>github.com/DuarteSantos8/openGym is offline</b> — not by choice. The app is
untouched: the APK, the demo and every self-hosted install work exactly as before. The
code, the releases, the container images and the APK builds now live on GitLab under
the same AGPL-3.0 license, and every repository link here points there.</p>
<div class="actions">
<a class="btn" href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">Open on GitLab</a>
<a class="btn dc-btn" href="https://discord.gg/e62jY6fwVb" rel="noopener">Join the Discord</a>
</div>
</aside>
</div></div>
<main class="wrap prose">
<h1>Docs</h1>
<p class="lead">Everything you need to get openGym running — on a phone, or on your own
@@ -197,16 +199,16 @@ docker compose up -d</code></pre>
</main>
<footer><div class="wrap foot">
<span>openGym · AGPL-3.0 · © 2026 <a href="https://duarte-santos.ch" rel="noopener">Duarte Santos</a></span>
<span class="c">openGym · AGPL-3.0 · © 2026 <a href="https://duarte-santos.ch" rel="noopener">Duarte Santos</a></span>
<div class="links">
<a href="docs.html">Docs</a>
<a href="about.html" class="hide-s">About</a>
<a href="about.html">About</a>
<a href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">GitLab</a>
<a href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord</a>
<a href="/#download">Download</a>
</div>
</div></footer>
<script src="site.js" defer></script>
<script src="site.js?v=5" defer></script>
</body>
</html>
+327 -176
View File
@@ -2,10 +2,10 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<title>openGym — free, open-source gym &amp; body-weight tracker</title>
<meta name="description" content="openGym is a free, open-source gym & body-weight tracker. Download the Android app or self-host it with Docker — no account, no cloud, no telemetry.">
<meta name="theme-color" content="#0c0e12">
<meta name="theme-color" content="#000000">
<meta property="og:title" content="openGym — your workouts, your weights, your data">
<meta property="og:description" content="Free, open-source gym & body-weight tracker. Android APK or self-hosted with Docker. No account, no cloud, no telemetry.">
<meta property="og:image" content="https://opengym.duarte-santos.ch/img/banner.png">
@@ -14,7 +14,10 @@
<link rel="icon" type="image/png" sizes="512x512" href="icon-512.png">
<link rel="icon" type="image/png" sizes="180x180" href="icon-180.png">
<link rel="apple-touch-icon" href="icon-180.png">
<link rel="stylesheet" href="styles.css?v=3">
<link rel="stylesheet" href="styles.css?v=5">
<!-- Marks that JS is alive before first paint, so the scroll-reveal styles never
hide content from a browser that will not run them. -->
<script>document.documentElement.className += ' js'</script>
<!-- Umami web analytics for opengym.duarte-santos.ch (self-hosted, cookieless). -->
<script defer src="https://stats.duarte-santos.ch/script.js" data-website-id="db36019e-50f4-453c-9c56-d0588aefe233"></script>
<script type="application/ld+json">
@@ -29,18 +32,37 @@
</head>
<body>
<!-- Icon set: one sprite, referenced with <use>. Line icons at 24×24, stroke 1.7. -->
<svg width="0" height="0" style="position:absolute" aria-hidden="true" focusable="false"><defs>
<symbol id="i-play" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"/><path d="M10.2 8.6l5 3.4-5 3.4z"/></symbol>
<symbol id="i-body" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="4.3" r="2.3"/><path d="M12 6.6v7.2M12 8.4L7.5 11M12 8.4l4.5 2.6M12 13.8l-2.6 6.4M12 13.8l2.6 6.4"/></symbol>
<symbol id="i-trend" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M3.5 16.5l5-5 3.5 3.5 6-6.5"/><path d="M15 8h3.5v3.5"/></symbol>
<symbol id="i-library" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><rect x="3.2" y="4.5" width="17.6" height="15" rx="2.4"/><path d="M3.2 9.2h17.6M8.6 9.2v10.3"/></symbol>
<symbol id="i-grid" viewBox="0 0 24 24" fill="currentColor"><rect x="2.6" y="4.4" width="3.6" height="3.6" rx="1.1" opacity=".35"/><rect x="7.8" y="4.4" width="3.6" height="3.6" rx="1.1"/><rect x="13" y="4.4" width="3.6" height="3.6" rx="1.1" opacity=".35"/><rect x="18.2" y="4.4" width="3.6" height="3.6" rx="1.1" opacity=".7"/><rect x="2.6" y="10.2" width="3.6" height="3.6" rx="1.1"/><rect x="7.8" y="10.2" width="3.6" height="3.6" rx="1.1" opacity=".35"/><rect x="13" y="10.2" width="3.6" height="3.6" rx="1.1" opacity=".7"/><rect x="18.2" y="10.2" width="3.6" height="3.6" rx="1.1"/><rect x="2.6" y="16" width="3.6" height="3.6" rx="1.1" opacity=".7"/><rect x="7.8" y="16" width="3.6" height="3.6" rx="1.1"/><rect x="13" y="16" width="3.6" height="3.6" rx="1.1" opacity=".35"/><rect x="18.2" y="16" width="3.6" height="3.6" rx="1.1" opacity=".35"/></symbol>
<symbol id="i-scale" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M3.4 8.2l4 3.4 3.6-2.6 3.7 3 5.9-5.4"/><path d="M3.4 16.4h17.2" stroke-dasharray="2.6 2.6"/></symbol>
<symbol id="i-phone" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><rect x="6.2" y="2.4" width="11.6" height="19.2" rx="3"/><path d="M10.6 5.2h2.8M12 18.4h.01"/></symbol>
<symbol id="i-server" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4.2" width="18" height="6.2" rx="2"/><rect x="3" y="13.6" width="18" height="6.2" rx="2"/><path d="M6.8 7.3h.01M6.8 16.7h.01"/></symbol>
<symbol id="i-discord" viewBox="0 0 71 55"><path d="M60.1045 4.8978C55.5792 2.8214 50.7265 1.2916 45.6527 0.41542C45.5603 0.39851 45.468 0.440769 45.4204 0.525289C44.7963 1.6353 44.105 3.0834 43.6209 4.2216C38.1637 3.4046 32.7345 3.4046 27.3892 4.2216C26.905 3.0581 26.1886 1.6353 25.5617 0.525289C25.5141 0.443589 25.4218 0.40133 25.3294 0.41542C20.2584 1.2888 15.4057 2.8186 10.8776 4.8978C10.8384 4.9147 10.8048 4.9429 10.7825 4.9795C1.57795 18.7309 -0.943561 32.1443 0.293408 45.3914C0.299005 45.4562 0.335386 45.5182 0.385761 45.5576C6.45866 50.0174 12.3413 52.7249 18.1147 54.5195C18.2071 54.5477 18.305 54.5139 18.3638 54.4378C19.7295 52.5728 20.9469 50.6063 21.9907 48.5383C22.0523 48.4172 21.9935 48.2735 21.8676 48.2256C19.9366 47.4931 18.0979 46.6 16.3292 45.5858C16.1893 45.5041 16.1781 45.304 16.3068 45.2082C16.679 44.9293 17.0513 44.6391 17.4067 44.3461C17.4711 44.2926 17.5606 44.2813 17.6362 44.3151C29.2558 49.6217 41.8354 49.6217 53.3179 44.3151C53.3935 44.2785 53.483 44.2898 53.5502 44.3433C53.9057 44.6363 54.2779 44.9293 54.6529 45.2082C54.7816 45.304 54.7732 45.5041 54.6333 45.5858C52.8646 46.6197 51.0259 47.4931 49.0921 48.2228C48.9662 48.2707 48.9102 48.4172 48.9718 48.5383C50.038 50.6034 51.2554 52.5699 52.5959 54.435C52.6519 54.5139 52.7526 54.5477 52.845 54.5195C58.6464 52.7249 64.529 50.0174 70.6019 45.5576C70.6551 45.5182 70.6887 45.459 70.6943 45.3942C72.1747 30.0791 68.2147 16.7757 60.1968 4.9823C60.1772 4.9429 60.1437 4.9147 60.1045 4.8978ZM23.7259 37.3253C20.2276 37.3253 17.3451 34.1136 17.3451 30.1693C17.3451 26.225 20.1717 23.0133 23.7259 23.0133C27.308 23.0133 30.1626 26.2532 30.1066 30.1693C30.1066 34.1136 27.28 37.3253 23.7259 37.3253ZM47.3178 37.3253C43.8196 37.3253 40.9371 34.1136 40.9371 30.1693C40.9371 26.225 43.7636 23.0133 47.3178 23.0133C50.9 23.0133 53.7545 26.2532 53.6986 30.1693C53.6986 34.1136 50.9 37.3253 47.3178 37.3253Z"/></symbol>
<symbol id="i-gitlab" viewBox="0 0 24 24"><path d="m23.6004 9.5927-.0337-.0862L20.3.9814a.851.851 0 0 0-.3362-.405.8748.8748 0 0 0-.9997.0539.8748.8748 0 0 0-.29.4399l-2.2055 6.748H7.5375l-2.2057-6.748a.8573.8573 0 0 0-.29-.4412.8748.8748 0 0 0-.9997-.0537.8585.8585 0 0 0-.3362.4049L.4332 9.5015l-.0325.0862a6.0657 6.0657 0 0 0 2.0119 7.0105l.0113.0087.03.0213 4.976 3.7264 2.462 1.8633 1.4995 1.1321a1.0085 1.0085 0 0 0 1.2197 0l1.4995-1.1321 2.4619-1.8633 5.006-3.7489.0125-.01a6.0682 6.0682 0 0 0 2.0094-7.003z"/></symbol>
<symbol id="i-github" viewBox="0 0 24 24"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></symbol>
<symbol id="i-bmc" viewBox="0 0 24 24"><path d="M20.216 6.415l-.132-.666c-.119-.598-.388-1.163-1.001-1.379-.197-.069-.42-.098-.57-.241-.152-.143-.196-.366-.231-.572-.065-.378-.125-.756-.192-1.133-.057-.325-.102-.69-.25-.987-.195-.4-.597-.634-.996-.788a5.723 5.723 0 00-.626-.194c-1-.263-2.05-.36-3.077-.416a25.834 25.834 0 00-3.7.062c-.915.083-1.88.184-2.75.5-.318.116-.646.256-.888.501-.297.302-.393.77-.177 1.146.154.267.415.456.692.58.36.162.737.284 1.123.366 1.075.238 2.189.331 3.287.37 1.218.05 2.437.01 3.65-.118.299-.033.598-.073.896-.119.352-.054.578-.513.474-.834-.124-.383-.457-.531-.834-.473-.466.074-.96.108-1.382.146-1.177.08-2.358.082-3.536.006a22.228 22.228 0 01-1.157-.107c-.086-.01-.18-.025-.258-.036-.243-.036-.484-.08-.724-.13-.111-.027-.111-.185 0-.212h.005c.277-.06.557-.108.838-.147h.002c.131-.009.263-.032.394-.048a25.076 25.076 0 013.426-.12c.674.019 1.347.067 2.017.144l.228.031c.267.04.533.088.798.145.392.085.895.113 1.07.542.055.137.08.288.111.431l.319 1.484a.237.237 0 01-.199.284h-.003c-.037.006-.075.01-.112.015a36.704 36.704 0 01-4.743.295 37.059 37.059 0 01-4.699-.304c-.14-.017-.293-.042-.417-.06-.326-.048-.649-.108-.973-.161-.393-.065-.768-.032-1.123.161-.29.16-.527.404-.675.701-.154.316-.199.66-.267 1-.069.34-.176.707-.135 1.056.087.753.613 1.365 1.37 1.502a39.69 39.69 0 0011.343.376.483.483 0 01.535.53l-.071.697-1.018 9.907c-.041.41-.047.832-.125 1.237-.122.637-.553 1.028-1.182 1.171-.577.131-1.165.2-1.756.205-.656.004-1.31-.025-1.966-.022-.699.004-1.556-.06-2.095-.58-.475-.458-.54-1.174-.605-1.793l-.731-7.013-.322-3.094c-.037-.351-.286-.695-.678-.678-.336.015-.718.3-.678.679l.228 2.185.949 9.112c.147 1.344 1.174 2.068 2.446 2.272.742.12 1.503.144 2.257.156.966.016 1.942.053 2.892-.122 1.408-.258 2.465-1.198 2.616-2.657.34-3.332.683-6.663 1.024-9.995l.215-2.087a.484.484 0 01.39-.426c.402-.078.787-.212 1.074-.518.455-.488.546-1.124.385-1.766zm-1.478.772c-.145.137-.363.201-.578.233-2.416.359-4.866.54-7.308.46-1.748-.06-3.477-.254-5.207-.498-.17-.024-.353-.055-.47-.18-.22-.236-.111-.71-.054-.995.052-.26.152-.609.463-.646.484-.057 1.046.148 1.526.22.577.088 1.156.159 1.737.212 2.48.226 5.002.19 7.472-.14.45-.06.899-.13 1.345-.21.399-.072.84-.206 1.08.206.166.281.188.657.162.974a.544.544 0 01-.169.364zm-6.159 3.9c-.862.37-1.84.788-3.109.788a5.884 5.884 0 01-1.569-.217l.877 9.004c.065.78.717 1.38 1.5 1.38 0 0 1.243.065 1.658.065.447 0 1.786-.065 1.786-.065.783 0 1.434-.6 1.499-1.38l.94-9.95a3.996 3.996 0 00-1.322-.238c-.826 0-1.491.284-2.26.613z"/></symbol>
</defs></svg>
<nav><div class="wrap nav-in">
<a class="brand" href="/">
<img src="icon-180.png" alt="" width="26" height="26" style="border-radius:6px">
<img src="icon-180.png" alt="" width="24" height="24">
openGym
</a>
<div class="nav-links">
<a href="#features" class="hide-s">Features</a>
<a href="#screens" class="hide-s">Screenshots</a>
<a href="#demo" class="hide-s">Demo</a>
<button class="nav-toggle" aria-expanded="false" aria-controls="menu" aria-label="Menu">
<span></span><span></span>
</button>
<div class="nav-links" id="menu">
<a href="#features">Features</a>
<a href="#screens">Screenshots</a>
<a href="#demo">Demo</a>
<a href="docs.html">Docs</a>
<a href="about.html" class="hide-s">About</a>
<a href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener"><span data-gh="stars">GitLab</span></a>
<a href="about.html">About</a>
<a href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">GitLab <span data-gh="stars"></span></a>
<a href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord</a>
<a class="cta" href="#download">Download</a>
</div>
@@ -48,188 +70,317 @@
<!-- TEMPORARY: GitHub account suspended -> repo lives on gitlab.com. Remove this block and
revert the links (+ site.js) to github.com once the account is restored. -->
<div class="alert" role="alert"><div class="wrap">
<div class="alert-tag">⚠️ Important notice</div>
<h2>My GitHub account has been suspended — the openGym repo is gone with it</h2>
<p><b>github.com/DuarteSantos8/openGym is offline.</b> The repository and the releases are
unreachable — not by choice. openGym itself is unaffected: the app, the APK on this page,
the demo (now hosted here) and every self-hosted install keep working exactly as before.</p>
<p>Until I get the account back, the code lives on GitLab — and the Discord is where I will
announce the moment it is resolved:</p>
<div class="alert-actions">
<a class="btn alert-btn" href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">gitlab.com/DuarteSantos8/opengym</a>
<a class="btn dc-btn" href="https://discord.gg/e62jY6fwVb" rel="noopener">Join the Discord</a>
</div>
<p class="alert-note">Every repository link on this site now points at GitLab — same code, same
AGPL-3.0 license, same history, and the releases, container images and APK builds are back.</p>
<div class="notice-wrap"><div class="wrap">
<aside class="notice" role="note">
<div class="notice-tag">Repository moved</div>
<h2>My GitHub account was suspended, and the openGym repo went with it.</h2>
<p><b>github.com/DuarteSantos8/openGym is offline</b> — not by choice. The app is
untouched: the APK, the demo and every self-hosted install work exactly as before. The
code, the releases, the container images and the APK builds now live on GitLab under
the same AGPL-3.0 license, and every repository link here points there.</p>
<div class="actions">
<a class="btn" href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">Open on GitLab</a>
<a class="btn dc-btn" href="https://discord.gg/e62jY6fwVb" rel="noopener">Join the Discord</a>
</div>
</aside>
</div></div>
<header class="hero"><div class="wrap">
<div class="logo">
<img src="icon-512.png" alt="openGym icon" width="108" height="108" style="border-radius:26px">
</div>
<h1>openGym</h1>
<p class="tag">Your workouts. Your weights. Your data.</p>
<p class="sub">A free, open-source gym &amp; body-weight tracker.
No subscription, no account required, no telemetry — ever.</p>
<div class="hero-btns">
<a class="btn" href="#download">Get openGym</a>
<a class="btn ghost" href="#demo">Try the live demo</a>
<a class="btn ghost" href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">GitLab <span class="ct" data-gh="stars">★</span></a>
</div>
</div></header>
<div class="dc-wrap"><div class="wrap">
<div class="dc">
<div class="dc-icon"><svg viewBox="0 0 71 55" width="44" height="34" aria-hidden="true"><path d="M60.1045 4.8978C55.5792 2.8214 50.7265 1.2916 45.6527 0.41542C45.5603 0.39851 45.468 0.440769 45.4204 0.525289C44.7963 1.6353 44.105 3.0834 43.6209 4.2216C38.1637 3.4046 32.7345 3.4046 27.3892 4.2216C26.905 3.0581 26.1886 1.6353 25.5617 0.525289C25.5141 0.443589 25.4218 0.40133 25.3294 0.41542C20.2584 1.2888 15.4057 2.8186 10.8776 4.8978C10.8384 4.9147 10.8048 4.9429 10.7825 4.9795C1.57795 18.7309 -0.943561 32.1443 0.293408 45.3914C0.299005 45.4562 0.335386 45.5182 0.385761 45.5576C6.45866 50.0174 12.3413 52.7249 18.1147 54.5195C18.2071 54.5477 18.305 54.5139 18.3638 54.4378C19.7295 52.5728 20.9469 50.6063 21.9907 48.5383C22.0523 48.4172 21.9935 48.2735 21.8676 48.2256C19.9366 47.4931 18.0979 46.6 16.3292 45.5858C16.1893 45.5041 16.1781 45.304 16.3068 45.2082C16.679 44.9293 17.0513 44.6391 17.4067 44.3461C17.4711 44.2926 17.5606 44.2813 17.6362 44.3151C29.2558 49.6217 41.8354 49.6217 53.3179 44.3151C53.3935 44.2785 53.483 44.2898 53.5502 44.3433C53.9057 44.6363 54.2779 44.9293 54.6529 45.2082C54.7816 45.304 54.7732 45.5041 54.6333 45.5858C52.8646 46.6197 51.0259 47.4931 49.0921 48.2228C48.9662 48.2707 48.9102 48.4172 48.9718 48.5383C50.038 50.6034 51.2554 52.5699 52.5959 54.435C52.6519 54.5139 52.7526 54.5477 52.845 54.5195C58.6464 52.7249 64.529 50.0174 70.6019 45.5576C70.6551 45.5182 70.6887 45.459 70.6943 45.3942C72.1747 30.0791 68.2147 16.7757 60.1968 4.9823C60.1772 4.9429 60.1437 4.9147 60.1045 4.8978ZM23.7259 37.3253C20.2276 37.3253 17.3451 34.1136 17.3451 30.1693C17.3451 26.225 20.1717 23.0133 23.7259 23.0133C27.308 23.0133 30.1626 26.2532 30.1066 30.1693C30.1066 34.1136 27.28 37.3253 23.7259 37.3253ZM47.3178 37.3253C43.8196 37.3253 40.9371 34.1136 40.9371 30.1693C40.9371 26.225 43.7636 23.0133 47.3178 23.0133C50.9 23.0133 53.7545 26.2532 53.6986 30.1693C53.6986 34.1136 50.9 37.3253 47.3178 37.3253Z"/></svg></div>
<div class="dc-body">
<h3>Join the openGym Discord</h3>
<p>Release announcements, self-hosting help with Docker, reverse proxies and passkeys,
and somewhere to report a bug. It is where you will hear about a new version first.</p>
</div>
<a class="btn" href="https://discord.gg/e62jY6fwVb" rel="noopener">Join the Discord</a>
</div>
</div></div>
<section id="features"><div class="wrap">
<p class="kicker">Everything a training log needs</p>
<h2>Built in the gym, not in a boardroom</h2>
<p class="lead">Every feature exists because it was needed on the gym floor — nothing is
there to sell you anything.</p>
<div class="grid">
<div class="feat"><div class="ic">▶️</div><h3>Guided workouts</h3><p>Knows what day it is, starts today's session, pre-fills your weights from last time, times your rest, spots PRs.</p></div>
<div class="feat"><div class="ic">🏋️</div><h3>1,324 exercises</h3><p>Searchable library with animated demos, filterable by body part and the equipment you actually own — plus your own custom exercises.</p></div>
<div class="feat"><div class="ic">🗓️</div><h3>Weekly plan</h3><p>A routine per weekday, and any day can be rescheduled when life happens — without touching the plan.</p></div>
<div class="feat"><div class="ic">⚖️</div><h3>Body weight &amp; goal</h3><p>Interactive chart with your goal line; every change is colored by whether it moves toward it.</p></div>
<div class="feat"><div class="ic">💪</div><h3>Muscle map, three ways</h3><p>A body diagram read as <b>balance</b> (where the volume went, and which muscles got nothing), <b>fatigue</b> (what is still recovering, weighted by how hard each set was) or <b>strength</b> (how long since you trained it — and the exercises behind it, with their estimated 1RM).</p></div>
<div class="feat"><div class="ic">🟩</div><h3>Activity heatmap</h3><p>A GitHub-style year view of your training time. Streaks included.</p></div>
<div class="feat"><div class="ic">📈</div><h3>Progression that follows a rule</h3><p>Linear, Greyskull LP, double progression or added time — per routine, overridable per exercise. Your weights are already right when the session opens, and every target tells you why.</p></div>
<div class="feat"><div class="ic">⏱️</div><h3>Timed sets</h3><p>Planks, hangs and carries are logged by time, with a timer for the set itself. Stop early and it logs what you actually held.</p></div>
<div class="feat"><div class="ic">🧮</div><h3>Estimated 1RM</h3><p>Per exercise, from your best eligible set — and it names which one. Won't guess above 12 reps.</p></div>
<div class="feat"><div class="ic">🔗</div><h3>Supersets &amp; cardio</h3><p>Plan them, or pair two exercises mid-session and unpair them again. Work the group back-to-back with one rest per round — and log time + speed where weight × reps makes no sense.</p></div>
<div class="feat"><div class="ic">📤</div><h3>Share a plan</h3><p>Send someone your routines as a small file — no workouts, no weigh-ins — or print it as a clean PDF. Importing merges, never overwrites.</p></div>
<div class="feat"><div class="ic">🎯</div><h3>Effort per set</h3><p>Rate a set as RIR or RPE — whichever scale you already think in. Optional, and every set keeps the scale it was logged with.</p></div>
<div class="feat"><div class="ic">☀️</div><h3>Screen stays awake</h3><p>No unlocking the phone between sets. The screen stays lit while a workout runs, and lets go the moment you finish.</p></div>
<div class="feat"><div class="ic">📥</div><h3>Bring your history</h3><p>Import from FitNotes, Strong, Hevy — including the RPE they recorded — or body weight straight out of an Apple Health export.</p></div>
<div class="feat"><div class="ic">🌍</div><h3>13 languages</h3><p>Full UI translation, exercise instructions in 11 languages, and bilingual PT-BR exercise names, loaded on demand.</p></div>
<div class="feat"><div class="ic">🔑</div><h3>Passkeys, not passwords</h3><p>Self-hosted profiles sign in with Face ID / fingerprint. Each person's data stays their own.</p></div>
<div class="feat"><div class="ic">🎨</div><h3>Designed, not assembled</h3><p>Light &amp; dark themes, 8 accent colors, a hand-drawn icon set. Looks the same on every phone.</p></div>
<div class="feat"><div class="ic">🔥</div><h3>Warm-up sets</h3><p>Mark the ramp-up rows as warm-ups and they stay out of your 1RM, your progression and the fatigue map — present in the session, absent from the numbers.</p></div>
<div class="feat"><div class="ic">🤖</div><h3>Ask an AI about your training</h3><p>An optional MCP server lets a client like Claude Desktop read your history in your own words — <i>"what did I bench last week?"</i>. Read-only, runs on your machine, not in the Docker build.</p></div>
<div class="feat"><div class="ic">📦</div><h3>Yours to keep</h3><p>One-tap JSON export and import. Your training log is a file you own, not a row in someone's cloud.</p></div>
</div>
</div></section>
<section id="screens"><div class="wrap">
<p class="kicker">Screenshots</p>
<h2>Five screens, zero clutter</h2>
<div class="shots">
<figure><img src="img/home.png" alt="openGym home screen with weekly overview and body-weight chart" loading="lazy" width="1170" height="2532"><figcaption>Home</figcaption></figure>
<figure><img src="img/workout.png" alt="Guided workout screen with sets, rest timer and pre-filled weights" loading="lazy" width="1170" height="2532"><figcaption>Workout</figcaption></figure>
<figure><img src="img/stats.png" alt="Stats screen with activity heatmap and charts" loading="lazy" width="1170" height="2532"><figcaption>Stats</figcaption></figure>
<figure><img src="img/plan.png" alt="Weekly plan screen with routines per weekday" loading="lazy" width="1170" height="2532"><figcaption>Plan</figcaption></figure>
<figure><img src="img/library.png" alt="Exercise library with search and filters" loading="lazy" width="1170" height="2532"><figcaption>Library</figcaption></figure>
</div>
</div></section>
<section id="demo"><div class="wrap">
<p class="kicker">Live demo</p>
<h2>Try it right here</h2>
<p class="lead">This is the real app with seeded example data, running in your browser —
poke around, start a workout, change anything.</p>
<div class="demo-wrap">
<div class="phone"><iframe src="/demo/" title="openGym live demo" loading="lazy"></iframe></div>
</div>
<p class="demo-note">Demo data lives only in this browser tab-family and can be reset in its
Settings. Prefer a full window? <a href="/demo/">Open the demo full-screen →</a></p>
</div></section>
<section id="download"><div class="wrap">
<p class="kicker">Get openGym</p>
<h2>One app, two flavors</h2>
<p class="lead">Same codebase, your choice of where the data lives: entirely on your phone,
or on a server you control.</p>
<div class="duo">
<div class="card hl">
<h3>📱 Mobile app</h3>
<p class="for">For anyone — install and you're done.</p>
<ul>
<li>Everything stays on your phone</li>
<li>No account, no server, no setup</li>
<li>Native workout-day reminders</li>
<li>Backups via the share sheet</li>
<li class="no">No cross-device sync</li>
</ul>
<a class="btn" href="openGym.apk" download>Download for Android</a>
<p class="meta">v1.2.9 · 4.3 MB · Android 6.0+ · signed APK, sideload (your browser will ask — that's normal outside the Play Store)</p>
<p class="meta">Every release is also built and signed by CI and attached to the
<a href="https://gitlab.com/DuarteSantos8/opengym/-/releases" rel="noopener">GitLab
releases page</a>, checksums and all.</p>
<p class="meta"><b>iPhone?</b> Apple doesn't allow installs outside the App Store — use the
self-hosted version as a home-screen app instead, or see <a href="docs.html#iphone">the docs</a>.</p>
</div>
<div class="card">
<h3>🖥️ Self-hosted</h3>
<p class="for">For homelabbers — and their friends &amp; family.</p>
<ul>
<li>Sync across all your devices</li>
<li>Passkey profiles for multiple people</li>
<li>Your data readable on the desktop</li>
<li>Works as a home-screen app on iPhone &amp; Android</li>
<li>One <code>docker compose up</code></li>
</ul>
<a class="btn ghost" href="docs.html#selfhost">Self-hosting guide</a>
<p class="meta">AGPL-3.0 · prebuilt images for amd64 + arm64</p>
<header class="hero">
<div class="wrap">
<p class="eyebrow">openGym</p>
<h1>Your workouts.<br>Your weights.<br><span>Your data.</span></h1>
<p class="lead">A free, open-source gym and body-weight tracker. No subscription, no
account required, and no telemetry — not now, not later.</p>
<div class="actions">
<a class="btn" href="#download">Get openGym</a>
<a class="link" href="#demo">Try the live demo</a>
</div>
</div>
</div></section>
<div class="hero-stage">
<div class="device">
<img src="img/home.png" alt="openGym home screen: the week at a glance, today's session and a body-weight chart"
width="1170" height="2532" fetchpriority="high">
</div>
</div>
<div class="hero-fade"></div>
</header>
<section id="story"><div class="wrap">
<div class="story">
<p class="kicker">Why openGym exists</p>
<blockquote>openGym started as <strong>a tiny app I built for myself</strong> — I just wanted to
log my workouts and weight without a subscription app claiming my training data.
Then friends wanted in, then it grew a mind of its own.</blockquote>
<p class="who">— Duarte Santos · <a href="about.html">read the whole story →</a></p>
</div>
</div></section>
<section id="features">
<div class="wrap">
<div class="sec-head rv">
<p class="eyebrow">Features</p>
<h2>Built on the gym floor.</h2>
<p class="lead">Every feature here exists because something was awkward between two sets.
Nothing is here to sell you anything.</p>
</div>
<section id="opensource"><div class="wrap">
<p class="kicker">Open source</p>
<h2>AGPL-licensed, forever</h2>
<p class="lead">The code is public, the license keeps every fork open, and there is no
commercial version waiting behind a curtain. If openGym is useful to you,
a ⭐ on GitLab helps more people find it.</p>
<p class="lead">There is a Discord for release announcements, self-hosting help and bug
reports. It is the fastest way to hear about a new version — and the fastest way
to get unstuck if a reverse proxy or a passkey is fighting you.</p>
<div class="os">
<div class="stat"><b data-gh="stars-n">–</b><span>GitLab stars</span></div>
<div class="stat"><b data-gh="forks-n">–</b><span>forks</span></div>
<div class="stat"><b data-gh="issues-n">–</b><span>open issues</span></div>
<div class="stat"><b>1,324</b><span>exercises</span></div>
<div class="stat"><b>13</b><span>languages</span></div>
<div class="bento">
<div class="tile wide rv">
<div class="ic"><svg><use href="#i-play"/></svg></div>
<h3>Guided workouts</h3>
<p>It already knows what day it is. Today's session opens with your weights from last
time filled in, rest timed between sets, and a PR called out the moment you beat one.</p>
</div>
<div class="tile wide rv">
<div class="ic"><svg><use href="#i-trend"/></svg></div>
<h3>Progression that follows a rule</h3>
<p>Linear, Greyskull LP, double progression or added time, set per routine and
overridable per exercise. The targets are right when the session opens, and each
one tells you where it came from.</p>
</div>
<div class="tile full rv">
<div class="ic"><svg><use href="#i-body"/></svg></div>
<h3>A muscle map that reads three ways</h3>
<p>The same body diagram, three questions.</p>
<div class="trio">
<div><b>Balance</b>Where the volume actually went, and which muscles got nothing.</div>
<div><b>Fatigue</b>What is still recovering, weighted by how hard each set was.</div>
<div><b>Strength</b>How long since you trained it, and the lifts behind it with their estimated 1RM.</div>
</div>
</div>
<div class="tile rv">
<div class="ic"><svg><use href="#i-library"/></svg></div>
<h3>1,324 exercises</h3>
<p>Animated demos, searchable, filtered by body part and by the equipment you actually
own. Add your own and they behave like the rest.</p>
</div>
<div class="tile rv">
<div class="ic"><svg><use href="#i-scale"/></svg></div>
<h3>Body weight, with a goal line</h3>
<p>An interactive chart with your target drawn across it. Every change is coloured by
whether it moved you toward it.</p>
</div>
<div class="tile rv">
<div class="ic"><svg><use href="#i-grid"/></svg></div>
<h3>A year of training, at a glance</h3>
<p>Every session as a square in a heatmap, shaded by how long you trained. Streaks
counted, quiet weeks impossible to miss.</p>
</div>
</div>
<div class="more rv">
<h3>And the rest of it</h3>
<dl>
<div><dt>Weekly plan</dt><dd>A routine per weekday. Any single day can be moved when life happens, without editing the plan itself.</dd></div>
<div><dt>Supersets and cardio</dt><dd>Plan them, or pair two exercises mid-session and unpair them again. One rest per round, and time-plus-speed logging where weight times reps says nothing.</dd></div>
<div><dt>Timed sets</dt><dd>Planks, hangs and carries are logged by time, with a timer for the set itself. Stop early and it records what you actually held.</dd></div>
<div><dt>Warm-up sets</dt><dd>Mark the ramp-up rows and they stay out of your 1RM, your progression and the fatigue map. Present in the session, absent from the numbers.</dd></div>
<div><dt>Estimated 1RM</dt><dd>Per exercise, from your best eligible set, naming which set it used. It will not guess above 12 reps.</dd></div>
<div><dt>Effort per set</dt><dd>Rate a set as RIR or RPE, whichever scale you already think in. Optional, and each set keeps the scale it was logged with.</dd></div>
<div><dt>Share a plan</dt><dd>Send someone your routines as a small file, or print them as a clean PDF. No workouts, no weigh-ins, and importing merges instead of overwriting.</dd></div>
<div><dt>Bring your history</dt><dd>Import from FitNotes, Strong or Hevy, including the RPE they recorded, or body weight straight out of an Apple Health export.</dd></div>
<div><dt>The screen stays awake</dt><dd>No unlocking the phone between sets. The display stays lit while a workout runs and lets go the moment you finish.</dd></div>
<div><dt>13 languages</dt><dd>The full interface, plus exercise instructions in 11 languages and bilingual Brazilian Portuguese names, all loaded on demand.</dd></div>
<div><dt>Passkeys, not passwords</dt><dd>Self-hosted profiles sign in with Face ID or a fingerprint. Everyone's data stays their own.</dd></div>
<div><dt>Designed, not assembled</dt><dd>Light and dark themes, eight accent colours, a hand-drawn icon set, and the same layout on every phone.</dd></div>
<div><dt>Ask an AI about your training</dt><dd>An optional MCP server lets a client like Claude Desktop read your history in plain language. Read-only, on your machine, and not part of the Docker build.</dd></div>
<div><dt>Yours to keep</dt><dd>One-tap JSON export and import. Your training log is a file you own, not a row in someone's database.</dd></div>
</dl>
</div>
</div>
<div class="hero-btns" style="justify-content:flex-start;margin-top:24px">
<a class="btn ghost" href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">openGym on GitLab</a>
<a class="btn ghost" href="https://gitlab.com/DuarteSantos8/opengym/-/blob/main/CONTRIBUTING.md" rel="noopener">Contributing</a>
<a class="btn ghost" href="https://gitlab.com/DuarteSantos8/opengym/-/blob/main/CHANGELOG.md" rel="noopener">Changelog</a>
<a class="btn" href="https://discord.gg/e62jY6fwVb" rel="noopener">Join the Discord</a>
</section>
<section id="screens">
<div class="wrap">
<div class="sec-head rv">
<p class="eyebrow">Screenshots</p>
<h2>Five screens, and that's the app.</h2>
</div>
</div>
</div></section>
<div class="bleed rv">
<div class="rail">
<figure><div class="device"><img src="img/home.png" alt="Home screen with the weekly overview and body-weight chart" loading="lazy" width="1170" height="2532"></div><figcaption>Home</figcaption></figure>
<figure><div class="device"><img src="img/workout.png" alt="Guided workout screen with sets, rest timer and pre-filled weights" loading="lazy" width="1170" height="2532"></div><figcaption>Workout</figcaption></figure>
<figure><div class="device"><img src="img/stats.png" alt="Stats screen with the activity heatmap and charts" loading="lazy" width="1170" height="2532"></div><figcaption>Stats</figcaption></figure>
<figure><div class="device"><img src="img/plan.png" alt="Weekly plan screen with a routine per weekday" loading="lazy" width="1170" height="2532"></div><figcaption>Plan</figcaption></figure>
<figure><div class="device"><img src="img/library.png" alt="Exercise library with search and filters" loading="lazy" width="1170" height="2532"></div><figcaption>Library</figcaption></figure>
</div>
</div>
<div class="wrap"><p class="rail-hint">Swipe through them.</p></div>
</section>
<section id="demo">
<div class="wrap">
<div class="sec-head rv">
<p class="eyebrow">Live demo</p>
<h2>Try it right here.</h2>
<p class="lead">The real app with a seeded example history, running in your browser.
Start a workout, break something, change anything you like.</p>
</div>
<!-- The iframe is injected by site.js, and only on viewports wide enough to show the
frame. On a phone, a phone inside a phone is not worth the download. -->
<div class="demo-stage rv">
<div class="device"><div class="device-slot" data-demo="/demo/"></div></div>
</div>
<p class="demo-note">Demo data lives only in this browser and can be reset from its own
Settings. <a href="/demo/">Open it full-screen</a> if you would rather have the room.</p>
<div class="demo-card">
<p>The demo wants the whole screen to itself. Its data lives only in this browser and
can be reset from its own Settings.</p>
<a class="btn" href="/demo/">Open the live demo</a>
</div>
</div>
</section>
<section id="download">
<div class="wrap">
<div class="sec-head rv">
<p class="eyebrow">Get openGym</p>
<h2>One app, two flavors.</h2>
<p class="lead">Same codebase. The choice is where your data lives: entirely on your
phone, or on a server you control.</p>
</div>
<div class="duo">
<div class="card hl rv">
<div class="ic"><svg><use href="#i-phone"/></svg></div>
<h3>Mobile app</h3>
<p class="for">For anyone. Install it and you are done.</p>
<ul>
<li>Everything stays on your phone</li>
<li>No account, no server, no setup</li>
<li>Native workout-day reminders</li>
<li>Backups through the share sheet</li>
<li class="no">No sync across devices</li>
</ul>
<div class="push">
<a class="btn" href="openGym.apk" download>Download for Android</a>
<p class="meta">v1.2.11 · 4.3 MB · Android 6.0+ · signed APK. Your browser will ask
before installing; that is normal outside the Play Store.</p>
<p class="meta">Every release is also built and signed by CI and attached to the
<a href="https://gitlab.com/DuarteSantos8/opengym/-/releases" rel="noopener">GitLab
releases page</a>, checksums and all.</p>
<p class="meta"><b>On iPhone?</b> Apple does not allow installs outside the App Store.
Use the self-hosted version as a home-screen app instead, or see
<a href="docs.html#iphone">the docs</a>.</p>
</div>
</div>
<div class="card rv">
<div class="ic"><svg><use href="#i-server"/></svg></div>
<h3>Self-hosted</h3>
<p class="for">For homelabbers, and the people they train with.</p>
<ul>
<li>Sync across all your devices</li>
<li>Passkey profiles for several people</li>
<li>Your data readable on the desktop</li>
<li>A home-screen app on iPhone and Android</li>
<li>One <code>docker compose up</code></li>
</ul>
<div class="push">
<a class="btn ghost" href="docs.html#selfhost">Self-hosting guide</a>
<p class="meta">AGPL-3.0 · prebuilt images for amd64 and arm64</p>
</div>
</div>
</div>
</div>
</section>
<section id="story">
<div class="wrap story rv">
<blockquote>openGym started as <b>a tiny app I built for myself.</b> I wanted to log my
workouts and my weight without a subscription app claiming my training data. Then
friends wanted in, and it grew a mind of its own.</blockquote>
<p class="who">Duarte Santos · <a href="about.html">read the whole story</a></p>
</div>
</section>
<section id="opensource">
<div class="wrap">
<div class="sec-head rv">
<p class="eyebrow">Open source</p>
<h2>AGPL-licensed, and staying that way.</h2>
<p class="lead">The code is public, the license keeps every fork open, and there is no
commercial edition waiting behind a curtain.</p>
</div>
<div class="specs rv">
<div class="spec-head">
<span>openGym in numbers</span>
<span class="live">repo counts are live</span>
</div>
<div class="spec-cells">
<div><b data-gh="stars-n">–</b><span>stars</span></div>
<div><b data-gh="forks-n">–</b><span>forks</span></div>
<div><b data-gh="issues-n">–</b><span>open issues</span></div>
<div><b>1,324</b><span>exercises</span></div>
<div><b>13</b><span>languages</span></div>
</div>
</div>
<div class="actions rv" style="margin-top:28px">
<a class="btn ghost" href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">openGym on GitLab <span class="ct" data-gh="stars">★</span></a>
<a class="link" href="https://gitlab.com/DuarteSantos8/opengym/-/blob/main/CONTRIBUTING.md" rel="noopener">Contributing</a>
<a class="link" href="https://gitlab.com/DuarteSantos8/opengym/-/blob/main/CHANGELOG.md" rel="noopener">Changelog</a>
</div>
</div>
</section>
<section id="elsewhere">
<div class="wrap">
<div class="sec-head rv">
<p class="eyebrow">Elsewhere</p>
<h2>Where openGym lives.</h2>
</div>
<div class="quad rv">
<a class="pad gitlab" href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">
<span class="pad-ic"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-gitlab"/></svg></span>
<span class="pad-body">
<b>GitLab</b>
<span>The code, the issues and the releases.</span>
<span class="rest">The CI here builds the container images and signs every APK.</span>
</span>
<span class="pad-go">Open the repo</span>
</a>
<a class="pad github dead" href="https://github.com/DuarteSantos8/openGym" rel="noopener">
<span class="pad-ic"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-github"/></svg></span>
<span class="pad-body">
<b>GitHub <span class="tag">404</span></b>
<span>Where openGym was open-sourced — and where a lot of links still point.</span>
<span class="rest">The account is suspended, so this one goes nowhere.</span>
</span>
<span class="pad-go">Dead link, kept honest</span>
</a>
<a class="pad bmc" href="https://buymeacoffee.com/duartesantos" rel="noopener">
<span class="pad-ic"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-bmc"/></svg></span>
<span class="pad-body">
<b>Buy me a coffee</b>
<span>openGym is free, and stays free.</span>
<span class="rest">If it saved you a subscription, this is the one place to say thanks.</span>
</span>
<span class="pad-go">Support the project</span>
</a>
<a class="pad discord" href="https://discord.gg/e62jY6fwVb" rel="noopener">
<span class="pad-ic"><svg viewBox="0 0 71 55" aria-hidden="true"><use href="#i-discord"/></svg></span>
<span class="pad-body">
<b>Discord</b>
<span>Releases, self-hosting help, and somewhere to report a bug.</span>
<span class="rest">Docker, reverse proxies and passkeys — new versions land here first.</span>
</span>
<span class="pad-go">Join the server</span>
</a>
</div>
</div>
</section>
<footer><div class="wrap foot">
<span>openGym · AGPL-3.0 · © 2026 <a href="https://duarte-santos.ch" rel="noopener">Duarte Santos</a></span>
<span class="c">openGym · AGPL-3.0 · © 2026 <a href="https://duarte-santos.ch" rel="noopener">Duarte Santos</a></span>
<div class="links">
<a href="docs.html">Docs</a>
<a href="about.html" class="hide-s">About</a>
<a href="about.html">About</a>
<a href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">GitLab</a>
<a href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord</a>
<a href="/#download">Download</a>
<a href="#download">Download</a>
</div>
</div></footer>
<script src="site.js" defer></script>
<script src="site.js?v=5" defer></script>
</body>
</html>
+103 -13
View File
@@ -1,11 +1,100 @@
// Live repo numbers in the nav + open-source strip. Fails silently — the site works
// fine without them. Points at gitlab.com while the GitHub account is suspended;
// switch the two API URLs back to api.github.com once it is restored.
//
// The cache keys carry a _gl suffix: a visitor with a still-warm sessionStorage entry
// from the gitea era would otherwise be read with the old field names and show NaN.
// Behaviour for the openGym site: the phone menu, the scroll reveals, the demo frame,
// and the two things that come from the GitLab API (repo counts, release timeline).
// Every one of them fails soft — the page is complete without any of this running.
const GL_PROJECT = 'https://gitlab.com/api/v4/projects/DuarteSantos8%2Fopengym'
/* ------------------------------------------------------------------ phone menu */
;(() => {
const btn = document.querySelector('.nav-toggle')
const menu = document.getElementById('menu')
if (!btn || !menu) return
const close = () => {
menu.classList.remove('open')
btn.setAttribute('aria-expanded', 'false')
// menu-open drives the dimming scrim; overflow keeps the page still underneath.
document.body.classList.remove('menu-open')
document.body.style.overflow = ''
}
btn.addEventListener('click', () => {
const open = menu.classList.toggle('open')
btn.setAttribute('aria-expanded', String(open))
document.body.classList.toggle('menu-open', open)
// The sheet scrolls on its own; letting the page scroll behind it is the classic
// mobile-menu bug where the reader loses their place on close.
document.body.style.overflow = open ? 'hidden' : ''
})
// The scrim is body::after, so it has no element of its own to listen on — a tap
// that lands outside both the sheet and the button is a tap on the scrim.
document.addEventListener('click', e => {
if (!document.body.classList.contains('menu-open')) return
if (e.target.closest('#menu') || e.target.closest('.nav-toggle')) return
close()
})
// Tapping a link inside the sheet navigates, so the sheet has to get out of the way —
// in-page anchors especially, which do not reload anything.
menu.addEventListener('click', e => { if (e.target.closest('a')) close() })
document.addEventListener('keydown', e => { if (e.key === 'Escape') close() })
// Rotating to landscape can widen past the breakpoint while the sheet is open, which
// would leave the body scroll-locked with no visible sheet to close.
addEventListener('resize', () => { if (innerWidth > 780) close() })
})()
/* --------------------------------------------------------------- scroll reveal */
;(() => {
const items = document.querySelectorAll('.rv')
if (!items.length) return
const reduce = matchMedia('(prefers-reduced-motion: reduce)').matches
if (reduce || !('IntersectionObserver' in window)) {
items.forEach(el => el.classList.add('in'))
return
}
const io = new IntersectionObserver((entries, obs) => {
for (const e of entries) {
if (!e.isIntersecting) continue
e.target.classList.add('in')
obs.unobserve(e.target) // one-way: nothing re-hides on the way back up
}
}, { rootMargin: '0px 0px -12% 0px', threshold: .06 })
items.forEach(el => io.observe(el))
})()
/* ------------------------------------------------------------------ demo frame
The demo is the whole frontend bundle. It is only worth loading when the framed
phone is actually on screen, and never on a narrow viewport, where the CSS hides
the frame in favour of a plain "open it full-screen" card. */
;(() => {
const slot = document.querySelector('[data-demo]')
if (!slot) return
const mount = () => {
if (slot.dataset.mounted) return
if (!slot.offsetParent) return // frame hidden — phone layout
slot.dataset.mounted = '1'
const f = document.createElement('iframe')
f.src = slot.dataset.demo
f.title = 'openGym live demo'
f.loading = 'lazy'
f.style.cssText = 'width:100%;height:100%;border:0;display:block;border-radius:34px;background:#000'
slot.appendChild(f)
}
if (!('IntersectionObserver' in window)) { mount(); return }
const io = new IntersectionObserver((entries, obs) => {
for (const e of entries) if (e.isIntersecting) { mount(); obs.disconnect() }
}, { rootMargin: '600px' }) // load just before it scrolls into view
io.observe(slot)
// A rotation or a resized window can reveal the frame long after that first check.
addEventListener('resize', mount, { passive: true })
})()
/* ------------------------------------------------------- repo counts (nav + specs)
Points at gitlab.com while the GitHub account is suspended; switch the two API URLs
back to api.github.com once it is restored.
The cache keys carry a _gl suffix: a visitor with a still-warm sessionStorage entry
from the gitea era would otherwise be read with the old field names and show NaN. */
;(async () => {
const set = (id, v) => document.querySelectorAll('[data-gh="' + id + '"]').forEach(el => { el.textContent = v })
try {
@@ -37,13 +126,14 @@ const GL_PROJECT = 'https://gitlab.com/api/v4/projects/DuarteSantos8%2Fopengym'
} catch (e) { /* offline / rate-limited — leave placeholders */ }
})()
// About page: build the milestones timeline from the published GitLab releases, so the
// page updates itself with every release. The static entries marked data-fallback stay
// in place when the API is unreachable; the hand-written first entry is always kept.
//
// GitLab's release objects differ from Gitea's: the notes are `description` (not `body`),
// the date is `released_at` (not `published_at`), the web link sits in `_links.self`, and
// there is no draft/prerelease pair — a not-yet-released one is `upcoming_release`.
/* -------------------------------------------------------------- about timeline
Built from the published GitLab releases, so the page updates itself with every
release. The static entries marked data-fallback stay in place when the API is
unreachable; the hand-written first entry is always kept.
GitLab's release objects differ from Gitea's: the notes are `description` (not `body`),
the date is `released_at` (not `published_at`), the web link sits in `_links.self`, and
there is no draft/prerelease pair — a not-yet-released one is `upcoming_release`. */
;(async () => {
const tl = document.getElementById('milestones')
if (!tl) return
+667 -223
View File
@@ -1,264 +1,708 @@
/* openGym project site — matches the app: dark, lime accent, cards, system font. */
/* openGym project site.
Dark on purpose: the app is pure black with a green accent, and a light site in
front of it would be a different product. Everything here is hand-written — no
framework, no build step, one stylesheet for all three pages. */
:root {
--bg: #0c0e12; --card: #16181d; --card2: #1c1f26; --line: #23262d;
--fg: #f2f2f7; --dim: #8e8e93; --faint: #6e6e73;
--acc: #30d158; --acc-dim: rgba(48, 209, 88, .12);
--bg: #000;
--surface: #0e0f11;
--surface-2: #17181b;
--hair: rgba(255, 255, 255, .11);
--hair-soft: rgba(255, 255, 255, .06);
--fg: #f5f5f7;
--fg-2: #a1a1a6;
--fg-3: #6e6e73;
--acc: #32d74b;
--acc-ink: #04150a;
--acc-soft: rgba(50, 215, 75, .13);
--blurple: #5865f2;
--amber: #ff9f0a;
--r-s: 12px;
--r-m: 20px;
--r-l: 28px;
--max: 1120px;
--pad: clamp(20px, 5vw, 34px);
--sec: clamp(76px, 11vw, 136px);
--ease: cubic-bezier(.16, 1, .3, 1);
color-scheme: dark;
}
* { margin: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
background: var(--bg); color: var(--fg);
font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
scroll-behavior: smooth;
scroll-padding-top: 72px;
-webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
background: var(--bg);
color: var(--fg);
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
Helvetica, Arial, sans-serif;
font-size: 17px;
line-height: 1.55;
letter-spacing: -.01em;
-webkit-font-smoothing: antialiased;
overflow-x: hidden;
/* Notched phones: the sticky bar and full-bleed rows must not sit under the cutout. */
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
}
a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 22px; }
::selection { background: rgba(50, 215, 75, .3); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 6px; }
/* ---------- nav ---------- */
nav {
position: sticky; top: 0; z-index: 10;
background: rgba(12, 14, 18, .82); backdrop-filter: blur(14px);
border-bottom: 1px solid var(--line);
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
/* ---------------------------------------------------------------- type scale */
h1, h2, h3 { font-weight: 600; letter-spacing: -.03em; line-height: 1.07; }
h1 { font-size: clamp(42px, 8.4vw, 82px); letter-spacing: -.04em; line-height: 1.02; }
h2 { font-size: clamp(30px, 5.4vw, 50px); }
h3 { font-size: clamp(19px, 2.3vw, 21px); letter-spacing: -.02em; line-height: 1.25; }
.eyebrow {
color: var(--acc);
font-size: 14px; font-weight: 600; letter-spacing: .01em;
margin-bottom: 12px;
}
.nav-in { display: flex; align-items: center; gap: 20px; height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--fg); }
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 18px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav-links a { color: var(--dim); font-size: 14.5px; font-weight: 500; }
.nav-links a:hover { color: var(--fg); text-decoration: none; }
.nav-links a.cta { color: #0c0e12; background: var(--acc); padding: 7px 14px; border-radius: 10px; font-weight: 600; }
.icn { fill: none; stroke: var(--acc); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
/* ---------- hero ---------- */
header.hero { text-align: center; padding: 74px 0 30px; }
.hero .logo {
width: 108px; height: 108px; margin: 0 auto 22px; border-radius: 26px;
background: var(--card); display: flex; align-items: center; justify-content: center;
box-shadow: 0 0 90px rgba(48, 209, 88, .14);
.lead {
color: var(--fg-2);
font-size: clamp(17px, 2.1vw, 21px);
line-height: 1.5;
letter-spacing: -.015em;
max-width: 44ch;
margin-top: 18px;
}
.hero .logo svg { width: 66px; height: 66px; }
.hero h1 { font-size: clamp(38px, 7vw, 56px); letter-spacing: -.03em; }
.hero .tag { font-size: clamp(17px, 3vw, 21px); color: var(--dim); margin: 10px auto 6px; max-width: 640px; }
.hero .sub { color: var(--faint); font-size: 15px; max-width: 560px; margin: 0 auto; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
/* ------------------------------------------------------------------ buttons */
.btn {
display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 13px;
background: var(--acc); color: #0c0e12; font-weight: 600; font-size: 16px;
display: inline-flex; align-items: center; justify-content: center; gap: 8px;
min-height: 46px; padding: 12px 24px; border-radius: 999px;
background: var(--acc); color: var(--acc-ink);
font-size: 16px; font-weight: 600; letter-spacing: -.01em;
border: 1px solid transparent;
transition: transform .25s var(--ease), background-color .25s var(--ease),
border-color .25s var(--ease);
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.ghost { background: var(--card2); color: var(--fg); }
.btn .ct { background: rgba(0, 0, 0, .18); border-radius: 7px; padding: 1px 8px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.btn.ghost .ct { background: rgba(255, 255, 255, .08); }
/* ---------- sections ---------- */
section { padding: 54px 0 10px; }
.kicker { color: var(--acc); font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; }
h2 { font-size: clamp(26px, 4.5vw, 34px); letter-spacing: -.02em; margin: 6px 0 10px; }
.lead { color: var(--dim); max-width: 680px; margin-bottom: 30px; }
/* ---------- feature grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.feat { background: var(--card); border-radius: 16px; padding: 18px; }
.feat .ic {
width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center;
justify-content: center; font-size: 19px; margin-bottom: 12px; background: var(--acc-dim);
.btn:hover { text-decoration: none; background: #4ade63; }
.btn:active { transform: scale(.975); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--hair); }
.btn.ghost:hover { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .22); }
.btn .ct {
font-variant-numeric: tabular-nums; font-weight: 500;
padding: 1px 8px; border-radius: 999px; font-size: 13.5px;
background: rgba(0, 0, 0, .16);
}
.feat h3 { font-size: 16px; margin-bottom: 4px; }
.feat p { font-size: 13.5px; color: var(--dim); }
.btn.ghost .ct { background: rgba(255, 255, 255, .09); }
/* ---------- screenshots ---------- */
.shots { display: flex; gap: 16px; overflow-x: auto; padding: 8px 2px 18px; scroll-snap-type: x mandatory; }
.shots figure { flex: 0 0 auto; scroll-snap-align: center; text-align: center; }
.shots img {
width: min(240px, 62vw); height: auto; border-radius: 22px;
border: 1px solid var(--line); display: block; background: var(--card);
/* Text link with a chevron — the quieter half of a button pair. */
.link {
display: inline-flex; align-items: center; gap: 5px;
font-size: 16.5px; font-weight: 500; color: var(--acc);
min-height: 46px;
}
.shots figcaption { color: var(--faint); font-size: 13px; margin-top: 8px; }
/* ---------- embedded live demo ---------- */
.demo-wrap { display: flex; justify-content: center; padding: 10px 0 6px; }
.phone {
width: 384px; max-width: 92vw; height: min(720px, 78vh); border-radius: 42px;
border: 10px solid #1c1f26; overflow: hidden; background: #000;
box-shadow: 0 34px 90px rgba(0, 0, 0, .55);
.link:hover { text-decoration: none; }
.link::after {
content: ""; width: 6px; height: 6px; margin-top: -1px;
border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor;
transform: rotate(-45deg);
transition: transform .25s var(--ease);
}
.phone iframe { width: 100%; height: 100%; border: 0; display: block; }
.demo-note { text-align: center; color: var(--faint); font-size: 13.5px; margin-top: 14px; }
.link:hover::after { transform: rotate(-45deg) translate(2px, 2px); }
/* ---------- flavors ---------- */
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
/* ----------------------------------------------------------------- nav bar */
nav {
position: sticky; top: 0; z-index: 60;
background: rgba(0, 0, 0, .68);
backdrop-filter: saturate(180%) blur(20px);
-webkit-backdrop-filter: saturate(180%) blur(20px);
border-bottom: 1px solid var(--hair-soft);
}
.nav-in { display: flex; align-items: center; height: 54px; gap: 16px; }
.brand {
display: flex; align-items: center; gap: 9px;
align-self: stretch; /* the whole bar height is the tap target */
font-size: 17px; font-weight: 600; letter-spacing: -.02em; color: var(--fg);
margin-right: auto;
}
.brand:hover { text-decoration: none; }
.brand img { width: 24px; height: 24px; border-radius: 6px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
color: var(--fg-2); font-size: 14px; font-weight: 400; letter-spacing: 0;
transition: color .2s var(--ease);
}
.nav-links a:hover { color: var(--fg); text-decoration: none; }
.nav-links a [data-gh] { font-variant-numeric: tabular-nums; color: var(--fg-3); }
.nav-links a:hover [data-gh] { color: var(--fg-2); }
.nav-links a.cta {
color: var(--acc-ink); background: var(--acc); font-weight: 600;
padding: 7px 15px; border-radius: 999px;
}
.nav-links a.cta:hover { background: #4ade63; }
.nav-toggle {
display: none;
position: relative;
width: 42px; height: 42px; margin-right: -9px;
align-items: center; justify-content: center;
border-radius: 10px; cursor: pointer;
}
.nav-toggle span {
position: absolute; width: 18px; height: 1.5px; border-radius: 2px; background: var(--fg);
transition: transform .3s var(--ease);
}
.nav-toggle span:first-child { transform: translateY(-3.5px); }
.nav-toggle span:last-child { transform: translateY(3.5px); }
.nav-toggle[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }
@media (max-width: 780px) {
.nav-toggle { display: flex; }
.nav-links {
position: fixed; left: 0; right: 0; top: 54px;
flex-direction: column; align-items: stretch; gap: 0;
padding: 6px var(--pad) calc(22px + env(safe-area-inset-bottom));
background: #000;
border-bottom: 1px solid var(--hair-soft);
box-shadow: 0 30px 60px rgba(0, 0, 0, .8);
max-height: calc(100dvh - 54px); overflow-y: auto;
transform: translateY(-8px); opacity: 0; pointer-events: none;
transition: opacity .28s var(--ease), transform .28s var(--ease);
}
.nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
.nav-links a {
font-size: 19px; letter-spacing: -.02em; color: var(--fg);
padding: 15px 2px; border-bottom: 1px solid var(--hair-soft);
/* Each row drops in just behind the one above it, so the sheet unfolds instead
of appearing. Closing runs with no delay at all, so it leaves in one piece —
a staggered exit reads as sluggish. */
opacity: 0; transform: translateY(-10px);
transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.nav-links.open a { opacity: 1; transform: none; }
.nav-links.open a:nth-child(1) { transition-delay: .03s; }
.nav-links.open a:nth-child(2) { transition-delay: .06s; }
.nav-links.open a:nth-child(3) { transition-delay: .09s; }
.nav-links.open a:nth-child(4) { transition-delay: .12s; }
.nav-links.open a:nth-child(5) { transition-delay: .15s; }
.nav-links.open a:nth-child(6) { transition-delay: .18s; }
.nav-links.open a:nth-child(7) { transition-delay: .21s; }
.nav-links.open a:nth-child(8) { transition-delay: .24s; }
.nav-links a.cta {
margin-top: 18px; border-bottom: 0; text-align: center;
padding: 14px 20px; font-size: 17px;
}
/* Whatever the sheet does not cover is dimmed, so the page behind it stops
competing for attention and a tap out there reads as "close". */
body::after {
content: ""; position: fixed; inset: 0; z-index: 50;
background: rgba(0, 0, 0, .55);
backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
opacity: 0; pointer-events: none;
transition: opacity .3s var(--ease);
}
body.menu-open::after { opacity: 1; pointer-events: auto; }
}
@media (prefers-reduced-motion: reduce) {
.nav-links, .nav-links a, body::after { transition-duration: .01ms !important; }
.nav-links.open a { transition-delay: 0s !important; }
}
/* ------------------------------------------------------------------- notice
The GitHub account suspension. Deliberately a contained card, not a full-bleed
banner: it has to be impossible to miss and still not be the first thing the
page shouts. Remove the whole block once the account is restored. */
.notice-wrap { padding: 22px 0 0; }
.notice {
position: relative;
background: linear-gradient(180deg, rgba(255, 159, 10, .07), rgba(255, 159, 10, .02));
border: 1px solid rgba(255, 159, 10, .26);
border-radius: var(--r-m);
padding: clamp(20px, 3.4vw, 28px);
}
.notice-tag {
display: inline-flex; align-items: center; gap: 8px;
color: #ffb340; font-size: 13px; font-weight: 600;
text-transform: uppercase; letter-spacing: .07em;
margin-bottom: 12px;
}
.notice-tag::before {
content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber);
box-shadow: 0 0 0 4px rgba(255, 159, 10, .16);
}
.notice h2 {
font-size: clamp(20px, 3vw, 26px); letter-spacing: -.025em; color: #ffdcae;
margin-bottom: 12px;
}
.notice p { color: #cbbba6; font-size: 15.5px; max-width: 68ch; margin-bottom: 10px; }
.notice p b { color: #fff8ee; font-weight: 600; }
.notice .actions { margin-top: 18px; }
.notice .btn { background: var(--amber); color: #1a1206; }
.notice .btn:hover { background: #ffb340; }
/* Named dc-btn, not dc: the `.dc` Discord card below owns that class, and a button
carrying both picked up the card's 30px padding and 44px top margin. */
.notice .btn.dc-btn { background: var(--blurple); color: #fff; }
.notice .btn.dc-btn:hover { background: #6b76f5; }
/* Two half-width buttons stacked with a ragged right edge look accidental; on a phone
they read as one decision with two answers. */
@media (max-width: 560px) {
.notice .actions { display: grid; gap: 10px; }
.notice .btn { width: 100%; }
}
/* --------------------------------------------------------------------- hero */
.hero { padding: clamp(52px, 9vw, 96px) 0 0; text-align: center; overflow: hidden; }
.hero .eyebrow { color: var(--fg-2); font-weight: 500; letter-spacing: -.01em; }
.hero h1 { margin: 0 auto; max-width: 13ch; }
.hero h1 span { display: block; color: var(--fg-3); }
.hero .lead { margin: 22px auto 0; max-width: 50ch; text-wrap: balance; }
.hero .actions { justify-content: center; margin-top: 30px; }
/* The screenshot is cut off at the bottom and dissolved into the page, rather than
sitting in a box: it reads as the app continuing past the fold, and it keeps the
fold itself short enough that the first section is one flick away. */
.hero-stage {
position: relative;
margin: clamp(34px, 6vw, 56px) auto 0;
width: min(300px, 68vw);
}
.hero-stage::before {
content: ""; position: absolute; inset: -12% -46% 14%;
background: radial-gradient(closest-side, rgba(50, 215, 75, .2), transparent 72%);
filter: blur(10px); pointer-events: none;
}
.hero-stage .device {
position: relative;
padding-bottom: 0; border-radius: 42px 42px 0 0;
}
.hero-stage .device > img {
height: clamp(300px, 44vh, 500px);
object-fit: cover; object-position: top center;
border-radius: 34px 34px 0 0;
}
.hero-fade {
position: relative; z-index: 2;
height: clamp(80px, 12vw, 130px);
margin-top: clamp(-130px, -12vw, -80px);
background: linear-gradient(180deg, transparent, var(--bg) 78%);
}
/* ------------------------------------------------------------ device frame */
.device {
padding: 9px; border-radius: 42px;
background: linear-gradient(155deg, #34363b, #17181b 42%, #0a0b0c 100%);
box-shadow: 0 40px 90px -28px rgba(0, 0, 0, .95),
inset 0 0 0 1px rgba(255, 255, 255, .07);
}
.device > img, .device > iframe, .device > .device-slot {
width: 100%; border: 0; border-radius: 34px; background: #000; display: block;
}
/* --------------------------------------------------------------- sections */
section { padding: var(--sec) 0 0; }
.sec-head { max-width: 46ch; }
.sec-head h2 { text-wrap: balance; }
/* ------------------------------------------------------- feature bento grid */
.bento {
display: grid; gap: 12px; margin-top: clamp(34px, 5vw, 52px);
grid-template-columns: repeat(6, 1fr);
}
.tile {
grid-column: span 2;
background: var(--surface);
border: 1px solid var(--hair-soft);
border-radius: var(--r-m);
padding: clamp(22px, 2.6vw, 30px);
transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.tile:hover { border-color: var(--hair); background: #121316; }
.tile.wide { grid-column: span 3; }
.tile.full { grid-column: span 6; }
.tile .ic {
width: 40px; height: 40px; border-radius: 11px; margin-bottom: 16px;
display: flex; align-items: center; justify-content: center;
background: var(--acc-soft); color: var(--acc);
}
.tile .ic svg { width: 21px; height: 21px; }
.tile h3 { margin-bottom: 7px; }
.tile p { color: var(--fg-2); font-size: 15px; line-height: 1.5; }
.tile p b { color: var(--fg); font-weight: 600; }
/* The three muscle-map readings, inside the wide tile. */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.trio div {
background: rgba(255, 255, 255, .035); border-radius: var(--r-s);
padding: 12px 13px; font-size: 13.5px; color: var(--fg-2); line-height: 1.4;
}
.trio b { display: block; color: var(--fg); font-size: 14.5px; font-weight: 600; margin-bottom: 3px; }
@media (max-width: 900px) {
.bento { grid-template-columns: repeat(4, 1fr); }
.tile, .tile.wide { grid-column: span 2; }
.tile.full { grid-column: span 4; }
}
@media (max-width: 620px) {
.bento { grid-template-columns: 1fr; gap: 10px; }
.tile, .tile.wide, .tile.full { grid-column: auto; }
.trio { grid-template-columns: 1fr; gap: 8px; }
}
/* ------------------------------------------------ the rest, as a plain list */
.more { margin-top: clamp(46px, 6vw, 70px); }
.more > h3 {
font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
color: var(--fg-3); padding-bottom: 14px; border-bottom: 1px solid var(--hair-soft);
}
.more dl {
display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
column-gap: clamp(28px, 5vw, 68px);
}
.more dl > div { padding: 20px 0; border-bottom: 1px solid var(--hair-soft); }
.more dt { font-size: 16.5px; font-weight: 600; letter-spacing: -.015em; margin-bottom: 5px; }
.more dd { margin: 0; color: var(--fg-2); font-size: 14.5px; line-height: 1.5; }
@media (max-width: 720px) { .more dl { grid-template-columns: 1fr; } }
/* -------------------------------------------------------- screenshot rail */
.bleed { margin-top: clamp(30px, 4.5vw, 46px); }
.rail {
display: flex; gap: clamp(12px, 2.4vw, 22px);
overflow-x: auto; scroll-snap-type: x mandatory;
padding: 4px max(var(--pad), calc((100vw - var(--max)) / 2)) 6px;
scrollbar-width: none;
overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { display: none; }
.rail figure { flex: 0 0 auto; width: clamp(200px, 56vw, 250px); scroll-snap-align: center; }
.rail .device { padding: 7px; border-radius: 34px; }
.rail .device > img { border-radius: 27px; }
.rail figcaption {
color: var(--fg-3); font-size: 13.5px; text-align: center; margin-top: 12px;
letter-spacing: 0;
}
.rail-hint { color: var(--fg-3); font-size: 13.5px; margin-top: 14px; }
/* ---------------------------------------------------------------- the demo */
.demo-stage { display: flex; justify-content: center; margin-top: clamp(30px, 5vw, 46px); }
.demo-stage .device { width: 392px; max-width: 100%; }
.demo-stage .device-slot { height: min(720px, 74vh); }
.demo-note { text-align: center; color: var(--fg-3); font-size: 14px; margin-top: 18px; }
/* Below this width the framed iframe is a phone inside a phone: not worth the
megabytes. site.js only injects the iframe when the frame is actually shown. */
.demo-card {
display: none;
background: var(--surface); border: 1px solid var(--hair-soft);
border-radius: var(--r-m); padding: 26px 22px; text-align: center;
margin-top: 30px;
}
.demo-card p { color: var(--fg-2); font-size: 15px; margin-bottom: 20px; }
.demo-card .btn { width: 100%; }
@media (max-width: 700px) {
/* The note belongs to the framed demo; the card below repeats what it needs to say. */
.demo-stage, .demo-note { display: none; }
.demo-card { display: block; }
}
/* ------------------------------------------------------------ two flavours */
.duo {
display: grid; gap: 12px; margin-top: clamp(34px, 5vw, 50px);
grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.card {
background: var(--card); border-radius: 18px; padding: 24px; border: 1px solid transparent;
display: flex; flex-direction: column;
background: var(--surface); border: 1px solid var(--hair-soft);
border-radius: var(--r-l); padding: clamp(24px, 3.2vw, 34px);
}
.card.hl { border-color: rgba(48, 209, 88, .35); }
.card h3 { font-size: 20px; margin-bottom: 4px; display: flex; gap: 9px; align-items: center; }
.card .for { color: var(--faint); font-size: 13.5px; margin-bottom: 14px; }
.card ul { list-style: none; padding: 0; margin: 0 0 18px; }
.card li { padding: 6px 0 6px 26px; position: relative; font-size: 14.5px; color: var(--dim); }
.card li::before { content: "✓"; position: absolute; left: 2px; color: var(--acc); font-weight: 700; }
.card li.no::before { content: "—"; color: var(--faint); }
.card .btn { width: 100%; justify-content: center; }
.meta { font-size: 12.5px; color: var(--faint); margin-top: 10px; text-align: center; }
/* ---------- story / quote ---------- */
.story {
background: linear-gradient(160deg, var(--card) 0%, #12161c 100%);
border-radius: 20px; padding: clamp(24px, 5vw, 44px); margin-top: 6px;
.card.hl { border-color: rgba(50, 215, 75, .32); background: linear-gradient(180deg, rgba(50, 215, 75, .05), transparent 55%), var(--surface); }
.card .ic { width: 38px; height: 38px; color: var(--acc); margin-bottom: 16px; }
.card .ic svg { width: 100%; height: 100%; }
.card h3 { font-size: clamp(21px, 2.6vw, 25px); }
.card .for { color: var(--fg-3); font-size: 14.5px; margin: 6px 0 20px; }
.card ul { list-style: none; padding: 0; margin: 0 0 24px; }
.card li {
position: relative; padding: 7px 0 7px 27px;
font-size: 15px; color: var(--fg-2); line-height: 1.45;
}
.story blockquote { font-size: clamp(18px, 3vw, 23px); line-height: 1.5; letter-spacing: -.01em; max-width: 760px; }
.story blockquote strong { color: var(--acc); font-weight: 600; }
.story .who { color: var(--faint); margin-top: 16px; font-size: 14.5px; }
.card li::before {
content: ""; position: absolute; left: 2px; top: 13px;
width: 10px; height: 5.5px; border-left: 1.8px solid var(--acc); border-bottom: 1.8px solid var(--acc);
transform: rotate(-45deg);
}
.card li.no::before {
border: 0; border-top: 1.6px solid var(--fg-3); width: 11px; height: 0;
transform: none; top: 16px;
}
.card .btn { width: 100%; }
.card .meta { font-size: 13px; color: var(--fg-3); line-height: 1.5; margin-top: 14px; }
.card .meta a { color: var(--fg-2); text-decoration: underline; text-underline-offset: 2px; }
.card .meta + .meta { margin-top: 8px; }
.card .push { margin-top: auto; }
/* ---------- open source strip ---------- */
.os { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.stat { background: var(--card); border-radius: 14px; padding: 16px 22px; min-width: 130px; }
.stat b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--faint); font-size: 13px; }
/* ---------------------------------------------------------------- the story */
.story { max-width: 900px; }
.story blockquote {
font-size: clamp(24px, 4vw, 40px); font-weight: 500;
line-height: 1.22; letter-spacing: -.03em; text-wrap: balance;
color: var(--fg-2);
}
.story blockquote b { color: var(--fg); font-weight: 500; }
.story .who { color: var(--fg-3); font-size: 15px; margin-top: 26px; }
.story .who a { color: var(--acc); display: inline-block; padding: 8px 0; }
/* --------------------------------------------------------- open source rail */
.specs {
margin-top: clamp(34px, 5vw, 48px);
border: 1px solid var(--hair-soft); border-radius: var(--r-m);
background: var(--surface); overflow: hidden;
}
.spec-head {
display: flex; align-items: center; gap: 10px;
padding: 15px clamp(18px, 2.4vw, 24px);
border-bottom: 1px solid var(--hair-soft);
font-size: 13.5px; color: var(--fg-2); letter-spacing: 0;
}
.spec-head .live {
display: inline-flex; align-items: center; gap: 7px;
margin-left: auto; color: var(--fg-3); font-size: 12.5px;
}
.spec-head .live::before {
content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--acc);
box-shadow: 0 0 0 3px var(--acc-soft);
}
/* The 1px gap is the divider: the panel background shows through between cells, so
the rules land correctly however many columns the grid resolves to. */
.spec-cells {
display: grid; grid-template-columns: repeat(5, 1fr);
gap: 1px; background: var(--hair-soft);
}
.spec-cells > div {
background: var(--surface);
padding: clamp(18px, 2.4vw, 24px);
}
.spec-cells b {
display: block; font-size: clamp(26px, 3.4vw, 36px); font-weight: 600;
letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1.1;
}
.spec-cells span { color: var(--fg-3); font-size: 13.5px; }
@media (max-width: 760px) {
.spec-cells { grid-template-columns: repeat(2, 1fr); }
/* Five cells over two columns leaves a hole; the last one takes the whole row. */
.spec-cells > div:last-child { grid-column: 1 / -1; }
}
/* ------------------------------------------------------------- the link quad
Four places openGym lives, as one block of four. Each pad is the whole link, so
the target is the card and not the words in it. */
.quad {
display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
margin-top: clamp(32px, 4.5vw, 46px);
}
.pad {
--brand: var(--acc);
display: flex; flex-direction: column;
padding: clamp(20px, 2.6vw, 28px);
background: var(--surface);
border: 1px solid var(--hair-soft); border-radius: var(--r-m);
color: var(--fg);
transition: border-color .3s var(--ease), background-color .3s var(--ease),
transform .3s var(--ease);
}
.pad:hover {
text-decoration: none; transform: translateY(-2px);
border-color: color-mix(in srgb, var(--brand) 55%, transparent);
background: color-mix(in srgb, var(--brand) 7%, var(--surface));
}
.pad:active { transform: none; }
.pad-ic {
width: 44px; height: 44px; border-radius: 13px; margin-bottom: 16px;
display: flex; align-items: center; justify-content: center;
background: color-mix(in srgb, var(--brand) 16%, transparent);
}
.pad-ic svg { width: 22px; height: 22px; fill: var(--brand); }
.pad.discord .pad-ic svg { width: 24px; height: 19px; }
.pad-body { display: block; flex: 1 1 auto; }
.pad-body b {
display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
font-size: clamp(17px, 2.1vw, 19px); font-weight: 600; letter-spacing: -.02em;
margin-bottom: 6px;
}
.pad-body > span { display: block; color: var(--fg-2); font-size: 14.5px; line-height: 1.5; }
.pad-body > span + span { margin-top: 7px; }
.pad-go {
display: inline-flex; align-items: center; gap: 6px;
margin-top: 18px; color: var(--brand);
font-size: 14.5px; font-weight: 500;
}
.pad-go::after {
content: ""; width: 5px; height: 5px;
border-right: 1.7px solid currentColor; border-bottom: 1.7px solid currentColor;
transform: rotate(-45deg); transition: transform .25s var(--ease);
}
.pad:hover .pad-go::after { transform: rotate(-45deg) translate(2px, 2px); }
.pad.gitlab { --brand: #fc6d26; }
.pad.bmc { --brand: #ffdd00; }
.pad.discord { --brand: #5865f2; }
/* The suspended repo. It stays linked because half the internet still points at it,
but nothing about this pad should promise that the link works. */
.pad.dead { --brand: #8e8e93; }
.pad.dead .pad-body b, .pad.dead .pad-ic svg { opacity: .8; }
.pad.dead .pad-go { color: var(--fg-3); }
.pad.dead .pad-go::after { display: none; }
.pad-body .tag {
display: inline-block; padding: 2px 7px; border-radius: 6px;
background: rgba(255, 159, 10, .14); color: #ffb340;
border: 1px solid rgba(255, 159, 10, .28);
font-size: 11.5px; font-weight: 600; letter-spacing: .04em;
}
@media (max-width: 560px) {
.quad { gap: 10px; }
.pad { padding: 18px; }
.pad-ic { width: 38px; height: 38px; border-radius: 11px; margin-bottom: 13px; }
.pad-ic svg { width: 19px; height: 19px; }
.pad.discord .pad-ic svg { width: 21px; height: 16px; }
.pad-body > span { font-size: 13px; }
/* Two cards to a row leaves ~160px of column: the second sentence would run to
seven lines. The identity and the destination survive; the detail does not. */
.pad .rest { display: none; }
.pad-go { font-size: 13px; margin-top: 14px; }
}
/* ------------------------------------------------------------------ footer */
footer {
border-top: 1px solid var(--hair-soft);
margin-top: var(--sec);
padding: 34px 0 calc(46px + env(safe-area-inset-bottom));
}
.foot { display: flex; flex-wrap: wrap; gap: 16px 26px; align-items: center; }
.foot .c { color: var(--fg-3); font-size: 13.5px; }
.foot .c a { color: var(--fg-2); }
.foot .links { display: flex; flex-wrap: wrap; gap: 22px; margin-left: auto; }
.foot .links a { color: var(--fg-2); font-size: 13.5px; }
.foot .links a:hover { color: var(--fg); text-decoration: none; }
@media (max-width: 600px) { .foot .links { margin-left: 0; } }
/* ------------------------------------------------------------ prose pages */
.prose { max-width: 720px; padding: clamp(44px, 7vw, 72px) 0 0; }
.prose h1 { font-size: clamp(36px, 6.5vw, 60px); }
.prose > .lead { max-width: 42ch; margin-bottom: clamp(34px, 5vw, 48px); }
.prose h2 {
font-size: clamp(24px, 3.4vw, 32px); margin: clamp(48px, 6vw, 68px) 0 14px;
scroll-margin-top: 76px;
}
.prose h3 { font-size: 18.5px; margin: 32px 0 8px; }
.prose p, .prose li { color: #c9c9ce; font-size: 16.5px; line-height: 1.62; }
.prose p { margin: 12px 0; }
.prose ul, .prose ol { padding-left: 20px; margin: 14px 0; }
.prose li { margin: 8px 0; }
.prose li::marker { color: var(--fg-3); }
.prose b { color: var(--fg); font-weight: 600; }
.prose .who { color: var(--fg-3); margin-top: 26px; }
/* ---------- docs / prose pages ---------- */
.prose { max-width: 760px; padding: 46px 0 20px; }
.prose h1 { font-size: clamp(30px, 5vw, 40px); letter-spacing: -.02em; margin-bottom: 8px; }
.prose > p.lead { margin-bottom: 34px; }
.prose h2 { font-size: 24px; margin: 44px 0 10px; }
.prose h3 { font-size: 17.5px; margin: 26px 0 8px; }
.prose p, .prose li { color: #c7c7cc; font-size: 15.5px; }
.prose ul, .prose ol { padding-left: 22px; margin: 10px 0; }
.prose li { margin: 5px 0; }
.note {
background: var(--acc-dim); border-left: 3px solid var(--acc);
border-radius: 0 10px 10px 0; padding: 12px 16px; margin: 16px 0; font-size: 14.5px;
background: var(--acc-soft); border: 1px solid rgba(50, 215, 75, .2);
border-radius: var(--r-s); padding: 15px 18px; margin: 20px 0;
}
.note p, .note { color: #cfe9d5; font-size: 15.5px; line-height: 1.55; }
pre {
background: #0a0c10; border: 1px solid var(--line); border-radius: 12px;
padding: 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.55; margin: 14px 0;
background: #0b0c0e; border: 1px solid var(--hair-soft); border-radius: var(--r-s);
padding: 18px; overflow-x: auto; margin: 18px 0;
font-size: 13.5px; line-height: 1.6; -webkit-overflow-scrolling: touch;
}
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
p code, li code { background: var(--card2); border-radius: 6px; padding: 1.5px 6px; font-size: 13.5px; }
.toc { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 6px; }
.toc a { background: var(--card); border-radius: 999px; padding: 7px 15px; font-size: 13.5px; color: var(--dim); }
.toc a:hover { color: var(--fg); text-decoration: none; }
/* ---------- timeline ---------- */
.tl { list-style: none; padding: 0; margin: 26px 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl li { position: relative; padding: 0 0 26px 34px; }
.tl li::before {
content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 12px;
border-radius: 50%; background: var(--bg); border: 3px solid var(--acc);
code { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; }
p code, li code, td code {
background: var(--surface-2); border-radius: 6px; padding: 2px 6px;
font-size: .88em; color: #e4e4e8;
}
.tl b { display: block; font-size: 16.5px; color: var(--fg); }
.tl .when { color: var(--faint); font-size: 13px; }
.tl p { margin-top: 4px; }
/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); margin-top: 70px; padding: 30px 0 46px; }
.foot { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; color: var(--faint); font-size: 14px; }
.foot .links { margin-left: auto; display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--dim); }
@media (max-width: 640px) {
.nav-links { gap: 12px; }
.nav-links a.hide-s { display: none; }
.nav-in { gap: 12px; }
header.hero { padding-top: 52px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 4px; }
.toc a {
background: var(--surface); border: 1px solid var(--hair-soft);
border-radius: 999px; padding: 8px 15px; font-size: 14px; color: var(--fg-2);
transition: border-color .25s var(--ease), color .25s var(--ease);
}
.toc a:hover { color: var(--fg); border-color: var(--hair); text-decoration: none; }
/* config table on the docs page */
table.cfg { width: 100%; border-collapse: collapse; margin: 1rem 0 1.4rem; font-size: .95rem; }
table.cfg td { padding: .55rem .7rem; border-top: 1px solid var(--line, #24303f); vertical-align: top; }
table.cfg { width: 100%; border-collapse: collapse; margin: 18px 0 24px; font-size: 15.5px; }
table.cfg td { padding: 14px 14px 14px 0; border-top: 1px solid var(--hair-soft); vertical-align: top; color: #c9c9ce; }
table.cfg tr:first-child td { border-top: 0; }
table.cfg td:first-child { white-space: nowrap; width: 1%; padding-right: 1.2rem; }
@media (max-width: 620px) {
table.cfg td { display: block; border-top: 0; padding: .15rem .7rem; }
table.cfg td:first-child { white-space: normal; width: auto; padding-top: .7rem; border-top: 1px solid var(--line, #24303f); }
table.cfg tr:first-child td:first-child { border-top: 0; }
table.cfg td:first-child { white-space: nowrap; width: 1%; padding-right: 26px; }
@media (max-width: 640px) {
table.cfg td { display: block; border-top: 0; padding: 2px 0; }
table.cfg td:first-child {
white-space: normal; width: auto; padding: 16px 0 4px;
border-top: 1px solid var(--hair-soft);
}
table.cfg tr:first-child td:first-child { border-top: 0; padding-top: 0; }
}
/* ---------- suspension notice (GitHub account suspended → gitlab.com) ----------
Temporary: remove this block together with the .alert markup once the account is back. */
.alert {
background:
radial-gradient(1200px 260px at 50% -40px, rgba(255, 159, 10, .18), transparent 70%),
linear-gradient(180deg, #241a10, #1a1410);
border-bottom: 1px solid rgba(255, 159, 10, .38);
border-top: 3px solid #ff9f0a;
padding: 40px 0 44px;
text-align: center;
}
.alert-tag {
display: inline-block; margin-bottom: 16px;
background: rgba(255, 159, 10, .16); color: #ffb340;
border: 1px solid rgba(255, 159, 10, .35); border-radius: 999px;
padding: 6px 15px; font-size: 13px; font-weight: 700;
text-transform: uppercase; letter-spacing: .09em;
}
.alert h2 {
font-size: clamp(27px, 5.4vw, 46px); line-height: 1.15; letter-spacing: -.03em;
color: #ffd8a3; max-width: 900px; margin: 0 auto;
}
.alert p { color: #e3d5c4; font-size: clamp(15px, 2vw, 17.5px); max-width: 720px; margin: 16px auto 0; }
.alert p b { color: #fff; }
.alert .alert-btn {
margin-top: 20px; background: #ff9f0a; color: #1a1206;
font-size: clamp(15px, 2.4vw, 19px); font-weight: 700; padding: 15px 26px;
word-break: break-word;
}
.alert .alert-note { color: #a9977f; font-size: 14px; margin-top: 18px; }
.alert code { background: rgba(255, 159, 10, .12); color: #ffc978; }
/* ---------------------------------------------------------------- timeline */
/* offline live demo */
.offline {
background: var(--card); border: 1px dashed var(--line); border-radius: 18px;
padding: 34px 26px; text-align: center; margin-top: 22px;
.tl { list-style: none; padding: 0; margin: 30px 0 0; position: relative; }
.tl::before {
content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px;
width: 1px; background: var(--hair);
}
.offline .big { font-size: 34px; display: block; margin-bottom: 10px; }
.offline p { color: var(--dim); max-width: 620px; margin: 0 auto 6px; }
.tl li { position: relative; padding: 0 0 30px 30px; }
.tl li::before {
content: ""; position: absolute; left: 0; top: 7px; width: 11px; height: 11px;
border-radius: 50%; background: var(--bg); border: 2px solid var(--fg-3);
}
.tl li:last-child::before { border-color: var(--acc); }
.tl b { display: block; font-size: 17px; letter-spacing: -.015em; color: var(--fg); }
.tl .when { display: block; color: var(--fg-3); font-size: 13.5px; margin-top: 2px; }
.tl p { margin-top: 6px; font-size: 15.5px; }
/* ---------- Discord call-to-action ----------
Blurple rather than the lime accent on purpose: this block has to read as a
different kind of thing from the download/demo buttons around it. */
.dc-wrap { padding: 8px 0 46px; }
.dc {
display: flex; align-items: center; gap: 26px;
max-width: 720px; margin: 0 auto; text-align: left;
background:
radial-gradient(700px 200px at 12% -30px, rgba(88, 101, 242, .22), transparent 70%),
linear-gradient(180deg, #1a1c2e, #15161f);
border: 1px solid rgba(88, 101, 242, .42);
border-radius: 20px; padding: 28px 30px;
}
.dc:hover { border-color: rgba(88, 101, 242, .72); }
.dc-icon {
flex: 0 0 76px; width: 76px; height: 76px; border-radius: 20px;
background: #5865f2; display: flex; align-items: center; justify-content: center;
}
/* The Discord mark is 71:55, not square — forcing it into a square box
letterboxes it and it reads as vertically off-centre. */
.dc-icon svg { width: 44px; height: 34px; fill: #fff; display: block; }
.dc-body { flex: 1 1 auto; min-width: 0; }
.dc h3 { font-size: clamp(19px, 3vw, 23px); letter-spacing: -.02em; margin-bottom: 6px; }
.dc p { color: var(--dim); font-size: 14.5px; }
.dc .btn {
background: #5865f2; color: #fff; white-space: nowrap;
flex: 0 0 auto; align-self: center;
}
.dc .btn:hover { filter: brightness(1.12); }
@media (max-width: 620px) {
.dc { flex-direction: column; text-align: center; gap: 18px; padding: 26px 22px; }
.dc .btn { width: 100%; text-align: center; }
}
/* ------------------------------------------------------------- scroll reveal
Only armed when JS is running, so the page is fully visible without it. */
/* Discord button inside the suspended-account banner */
.alert .alert-actions {
display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; align-items: stretch;
.js .rv {
opacity: 0; transform: translateY(16px);
transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.alert .alert-actions .btn { margin-top: 20px; }
.alert .dc-btn {
background: #5865f2; color: #fff;
font-size: clamp(15px, 2.4vw, 19px); font-weight: 700; padding: 15px 26px;
.js .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
.js .rv { opacity: 1; transform: none; transition: none; }
}