From e5edd7b7db2b2953d2f1a31b5bd2d4623fb6a4c8 Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Wed, 11 Nov 2015 18:39:32 +0100 Subject: [PATCH 1/4] mobile friendly tabs --- view/theme/vier/mobile.css | 25 +++++++++++++++++++++++++ view/theme/vier/theme.php | 5 ++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/view/theme/vier/mobile.css b/view/theme/vier/mobile.css index 1d65e53a7..3defddac3 100644 --- a/view/theme/vier/mobile.css +++ b/view/theme/vier/mobile.css @@ -115,3 +115,28 @@ aside { aside.show { left: 0; } + +/* tabs */ +.tabs { position: relative; height: 25px!important; } +.tabs li { width: 100%; } +.tabs .tab { display: none;} +.tabs .tab.active { display: block; } +.tabs::after { + content: " "; + display: block; + position: absolute; + left: 0; right:0; top: 0; bottom: 0; +} + +.tabs.show { + position: fixed; + z-index: 1000; + left: 10px; + right: 10px; + top: 0px; + bottom: 10px; + height: auto !important; + border: 1px solid #ccc; +} +.tabs.show::after { display: none; } +.tabs.show .tab { display: block; } diff --git a/view/theme/vier/theme.php b/view/theme/vier/theme.php index f7b52dc35..8bd4f5916 100644 --- a/view/theme/vier/theme.php +++ b/view/theme/vier/theme.php @@ -33,7 +33,7 @@ function vier_init(&$a) { $a->page['htmlhead'] .= ''."\n"; $a->page['htmlhead'] .= ''."\n"; } - $a->page['htmlhead'] .= ''."\n"; + #$a->page['htmlhead'] .= ''."\n"; $a->page['htmlhead'] .= <<< EOT @@ -92,6 +92,9 @@ $(document).ready(function() { e.preventDefault(); $("aside").toggleClass("show"); }); + $(".tabs").click(function(e){ + $(this).toggleClass("show"); + }); }); From b3e09b817f41f668174bcf4fc61770e37172fd14 Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Wed, 11 Nov 2015 19:06:35 +0100 Subject: [PATCH 2/4] fix menu icon, add icon to tab --- view/theme/vier/mobile.css | 5 ++++- view/theme/vier/templates/nav.tpl | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/view/theme/vier/mobile.css b/view/theme/vier/mobile.css index 3defddac3..7d14ed5c9 100644 --- a/view/theme/vier/mobile.css +++ b/view/theme/vier/mobile.css @@ -122,10 +122,13 @@ aside.show { .tabs .tab { display: none;} .tabs .tab.active { display: block; } .tabs::after { - content: " "; + font-family: FontAwesome; + text-align: right; + content: "\f13a"; display: block; position: absolute; left: 0; right:0; top: 0; bottom: 0; + padding: 8px 2px 0 0; } .tabs.show { diff --git a/view/theme/vier/templates/nav.tpl b/view/theme/vier/templates/nav.tpl index d6b85447f..77bad9370 100644 --- a/view/theme/vier/templates/nav.tpl +++ b/view/theme/vier/templates/nav.tpl @@ -9,7 +9,7 @@