mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-12-02 16:42:46 +00:00
261 lines
4.6 KiB
CSS
261 lines
4.6 KiB
CSS
/*
|
|
GoToSocial
|
|
Copyright (C) 2021-2023 GoToSocial Authors admin@gotosocial.org
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU Affero General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU Affero General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
.page {
|
|
grid-template-columns: 1fr minmax(auto, 60rem) 1fr;
|
|
grid-template-columns: 1fr min(92%, 65rem) 1fr;
|
|
}
|
|
|
|
main.profile {
|
|
background: $gray2;
|
|
background: transparent;
|
|
padding: 0.5rem;
|
|
border-radius: $br;
|
|
|
|
display: grid;
|
|
grid-template-rows: auto auto;
|
|
grid-template-columns: 35fr 65fr;
|
|
grid-template-areas:
|
|
"header header"
|
|
"about toots";
|
|
|
|
gap: 1rem;
|
|
}
|
|
|
|
main.profile .header {
|
|
grid-area: header;
|
|
|
|
background: $bg-accent;
|
|
border-radius: $br;
|
|
overflow: hidden;
|
|
|
|
.header-image {
|
|
position: relative;
|
|
padding-top: 33.33%; /* aspect-ratio 1/3 */
|
|
|
|
img {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
}
|
|
|
|
/*
|
|
Basic info container has the user's avatar, display- and username, and role
|
|
It's partially overlapped over the header image, by a negative margin-top
|
|
*/
|
|
.basic-info {
|
|
$avatar-size: 8.5rem;
|
|
$name-size: 3rem;
|
|
$username-size: 2rem;
|
|
|
|
$overlap: calc($avatar-size - $name-size - $username-size);
|
|
|
|
position: relative;
|
|
display: grid;
|
|
box-sizing: border-box;
|
|
grid-template-columns: $avatar-size auto 1fr;
|
|
grid-template-rows: $overlap $name-size auto;
|
|
grid-template-areas:
|
|
"avatar . ."
|
|
"avatar displayname displayname"
|
|
"avatar username role";
|
|
|
|
margin: 1rem;
|
|
margin-top: calc(-1 * $overlap);
|
|
gap: 0 1rem;
|
|
|
|
.avatar {
|
|
grid-area: avatar;
|
|
height: $avatar-size;
|
|
width: $avatar-size;
|
|
border: 0.2rem solid $avatar-border;
|
|
border-radius: $br;
|
|
overflow: hidden; /* prevents image extending beyond rounded borders */
|
|
|
|
img {
|
|
height: 100%;
|
|
width: 100%;
|
|
object-fit: cover;
|
|
}
|
|
}
|
|
|
|
.displayname {
|
|
grid-area: displayname;
|
|
line-height: $name-size;
|
|
font-size: 2rem;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.username {
|
|
min-width: 0;
|
|
grid-area: username;
|
|
line-height: $username-size;
|
|
|
|
font-size: 1rem;
|
|
font-weight: bold;
|
|
color: $fg-accent;
|
|
user-select: all;
|
|
}
|
|
|
|
.role {
|
|
grid-area: role;
|
|
align-self: center;
|
|
justify-self: start;
|
|
border: 0.13rem solid $gray1;
|
|
border-radius: $br;
|
|
padding: 0.3rem;
|
|
|
|
line-height: 1.1rem;
|
|
font-size: 0.9rem;
|
|
font-variant: small-caps;
|
|
font-weight: bold;
|
|
|
|
&.admin {
|
|
background: $gray1;
|
|
color: $orange2;
|
|
border-color: $orange2;
|
|
}
|
|
|
|
&.moderator {
|
|
background: $gray1;
|
|
color: $blue2;
|
|
border-color: $blue1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
main.profile {
|
|
.col-header {
|
|
display: flex;
|
|
justify-content: start;
|
|
gap: 2rem;
|
|
align-items: center;
|
|
|
|
margin: 0;
|
|
background: $gray4;
|
|
border-top-left-radius: $br;
|
|
border-top-right-radius: $br;
|
|
padding: 0.75rem;
|
|
|
|
h3 {
|
|
font-size: 1.2rem;
|
|
line-height: 1.3rem;
|
|
margin: 0;
|
|
}
|
|
|
|
&.pinned {
|
|
margin: 0 1rem;
|
|
display: grid;
|
|
grid-template-columns: auto 1fr;
|
|
gap: 1rem;
|
|
|
|
a {
|
|
justify-self: end;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
main.profile .toots {
|
|
grid-area: toots;
|
|
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.4rem;
|
|
|
|
.col-header {
|
|
margin: 0;
|
|
background: $gray4;
|
|
border-top-left-radius: $br;
|
|
border-top-right-radius: $br;
|
|
padding: 0.75rem;
|
|
}
|
|
|
|
.toot {
|
|
padding-top: 0.75rem;
|
|
box-shadow: none;
|
|
border: none;
|
|
|
|
.contentgrid {
|
|
padding: 0 0.75rem;
|
|
}
|
|
|
|
.info {
|
|
padding: 0.3rem 0.75rem;
|
|
}
|
|
|
|
&:first-child {
|
|
border-radius: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
main.profile .about-user {
|
|
grid-area: about;
|
|
border-radius: $br;
|
|
overflow: hidden;
|
|
|
|
.col-header {
|
|
margin-bottom: -0.25rem;
|
|
}
|
|
|
|
.fields {
|
|
background: $gray4;
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding: 0.5rem;
|
|
padding-top: 0.25rem;
|
|
|
|
.field {
|
|
padding: 0.25rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
border-bottom: 0.1rem solid $gray2;
|
|
word-break: break-all;
|
|
|
|
&:first-child {
|
|
border-top: 0.1rem solid $gray2;
|
|
}
|
|
|
|
b {
|
|
color: $fg-accent;
|
|
}
|
|
}
|
|
}
|
|
|
|
.bio {
|
|
background: $gray4;
|
|
padding: 0 0.75rem;
|
|
padding-bottom: 0.75rem;
|
|
}
|
|
|
|
.accountstats {
|
|
background: $bg-accent;
|
|
padding: 0.75rem;
|
|
|
|
display: grid;
|
|
grid-template-columns: auto 1fr;
|
|
gap: 0.25rem 1rem;
|
|
}
|
|
} |