From 64af09519398da394b57a6fab17f76a4e6d99cdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 9 Mar 2022 10:22:58 +0100 Subject: Fix anchors in non-js page. Now blocks link to their entry in the sidebar, and the sidebar entries link to (one of) their blocks. --- module/calp/html/vcomponent.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/calp/html/vcomponent.scm b/module/calp/html/vcomponent.scm index 87b22eaf..f593133c 100644 --- a/module/calp/html/vcomponent.scm +++ b/module/calp/html/vcomponent.scm @@ -232,11 +232,11 @@ (stream-map (lambda (ev) (fmt-single-event - ev `((id ,(html-id ev)) + ev `((id ,(html-id ev) "-side") (data-calendar ,(base64encode (or (prop (parent ev) 'NAME) "unknown")))) fmt-header: (lambda body - `(a (@ (href "#" ,(html-id ev) #; (date-link (as-date (prop ev 'DTSTART))) + `(a (@ (href "#" ,(html-id ev) "-block" #; (date-link (as-date (prop ev 'DTSTART))) ) (class "hidelink")) ,@body)))) @@ -269,11 +269,11 @@ ;; surrounding element which allows something to happen when an element ;; is clicked with JS turned off. Our JS disables this, and handles clicks itself. - `((a (@ (href "#" ,(html-id ev)) + `((a (@ (href "#" ,(html-id ev) "-side") (class "hidelink")) (vevent-block (@ ,@(assq-merge extra-attributes - `((id ,(html-id ev)) + `((id ,(html-id ev) "-block") (data-calendar ,(base64encode (or (prop (parent ev) 'NAME) "unknown"))) (data-uid ,(output-uid ev)) -- cgit v1.2.3