Skip to content
Permalink
Browse files

Use ui_linkarrow instead of img.prev/next.

  • Loading branch information...
kohler committed Dec 11, 2017
1 parent 9da53ef commit c675100dc677faf112390c590be9a4e65f9a5dba
Showing with 29 additions and 19 deletions.
  1. +3 −3 assign.php
  2. BIN images/sprite.png
  3. +14 −0 lib/icons.php
  4. +2 −2 log.php
  5. +2 −2 src/helpers.php
  6. +8 −12 stylesheets/style.css
@@ -463,7 +463,7 @@ function createAnonymousReview() {
$conflict_type = $prow->conflict_type($pc);
if ($conflict_type >= CONFLICT_AUTHOR) {
echo '<div class="pctbass">', review_type_icon(-2),
Ht::img("_.gif", ">", array("class" => "next", "style" => "visibility:hidden")), '&nbsp;</div>',
Icons::ui_linkarrow(-1), '&nbsp;</div>',
'<div id="ass' . $pc->contactId . '" class="pctbname pctbname-2 taghl">',
$Me->name_html_for($pc), '</div>';
} else {
@@ -478,9 +478,9 @@ function createAnonymousReview() {
// NB manualassign.php also uses the "pcs$contactId" convention
echo '<div class="pctbass">'
. '<div id="foldass' . $pc->contactId . '" class="foldc" style="position:relative">'
. '<a id="folderass' . $pc->contactId . '" href="#">'
. '<a id="folderass' . $pc->contactId . '" href="" class="qq">'
. review_type_icon($revtype, false, $title)
. Ht::img("_.gif", ">", array("class" => "next")) . '</a>&nbsp;'
. Icons::ui_linkarrow(1) . '</a>&nbsp;'
. Ht::hidden("pcs$pc->contactId", $value, ["id" => "pcs$pc->contactId", "data-default-value" => $value])
. '</div></div>';
BIN -1.2 KB images/sprite.png
Binary file not shown.
@@ -12,9 +12,23 @@ static function ui_triangle($direction) {
$t .= 'M1 1L15 8L1 15z';
else if ($direction == 2)
$t .= 'M1 1L8 15L15 1z';
else if ($direction == 3)
$t .= 'M15 1L1 8L15 15z';
return $t . '" /></svg>';
}
static function ui_upperleft() {
return '<svg class="licon" width="1em" height="1em" viewBox="0 0 16 16" preserveAspectRatio="none"><path d="M16 10L16 13C9 15 5 12 6 6L2 7L8 1L14 7L10 6C9 9 10 11 16 10z" /></svg>';
}
static function ui_linkarrow($direction) {
$t = '<svg class="licon-s" width="0.75em" height="0.75em" viewBox="0 0 16 16" preserveAspectRatio="none"><path d="';
if ($direction == 0)
$t .= 'M2 11L8 1L14 11';
else if ($direction == 1)
$t .= 'M5 3L15 9L5 15';
else if ($direction == 2)
$t .= 'M2 1L8 11L14 1';
else if ($direction == 3)
$t .= 'M11 3L1 9L11 15';
return $t . '" /></svg>';
}
}
@@ -336,7 +336,7 @@ function searchbar(LogRowGenerator $lrg, $page, $count) {
echo $lrg->page_link_html(1, "<strong>Newest</strong>"), " &nbsp;|&nbsp;&nbsp;";
echo "</div></td><td><div class='lognavxr'>";
if ($page > 1)
echo $lrg->page_link_html($page - 1, "<strong>" . Ht::img("_.gif", "<-", array("class" => "prev")) . " Newer</strong>");
echo $lrg->page_link_html($page - 1, "<strong>" . Icons::ui_linkarrow(3) . "Newer</strong>");
echo "</div></td><td><div class='lognavdr'>";
if ($page - $nlinks > 1)
echo "&nbsp;...";
@@ -349,7 +349,7 @@ function searchbar(LogRowGenerator $lrg, $page, $count) {
echo "...&nbsp;";
echo "</div></td><td><div class='lognavx'>";
if ($lrg->has_page($page + 1))
echo $lrg->page_link_html($page + 1, "<strong>Older " . Ht::img("_.gif", "->", array("class" => "next")) . "</strong>");
echo $lrg->page_link_html($page + 1, "<strong>Older" . Icons::ui_linkarrow(1) . "</strong>");
echo "</div></td><td><div class='lognavd'>";
if ($lrg->has_page($page + $nlinks + 1))
echo "&nbsp;&nbsp;|&nbsp; ", $lrg->page_link_html("earliest", "<strong>Oldest</strong>");
@@ -540,9 +540,9 @@ function _one_quicklink($id, $baseUrl, $urlrest, $listtype, $isprev) {
}
return "<a id=\"quicklink_" . ($isprev ? "prev" : "next")
. "\" class=\"x\" href=\"" . hoturl($baseUrl, $urlrest) . "\">"
. ($isprev ? Ht::img("_.gif", "<-", "prev") : "")
. ($isprev ? Icons::ui_linkarrow(3) : "")
. $paperText
. ($isprev ? "" : Ht::img("_.gif", "->", "next"))
. ($isprev ? "" : Icons::ui_linkarrow(1))
. "</a>";
}
@@ -803,6 +803,14 @@ span.expander {
vertical-align: -0.05em;
fill: currentColor;
}
.licon-s {
vertical-align: -0.05em;
stroke: currentColor;
fill: none;
stroke-width: 2;
stroke-linejoin: round;
stroke-linecap: round;
}

/* Action area */
.aa {
@@ -1426,18 +1434,6 @@ del .rto {
text-align: center;
}

img.prev, img.next {
background-image: url(../images/sprite.png?2);
width: 8px;
height: 9px;
}
img.prev {
background-position: -32px 0;
}
img.next {
background-position: -10px 0;
}

.ti_interest {
padding-right: 1px;
white-space: nowrap;

0 comments on commit c675100

Please sign in to comment.
You can’t perform that action at this time.