Fixed #10 Added a mobile friendly design

This commit is contained in:
aymm 2021-05-09 20:51:05 +02:00
parent d2b0637ccb
commit 87c401e3a8
Signed by: phlaym
GPG Key ID: A06651BAB6777237
2 changed files with 48 additions and 1 deletions

View File

@ -23,7 +23,7 @@ function get_page_header(
$user_avatar_url = $u->getAvatarUrl(30);
$user_avatar_url_srcset = get_source_set($u, 30);
$avatar = '<img src="' . $user_avatar_url . '" class="avatar" srcset="' . $user_avatar_url_srcset . '"/>';
$greeting = $avatar . 'Welcome, ' . ($u->name ?? '@'.$u->username);
$greeting = $avatar . '<span class="greeting">Welcome, ' . ($u->name ?? '@'.$u->username) . '</span>';
$logout_link = '<a href="logout.php" class="logout">Logout</a>';
} else {
$newpoll_class = 'disabled';

View File

@ -113,6 +113,17 @@ header .avatar {
margin-right: 4px;
}
@media (max-width: 450px) {
.linklabel {
display: none;
}
}
@media (max-width: 380px) {
.greeting {
display: none;
}
}
/* Polls */
.poll {
display: inline-block;
@ -270,6 +281,42 @@ datewrapper time {
color: var(--main-text-color);
}
@media (max-width: 800px) {
#prompt {
grid-row: 2;
}
label[for=prompt] {
grid-row: 2;
}
.create-poll label[for=options] {
grid-row: 3;
}
.create-poll #options {
grid-row: 3;
}
.create-poll label[for=anonymous] {
grid-row: 4
}
.create-poll label[for=public] {
grid-row: 5
}
.create-poll label[for=max_options] {
grid-row: 6
}
.create-poll label[for=duration] {
grid-row: 7
}
#duration {
grid-row: 7;
}
.create-poll button[type=submit] {
grid-row: 8;
}
.create-poll .error {
grid-row: 1;
}
}
/* Footer */
footer {
display: flex;