Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smartphone view #34

Open
ionl opened this issue May 15, 2017 · 5 comments
Open

Smartphone view #34

ionl opened this issue May 15, 2017 · 5 comments

Comments

@ionl
Copy link

ionl commented May 15, 2017

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
Copy link
Contributor

berdosi commented Dec 24, 2019

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
Copy link
Collaborator

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

image

@berdosi
Copy link
Contributor

berdosi commented Dec 25, 2019

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
Copy link
Collaborator

e-alfred commented Jan 2, 2020

@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
Copy link

FadeFx commented Jul 25, 2020

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants