Browse Source

Display user names on lists with avatars off. #180

Rafał Pitoń 12 years ago
parent
commit
baaa91cddc

+ 7 - 5
static/cranefly/css/cranefly.css

@@ -972,17 +972,19 @@ a.btn-link:hover,a.btn-link:active,a.btn-link:focus{color:#333;text-decoration:n
 .forum-threads-list-new>ul{list-style:none;margin:0}.forum-threads-list-new>ul>li{border-bottom:1px solid #d5d5d5;padding:9.9px 0;overflow:auto}.forum-threads-list-new>ul>li .thread-icon{float:left;width:39.5px;color:#d5d5d5;font-size:22px;text-align:center;text-decoration:none;margin-bottom:-1px}
 .forum-threads-list-new>ul>li .thread-body{margin:-9.9px 0;margin-left:39.5px;padding:9.9px 0}.forum-threads-list-new>ul>li .thread-body .thread-title{display:block;position:relative;top:1px}.forum-threads-list-new>ul>li .thread-body .thread-title a:link,.forum-threads-list-new>ul>li .thread-body .thread-title a:active,.forum-threads-list-new>ul>li .thread-body .thread-title a:visited,.forum-threads-list-new>ul>li .thread-body .thread-title a:hover{color:#555;font-size:17.5px}
 .forum-threads-list-new>ul>li .thread-body .thread-title .thread-flags{display:none;list-style:none;margin:0;padding:0;position:relative;top:4px;left:-4px}.forum-threads-list-new>ul>li .thread-body .thread-title .thread-flags li{float:left;margin-left:7px}
-.forum-threads-list-new>ul>li .thread-body .thread-activity{float:right;list-style:none;margin:0;margin-top:-9.9px;padding:6px 0;padding-right:8px;overflow:auto;position:relative;top:2px;z-index:2}.forum-threads-list-new>ul>li .thread-body .thread-activity li{float:left;margin:0;margin-left:8px;padding:0}.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-flag{color:#999;font-size:26px}.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-flag.thread-moderated:hover{color:#7a43b6}
-.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-flag.thread-closed:hover{color:#cf402e}
-.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-flag.thread-deleted:hover{color:#333}
-.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-replies,.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-replies-reported,.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-replies-moderated{position:relative;top:2px;color:#555;font-size:17.5px;font-weight:bold}
+.forum-threads-list-new>ul>li .thread-body .thread-activity{float:right;list-style:none;margin:0;margin-top:-9.9px;padding:6px 0;padding-right:8px;overflow:auto;position:relative;top:2px;z-index:2}.forum-threads-list-new>ul>li .thread-body .thread-activity li{float:left;margin:0;margin-left:8px;padding:0}.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-replies,.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-replies-reported,.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-replies-moderated{position:relative;top:2px;color:#555;font-size:17.5px;font-weight:bold}
 .forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-replies-reported{color:#cf402e}
 .forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-replies-moderated{color:#7a43b6}
 .forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-replies.thread-replies-new{color:#cf402e}
 .forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-replies{position:relative;top:2px;color:#555;font-size:17.5px;font-weight:bold}.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-replies.thread-replies-new{color:#cf402e}
 .forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-last-reply{position:relative;top:2px}.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-last-reply a:link,.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-last-reply a:visited{color:#999;font-size:17.5px;font-weight:bold}
 .forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-last-reply a:hover,.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-last-reply a:active{color:#333}
-.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-author .user-avatar,.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-poster .user-avatar{border-radius:3px;width:24px;height:24px}
+.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-author,.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-poster{position:relative;top:2px;color:#555;font-size:17.5px;font-weight:bold}.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-author .user-avatar,.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-poster .user-avatar{border-radius:3px;width:24px;height:24px;position:relative;bottom:2px}
+.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-author a:link,.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-author a:active,.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-author a:visited,.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-author a:hover{color:#049cdb}
+.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-poster a:link,.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-poster a:active,.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-poster a:visited,.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-poster a:hover{color:#cf402e}
+.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-flag{color:#999;font-size:26px}.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-flag.thread-moderated:hover{color:#7a43b6}
+.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-flag.thread-closed:hover{color:#cf402e}
+.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-flag.thread-deleted:hover{color:#333}
 .forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-select label{border-radius:3px;display:inline-block;margin:0;margin-bottom:-5px;padding-right:3px;padding-bottom:4px}.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-select label:hover{background-color:#eee}
 .forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-select label:active{background-color:#cf402e}
 .forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-select label input{margin-top:6px;position:relative;left:6px}

+ 41 - 25
static/cranefly/css/cranefly/forum.less

@@ -383,29 +383,6 @@
 						margin-left: 8px;
 						padding: 0px;
 
-						&.thread-flag {
-							color: @grayLight;
-							font-size: 26px;
-
-							&.thread-moderated {
-								&:hover {
-									color: @purple;
-								}
-							}
-
-							&.thread-closed {
-								&:hover {
-									color: @red;
-								}
-							}
-
-							&.thread-deleted {
-								&:hover {
-									color: @grayDark;
-								}
-							}
-						}
-
 						&.thread-replies,
 						&.thread-replies-reported,
 						&.thread-replies-moderated {
@@ -460,16 +437,55 @@
 						}
 
 						&.thread-author, &.thread-poster {
+							position: relative;
+							top: 2px;
+
+							color: @gray;
+							font-size: @fontSizeLarge;
+							font-weight: bold;
+
 							.user-avatar {
 								border-radius: @baseBorderRadius;
 								width: 24px;
 								height: 24px;
+								position: relative;
+								bottom: 2px;
 							}
 						}
 
-						&.thread-author {}
+						&.thread-author {
+							a:link, a:active, a:visited, a:hover {
+								color: @blue;
+							}
+						}
+
+						&.thread-poster {
+							a:link, a:active, a:visited, a:hover {
+								color: @itemNewColor;
+							}}
+
+						&.thread-flag {
+							color: @grayLight;
+							font-size: 26px;
+
+							&.thread-moderated {
+								&:hover {
+									color: @purple;
+								}
+							}
+
+							&.thread-closed {
+								&:hover {
+									color: @red;
+								}
+							}
 
-						&.thread-poster {}
+							&.thread-deleted {
+								&:hover {
+									color: @grayDark;
+								}
+							}
+						}
 
 						&.thread-select {
 							label {

+ 4 - 4
templates/cranefly/threads/list.html

@@ -163,22 +163,22 @@
             <li class="thread-last-reply tooltip-top" title="{% trans last=thread.last|reldate %}Last post {{ last }}{% endtrans %}">
               <a href="{{ url('thread_last', thread=thread.pk, slug=thread.slug) }}">{{ thread.last|relcompact }}</a>
             </li>
-            <li class="thread-author tooltip-top" title="{% if thread.start_poster_name != thread.last_poster_name %}{% trans username=thread.start_poster_name %}Thread by {{ username }}{% endtrans %}{% else %}{% trans username=thread.start_poster_name %}Thread and last post by {{ username }}{% endtrans %}{% endif %}">
+            {% if thread.start_poster_name != thread.last_poster_name %}
+            <li class="thread-author tooltip-top" title="{% trans username=thread.start_poster_name %}Thread by {{ username }}{% endtrans %}">
               {% if thread.start_poster_id %}
               <a href="{{ url('user', user=thread.start_poster_id, username=thread.start_poster_name) }}">{% if settings.avatars_on_threads_list %}<img src="{{ thread.start_poster.get_avatar(18) }}" alt="{{ thread.start_poster_name }}" class="user-avatar">{% else %}{{ thread.start_poster_name }}{% endif %}</a>
               {% else %}
               {% if settings.avatars_on_threads_list %}<img src="{{ macros.avatar_guest(24) }}" alt="{{ thread.start_poster_name }}" class="user-avatar">{% else %}{{ thread.start_poster_name }}{% endif %}
               {% endif %}
             </li>
-            {% if thread.start_poster_name != thread.last_poster_name %}
-            <li class="thread-poster tooltip-top" title="{% trans username=thread.last_poster_name %}Last reply by {{ username }}{% endtrans %}">
+            {% endif %}
+            <li class="thread-poster tooltip-top" title="{% if thread.start_poster_name != thread.last_poster_name %}{% trans username=thread.last_poster_name %}Last reply by {{ username }}{% endtrans %}{% else %}{% trans username=thread.last_poster_name %}Thread and last post by {{ username }}{% endtrans %}{% endif %}">
               {% if thread.last_poster_id %}
               <a href="{{ url('user', user=thread.last_poster_id, username=thread.last_poster_name) }}">{% if settings.avatars_on_threads_list %}<img src="{{ thread.last_poster.get_avatar(18) }}" alt="{{ thread.last_poster_name }}" class="user-avatar">{% else %}{{ thread.last_poster_name }}{% endif %}</a>
               {% else %}
               {% if settings.avatars_on_threads_list %}<img src="{{ macros.avatar_guest(24) }}" alt="{{ thread.last_poster_name }}" class="user-avatar">{% else %}{{ thread.last_poster_name }}{% endif %}
               {% endif %}
             </li>
-            {% endif %}
             {% if thread.moderated %}
             <li class="thread-flag thread-moderated tooltip-top" title="{% trans %}This thread awaits review{% endtrans %}">
               <i class="icon-remove-circle"></i>