commit - d3b1ab82b4b7356f06f46106aff4fb3d570e39b4
commit + 1154d0c0f452240fdb333aa24b55166fc6bbed16
blob - 31f9fb498960381656d206eae6f5fc756707fbbf
blob + 295f7f577ee4a54a06a43cad1b73e9ef6c0fdf53
--- gotwebd/files/htdocs/gotwebd/gotweb.css
+++ gotwebd/files/htdocs/gotwebd/gotweb.css
.briefs_log {
width: auto;
}
+}
+
+.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 {
blob - 163adf4f079d9ab05eb872f6ff25606766c646d7
blob + a55f8da771b11abd364a24ae8e9f6fc22975d62c
--- gotwebd/pages.tmpl
+++ gotwebd/pages.tmpl
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,
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++;
+ }
!}
<div class='brief'>
<p class='brief_meta'>
{{ rc->committer }}
</span>
</p>
- <p class="briefs_log">
- <a href="{{ render gotweb_render_url(tp->tp_arg, &diff_url) }}">
- {{ rc->commit_msg }}
- </a>
- {{ if rc->refs_str }}
- {{ " " }} <span class="refs_str">({{ rc->refs_str }})</span>
- {{ end }}
- </a>
- </p>
+ {{ if body && *body != '\0' }}
+ <details class="briefs_log">
+ <summary>
+ <a href="{{ render gotweb_render_url(tp->tp_arg, &diff_url) }}">
+ {{ rc->commit_msg }}
+ </a>
+ {{ if rc->refs_str }}
+ {{ " " }} <span class="refs_str">({{ rc->refs_str }})</span>
+ {{ end }}
+ {{ " " }}
+ <span class="briefs_toggle" aria-hidden="true">
+ {{ " ⋅⋅⋅ " }}
+ </span>
+ </summary>
+ {{ "\n" }}
+ <p>{{ body }}</p>
+ </details>
+ {{ else }}
+ <p class="briefs_log">
+ <a href="{{ render gotweb_render_url(tp->tp_arg, &diff_url) }}">
+ {{ rc->commit_msg }}
+ </a>
+ {{ if rc->refs_str }}
+ {{ " " }} <span class="refs_str">({{ rc->refs_str }})</span>
+ {{ end }}
+ </p>
+ {{ end }}
</div>
<div class="navs_wrapper">
<div class="navs">