From 8a6d697308162874a236c84aac0b0f8c7ac01f83 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Tue, 1 Sep 2026 14:48:45 +0300 Subject: refactor: separate website presentation from runtime --- website/src/components/Banner.astro | 75 ------------------------------------- 1 file changed, 75 deletions(-) delete mode 100644 website/src/components/Banner.astro (limited to 'website/src/components/Banner.astro') diff --git a/website/src/components/Banner.astro b/website/src/components/Banner.astro deleted file mode 100644 index cc6567a6..00000000 --- a/website/src/components/Banner.astro +++ /dev/null @@ -1,75 +0,0 @@ ---- -import versions from '../data/docs-versions.json'; -import { docsRoute, docsTargetHref } from '../docs-path'; - -const { entry, locale, isFallback } = Astro.locals.starlightRoute; -const { banner } = entry.data; - -const issuesUrl = 'https://github.com/herdrdev/herdr/issues/new?template=translation.yml'; -const translationNotices = { - ja: `このページの翻訳は LLM によって生成されています。誤りに気づいた場合は GitHub で issue を開いてお知らせください。`, - 'zh-cn': `本页面的翻译由 LLM 生成。如果你发现翻译有误,请在 GitHub 上提交 issue 告诉我们。`, -}; -const translationNotice = locale && !isFallback ? translationNotices[locale] : undefined; -const docs = docsRoute(Astro.url.pathname); -const archivedVersion = - docs.target !== 'stable' && docs.target !== 'preview' && docs.target !== versions.current - ? docs.target - : undefined; -const latestHref = docsTargetHref(docs, 'stable', versions.scopes); -const archivedNotices = { - root: `This page documents Herdr ${archivedVersion}. Switch to the latest release.`, - ja: `このページは Herdr ${archivedVersion} のドキュメントです。最新版に切り替えてください。`, - 'zh-cn': `本页面是 Herdr ${archivedVersion} 的文档。切换到最新版本。`, -}; -const archivedNotice = archivedVersion ? archivedNotices[locale ?? 'root'] : undefined; ---- - -{banner &&
} -{archivedNotice && ( -
-)} -{translationNotice && ( -
-)} - - -- cgit v1.2.3