moved status-infos to upper right corner on single-post pages

This commit is contained in:
Dym Sohin 2023-10-12 23:40:00 +02:00
parent 7fde90bc7e
commit 09d6522fdf
6 changed files with 270 additions and 330 deletions

View File

@ -347,6 +347,9 @@ body {
grid-template-columns: 1fr minmax(auto, 50rem) 1fr;
grid-template-columns: 1fr min(92%, 50rem) 1fr;
grid-template-rows: auto 1fr auto;
gap: 1rem;
padding: 1rem 0;
}
h1 {
@ -610,8 +613,6 @@ hr {
footer {
align-self: end;
padding: 2rem 0 1rem 0;
display: flex;
flex-wrap: wrap;
justify-content: center;

View File

@ -164,19 +164,6 @@
}
}
.profile .col-header {
display: flex;
justify-content: start;
gap: 2rem;
align-items: center;
margin: 0;
background: var(--profile-bg);
border-top-left-radius: var(--br);
border-top-right-radius: var(--br);
padding: 0.75rem;
}
.profile .col-header h1, .profile .col-header h2 {
font-size: 1.2rem;
line-height: 1.3rem;
@ -212,17 +199,11 @@
}
.profile .toots .toot {
border-radius: 0;
padding-top: 0;
border-radius: var(--br);
}
.profile .toots .toot .info {
padding: 0.3rem 0.75rem;
}
.profile .toots .toot:last-child {
border-bottom-left-radius: var(--br);
border-bottom-right-radius: var(--br);
.toot .info {
flex-direction: row;
gap: 1rem;
}
.profile .toots .backnextlinks {
@ -265,7 +246,7 @@
.profile .about-user .fields > span {
}
.profile .about-user .fields > span + b {
border-top: 0.1rem solid var(--gray1);
border-top: 0.1rem solid var(--gray2);
}
.profile .about-user .bio {
@ -297,5 +278,5 @@
}
.profile .accountstats > b {
border-bottom: 0.1rem solid var(--gray1);
border-bottom: 0.1rem solid var(--gray2);
}

137
assets/dist/status.css vendored
View File

@ -612,80 +612,62 @@ main {
.thread {
display: flex;
flex-direction: column;
gap: 1rem;
border-radius: var(--br);
}
.toot {
background: var(--toot-bg);
box-shadow: var(--boxshadow);
border: var(--boxshadow-border);
border-radius: var(--br);
position: relative;
margin-bottom: var(--br);
padding-top: 0.75rem;
display: flex;
flex-direction: column;
padding: 1rem;
gap: 0.75rem;
}
.toot a {
position: relative;
z-index: 1;
color: inherit;
text-decoration: none;
}
.toot .author > a {
padding: 0 0.75rem;
display: grid;
grid-template-columns: 3.5rem 1fr auto;
grid-template-rows: auto auto;
grid-template-areas:
"avatar display date"
"avatar user .";
gap: 0 0.5rem;
.toot .author {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
gap: 0.75rem;
}
.toot .author > a .avatar {
grid-area: avatar;
height: 3.5rem;
width: 3.5rem;
.toot .author .avatar {
height: 3rem;
width: 3rem;
-o-object-fit: cover;
object-fit: cover;
border: 0.15rem solid var(--avatar-border);
border-radius: var(--br);
overflow: hidden;
}
/* hides corners from img overflowing */
.toot .author > a .avatar img {
.toot .author .avatar img {
height: 100%;
width: 100%;
-o-object-fit: cover;
object-fit: cover;
background: var(--bg);
}
.toot .author > a .displayname, .toot .author > a .username {
justify-self: start;
align-self: start;
max-width: 100%;
.toot .author .user-info {
display: flex;
flex-direction: column;
flex-wrap: nowrap;
justify-content: space-around;
}
.toot .author .displayname,
.toot .author .username {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.toot .author > a .displayname {
grid-area: display;
.toot .author .displayname {
font-weight: bold;
font-size: 1rem;
line-height: 1.3rem;
/* margin-top: -0.5rem; */
}
.toot .author > a .username {
grid-area: user;
.toot .author .username {
color: var(--link-fg);
font-size: 1rem;
line-height: 1.3rem;
}
.toot .author > a .timestamp {
grid-area: date;
color: var(--fg-reduced);
}
.toot .body {
padding: 0.5rem 0.75rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
@ -701,16 +683,6 @@ main {
white-space: nowrap;
cursor: pointer;
}
.toot .text {
margin: 0;
grid-row: span 1;
grid-column: 1 / span 3;
position: relative;
z-index: 2;
width: 100%;
}
.toot .text details > summary {
padding-bottom: 0.5rem;
}
@ -726,8 +698,8 @@ main {
word-break: break-word;
}
.toot .text .content blockquote {
padding: 0.5rem 0 0.5rem 0.5rem;
border-left: 0.2rem solid var(--border-accent);
padding: 0.25rem 0 0.25rem 0.5rem;
border-left: 0.25rem solid var(--border-accent);
margin: 0;
font-style: italic;
}
@ -744,13 +716,14 @@ main {
.toot .text .content pre {
display: flex;
border-radius: var(--br);
padding: 0.5rem;
overflow: hidden;
margin: 0;
}
.toot .text .content pre code {
padding: 0.5rem;
padding: 0.25rem 0.5rem;
white-space: pre;
border-radius: 0;
overflow-x: auto;
overflow: auto;
-webkit-overflow-scrolling: touch;
}
.toot .text .content img {
@ -782,7 +755,7 @@ main {
height: 100%;
width: 100%;
box-sizing: border-box;
border: 0.15rem solid var(--gray1);
border: 0.15rem solid var(--gray2);
border-radius: var(--br);
position: relative;
overflow: hidden;
@ -859,7 +832,7 @@ main {
width: 100%;
-o-object-fit: contain;
object-fit: contain;
background: var(--gray1);
background: var(--gray2);
}
.toot .media.single .media-wrapper {
grid-column: span 2;
@ -873,36 +846,33 @@ main {
-o-object-fit: cover;
object-fit: cover;
}
.toot .meta {
display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: 0.75rem;
align-items: flex-start;
justify-content: space-between;
}
.toot .info {
display: flex;
background: var(--toot-info-bg);
flex-direction: column;
flex-wrap: wrap;
gap: 0.5rem;
line-height: 1rem;
color: var(--fg-reduced);
border-top: 0.15rem solid var(--toot-info-border);
padding: 0.5rem 0.75rem;
}
.toot .info div, .toot .info time {
padding-right: 1rem;
}
align-items: flex-end;
}
.toot .info .stats {
display: flex;
}
.toot .info{
grid-column: span 3;
flex-direction: row;
flex-wrap: wrap;
gap: 1rem;
line-height: 1rem;
color: var(--fg-reduced);
}
.toot .toot-link {
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
text-indent: 100%;
white-space: nowrap;
position: absolute;
z-index: 0;
}
.stats
.toot:first-child {
/* top left, top right */
border-top-left-radius: var(--br);
@ -916,7 +886,6 @@ main {
}
.toot.expanded {
background: var(--toot-focus-bg);
padding-bottom: 0;
}
.toot.expanded .info {
background: var(--toot-focus-info-bg);

View File

@ -49,7 +49,7 @@
<ul>
<li><a href="https://gotosocial.org" target="_blank">GoToSocial</a></li>
<li>official <a href="https://github.com/superseriousbusiness/gotosocial" target="_blank">source code</a></li>
<li>my <a href="https://source.garden/config/gts-web" target="_blank">custom templates</a></li>
<li>my <a href="https://source.garden/styles/gts-web/" target="_blank">custom templates</a></li>
</ul>
</div>

View File

@ -17,9 +17,10 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ -}}
<section class="author">
<a href="{{.Account.URL}}">
<img class="avatar" src="{{.Account.Avatar}}" alt="">
<section class="meta">
<a href="{{.Account.URL}}" class="author">
<img class="avatar" src="{{.Account.Avatar}}" alt="" align="left" width="48" height="48">
<span class="user-info">
<span class="displayname">
{{if .Account.DisplayName}}
{{emojify .Account.Emojis (escape .Account.DisplayName)}}
@ -28,8 +29,25 @@
{{end}}
</span>
<span class="username">@{{.Account.Username}}</span>
</span>
</a>
<a data-nosnippet href="{{.URL}}" class="toot-link info">
<time datetime="{{.CreatedAt}}" title="{{.CreatedAt}}">{{.CreatedAt | timestampPrecise}}</time>
<div class="stats">
{{if .RepliesCount | eq 0 | not}}
<span>replies: {{.RepliesCount}}</span>
{{end}}{{if .FavouritesCount | eq 0 | not}}
<span>favs: {{.FavouritesCount}}</span>
{{end}}{{if .ReblogsCount | eq 0 | not}}
<span>reposts: {{.ReblogsCount}}</span>
{{end}}{{if .Pinned}}
<span>/pinned</span>
{{end}}
</div>
</a>
</section>
<section class="body">
<div class="text">
{{if .SpoilerText}}
@ -92,24 +110,3 @@
</div>
{{end}}
</section>
<aside class="info">
<time datetime="{{.CreatedAt}}" title="{{.CreatedAt}}">{{.CreatedAt | timestampPrecise}}</time>
<div class="stats" role="group">
<div>
<span>{{.RepliesCount}} {{if .RepliesCount | eq 1}}reply{{else}}replies{{end}}</span>
</div>
<div>
<span>{{.FavouritesCount}} favourite{{if .FavouritesCount | eq 1 | not}}s{{end}}</span>
</div>
<div>
<span>{{.ReblogsCount}} boost{{if .ReblogsCount | eq 1 | not}}s{{end}}</span>
</div>
{{if .Pinned}}
<div>
<span>pinned</span>
</div>
{{end}}
</div>
</aside>
<a data-nosnippet href="{{.URL}}" class="toot-link">Open thread</a>

View File

@ -80,19 +80,11 @@
{{end}}
</section>
<aside class="info">
<a data-nosnippet href="{{.URL}}" class="toot-link info">
<time datetime="{{.CreatedAt}}" title="{{.CreatedAt}}">{{.CreatedAt | timestampPrecise}}</time>
<div class="stats" role="group">
{{if .RepliesCount | eq 0 | not}}
<div>
<span>{{.RepliesCount}} {{if .RepliesCount | eq 1}}reply{{else}}replies{{end}}</span>
</div>
{{end}}
{{if .Pinned}}
<div>
<span>pinned</span>
</div>
<span>/pinned</span>
{{end}}{{if .RepliesCount | eq 0 | not}}
<span>replies:{{.RepliesCount}}</span>
{{end}}
</div>
</aside>
<a data-nosnippet href="{{.URL}}" class="toot-link">Open thread</a>
</a>