Просмотр исходного кода

Gave some love to threads list.

Rafał Pitoń 10 лет назад
Родитель
Сommit
8b2b6a201d

+ 35 - 31
misago/static/misago/css/misago/threadslists.less

@@ -41,48 +41,48 @@
         }
 
 
-        // Thread flags
+        // Thread last reply
         //
         //==
-        .thread-flags {
-          float: right;
-          position: relative;
-          top: 3px;
+        .thread-stats {
+          &>* {
+            float: right;
+          }
 
-          li {
-            float: left;
-            overflow: visible;
+          .thread-flags {
+            margin-right: @font-size-large;
+            position: relative;
+            top: 3px;
 
-            .label {
-              border-radius: @border-radius-small;
+            li {
+              float: left;
+              overflow: visible;
 
-              font-weight: normal;
-            }
+              .label {
+                border-radius: @border-radius-small;
+
+                font-weight: normal;
+              }
 
-            .fa, .glyphicon {
-              .opacity(0.5);
-              transition-duration: 0.5s;
+              .fa, .glyphicon {
+                .opacity(0.5);
+                transition-duration: 0.5s;
 
-              &:hover, &:focus {
-                .opacity(0.9);
-                transition-duration: 0.05s;
+                &:hover, &:focus {
+                  .opacity(0.9);
+                  transition-duration: 0.05s;
+                }
               }
             }
           }
-        }
-
 
-        // Thread last reply
-        //
-        //==
-        .thread-stats {
           .thread-replies {
             display: inline-block;
-            margin: -3px 0px;
-            margin-right: @font-size-large / 3;
+            margin: 0px;
+            margin-right: @font-size-large;
             .opacity(0.5);
             transition-duration: 0.5s;
-            width: 20%;
+            width: @font-size-large * 3;
 
             font-size: @font-size-large;
 
@@ -101,14 +101,14 @@
           }
 
           .thread-author {
-            margin-right: @font-size-large / 3;
+            margin-right: @font-size-large / 2;
 
             img {
               border-radius: @border-radius-small;
               width: 25px;
               margin: -3px 0px;
               position: relative;
-              bottom: 3px;
+              top: 1px;
             }
 
             &:hover {
@@ -116,9 +116,13 @@
             }
           }
 
-          a.time-ago {
+          a.last-post {
+            display: block;
+            width: 50px;
+            position: relative;
+            top: 3px;
+
             color: @state-default;
-            font-size: @font-size-large;
 
             &:hover {
               color: @state-hover;

+ 25 - 24
misago/templates/misago/threads/base.html

@@ -37,6 +37,31 @@
                 {{ thread.title }}
               </a>
 
+            </div>
+            {% block thread-extra %}
+            <div class="col-md-4 thread-stats">
+              {% block thread-stats %}
+              <a href="#" class="last-post">
+                <span class="dynamic time-ago-compact tooltip-top" data-timestamp="{{ thread.last_post_on|date:"c" }}" title="{% blocktrans with last_post=thread.last_post_on|date:"DATETIME_FORMAT" %}Last post from {{ last_post }}{% endblocktrans %}">{{ thread.last_post_on|compact_date|lower }}</span>
+              </a>
+
+              {% if thread.last_poster_id %}
+              <a href="{% url USER_PROFILE_URL user_slug=thread.last_poster_slug user_id=thread.last_poster_id %}" class="thread-author tooltip-top" title="{% blocktrans with user=thread.last_poster_name %}Last post by {{ user }}{% endblocktrans %}">
+                <img src="{{ thread.last_poster_id|avatar:25 }}" alt="{% trans "Avatar" %}" class="avatar">
+              </a>
+              {% else %}
+              <span class="thread-author tooltip-top" title="{% blocktrans with user=thread.last_poster_name %}Last post by {{ user }}{% endblocktrans %}">
+                <img src="{% blankavatar 25 %}" alt="{% trans "Avatar" %}" class="avatar">
+              </span>
+              {% endif %}
+
+              <div class="thread-replies">
+                <div class="tooltip-top" title="{% blocktrans trimmed with replies=thread.replies|intcomma count counter=thread.replies %}{{ replies }} reply{% plural %}{{ replies }} replies{% endblocktrans %}">
+                  <span class="glyphicon glyphicon-comment"></span>
+                  {{ thread.replies|intcomma }}
+                </div>
+              </div>
+
               <ul class="list-unstyled thread-flags">
                 {% if thread.prefix %}
                 <li>
@@ -71,30 +96,6 @@
                 </li>
                 {% endif %}
               </ul>
-            </div>
-            {% block thread-extra %}
-            <div class="col-md-4 thread-stats">
-              {% block thread-stats %}
-              <div class="thread-replies">
-                <div class="tooltip-top" title="{% blocktrans trimmed with replies=thread.replies|intcomma count counter=thread.replies %}{{ replies }} reply{% plural %}{{ replies }} replies{% endblocktrans %}">
-                  <span class="glyphicon glyphicon-comment"></span>
-                  {{ thread.replies|intcomma }}
-                </div>
-              </div>
-
-              {% if thread.last_poster_id %}
-              <a href="{% url USER_PROFILE_URL user_slug=thread.last_poster_slug user_id=thread.last_poster_id %}" class="thread-author tooltip-top" title="{% blocktrans with user=thread.last_poster_name %}Last post by {{ user }}{% endblocktrans %}">
-                <img src="{{ thread.last_poster_id|avatar:25 }}" alt="{% trans "Avatar" %}" class="avatar">
-              </a>
-              {% else %}
-              <span class="thread-author tooltip-top" title="{% blocktrans with user=thread.last_poster_name %}Last post by {{ user }}{% endblocktrans %}">
-                <img src="{% blankavatar 25 %}" alt="{% trans "Avatar" %}" class="avatar">
-              </span>
-              {% endif %}
-
-              <a href="#" class="dynamic time-ago-compact tooltip-top" data-timestamp="{{ thread.last_post_on|date:"c" }}" title="{% blocktrans with last_post=thread.last_post_on|date %}Last post from {{ last_post }}{% endblocktrans %}">
-                {{ thread.last_post_on|compact_date|lower }}
-              </a>
               {% endblock thread-stats %}
             </div>
             {% endblock thread-extra %}