Commits

Gregory Petukhov  committed eac59d1

Read indicator

  • Participants
  • Parent commits 87cbf1a

Comments (0)

Files changed (3)

File pybb_skin_firstday/static/pybb_skin_firstday/css/style.css

 body {
     text-align: center;
-    background-color: white;
     font-family: "MS Trebuchet", Verdana, Arial, sans-serif;
     font-size: 75%;
     color: #333;
 }
 
 td.first {
-    padding-left: 0.5em;
+    width: 2em;
+    vertical-align: top;
 }
 
 th.first {
 .box {
     width: 100%;
     margin-bottom: 2em;
+}
+
+.box tbody {
     background-color: white;
 }
 
     margin-top: -1em;
 }
 
+.indicator {
+    height: 0.8em;
+    width: 0.8em;
+    position: relative;
+    top: 0.4em;
+    left: 0.7em;
+}
+
+.unread-indicator {
+    background-color: rgb(177, 215, 123);
+}
+
 /* Clearfix Method for clearing the floats */
 .clearfix:after {
    content: "."; 

File pybb_skin_firstday/templates/pybb/forum.html

         {% for topic in page.object_list %}
         {% with topic|pybb_topic_unread:user as new %}
         <tr>
-            <td class="first"></td>
+            <td class="first">
+                <div class="indicator {% if topic|pybb_topic_unread:user %}unread-indicator{% endif %}"></div>
+            </td>
             <td class="main">
                 <div class="title">
                     <a href="{% url pybb_topic topic.pk %}">{{ topic }}</a>

File pybb_skin_firstday/templates/pybb/forum_row.html

 {% load pybb_tags i18n %}
 <tr>
-    <td class="first"></td>
+    <td class="first">
+        <div class="indicator {% if forum|pybb_forum_unread:user %}unread-indicator{% endif %}"></div>
+
+    </td>
     <td class="main">
         <div class="title"><a href="{{ forum.get_absolute_url }}">{{ forum }}</a></div>
         <div class="description">{{ forum.description|safe }}</div>