UX: More logic for title columns (#87)
This commit is contained in:
@@ -65,11 +65,12 @@ export default {
|
|||||||
api.registerValueTransformer(
|
api.registerValueTransformer(
|
||||||
"topic-list-item-class",
|
"topic-list-item-class",
|
||||||
({ value: classes, context }) => {
|
({ value: classes, context }) => {
|
||||||
if (context.topic.pinned || context.topic.pinned_globally) {
|
if (
|
||||||
classes.push("--pinned");
|
context.topic.is_hot ||
|
||||||
}
|
context.topic.pinned ||
|
||||||
if (context.topic.is_hot) {
|
context.topic.pinned_globally
|
||||||
classes.push("--hot");
|
) {
|
||||||
|
classes.push("--has-status-card");
|
||||||
}
|
}
|
||||||
return classes;
|
return classes;
|
||||||
}
|
}
|
||||||
|
|||||||
+40
-28
@@ -37,19 +37,31 @@
|
|||||||
grid-column-gap: 12px;
|
grid-column-gap: 12px;
|
||||||
grid-row-gap: 8px;
|
grid-row-gap: 8px;
|
||||||
border-radius: var(--d-border-radius);
|
border-radius: var(--d-border-radius);
|
||||||
|
td.main-link .link-top-line {
|
||||||
|
grid-row: 1/2;
|
||||||
|
grid-column: 1/-1;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
&.--has-status-card td.main-link .link-top-line {
|
||||||
|
grid-column: 1/-2;
|
||||||
|
}
|
||||||
@include breakpoint(extra-large) {
|
@include breakpoint(extra-large) {
|
||||||
grid-template-columns: 20px repeat(6, 1fr);
|
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
". . . . . . status"
|
". . . . . . status"
|
||||||
"activity activity activity activity activity likes-replies category";
|
"activity activity activity activity activity likes-replies category";
|
||||||
}
|
}
|
||||||
@include breakpoint(mobile-extra-large) {
|
@include breakpoint(mobile-extra-large) {
|
||||||
|
td.main-link .link-top-line,
|
||||||
|
&.--has-status-card td.main-link .link-top-line {
|
||||||
|
grid-row: 2/3;
|
||||||
|
grid-column: 1/-1;
|
||||||
|
}
|
||||||
grid-template-columns: 25px repeat(7, 1fr);
|
grid-template-columns: 25px repeat(7, 1fr);
|
||||||
grid-template-rows: auto auto auto;
|
grid-template-rows: auto auto auto;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
". . . . . . . status"
|
"category category category category category category category status"
|
||||||
"activity activity activity activity activity activity activity activity"
|
". . . . . . . ."
|
||||||
"category category category category category category category likes-replies";
|
"activity activity activity activity activity activity activity likes-replies";
|
||||||
border: none;
|
border: none;
|
||||||
border-bottom: 1px solid var(--primary-200);
|
border-bottom: 1px solid var(--primary-200);
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
@@ -57,26 +69,24 @@
|
|||||||
}
|
}
|
||||||
&.excerpt-expanded {
|
&.excerpt-expanded {
|
||||||
grid-template-columns: 20px auto repeat(5, 1fr) auto;
|
grid-template-columns: 20px auto repeat(5, 1fr) auto;
|
||||||
grid-template-rows: auto auto auto 30px;
|
grid-template-rows: auto auto auto;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
". . . . . . . status"
|
". . . . . . . status"
|
||||||
"activity activity activity activity activity activity activity activity"
|
"activity activity activity activity activity activity activity activity"
|
||||||
"excerpt excerpt excerpt excerpt excerpt excerpt . ."
|
|
||||||
"excerpt excerpt excerpt excerpt excerpt excerpt likes-replies category";
|
"excerpt excerpt excerpt excerpt excerpt excerpt likes-replies category";
|
||||||
@include breakpoint(extra-large) {
|
@include breakpoint(extra-large) {
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
". . . . . . . status"
|
". . . . . . . status"
|
||||||
"activity activity activity activity activity activity activity activity"
|
"activity activity activity activity activity activity activity activity"
|
||||||
"excerpt excerpt excerpt excerpt excerpt excerpt excerpt likes-replies"
|
"excerpt excerpt excerpt excerpt excerpt excerpt likes-replies category";
|
||||||
"excerpt excerpt excerpt excerpt excerpt excerpt excerpt category";
|
|
||||||
}
|
}
|
||||||
@include breakpoint(mobile-extra-large) {
|
@include breakpoint(mobile-extra-large) {
|
||||||
grid-template-columns: 25px auto repeat(6, 1fr);
|
grid-template-columns: 25px auto repeat(6, 1fr);
|
||||||
grid-template-rows: auto auto auto;
|
grid-template-rows: auto auto auto;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
". . . . . . . status"
|
"category category category category category category category status"
|
||||||
"activity activity activity activity activity activity activity activity"
|
". . . . . . . ."
|
||||||
"category . . . . . . likes-replies";
|
"activity activity activity activity activity activity activity likes-replies";
|
||||||
.topic-excerpt {
|
.topic-excerpt {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -104,6 +114,8 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
gap: 0.25em;
|
gap: 0.25em;
|
||||||
font-size: var(--font-down-1);
|
font-size: var(--font-down-1);
|
||||||
|
height: 100%;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.topic-activity__user {
|
.topic-activity__user {
|
||||||
@@ -166,15 +178,6 @@
|
|||||||
--status-color: #e45735;
|
--status-color: #e45735;
|
||||||
}
|
}
|
||||||
|
|
||||||
// title
|
|
||||||
td.main-link .link-top-line {
|
|
||||||
font-size: var(--font-0);
|
|
||||||
grid-row: 1/2;
|
|
||||||
grid-column: 1/-2;
|
|
||||||
font-weight: 500;
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.link-top-line .event-date {
|
.link-top-line .event-date {
|
||||||
margin-left: 0.5em;
|
margin-left: 0.5em;
|
||||||
font-size: var(--font-down-3);
|
font-size: var(--font-down-3);
|
||||||
@@ -206,7 +209,8 @@
|
|||||||
|
|
||||||
// excerpt
|
// excerpt
|
||||||
.topic-excerpt {
|
.topic-excerpt {
|
||||||
grid-area: excerpt;
|
grid-row: 3 / -1;
|
||||||
|
grid-column: 1 / -2;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: var(--font-down-2);
|
font-size: var(--font-down-2);
|
||||||
}
|
}
|
||||||
@@ -248,6 +252,7 @@
|
|||||||
|
|
||||||
@include breakpoint(tablet) {
|
@include breakpoint(tablet) {
|
||||||
padding: 2px 6px;
|
padding: 2px 6px;
|
||||||
|
font-size: var(--font-down-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge-category__name {
|
.badge-category__name {
|
||||||
@@ -436,28 +441,35 @@ body.user-messages-page .topic-list-item {
|
|||||||
td.topic-status-data {
|
td.topic-status-data {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
td.main-link .link-top-line {
|
||||||
|
grid-row: 1 / 2;
|
||||||
|
grid-column: 1 / -1;
|
||||||
|
}
|
||||||
|
grid-template-areas:
|
||||||
|
". . . . . . ."
|
||||||
|
"activity activity activity activity activity likes-replies likes-replies";
|
||||||
&.excerpt-expanded {
|
&.excerpt-expanded {
|
||||||
grid-template-columns: 20px repeat(6, 1fr) auto;
|
grid-template-columns: 20px repeat(6, 1fr) auto;
|
||||||
grid-template-rows: 20px auto auto 30px;
|
grid-template-rows: 20px auto auto 30px;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"activity activity activity activity activity activity activity activity"
|
|
||||||
". . . . . . . ."
|
". . . . . . . ."
|
||||||
|
"activity activity activity activity activity activity activity activity"
|
||||||
"excerpt excerpt excerpt excerpt excerpt excerpt . ."
|
"excerpt excerpt excerpt excerpt excerpt excerpt . ."
|
||||||
"excerpt excerpt excerpt excerpt excerpt excerpt likes-replies likes-replies";
|
"excerpt excerpt excerpt excerpt excerpt excerpt likes-replies likes-replies";
|
||||||
@include breakpoint(extra-large) {
|
@include breakpoint(extra-large) {
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"avatar author status status . . . activity"
|
". . . . . . . ."
|
||||||
"avatar . . . . . . ."
|
"activity activity activity activity activity activity activity activity"
|
||||||
". excerpt excerpt excerpt excerpt excerpt . likes-replies"
|
"excerpt excerpt excerpt excerpt excerpt excerpt . likes-replies"
|
||||||
". excerpt excerpt excerpt excerpt excerpt . likes-replies";
|
"excerpt excerpt excerpt excerpt excerpt excerpt . likes-replies";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@include breakpoint(mobile-extra-large) {
|
@include breakpoint(mobile-extra-large) {
|
||||||
grid-template-columns: 25px auto repeat(6, 1fr);
|
grid-template-columns: 25px auto repeat(6, 1fr);
|
||||||
grid-template-rows: auto auto;
|
grid-template-rows: auto auto;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"activity activity activity activity activity activity activity activity"
|
". . . . . . . ."
|
||||||
". . . . . . . .";
|
"activity activity activity activity activity activity activity activity";
|
||||||
.topic-excerpt {
|
.topic-excerpt {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user