diff --git a/frontend/src/components/posts/PostCard.vue b/frontend/src/components/posts/PostCard.vue index 68b537e..c80a0ab 100644 --- a/frontend/src/components/posts/PostCard.vue +++ b/frontend/src/components/posts/PostCard.vue @@ -1,10 +1,17 @@ @@ -118,13 +110,25 @@ function formatBytes(n) { .fc-post-card { padding: 1rem; margin-bottom: 1rem; + cursor: pointer; + container-type: inline-size; + transition: border-color 0.15s ease; } +.fc-post-card:hover { + border-color: rgb(var(--v-theme-accent)); +} +.fc-post-card:focus-visible { + outline: 2px solid rgb(var(--v-theme-accent)); + outline-offset: 2px; +} + .fc-post-card__head { display: flex; align-items: center; gap: 0.6rem; - font-size: 0.85rem; + font-size: 0.8rem; color: rgb(var(--v-theme-on-surface-variant)); + margin-bottom: 12px; } .fc-post-card__artist { color: rgb(var(--v-theme-on-surface)); @@ -133,72 +137,118 @@ function formatBytes(n) { } .fc-post-card__artist:hover { color: rgb(var(--v-theme-accent)); } .fc-post-card__date { white-space: nowrap; } -.fc-post-card__title { - font-size: 1.05rem; - margin: 0.6rem 0 0.4rem; -} -.fc-post-card__desc { - white-space: pre-wrap; - font-size: 0.92rem; - color: rgb(var(--v-theme-on-surface)); - margin-bottom: 0.6rem; -} -.fc-post-card__more { - background: none; - border: none; - color: rgb(var(--v-theme-accent)); - cursor: pointer; - padding: 0 0.25rem; - font-size: inherit; -} -.fc-post-card__thumbs { + +.fc-post-card__body { display: flex; - flex-wrap: wrap; - gap: 0.4rem; - align-items: center; - margin: 0.5rem 0; + flex-direction: column; + gap: 16px; } -.fc-post-card__thumb { line-height: 0; } -.fc-post-card__thumb-img { - border-radius: 4px; +@container (min-width: 800px) { + .fc-post-card__body { + flex-direction: row; + gap: 24px; + } + .fc-post-card__media { + flex: 0 0 50%; + } + .fc-post-card__text { + flex: 1 1 0; + min-width: 0; + } +} + +.fc-post-card__hero { + width: 100%; + aspect-ratio: 16 / 10; overflow: hidden; + border-radius: 6px; } -.fc-post-card__more-thumbs { - display: inline-flex; +.fc-post-card__hero img { + width: 100%; + height: 100%; + object-fit: cover; + display: block; +} + +.fc-post-card__rail { + display: flex; + gap: 6px; + margin-top: 6px; +} +.fc-post-card__rail-cell { + width: 80px; + height: 80px; + overflow: hidden; + border-radius: 4px; +} +.fc-post-card__rail-cell img { + width: 100%; + height: 100%; + object-fit: cover; + display: block; +} +.fc-post-card__rail-more { + width: 80px; + height: 80px; + display: flex; align-items: center; justify-content: center; - width: 96px; - height: 96px; border: 1px dashed rgb(var(--v-theme-on-surface-variant)); border-radius: 4px; color: rgb(var(--v-theme-on-surface-variant)); - text-decoration: none; font-size: 0.85rem; } -.fc-post-card__more-thumbs:hover { - color: rgb(var(--v-theme-accent)); - border-color: rgb(var(--v-theme-accent)); + +.fc-post-card__title { + font-family: 'Fraunces', Georgia, serif; + font-size: 18px; + font-weight: 500; + margin: 0 0 8px 0; + color: rgb(var(--v-theme-on-surface)); + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; } -.fc-post-card__attachments { - display: flex; - flex-wrap: wrap; - gap: 0.4rem; - margin-top: 0.6rem; +.fc-post-card__title--missing { + font-style: italic; + color: rgb(var(--v-theme-on-surface-variant)); } -.fc-post-card__att { +@container (min-width: 800px) { + .fc-post-card__title { + font-size: 20px; + -webkit-line-clamp: 1; + white-space: nowrap; + text-overflow: ellipsis; + } +} + +.fc-post-card__desc { + font-size: 0.9rem; + line-height: 1.5; + color: rgb(var(--v-theme-on-surface)); + margin: 0 0 12px 0; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; +} +.fc-post-card__desc--missing { + font-style: italic; + color: rgb(var(--v-theme-on-surface-variant)); +} +@container (min-width: 800px) { + .fc-post-card__desc { + -webkit-line-clamp: 5; + } +} + +.fc-post-card__atts { display: inline-flex; align-items: center; - gap: 0.35rem; - padding: 0.2rem 0.5rem; - border: 1px solid rgb(var(--v-theme-on-surface-variant)); - border-radius: 999px; - color: rgb(var(--v-theme-on-surface)); - text-decoration: none; - font-size: 0.82rem; + gap: 6px; + font-size: 0.85rem; + color: rgb(var(--v-theme-on-surface-variant)); } -.fc-post-card__att:hover { - color: rgb(var(--v-theme-accent)); - border-color: rgb(var(--v-theme-accent)); -} -.fc-post-card__att-size { color: rgb(var(--v-theme-on-surface-variant)); } +.fc-post-card__att-icon { color: rgb(var(--v-theme-on-surface-variant)); }