From: Omar Polo Subject: Re: gotwebd: foldable briefs? To: Tracey Emery Cc: Mark Jamsek , Kyle Ackerman , gameoftrees@openbsd.org Date: Fri, 08 Dec 2023 09:05:39 +0100 On 2023/12/07 13:32:22 -0700, Tracey Emery wrote: > The arrow is nearly impossible to click on a cell phone. The elipses was > better for that situation. What about moving the arrow to the end of the > line and give it a bit of space from the linked title? I don't know, > maybe that isn't the answer either. I don't think we can move the arrow at the end. The arrow is not a real element, is just a pseudo-one. There's the ::marker selector in CSS to customize it, but I doubt we can move it. Another option would be to keep both the arrow in place and also the [...] button (with the style tweak from Kyle, thanks!) I've updated my instance. ok? diff /home/op/w/got commit - ac15152e219bed9c7f41007a39c3cbce83ea9386 path + /home/op/w/got blob - b61f9292109e3986171a8d14865d128e2087e905 file + gotwebd/files/htdocs/gotwebd/gotweb.css --- gotwebd/files/htdocs/gotwebd/gotweb.css +++ gotwebd/files/htdocs/gotwebd/gotweb.css @@ -213,6 +213,24 @@ header.subtitle h2 { } } +.briefs_log summary { + cursor: pointer; +} + +.briefs_toggle { + display: inline-block; + padding: 3px 4px; + padding: 0px 4px; + border: 1px solid #222; + border-radius: 3px; + user-select: none; +} + +/* work around .commits being unusable here */ +.briefs_log > p { + white-space: pre-wrap; +} + .tag_age, .tag_name, .tag_log { display: inline-block; vertical-align: middle; blob - 8080344cb29306239d3e58af9772c1a730874aec file + gotwebd/pages.tmpl --- gotwebd/pages.tmpl +++ gotwebd/pages.tmpl @@ -354,7 +354,7 @@ nextsep(char *s, char **t) struct repo_commit *rc; struct repo_dir *repo_dir = t->repo_dir; struct gotweb_url diff_url, patch_url, tree_url; - char *tmp; + char *tmp, *body; diff_url = (struct gotweb_url){ .action = DIFF, @@ -392,9 +392,12 @@ nextsep(char *s, char **t) if (tmp) *tmp = '\0'; - tmp = strchr(rc->commit_msg, '\n'); - if (tmp) - *tmp = '\0'; + body = strchr(rc->commit_msg, '\n'); + if (body) { + *body++ = '\0'; + while (*body == '\n') + body++; + } !}

@@ -406,15 +409,33 @@ nextsep(char *s, char **t) {{ rc->committer }}

-

- - {{ rc->commit_msg }} - - {{ if rc->refs_str }} - {{ " " }} ({{ rc->refs_str }}) - {{ end }} - -

+ {{ if body && *body != '\0' }} +
+ + + {{ rc->commit_msg }} + + {{ if rc->refs_str }} + {{ " " }} ({{ rc->refs_str }}) + {{ end }} + {{ " " }} + + + {{ "\n" }} +

{{ body }}

+
+ {{ else }} +

+ + {{ rc->commit_msg }} + + {{ if rc->refs_str }} + {{ " " }} ({{ rc->refs_str }}) + {{ end }} +

+ {{ end }}