Minor style fixes

This commit is contained in:
kvakazyambra 2023-08-12 17:17:00 +03:00
parent 5eb89f9f79
commit cc34e79dc5
6 changed files with 49 additions and 44 deletions

View File

@ -1,16 +1,17 @@
.commentDates { .commentDates {
@include font-size(1.2rem); color: #9fa1a7;
flex: 1;
display: flex;
gap: 1rem;
align-items: center; align-items: center;
justify-content: flex-start; display: flex;
flex: 1;
@include font-size(1.2rem);
font-size: 1.2rem; font-size: 1.2rem;
gap: 1rem;
justify-content: flex-start;
margin: 0 1em 4px 0; margin: 0 1em 4px 0;
color: rgb(0 0 0 / 30%);
.date { .date {
font-weight: 500;
.icon { .icon {
line-height: 1; line-height: 1;
width: 1rem; width: 1rem;

View File

@ -33,6 +33,7 @@ import { Icon } from '../_shared/Icon'
import { SolidSwiper } from '../_shared/SolidSwiper' import { SolidSwiper } from '../_shared/SolidSwiper'
import styles from './Article.module.scss' import styles from './Article.module.scss'
import { CardTopic } from '../Feed/CardTopic'
interface Props { interface Props {
article: Shout article: Shout
@ -137,14 +138,7 @@ export const FullArticle = (props: Props) => {
<Show when={props.article.layout !== 'audio'}> <Show when={props.article.layout !== 'audio'}>
<div class={styles.shoutHeader}> <div class={styles.shoutHeader}>
<Show when={mainTopic()}> <Show when={mainTopic()}>
<div class={styles.shoutTopic}> <CardTopic title={mainTopic().title} slug={props.article.mainTopic} />
<a
href={getPagePath(router, 'topic', { slug: props.article.mainTopic })}
class={styles.mainTopicLink}
>
{mainTopic().title}
</a>
</div>
</Show> </Show>
<h1>{props.article.title}</h1> <h1>{props.article.title}</h1>

View File

@ -93,6 +93,7 @@
} }
.shoutCardCover { .shoutCardCover {
background: rgb(0 0 0 / 30%);
height: 0; height: 0;
margin-bottom: 1.6rem; margin-bottom: 1.6rem;
overflow: hidden; overflow: hidden;
@ -136,7 +137,8 @@
} }
.shoutDate { .shoutDate {
color: rgb(0 0 0 / 50%); color: #9fa1a7;
font-weight: 500;
} }
.shoutDetails { .shoutDetails {
@ -401,6 +403,10 @@
} }
} }
&.shoutCardNoImage {
background: rgb(0 0 0 / 50%);
}
&, &,
a, a,
.shoutCardTitle, .shoutCardTitle,
@ -775,7 +781,3 @@
.shoutTopicTop { .shoutTopicTop {
margin-bottom: 0.4rem !important; margin-bottom: 0.4rem !important;
} }
.shoutCardNoImage:not(.shoutCardFeed) {
background: rgb(0 0 0 / 50%);
}

View File

@ -109,10 +109,12 @@ export const ArticleCard = (props: ArticleCardProps) => {
[styles.shoutCardNoImage]: !cover [styles.shoutCardNoImage]: !cover
}} }}
> >
<Show when={!props.settings?.noimage && cover && !props.settings?.isFeedMode}> <Show when={!props.settings?.noimage && !props.settings?.isFeedMode}>
<div class={styles.shoutCardCoverContainer}> <div class={styles.shoutCardCoverContainer}>
<div class={styles.shoutCardCover}> <div class={styles.shoutCardCover}>
<img src={imageProxy(cover)} alt={title || ''} loading="lazy" /> <Show when={cover}>
<img src={imageProxy(cover)} alt={title || ''} loading="lazy" />
</Show>
</div> </div>
</div> </div>
</Show> </Show>

View File

@ -14,6 +14,10 @@
li { li {
margin-bottom: 1.6rem; margin-bottom: 1.6rem;
&:last-child {
margin-bottom: 0;
}
&.top { &.top {
border-bottom: 1px solid #e1e1e1; border-bottom: 1px solid #e1e1e1;
display: flex; display: flex;

View File

@ -150,29 +150,31 @@ export const FeedView = () => {
{(article) => <ArticleCard article={article} settings={{ isFeedMode: true }} />} {(article) => <ArticleCard article={article} settings={{ isFeedMode: true }} />}
</For> </For>
<div class={stylesBeside.besideColumnTitle}> <div class={styles.asideSection}>
<h4>{t('Popular authors')}</h4> <div class={stylesBeside.besideColumnTitle}>
<a href="/authors"> <h4>{t('Popular authors')}</h4>
{t('All authors')} <a href="/authors">
<Icon name="arrow-right" class={stylesBeside.icon} /> {t('All authors')}
</a> <Icon name="arrow-right" class={stylesBeside.icon} />
</div> </a>
</div>
<ul class={stylesBeside.besideColumn}> <ul class={stylesBeside.besideColumn}>
<For each={topAuthors().slice(0, 5)}> <For each={topAuthors().slice(0, 5)}>
{(author) => ( {(author) => (
<li> <li>
<AuthorCard <AuthorCard
author={author} author={author}
hideWriteButton={true} hideWriteButton={true}
hasLink={true} hasLink={true}
truncateBio={true} truncateBio={true}
isTextButton={true} isTextButton={true}
/> />
</li> </li>
)} )}
</For> </For>
</ul> </ul>
</div>
<For each={sortedArticles().slice(4)}> <For each={sortedArticles().slice(4)}>
{(article) => <ArticleCard article={article} settings={{ isFeedMode: true }} />} {(article) => <ArticleCard article={article} settings={{ isFeedMode: true }} />}