Improve styles for mobile

This commit is contained in:
Kieran 2022-09-16 22:01:51 +01:00
parent 3c037d2d49
commit f010fed810
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
12 changed files with 36 additions and 21 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@ -1,16 +1,13 @@
{ {
"short_name": "void.cat", "short_name": "void.cat",
"name": "void.cat", "name": "void.cat",
"id": "/",
"description": "Void.cat file hosting",
"icons": [ "icons": [
{ {
"src": "favicon.ico", "src": "voidcat_512.png",
"sizes": "64x64",
"type": "image/x-icon"
},
{
"src": "logo.png",
"type": "image/png", "type": "image/png",
"sizes": "64x64" "sizes": "512x512"
} }
], ],
"start_url": ".", "start_url": ".",

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 KiB

View File

@ -1,12 +1,11 @@
.page { .page {
width: 720px; width: 900px;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
@media (max-width: 720px) { @media (max-width: 900px) {
.page { .page {
width: 100vw; width: 100vw;
white-space: nowrap;
} }
} }

View File

@ -1,8 +1,15 @@
.file-edit { .file-edit {
text-align: start; text-align: start;
margin: 0 10px;
} }
.file-edit svg { .file-edit svg {
vertical-align: middle; vertical-align: middle;
margin-left: 10px; margin-left: 10px;
} }
@media (max-width: 720px) {
.file-edit {
flex-direction: column;
}
}

View File

@ -8,7 +8,7 @@
text-align: center; text-align: center;
user-select: none; user-select: none;
cursor: pointer; cursor: pointer;
height: 200px; height: 250px;
font-size: x-large; font-size: x-large;
} }
@ -16,9 +16,3 @@
display: block; display: block;
font-size: x-small; font-size: x-small;
} }
@media (max-width: 720px) {
.drop {
width: 100%;
}
}

View File

@ -6,6 +6,12 @@
margin-top: 10px; margin-top: 10px;
} }
@media (max-width: 720px) {
.upload {
flex-direction: column;
}
}
.upload .info { .upload .info {
flex: 2; flex: 2;
} }

View File

@ -3,6 +3,7 @@
grid-auto-flow: column; grid-auto-flow: column;
margin: 0 30px; margin: 0 30px;
line-height: 32px; line-height: 32px;
text-align: center;
} }
.stats svg { .stats svg {
@ -13,9 +14,9 @@
.stats > div { .stats > div {
} }
@media (max-width: 720px) { @media (max-width: 900px) {
.stats { .stats {
margin: 0 10px; margin: 0 5px;
font-size: 14px; font-size: 14px;
} }

View File

@ -10,3 +10,7 @@
line-height: 2; line-height: 2;
flex-grow: 1; flex-grow: 1;
} }
.header img.logo {
height: 80px;
}

View File

@ -1,10 +1,13 @@
import "./Header.css"; import "./Header.css";
import VoidCat from "../../image/voidcat.png";
import {useEffect} from "react";
import {Link} from "react-router-dom"; import {Link} from "react-router-dom";
import {useDispatch, useSelector} from "react-redux"; import {useDispatch, useSelector} from "react-redux";
import {InlineProfile} from "./InlineProfile"; import {InlineProfile} from "./InlineProfile";
import {useApi} from "./Api"; import {useApi} from "./Api";
import {logout, setAuth, setProfile} from "../../LoginState"; import {logout, setAuth, setProfile} from "../../LoginState";
import {useEffect} from "react";
import {setInfo} from "../../SiteInfoStore"; import {setInfo} from "../../SiteInfoStore";
export function Header() { export function Header() {
@ -42,8 +45,12 @@ export function Header() {
return ( return (
<div className="header page"> <div className="header page">
<img src={VoidCat} alt="logo" className="logo"/>
<div className="title"> <div className="title">
<Link to="/">{window.location.hostname}</Link> <Link to="/">
{window.location.hostname}
</Link>
</div> </div>
{profile ? {profile ?
<InlineProfile profile={profile} options={{ <InlineProfile profile={profile} options={{

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB