From e83fd35b8561928081c7b96a7568e1f2d3352224 Mon Sep 17 00:00:00 2001
From: Untone
Date: Fri, 5 Jul 2024 10:23:59 +0300
Subject: [PATCH] static-routes-fixes
---
src/components/Discours/Banner.tsx | 2 +-
src/components/Discours/Footer.tsx | 8 ++++----
src/components/Discours/Hero.tsx | 2 +-
src/components/Nav/AuthModal/index.tsx | 2 +-
src/components/Nav/Header/Header.tsx | 8 ++++----
src/routes/{ => (static)}/guide/(guide).tsx | 0
src/routes/{ => (static)}/guide/debate.tsx | 0
src/routes/(static)/guide/dogma.tsx | 0
src/routes/{ => (static)}/guide/principles.tsx | 0
src/routes/{guide => (static)}/manifest.tsx | 6 +++---
src/routes/{guide => (static)}/partners.tsx | 0
.../support/(support).tsx} | 0
.../{guide => (static)/support}/thanks.tsx | 2 +-
src/routes/{guide => (static)}/terms.tsx | 0
src/routes/guide/projects.tsx | 18 ------------------
tests/page-sections.spec.ts | 4 +---
16 files changed, 16 insertions(+), 36 deletions(-)
rename src/routes/{ => (static)}/guide/(guide).tsx (100%)
rename src/routes/{ => (static)}/guide/debate.tsx (100%)
create mode 100644 src/routes/(static)/guide/dogma.tsx
rename src/routes/{ => (static)}/guide/principles.tsx (100%)
rename src/routes/{guide => (static)}/manifest.tsx (97%)
rename src/routes/{guide => (static)}/partners.tsx (100%)
rename src/routes/{guide/support.tsx => (static)/support/(support).tsx} (100%)
rename src/routes/{guide => (static)/support}/thanks.tsx (99%)
rename src/routes/{guide => (static)}/terms.tsx (100%)
delete mode 100644 src/routes/guide/projects.tsx
diff --git a/src/components/Discours/Banner.tsx b/src/components/Discours/Banner.tsx
index 572e93a8..d0822e73 100644
--- a/src/components/Discours/Banner.tsx
+++ b/src/components/Discours/Banner.tsx
@@ -16,7 +16,7 @@ export default () => {
{t('Discours exists because of our common effort')}
- {t('Support us')}
+ {t('Support us')}
{t('Become an author')}
showModal('auth')}>
{t('Join the community')}
diff --git a/src/components/Discours/Footer.tsx b/src/components/Discours/Footer.tsx
index 834578a2..409db48b 100644
--- a/src/components/Discours/Footer.tsx
+++ b/src/components/Discours/Footer.tsx
@@ -25,7 +25,7 @@ export const FooterView = () => {
{
header: t('About the project'),
items: [
- { title: t('Discours Manifest'), slug: '/guide/manifest' },
+ { title: t('Discours Manifest'), slug: '/manifest' },
{ title: t('How it works'), slug: '/guide' },
{ title: t('Dogma'), slug: '/guide/dogma' },
{ title: t('Our principles'), slug: '/guide/principles' },
@@ -37,7 +37,7 @@ export const FooterView = () => {
items: [
{ title: t('Suggest an idea'), slug: '/connect' },
{ title: t('Become an author'), slug: '/edit/new' },
- { title: t('Support Discours'), slug: '/guide/support' },
+ { title: t('Support Discours'), slug: '/support' },
{
title: t('Work with us'),
slug: 'https://docs.google.com/forms/d/e/1FAIpQLSeNNvIzKlXElJtkPkYiXl-jQjlvsL9u4-kpnoRjz1O8Wo40xQ/viewform'
@@ -49,7 +49,7 @@ export const FooterView = () => {
items: [
{ title: t('Authors'), slug: '/author' },
{ title: t('Communities'), slug: '/community' },
- { title: t('Partners'), slug: '/guide/partners' },
+ { title: t('Partners'), slug: '/partners' },
{ title: t('Special projects'), slug: '/guide/projects' },
{
title: lang() === 'ru' ? 'English' : 'Русский',
@@ -97,7 +97,7 @@ export const FooterView = () => {
'Independant magazine with an open horizontal cooperation about culture, science and society'
)}
. {t('Discours')} © 2015–{new Date().getFullYear()}{' '}
- {t('Terms of use')}
+ {t('Terms of use')}
diff --git a/src/components/Nav/AuthModal/index.tsx b/src/components/Nav/AuthModal/index.tsx
index 1c3e29b8..f922d77d 100644
--- a/src/components/Nav/AuthModal/index.tsx
+++ b/src/components/Nav/AuthModal/index.tsx
@@ -82,7 +82,7 @@ export const AuthModal = () => {
{t('By signing up you agree with our')}{' '}
{
hideModal()
}}
diff --git a/src/components/Nav/Header/Header.tsx b/src/components/Nav/Header/Header.tsx
index 49bb8517..951465e6 100644
--- a/src/components/Nav/Header/Header.tsx
+++ b/src/components/Nav/Header/Header.tsx
@@ -222,7 +222,7 @@ export const Header = (props: Props) => {
{t('Suggest an idea')}
- {t('Support the project')}
+ {t('Support the project')}
@@ -351,13 +351,13 @@ export const Header = (props: Props) => {
{t('Community Our principles')}
- {t('Platform Guide')}
+ {t('Platform Guide')}
- {t('Support us')}
+ {t('Support us')}
- {t('How to help')}
+ {t('How to help')}
diff --git a/src/routes/guide/(guide).tsx b/src/routes/(static)/guide/(guide).tsx
similarity index 100%
rename from src/routes/guide/(guide).tsx
rename to src/routes/(static)/guide/(guide).tsx
diff --git a/src/routes/guide/debate.tsx b/src/routes/(static)/guide/debate.tsx
similarity index 100%
rename from src/routes/guide/debate.tsx
rename to src/routes/(static)/guide/debate.tsx
diff --git a/src/routes/(static)/guide/dogma.tsx b/src/routes/(static)/guide/dogma.tsx
new file mode 100644
index 00000000..e69de29b
diff --git a/src/routes/guide/principles.tsx b/src/routes/(static)/guide/principles.tsx
similarity index 100%
rename from src/routes/guide/principles.tsx
rename to src/routes/(static)/guide/principles.tsx
diff --git a/src/routes/guide/manifest.tsx b/src/routes/(static)/manifest.tsx
similarity index 97%
rename from src/routes/guide/manifest.tsx
rename to src/routes/(static)/manifest.tsx
index 8518450d..1d75ebcb 100644
--- a/src/routes/guide/manifest.tsx
+++ b/src/routes/(static)/manifest.tsx
@@ -59,7 +59,7 @@ export const ManifestPage = () => {
Редакция Дискурса открыта для всех: у нас нет цензуры, запретных тем и идеологических
рамок. Каждый может прислать материал в журнал и
- присоединиться к редакции. Предоставляя трибуну для независимой
+ присоединиться к редакции. Предоставляя трибуну для независимой
журналистики и художественных проектов, мы помогаем людям рассказывать свои истории так,
чтобы они были услышаны. Мы убеждены: чем больше голосов будет звучать на Дискурсе, тем
громче в полифонии мнений будет слышна истина.
@@ -70,7 +70,7 @@ export const ManifestPage = () => {
- Дискурс создается открытым сообществом энтузиастов новой независимой
+ Дискурс создается открытым сообществом энтузиастов новой независимой
журналистики. Участвовать в открытой редакции и помогать журналу можно следующими
способами:
@@ -93,7 +93,7 @@ export const ManifestPage = () => {
Дискурс существует на пожертвования читателей. Если вам нравится журнал, пожалуйста,{' '}
- поддержите нашу работу. Ваши пожертвования пойдут на выпуск
+ поддержите нашу работу. Ваши пожертвования пойдут на выпуск
новых материалов, оплату серверов, труда программистов, дизайнеров и редакторов.
diff --git a/src/routes/guide/partners.tsx b/src/routes/(static)/partners.tsx
similarity index 100%
rename from src/routes/guide/partners.tsx
rename to src/routes/(static)/partners.tsx
diff --git a/src/routes/guide/support.tsx b/src/routes/(static)/support/(support).tsx
similarity index 100%
rename from src/routes/guide/support.tsx
rename to src/routes/(static)/support/(support).tsx
diff --git a/src/routes/guide/thanks.tsx b/src/routes/(static)/support/thanks.tsx
similarity index 99%
rename from src/routes/guide/thanks.tsx
rename to src/routes/(static)/support/thanks.tsx
index 1b57fe9f..db526ccf 100644
--- a/src/routes/guide/thanks.tsx
+++ b/src/routes/(static)/support/thanks.tsx
@@ -85,7 +85,7 @@ export const ThanksPage = () => {
всем, кто нас поддерживает. Ваши пожертвования — финансовый фундамент журнала. Благодаря
вам мы развиваем платформу качественной журналистики, которая помогает самым разным авторам
быть услышанными. Стать нашим меценатом и подписаться на ежемесячную поддержку проекта
- можно здесь.
+ можно здесь.
)
diff --git a/src/routes/guide/terms.tsx b/src/routes/(static)/terms.tsx
similarity index 100%
rename from src/routes/guide/terms.tsx
rename to src/routes/(static)/terms.tsx
diff --git a/src/routes/guide/projects.tsx b/src/routes/guide/projects.tsx
deleted file mode 100644
index 9e33580e..00000000
--- a/src/routes/guide/projects.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import { PageLayout } from '~/components/_shared/PageLayout'
-import { useLocalize } from '~/context/localize'
-
-export const ProjectsPage = () => {
- const { t } = useLocalize()
- return (
-
-
-
-
-
- )
-}
-export default ProjectsPage
diff --git a/tests/page-sections.spec.ts b/tests/page-sections.spec.ts
index e90a4bb2..d1a42133 100644
--- a/tests/page-sections.spec.ts
+++ b/tests/page-sections.spec.ts
@@ -2,8 +2,6 @@
import https from 'node:https'
import { type Page, expect, test } from '@playwright/test'
-const baseHost = process.env.BASE_URL || 'https://localhost:3000'
-
/* Global starting test config */
let page: Page
@@ -63,7 +61,7 @@ test.afterAll(async () => {
const pagesTitles = {
'/': /Дискурс/,
'/feed': /Лента/,
- '/guide/support': /Поддержите Дискурс/,
+ '/support': /Поддержите Дискурс/,
'/author': /Авторы/,
'/topic': /Темы и сюжеты/
}