prettier sweep

i18n
mrshmllow 2 years ago committed by Michal
parent f3812219c6
commit ecad2de54a
No known key found for this signature in database
GPG Key ID: 52F8801FC912EB4F

@ -2,9 +2,9 @@ name: Lint Code
on:
workflow_dispatch:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
jobs:
lint:
@ -15,9 +15,8 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
cache: 'yarn'
cache: "yarn"
- name: Install
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint

@ -29,8 +29,9 @@ const IconLocaleSwitcher = () => {
return (
<>
<button
className={`${locale !== defaultLocale ? "text-ctp-mauve" : "text-ctp-subtext1"
} mr-2 hidden items-center rounded-lg p-2.5 text-center text-sm font-medium hover:bg-ctp-mantle focus:outline-none focus:ring-4 md:inline-flex`}
className={`${
locale !== defaultLocale ? "text-ctp-mauve" : "text-ctp-subtext1"
} mr-2 hidden items-center rounded-lg p-2.5 text-center text-sm font-medium hover:bg-ctp-mantle focus:outline-none focus:ring-4 md:inline-flex`}
type="button"
onClick={() => {
setToggled(!toggled);
@ -46,8 +47,9 @@ const IconLocaleSwitcher = () => {
<FontAwesomeIcon size="lg" icon={faLanguage} fixedWidth />
</button>
<div
className={`${!toggled ? "hidden " : ""
}z-10 absolute mt-12 w-32 rounded bg-ctp-base font-semibold shadow`}
className={`${
!toggled ? "hidden " : ""
}z-10 absolute mt-12 w-32 rounded bg-ctp-base font-semibold shadow`}
ref={ref}
onBlur={(e) => {
const currentTarget = e.currentTarget;
@ -67,8 +69,9 @@ const IconLocaleSwitcher = () => {
{locales!.map((loc) => (
<li key={loc}>
<button
className={`${locale === loc ? "text-ctp-mauve" : ""
} flex w-full items-center gap-2 py-2 px-4 hover:bg-ctp-mantle`}
className={`${
locale === loc ? "text-ctp-mauve" : ""
} flex w-full items-center gap-2 py-2 px-4 hover:bg-ctp-mantle`}
onClick={() => changeLocale(loc)}
>
{localeToName.of(loc)}

@ -27,7 +27,7 @@ const NativeLocaleSwitcher = () => {
<select
onChange={(e) => {
push(asPath, undefined, { locale: e.currentTarget.value });
e.preventDefault()
e.preventDefault();
}}
className="absolute inset-0 h-full w-full appearance-none opacity-0"
>

@ -12,8 +12,9 @@ const TreeNode: FC<{ node: ITreeItem; path: string }> = ({
<>
{children.length > 0 ? (
<span
className={`text-left ${current ? "font-semibold" : ""
} text-ctp-text`}
className={`text-left ${
current ? "font-semibold" : ""
} text-ctp-text`}
>
{pretty ? pretty : value}
</span>
@ -21,10 +22,11 @@ const TreeNode: FC<{ node: ITreeItem; path: string }> = ({
<span className="flex items-center gap-2">
<Link href={path}>
<a
className={`${current
className={`${
current
? "border-ctp-mauve font-semibold text-ctp-mauve"
: "border-transparent font-normal text-ctp-subtext0 hover:border-ctp-surface2 hover:text-ctp-subtext1"
} first-letter -ml-px w-full border-l pl-4 no-underline transition-colors hover:no-underline`}
} first-letter -ml-px w-full border-l pl-4 no-underline transition-colors hover:no-underline`}
>
{pretty ? pretty : value}
</a>
@ -36,8 +38,9 @@ const TreeNode: FC<{ node: ITreeItem; path: string }> = ({
{children.length > 0 && (
<div
className={`flex flex-col gap-1 ${value !== "root" ? "border-l border-ctp-surface0" : ""
}`}
className={`flex flex-col gap-1 ${
value !== "root" ? "border-l border-ctp-surface0" : ""
}`}
>
{children.map((child) => (
<TreeNode

@ -34,10 +34,11 @@ const Navbar = () => {
return (
<nav
className={`py-2.5 ${scrollTop != 0 || toggled
className={`py-2.5 ${
scrollTop != 0 || toggled
? "border-b border-ctp-mantle bg-ctp-base bg-opacity-80 backdrop-blur-md"
: ""
} fixed top-0 left-0 z-20 w-full `}
} fixed top-0 left-0 z-20 w-full `}
>
<div className="container mx-auto flex max-w-8xl flex-wrap items-center justify-between px-4 md:px-8">
<Link href="/">
@ -89,17 +90,19 @@ const Navbar = () => {
</button>
</div>
<div
className={`${!toggled ? "hidden" : ""
} w-full items-center justify-between md:visible md:order-1 md:flex md:w-auto`}
className={`${
!toggled ? "hidden" : ""
} w-full items-center justify-between md:visible md:order-1 md:flex md:w-auto`}
>
<ul className="mt-4 flex flex-col gap-2 rounded-lg border border-ctp-mantle bg-ctp-base p-4 md:mt-0 md:flex-row md:gap-0 md:space-x-8 md:border-0 md:bg-inherit md:text-sm md:font-medium md:dark:bg-inherit">
<li>
<Link href="/">
<a
className={`block rounded py-2 pr-4 pl-3 md:bg-transparent ${route === "/"
className={`block rounded py-2 pr-4 pl-3 md:bg-transparent ${
route === "/"
? "bg-ctp-mauve text-ctp-base md:text-ctp-mauve"
: "text-ctp-text md:hover:text-ctp-mauve"
} no-underline md:p-0`}
} no-underline md:p-0`}
>
{common("locations.home")}
</a>
@ -120,10 +123,11 @@ const Navbar = () => {
<li>
<Link href="/docs/">
<a
className={`block rounded py-2 pr-4 pl-3 md:bg-transparent ${route.split("/")[1] === "docs"
className={`block rounded py-2 pr-4 pl-3 md:bg-transparent ${
route.split("/")[1] === "docs"
? "bg-ctp-mauve text-ctp-base md:text-ctp-mauve"
: "text-ctp-text md:hover:text-ctp-mauve"
} no-underline md:p-0`}
} no-underline md:p-0`}
>
{common("locations.docs")}
</a>

@ -108,9 +108,7 @@ const Home: NextPageWithLayout = () => {
<HomeSection className="pb-16 md:pb-28">
<div className="basis-1/4">
<p className="mt-8 font-semibold text-ctp-red">
{t("amethyst.tag")}
</p>
<p className="mt-8 font-semibold text-ctp-red">{t("amethyst.tag")}</p>
<p className="mt-4 text-3xl font-extrabold tracking-tight text-ctp-text sm:text-4xl">
{t("amethyst.title")}
</p>

@ -40,4 +40,3 @@
.prose > table {
display: table !important;
}

@ -47,22 +47,22 @@ module.exports = {
"--tw-prose-th-borders": "#9ca0b0",
"--tw-prose-td-borders": "#9ca0b0",
'--tw-prose-invert-body': "#cdd6f4",
'--tw-prose-invert-headings': "#cdd6f4",
"--tw-prose-invert-body": "#cdd6f4",
"--tw-prose-invert-headings": "#cdd6f4",
// '--tw-prose-invert-lead': "",
'--tw-prose-invert-links': "#cdd6f4",
"--tw-prose-invert-links": "#cdd6f4",
// '--tw-prose-invert-bold': "",
'--tw-prose-invert-counters': "#7c7f93",
'--tw-prose-invert-bullets': "#7c7f93",
'--tw-prose-invert-hr': "#cdd6f4",
'--tw-prose-invert-quotes': "#cdd6f4",
'--tw-prose-invert-quote-borders': "#6c7086",
"--tw-prose-invert-counters": "#7c7f93",
"--tw-prose-invert-bullets": "#7c7f93",
"--tw-prose-invert-hr": "#cdd6f4",
"--tw-prose-invert-quotes": "#cdd6f4",
"--tw-prose-invert-quote-borders": "#6c7086",
// '--tw-prose-invert-captions': "",
'--tw-prose-invert-code': "#cdd6f4",
"--tw-prose-invert-code": "#cdd6f4",
// '--tw-prose-invert-pre-code': "",
// '--tw-prose-invert-pre-bg': "",
'--tw-prose-invert-th-borders': "#6c7086",
'--tw-prose-invert-td-borders': "#6c7086",
"--tw-prose-invert-th-borders": "#6c7086",
"--tw-prose-invert-td-borders": "#6c7086",
},
},
},

Loading…
Cancel
Save