mirror of
https://github.com/zen-browser/www.git
synced 2025-07-07 08:55:32 +02:00
chore(biome): update config and fix issues
This commit is contained in:
parent
92b4e4b8a5
commit
3e6155ffef
4 changed files with 35 additions and 38 deletions
|
@ -20,11 +20,7 @@
|
||||||
"useEditorconfig": true
|
"useEditorconfig": true
|
||||||
},
|
},
|
||||||
"files": {
|
"files": {
|
||||||
"ignore": [
|
"ignore": ["node_modules", ".git", "dist"]
|
||||||
"node_modules",
|
|
||||||
".git",
|
|
||||||
"dist"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"javascript": {
|
"javascript": {
|
||||||
"formatter": {
|
"formatter": {
|
||||||
|
|
|
@ -45,8 +45,6 @@
|
||||||
"wrangler": "^3.94.0"
|
"wrangler": "^3.94.0"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"src/**/*.{ts,tsx,astro,js,jsx}": [
|
"src/**/*.{ts,tsx,astro,js,jsx}": ["biome check --write ./src"]
|
||||||
"biome check --write ./src"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,36 +89,36 @@ export default function ModsList({ allMods, locale }: ModsListProps) {
|
||||||
return (
|
return (
|
||||||
<div className="mx-auto mb-12 flex items-center justify-center gap-4 px-8">
|
<div className="mx-auto mb-12 flex items-center justify-center gap-4 px-8">
|
||||||
<button
|
<button
|
||||||
type="button"
|
|
||||||
onClick={() => navigatePage(page - 1)}
|
|
||||||
className={`px-3 py-2 ${page === 1 ? 'pointer-events-none text-gray-400' : 'text-dark hover:text-gray-600'}`}
|
className={`px-3 py-2 ${page === 1 ? 'pointer-events-none text-gray-400' : 'text-dark hover:text-gray-600'}`}
|
||||||
|
onClick={() => navigatePage(page - 1)}
|
||||||
|
type="button"
|
||||||
>
|
>
|
||||||
<
|
<
|
||||||
</button>
|
</button>
|
||||||
<form onSubmit={handlePageSubmit} className="flex items-center gap-2">
|
<form className="flex items-center gap-2" onSubmit={handlePageSubmit}>
|
||||||
{mods.pagination.pagination.split('{input}').map((value, index) => {
|
{mods.pagination.pagination.split('{input}').map((value, index) => {
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
return (
|
return (
|
||||||
<input
|
<input
|
||||||
|
aria-label="Page number"
|
||||||
|
className="w-16 rounded border border-dark bg-transparent px-2 py-1 text-center text-sm"
|
||||||
|
onInput={handlePageInputChange}
|
||||||
type="text"
|
type="text"
|
||||||
value={pageInput}
|
value={pageInput}
|
||||||
onInput={handlePageInputChange}
|
|
||||||
className="w-16 rounded border border-dark bg-transparent px-2 py-1 text-center text-sm"
|
|
||||||
aria-label="Page number"
|
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<span key={value} className="text-sm">
|
<span className="text-sm" key={value}>
|
||||||
{value.replace('{totalPages}', totalPages.toString()).replace('{totalItems}', totalItems.toString())}
|
{value.replace('{totalPages}', totalPages.toString()).replace('{totalItems}', totalItems.toString())}
|
||||||
</span>
|
</span>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</form>
|
</form>
|
||||||
<button
|
<button
|
||||||
type="button"
|
|
||||||
onClick={() => navigatePage(page + 1)}
|
|
||||||
className={`px-3 py-2 ${page === totalPages ? 'pointer-events-none text-gray-400' : 'text-dark hover:text-gray-600'}`}
|
className={`px-3 py-2 ${page === totalPages ? 'pointer-events-none text-gray-400' : 'text-dark hover:text-gray-600'}`}
|
||||||
|
onClick={() => navigatePage(page + 1)}
|
||||||
|
type="button"
|
||||||
>
|
>
|
||||||
>
|
>
|
||||||
</button>
|
</button>
|
||||||
|
@ -131,21 +131,21 @@ export default function ModsList({ allMods, locale }: ModsListProps) {
|
||||||
<div className="flex flex-col items-center gap-4">
|
<div className="flex flex-col items-center gap-4">
|
||||||
<div className="flex w-full flex-col items-center justify-center gap-6">
|
<div className="flex w-full flex-col items-center justify-center gap-6">
|
||||||
<input
|
<input
|
||||||
type="text"
|
|
||||||
id="search"
|
|
||||||
className="w-full rounded-full border-2 border-dark bg-transparent px-6 py-2 text-lg outline-none"
|
className="w-full rounded-full border-2 border-dark bg-transparent px-6 py-2 text-lg outline-none"
|
||||||
placeholder={mods.search}
|
id="search"
|
||||||
value={search}
|
|
||||||
onInput={handleSearch}
|
onInput={handleSearch}
|
||||||
|
placeholder={mods.search}
|
||||||
|
type="text"
|
||||||
|
value={search}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid w-full grid-cols-2 place-items-center gap-4 sm:grid-cols-3">
|
<div className="grid w-full grid-cols-2 place-items-center gap-4 sm:grid-cols-3">
|
||||||
<div className="flex flex-col items-start gap-2">
|
<div className="flex flex-col items-start gap-2">
|
||||||
<button
|
<button
|
||||||
type="button"
|
|
||||||
onClick={toggleCreatedSort}
|
|
||||||
className="flex items-center gap-2 px-4 py-2 font-semibold text-md"
|
className="flex items-center gap-2 px-4 py-2 font-semibold text-md"
|
||||||
|
onClick={toggleCreatedSort}
|
||||||
|
type="button"
|
||||||
>
|
>
|
||||||
{mods.sort.lastCreated}
|
{mods.sort.lastCreated}
|
||||||
<span
|
<span
|
||||||
|
@ -159,9 +159,9 @@ export default function ModsList({ allMods, locale }: ModsListProps) {
|
||||||
|
|
||||||
<div className="flex flex-col items-center gap-2">
|
<div className="flex flex-col items-center gap-2">
|
||||||
<button
|
<button
|
||||||
type="button"
|
|
||||||
onClick={toggleUpdatedSort}
|
|
||||||
className="flex items-center gap-2 px-4 py-2 font-semibold text-md"
|
className="flex items-center gap-2 px-4 py-2 font-semibold text-md"
|
||||||
|
onClick={toggleUpdatedSort}
|
||||||
|
type="button"
|
||||||
>
|
>
|
||||||
{mods.sort.lastUpdated}
|
{mods.sort.lastUpdated}
|
||||||
<span
|
<span
|
||||||
|
@ -174,14 +174,14 @@ export default function ModsList({ allMods, locale }: ModsListProps) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex items-center gap-2 px-4 py-2">
|
<div className="flex items-center gap-2 px-4 py-2">
|
||||||
<label htmlFor="limit" className="font-semibold text-md">
|
<label className="font-semibold text-md" htmlFor="limit">
|
||||||
{mods.sort.perPage}
|
{mods.sort.perPage}
|
||||||
</label>
|
</label>
|
||||||
<select
|
<select
|
||||||
id="limit"
|
|
||||||
value={limit}
|
|
||||||
onInput={handleLimitChange}
|
|
||||||
className="rounded border border-dark bg-transparent px-2 py-1 text-sm [&>option]:text-black"
|
className="rounded border border-dark bg-transparent px-2 py-1 text-sm [&>option]:text-black"
|
||||||
|
id="limit"
|
||||||
|
onInput={handleLimitChange}
|
||||||
|
value={limit}
|
||||||
>
|
>
|
||||||
<option value="12">12</option>
|
<option value="12">12</option>
|
||||||
<option value="24">24</option>
|
<option value="24">24</option>
|
||||||
|
@ -196,16 +196,16 @@ export default function ModsList({ allMods, locale }: ModsListProps) {
|
||||||
{paginatedMods.length > 0 ? (
|
{paginatedMods.length > 0 ? (
|
||||||
paginatedMods.map((mod) => (
|
paginatedMods.map((mod) => (
|
||||||
<a
|
<a
|
||||||
key={mod.id}
|
|
||||||
href={`/mods/${mod.id}`}
|
|
||||||
className="flex w-full flex-col gap-4 border-transparent transition-colors duration-100 hover:opacity-90"
|
className="flex w-full flex-col gap-4 border-transparent transition-colors duration-100 hover:opacity-90"
|
||||||
|
href={`/mods/${mod.id}`}
|
||||||
|
key={mod.id}
|
||||||
>
|
>
|
||||||
<div className="relative mb-0 block aspect-[1.85/1] h-48 overflow-hidden rounded-md border-2 border-dark object-cover shadow-md">
|
<div className="relative mb-0 block aspect-[1.85/1] h-48 overflow-hidden rounded-md border-2 border-dark object-cover shadow-md">
|
||||||
<img
|
<img
|
||||||
src={mod.image}
|
|
||||||
alt={mod.name}
|
alt={mod.name}
|
||||||
loading="lazy"
|
|
||||||
className="h-full w-full object-cover transition-transform duration-100 hover:scale-105"
|
className="h-full w-full object-cover transition-transform duration-100 hover:scale-105"
|
||||||
|
loading="lazy"
|
||||||
|
src={mod.image}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -20,11 +20,14 @@ export default {
|
||||||
center: true,
|
center: true,
|
||||||
},
|
},
|
||||||
fontFamily: {
|
fontFamily: {
|
||||||
junicode: ['Junicode, serif', {
|
junicode: [
|
||||||
|
'Junicode, serif',
|
||||||
|
{
|
||||||
fontFeatureSettings: {
|
fontFeatureSettings: {
|
||||||
'swsh': 1
|
swsh: 1,
|
||||||
}
|
},
|
||||||
}],
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
extend: {
|
extend: {
|
||||||
screens: {
|
screens: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue