flatten grid structure of Status.html
This commit is contained in:
parent
8db7d376d4
commit
4a653df3b6
|
@ -25,14 +25,14 @@
|
|||
padding: 10px 20px;
|
||||
display: grid;
|
||||
grid-template-areas:
|
||||
"....... header"
|
||||
"sidebar author"
|
||||
"sidebar spoiler"
|
||||
"sidebar spoiler-button"
|
||||
"sidebar content"
|
||||
"media media"
|
||||
"....... toolbar";
|
||||
grid-template-columns: 58px 1fr;
|
||||
"....... header header header"
|
||||
"sidebar author-name author-handle author-date"
|
||||
"sidebar spoiler spoiler spoiler"
|
||||
"sidebar spoiler-button spoiler-button spoiler-button"
|
||||
"sidebar content content content"
|
||||
"media media media media"
|
||||
"....... toolbar toolbar toolbar";
|
||||
grid-template-columns: min-content minmax(0, max-content) 1fr min-content;
|
||||
}
|
||||
|
||||
.status-article.status-in-timeline {
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
<div class="status-author {{isStatusInNotification ? 'status-in-notification' : ''}}">
|
||||
<a class="status-author-name" href="/accounts/{{status.account.id}}">
|
||||
<a
|
||||
class="status-author-name {{getClass(isStatusInNotification)}}"
|
||||
href="/accounts/{{status.account.id}}"
|
||||
>
|
||||
{{status.account.display_name || status.account.username}}
|
||||
</a>
|
||||
<span class="status-author-handle">
|
||||
<span class="status-author-handle {{getClass(isStatusInNotification)}}"
|
||||
>
|
||||
{{'@' + status.account.acct}}
|
||||
</span>
|
||||
{{#if isStatusInOwnThread}}
|
||||
|
@ -10,72 +13,61 @@
|
|||
<time datetime={{createdAtDate}} title="{{relativeDate}}">{{relativeDate}}</time>
|
||||
</ExternalLink>
|
||||
{{else}}
|
||||
<a class="status-author-date" href="/statuses/{{status.id}}">
|
||||
<a class="status-author-date {{getClass(isStatusInNotification)}}"
|
||||
href="/statuses/{{status.id}}"
|
||||
>
|
||||
<time datetime={{createdAtDate}} title="{{relativeDate}}">{{relativeDate}}</time>
|
||||
</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
<style>
|
||||
.status-author {
|
||||
grid-area: author;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 0 10px 0 5px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.status-author-name {
|
||||
grid-area: author-name;
|
||||
align-self: center;
|
||||
margin-left: 5px;
|
||||
font-size: 1.1em;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
:global(
|
||||
.status-author a,
|
||||
.status-author a:visited,
|
||||
.status-author a:hover,
|
||||
.status-author
|
||||
.status-author-handle
|
||||
) {
|
||||
color: var(--deemphasized-text-color);
|
||||
}
|
||||
|
||||
:global(.status-author .status-author-name) {
|
||||
min-width: 0;
|
||||
flex-shrink: 1;
|
||||
color: var(--body-text-color);
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
:global(.status-author .status-author-name:hover) {
|
||||
.status-author-name, .status-author-name:hover, .status-author-name:visited {
|
||||
color: var(--body-text-color);
|
||||
}
|
||||
|
||||
.status-author-handle {
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
grid-area: author-handle;
|
||||
align-self: center;
|
||||
margin-left: 5px;
|
||||
color: var(--deemphasized-text-color);
|
||||
font-size: 1.1em;
|
||||
min-width: 0;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
:global(.status-author-date) {
|
||||
color: var(--deemphasized-text-color);
|
||||
flex-shrink: 1;
|
||||
text-align: right;
|
||||
.status-author-date {
|
||||
grid-area: author-date;
|
||||
align-self: center;
|
||||
margin-left: 5px;
|
||||
margin-right: 10px;
|
||||
font-size: 1.1em;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
}
|
||||
:global(.status-author-date:hover) {
|
||||
.status-author-date, .status-author-date:hover, .status-author-date:visited {
|
||||
color: var(--deemphasized-text-color);
|
||||
}
|
||||
|
||||
:global(
|
||||
.status-author.status-in-notification,
|
||||
.status-author.status-in-notification a,
|
||||
.status-author.status-in-notification a:visited,
|
||||
.status-author.status-in-notification a:hover,
|
||||
.status-author.status-in-notification .status-author-handle
|
||||
) {
|
||||
.status-author-in-notification, .status-author-in-notification:hover, .status-author-in-notification:visited {
|
||||
color: var(--very-deemphasized-text-color);
|
||||
}
|
||||
|
||||
|
@ -88,6 +80,9 @@
|
|||
const relativeFormat = new IntlRelativeFormat('en-US');
|
||||
|
||||
export default {
|
||||
helpers: {
|
||||
getClass: isStatusInNotification => isStatusInNotification ? 'status-author-in-notification' : ''
|
||||
},
|
||||
computed: {
|
||||
createdAtDate: (status) => status.created_at,
|
||||
relativeDate: (createdAtDate) => {
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
<style>
|
||||
.status-header span {
|
||||
margin-left: 5px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
:global(
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<style>
|
||||
:global(.status-sidebar) {
|
||||
grid-area: sidebar;
|
||||
margin: 0 10px 0 0;
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
|
|
Loading…
Reference in a new issue