navheader-fix

This commit is contained in:
Untone 2024-07-03 10:02:46 +03:00
parent e4390d83e6
commit e1275b76ea
8 changed files with 87 additions and 159 deletions

View File

@ -15,8 +15,8 @@
"Add image": "Add image",
"Add images": "Add images",
"Add intro": "Add intro",
"add link": "add link",
"Add link": "Add link",
"add link": "add link",
"Add rule": "Add rule",
"Add signature": "Add signature",
"Add subtitle": "Add subtitle",
@ -30,8 +30,8 @@
"All articles": "All articles",
"All authors": "All authors",
"All posts": "All posts",
"all topics": "all topics",
"All topics": "All topics",
"all topics": "all topics",
"Almost done! Check your email.": "Almost done! Just checking your email.",
"and some more authors": "{restUsersCount, plural, =0 {} one { and one more user} other { and more {restUsersCount} users}}",
"Anything else": "Anything else",
@ -43,10 +43,10 @@
"Artist": "Artist",
"Artworks": "Artworks",
"Audio": "Audio",
"author": "author",
"Author": "Author",
"authors": "authors",
"author": "author",
"Authors": "Authors",
"authors": "authors",
"Autotypograph": "Autotypograph",
"Back": "Back",
"Back to editor": "Back to editor",
@ -54,11 +54,11 @@
"back to menu": "back to menu",
"Be the first to rate": "Be the first to rate",
"Become an author": "Become an author",
"bold": "bold",
"Bold": "Bold",
"bold": "bold",
"Bookmarked": "Saved",
"bookmarks": "bookmarks",
"Bookmarks": "Bookmarks",
"bookmarks": "bookmarks",
"Bullet list": "Bullet list",
"By alphabet": "By alphabet",
"By authors": "By authors",
@ -75,8 +75,8 @@
"Can make any changes, accept or reject suggestions, and share access with others": "Can make any changes, accept or reject suggestions, and share access with others",
"Can offer edits and comments, but cannot edit the post or share access with others": "Can offer edits and comments, but cannot edit the post or share access with others",
"Can write and edit text directly, and accept or reject suggestions from others": "Can write and edit text directly, and accept or reject suggestions from others",
"cancel": "cancel",
"Cancel": "Cancel",
"cancel": "cancel",
"Cancel changes": "Cancel changes",
"Change password": "Change password",
"Characters": "Знаков",
@ -88,8 +88,8 @@
"Co-author": "Co-author",
"Collaborate": "Help Edit",
"Collaborators": "Collaborators",
"collections": "collections",
"Collections": "Collections",
"collections": "collections",
"Come up with a subtitle for your story": "Come up with a subtitle for your story",
"Come up with a title for your story": "Come up with a title for your story",
"Coming soon": "Coming soon",
@ -148,8 +148,8 @@
"Dogma": "Dogma",
"dogma keywords": "Discours.io, dogma, editorial principles, code of ethics, journalism, community",
"Draft successfully deleted": "Draft successfully deleted",
"drafts": "drafts",
"Drafts": "Drafts",
"drafts": "drafts",
"Drag the image to this area": "Drag the image to this area",
"Each image must be no larger than 5 MB.": "Each image must be no larger than 5 MB.",
"earlier": "earlier",
@ -159,8 +159,8 @@
"Editor": "Editor",
"Email": "Mail",
"email not confirmed": "email not confirmed",
"enter": "enter",
"Enter": "Enter",
"enter": "enter",
"Enter a new password": "Enter a new password",
"Enter footnote text": "Enter footnote text",
"Enter image description": "Enter image description",
@ -175,8 +175,8 @@
"FAQ": "Tips and suggestions",
"Favorite": "Favorites",
"Favorite topics": "Favorite topics",
"feed": "feed",
"Feed": "Feed",
"feed": "feed",
"Feed settings": "Feed settings",
"Feedback": "Feedback",
"Fill email": "Fill email",
@ -196,12 +196,13 @@
"Go to main page": "Go to main page",
"Group Chat": "Group Chat",
"Groups": "Groups",
"header 1": "header 1",
"guide": "Knowledge base",
"Header 1": "Header 1",
"header 2": "header 2",
"header 1": "header 1",
"Header 2": "Header 2",
"header 3": "header 3",
"header 2": "header 2",
"Header 3": "Header 3",
"header 3": "header 3",
"Headers": "Headers",
"Help": "Помощь",
"Help to edit": "Help to edit",
@ -247,8 +248,8 @@
"Invite to collab": "Invite to Collab",
"It does not look like url": "It doesn't look like a link",
"It's OK. Just enter your email to receive a link to change your password": "It's OK. Just enter your email to receive a link to change your password",
"italic": "italic",
"Italic": "Italic",
"italic": "italic",
"Join": "Join",
"Join our maillist": "To receive the best postings, just enter your email",
"Join the community": "Join the community",
@ -257,7 +258,6 @@
"jpg, .png, max. 10 mb.": "jpg, .png, макс. 10 мб.",
"Just start typing...": "Just start typing...",
"keywords": "Discours.io, Discours magazine, Discours, culture, science, art, society, independent journalism, literature, music, cinema, video, photography",
"Knowledge base": "Knowledge base",
"Language": "Language",
"Last rev.": "Посл. изм.",
"Let's log in": "Let's log in",
@ -266,8 +266,8 @@
"Link sent, check your email": "Link sent, check your email",
"List of authors of the open editorial community": "List of authors of the open editorial community",
"Lists": "Lists",
"literature": "literature",
"Literature": "Literature",
"literature": "literature",
"Load more": "Show more",
"Loading": "Loading",
"Login and security": "Login and security",
@ -287,10 +287,10 @@
"Most read": "Readable",
"Move down": "Move down",
"Move up": "Move up",
"music": "music",
"Music": "Music",
"my feed": "my ribbon",
"music": "music",
"My feed": "My feed",
"my feed": "my ribbon",
"My subscriptions": "Subscriptions",
"Name": "Name",
"New literary work": "New literary work",
@ -414,8 +414,8 @@
"Song title": "Song title",
"Soon": "Скоро",
"Sorry, this address is already taken, please choose another one.": "Sorry, this address is already taken, please choose another one",
"Special projects": "Special projects",
"Special Projects": "Special Projects",
"Special projects": "Special projects",
"Specify the source and the name of the author": "Specify the source and the name of the author",
"Specify your e-mail and we will reply.": "Specify your e-mail and we will reply.",
"Start conversation": "Start a conversation",
@ -429,13 +429,13 @@
"subscriber": "subscriber",
"subscriber_rp": "subscriber",
"subscribers": "subscribers",
"Subscribing...": "Subscribing...",
"subscribing...": "subscribing...",
"subscription": "subscription",
"Subscribing...": "Subscribing...",
"Subscription": "Subscription",
"subscription": "subscription",
"subscription_rp": "subscription",
"subscriptions": "subscriptions",
"Subscriptions": "Subscriptions",
"subscriptions": "subscriptions",
"Substrate": "Substrate",
"Success": "Success",
"Successfully authorized": "Authorization successful",
@ -443,8 +443,8 @@
"Support Discours": "Support Discours",
"Support the project": "Support the project",
"Support us": "Support us",
"terms of use": "terms of use",
"Terms of use": "Site rules",
"terms of use": "terms of use",
"terms of use keywords": "Discours.io, site rules, terms of use",
"Text checking": "Text checking",
"Thank you": "Thank you",
@ -485,8 +485,8 @@
"Top viewed": "Most viewed",
"Topic is supported by": "Topic is supported by",
"topicKeywords": "{topic}, Discours.io, articles, journalism, research",
"topics": "topics",
"Topics": "Topics",
"topics": "topics",
"Topics which supported by author": "Topics which supported by author",
"try": "попробуйте",
"Try to find another way": "Try to find another way",
@ -505,8 +505,8 @@
"Userpic": "Userpic",
"Users": "Users",
"verified": "verified",
"video": "video",
"Video": "Video",
"video": "video",
"Video format not supported": "Video format not supported",
"view": "view",
"Views": "Views",

View File

@ -16,8 +16,8 @@
"Add image": "Добавить изображение",
"Add images": "Добавить изображения",
"Add intro": "Добавить вступление",
"Add link": "Добавить ссылку",
"add link": "добавить ссылку",
"Add link": "Добавить ссылку",
"Add rule": "Добавить разделитель",
"Add signature": "Добавить подпись",
"Add subtitle": "Добавить подзаголовок",
@ -33,8 +33,8 @@
"All authors": "Все авторы",
"All posts": "Все публикации",
"All posts rating": "Рейтинг всех постов",
"All topics": "Все темы",
"all topics": "все темы",
"All topics": "Все темы",
"Almost done! Check your email.": "Почти готово! Осталось подтвердить вашу почту.",
"and some more authors": "{restUsersCount, plural, =0 {} one { и ещё 1 пользователя} few { и ещё {restUsersCount} пользователей} other { и ещё {restUsersCount} пользователей}}",
"Anything else": "Что-либо ещё",
@ -47,10 +47,10 @@
"Artist...": "Исполнитель...",
"Artworks": "Артворки",
"Audio": "Аудио",
"Author": "Автор",
"author": "автор",
"Authors": "Авторы",
"Author": "Автор",
"authors": "авторы",
"Authors": "Авторы",
"Autotypograph": "Автотипограф",
"Back": "Назад",
"Back to editor": "Вернуться в редактор",
@ -58,11 +58,11 @@
"back to menu": "назад в меню",
"Be the first to rate": "Оцените первым",
"Become an author": "Стать автором",
"Bold": "Жирный",
"bold": "жирный",
"Bold": "Жирный",
"Bookmarked": "Сохранено",
"Bookmarks": "Закладки",
"bookmarks": "закладки",
"Bookmarks": "Закладки",
"Bullet list": "Маркированный список",
"By alphabet": "По алфавиту",
"By authors": "По авторам",
@ -79,8 +79,8 @@
"Can make any changes, accept or reject suggestions, and share access with others": "Может вносить любые изменения, принимать и отклонять предложения, а также делиться доступом с другими",
"Can offer edits and comments, but cannot edit the post or share access with others": "Может предлагать правки и комментарии, но не может изменять пост и делиться доступом с другими",
"Can write and edit text directly, and accept or reject suggestions from others": "Может писать и редактировать текст напрямую, а также принимать или отклонять предложения других",
"Cancel": "Отмена",
"cancel": "отменить",
"Cancel": "Отмена",
"Cancel changes": "Отменить изменения",
"Change password": "Сменить пароль",
"Characters": "Знаков",
@ -92,8 +92,8 @@
"Co-author": "Соавтор",
"Collaborate": "Помочь редактировать",
"Collaborators": "Соавторы",
"Collections": "Коллекции",
"collections": "коллекции",
"Collections": "Коллекции",
"Come up with a subtitle for your story": "Придумайте подзаголовок вашей истории",
"Come up with a title for your story": "Придумайте заголовок вашей истории",
"Coming soon": "Уже скоро",
@ -156,8 +156,8 @@
"Dogma": "Догма",
"dogma keywords": "Discours.io, догма, редакционные принципы, этический кодекс, журналистика, сообщество",
"Draft successfully deleted": "Черновик успешно удален",
"Drafts": "Черновики",
"drafts": "черновики",
"Drafts": "Черновики",
"Drag the image to this area": "Перетащите изображение в эту область",
"Each image must be no larger than 5 MB.": "Каждое изображение должно быть размером не больше 5 мб.",
"earlier": "ранее",
@ -167,8 +167,8 @@
"Editor": "Редактор",
"Email": "Почта",
"email not confirmed": "email не подтвержден",
"Enter": "Войти",
"enter": "войти",
"Enter": "Войти",
"Enter a new password": "Введите новый пароль",
"Enter footnote text": "Введите текст сноски",
"Enter image description": "Введите описание изображения",
@ -183,8 +183,8 @@
"FAQ": "Советы и предложения",
"Favorite": "Избранное",
"Favorite topics": "Избранные темы",
"Feed": "Лента",
"feed": "лента",
"Feed": "Лента",
"Feed settings": "Настроить ленту",
"Feedback": "Обратная связь",
"Fill email": "Введите почту",
@ -206,13 +206,14 @@
"Go to main page": "Перейти на главную",
"Group Chat": "Общий чат",
"Groups": "Группы",
"guide": "База знаний",
"Header": "Заголовок",
"Header 1": "Заголовок 1",
"header 1": "заголовок 1",
"Header 2": "Заголовок 2",
"Header 1": "Заголовок 1",
"header 2": "заголовок 2",
"Header 3": "Заголовок 3",
"Header 2": "Заголовок 2",
"header 3": "заголовок 3",
"Header 3": "Заголовок 3",
"Headers": "Заголовки",
"Help": "Помощь",
"Help to edit": "Помочь редактировать",
@ -259,8 +260,8 @@
"Invite to collab": "Пригласить к участию",
"It does not look like url": "Это не похоже на ссылку",
"It's OK. Just enter your email to receive a link to change your password": "Ничего страшного. Просто укажите свою почту, чтобы получить ссылку для смены пароля",
"Italic": "Курсив",
"italic": "курсив",
"Italic": "Курсив",
"Join": "Присоединиться",
"Join our maillist": "Чтобы получать рассылку лучших публикаций, просто укажите свою почту",
"Join the community": "Присоединиться к сообществу",
@ -270,7 +271,6 @@
"Just start typing...": "Просто начните печатать...",
"Karma": "Карма",
"keywords": "Discours.io, журнал Дискурс, Дискурс, культура, наука, искусство, общество, независимая журналистика, литература, музыка, кино, видео, фотографии",
"Knowledge base": "База знаний",
"Language": "Язык",
"Last rev.": "Посл. изм.",
"Let's log in": "Давайте авторизуемся",
@ -279,8 +279,8 @@
"Link sent, check your email": "Ссылка отправлена, проверьте почту",
"List of authors of the open editorial community": "Список авторов сообщества открытой редакции",
"Lists": "Списки",
"Literature": "Литература",
"literature": "литература",
"Literature": "Литература",
"Load more": "Показать ещё",
"Loading": "Загрузка",
"Login and security": "Вход и безопасность",
@ -300,10 +300,10 @@
"Most read": "Читаемое",
"Move down": "Переместить вниз",
"Move up": "Переместить вверх",
"Music": "Музыка",
"music": "музыка",
"My feed": "Моя лента",
"Music": "Музыка",
"my feed": "моя лента",
"My feed": "Моя лента",
"My subscriptions": "Подписки",
"Name": "Имя",
"New literary work": "Новое произведение",
@ -440,8 +440,8 @@
"Song title": "Название песни",
"Soon": "Скоро",
"Sorry, this address is already taken, please choose another one.": "Увы, этот адрес уже занят, выберите другой",
"Special Projects": "Спецпроекты",
"Special projects": "Спецпроекты",
"Special Projects": "Спецпроекты",
"Specify the source and the name of the author": "Укажите источник и имя автора",
"Specify your e-mail and we will reply.": "Укажите ваш e-mail и мы обязательно ответим.",
"squib": "Подверстка",
@ -457,8 +457,8 @@
"subscriber": "подписчик",
"subscriber_rp": "подписчика",
"subscribers": "подписчиков",
"subscribing...": "Подписка...",
"Subscribing...": "Подписываем...",
"subscribing...": "Подписка...",
"Subscription": "Подписка",
"Subscriptions": "Подписки",
"Substrate": "Подложка",
@ -468,8 +468,8 @@
"Support Discours": "Поддержите Дискурс",
"Support the project": "Поддержать проект",
"Support us": "Помочь журналу",
"Terms of use": "Правила сайта",
"terms of use": "правилами пользования сайтом",
"Terms of use": "Правила сайта",
"terms of use keywords": "Discours.io, правила сайта, terms of use",
"Text checking": "Проверка текста",
"Thank you": "Благодарности",
@ -510,8 +510,8 @@
"Top viewed": "Самое читаемое",
"Topic is supported by": "Тему поддерживают",
"topicKeywords": "{topic}, Discours.io, статьи, журналистика, исследования",
"Topics": "Темы",
"topics": "темы",
"Topics": "Темы",
"Topics which supported by author": "Автор поддерживает темы",
"try": "попробуйте",
"Try to find another way": "Попробуйте найти по-другому",
@ -530,8 +530,8 @@
"Userpic": "Аватар",
"Users": "Пользователи",
"verified": "уже подтверждён",
"Video": "Видео",
"video": "видео",
"Video": "Видео",
"Video format not supported": "Тип видео не поддерживается",
"view": "просмотр",
"Views": "Просмотры",

View File

@ -1,6 +1,6 @@
import { A, useLocation, useNavigate, useSearchParams } from '@solidjs/router'
import { clsx } from 'clsx'
import { For, Show, createEffect, createMemo, createSignal, onCleanup, onMount } from 'solid-js'
import { useUI } from '~/context/ui'
import { useLocalize } from '../../../context/localize'
import { useSession } from '../../../context/session'
@ -17,8 +17,6 @@ import { HeaderAuth } from '../HeaderAuth'
import { Modal } from '../Modal'
import { SearchModal } from '../SearchModal/SearchModal'
import { Snackbar } from '../Snackbar'
import { A, useLocation, useNavigate, useSearchParams } from '@solidjs/router'
import styles from './Header.module.scss'
type Props = {
@ -154,14 +152,9 @@ export const Header = (props: Props) => {
const loc = useLocation()
const handleToggleMenuByLink = (event: MouseEvent, route: string) => {
event.preventDefault()
// console.debug('[Header] toggle menu link from', loc.pathname)
// console.debug('to', route)
if (!fixed()) return
if (loc.pathname.startsWith(route) || loc.pathname.startsWith(`/${route}`)) {
toggleFixed()
}
navigate(route)
}
return (
<header
class={styles.mainHeader}
@ -208,51 +201,22 @@ export const Header = (props: Props) => {
</Show>
<div class={clsx(styles.mainNavigation, { [styles.fixed]: fixed() })}>
<ul class="view-switcher">
<For each={['', 'feed', 'topics', 'authors', 'guide']}>
{(route: string) => (
<li classList={{ 'view-switcher__item--selected': route === loc.pathname }}>
<A
class={clsx({ [styles.mainNavigationItemActive]: loc.pathname === route })}
href={`/${route}`}
onClick={(event) => handleToggleMenuByLink(event, `/${route}`)}
onMouseOver={() => toggleSubnavigation(true, setIsZineVisible)}
onMouseOut={() => hideSubnavigation()}
href="/"
hidden={!isZineVisible()}
onClick={(event) => handleToggleMenuByLink(event, '/')}
>
{t('journal')}
</A>
<A
onMouseOver={() => toggleSubnavigation(true, setIsFeedVisible)}
onMouseOut={() => hideSubnavigation()}
href="/feed"
hidden={!isFeedVisible()}
onClick={(event) => handleToggleMenuByLink(event, '/feed')}
>
{t('feed')}
</A>
<A
onMouseOver={() => toggleSubnavigation(true, setIsTopicsVisible)}
onMouseOut={() => hideSubnavigation}
href="/topics"
hidden={!isTopicsVisible()}
onClick={(event) => handleToggleMenuByLink(event, '/topics')}
>
{t('topics')}
</A>
<A
onMouseOver={() => hideSubnavigation(0)}
onMouseOut={() => hideSubnavigation(0)}
href="/authors"
onClick={(event) => handleToggleMenuByLink(event, '/authors')}
>
{t('authors')}
</A>
<A
onMouseOver={() => toggleSubnavigation(true, setIsKnowledgeBaseVisible)}
onMouseOut={() => hideSubnavigation()}
href="/guide"
hidden={!isKnowledgeBaseVisible()}
onClick={(event) => handleToggleMenuByLink(event, '/guide')}
>
{t('Knowledge base')}
{t(route || 'journal')}
</A>
</li>
)}
</For>
</ul>
<div class={styles.mainNavigationMobile}>

View File

@ -1,38 +0,0 @@
import { clsx } from 'clsx'
import { ROUTES } from '../../../config/routes'
import { ConditionalWrapper } from '../../_shared/ConditionalWrapper'
import { A, useMatch } from '@solidjs/router'
import { createMemo } from 'solid-js'
import styles from './Header.module.scss'
type Props = {
onMouseOver: (event?: MouseEvent, time?: number) => void
onMouseOut: (event?: MouseEvent, time?: number) => void
routeName?: keyof typeof ROUTES
body: string
active?: boolean
onClick?: (event: MouseEvent) => void
}
export const Link = (props: Props) => {
const matchRoute = useMatch(() => props.routeName || '')
const isSelected = createMemo(() => Boolean(matchRoute()))
return (
<li onClick={props.onClick} classList={{ 'view-switcher__item--selected': isSelected() }}>
<ConditionalWrapper
condition={!isSelected && Boolean(props.routeName)}
wrapper={(children) => <A href={props.routeName || ''}>{children}</A>}
>
<span
class={clsx('cursorPointer linkReplacement', { [styles.mainNavigationItemActive]: props.active })}
onMouseOver={props.onMouseOver}
onMouseOut={props.onMouseOut}
>
{props.body}
</span>
</ConditionalWrapper>
</li>
)
}

View File

@ -22,12 +22,16 @@ type Props = {
topWritingAuthors?: Author[]
isLoaded: boolean
}
export const AUTHORS_PER_PAGE = 20
export const ABC = {
ru: 'АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ#',
en: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ#'
}
export const AllAuthors = (props: Props) => {
const { t, lang } = useLocalize()
const [searchQuery, setSearchQuery] = createSignal('')
const ALPHABET =
lang() === 'ru' ? [...'АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ@'] : [...'ABCDEFGHIJKLMNOPQRSTUVWXYZ@']
const alphabet = createMemo(() => ABC[lang()] || ABC['ru'])
const [searchParams] = useSearchParams<{ by?: string }>()
const { authorsSorted, addAuthors, setSortBy } = useAuthors()
@ -41,15 +45,12 @@ export const AllAuthors = (props: Props) => {
})
const filteredAuthors = createMemo(() => {
const query = searchQuery().toLowerCase()
return authorsSorted?.().filter((author: Author) => {
// Предполагаем, что у автора есть свойство name
return author?.name?.toLowerCase().includes(query)
})
return authorsSorted?.().filter((a: Author) => a?.name?.toLowerCase().includes(query))
})
const byLetterFiltered = createMemo<{ [letter: string]: Author[] }>(() => {
return filteredAuthors().reduce(
(acc, author) => authorLetterReduce(acc, author, lang()),
(acc, author: Author) => authorLetterReduce(acc, author, lang()),
{} as { [letter: string]: Author[] }
)
})
@ -119,7 +120,7 @@ export const AllAuthors = (props: Props) => {
<div class="row">
<div class="col-lg-20 col-xl-18">
<ul class={clsx('nodash', styles.alphabet)}>
<For each={ALPHABET}>
<For each={[...alphabet()]}>
{(letter, index) => (
<li>
<Show when={letter in byLetterFiltered()} fallback={letter}>
@ -142,7 +143,7 @@ export const AllAuthors = (props: Props) => {
<For each={sortedKeys()}>
{(letter) => (
<div class={clsx(styles.group, 'group')}>
<h2 id={`letter-${ALPHABET.indexOf(letter)}`}>{letter}</h2>
<h2 id={`letter-${alphabet().indexOf(letter)}`}>{letter}</h2>
<div class="container">
<div class="row">
<div class="col-lg-20">

View File

@ -1,5 +1,5 @@
import { Meta } from '@solidjs/meta'
import { useSearchParams } from '@solidjs/router'
import { A, useSearchParams } from '@solidjs/router'
import { clsx } from 'clsx'
import { For, Show, createEffect, createMemo, createSignal, on, onMount } from 'solid-js'
@ -79,13 +79,13 @@ export const AllTopics = (props: Props) => {
<ul class="view-switcher">
<li classList={{ 'view-switcher__item--selected': searchParams?.by === 'shouts' }}>
<a href="/topics?by=shouts">{t('By shouts')}</a>
<A href="/topics?by=shouts">{t('By shouts')}</A>
</li>
<li classList={{ 'view-switcher__item--selected': searchParams?.by === 'authors' }}>
<a href="/topics?by=authors">{t('By authors')}</a>
<A href="/topics?by=authors">{t('By authors')}</A>
</li>
<li classList={{ 'view-switcher__item--selected': searchParams?.by === 'title' }}>
<a href="/topics?by=title">{t('By title')}</a>
<A href="/topics?by=title">{t('By title')}</A>
</li>
<Show when={searchParams?.by !== 'title'}>
<li class="view-switcher__search">
@ -129,7 +129,7 @@ export const AllTopics = (props: Props) => {
{(letter, index) => (
<li>
<Show when={letter in byLetter()} fallback={letter}>
<a
<A
href={`/topics?by=title#letter-${index()}`}
onClick={(event) => {
event.preventDefault()
@ -137,7 +137,7 @@ export const AllTopics = (props: Props) => {
}}
>
{letter}
</a>
</A>
</Show>
</li>
)}
@ -155,11 +155,11 @@ export const AllTopics = (props: Props) => {
<For each={byLetter()[letter]}>
{(topic) => (
<div class={clsx(styles.topic, 'topic col-sm-12 col-md-8')}>
<a href={`/topic/${topic.slug}`}>
<A href={`/topic/${topic.slug}`}>
{lang() === 'en'
? capitalize(topic.slug.replaceAll('-', ' '))
: topic.title}
</a>
</A>
<span class={styles.articlesCounter}>{topic.stat?.shouts || 0}</span>
</div>
)}

View File

@ -0,0 +1 @@

View File

@ -55,7 +55,7 @@ export default function AllTopicsPage(props: RouteSectionProps<{ authors: Author
<PageLayout withPadding={true} title={`${t('Discours')}:${t('All topics')}`}>
<ReactionsProvider>
<Suspense fallback={<Loading />}>
<AllAuthors authors={authors() || []} isLoaded={Boolean(authors?.())} />
<AllAuthors authors={authors() || []} isLoaded={Boolean(authors())} />
</Suspense>
</ReactionsProvider>
</PageLayout>