]> git.mxchange.org Git - friendica.git/commitdiff
vier mobile: prefixed transition in css, mobile-related javascript only on mobile
authorfabrixxm <fabrix.xm@gmail.com>
Thu, 12 Nov 2015 08:30:54 +0000 (09:30 +0100)
committerfabrixxm <fabrix.xm@gmail.com>
Thu, 12 Nov 2015 08:41:04 +0000 (09:41 +0100)
view/theme/vier/mobile.css
view/theme/vier/theme.php

index 16e4419a2d41cd2504a960bf09ad80970f97ed14..d06cb410117586432e546c3d1f6494390e7e2e2e 100644 (file)
@@ -108,6 +108,9 @@ aside {
        max-width: 400px;
        width: 80%;
        left: -100%;
+       -webkit-transition: left 0.5s;
+       -moz-transition: left 0.5s;
+       -o-transition: left 0.5s;
        transition: left 0.5s;
 }
 
index 8bd4f5916d4a8378eb1a6e8d88ecf5c4dc6bf4ee..87f41ae15b0247dbe8180c84b5e5fe4a71718eee 100644 (file)
@@ -87,18 +87,28 @@ function cmtBbClose(id) {
        $("#comment-edit-bb-" + id).hide();
 }
 
-$(document).ready(function() {
-       $(".mobile-aside-toggle a").click(function(e){
-               e.preventDefault();
-               $("aside").toggleClass("show");
-       });
-       $(".tabs").click(function(e){
-               $(this).toggleClass("show");
-       });
-});
 
+
+</script>
+EOT;
+
+
+if ($a->is_mobile || $a->is_tablet){
+       $a->page['htmlhead'] .= <<< EOT
+<script>
+       $(document).ready(function() {
+               $(".mobile-aside-toggle a").click(function(e){
+                       e.preventDefault();
+                       $("aside").toggleClass("show");
+               });
+               $(".tabs").click(function(e){
+                       $(this).toggleClass("show");
+               });
+       });
 </script>
 EOT;
+}
+
 
        // Hide the left menu bar
        if (($a->page['aside'] == "") AND in_array($a->argv[0], array("community", "events", "help", "manage", "notifications",