diff options
| author | Leitwolf11 | 2026-10-03 15:42:08 +0300 |
|---|---|---|
| committer | Leitwolf11 | 2026-10-03 15:42:08 +0300 |
| commit | 549b164464855ae3605c03b58497f91d26555418 (patch) | |
| tree | 829df551495a11df26b1ebd4cd877db3297deaae /apps/web/app | |
| parent | 715953aeaa98ba977e694e8897ccd40151ee0ac0 (diff) | |
| parent | 282b015e23474c3bb78fe303af627248f5bd2d7a (diff) | |
| download | progmaweb-ci/docfx.tar.gz | |
Merge remote-tracking branch 'origin/main' into ci/docfxci/docfx
Diffstat (limited to 'apps/web/app')
| -rw-r--r-- | apps/web/app/globals.css | 22 | ||||
| -rw-r--r-- | apps/web/app/layout.tsx | 8 | ||||
| -rw-r--r-- | apps/web/app/page.tsx | 6 | ||||
| -rw-r--r-- | apps/web/app/viget/dslplugins/page.tsx | 4 | ||||
| -rw-r--r-- | apps/web/app/viget/page.tsx | 6 |
5 files changed, 39 insertions, 7 deletions
diff --git a/apps/web/app/globals.css b/apps/web/app/globals.css index 2022863..3a27983 100644 --- a/apps/web/app/globals.css +++ b/apps/web/app/globals.css @@ -1393,3 +1393,25 @@ a { transition-duration: 0.01ms !important; } } + +/* + * Right-to-left text. Only the text follows the direction of the language: + * the page layout, the navigation and code keep their left-to-right + * arrangement. Blocks of prose run right to left, and short pieces such as + * links, buttons and list items take the direction of their own first + * letter, so a product name on its own still reads left to right. + */ +[data-text-direction="rtl"] + :is(h1, h2, h3, h4, h5, h6, p, blockquote, figcaption, dt, dd, legend) { + direction: rtl; +} + +[data-text-direction="rtl"] + :is(a, button, label, li, small, strong, span, option, summary) { + unicode-bidi: plaintext; +} + +[data-text-direction="rtl"] :is(code, pre, kbd, samp, input) { + direction: ltr; + unicode-bidi: isolate; +} diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index 4eae3fd..de04763 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -4,6 +4,7 @@ import type { Metadata } from "next"; import type { ReactNode } from "react"; import { getLocale } from "@/lib/locale.server"; +import { textDirection } from "@/lib/localization"; import "./globals.css"; import "./viget.css"; @@ -42,7 +43,12 @@ export default async function RootLayout({ }: Readonly<{ children: ReactNode }>) { const locale = await getLocale(); return ( - <html lang={locale} data-theme="light" suppressHydrationWarning> + <html + lang={locale} + data-text-direction={textDirection(locale)} + data-theme="light" + suppressHydrationWarning + > <head> <script dangerouslySetInnerHTML={{ __html: themeBootstrap }} /> </head> diff --git a/apps/web/app/page.tsx b/apps/web/app/page.tsx index 345c835..2aabe5a 100644 --- a/apps/web/app/page.tsx +++ b/apps/web/app/page.tsx @@ -6,7 +6,7 @@ import { Fragment } from "react"; import { Footer } from "@/components/Footer"; import { SiteHeader } from "@/components/SiteHeader"; import { getLocale } from "@/lib/locale.server"; -import { getMessages } from "@/lib/localization"; +import { forwardArrow, getMessages } from "@/lib/localization"; export async function generateMetadata(): Promise<Metadata> { const { metadata } = getMessages(await getLocale()); @@ -118,7 +118,9 @@ export default async function Homepage() { <p className="eyebrow">{eyebrow}</p> <h3>{name}</h3> <p>{description}</p> - <a href={productLinks[index]?.href}>{action} →</a> + <a href={productLinks[index]?.href}> + {action} {forwardArrow(locale)} + </a> </article> ), )} diff --git a/apps/web/app/viget/dslplugins/page.tsx b/apps/web/app/viget/dslplugins/page.tsx index 8a4be8c..c17c0cf 100644 --- a/apps/web/app/viget/dslplugins/page.tsx +++ b/apps/web/app/viget/dslplugins/page.tsx @@ -5,7 +5,7 @@ import type { Metadata } from "next"; import { ViGetFooter } from "@/components/ViGetFooter"; import { ViGetHeader } from "@/components/ViGetHeader"; import { getLocale } from "@/lib/locale.server"; -import { getMessages } from "@/lib/localization"; +import { forwardArrow, getMessages } from "@/lib/localization"; export async function generateMetadata(): Promise<Metadata> { const { metadata } = getMessages(await getLocale()); @@ -43,7 +43,7 @@ export default async function DslPluginsPage() { className="viget-text-link" href="https://github.com/Progmasoft/visual-xsharp" > - {viget.followDevelopment} → + {viget.followDevelopment} {forwardArrow(locale)} </a> </div> </div> diff --git a/apps/web/app/viget/page.tsx b/apps/web/app/viget/page.tsx index 2bf9161..b1c697a 100644 --- a/apps/web/app/viget/page.tsx +++ b/apps/web/app/viget/page.tsx @@ -5,7 +5,7 @@ import type { Metadata } from "next"; import { ViGetFooter } from "@/components/ViGetFooter"; import { ViGetHeader } from "@/components/ViGetHeader"; import { getLocale } from "@/lib/locale.server"; -import { getMessages } from "@/lib/localization"; +import { forwardArrow, getMessages } from "@/lib/localization"; export async function generateMetadata(): Promise<Metadata> { const { metadata } = getMessages(await getLocale()); @@ -103,7 +103,9 @@ export default async function ViGetPage() { viget.progmasoft.com/dslplugins/<Publisher>/<Name>/ </code> <small>{viget.kotlinDescription}</small> - <strong>{viget.openCatalog} →</strong> + <strong> + {viget.openCatalog} {forwardArrow(locale)} + </strong> </a> </div> </div> |