Feature/en locale fix (#278)

* en locale fix

* lint

---------

Co-authored-by: Igor Lobanov <igor.lobanov@onetwotrip.com>
This commit is contained in:
Ilya Y 2023-10-23 14:15:19 +03:00 committed by GitHub
parent 5912e6e1a1
commit 023e0067f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 24 additions and 23 deletions

View File

@ -3,7 +3,6 @@ import { clsx } from 'clsx'
import { getPagePath } from '@nanostores/router' import { getPagePath } from '@nanostores/router'
import MD from './MD' import MD from './MD'
import { AuthorCard } from '../Author/AuthorCard'
import { Userpic } from '../Author/Userpic' import { Userpic } from '../Author/Userpic'
import { CommentRatingControl } from './CommentRatingControl' import { CommentRatingControl } from './CommentRatingControl'
import { CommentDate } from './CommentDate' import { CommentDate } from './CommentDate'

View File

@ -11,7 +11,6 @@ import { MediaItem } from '../../pages/types'
import { DEFAULT_HEADER_OFFSET, router, useRouter } from '../../stores/router' import { DEFAULT_HEADER_OFFSET, router, useRouter } from '../../stores/router'
import { getDescription } from '../../utils/meta' import { getDescription } from '../../utils/meta'
import { imageProxy } from '../../utils/imageProxy' import { imageProxy } from '../../utils/imageProxy'
import { AuthorCard } from '../Author/AuthorCard'
import { TableOfContents } from '../TableOfContents' import { TableOfContents } from '../TableOfContents'
import { AudioPlayer } from './AudioPlayer' import { AudioPlayer } from './AudioPlayer'
import { SharePopup } from './SharePopup' import { SharePopup } from './SharePopup'

View File

@ -11,19 +11,22 @@
@include media-breakpoint-down(md) { @include media-breakpoint-down(md) {
justify-content: center; justify-content: center;
} }
@include media-breakpoint-up(md) { @include media-breakpoint-up(md) {
margin-bottom: 2.4rem; margin-bottom: 2.4rem;
} }
.authorName { .authorName {
@include font-size(4rem); @include font-size(4rem);
font-weight: 700; font-weight: 700;
margin-bottom: 0.2em; margin-bottom: 0.2em;
} }
.authorAbout { .authorAbout {
color: #696969;
@include font-size(2rem); @include font-size(2rem);
color: #696969;
font-weight: 500; font-weight: 500;
margin-top: 1.5rem; margin-top: 1.5rem;
} }
@ -119,6 +122,7 @@
.authorName { .authorName {
@include font-size(4rem); @include font-size(4rem);
line-height: 1.1; line-height: 1.1;
} }
@ -172,9 +176,10 @@
} }
.authorSubscribeSocialLabel { .authorSubscribeSocialLabel {
@include font-size(1.6rem);
color: #000; color: #000;
display: block; display: block;
@include font-size(1.6rem);
left: 100%; left: 100%;
padding-left: 0.4rem; padding-left: 0.4rem;
position: absolute; position: absolute;
@ -429,9 +434,11 @@
&:nth-child(1) { &:nth-child(1) {
z-index: 2; z-index: 2;
} }
&:nth-child(2) { &:nth-child(2) {
z-index: 1; z-index: 1;
} }
&:not(:last-child) { &:not(:last-child) {
margin-right: -4px; margin-right: -4px;
box-shadow: 0 0 0 1px var(--background-color); box-shadow: 0 0 0 1px var(--background-color);

View File

@ -1,8 +1,5 @@
import { createSignal, For, Show } from 'solid-js' import { createSignal, For, Show } from 'solid-js'
import type { Author } from '../../../graphql/types.gen'
import { useAuthorsStore } from '../../../stores/zine/authors'
import { Icon } from '../../_shared/Icon' import { Icon } from '../../_shared/Icon'
import { useTopicsStore } from '../../../stores/zine/topics'
import { useArticlesStore } from '../../../stores/zine/articles' import { useArticlesStore } from '../../../stores/zine/articles'
import { useSeenStore } from '../../../stores/zine/seen' import { useSeenStore } from '../../../stores/zine/seen'
import { useSession } from '../../../context/session' import { useSession } from '../../../context/session'
@ -13,18 +10,12 @@ import { Userpic } from '../../Author/Userpic'
import { getPagePath } from '@nanostores/router' import { getPagePath } from '@nanostores/router'
import { router, useRouter } from '../../../stores/router' import { router, useRouter } from '../../../stores/router'
type FeedSidebarProps = { export const Sidebar = () => {
authors: Author[]
}
export const Sidebar = (props: FeedSidebarProps) => {
const { t } = useLocalize() const { t } = useLocalize()
const { seen } = useSeenStore() const { seen } = useSeenStore()
const { subscriptions } = useSession() const { subscriptions } = useSession()
const { page } = useRouter() const { page } = useRouter()
const { authorEntities } = useAuthorsStore({ authors: props.authors })
const { articlesByTopic } = useArticlesStore() const { articlesByTopic } = useArticlesStore()
const { topicEntities } = useTopicsStore()
const [isSubscriptionsVisible, setSubscriptionsVisible] = createSignal(true) const [isSubscriptionsVisible, setSubscriptionsVisible] = createSignal(true)
const checkTopicIsSeen = (topicSlug: string) => { const checkTopicIsSeen = (topicSlug: string) => {

View File

@ -1,5 +1,5 @@
import { clsx } from 'clsx' import { clsx } from 'clsx'
import type { Author, Notification } from '../../../graphql/types.gen' import type { Notification } from '../../../graphql/types.gen'
import { createMemo, createSignal, onMount, Show } from 'solid-js' import { createMemo, createSignal, onMount, Show } from 'solid-js'
import { NotificationType } from '../../../graphql/types.gen' import { NotificationType } from '../../../graphql/types.gen'
import { getPagePath, openPage } from '@nanostores/router' import { getPagePath, openPage } from '@nanostores/router'

View File

@ -34,7 +34,7 @@ export const AllTopicsView = (props: AllTopicsViewProps) => {
sortBy: searchParams().by || 'shouts' sortBy: searchParams().by || 'shouts'
}) })
const { session, subscriptions } = useSession() const { subscriptions } = useSession()
onMount(() => { onMount(() => {
if (!searchParams().by) { if (!searchParams().by) {

View File

@ -35,7 +35,6 @@ export const AuthorView = (props: Props) => {
const { authorEntities } = useAuthorsStore({ authors: [props.author] }) const { authorEntities } = useAuthorsStore({ authors: [props.author] })
const { page: getPage } = useRouter() const { page: getPage } = useRouter()
const { user } = useSession()
const author = createMemo(() => authorEntities()[props.authorSlug]) const author = createMemo(() => authorEntities()[props.authorSlug])
const [isLoadMoreButtonVisible, setIsLoadMoreButtonVisible] = createSignal(false) const [isLoadMoreButtonVisible, setIsLoadMoreButtonVisible] = createSignal(false)
const [isBioExpanded, setIsBioExpanded] = createSignal(false) const [isBioExpanded, setIsBioExpanded] = createSignal(false)

View File

@ -1,10 +1,8 @@
import { createEffect, createSignal, For, on, onMount, Show } from 'solid-js' import { createEffect, createSignal, For, on, onMount, Show } from 'solid-js'
import { Icon } from '../_shared/Icon' import { Icon } from '../_shared/Icon'
import { ArticleCard } from '../Feed/ArticleCard' import { ArticleCard } from '../Feed/ArticleCard'
import { AuthorCard } from '../Author/AuthorCard'
import { Sidebar } from '../Feed/Sidebar' import { Sidebar } from '../Feed/Sidebar'
import { useArticlesStore, resetSortedArticles } from '../../stores/zine/articles' import { useArticlesStore, resetSortedArticles } from '../../stores/zine/articles'
import { useAuthorsStore } from '../../stores/zine/authors'
import { useTopicsStore } from '../../stores/zine/topics' import { useTopicsStore } from '../../stores/zine/topics'
import { useTopAuthorsStore } from '../../stores/zine/topAuthors' import { useTopAuthorsStore } from '../../stores/zine/topAuthors'
import { clsx } from 'clsx' import { clsx } from 'clsx'
@ -50,8 +48,6 @@ export const FeedView = (props: Props) => {
// state // state
const { sortedArticles } = useArticlesStore() const { sortedArticles } = useArticlesStore()
const { sortedAuthors } = useAuthorsStore()
const { topTopics } = useTopicsStore() const { topTopics } = useTopicsStore()
const { topAuthors } = useTopAuthorsStore() const { topAuthors } = useTopAuthorsStore()
const [isLoadMoreButtonVisible, setIsLoadMoreButtonVisible] = createSignal(false) const [isLoadMoreButtonVisible, setIsLoadMoreButtonVisible] = createSignal(false)
@ -115,7 +111,7 @@ export const FeedView = (props: Props) => {
<div class="wide-container feed"> <div class="wide-container feed">
<div class="row"> <div class="row">
<div class={clsx('col-md-5 col-xl-4', styles.feedNavigation)}> <div class={clsx('col-md-5 col-xl-4', styles.feedNavigation)}>
<Sidebar authors={sortedAuthors()} /> <Sidebar />
</div> </div>
<div class="col-md-12 offset-xl-1"> <div class="col-md-12 offset-xl-1">

View File

@ -119,7 +119,10 @@
font-weight: 400; font-weight: 400;
line-height: 1.3; line-height: 1.3;
margin-bottom: 0.8rem; margin-bottom: 0.8rem;
transition: color 0.2s, background-color 0.2s, box-shadow 0.2s; transition:
color 0.2s,
background-color 0.2s,
box-shadow 0.2s;
} }
.shoutAuthor { .shoutAuthor {
@ -154,6 +157,7 @@
padding: 1rem 0; padding: 1rem 0;
gap: 1rem; gap: 1rem;
} }
.cancel { .cancel {
margin-right: auto; margin-right: auto;
} }

View File

@ -18,6 +18,7 @@
left: 0; left: 0;
top: 0; top: 0;
} }
&:nth-child(2) { &:nth-child(2) {
right: 0; right: 0;
bottom: 0; bottom: 0;
@ -32,10 +33,12 @@
left: 14px; left: 14px;
top: 0; top: 0;
} }
&:nth-child(2) { &:nth-child(2) {
left: 0; left: 0;
top: 17px; top: 17px;
} }
&:nth-child(3) { &:nth-child(3) {
right: 0; right: 0;
top: 21px; top: 21px;
@ -53,10 +56,12 @@
left: 0; left: 0;
top: 0; top: 0;
} }
&:nth-child(2) { &:nth-child(2) {
right: 0; right: 0;
top: 0; top: 0;
} }
&:nth-child(3) { &:nth-child(3) {
left: 0; left: 0;
bottom: 0; bottom: 0;

View File

@ -17,6 +17,7 @@
.input { .input {
@include font-size(2rem); @include font-size(2rem);
background: none; background: none;
color: #fff; color: #fff;
font-family: inherit; font-family: inherit;