diff --git a/www/assets/css/tablet.css b/www/assets/css/tablet.css index b005b98..51fa052 100644 --- a/www/assets/css/tablet.css +++ b/www/assets/css/tablet.css @@ -19,19 +19,20 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. .no-tablet { display: none; } +/* .page.tabbed .tabbar { - /* Remove tab switcher at bottom of page */ + Remove tab switcher at bottom of page display: none; height: 0; } .page.tabbed .tabs { - /* Put tabs next to each other */ + Put tabs next to each other display: flex; } .page.tabbed .tabs .tab { - /* un-hide "non-active" tabs */ + un-hide "non-active" tabs display: block; - /* Make FABs stay where they should */ + Make FABs stay where they should position: relative; } .page.tabbed .tabs .tab.tab-67 { @@ -43,33 +44,33 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. .page.tabbed .page-content { padding-top: 0; padding-bottom: 0; - } + }*/ .elevation-tablet { /* .elevation-3 */ box-shadow: var(--f7-elevation-3)!important; } - +/* .page.tabbed .tabs .tab:not(:first-child) { - /*box-shadow: inset 5px 0 9px -5px rgba(0,0,0,0.3);*/ + box-shadow: inset 5px 0 9px -5px rgba(0,0,0,0.3); border-left: 1px solid rgba(0,0,0,0.1); - } - + }*/ +/* .page.tabbed .fab { margin-bottom: 0; } .sheet-backdrop.backdrop-in { visibility: hidden; - } + }*/ .padding-bottom-tablet { padding-bottom: 3rem !important; } - +/* #mapbox { height: calc(100% - var(--f7-navbar-height)); - } + }*/ } @media all and (min-width: 768px) and (min-height: 700px) { diff --git a/www/assets/js/main.js b/www/assets/js/main.js index 142dc65..a9dc224 100644 --- a/www/assets/js/main.js +++ b/www/assets/js/main.js @@ -12,7 +12,7 @@ var app = new Framework7({ root: "#app", name: "Lecte", id: "vote.lecte.Lecte", - theme: "md", + theme: "ios", card: { swipeToClose: false }, @@ -159,4 +159,4 @@ function setAnimations(enabled) { applyColorTheme(); setAnimations(); -router.navigate("/discover"); \ No newline at end of file +router.navigate("/ranking"); \ No newline at end of file diff --git a/www/assets/js/maptab.js b/www/assets/js/maptab.js new file mode 100644 index 0000000..731f535 --- /dev/null +++ b/www/assets/js/maptab.js @@ -0,0 +1,27 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +function setTabSwipable() { + var page = $(".page[data-name=discover]"); + + // If the page has grown larger, refresh to disable swiping tabs + if (page.width() >= 768 && $(".tabs-swipeable-wrap")[0]) { + router.refreshPage(); + } else if (page.width() < 768 && !$(".tabs-swipeable-wrap")[0]) { + router.refreshPage(); + } +} + +$(window).on('resize', setTabSwipable); + +setTabSwipable(); + +// Adjust the map when opening its tab +$(".view-main").on("click", ".tab-link#map-tab-link", function () { + var center = map.getCenter(); + map.resize(); + map.setCenter(center); +}); \ No newline at end of file diff --git a/www/index.html b/www/index.html index 39efbc1..f81d917 100644 --- a/www/index.html +++ b/www/index.html @@ -15,6 +15,7 @@ + @@ -24,9 +25,7 @@