This repository has been archived on 2024-06-02. You can view files and clone it, but cannot push or open issues or pull requests.
gts-web-standalone/assets/dist/profile.css

283 lines
6.1 KiB
CSS
Raw Permalink Normal View History

2023-12-27 16:15:25 +01:00
/*
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; /* fallback for lack of min() support */
grid-template-columns: 1fr min(92%, 65rem) 1fr;
}
.profile {
padding: 0.5rem;
border-radius: var(--br);
}
.profile .column-split {
display: flex;
flex-wrap: wrap;
gap: 1rem;
}
.profile .header {
background: var(--profile-bg);
border-radius: var(--br);
overflow: hidden;
margin-bottom: 1rem;
}
.profile .header .header-image {
position: relative;
padding-top: 33.33%;
}
/* aspect-ratio 1/3 */
.profile .header .header-image img {
position: absolute;
top: 0;
left: 0;
right: 0;
width: 100%;
height: 100%;
-o-object-fit: cover;
object-fit: cover;
}
.profile .header {
--avatar-size: 8.5rem;
--name-size: 3rem;
--username-size: 2rem;
--overlap: calc(var(--avatar-size) - var(--name-size) - var(--username-size));
}
/*
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
*/
.profile .header .basic-info {
position: relative;
display: grid;
box-sizing: border-box;
grid-template-columns: var(--avatar-size) auto 1fr;
grid-template-rows: var(--overlap) var(--name-size) auto;
grid-template-areas:
" avatar . . . "
" avatar displayname displayname stats "
" avatar username role stats ";
margin: 1rem;
margin-top: calc(-1 * var(--overlap));
gap: 0 1rem;
}
.profile .header .basic-info .avatar {
grid-area: avatar;
height: var(--avatar-size);
width: var(--avatar-size);
border: 0.2rem solid var(--avatar-border);
border-radius: var(--br);
overflow: hidden;
}
/* prevents image extending beyond rounded borders */
.profile .header .basic-info .avatar img {
height: 100%;
width: 100%;
-o-object-fit: cover;
object-fit: cover;
}
.profile .header .basic-info .displayname {
grid-area: displayname;
line-height: var(--name-size);
font-size: 1.5rem;
font-weight: bold;
}
.profile .header .basic-info .username {
min-width: 0;
grid-area: username;
line-height: var(--username-size);
font-size: 1rem;
font-weight: bold;
color: var(--fg-accent);
-webkit-user-select: all;
user-select: all;
}
.profile .header .basic-info .role {
background: var(--bg);
color: var(--fg);
border: 0.1rem solid var(--bg);
grid-area: role;
align-self: center;
justify-self: start;
border-radius: var(--br);
padding: 0.25rem 0.5rem 0.35rem 0.5rem;
line-height: 0.75rem;
font-size: 0.75rem;
font-variant: small-caps;
}
.profile .header .basic-info .role.admin {
color: var(--role-admin);
border-color: var(--role-admin);
}
.profile .header .basic-info .role.moderator {
color: var(--role-mod);
border-color: var(--role-mod);
}
@media screen and (max-width: 750px) {
.profile .header .basic-info {
grid-template-columns: auto 1fr;
grid-template-rows: var(--avatar-size) var(--name-size) auto;
grid-template-areas:
" avatar avatar "
" displayname displayname "
" username role "
" stats stats ";
}
.profile .header .basic-info .displayname {
font-size: 1.4rem;
}
}
.profile .col-header h1, .profile .col-header h2 {
font-size: 1.2rem;
line-height: 1.3rem;
margin: 0;
}
.profile .toots {
flex: 65 25rem;
display: flex;
flex-direction: column;
gap: 0.4rem;
}
.profile .toots .col-header {
display: grid;
grid-template-columns: auto 1fr;
gap: 1rem;
}
.profile .toots .col-header a {
justify-self: end;
}
.profile .rss-icon .fa {
font-size: 2rem;
-o-object-fit: contain;
object-fit: contain;
vertical-align: middle;
color: var(--orange2);
/* can't size a single-color background, so we use a linear-gradient that's effectively white */
background: linear-gradient(to right, var(--white1) 100%, transparent 0) no-repeat center center;
background-size: 1.2rem 1.4rem;
}
.profile .toots .toot {
border-radius: var(--br);
}
.toot .info {
flex-direction: row;
gap: 1rem;
}
.profile .toots .backnextlinks {
display: flex;
justify-content: space-between;
}
.profile .toots .backnextlinks .next {
margin-left: auto;
}
.profile .about-user {
overflow: hidden;
display: flex;
flex-direction: column;
gap: 1rem;
}
.profile .about-user > * {
border-radius: var(--br);
}
.profile .about-user .col-header {
margin-bottom: -0.25rem;
}
.profile .about-user .fields {
background: var(--profile-bg);
display: grid;
grid-template-columns: auto auto;
padding: 0.5rem;
}
.profile .about-user .fields > * {
padding: 0.5rem;
}
.profile .about-user .fields > b {
align-self: center;
justify-self: flex-end;
}
.profile .about-user .fields > span {
}
.profile .about-user .fields > span + b {
border-top: 0.1rem solid var(--gray2);
}
.profile .about-user .bio {
background: var(--profile-bg);
padding: 1rem;
}
.profile .accountstats {
grid-area: stats;
display: grid;
grid-auto-flow: column;
grid-template: repeat(2, 1fr) / repeat(4, auto);
gap: 0 1rem;
align-self: center;
}
.profile .accountstats > * {
padding: 0.5rem;
justify-self: center;
}
.profile .accountstats > *,
.profile .accountstats > * > * {
justify-content: center;
text-align: center;
display: flex;
gap: 0.25rem;
line-height: 20px;
}
.profile .accountstats > b {
border-bottom: 0.1rem solid var(--gray2);
}