nextcloud / weather

⛅️ Weather app for Nextcloud
GNU Affero General Public License v3.0
46 stars 27 forks source link

Smartphone view #34

Open ionl opened 7 years ago

ionl commented 7 years ago

Is it possible to hide left bar (with city list) ? On smartphone (Nexus 5, 5") with Firefox, I can't see main all view with city, temperature, humidity etc. and I can't see at all array hours list predictions. Thank you https://cloud.ionl.fr/index.php/s/EL8BL9zuvo1MKi2

berdosi commented 4 years ago

Adding some media queries, may help here - the below CSS moves the city list to the bottom, hides the last columns of the forecast table, and pushes the forecast panels around a bit. I like the way it looks.

@media screen and (orientation: portrait) and (max-width: 12cm) and (min-height: 10cm) {
    #app-container {
        display: flex;
        flex-direction: column;
        height: calc(100vh - 50px);
    }
    #city-list-left {
        order: 2;
        width: 100%;
        flex: min-content;
    }
    #city-list-left ul.city-list {
        flex-direction: row;
        display: flex;
        flex-wrap: wrap;
    }
    #city-list-left ul.city-list li {
        flex: min-content;
        min-width: 50%;
    }
    #city-list-left ul.city-list li:last-child {
        flex: auto;
    }
    #city-right {
        display: flex;
        flex-direction: column;
        padding: 0;
    }
    #city-right tr td:nth-of-type(n+4), th:nth-of-type(n+4) {
        display: none;
    }
}

Screen Shot 2019-12-24 at 22 12 32

e-alfred commented 4 years ago

@berdosi It looks nice on your screenshot, but I cannot get it to open the weather forecast using your code block:

image

berdosi commented 4 years ago

My bad, I was testing it on the wrong branch with different element IDs. Replacing #app-container with #app in the second line solves the issue.

e-alfred commented 4 years ago

@berdosi I like the view, but the city selection is taking up too much space (should be scrollable too) especially on small devices and/or if there is a long list of towns:

image

Also, the Tablet view is not ideal at the moment:

image

FadeFx commented 4 years ago

@berdosi @e-alfred why not just hide the left pannel and unhide it using a burger button? Id say its not necessarry to permanently see the cities list... this would also solve the space problem with list length