MDL-42711 theme port from LM: forum layout on small screen devices
authorDavid Mudrák <david@moodle.com>
Wed, 13 Nov 2013 00:48:05 +0000 (01:48 +0100)
committerDavid Mudrák <david@moodle.com>
Wed, 13 Nov 2013 00:48:05 +0000 (01:48 +0100)
This is a backport of MDLSITE-2445.  Wrapping the 'Started by' and 'Last post'
texts helps. On smaller device, these two get smaller font too. This is far
from optimal but better than the current (default) behaviour.

theme/bootstrapbase/less/moodle/modules.less

index e8fa26a..0a1e1c1 100644 (file)
@@ -9,11 +9,51 @@ select {
     width: auto;
 }
 
+// Forum
+
 .path-mod-forum .forumheaderlist,
 .path-mod-forum .forumheaderlist td {
     border: none;
 }
 
+.path-mod-forum .forumheaderlist {
+    thead .header {
+        white-space: normal;
+        vertical-align: top;
+    }
+    thead .header.lastpost {
+        text-align: right;
+    }
+    .discussion {
+        .author, .replies, .lastpost {
+            white-space: normal;
+        }
+        .replies {
+            text-align: center;
+        }
+        .topic, .topic.starter, .picture, .author, .replies, .lastpost {
+            vertical-align: top;
+        }
+    }
+}
+
+@media (max-width: 979px) {
+    .path-mod-forum .forumheaderlist {
+        thead .header {
+            font-weight: normal;
+            font-size: round(@fontSizeSmall);
+        }
+        .discussion {
+            .author, .replies, .lastpost {
+                font-size: round(@fontSizeSmall);
+            }
+            .replies .unread a {
+                padding: 0;
+            }
+        }
+    }
+}
+
 .forumpost {
     .well;
     padding: 6px;