code review
This commit is contained in:
parent
0d0494a83a
commit
979c7880c0
|
@ -37,6 +37,7 @@
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.shout-body {
|
.shout-body {
|
||||||
@include font-size(1.5rem);
|
@include font-size(1.5rem);
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
|
@ -44,11 +45,13 @@
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.author {
|
.author {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 1.4rem;
|
margin-bottom: 1.4rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.commentContent {
|
.commentContent {
|
||||||
&:hover {
|
&:hover {
|
||||||
.commentControlReply,
|
.commentControlReply,
|
||||||
|
@ -60,11 +63,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.commentControls {
|
.commentControls {
|
||||||
@include font-size(1.2rem);
|
@include font-size(1.2rem);
|
||||||
|
|
||||||
margin-bottom: 0.5em;
|
margin-bottom: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.commentControlReply,
|
.commentControlReply,
|
||||||
.commentControlShare,
|
.commentControlShare,
|
||||||
.commentControlDelete,
|
.commentControlDelete,
|
||||||
|
@ -75,6 +80,7 @@
|
||||||
transition: opacity 0.3s;
|
transition: opacity 0.3s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.commentControlReply,
|
.commentControlReply,
|
||||||
.commentControlShare,
|
.commentControlShare,
|
||||||
.commentControlDelete,
|
.commentControlDelete,
|
||||||
|
@ -84,6 +90,7 @@
|
||||||
width: 1.2rem;
|
width: 1.2rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.commentControl {
|
.commentControl {
|
||||||
border: none;
|
border: none;
|
||||||
color: #696969;
|
color: #696969;
|
||||||
|
@ -94,6 +101,7 @@
|
||||||
padding: 0.2em 0.3em;
|
padding: 0.2em 0.3em;
|
||||||
transition: opacity 0.2s, color 0.3s, background-color 0.3s;
|
transition: opacity 0.2s, color 0.3s, background-color 0.3s;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: #000;
|
background: #000;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
@ -102,6 +110,7 @@
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
filter: invert(0);
|
filter: invert(0);
|
||||||
margin-right: 0.3em;
|
margin-right: 0.3em;
|
||||||
|
@ -112,12 +121,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.commentControlReply {
|
.commentControlReply {
|
||||||
.icon {
|
.icon {
|
||||||
height: 1.2em;
|
height: 1.2em;
|
||||||
width: 1.2em;
|
width: 1.2em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.commentBody {
|
.commentBody {
|
||||||
@include font-size(1.5rem);
|
@include font-size(1.5rem);
|
||||||
|
|
||||||
|
@ -137,16 +148,19 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.commentAuthor,
|
.commentAuthor,
|
||||||
.commentDate,
|
.commentDate,
|
||||||
.commentRating {
|
.commentRating {
|
||||||
@include font-size(1.2rem);
|
@include font-size(1.2rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
.articleAuthor {
|
.articleAuthor {
|
||||||
color: #2638d9;
|
color: #2638d9;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
margin-right: 12px;
|
margin-right: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.commentDate {
|
.commentDate {
|
||||||
color: rgb(0 0 0 / 30%);
|
color: rgb(0 0 0 / 30%);
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
@ -154,33 +168,41 @@
|
||||||
margin-left: 1rem;
|
margin-left: 1rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.commentDetails {
|
.commentDetails {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-bottom: 1.2rem;
|
margin-bottom: 1.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.commentRating {
|
.commentRating {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.commentRatingValue {
|
.commentRatingValue {
|
||||||
padding: 0 0.3em;
|
padding: 0 0.3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.commentRatingPositive {
|
.commentRatingPositive {
|
||||||
color: #2bb452;
|
color: #2bb452;
|
||||||
}
|
}
|
||||||
|
|
||||||
.commentRatingNegative {
|
.commentRatingNegative {
|
||||||
color: #d00820;
|
color: #d00820;
|
||||||
}
|
}
|
||||||
|
|
||||||
.commentRatingControl {
|
.commentRatingControl {
|
||||||
border-left: 6px solid transparent;
|
border-left: 6px solid transparent;
|
||||||
border-right: 6px solid transparent;
|
border-right: 6px solid transparent;
|
||||||
height: 0;
|
height: 0;
|
||||||
width: 0;
|
width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.commentRatingControlUp {
|
.commentRatingControlUp {
|
||||||
border-bottom: 8px solid rgb(0 0 0 / 40%);
|
border-bottom: 8px solid rgb(0 0 0 / 40%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.commentRatingControlDown {
|
.commentRatingControlDown {
|
||||||
border-top: 8px solid rgb(0 0 0 / 40%);
|
border-top: 8px solid rgb(0 0 0 / 40%);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { t } from '../../utils/intl'
|
import { t } from '../../utils/intl'
|
||||||
import { createMemo, createSignal, For, onMount, Show } from 'solid-js'
|
import { createMemo, For, Show } from 'solid-js'
|
||||||
import type { Shout } from '../../graphql/types.gen'
|
import type { Shout } from '../../graphql/types.gen'
|
||||||
import { capitalize } from '../../utils'
|
import { capitalize } from '../../utils'
|
||||||
import { translit } from '../../utils/ru2en'
|
import { translit } from '../../utils/ru2en'
|
||||||
|
@ -72,7 +72,7 @@ export const ArticleCard = (props: ArticleCardProps) => {
|
||||||
|
|
||||||
const { title, subtitle } = getTitleAndSubtitle(props.article)
|
const { title, subtitle } = getTitleAndSubtitle(props.article)
|
||||||
|
|
||||||
const { cover, layout, slug, authors, stat } = props.article
|
const { cover, layout, slug, authors, stat, body } = props.article
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section
|
<section
|
||||||
|
@ -195,9 +195,9 @@ export const ArticleCard = (props: ArticleCardProps) => {
|
||||||
<div class={styles.shoutCardDetailsItem}>
|
<div class={styles.shoutCardDetailsItem}>
|
||||||
<SharePopup
|
<SharePopup
|
||||||
containerCssClass={stylesHeader.control}
|
containerCssClass={stylesHeader.control}
|
||||||
title={props.article['title']}
|
title={title}
|
||||||
description={getDescription(props.article['body'])}
|
description={getDescription(body)}
|
||||||
imageUrl={props.article['cover']}
|
imageUrl={cover}
|
||||||
shareUrl={getShareUrl({ pathname: `/${slug}` })}
|
shareUrl={getShareUrl({ pathname: `/${slug}` })}
|
||||||
trigger={
|
trigger={
|
||||||
<button>
|
<button>
|
||||||
|
@ -210,9 +210,9 @@ export const ArticleCard = (props: ArticleCardProps) => {
|
||||||
<div class={styles.shoutCardDetailsItem}>
|
<div class={styles.shoutCardDetailsItem}>
|
||||||
<FeedArticlePopup
|
<FeedArticlePopup
|
||||||
containerCssClass={stylesHeader.control}
|
containerCssClass={stylesHeader.control}
|
||||||
title={props.article['title']}
|
title={title}
|
||||||
description={getDescription(props.article['body'])}
|
description={getDescription(body)}
|
||||||
imageUrl={props.article['cover']}
|
imageUrl={cover}
|
||||||
shareUrl={getShareUrl({ pathname: `/${slug}` })}
|
shareUrl={getShareUrl({ pathname: `/${slug}` })}
|
||||||
trigger={
|
trigger={
|
||||||
<button>
|
<button>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import styles from './FeedArticlePopup.module.scss'
|
import styles from './FeedArticlePopup.module.scss'
|
||||||
import type { PopupProps } from '../_shared/Popup'
|
import type { PopupProps } from '../_shared/Popup'
|
||||||
import { Popup } from '../_shared/Popup'
|
import { Popup } from '../_shared/Popup'
|
||||||
|
import { t } from '../../utils/intl'
|
||||||
|
|
||||||
type FeedArticlePopupProps = {
|
type FeedArticlePopupProps = {
|
||||||
title: string
|
title: string
|
||||||
|
@ -20,38 +21,73 @@ export const FeedArticlePopup = (props: FeedArticlePopupProps) => {
|
||||||
<Popup {...props} variant="tiny" popupCssClass={styles.feedArticlePopup}>
|
<Popup {...props} variant="tiny" popupCssClass={styles.feedArticlePopup}>
|
||||||
<ul class="nodash">
|
<ul class="nodash">
|
||||||
<li>
|
<li>
|
||||||
<button role="button" onClick={() => {}}>
|
<button
|
||||||
Поделиться
|
role="button"
|
||||||
|
onClick={() => {
|
||||||
|
alert('Share')
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t('Share')}
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<button role="button" onClick={() => {}}>
|
<button
|
||||||
Помочь редактировать
|
role="button"
|
||||||
|
onClick={() => {
|
||||||
|
alert('Help to edit')
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t('Help to edit')}
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<button role="button" onClick={() => {}}>
|
<button
|
||||||
Пригласить экспертов
|
role="button"
|
||||||
|
onClick={() => {
|
||||||
|
alert('Invite experts')
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t('Invite experts')}
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<button role="button" onClick={() => {}}>
|
<button
|
||||||
Подписаться на комментарии
|
role="button"
|
||||||
|
onClick={() => {
|
||||||
|
alert('Subscribe to comments')
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t('Subscribe to comments')}
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<button role="button" onClick={() => {}}>
|
<button
|
||||||
Добавить в закладки
|
role="button"
|
||||||
|
onClick={() => {
|
||||||
|
alert('Add to bookmarks')
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t('Add to bookmarks')}
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<button role="button" onClick={() => {}}>
|
<button
|
||||||
Пожаловаться
|
role="button"
|
||||||
|
onClick={() => {
|
||||||
|
alert('Report')
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t('Report')}
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<button role="button" onClick={() => {}}>
|
<button
|
||||||
Получать уведомления
|
role="button"
|
||||||
|
onClick={() => {
|
||||||
|
alert('Get notifications')
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t('Get notifications')}
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -8,9 +8,11 @@
|
||||||
&.primary {
|
&.primary {
|
||||||
background: #000;
|
background: #000;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: #ccc;
|
color: #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
color: #9fa1a7;
|
color: #9fa1a7;
|
||||||
}
|
}
|
||||||
|
@ -19,9 +21,11 @@
|
||||||
&.secondary {
|
&.secondary {
|
||||||
background: #f7f7f7;
|
background: #f7f7f7;
|
||||||
color: #141414;
|
color: #141414;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: #e8e8e8;
|
background: #e8e8e8;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
background: #ccc;
|
background: #ccc;
|
||||||
}
|
}
|
||||||
|
@ -33,6 +37,7 @@
|
||||||
color: #9fa1a7;
|
color: #9fa1a7;
|
||||||
background: #f6f6f6;
|
background: #f6f6f6;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.loading,
|
&.loading,
|
||||||
&.loading:hover {
|
&.loading:hover {
|
||||||
background: #f6f6f6;
|
background: #f6f6f6;
|
||||||
|
|
|
@ -222,5 +222,9 @@
|
||||||
"Write a comment...": "Написать комментарий...",
|
"Write a comment...": "Написать комментарий...",
|
||||||
"Add comment": "Комментировать",
|
"Add comment": "Комментировать",
|
||||||
"My subscriptions": "Подписки",
|
"My subscriptions": "Подписки",
|
||||||
"Nothing here yet": "Здесь пока ничего нет"
|
"Nothing here yet": "Здесь пока ничего нет",
|
||||||
|
"Invite experts": "Пригласить экспертов",
|
||||||
|
"Subscribe to comments": "Подписаться на комментарии",
|
||||||
|
"Add to bookmarks": "Добавить в закладки",
|
||||||
|
"Get notifications": "Получать уведомления"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user