1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-04 05:25:01 +02:00

[ticket/17155] Default to first unread post on topics

Also removed the unread post icon and instead opted for playing with font
weight and color for indication.

PHPBB3-17155
This commit is contained in:
Marc Alexander 2023-07-02 14:04:31 +02:00
parent 3e2d2d240a
commit 68fb6dcb57
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995
7 changed files with 35 additions and 32 deletions

@ -99,12 +99,11 @@
{% endif %}
<div class="list-inner">
<!-- EVENT topiclist_row_prepend -->
<!-- IF searchresults.S_UNREAD_TOPIC and not S_IS_BOT -->
<a class="unread" href="{searchresults.U_NEWEST_POST}">
{{ Icon('iconify', 'fa:file', lang('NEW_POST'), true, 'c-topic-unread-icon') }}
</a>
<!-- ENDIF -->
<a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a>
{% if searchresults.S_UNREAD_TOPIC and not S_IS_BOT %}
<a href="{{ searchresults.U_NEWEST_POST }}" class="topictitle unread">{{ searchresults.TOPIC_TITLE }}</a>
{% else %}
<a href="{{ searchresults.U_VIEW_TOPIC }}" class="topictitle">{{ searchresults.TOPIC_TITLE }}</a>
{% endif %}
<!-- IF searchresults.S_TOPIC_UNAPPROVED or searchresults.S_POSTS_UNAPPROVED -->
<a href="{searchresults.U_MCP_QUEUE}" title="{L_TOPIC_UNAPPROVED}">
{{ Icon('iconify', 'fa:question', lang('TOPIC_UNAPPROVED'), true, 'c-uapproved-icon') }}

@ -54,11 +54,11 @@
<img class="row-item-sub" src="{T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}" alt="">
{% endif %}
<div class="list-inner">
<!-- IF topicrow.S_UNREAD_TOPIC -->
<a class="unread" href="{topicrow.U_NEWEST_POST}">
{{ Icon('iconify', 'fa:file', NEW_POST, true, 'c-topic-unread-icon') }}
</a>
<!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
{% if topicrow.S_UNREAD_TOPIC %}
<a href="{{ topicrow.U_NEWEST_POST }}" class="topictitle unread">{{ topicrow.TOPIC_TITLE }}</a>
{% else %}
<a href="{{ topicrow.U_VIEW_TOPIC }}" class="topictitle">{{ topicrow.TOPIC_TITLE }}</a>
{% endif %}
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED -->
<a href="{topicrow.U_MCP_QUEUE}" title="{L_TOPIC_UNAPPROVED}">
{{ Icon('iconify', 'fa:question', lang('TOPIC_UNAPPROVED'), true, 'c-unapproved-icon') }}

@ -33,12 +33,12 @@
<img class="row-item-sub" src="{T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}" alt="">
{% endif %}
<div class="list-inner">
<!-- IF topicrow.S_UNREAD -->
<a class="unread" href="{topicrow.U_NEWEST_POST}">
{{ Icon('iconify', 'fa:file', NEW_POST, true, 'c-topic-unread-icon') }}
</a>
<!-- ENDIF -->
<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a><br />
{% if topicrow.S_UNREAD %}
<a href="{{ topicrow.U_NEWEST_POST }}" class="topictitle unread">{{ topicrow.TOPIC_TITLE }}</a>
{% else %}
<a href="{{ topicrow.U_VIEW_TOPIC }}" class="topictitle">{{ topicrow.TOPIC_TITLE }}</a>
{% endif %}
<br>
<!-- IF .topicrow.pagination -->
<div class="pagination">
<span>{{ Icon('iconify', 'fa:clone', '', true) }}</span>

@ -104,11 +104,11 @@
<img class="row-item-sub" src="{T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}" alt="">
{% endif %}
<div class="list-inner">
<!-- IF topicrow.S_UNREAD_TOPIC -->
<a class="unread" href="{topicrow.U_NEWEST_POST}">
{{ Icon('iconify', 'fa:file', NEW_POST, true, 'c-topic-unread-icon') }}
</a>
<!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
{% if topicrow.S_UNREAD_TOPIC %}
<a href="{{ topicrow.U_NEWEST_POST }}" class="topictitle unread">{{ topicrow.TOPIC_TITLE }}</a>
{% else %}
<a href="{{ topicrow.U_VIEW_TOPIC }}" class="topictitle">{{ topicrow.TOPIC_TITLE }}</a>
{% endif %}
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED -->
<a href="{topicrow.U_MCP_QUEUE}" title="{L_TOPIC_UNAPPROVED}">
{{ Icon('iconify', 'fa:question', lang('TOPIC_UNAPPROVED'), true, 'c-unapproved-icon') }}

@ -177,12 +177,13 @@
{% endif %}
<div class="list-inner">
<!-- EVENT topiclist_row_prepend -->
<!-- IF topicrow.S_UNREAD_TOPIC and not S_IS_BOT -->
<a class="unread" href="{topicrow.U_NEWEST_POST}">
{{ Icon('iconify', 'fa:file', NEW_POST, true, 'c-topic-unread-icon') }}
</a>
<!-- ENDIF -->
<!-- IF topicrow.U_VIEW_TOPIC --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a><!-- ELSE -->{topicrow.TOPIC_TITLE}<!-- ENDIF -->
{% if topicrow.S_UNREAD_TOPIC and not S_IS_BOT %}
<a href="{{ topicrow.U_NEWEST_POST }}" class="topictitle unread">{{ topicrow.TOPIC_TITLE }}</a>
{% elseif topicrow.U_VIEW_TOPIC %}
<a href="{{ topicrow.U_VIEW_TOPIC }}" class="topictitle">{{ topicrow.TOPIC_TITLE }}</a>
{% else %}
<span class="topictitle">{{ topicrow.TOPIC_TITLE }}</span>
{% endif %}
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED -->
<a href="{topicrow.U_MCP_QUEUE}" title="<!-- IF topicrow.S_TOPIC_UNAPPROVED -->{L_TOPIC_UNAPPROVED}<!-- ELSE -->{L_POSTS_UNAPPROVED}<!-- ENDIF -->">
{{ Icon('iconify', 'fa:question', '', true, 'c-unapproved-icon') }}<span class="sr-only"><!-- IF topicrow.S_TOPIC_UNAPPROVED -->{L_TOPIC_UNAPPROVED}<!-- ELSE -->{L_POSTS_UNAPPROVED}<!-- ENDIF --></span>

@ -220,8 +220,7 @@ a:hover .icon.icon-red, /* DEPRECATED 4.0 */
.c-topic-reported-icon,
.c-topic-unread-icon,
.c-warning-icon,
.c-unapproved-icon,
.unread {
.c-unapproved-icon {
color: #d41142;
}

@ -66,10 +66,10 @@ th a:hover {
/* Links for forum/topic lists */
a.forumtitle,
a.topictitle {
a.topictitle,
span.topictitle {
font-family: "Trebuchet MS", Helvetica, Arial, sans-serif;
font-size: 13px;
font-weight: bold;
text-decoration: none;
}
@ -81,6 +81,10 @@ a.topictitle {
display: inline;
}
a.unread {
font-weight: bold;
}
a.topictitle:hover {
text-decoration: underline;
}