このコミットが含まれているのは:
2026-10-18 18:54:59 +09:00
コミット 912b941f90
22個のファイルの変更、391行の追加、133行の削除
+2 -9
ファイルの表示
@@ -27,20 +27,13 @@ const ErrorScreen: FC<Props> = ({ status }) => {
const title = message.replaceAll ('(', ' (').replaceAll (')', ')')
const style = document.createElement ('style')
style.innerHTML = `
@font-face
{
font-family: 'Nikumaru';
src: url(${ nikumaru }) format('opentype');
}`
document.head.appendChild (style)
return (
<MainArea>
<PageHead title={{ text: title,
language: translate (`${status}.message`).language }}>
<meta name="robots" content="noindex"/>
<style>{`@font-face { font-family: 'Nikumaru';
src: url(${nikumaru}) format('opentype'); }`}</style>
</PageHead>
<div className="text-6xl font-bold text-transparent
bg-[linear-gradient(90deg,#ff0000,#ff8800,#ffff00,#00ff00,#00ffff,#0000ff,#ff00ff,#ff0000)]
+2 -1
ファイルの表示
@@ -9,6 +9,7 @@ import { useOverlayStore } from '@/components/RouteBlockerOverlay'
import { prefetchForURL } from '@/lib/prefetchers'
import { useClientBehaviourSettings } from '@/lib/useClientBehaviourSettings'
import { cn } from '@/lib/utils'
import { currentRenderContext } from '@/lib/renderContext'
import type { AnchorHTMLAttributes, MouseEvent, TouchEvent } from 'react'
import type { To } from 'react-router-dom'
@@ -47,7 +48,7 @@ export default forwardRef<HTMLAnchorElement, Props> (({
[to, locale],
)
const url = useMemo (() => {
return (new URL (path, window.location.origin)).toString ()
return (new URL (path, currentRenderContext ()?.origin ?? 'http://localhost')).toString ()
}, [path])
const setOverlay = useOverlayStore (s => s.setActive)
+7 -2
ファイルの表示
@@ -9,10 +9,14 @@ type LocalisedTitle = { text: string; language: string }
type Props = {
title?: string | LocalisedTitle
includeSiteName?: boolean
description?: LocalisedTitle
canonical?: string
children?: ReactNode }
const PageHead = ({ title, includeSiteName = true, children }: Props) => {
const PageHead = (
{ title, includeSiteName = true, description: pageDescription, canonical, children }: Props,
) => {
const locale = useLocale ()
const { message, siteTitle } = useUITranslation ('shared')
const pageTitle = typeof title === 'string' ? { text: title, language: locale } : title
@@ -20,12 +24,13 @@ const PageHead = ({ title, includeSiteName = true, children }: Props) => {
pageTitle == null
? siteTitle.text
: (includeSiteName ? `${pageTitle.text} | ${siteTitle.text}` : pageTitle.text)
const description = message ('head.description', { brand: siteTitle.text })
const description = pageDescription ?? message ('head.description', { brand: siteTitle.text })
return (
<Helmet>
<title lang={pageTitle?.language ?? siteTitle.language}>{fullTitle}</title>
<meta name="description" content={description.text} lang={description.language}/>
{canonical != null && <link rel="canonical" href={canonical}/>}
{children}
</Helmet>)
}