Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion styles/all/template/event/overall_header_head_append.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- IF TOPIC_SOLVED_PHPBB31 -->
<!-- INCLUDECSS @tierra_topicsolved/buttons.css -->
<!-- INCLUDECSS @tierra_topicsolved/phpbb-3-1-x.css -->
<!-- ELSE -->
<!-- INCLUDECSS @tierra_topicsolved/styles.css -->
<!-- ENDIF -->
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</a>
<!-- ELSE -->
<a href="{postrow.U_SET_SOLVED}" title="{L_SET_TOPIC_NOT_SOLVED}" class="button button-icon-only">
<i class="icon fa-check fa-fw" aria-hidden="true"></i><span class="sr-only">{L_SET_TOPIC_NOT_SOLVED}</span>
<i class="icon fa-ban fa-fw" aria-hidden="true"></i><span class="sr-only">{L_SET_TOPIC_NOT_SOLVED}</span>
</a>
<!-- ENDIF -->
<!-- ELSE -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</a>
<!-- ENDIF -->
<!-- IF TOPIC_SOLVED_IMAGE -->
<a href="{{ U_SOLVED_POST }}" title="{L_TOPIC_SOLVED}">
<a class="topic_solved_title_link" href="{{ U_SOLVED_POST }}" title="{L_TOPIC_SOLVED}">
{TOPIC_SOLVED_IMAGE}
<!-- IF ! TOPIC_SOLVED_PHPBB31 -->
<span class="sr-only">{L_TOPIC_SOLVED}</span>
Expand Down
File renamed without changes.
18 changes: 18 additions & 0 deletions styles/all/theme/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.topic_solved_title_link:hover {
text-decoration: none;
}

.topic_solved_icon {
--hue: 120deg;
--sat: 100%;
--lightness: 37%;
color: hsl(var(--hue) var(--sat) var(--lightness));
}

.topic_solved_title_link .topic_solved_icon {
display: inline-flex;
}

:is(.topic_solved_title_link, .list-inner a):hover .topic_solved_icon {
color: hsl(var(--hue) var(--sat) calc(var(--lightness) - 6%));
}
12 changes: 5 additions & 7 deletions topicsolved.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,8 @@ public function image($type, $alt = '', $url = '')
public function icon($color = '', $alt = '', $url = '')
{
$title = '';
if (empty($color))
{
$color = '00BF00';
}
$classes = 'fa fa-check-circle fa-fw';

$classes = 'topic_solved_icon fa fa-check-circle fa-fw';

/**
* This event makes it possible to customize the solved icon.
Expand All @@ -324,8 +321,9 @@ public function icon($color = '', $alt = '', $url = '')
extract($this->dispatcher->trigger_event('tierra.topicsolved.render_icon', compact($vars)));

$markup = sprintf(
'<i class="%1s" style="color: #%2s" aria-hidden="true"></i>',
$classes, $color
'<i class="%1s" style="%2s" aria-hidden="true"></i>',
$classes,
empty($color) ? '' : "color: #$color"
);

if (!empty($alt))
Expand Down