summaryrefslogtreecommitdiff
path: root/web/source/css/profile.css
diff options
context:
space:
mode:
Diffstat (limited to 'web/source/css/profile.css')
-rw-r--r--web/source/css/profile.css376
1 files changed, 177 insertions, 199 deletions
diff --git a/web/source/css/profile.css b/web/source/css/profile.css
index 0065f6015..125db3513 100644
--- a/web/source/css/profile.css
+++ b/web/source/css/profile.css
@@ -16,274 +16,252 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-header {
- a img {
- height: 5rem;
- }
-}
-
-main {
- background: transparent;
- padding-top: 0;
+.page {
+ grid-template-columns: 1fr minmax(auto, 60rem) 1fr; /* fallback for lack of min() support */
+ grid-template-columns: 1fr min(92%, 65rem) 1fr;
}
.profile {
- background: $bg-accent;
- display: grid;
- grid-template-columns: 100%;
- gap: 0.5rem;
- margin-bottom: 0.2rem;
- overflow-x: hidden;
- position: relative;
+ padding: 0.5rem;
+ border-radius: $br;
+
+ .column-split {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 1rem;
+ }
+}
+.profile .header {
+ background: $profile-bg;
border-radius: $br;
- box-shadow: $boxshadow;
- border: $boxshadow-border;
+ overflow: hidden;
+ margin-bottom: 1rem;
- .headerimage {
- width: 100%;
- aspect-ratio: 3 / 1;
- max-height: 16rem;
- overflow: hidden;
- box-shadow: $boxshadow;
+ .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;
- border-radius: $br-inner $br-inner 0 0;
}
}
- .basic {
- height: 8.5rem;
- margin-top: -6.5rem;
+ /*
+ 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
+ */
+ $avatar-size: 8.5rem;
+ $name-size: 3rem;
+ $username-size: 2rem;
- display: grid;
- grid-template-columns: 1rem 8.5rem 1fr;
- grid-template-rows: 3rem 3rem 2.5rem;
+ $overlap: calc($avatar-size - $name-size - $username-size);
+ .basic-info {
+ 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 ."
- "filler2 avatar displayname"
- ". avatar username";
+ "avatar . ."
+ "avatar displayname displayname"
+ "avatar username role";
- #profile-basic-filler2 {
- grid-area: filler2;
- background: $bg-trans;
- }
+ margin: 1rem;
+ margin-top: calc(-1 * $overlap);
+ gap: 0 1rem;
.avatar {
- align-self: end;
- box-sizing: border-box;
- height: 8.5rem;
- width: 8.5rem;
grid-area: avatar;
- background: $bg;
+ height: $avatar-size;
+ width: $avatar-size;
border: 0.2rem solid $avatar-border;
- padding: 0;
border-radius: $br;
- position: relative;
+ overflow: hidden; /* prevents image extending beyond rounded borders */
- box-shadow: $boxshadow;
img {
- object-fit: cover;
- border-radius: $br-inner;
- width: 100%;
height: 100%;
+ width: 100%;
+ object-fit: cover;
}
}
- a, div {
- color: inherit;
- text-decoration: none;
- }
-
.displayname {
grid-area: displayname;
+ line-height: $name-size;
+ font-size: 1.5rem;
font-weight: bold;
- font-size: 2rem;
- line-height: 3rem;
- background: $bg-trans;
- word-break: break-all;
- white-space: nowrap;
- text-overflow: ellipsis;
- overflow: hidden;
- max-height: 6rem;
- padding: 0 0.5rem;
}
- .usernamecontainer {
- height: 2.5rem;
- display: grid;
- grid-template-columns: auto 1fr;
+ .username {
+ min-width: 0;
grid-area: username;
- /* justify-content: space-between; */
- padding: 0;
- gap: 0.5rem;
- position: relative;
-
- color: $fg-accent;
- font-weight: bold;
+ line-height: $username-size;
- .username {
- white-space: nowrap;
- text-overflow: ellipsis;
- overflow: hidden;
- user-select: all;
+ font-size: 1rem;
+ font-weight: bold;
+ color: $fg-accent;
+ user-select: all;
+ }
- line-height: 2.5rem;
- padding-left: 0;
- margin-left: 0.5rem;
- }
+ .role {
+ background: $bg;
+ color: $fg;
+ border: 0.13rem solid $bg;
- .role {
- justify-self: start;
- align-self: center;
- line-height: 1.1rem;
- font-size: 0.9rem;
- margin-right: 0.2rem;
- padding: 0.2rem;
- margin-top: 0.1rem;
- padding-top: 0.1rem;
- border: 0.1rem solid $gray1;
- border-radius: $br;
- font-variant: small-caps;
- }
+ grid-area: role;
+ align-self: center;
+ justify-self: start;
+ border-radius: $br;
+ padding: 0.3rem;
+
+ line-height: 1.1rem;
+ font-size: 0.9rem;
+ font-variant: small-caps;
+ font-weight: bold;
- .role.admin {
- background: $gray1;
- color: $orange2;
- border-color: $orange2;
+ &.admin {
+ color: $role-admin;
+ border-color: $role-admin;
}
- .role.moderator {
- background: $gray1;
- color: $blue2;
- border-color: $blue1;
+ &.moderator {
+ color: $role-mod;
+ border-color: $role-mod;
}
}
}
+}
- @media screen and (max-width: 600px) {
- & {
- gap: 0.1rem;
- }
-
- .basic {
- margin-top: calc(-22vw + 1rem);
- height: initial;
- display: flex;
- flex-direction: column;
+@media screen and (max-width: 750px) {
+ .profile .header {
+ .basic-info {
+ grid-template-columns: auto 1fr;
+ grid-template-rows: $avatar-size $name-size auto;
+ grid-template-areas:
+ "avatar avatar"
+ "displayname displayname"
+ "username role";
- #profile-basic-filler2 {
- display: none;
+ .displayname {
+ font-size: 1.4rem;
}
+ }
+ }
+}
- .avatar {
- align-self: flex-start;
- margin-left: 1rem;
- height: 22vw;
- width: 22vw;
- }
+.profile .col-header {
+ display: flex;
+ justify-content: start;
+ gap: 2rem;
+ align-items: center;
+
+ margin: 0;
+ background: $profile-bg;
+ border-top-left-radius: $br;
+ border-top-right-radius: $br;
+ padding: 0.75rem;
+
+ h3 {
+ font-size: 1.2rem;
+ line-height: 1.3rem;
+ margin: 0;
+ }
+}
- .displayname {
- padding-left: 1rem;
- font-size: 1.5rem;
- line-height: 2rem;
- margin-top: 0.5rem;
- align-self: stretch;
- }
+.profile .toots {
+ flex: 65 25rem;
+ display: flex;
+ flex-direction: column;
+ gap: 0.4rem;
- .usernamecontainer {
- padding-left: 1rem;
+ .col-header {
+ display: grid;
+ grid-template-columns: auto 1fr;
+ gap: 1rem;
+
+ a {
+ justify-self: end;
+ }
- .username {
- margin-left: 0;
- }
+ .rss-icon {
+ display: block;
+ margin: -0.25rem 0;
+
+ .fa {
+ font-size: 2rem;
+ object-fit: contain;
+ vertical-align: middle;
+ color: $orange2;
+ /* can't size a single-color background, so we use a linear-gradient that's effectively white */
+ background: linear-gradient(to right, $white1 100%, transparent 0) no-repeat center center;
+ background-size: 1.2rem 1.4rem;
}
}
}
- .detailed {
- display: flex;
- flex-direction: column;
- flex: 1 1 25em;
+ .toot {
+ border-radius: 0;
- h2 {
- margin-top: 0;
+ .info {
+ padding: 0.3rem 0.75rem;
}
- .bio {
- margin-top: 0;
- margin-bottom: 0.5rem;
- margin-left: 1rem;
- margin-right: 1rem;
- word-break: break-word;
-
- a {
- color: $acc1;
- text-decoration: underline;
- }
+ &:last-child {
+ border-bottom-left-radius: $br;
+ border-bottom-right-radius: $br;
}
}
}
-.accountstats {
- display: flex;
- flex-wrap: wrap;
- border-radius: 0 0 $br $br;
- border-top: 0.1rem solid $bg;
-
- .entry-group {
- flex: 1 1 auto;
- min-width: 50%;
- display: flex;
- }
+.profile .about-user {
+ flex: 35 14rem;
+ border-radius: $br;
+ overflow: hidden;
- .entry {
- white-space: nowrap;
- width: 50%;
- margin: 1.2rem 0.5rem;
- text-align: center;
+ .col-header {
+ margin-bottom: -0.25rem;
}
-}
-.nothinghere {
- margin-left: 1rem;
-}
+ .fields {
+ background: $profile-bg;
+ display: flex;
+ flex-direction: column;
+ padding: 0 0.5rem;
+ padding-top: 0.25rem;
-.backnextlinks {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
+ .field {
+ padding: 0.25rem;
+ display: flex;
+ flex-direction: column;
+ border-bottom: 0.1rem solid $gray2;
+ word-break: break-all;
- a {
- padding: 1rem;
+ &:first-child {
+ border-top: 0.1rem solid $gray2;
+ }
+ }
}
- .next {
- margin-left: auto;
+ .bio {
+ background: $profile-bg;
+ padding: 1rem 0.75rem;
+ padding-bottom: 1.25rem;
}
-}
-.toot, .toot:last-child {
- box-shadow: $boxshadow;
-}
-
-#recent, #pinned {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: space-between;
- margin: 1rem;
- .rss-icon {
- font-size: 1.45em;
- object-fit: contain;
- vertical-align: middle;
- color: $orange2;
- /* can't size a single-color background, so we use a linear-gradient that's effectively white */
- background: linear-gradient(to right, $white1 100%, transparent 0) no-repeat center center;
- background-size: 1.2rem 1.4rem;
+ .accountstats {
+ background: $bg-accent;
+ padding: 0.75rem;
+
+ display: grid;
+ grid-template-columns: auto 1fr;
+ gap: 0.25rem 1rem;
}
-}
+} \ No newline at end of file