Skip to content

Commit

Permalink
Use ul.semi for semicolon-separated lists.
Browse files Browse the repository at this point in the history
  • Loading branch information
kohler committed Sep 5, 2023
1 parent 9e787b7 commit f25d9bb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/options/o_attachments.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function render(FieldRender $fr, PaperValue $ov) {
if ($fr->want_text()) {
$fr->set_text(join("; ", $ts));
} else if ($fr->want_list_row()) {
$fr->set_html(join("; ", $ts));
$fr->set_html('<ul class="semi"><li>' . join("</li><li>", $ts) . '</li></ul>');
} else {
$fr->set_html('<ul class="x"><li class="od">' . join('</li><li class="od">', $ts) . '</li></ul>');
}
Expand Down
6 changes: 3 additions & 3 deletions src/pages/p_manualassign.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ private function print_reviewer(Contact $reviewer) {
// Conflict information
$any = false;
foreach ($reviewer->collaborator_generator() as $m) {
echo ($any ? ';</span> ' : '<div class="f-i"><label>Collaborators</label>'),
'<span class="nw">', $m->name_h(NAME_A);
echo ($any ? "" : "<div class=\"f-i\"><label>Collaborators</label><ul class=\"semi\">"),
'<li>', $m->name_h(NAME_A), '</li>';
$any = true;
}
echo $any ? '</span></div>' : '';
echo $any ? '</ul></div>' : '';

$show = " show:au" . ($this->conf->setting("sub_collab") ? " show:co" : "");
echo '<div class="f-i">',
Expand Down
9 changes: 3 additions & 6 deletions src/topicset.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,12 +350,9 @@ function unparse_list_html($tlist, $interests = null) {
foreach ($tlist as $tid) {
$n = $this->unparse_name_html($tid);
$i = $interests === null ? null : ($interests[$tid] ?? 0);
if (empty($out) && $i !== null) {
$n = '<span class="topic' . $i . '">' . $n . '</span>';
$i = null;
}
$out[] = '<li class="pl_topicti' . ($i !== null ? " topic$i" : "") . '">' . $n . '</li>';
$k = $i === null ? "" : " class=\"topic{$i}\"";
$out[] = "<li{$k}>{$n}</li>";
}
return '<ul class="pl_topict">' . join("", $out) . '</ul>';
return "<ul class=\"semi\">" . join("", $out) . "</ul>";
}
}
12 changes: 6 additions & 6 deletions stylesheets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1175,21 +1175,21 @@ span.hastitle {
margin-left: 1.5rem;
text-indent: -1.5rem;
}
.pl_topict {
ul.semi {
display: flex;
flex-wrap: wrap;
padding-left: 0;
margin-top: 2px;
margin-bottom: 2px;
margin-top: 0;
margin-bottom: 0;
}
.pl_topicti {
ul.semi > li {
display: inline-block;
}
.pl_topicti::after {
ul.semi > li::after {
content: "; ";
padding-right: 0.35em;
}
.pl_topicti:last-child::after {
ul.semi > li:last-child::after {
content: "";
padding-right: 0;
}
Expand Down

0 comments on commit f25d9bb

Please sign in to comment.