]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/vier/theme.php
aside bar as menu in mobile
[friendica.git] / view / theme / vier / theme.php
index df28c0689eba5c78abeb9e8fb2670fab5fc9396f..f7b52dc35c8bd685a70e25989ce2d7628c283e72 100644 (file)
@@ -26,11 +26,17 @@ function vier_init(&$a) {
        if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()) {
                vier_community_info();
 
-               $a->page['htmlhead'] .= "<link rel='stylesheet' media='screen and (min-width: 1300px)' href='view/theme/vier/wide.css' />";
+               $a->page['htmlhead'] .= "<link rel='stylesheet' type='text/css' href='view/theme/vier/wide.css' media='screen and (min-width: 1300px)'/>\n";
        }
 
+       if ($a->is_mobile || $a->is_tablet) {
+               $a->page['htmlhead'] .= '<meta name=viewport content="width=device-width, initial-scale=1">'."\n";
+               $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="view/theme/vier/mobile.css" media="screen"/>'."\n";
+       }
+               $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="view/theme/vier/mobile.css" media="screen and (max-width: 1000px)"/>'."\n";
+
 $a->page['htmlhead'] .= <<< EOT
-<link rel='stylesheet' media='screen and (max-width: 1100px)' href='view/theme/vier/narrow.css' />
+<link rel='stylesheet' type='text/css' href='view/theme/vier/narrow.css' media='screen and (max-width: 1100px)' />
 <script type="text/javascript">
 
 function insertFormatting(comment,BBcode,id) {
@@ -80,11 +86,20 @@ function cmtBbOpen(id) {
 function cmtBbClose(id) {
        $("#comment-edit-bb-" + id).hide();
 }
+
+$(document).ready(function() {
+       $(".mobile-aside-toggle a").click(function(e){
+               e.preventDefault();
+               $("aside").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", "probe", "webfinger", "login")))
+       if (($a->page['aside'] == "") AND in_array($a->argv[0], array("community", "events", "help", "manage", "notifications",
+                                                                       "probe", "webfinger", "login", "invite", "credits")))
                $a->page['htmlhead'] .= "<link rel='stylesheet' href='view/theme/vier/hide.css' />";
 }
 
@@ -130,8 +145,9 @@ function vier_community_info() {
                        foreach($r as $rr) {
                                $entry = replace_macros($tpl,array(
                                        '$id' => $rr['id'],
-                                       '$profile_link' => zrl($rr['url']),
-                                       '$photo' => proxy_url($rr['photo']),
+                                       //'$profile_link' => zrl($rr['url']),
+                                       '$profile_link' => $a->get_baseurl().'/follow/?url='.urlencode($rr['url']),
+                                       '$photo' => proxy_url($rr['photo'], false, PROXY_SIZE_MICRO),
                                        '$alt_text' => $rr['name'],
                                ));
                                $aside['$comunity_profiles_items'][] = $entry;
@@ -193,7 +209,7 @@ function vier_community_info() {
                $pagelist = array();
 
                $contacts = q("SELECT `id`, `url`, `name`, `micro` FROM `contact`
-                               WHERE `network`= '%s' AND `forum` AND `uid` = %d AND
+                               WHERE `network`= '%s' AND `uid` = %d AND (`forum` OR `prv`) AND
                                        NOT `hidden` AND NOT `blocked` AND
                                        NOT `archive` AND NOT `pending` AND
                                        `success_update` > `failure_update`
@@ -291,6 +307,9 @@ function vier_community_info() {
                if (nodeinfo_plugin_enabled("fbpost"))
                        $r[] = array("photo" => "images/facebook.png", "name" => "Facebook");
 
+               if (nodeinfo_plugin_enabled("ifttt"))
+                       $r[] = array("photo" => "addon/ifttt/ifttt.png", "name" => "IFTTT");
+
                if (nodeinfo_plugin_enabled("statusnet"))
                        $r[] = array("photo" => "images/gnusocial.png", "name" => "GNU Social");