Mobile optimization
authorMarcel Werk <burntime@woltlab.com>
Fri, 16 Aug 2013 10:04:16 +0000 (12:04 +0200)
committerMarcel Werk <burntime@woltlab.com>
Fri, 16 Aug 2013 10:04:16 +0000 (12:04 +0200)
wcfsetup/install/files/lib/system/bbcode/TableBBCode.class.php
wcfsetup/install/files/style/layout.less

index 818eb8f89e8886d4cfad9a2db9575d7f3beac17e..9d83ed8d503bf1fe2d30b8e553d436cb10b1219f 100644 (file)
@@ -75,7 +75,7 @@ class TableBBCode extends AbstractBBCode {
                        // /tr
                        $parsedContent = Regex::compile('\[/tr\](?:\s|<br />)*', Regex::CASE_INSENSITIVE)->replace($parsedContent, '</tr>');
                        
-                       return '<div class="container bbcodeTable"><table class="table"><tbody>'.$parsedContent.'</tbody></table></div>';
+                       return '<div class="container bbcodeTable"><table class="table responsiveTable"><tbody>'.$parsedContent.'</tbody></table></div>';
                }
                else if ($parser->getOutputType() == 'text/simplified-html') {
                        // remove table tags
index 574668929599958419bbecd3fbdcf3353c7a4865..cbfb1af418b41f752138b48a030994b859e686a3 100644 (file)
        }
 }
 
+@media screen and (max-width: 800px) {
+       .responsiveTable {
+               display: block;
+               
+               thread, tbody, th, td, tr {
+                       display: block;
+               }
+               
+               thread tr {
+                       display: none;
+               }
+               
+               tr {
+                       border: 1px solid @wcfContainerBorderColor;
+                       border-top-width: 0;
+                       
+                       &:last-child {
+                               border-bottom-width: 0;
+                       }
+               }
+       }
+}
+
 /* ### definition lists ### */
 dl.statsDataList {
        > dt {