]> git.mxchange.org Git - friendica.git/commitdiff
Vier is now a little bit more mobile ready.
authorMichael Vogel <icarus@dabo.de>
Mon, 2 Nov 2015 22:12:09 +0000 (23:12 +0100)
committerMichael Vogel <icarus@dabo.de>
Mon, 2 Nov 2015 22:12:09 +0000 (23:12 +0100)
view/theme/vier/mobile.css [new file with mode: 0644]
view/theme/vier/theme.php

diff --git a/view/theme/vier/mobile.css b/view/theme/vier/mobile.css
new file mode 100644 (file)
index 0000000..198846e
--- /dev/null
@@ -0,0 +1,51 @@
+aside, header, #nav-events-link, #search-box, #nav-admin-link, #activitiy-by-date-tab, #shared-links-tab {
+  display: none;
+}
+
+.hide-comments-outer {
+  width: calc(100% - 105px);
+}
+
+section {
+  /* left: calc((100% - (784px)) / 2); */
+  left: 0px;
+  width: calc(100% - 20px);
+  max-width: 100%;
+  padding: 10px;
+}
+
+body, section, nav .nav-menu, div.pager, ul.tabs, .wall-item-container .wall-item-ago, .wall-item-network,
+.type-link blockquote, .type-video blockquote {
+  font-size: 16px;
+}
+
+nav {
+  min-width: 480px;
+}
+
+.wall-item-container .wall-item-content {
+/*  margin-left: -70px;
+  padding-top: 25px; */
+}
+
+.wall-item-container .wall-item-content img {
+  max-width: 400px;
+}
+
+nav ul {
+    margin-left: 0px;
+}
+
+.wall-item-container .wall-item-content .type-link img.attachment-image, .type-link img.attachment-image, .type-video img.attachment-image {
+  max-width: 400px;
+}
+
+.wall-item-container.thread_level_2,
+.wall-item-container.thread_level_3,
+.wall-item-container.thread_level_4,
+.wall-item-container.thread_level_5,
+.wall-item-container.thread_level_6,
+.wall-item-container.thread_level_7 {
+  margin-left: 60px;
+  width: calc(100% - 70px);
+}
index 51e1e36f62d5ab93b1b57e5fe4963249e548c40b..7db984e26783a035b1bfd7aa96da90abf18368e4 100644 (file)
@@ -26,10 +26,14 @@ 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' media='screen and (min-width: 1300px)' href='view/theme/vier/wide.css' />\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'] .= <<< EOT
+<link rel='stylesheet' media='(max-width: 1010px)' href='view/theme/vier/mobile.css' />
 <link rel='stylesheet' media='screen and (max-width: 1100px)' href='view/theme/vier/narrow.css' />
 <script type="text/javascript">