mirror of
1
Fork 0

profile responsiveness, accessibility tweaks

This commit is contained in:
f0x 2023-05-10 20:18:50 +02:00
parent 1f9c41a63f
commit 86471e010a
2 changed files with 84 additions and 95 deletions

View File

@ -27,22 +27,18 @@ main.profile {
padding: 0.5rem; padding: 0.5rem;
border-radius: $br; border-radius: $br;
display: grid; .column-split {
grid-template-rows: auto auto; display: flex;
grid-template-columns: 35fr 65fr; flex-wrap: wrap;
grid-template-areas:
"header header"
"about toots";
gap: 1rem; gap: 1rem;
}
} }
main.profile .header { main.profile .header {
grid-area: header;
background: $bg-accent; background: $bg-accent;
border-radius: $br; border-radius: $br;
overflow: hidden; overflow: hidden;
margin-bottom: 1rem;
.header-image { .header-image {
position: relative; position: relative;
@ -165,7 +161,6 @@ main.profile {
} }
&.pinned { &.pinned {
margin: 0 1rem;
display: grid; display: grid;
grid-template-columns: auto 1fr; grid-template-columns: auto 1fr;
gap: 1rem; gap: 1rem;
@ -178,29 +173,12 @@ main.profile {
} }
main.profile .toots { main.profile .toots {
grid-area: toots; flex: 65 25rem;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 0.4rem; gap: 0.4rem;
.col-header {
margin: 0;
background: $gray4;
border-top-left-radius: $br;
border-top-right-radius: $br;
padding: 0.75rem;
}
.toot { .toot {
padding-top: 0.75rem;
box-shadow: none;
border: none;
.contentgrid {
padding: 0 0.75rem;
}
.info { .info {
padding: 0.3rem 0.75rem; padding: 0.3rem 0.75rem;
} }
@ -212,7 +190,7 @@ main.profile .toots {
} }
main.profile .about-user { main.profile .about-user {
grid-area: about; flex: 35 14rem;
border-radius: $br; border-radius: $br;
overflow: hidden; overflow: hidden;
@ -237,10 +215,6 @@ main.profile .about-user {
&:first-child { &:first-child {
border-top: 0.1rem solid $gray2; border-top: 0.1rem solid $gray2;
} }
b {
color: $fg-accent;
}
} }
} }

View File

@ -26,7 +26,7 @@
<img src="{{.account.Header}}" alt="" /> <img src="{{.account.Header}}" alt="" />
{{ end }} {{ end }}
</div> </div>
<div class="basic-info"> <div class="basic-info" aria-hidden="true">
<a class="avatar" href="{{.account.Avatar}}"> <a class="avatar" href="{{.account.Avatar}}">
<img src="{{.account.Avatar}}" alt=""> <img src="{{.account.Avatar}}" alt="">
</a> </a>
@ -50,9 +50,16 @@
<i class="rss-icon fa fa-rss-square" aria-hidden="true"></i> <i class="rss-icon fa fa-rss-square" aria-hidden="true"></i>
</a> --> </a> -->
</div> </div>
<div class="sr-only">
Profile for
{{if .account.DisplayName}}{{.account.DisplayName}}{{else}}{{.account.Username}}{{end}}.
Username @{{.account.Username}}, {{acctInstance .account.Acct}}
</div>
</div> </div>
<div class="about-user"> <div class="column-split">
<section class="about-user">
<div class="col-header"> <div class="col-header">
<h3>About</h3> <h3>About</h3>
</div> </div>
@ -74,15 +81,22 @@
{{end}} {{end}}
</div> </div>
<div class="accountstats"> <div class="sr-only" role="group">
<span>Joined on {{.account.CreatedAt | timestampVague}}.</span>
<span>{{.account.StatusesCount}} post{{if .account.StatusesCount | eq 1 | not}}s{{end}}.</span>
<span>Followed by {{.account.FollowersCount}}.</span>
<span>Following {{.account.FollowingCount}}.</span>
</div>
<div class="accountstats" aria-hidden="true">
<b>Joined</b><time datetime="{{.account.CreatedAt}}">{{.account.CreatedAt | timestampVague}}</time> <b>Joined</b><time datetime="{{.account.CreatedAt}}">{{.account.CreatedAt | timestampVague}}</time>
<b>Posts</b><span>{{.account.StatusesCount}}</span> <b>Posts</b><span>{{.account.StatusesCount}}</span>
<b>Followed by</b><span>{{.account.FollowersCount}}</span> <b>Followed by</b><span>{{.account.FollowersCount}}</span>
<b>Following</b><span>{{.account.FollowingCount}}</span> <b>Following</b><span>{{.account.FollowingCount}}</span>
</div> </div>
</div> </section>
<div class="toots"> <section class="toots">
{{ if .pinned_statuses }} {{ if .pinned_statuses }}
<div class="col-header pinned"> <div class="col-header pinned">
<h3>Pinned posts</h3> <h3>Pinned posts</h3>
@ -97,8 +111,8 @@
</section> </section>
{{ end }} {{ end }}
<div class="col-header" id="recent"> <div class="col-header">
<h3>Recent posts</h3> <h3 id="recent" tabindex="-1">Recent posts</h3>
</div> </div>
<section class="thread"> <section class="thread">
@ -121,6 +135,7 @@
<a href="{{ .statuses_next }}" class="next">Show older</a> <a href="{{ .statuses_next }}" class="next">Show older</a>
{{ end }} {{ end }}
</div> </div>
</section>
</div> </div>
</main> </main>