Closed PxlSyl closed 6 months ago
In fact, for capitalization, yo can do it better with CSS text-transform
property, here is the description.
.capitalize{
text-transform: capitalize;
}
It can rectify to capitalize the first letter in word automatically, and the browser would recognize the words to determine what word should be capitalized and what is not necessary.
In fact, for capitalization, yo can do it better with CSS
text-transform
property, here is the description..capitalize{ text-transform: capitalize; }
It can rectify to capitalize the first letter in word automatically, and the browser would recognize the words to determine what word should be capitalized and what is not necessary.
Yeah but thing is, it's for metadata generation and it goes directly to the tab
Hi! I also added a share component, and the support for post series, if anyone is interested!
Hi!
While working on the i18n version, I noticed a few things. These are really minor improvments that being said!
For capitalized tags, in the [tag] page, you can do something like this
function capitalizeFirstLetter(str: string): string { return str.charAt(0).toUpperCase() + str.slice(1) } const capitalizedTag = capitalizeFirstLetter(tag) return genPageMetadata({ title: capitalizedTag, ...
'use client'
import { useParams, usePathname } from 'next/navigation' import siteMetadata from '@/data/siteMetadata' import headerNavLinks from '@/data/headerNavLinks' import Logo from '@/data/logo.svg' import Link from './Link' import MobileNav from './MobileNav' import ThemeSwitch from './ThemeSwitch' import LangSwitch from './LangSwitch' import SearchButton from './SearchButton' import { useTranslation } from 'app/[locale]/i18n/client' import type { LocaleTypes } from 'app/[locale]/i18n/settings'
const Header = () => { const locale = useParams()?.locale as LocaleTypes const { t } = useTranslation(locale, '') // Get current page path const pathname = usePathname()
return (
) }
export default Header