Commit Graph

124 Commits

Author SHA1 Message Date
tdurieux b316d18bd8 fix: clicking a gutter line updates the URL to #L<n>
The viewer already supported jumping to a line via #L42 in the URL but
never produced one — users had to type it manually. Wire guttermousedown
on the ACE editor to replaceState a #L<n> hash, with shift-click for a
range. Also reapply the highlight on hashchange so pasting a URL into
the address bar works without reload.

Fixes #392.
2026-05-03 20:25:41 +02:00
tdurieux d138d487f2 fix: don't drop a path segment when resolving "./" relative URLs
urlRel2abs() prepended an extra "." when it saw "./X", turning the
relative path into "../X" and silently moving up a directory. As a
result, raw HTML <img src="./imgs/run.png"> inside a README rendered
under /r/<repo>/<file> resolved to /r/<repo>/imgs/... instead of
/r/<repo>/<dir>/imgs/..., so the image 404'd. Markdown image syntax
went through marked-base-url and was unaffected.

Strip the leading "./" instead so the relative path concatenates
cleanly with baseUrl.

Fixes #346.
2026-05-03 20:01:33 +02:00
tdurieux 9feeab1055 fix: render heading IDs so anchor links resolve
marked v12 dropped the headerIds option, so headings rendered with no
id attributes and links like [Releases](#releases-and-contributing)
silently failed to scroll. Add a heading renderer that emits a
GitHub-style slug id, with a numeric suffix for duplicates within a
document.

Fixes #390.
2026-05-03 19:44:18 +02:00
tdurieux e18961208a fix(admin): bind token form to dotted scope to escape ng-if child scope
The Generate button silently no-op'd because ng-model="newTokenName" inside
an ng-if block wrote to a child scope, leaving $scope.newTokenName empty.
Use $scope.tokenForm.{name,plaintext} so prototypal lookup resolves to the
controller scope.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 19:40:28 +02:00
tdurieux 9f1ae1924b fix: auto-dismiss toast notifications after 8s
Toasts used class="toast show" with ng-repeat but never initialized
Bootstrap's toast plugin, so they stayed pinned until manually closed.
Each navigation re-fired toasts (e.g. "README not found in github
pages"), stacking duplicates.

Add an $scope.addToast helper that schedules removal via $timeout, and
route all push sites through it.

Fixes #246.
2026-05-03 19:35:42 +02:00
tdurieux a5f66d6844 multiple fixes 2026-05-03 15:30:54 +02:00
tdurieux 88f826aab4 update design 2026-04-24 14:55:18 +02:00
Thomas Durieux 2621dfd7fc (feat): added mermaid rendering support in markdown (#676) 2026-04-15 09:56:35 +02:00
Thomas Durieux 261eaa8d79 Polish website UX: unify dashboards, clean up layout, modernize styling (#668) 2026-04-15 09:30:19 +02:00
Thomas Durieux 1d97c76e7e Improve mobile layout and redesign admin interface (#665) 2026-04-15 06:04:43 +02:00
Thomas Durieux 812f8b6314 Sanitize markdown HTML output with DOMPurify to prevent XSS (#658) 2026-04-15 04:22:38 +02:00
tdurieux d8dd408a65 fix: avoid cache of list of files 2024-07-22 16:20:18 +02:00
Sebastian Ramacher 9271332d5b chore: Fix typos (#292) 2024-05-28 19:11:19 +02:00
tdurieux e9e881fdc3 fix(#290): fix tree rendering of files inside a single folder 2024-05-15 11:18:16 +02:00
tdurieux a30d5b31a6 fix(#286): fix open and closing folder 2024-05-13 18:45:11 +02:00
tdurieux 93606a5c39 fix: catch error when requesting a folder 2024-05-03 10:49:25 +02:00
tdurieux 3a00a27153 feat: improve support for binary & audio files 2024-04-28 10:01:40 +01:00
tdurieux a86e050f8b fix: handle empty repository 2024-04-26 13:48:32 +01:00
tdurieux a0dff4389d fix: fix ui folder tree 2024-04-26 12:50:24 +01:00
tdurieux b0fa5e6689 fix: hot fix, replace repoID by repoId 2024-04-26 12:40:56 +01:00
tdurieux 710f7328e7 feat: flatten file tree for better performance 2024-04-26 10:32:09 +01:00
tdurieux b4ff27f560 fix: improve katex support 2024-04-11 21:38:42 +01:00
tdurieux 6b9574add3 fix: improve repository rename 2024-04-11 17:13:01 +01:00
tdurieux cb3d999ed3 fix: add missing KaTeX fonts 2024-04-05 12:02:50 +01:00
tdurieux f30110c567 fix: improve link rendering 2024-04-05 11:04:29 +01:00
tdurieux c3a890dac7 fix: fix minimization of the client js 2024-04-05 10:34:24 +01:00
tdurieux 9e995a04db fix: fix code rendering 2024-04-05 10:21:38 +01:00
tdurieux 7ed973ccfc fix: fix code rendering 2024-04-05 10:17:47 +01:00
tdurieux 22a28a913d perf: improve page loading time 2024-04-05 01:02:41 +01:00
tdurieux 8fdd6228e4 fix(#251): fix notebook and code dark mode 2024-04-04 18:35:01 +01:00
tdurieux f5ec343a9c fix(#263): render math expression correctly 2024-04-04 18:08:03 +01:00
tdurieux f5d45394bf feat: add sha to file path to avoid caching 2024-04-04 15:56:38 +01:00
tdurieux 795a67cdb2 fix: fix anonymization client script 2024-04-03 18:41:00 +01:00
tdurieux e24d1b4630 update dependencies & remove google analytics 2023-06-20 09:58:25 +02:00
tdurieux 0997e19d3d fix(#208) update notebook renderer for the last version of marked 2023-05-16 14:34:01 +02:00
tdurieux 2f916c6968 fix: auto select file when a folder is selected 2023-05-08 15:39:17 +02:00
tdurieux f1d6e4534d change default filter for the admin 2023-05-02 18:22:14 +02:00
tdurieux dde7fa2d72 feat(#204): display videos in md 2023-05-02 18:21:47 +02:00
tdurieux 3bf6864472 feat: improve error management in front end 2023-04-26 00:27:52 +02:00
tdurieux c9acb7b899 feat: improve response content type header 2023-04-25 17:42:50 +02:00
tdurieux 8ac3a66a30 feat(#169): add emoji support for markdown 2023-04-21 13:23:34 +02:00
tdurieux 3627096e63 feat(#148): add support for Math expression 2023-04-21 12:29:19 +02:00
tdurieux 4293fa01b2 feat: add media player in content view 2023-04-20 23:30:26 +02:00
tdurieux e94a5f164a disable download mode for the moment 2023-04-05 12:12:57 +02:00
tdurieux 74aacd223d fix(#186): use a different name for the hostname configuration 2023-03-02 16:39:01 +01:00
tdurieux 8221b2ee7f feat: dont download notebook if not necessary 2023-02-23 16:21:08 +01:00
tdurieux c59e202124 feat: list gh repos in user admin 2023-02-22 11:05:37 +01:00
tdurieux 1d4eb7a1b0 fix: fix action menu in the admin 2023-02-22 09:21:14 +01:00
tdurieux 5c72f54db5 perf: improve the perf of Anonymous GitHub 2023-02-08 15:34:50 +01:00
tdurieux 73f7582fd2 feat: admin to remove repo cache 2023-02-07 13:27:06 +01:00