lightnet 2.16.3 → 2.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/__e2e__/fixtures/basics/astro.config.mjs +2 -2
- package/__e2e__/fixtures/basics/node_modules/.bin/astro +2 -2
- package/__e2e__/fixtures/basics/package.json +5 -5
- package/__e2e__/homepage.spec.ts +0 -4
- package/package.json +9 -9
- package/src/astro-integration/config.ts +21 -11
- package/src/astro-integration/integration.ts +6 -3
- package/src/components/CategoriesOverview.astro +1 -1
- package/src/components/Gallery.astro +3 -3
- package/src/components/Hero.astro +1 -1
- package/src/components/HighlightSection.astro +1 -1
- package/src/components/Icon.tsx +1 -1
- package/src/components/MediaItemList.astro +3 -3
- package/src/i18n/resolve-default-locale.ts +4 -4
- package/src/i18n/resolve-locales.ts +1 -1
- package/src/i18n/translate.ts +1 -1
- package/src/layouts/Page.astro +8 -1
- package/src/layouts/color-overrides.css +267 -0
- package/src/layouts/components/Menu.astro +1 -1
- package/src/layouts/global.css +49 -0
- package/src/pages/details-page/components/Cover.astro +2 -2
- package/src/pages/details-page/components/OpenButton.astro +1 -1
- package/src/pages/details-page/components/ShareButton.astro +1 -1
- package/src/pages/search-page/components/ResultList.tsx +4 -4
- package/src/pages/search-page/components/SearchFilter.tsx +33 -67
- package/src/pages/search-page/components/Select.tsx +32 -0
- package/__e2e__/fixtures/basics/node_modules/.bin/tailwind +0 -17
- package/__e2e__/fixtures/basics/node_modules/.bin/tailwindcss +0 -17
- package/__e2e__/fixtures/basics/tailwind.config.mjs +0 -8
- package/tailwind.config.ts +0 -56
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# lightnet
|
|
2
2
|
|
|
3
|
+
## 2.17.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#222](https://github.com/LightNetDev/LightNet/pull/222) [`00dd8e9`](https://github.com/LightNetDev/LightNet/commit/00dd8e95a80cdda53c52077ff4caa9c9f6b3b523) Thanks [@smn-cds](https://github.com/smn-cds)! - Fix contrast of more results button.
|
|
8
|
+
|
|
9
|
+
## 2.17.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#220](https://github.com/LightNetDev/LightNet/pull/220) [`e10c96f`](https://github.com/LightNetDev/LightNet/commit/e10c96fb850db6d043c9bc0c929170c271979492) Thanks [@smn-cds](https://github.com/smn-cds)! - Update Tailwind CSS to v4
|
|
14
|
+
|
|
15
|
+
- updates `tailwindcss` dependency to version ^4.
|
|
16
|
+
- `@astro/tailwindcss` dependency has been replaced with `@tailwindcss/vite`
|
|
17
|
+
- removes the use of `tailwind.config.js` inside site projects
|
|
18
|
+
- astro config now supports setting `primaryColor` inside the lightnet integration
|
|
19
|
+
- changes default `primaryColor` from `#E6B15C` (yellow-orange) to `#1E2939` (dark gray)
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- [#220](https://github.com/LightNetDev/LightNet/pull/220) [`e10c96f`](https://github.com/LightNetDev/LightNet/commit/e10c96fb850db6d043c9bc0c929170c271979492) Thanks [@smn-cds](https://github.com/smn-cds)! - Renames UI language to site language.
|
|
24
|
+
|
|
3
25
|
## 2.16.3
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -13,12 +13,12 @@ export default defineConfig({
|
|
|
13
13
|
{
|
|
14
14
|
code: "en",
|
|
15
15
|
label: "English",
|
|
16
|
-
|
|
16
|
+
isDefaultSiteLanguage: true,
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
code: "de",
|
|
20
20
|
label: "Deutsch",
|
|
21
|
-
|
|
21
|
+
isSiteLanguage: true,
|
|
22
22
|
},
|
|
23
23
|
],
|
|
24
24
|
favicon: [{ href: "favicon.svg" }],
|
|
@@ -6,9 +6,9 @@ case `uname` in
|
|
|
6
6
|
esac
|
|
7
7
|
|
|
8
8
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/astro@5.
|
|
9
|
+
export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/astro@5.4.0_@types+node@22.13.5_jiti@2.4.2_lightningcss@1.29.1_rollup@4.34.8_terser@5.39.0_typescript@5.7.3_yaml@2.7.0/node_modules/astro/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/astro@5.4.0_@types+node@22.13.5_jiti@2.4.2_lightningcss@1.29.1_rollup@4.34.8_terser@5.39.0_typescript@5.7.3_yaml@2.7.0/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/astro@5.
|
|
11
|
+
export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/astro@5.4.0_@types+node@22.13.5_jiti@2.4.2_lightningcss@1.29.1_rollup@4.34.8_terser@5.39.0_typescript@5.7.3_yaml@2.7.0/node_modules/astro/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/astro@5.4.0_@types+node@22.13.5_jiti@2.4.2_lightningcss@1.29.1_rollup@4.34.8_terser@5.39.0_typescript@5.7.3_yaml@2.7.0/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
14
|
exec "$basedir/node" "$basedir/../astro/astro.js" "$@"
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
"version": "0.0.1",
|
|
5
5
|
"private": "true",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@astrojs/react": "^4.2.
|
|
8
|
-
"@astrojs/tailwind": "^6.0.0",
|
|
7
|
+
"@astrojs/react": "^4.2.1",
|
|
9
8
|
"@lightnet/decap-admin": "^2.4.0",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
9
|
+
"@tailwindcss/vite": "^4.0.9",
|
|
10
|
+
"astro": "^5.4.0",
|
|
11
|
+
"lightnet": "^2.17.0",
|
|
12
12
|
"react": "^18.3.1",
|
|
13
13
|
"react-dom": "^18.3.1",
|
|
14
14
|
"sharp": "^0.33.5",
|
|
15
|
-
"tailwindcss": "^
|
|
15
|
+
"tailwindcss": "^4.0.9",
|
|
16
16
|
"typescript": "^5.7.3"
|
|
17
17
|
}
|
|
18
18
|
}
|
package/__e2e__/homepage.spec.ts
CHANGED
|
@@ -45,10 +45,6 @@ test("Should navigate to search page from main menu", async ({
|
|
|
45
45
|
test("Should switch languages", async ({ page, startLightnet }) => {
|
|
46
46
|
const ln = await startLightnet()
|
|
47
47
|
|
|
48
|
-
await expect(
|
|
49
|
-
page.getByRole("button", { name: "Select language" }),
|
|
50
|
-
).toBeVisible()
|
|
51
|
-
await page.getByRole("button", { name: "Select language" }).click()
|
|
52
48
|
await page.getByLabel("Select language").click()
|
|
53
49
|
await page.getByRole("link", { name: "Deutsch" }).click()
|
|
54
50
|
await expect(page).toHaveURL(ln.resolveURL("/de/"))
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "lightnet",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "2.
|
|
5
|
+
"version": "2.17.1",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/LightNetDev/lightnet",
|
|
@@ -33,30 +33,30 @@
|
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@astrojs/react": "^4.1.0",
|
|
36
|
-
"@
|
|
36
|
+
"@tailwindcss/vite": "^4.0.9",
|
|
37
37
|
"astro": "^5.1.0",
|
|
38
38
|
"react": "^18.3.1",
|
|
39
39
|
"react-dom": "^18.3.1",
|
|
40
40
|
"sharp": "^0.33.4",
|
|
41
|
-
"tailwindcss": "^
|
|
41
|
+
"tailwindcss": "^4.0.9",
|
|
42
42
|
"typescript": "^5.5.3"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@iconify-json/mdi": "^1.2.3",
|
|
46
|
-
"@iconify/
|
|
46
|
+
"@iconify/tailwind4": "^1.0.6",
|
|
47
47
|
"@tailwindcss/typography": "^0.5.16",
|
|
48
|
+
"daisyui": "^5.0.0",
|
|
48
49
|
"@types/react": "^18.3.18",
|
|
49
|
-
"daisyui": "^4.12.23",
|
|
50
50
|
"fuse.js": "^7.1.0",
|
|
51
|
+
"i18next": "^24.2.2",
|
|
51
52
|
"marked": "^15.0.7",
|
|
52
53
|
"yaml": "^2.7.0",
|
|
53
|
-
"zod-validation-error": "^3.4.0"
|
|
54
|
-
"i18next": "^24.2.2"
|
|
54
|
+
"zod-validation-error": "^3.4.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@playwright/test": "^1.50.1",
|
|
58
|
-
"@types/node": "^22.13.
|
|
59
|
-
"vitest": "^3.0.
|
|
58
|
+
"@types/node": "^22.13.5",
|
|
59
|
+
"vitest": "^3.0.7"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"test": "vitest",
|
|
@@ -46,24 +46,24 @@ const languageSchema = z
|
|
|
46
46
|
*/
|
|
47
47
|
label: z.string(),
|
|
48
48
|
/**
|
|
49
|
-
* Should this language be used as
|
|
49
|
+
* Should this language be used as a site language?
|
|
50
50
|
*
|
|
51
51
|
* Make sure to provide translations inside the `src/translations/` folder.
|
|
52
52
|
*
|
|
53
53
|
* Default is `false`
|
|
54
54
|
*/
|
|
55
|
-
|
|
55
|
+
isSiteLanguage: z.boolean().default(false),
|
|
56
56
|
/**
|
|
57
|
-
* Should this language be used as the default
|
|
57
|
+
* Should this language be used as the default site language?
|
|
58
58
|
*
|
|
59
59
|
* The default language will be used as a fallback when translations are missing
|
|
60
60
|
* also this will be the language selected when a user visits the site on the `/` path.
|
|
61
61
|
*
|
|
62
|
-
* Setting this to `true` will also set `
|
|
62
|
+
* Setting this to `true` will also set `isSiteLanguage` to `true`.
|
|
63
63
|
*
|
|
64
64
|
* Default is `false`
|
|
65
65
|
*/
|
|
66
|
-
|
|
66
|
+
isDefaultSiteLanguage: z.boolean().default(false),
|
|
67
67
|
/**
|
|
68
68
|
* An array of fallback language codes.
|
|
69
69
|
*
|
|
@@ -72,7 +72,7 @@ const languageSchema = z
|
|
|
72
72
|
* matching translation key is found.
|
|
73
73
|
*
|
|
74
74
|
* If no match is found from the fallback languages, the system will
|
|
75
|
-
* attempt the translation using the default
|
|
75
|
+
* attempt the translation using the default site language.
|
|
76
76
|
*
|
|
77
77
|
* If the translation still cannot be resolved, it will then fall back to the English
|
|
78
78
|
* translation as a final resort.
|
|
@@ -83,8 +83,8 @@ const languageSchema = z
|
|
|
83
83
|
})
|
|
84
84
|
.transform((language) => ({
|
|
85
85
|
...language,
|
|
86
|
-
// if language is default
|
|
87
|
-
|
|
86
|
+
// if language is default site language also set is site language to true.
|
|
87
|
+
isSiteLanguage: language.isDefaultSiteLanguage || language.isSiteLanguage,
|
|
88
88
|
}))
|
|
89
89
|
|
|
90
90
|
const absolutePath = (path: string) =>
|
|
@@ -125,7 +125,17 @@ export const configSchema = z.object({
|
|
|
125
125
|
*/
|
|
126
126
|
title: z.string(),
|
|
127
127
|
/**
|
|
128
|
-
*
|
|
128
|
+
* Defines the primary color for your site.
|
|
129
|
+
*
|
|
130
|
+
* The primary color is applied to various UI elements, such as buttons,
|
|
131
|
+
* links, and hover states. Choose a color that aligns with your brand
|
|
132
|
+
* and provides good contrast against a white background for accessibility.
|
|
133
|
+
*
|
|
134
|
+
* Default: #1E2939 (dark gray)
|
|
135
|
+
*/
|
|
136
|
+
primaryColor: z.string().default("#1E2939"),
|
|
137
|
+
/**
|
|
138
|
+
* All languages: content languages and site languages.
|
|
129
139
|
*/
|
|
130
140
|
languages: languageSchema.array(),
|
|
131
141
|
/**
|
|
@@ -186,8 +196,8 @@ export const configSchema = z.object({
|
|
|
186
196
|
.object({
|
|
187
197
|
/**
|
|
188
198
|
* When this is set to true, search results will be initially
|
|
189
|
-
* filtered by
|
|
190
|
-
* is any media item in the
|
|
199
|
+
* filtered by site language. The filter will only be set when there
|
|
200
|
+
* is any media item in the site language.
|
|
191
201
|
*/
|
|
192
202
|
filterByLocale: z.boolean().default(false),
|
|
193
203
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference path="../i18n/locals.d.ts" />
|
|
2
2
|
import react from "@astrojs/react"
|
|
3
|
-
import
|
|
3
|
+
import tailwindcss from "@tailwindcss/vite"
|
|
4
4
|
import type { AstroIntegration } from "astro"
|
|
5
5
|
|
|
6
6
|
import { resolveDefaultLocale } from "../i18n/resolve-default-locale"
|
|
@@ -58,11 +58,14 @@ export function lightnet(lightnetConfig: LightnetConfig): AstroIntegration {
|
|
|
58
58
|
|
|
59
59
|
addMiddleware({ entrypoint: "lightnet/locals", order: "pre" })
|
|
60
60
|
|
|
61
|
-
astroConfig.integrations.push(
|
|
61
|
+
astroConfig.integrations.push(react())
|
|
62
62
|
|
|
63
63
|
updateConfig({
|
|
64
64
|
vite: {
|
|
65
|
-
plugins: [
|
|
65
|
+
plugins: [
|
|
66
|
+
vitePluginLightnetConfig(config, astroConfig, logger),
|
|
67
|
+
tailwindcss(),
|
|
68
|
+
],
|
|
66
69
|
},
|
|
67
70
|
i18n: {
|
|
68
71
|
defaultLocale: resolveDefaultLocale(config),
|
|
@@ -20,7 +20,7 @@ const categories = await getCategories(currentLocale, t)
|
|
|
20
20
|
{categories.map((category) => (
|
|
21
21
|
<li class="flex max-w-56 grow">
|
|
22
22
|
<a
|
|
23
|
-
class="flex h-12 w-full items-center justify-center rounded-xl bg-gray-200 p-2 px-8
|
|
23
|
+
class="shadow-xs flex h-12 w-full items-center justify-center rounded-xl bg-gray-200 p-2 px-8 hover:bg-gray-300 sm:h-14"
|
|
24
24
|
href={searchPagePath(currentLocale, {
|
|
25
25
|
category: category.id,
|
|
26
26
|
})}
|
|
@@ -42,8 +42,8 @@ const { items, layout } = Astro.props
|
|
|
42
42
|
class="group flex flex-col gap-3"
|
|
43
43
|
>
|
|
44
44
|
<div
|
|
45
|
-
class="relative overflow-hidden shadow-md outline-
|
|
46
|
-
class:list={layout === "book" ? "rounded-
|
|
45
|
+
class="relative overflow-hidden shadow-md outline-gray-400 transition-all duration-75 ease-in-out group-hover:outline-2"
|
|
46
|
+
class:list={layout === "book" ? "rounded-xs" : "rounded-md"}
|
|
47
47
|
>
|
|
48
48
|
<Image
|
|
49
49
|
class="h-full w-full object-contain"
|
|
@@ -88,7 +88,7 @@ const { items, layout } = Astro.props
|
|
|
88
88
|
class="group flex flex-col gap-3"
|
|
89
89
|
>
|
|
90
90
|
<div
|
|
91
|
-
class="relative overflow-hidden rounded-md shadow-md outline-
|
|
91
|
+
class="relative overflow-hidden rounded-md shadow-md outline-gray-400 transition-all duration-75 ease-in-out group-hover:outline-2"
|
|
92
92
|
class:list={[layout === "video" && "aspect-video bg-gray-950"]}
|
|
93
93
|
>
|
|
94
94
|
<Image
|
|
@@ -49,7 +49,7 @@ const subtitleSizes = {
|
|
|
49
49
|
alt=""
|
|
50
50
|
/>
|
|
51
51
|
<div
|
|
52
|
-
class="bg-
|
|
52
|
+
class="bg-radial absolute top-0 flex h-full w-full flex-col items-center justify-center gap-6 from-black/30 to-black/40 p-4 text-center text-gray-50"
|
|
53
53
|
class:list={[className]}
|
|
54
54
|
>
|
|
55
55
|
{
|
|
@@ -53,7 +53,7 @@ const { image, id, title, text, link, className, titleClass, textClass } =
|
|
|
53
53
|
{
|
|
54
54
|
link && (
|
|
55
55
|
<a
|
|
56
|
-
class="bg-primary hover:bg-primary/85 inline-flex items-center justify-center gap-2 rounded-2xl px-6 py-3 text-sm font-bold uppercase text-gray-50
|
|
56
|
+
class="bg-primary hover:bg-primary/85 shadow-xs inline-flex items-center justify-center gap-2 rounded-2xl px-6 py-3 text-sm font-bold uppercase text-gray-50 hover:text-gray-100"
|
|
57
57
|
href={link.href}
|
|
58
58
|
>
|
|
59
59
|
{link.text}
|
package/src/components/Icon.tsx
CHANGED
|
@@ -38,7 +38,7 @@ const mediaTypes = Object.fromEntries(
|
|
|
38
38
|
id: item.id,
|
|
39
39
|
})
|
|
40
40
|
}
|
|
41
|
-
class="group flex overflow-hidden py-4 transition-colors ease-in-out
|
|
41
|
+
class="md:rounded-xs group flex overflow-hidden py-4 transition-colors ease-in-out hover:bg-gray-100 md:py-8"
|
|
42
42
|
class:list={
|
|
43
43
|
item.disabled ? "pointer-events-none cursor-default opacity-50" : ""
|
|
44
44
|
}
|
|
@@ -46,7 +46,7 @@ const mediaTypes = Object.fromEntries(
|
|
|
46
46
|
>
|
|
47
47
|
<div class="flex h-32 w-32 shrink-0 flex-col items-start justify-center">
|
|
48
48
|
<Image
|
|
49
|
-
class="max-h-32 w-auto max-w-32
|
|
49
|
+
class="rounded-xs max-h-32 w-auto max-w-32 object-contain shadow-md"
|
|
50
50
|
src={item.data.image}
|
|
51
51
|
alt=""
|
|
52
52
|
/>
|
|
@@ -73,7 +73,7 @@ const mediaTypes = Object.fromEntries(
|
|
|
73
73
|
</div>
|
|
74
74
|
|
|
75
75
|
<Icon
|
|
76
|
-
className="mdi--chevron-right hidden sm:block
|
|
76
|
+
className="mdi--chevron-right hidden sm:block group-hover:text-primary my-auto ms-2 me-4 shrink-0 text-2xl text-gray-300"
|
|
77
77
|
flipIcon={direction === "rtl"}
|
|
78
78
|
ariaLabel=""
|
|
79
79
|
/>
|
|
@@ -5,14 +5,14 @@ export const resolveDefaultLocale = ({
|
|
|
5
5
|
}: {
|
|
6
6
|
languages: {
|
|
7
7
|
code: string
|
|
8
|
-
|
|
8
|
+
isDefaultSiteLanguage?: boolean
|
|
9
9
|
}[]
|
|
10
10
|
}) => {
|
|
11
|
-
const defaultLanguage = languages.find((l) => l.
|
|
11
|
+
const defaultLanguage = languages.find((l) => l.isDefaultSiteLanguage)
|
|
12
12
|
if (!defaultLanguage) {
|
|
13
13
|
throw new AstroError(
|
|
14
|
-
"No default
|
|
15
|
-
"Make sure you have set one language to be the default language by setting the
|
|
14
|
+
"No default site language has been set",
|
|
15
|
+
"Make sure you have set one language to be the default language by setting the isDefaultSiteLanguage to `true`.",
|
|
16
16
|
)
|
|
17
17
|
}
|
|
18
18
|
return defaultLanguage.code
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Language } from "../astro-integration/config"
|
|
2
2
|
|
|
3
3
|
export const resolveLocales = ({ languages }: { languages: Language[] }) => {
|
|
4
|
-
return languages.filter((l) => l.
|
|
4
|
+
return languages.filter((l) => l.isSiteLanguage).map((l) => l.code)
|
|
5
5
|
}
|
package/src/i18n/translate.ts
CHANGED
|
@@ -16,7 +16,7 @@ export type TranslateFn = (key: TranslationKey, options?: TOptions) => string
|
|
|
16
16
|
const languageCodes = [
|
|
17
17
|
...new Set(
|
|
18
18
|
config.languages
|
|
19
|
-
.filter((lng) => lng.
|
|
19
|
+
.filter((lng) => lng.isSiteLanguage)
|
|
20
20
|
.flatMap((lng) => [lng.code, ...lng.fallbackLanguages, "en"]),
|
|
21
21
|
),
|
|
22
22
|
]
|
package/src/layouts/Page.astro
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
+
import "./global.css"
|
|
3
|
+
|
|
2
4
|
import { ClientRouter } from "astro:transitions"
|
|
3
5
|
import config from "virtual:lightnet/config"
|
|
4
6
|
|
|
@@ -18,6 +20,7 @@ const configTitle = Astro.locals.i18n.t(config.title)
|
|
|
18
20
|
|
|
19
21
|
const { currentLocale } = Astro.locals.i18n
|
|
20
22
|
const language = resolveLanguage(currentLocale)
|
|
23
|
+
const primaryColor = config.primaryColor
|
|
21
24
|
---
|
|
22
25
|
|
|
23
26
|
<!doctype html>
|
|
@@ -48,5 +51,9 @@ const language = resolveLanguage(currentLocale)
|
|
|
48
51
|
<slot />
|
|
49
52
|
</main>
|
|
50
53
|
<PreloadReact client:idle />
|
|
51
|
-
</body>
|
|
54
|
+
</body><style is:global define:vars={{ primaryColor }}>
|
|
55
|
+
:root {
|
|
56
|
+
--primary-color: var(--primaryColor);
|
|
57
|
+
}
|
|
58
|
+
</style>
|
|
52
59
|
</html>
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
/* We override Tailwind CSS's oklch colors because
|
|
2
|
+
oklch is not yet widely supported by all browsers. */
|
|
3
|
+
@theme {
|
|
4
|
+
--color-gray-50: #f9fafb;
|
|
5
|
+
--color-gray-100: #f3f4f6;
|
|
6
|
+
--color-gray-200: #e5e7eb;
|
|
7
|
+
--color-gray-300: #d1d5db;
|
|
8
|
+
--color-gray-400: #9ca3af;
|
|
9
|
+
--color-gray-500: #6b7280;
|
|
10
|
+
--color-gray-600: #4b5563;
|
|
11
|
+
--color-gray-700: #374151;
|
|
12
|
+
--color-gray-800: #1f2937;
|
|
13
|
+
--color-gray-900: #111827;
|
|
14
|
+
--color-gray-950: #030712;
|
|
15
|
+
|
|
16
|
+
--color-red-50: #fef2f2;
|
|
17
|
+
--color-red-100: #fee2e2;
|
|
18
|
+
--color-red-200: #fecaca;
|
|
19
|
+
--color-red-300: #fca5a5;
|
|
20
|
+
--color-red-400: #f87171;
|
|
21
|
+
--color-red-500: #ef4444;
|
|
22
|
+
--color-red-600: #dc2626;
|
|
23
|
+
--color-red-700: #b91c1c;
|
|
24
|
+
--color-red-800: #991b1b;
|
|
25
|
+
--color-red-900: #7f1d1d;
|
|
26
|
+
--color-red-950: #450a0a;
|
|
27
|
+
|
|
28
|
+
--color-orange-50: #fff7ed;
|
|
29
|
+
--color-orange-100: #ffedd5;
|
|
30
|
+
--color-orange-200: #fed7aa;
|
|
31
|
+
--color-orange-300: #fdba74;
|
|
32
|
+
--color-orange-400: #fb923c;
|
|
33
|
+
--color-orange-500: #f97316;
|
|
34
|
+
--color-orange-600: #ea580c;
|
|
35
|
+
--color-orange-700: #c2410c;
|
|
36
|
+
--color-orange-800: #9a3412;
|
|
37
|
+
--color-orange-900: #7c2d12;
|
|
38
|
+
--color-orange-950: #431407;
|
|
39
|
+
|
|
40
|
+
--color-amber-50: #fffbeb;
|
|
41
|
+
--color-amber-100: #fef3c7;
|
|
42
|
+
--color-amber-200: #fde68a;
|
|
43
|
+
--color-amber-300: #fcd34d;
|
|
44
|
+
--color-amber-400: #fbbf24;
|
|
45
|
+
--color-amber-500: #f59e0b;
|
|
46
|
+
--color-amber-600: #d97706;
|
|
47
|
+
--color-amber-700: #b45309;
|
|
48
|
+
--color-amber-800: #92400e;
|
|
49
|
+
--color-amber-900: #78350f;
|
|
50
|
+
--color-amber-950: #451a03;
|
|
51
|
+
|
|
52
|
+
--color-yellow-50: #fefce8;
|
|
53
|
+
--color-yellow-100: #fef9c3;
|
|
54
|
+
--color-yellow-200: #fef08a;
|
|
55
|
+
--color-yellow-300: #fde047;
|
|
56
|
+
--color-yellow-400: #facc15;
|
|
57
|
+
--color-yellow-500: #eab308;
|
|
58
|
+
--color-yellow-600: #ca8a04;
|
|
59
|
+
--color-yellow-700: #a16207;
|
|
60
|
+
--color-yellow-800: #854d0e;
|
|
61
|
+
--color-yellow-900: #713f12;
|
|
62
|
+
--color-yellow-950: #422006;
|
|
63
|
+
|
|
64
|
+
--color-lime-50: #f7fee7;
|
|
65
|
+
--color-lime-100: #ecfccb;
|
|
66
|
+
--color-lime-200: #d9f99d;
|
|
67
|
+
--color-lime-300: #bef264;
|
|
68
|
+
--color-lime-400: #a3e635;
|
|
69
|
+
--color-lime-500: #84cc16;
|
|
70
|
+
--color-lime-600: #65a30d;
|
|
71
|
+
--color-lime-700: #4d7c0f;
|
|
72
|
+
--color-lime-800: #3f6212;
|
|
73
|
+
--color-lime-900: #365314;
|
|
74
|
+
--color-lime-950: #1a2e05;
|
|
75
|
+
|
|
76
|
+
--color-green-50: #f0fdf4;
|
|
77
|
+
--color-green-100: #dcfce7;
|
|
78
|
+
--color-green-200: #bbf7d0;
|
|
79
|
+
--color-green-300: #86efac;
|
|
80
|
+
--color-green-400: #4ade80;
|
|
81
|
+
--color-green-500: #22c55e;
|
|
82
|
+
--color-green-600: #16a34a;
|
|
83
|
+
--color-green-700: #15803d;
|
|
84
|
+
--color-green-800: #166534;
|
|
85
|
+
--color-green-900: #14532d;
|
|
86
|
+
--color-green-950: #052e16;
|
|
87
|
+
|
|
88
|
+
--color-emerald-50: #ecfdf5;
|
|
89
|
+
--color-emerald-100: #d1fae5;
|
|
90
|
+
--color-emerald-200: #a7f3d0;
|
|
91
|
+
--color-emerald-300: #6ee7b7;
|
|
92
|
+
--color-emerald-400: #34d399;
|
|
93
|
+
--color-emerald-500: #10b981;
|
|
94
|
+
--color-emerald-600: #059669;
|
|
95
|
+
--color-emerald-700: #047857;
|
|
96
|
+
--color-emerald-800: #065f46;
|
|
97
|
+
--color-emerald-900: #064e3b;
|
|
98
|
+
--color-emerald-950: #022c22;
|
|
99
|
+
|
|
100
|
+
--color-teal-50: #f0fdfa;
|
|
101
|
+
--color-teal-100: #ccfbf1;
|
|
102
|
+
--color-teal-200: #99f6e4;
|
|
103
|
+
--color-teal-300: #5eead4;
|
|
104
|
+
--color-teal-400: #2dd4bf;
|
|
105
|
+
--color-teal-500: #14b8a6;
|
|
106
|
+
--color-teal-600: #0d9488;
|
|
107
|
+
--color-teal-700: #0f766e;
|
|
108
|
+
--color-teal-800: #115e59;
|
|
109
|
+
--color-teal-900: #134e4a;
|
|
110
|
+
--color-teal-950: #042f2e;
|
|
111
|
+
|
|
112
|
+
--color-cyan-50: #ecfeff;
|
|
113
|
+
--color-cyan-100: #cffafe;
|
|
114
|
+
--color-cyan-200: #a5f3fc;
|
|
115
|
+
--color-cyan-300: #67e8f9;
|
|
116
|
+
--color-cyan-400: #22d3ee;
|
|
117
|
+
--color-cyan-500: #06b6d4;
|
|
118
|
+
--color-cyan-600: #0891b2;
|
|
119
|
+
--color-cyan-700: #0e7490;
|
|
120
|
+
--color-cyan-800: #155e75;
|
|
121
|
+
--color-cyan-900: #164e63;
|
|
122
|
+
--color-cyan-950: #083344;
|
|
123
|
+
|
|
124
|
+
--color-sky-50: #f0f9ff;
|
|
125
|
+
--color-sky-100: #e0f2fe;
|
|
126
|
+
--color-sky-200: #bae6fd;
|
|
127
|
+
--color-sky-300: #7dd3fc;
|
|
128
|
+
--color-sky-400: #38bdf8;
|
|
129
|
+
--color-sky-500: #0ea5e9;
|
|
130
|
+
--color-sky-600: #0284c7;
|
|
131
|
+
--color-sky-700: #0369a1;
|
|
132
|
+
--color-sky-800: #075985;
|
|
133
|
+
--color-sky-900: #0c4a6e;
|
|
134
|
+
--color-sky-950: #082f49;
|
|
135
|
+
|
|
136
|
+
--color-blue-50: #eff6ff;
|
|
137
|
+
--color-blue-100: #dbeafe;
|
|
138
|
+
--color-blue-200: #bfdbfe;
|
|
139
|
+
--color-blue-300: #93c5fd;
|
|
140
|
+
--color-blue-400: #60a5fa;
|
|
141
|
+
--color-blue-500: #3b82f6;
|
|
142
|
+
--color-blue-600: #2563eb;
|
|
143
|
+
--color-blue-700: #1d4ed8;
|
|
144
|
+
--color-blue-800: #1e40af;
|
|
145
|
+
--color-blue-900: #1e3a8a;
|
|
146
|
+
--color-blue-950: #172554;
|
|
147
|
+
|
|
148
|
+
--color-indigo-50: #eef2ff;
|
|
149
|
+
--color-indigo-100: #e0e7ff;
|
|
150
|
+
--color-indigo-200: #c7d2fe;
|
|
151
|
+
--color-indigo-300: #a5b4fc;
|
|
152
|
+
--color-indigo-400: #818cf8;
|
|
153
|
+
--color-indigo-500: #6366f1;
|
|
154
|
+
--color-indigo-600: #4f46e5;
|
|
155
|
+
--color-indigo-700: #4338ca;
|
|
156
|
+
--color-indigo-800: #3730a3;
|
|
157
|
+
--color-indigo-900: #312e81;
|
|
158
|
+
--color-indigo-950: #1e1b4b;
|
|
159
|
+
|
|
160
|
+
--color-violet-50: #f5f3ff;
|
|
161
|
+
--color-violet-100: #ede9fe;
|
|
162
|
+
--color-violet-200: #ddd6fe;
|
|
163
|
+
--color-violet-300: #c4b5fd;
|
|
164
|
+
--color-violet-400: #a78bfa;
|
|
165
|
+
--color-violet-500: #8b5cf6;
|
|
166
|
+
--color-violet-600: #7c3aed;
|
|
167
|
+
--color-violet-700: #6d28d9;
|
|
168
|
+
--color-violet-800: #5b21b6;
|
|
169
|
+
--color-violet-900: #4c1d95;
|
|
170
|
+
--color-violet-950: #2e1065;
|
|
171
|
+
|
|
172
|
+
--color-purple-50: #faf5ff;
|
|
173
|
+
--color-purple-100: #f3e8ff;
|
|
174
|
+
--color-purple-200: #e9d5ff;
|
|
175
|
+
--color-purple-300: #d8b4fe;
|
|
176
|
+
--color-purple-400: #c084fc;
|
|
177
|
+
--color-purple-500: #a855f7;
|
|
178
|
+
--color-purple-600: #9333ea;
|
|
179
|
+
--color-purple-700: #7e22ce;
|
|
180
|
+
--color-purple-800: #6b21a8;
|
|
181
|
+
--color-purple-900: #581c87;
|
|
182
|
+
--color-purple-950: #3b0764;
|
|
183
|
+
|
|
184
|
+
--color-fuchsia-50: #fdf4ff;
|
|
185
|
+
--color-fuchsia-100: #fae8ff;
|
|
186
|
+
--color-fuchsia-200: #f5d0fe;
|
|
187
|
+
--color-fuchsia-300: #f0abfc;
|
|
188
|
+
--color-fuchsia-400: #e879f9;
|
|
189
|
+
--color-fuchsia-500: #d946ef;
|
|
190
|
+
--color-fuchsia-600: #c026d3;
|
|
191
|
+
--color-fuchsia-700: #a21caf;
|
|
192
|
+
--color-fuchsia-800: #86198f;
|
|
193
|
+
--color-fuchsia-900: #701a75;
|
|
194
|
+
--color-fuchsia-950: #4a044e;
|
|
195
|
+
|
|
196
|
+
--color-pink-50: #fdf2f8;
|
|
197
|
+
--color-pink-100: #fce7f3;
|
|
198
|
+
--color-pink-200: #fbcfe8;
|
|
199
|
+
--color-pink-300: #f9a8d4;
|
|
200
|
+
--color-pink-400: #f472b6;
|
|
201
|
+
--color-pink-500: #ec4899;
|
|
202
|
+
--color-pink-600: #db2777;
|
|
203
|
+
--color-pink-700: #be185d;
|
|
204
|
+
--color-pink-800: #9d174d;
|
|
205
|
+
--color-pink-900: #831843;
|
|
206
|
+
--color-pink-950: #500724;
|
|
207
|
+
|
|
208
|
+
--color-rose-50: #fff1f2;
|
|
209
|
+
--color-rose-100: #ffe4e6;
|
|
210
|
+
--color-rose-200: #fecdd3;
|
|
211
|
+
--color-rose-300: #fda4af;
|
|
212
|
+
--color-rose-400: #fb7185;
|
|
213
|
+
--color-rose-500: #f43f5e;
|
|
214
|
+
--color-rose-600: #e11d48;
|
|
215
|
+
--color-rose-700: #be123c;
|
|
216
|
+
--color-rose-800: #9f1239;
|
|
217
|
+
--color-rose-900: #881337;
|
|
218
|
+
--color-rose-950: #4c0519;
|
|
219
|
+
|
|
220
|
+
--color-slate-50: #f8fafc;
|
|
221
|
+
--color-slate-100: #f1f5f9;
|
|
222
|
+
--color-slate-200: #e2e8f0;
|
|
223
|
+
--color-slate-300: #cbd5e1;
|
|
224
|
+
--color-slate-400: #94a3b8;
|
|
225
|
+
--color-slate-500: #64748b;
|
|
226
|
+
--color-slate-600: #475569;
|
|
227
|
+
--color-slate-700: #334155;
|
|
228
|
+
--color-slate-800: #1e293b;
|
|
229
|
+
--color-slate-900: #0f172a;
|
|
230
|
+
--color-slate-950: #020617;
|
|
231
|
+
|
|
232
|
+
--color-zinc-50: #fafafa;
|
|
233
|
+
--color-zinc-100: #f4f4f5;
|
|
234
|
+
--color-zinc-200: #e4e4e7;
|
|
235
|
+
--color-zinc-300: #d4d4d8;
|
|
236
|
+
--color-zinc-400: #a1a1aa;
|
|
237
|
+
--color-zinc-500: #71717a;
|
|
238
|
+
--color-zinc-600: #52525b;
|
|
239
|
+
--color-zinc-700: #3f3f46;
|
|
240
|
+
--color-zinc-800: #27272a;
|
|
241
|
+
--color-zinc-900: #18181b;
|
|
242
|
+
--color-zinc-950: #09090b;
|
|
243
|
+
|
|
244
|
+
--color-neutral-50: #fafafa;
|
|
245
|
+
--color-neutral-100: #f5f5f5;
|
|
246
|
+
--color-neutral-200: #e5e5e5;
|
|
247
|
+
--color-neutral-300: #d4d4d4;
|
|
248
|
+
--color-neutral-400: #a3a3a3;
|
|
249
|
+
--color-neutral-500: #737373;
|
|
250
|
+
--color-neutral-600: #525252;
|
|
251
|
+
--color-neutral-700: #404040;
|
|
252
|
+
--color-neutral-800: #262626;
|
|
253
|
+
--color-neutral-900: #171717;
|
|
254
|
+
--color-neutral-950: #0a0a0a;
|
|
255
|
+
|
|
256
|
+
--color-stone-50: #fafaf9;
|
|
257
|
+
--color-stone-100: #f5f5f4;
|
|
258
|
+
--color-stone-200: #e7e5e4;
|
|
259
|
+
--color-stone-300: #d6d3d1;
|
|
260
|
+
--color-stone-400: #a8a29e;
|
|
261
|
+
--color-stone-500: #78716c;
|
|
262
|
+
--color-stone-600: #57534e;
|
|
263
|
+
--color-stone-700: #44403c;
|
|
264
|
+
--color-stone-800: #292524;
|
|
265
|
+
--color-stone-900: #1c1917;
|
|
266
|
+
--color-stone-950: #0c0a09;
|
|
267
|
+
}
|
|
@@ -14,7 +14,7 @@ const { icon, label } = Astro.props
|
|
|
14
14
|
role="button"
|
|
15
15
|
tabindex="0"
|
|
16
16
|
aria-label={Astro.locals.i18n.t(label)}
|
|
17
|
-
class="hover:text-primary flex rounded-md p-3 text-gray-600"
|
|
17
|
+
class="hover:text-primary flex cursor-pointer rounded-md p-3 text-gray-600"
|
|
18
18
|
>
|
|
19
19
|
<Icon className={icon} ariaLabel="" />
|
|
20
20
|
</div>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "./color-overrides.css";
|
|
3
|
+
|
|
4
|
+
@source "../";
|
|
5
|
+
|
|
6
|
+
@plugin "@tailwindcss/typography";
|
|
7
|
+
@plugin "@iconify/tailwind4" {
|
|
8
|
+
prefixes: mdi;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@plugin "daisyui" {
|
|
12
|
+
prefix: "dy-";
|
|
13
|
+
logs: false;
|
|
14
|
+
themes: light --default;
|
|
15
|
+
exclude: rootcolor scrollbar;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@theme inline {
|
|
19
|
+
--color-primary: var(--primary-color);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@plugin "daisyui/theme" {
|
|
23
|
+
name: "light";
|
|
24
|
+
default: true;
|
|
25
|
+
--radius-selector: 1rem;
|
|
26
|
+
--radius-field: 0.375rem;
|
|
27
|
+
--radius-box: 0.375rem;
|
|
28
|
+
--color-base-100: #f3f4f6;
|
|
29
|
+
--color-base-200: #e5e7eb;
|
|
30
|
+
--color-base-300: #d1d5db;
|
|
31
|
+
--color-base-content: #9ca3af;
|
|
32
|
+
|
|
33
|
+
--color-primary: var(--primary-color);
|
|
34
|
+
--color-primary-content: #f9fafb;
|
|
35
|
+
--color-secondary: var(--primary-color);
|
|
36
|
+
--color-secondary-content: #f9fafb;
|
|
37
|
+
--color-accent: var(--primary-color);
|
|
38
|
+
--color-accent-content: #f9fafb;
|
|
39
|
+
--color-neutral: #4b5563;
|
|
40
|
+
--color-neutral-content: #f9fafb;
|
|
41
|
+
--color-info: #0ea5e9;
|
|
42
|
+
--color-info-content: #f9fafb;
|
|
43
|
+
--color-success: #16a34a;
|
|
44
|
+
--color-success-content: #f9fafb;
|
|
45
|
+
--color-warning: #f97316;
|
|
46
|
+
--color-warning-content: #fff7ed;
|
|
47
|
+
--color-error: #dc2626;
|
|
48
|
+
--color-error-content: #fef2f2;
|
|
49
|
+
}
|
|
@@ -15,8 +15,8 @@ const isPortraitImage = image.height > image.width
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
17
|
<div
|
|
18
|
-
class="relative shrink-0 overflow-hidden
|
|
19
|
-
class:list={style === "book" ? "rounded-
|
|
18
|
+
class="shadow-xs relative shrink-0 overflow-hidden"
|
|
19
|
+
class:list={style === "book" ? "rounded-xs" : "rounded-md"}
|
|
20
20
|
>
|
|
21
21
|
<Image
|
|
22
22
|
class:list={isPortraitImage ? "h-52 w-auto sm:h-72" : "h-auto w-52 sm:w-72"}
|
|
@@ -13,7 +13,7 @@ const content = createContentMetadata(item.data.content[0])
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
<a
|
|
16
|
-
class="flex min-w-52 items-center justify-center gap-2 rounded-2xl bg-gray-800 px-6 py-3 font-bold uppercase text-gray-100
|
|
16
|
+
class="shadow-xs flex min-w-52 items-center justify-center gap-2 rounded-2xl bg-gray-800 px-6 py-3 font-bold uppercase text-gray-100 hover:bg-gray-950 hover:text-gray-300"
|
|
17
17
|
href={content.url}
|
|
18
18
|
target={content.target}
|
|
19
19
|
hreflang={item.data.language}
|
|
@@ -7,7 +7,7 @@ interface Props {
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
<button
|
|
10
|
-
class="flex items-center justify-center gap-2 rounded-2xl bg-gray-200 px-6 py-3 font-bold uppercase text-gray-600
|
|
10
|
+
class="shadow-xs flex cursor-pointer items-center justify-center gap-2 rounded-2xl bg-gray-200 px-6 py-3 font-bold uppercase text-gray-600 hover:bg-gray-300"
|
|
11
11
|
class:list={[Astro.props.className]}
|
|
12
12
|
id="share-btn"
|
|
13
13
|
><Icon className="mdi--share-variant-outline" ariaLabel="" />
|
|
@@ -52,11 +52,11 @@ export default function ResultList({
|
|
|
52
52
|
href={detailsPagePath(locale, {
|
|
53
53
|
id: item.id,
|
|
54
54
|
})}
|
|
55
|
-
className="group flex overflow-hidden py-6 transition-colors ease-in-out
|
|
55
|
+
className="md:rounded-xs group flex overflow-hidden py-6 transition-colors ease-in-out hover:bg-gray-100 md:py-10"
|
|
56
56
|
>
|
|
57
57
|
<div className="flex h-36 w-36 shrink-0 flex-col items-start justify-center">
|
|
58
58
|
<img
|
|
59
|
-
className="max-h-36 w-auto max-w-36
|
|
59
|
+
className="rounded-xs max-h-36 w-auto max-w-36 object-contain shadow-md"
|
|
60
60
|
src={item.image.src}
|
|
61
61
|
width={item.image.width}
|
|
62
62
|
height={item.image.height}
|
|
@@ -108,7 +108,7 @@ export default function ResultList({
|
|
|
108
108
|
</div>
|
|
109
109
|
</div>
|
|
110
110
|
<Icon
|
|
111
|
-
className="mdi--chevron-right
|
|
111
|
+
className="mdi--chevron-right group-hover:text-primary my-auto me-4 ms-2 hidden shrink-0 text-2xl text-gray-300 sm:block"
|
|
112
112
|
flipIcon={direction === "rtl"}
|
|
113
113
|
ariaLabel=""
|
|
114
114
|
/>
|
|
@@ -121,7 +121,7 @@ export default function ResultList({
|
|
|
121
121
|
<div className="dy-divider">
|
|
122
122
|
<button
|
|
123
123
|
type="button"
|
|
124
|
-
className="dy-btn"
|
|
124
|
+
className="dy-btn text-gray-700"
|
|
125
125
|
onClick={() => setMaxItems(maxItems + PAGE_SIZE)}
|
|
126
126
|
>
|
|
127
127
|
{t("ln.search.more-results")}
|
|
@@ -6,6 +6,7 @@ import type { SearchQuery } from "../hooks/use-search"
|
|
|
6
6
|
import type { MediaType, TranslatedLanguage } from "../types"
|
|
7
7
|
import type { Translations } from "../utils/search-translations"
|
|
8
8
|
import { useProvidedTranslations } from "../utils/use-provided-translations"
|
|
9
|
+
import Select from "./Select"
|
|
9
10
|
|
|
10
11
|
// URL search params
|
|
11
12
|
const SEARCH = "search"
|
|
@@ -94,11 +95,10 @@ export default function SearchFilter({
|
|
|
94
95
|
|
|
95
96
|
return (
|
|
96
97
|
<>
|
|
97
|
-
<label className="dy-input dy-input-bordered mb-2 flex items-center gap-2">
|
|
98
|
+
<label className="dy-input dy-input-md dy-input-bordered mb-2 flex w-full items-center gap-2">
|
|
98
99
|
<input
|
|
99
100
|
type="search"
|
|
100
101
|
className="grow"
|
|
101
|
-
id="search-input"
|
|
102
102
|
ref={searchInput}
|
|
103
103
|
placeholder={t("ln.search.placeholder")}
|
|
104
104
|
enterKeyHint="search"
|
|
@@ -110,78 +110,44 @@ export default function SearchFilter({
|
|
|
110
110
|
</label>
|
|
111
111
|
<div className="mb-8 grid grid-cols-1 gap-2 sm:grid-cols-3 sm:gap-6 md:mb-10">
|
|
112
112
|
{languageFilterEnabled && (
|
|
113
|
-
<
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
<option value="">{t("ln.search.all-languages")}</option>
|
|
126
|
-
{contentLanguages.map(({ code, name }) => (
|
|
127
|
-
<option key={code} value={code} lang={code}>
|
|
128
|
-
{name}
|
|
129
|
-
</option>
|
|
130
|
-
))}
|
|
131
|
-
</select>
|
|
132
|
-
</label>
|
|
113
|
+
<Select
|
|
114
|
+
label={t("ln.language_one")}
|
|
115
|
+
initialValue={language}
|
|
116
|
+
valueChange={(val) => setLanguage(val)}
|
|
117
|
+
options={[
|
|
118
|
+
{ id: "", label: t("ln.search.all-languages") },
|
|
119
|
+
...contentLanguages.map(({ code: id, name: label }) => ({
|
|
120
|
+
id,
|
|
121
|
+
label,
|
|
122
|
+
})),
|
|
123
|
+
]}
|
|
124
|
+
/>
|
|
133
125
|
)}
|
|
134
126
|
|
|
135
127
|
{typesFilterEnabled && (
|
|
136
|
-
<
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
id="type-select"
|
|
146
|
-
onChange={(e) => setType(e.currentTarget.value)}
|
|
147
|
-
>
|
|
148
|
-
<option key="" value="">
|
|
149
|
-
{t("ln.search.all-types")}
|
|
150
|
-
</option>
|
|
151
|
-
{mediaTypes.map(({ id, label }) => (
|
|
152
|
-
<option key={id} value={id}>
|
|
153
|
-
{label}
|
|
154
|
-
</option>
|
|
155
|
-
))}
|
|
156
|
-
</select>
|
|
157
|
-
</label>
|
|
128
|
+
<Select
|
|
129
|
+
label={t("ln.type_one")}
|
|
130
|
+
initialValue={type}
|
|
131
|
+
valueChange={(val) => setType(val)}
|
|
132
|
+
options={[
|
|
133
|
+
{ id: "", label: t("ln.search.all-types") },
|
|
134
|
+
...mediaTypes,
|
|
135
|
+
]}
|
|
136
|
+
/>
|
|
158
137
|
)}
|
|
159
138
|
|
|
160
139
|
{categoriesFilterEnabled && (
|
|
161
|
-
<
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
className="dy-select dy-select-bordered sm:dy-select-sm"
|
|
169
|
-
value={category}
|
|
170
|
-
id="category-select"
|
|
171
|
-
onChange={(e) => setCategory(e.currentTarget.value)}
|
|
172
|
-
>
|
|
173
|
-
<option key="" value="">
|
|
174
|
-
{t("ln.search.all-categories")}
|
|
175
|
-
</option>
|
|
176
|
-
{Object.entries(categories)
|
|
140
|
+
<Select
|
|
141
|
+
label={t("ln.category_one")}
|
|
142
|
+
initialValue={category}
|
|
143
|
+
valueChange={(val) => setCategory(val)}
|
|
144
|
+
options={[
|
|
145
|
+
{ id: "", label: t("ln.search.all-categories") },
|
|
146
|
+
...Object.entries(categories)
|
|
177
147
|
.sort((a, b) => a[1].localeCompare(b[1], locale))
|
|
178
|
-
.map(([id, label]) => (
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
</option>
|
|
182
|
-
))}
|
|
183
|
-
</select>
|
|
184
|
-
</label>
|
|
148
|
+
.map(([id, label]) => ({ id, label })),
|
|
149
|
+
]}
|
|
150
|
+
/>
|
|
185
151
|
)}
|
|
186
152
|
</div>
|
|
187
153
|
</>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
label: string
|
|
3
|
+
initialValue: string
|
|
4
|
+
valueChange: (value: string) => void
|
|
5
|
+
options: { id: string; label: string }[]
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default function Select({
|
|
9
|
+
label,
|
|
10
|
+
initialValue,
|
|
11
|
+
valueChange,
|
|
12
|
+
options,
|
|
13
|
+
}: Props) {
|
|
14
|
+
return (
|
|
15
|
+
<label className="dy-form-control">
|
|
16
|
+
<span className="mb-1 mt-2 block text-xs font-bold uppercase text-gray-500">
|
|
17
|
+
{label}
|
|
18
|
+
</span>
|
|
19
|
+
<select
|
|
20
|
+
className="dy-select dy-select-bordered sm:dy-select-sm w-full"
|
|
21
|
+
value={initialValue}
|
|
22
|
+
onChange={(e) => valueChange(e.currentTarget.value)}
|
|
23
|
+
>
|
|
24
|
+
{options.map(({ id, label }) => (
|
|
25
|
+
<option key={id} value={id}>
|
|
26
|
+
{label}
|
|
27
|
+
</option>
|
|
28
|
+
))}
|
|
29
|
+
</select>
|
|
30
|
+
</label>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
6
|
-
esac
|
|
7
|
-
|
|
8
|
-
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/lib/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.17/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/lib/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.17/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
|
-
fi
|
|
13
|
-
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../tailwindcss/lib/cli.js" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../tailwindcss/lib/cli.js" "$@"
|
|
17
|
-
fi
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
6
|
-
esac
|
|
7
|
-
|
|
8
|
-
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/lib/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.17/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/lib/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.17/node_modules/tailwindcss/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.17/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
|
-
fi
|
|
13
|
-
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../tailwindcss/lib/cli.js" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../tailwindcss/lib/cli.js" "$@"
|
|
17
|
-
fi
|
package/tailwind.config.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { addIconSelectors } from "@iconify/tailwind"
|
|
2
|
-
import typography from "@tailwindcss/typography"
|
|
3
|
-
import daisyui from "daisyui"
|
|
4
|
-
import type { Config } from "tailwindcss"
|
|
5
|
-
|
|
6
|
-
const DEFAULT_COLOR_PRIMARY = "#E6B15C"
|
|
7
|
-
|
|
8
|
-
export function lightnetStyles({
|
|
9
|
-
primaryColor,
|
|
10
|
-
}: {
|
|
11
|
-
primaryColor?: string
|
|
12
|
-
}): Partial<Config> {
|
|
13
|
-
const primary = primaryColor ?? DEFAULT_COLOR_PRIMARY
|
|
14
|
-
return {
|
|
15
|
-
content: [
|
|
16
|
-
"./node_modules/lightnet/src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}",
|
|
17
|
-
"./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}",
|
|
18
|
-
"./src/content/media-types/*.json",
|
|
19
|
-
],
|
|
20
|
-
theme: {
|
|
21
|
-
extend: {
|
|
22
|
-
colors: {
|
|
23
|
-
primary,
|
|
24
|
-
},
|
|
25
|
-
backgroundImage: {
|
|
26
|
-
"gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
daisyui: {
|
|
31
|
-
themes: [
|
|
32
|
-
{
|
|
33
|
-
lightnet: {
|
|
34
|
-
primary,
|
|
35
|
-
secondary: primary,
|
|
36
|
-
accent: primary,
|
|
37
|
-
neutral: "#030712",
|
|
38
|
-
"base-100": "#f9fafb",
|
|
39
|
-
|
|
40
|
-
"--rounded-box": "0.375rem", // border radius rounded-box utility class, used in card and other large boxes
|
|
41
|
-
"--rounded-btn": "0.375rem", // border radius rounded-btn utility class, used in buttons and similar element
|
|
42
|
-
"--rounded-badge": "0.375rem", // border radius rounded-badge utility class, used in badges and similar
|
|
43
|
-
"--tab-radius": "0.375rem", // border radius of tabs
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
base: false, // applies background color and foreground color for root element by default
|
|
48
|
-
utils: true, // adds responsive and modifier utility classes
|
|
49
|
-
logs: false, // Shows info about daisyUI version and used config in the console when building your CSS
|
|
50
|
-
prefix: "dy-",
|
|
51
|
-
},
|
|
52
|
-
plugins: [typography, daisyui, addIconSelectors(["mdi"])],
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export default lightnetStyles({})
|