lightnet 2.17.1 → 2.17.3

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.
Files changed (31) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/__e2e__/fixtures/basics/node_modules/.bin/astro +2 -2
  3. package/__e2e__/fixtures/basics/node_modules/.bin/tailwind +17 -0
  4. package/__e2e__/fixtures/basics/node_modules/.bin/tailwindcss +17 -0
  5. package/__e2e__/fixtures/basics/node_modules/.bin/tsc +2 -2
  6. package/__e2e__/fixtures/basics/node_modules/.bin/tsserver +2 -2
  7. package/__e2e__/fixtures/basics/package.json +8 -8
  8. package/__e2e__/fixtures/basics/tailwind.config.mjs +8 -0
  9. package/exports/utils.ts +1 -1
  10. package/package.json +12 -12
  11. package/src/astro-integration/config.ts +0 -10
  12. package/src/astro-integration/integration.ts +3 -6
  13. package/src/components/CategoriesOverview.astro +1 -1
  14. package/src/components/Gallery.astro +3 -3
  15. package/src/components/Hero.astro +1 -1
  16. package/src/components/HighlightSection.astro +1 -1
  17. package/src/components/MediaItemList.astro +3 -3
  18. package/src/i18n/translations/README.md +1 -1
  19. package/src/layouts/Page.astro +1 -8
  20. package/src/pages/details-page/components/Cover.astro +2 -2
  21. package/src/pages/details-page/components/OpenButton.astro +1 -1
  22. package/src/pages/details-page/components/ShareButton.astro +1 -1
  23. package/src/pages/search-page/components/ResultList.tsx +4 -4
  24. package/src/pages/search-page/components/SearchFilter.tsx +1 -1
  25. package/src/pages/search-page/components/Select.tsx +1 -1
  26. package/src/pages/search-page/hooks/use-debounce.ts +1 -1
  27. package/src/pages/search-page/hooks/use-search.ts +1 -1
  28. package/src/utils/paths.ts +8 -7
  29. package/tailwind.config.ts +56 -0
  30. package/src/layouts/color-overrides.css +0 -267
  31. package/src/layouts/global.css +0 -49
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # lightnet
2
2
 
3
+ ## 2.17.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#226](https://github.com/LightNetDev/LightNet/pull/226) [`8983023`](https://github.com/LightNetDev/LightNet/commit/898302310969a3cd255441241c112f4a8f360789) Thanks [@smn-cds](https://github.com/smn-cds)! - Update dependencies.
8
+
9
+ ## 2.17.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [#224](https://github.com/LightNetDev/LightNet/pull/224) [`bb11b47`](https://github.com/LightNetDev/LightNet/commit/bb11b47ec257208938d7cac8416ef95b9539d5a8) Thanks [@smn-cds](https://github.com/smn-cds)! - Revert Tailwind CSS back to v3.
14
+
3
15
  ## 2.17.1
4
16
 
5
17
  ### Patch Changes
@@ -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.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"
9
+ export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/astro@5.5.3_@types+node@22.13.10_jiti@2.4.2_lightningcss@1.29.1_rollup@4.36.0_terser@5.39.0_typescript@5.8.2_yaml@2.7.0/node_modules/astro/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/astro@5.5.3_@types+node@22.13.10_jiti@2.4.2_lightningcss@1.29.1_rollup@4.36.0_terser@5.39.0_typescript@5.8.2_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.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"
11
+ export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/astro@5.5.3_@types+node@22.13.10_jiti@2.4.2_lightningcss@1.29.1_rollup@4.36.0_terser@5.39.0_typescript@5.8.2_yaml@2.7.0/node_modules/astro/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/astro@5.5.3_@types+node@22.13.10_jiti@2.4.2_lightningcss@1.29.1_rollup@4.36.0_terser@5.39.0_typescript@5.8.2_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" "$@"
@@ -0,0 +1,17 @@
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
@@ -0,0 +1,17 @@
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
@@ -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/typescript@5.7.3/node_modules/typescript/bin/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.7.3/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules"
9
+ export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/bin/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.8.2/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/typescript@5.7.3/node_modules/typescript/bin/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.7.3/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules:$NODE_PATH"
11
+ export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/bin/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.8.2/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/../typescript/bin/tsc" "$@"
@@ -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/typescript@5.7.3/node_modules/typescript/bin/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.7.3/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules"
9
+ export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/bin/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.8.2/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/typescript@5.7.3/node_modules/typescript/bin/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.7.3/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules:$NODE_PATH"
11
+ export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/bin/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.8.2/node_modules/typescript/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.8.2/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/../typescript/bin/tsserver" "$@"
@@ -5,14 +5,14 @@
5
5
  "private": "true",
6
6
  "dependencies": {
7
7
  "@astrojs/react": "^4.2.1",
8
- "@lightnet/decap-admin": "^2.4.0",
9
- "@tailwindcss/vite": "^4.0.9",
10
- "astro": "^5.4.0",
11
- "lightnet": "^2.17.0",
12
- "react": "^18.3.1",
13
- "react-dom": "^18.3.1",
8
+ "@astrojs/tailwind": "^6.0.0",
9
+ "@lightnet/decap-admin": "^2.4.2",
10
+ "astro": "^5.5.3",
11
+ "lightnet": "^2.17.2",
12
+ "react": "^19.0.0",
13
+ "react-dom": "^19.0.0",
14
14
  "sharp": "^0.33.5",
15
- "tailwindcss": "^4.0.9",
16
- "typescript": "^5.7.3"
15
+ "tailwindcss": "^3.4.17",
16
+ "typescript": "^5.8.2"
17
17
  }
18
18
  }
@@ -0,0 +1,8 @@
1
+ import { lightnetStyles } from "lightnet/tailwind.config.ts"
2
+
3
+ /**
4
+ * @type {import('tailwindcss').Config}
5
+ */
6
+ export default {
7
+ presets: [lightnetStyles({ primaryColor: "#14004B" })],
8
+ }
package/exports/utils.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from "../src/utils/paths"
1
+ export { detailsPagePath, searchPagePath } from "../src/utils/paths"
2
2
  export { verifySchema, verifySchemaAsync } from "../src/utils/verify-schema"
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "lightnet",
3
3
  "type": "module",
4
4
  "license": "MIT",
5
- "version": "2.17.1",
5
+ "version": "2.17.3",
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
- "@tailwindcss/vite": "^4.0.9",
36
+ "@astrojs/tailwind": "^6.0.0",
37
37
  "astro": "^5.1.0",
38
- "react": "^18.3.1",
39
- "react-dom": "^18.3.1",
38
+ "react": "^19.0.0",
39
+ "react-dom": "^19.0.0",
40
40
  "sharp": "^0.33.4",
41
- "tailwindcss": "^4.0.9",
41
+ "tailwindcss": "^3.4.17",
42
42
  "typescript": "^5.5.3"
43
43
  },
44
44
  "dependencies": {
45
45
  "@iconify-json/mdi": "^1.2.3",
46
- "@iconify/tailwind4": "^1.0.6",
46
+ "@iconify/tailwind": "^1.2.0",
47
47
  "@tailwindcss/typography": "^0.5.16",
48
- "daisyui": "^5.0.0",
49
- "@types/react": "^18.3.18",
48
+ "@types/react": "^19.0.12",
49
+ "daisyui": "^4.12.24",
50
50
  "fuse.js": "^7.1.0",
51
- "i18next": "^24.2.2",
51
+ "i18next": "^24.2.3",
52
52
  "marked": "^15.0.7",
53
53
  "yaml": "^2.7.0",
54
54
  "zod-validation-error": "^3.4.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@playwright/test": "^1.50.1",
58
- "@types/node": "^22.13.5",
59
- "vitest": "^3.0.7"
57
+ "@playwright/test": "^1.51.1",
58
+ "@types/node": "^22.13.10",
59
+ "vitest": "^3.0.9"
60
60
  },
61
61
  "scripts": {
62
62
  "test": "vitest",
@@ -124,16 +124,6 @@ export const configSchema = z.object({
124
124
  * Title of the web site.
125
125
  */
126
126
  title: z.string(),
127
- /**
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
127
  /**
138
128
  * All languages: content languages and site languages.
139
129
  */
@@ -1,6 +1,6 @@
1
1
  /// <reference path="../i18n/locals.d.ts" />
2
2
  import react from "@astrojs/react"
3
- import tailwindcss from "@tailwindcss/vite"
3
+ import tailwind from "@astrojs/tailwind"
4
4
  import type { AstroIntegration } from "astro"
5
5
 
6
6
  import { resolveDefaultLocale } from "../i18n/resolve-default-locale"
@@ -58,14 +58,11 @@ export function lightnet(lightnetConfig: LightnetConfig): AstroIntegration {
58
58
 
59
59
  addMiddleware({ entrypoint: "lightnet/locals", order: "pre" })
60
60
 
61
- astroConfig.integrations.push(react())
61
+ astroConfig.integrations.push(tailwind(), react())
62
62
 
63
63
  updateConfig({
64
64
  vite: {
65
- plugins: [
66
- vitePluginLightnetConfig(config, astroConfig, logger),
67
- tailwindcss(),
68
- ],
65
+ plugins: [vitePluginLightnetConfig(config, astroConfig, logger)],
69
66
  },
70
67
  i18n: {
71
68
  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="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"
23
+ class="flex h-12 w-full items-center justify-center rounded-xl bg-gray-200 p-2 px-8 shadow-sm 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-gray-400 transition-all duration-75 ease-in-out group-hover:outline-2"
46
- class:list={layout === "book" ? "rounded-xs" : "rounded-md"}
45
+ class="relative overflow-hidden shadow-md outline-2 outline-gray-400 transition-all duration-75 ease-in-out sm:group-hover:outline"
46
+ class:list={layout === "book" ? "rounded-sm" : "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-gray-400 transition-all duration-75 ease-in-out group-hover:outline-2"
91
+ class="relative overflow-hidden rounded-md shadow-md outline-2 outline-gray-400 transition-all duration-75 ease-in-out sm:group-hover:outline"
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-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"
52
+ class="bg-gradient-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 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"
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 shadow-sm hover:text-gray-100"
57
57
  href={link.href}
58
58
  >
59
59
  {link.text}
@@ -38,7 +38,7 @@ const mediaTypes = Object.fromEntries(
38
38
  id: item.id,
39
39
  })
40
40
  }
41
- class="md:rounded-xs group flex overflow-hidden py-4 transition-colors ease-in-out hover:bg-gray-100 md:py-8"
41
+ class="group flex overflow-hidden py-4 transition-colors ease-in-out md:rounded-sm md:py-8 md:hover:bg-gray-100"
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="rounded-xs max-h-32 w-auto max-w-32 object-contain shadow-md"
49
+ class="max-h-32 w-auto max-w-32 rounded-sm 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 group-hover:text-primary my-auto ms-2 me-4 shrink-0 text-2xl text-gray-300"
76
+ className="mdi--chevron-right hidden sm:block md: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
  />
@@ -1,4 +1,4 @@
1
- # LightNet Translations
1
+ # LightNet Built-in Translations
2
2
 
3
3
  This folder contains all the built-in translations for LightNet.
4
4
  Check the [translation status](TRANSLATION-STATUS.md) for an overview of completed translations and pending work.
@@ -1,6 +1,4 @@
1
1
  ---
2
- import "./global.css"
3
-
4
2
  import { ClientRouter } from "astro:transitions"
5
3
  import config from "virtual:lightnet/config"
6
4
 
@@ -20,7 +18,6 @@ const configTitle = Astro.locals.i18n.t(config.title)
20
18
 
21
19
  const { currentLocale } = Astro.locals.i18n
22
20
  const language = resolveLanguage(currentLocale)
23
- const primaryColor = config.primaryColor
24
21
  ---
25
22
 
26
23
  <!doctype html>
@@ -51,9 +48,5 @@ const primaryColor = config.primaryColor
51
48
  <slot />
52
49
  </main>
53
50
  <PreloadReact client:idle />
54
- </body><style is:global define:vars={{ primaryColor }}>
55
- :root {
56
- --primary-color: var(--primaryColor);
57
- }
58
- </style>
51
+ </body>
59
52
  </html>
@@ -15,8 +15,8 @@ const isPortraitImage = image.height > image.width
15
15
  ---
16
16
 
17
17
  <div
18
- class="shadow-xs relative shrink-0 overflow-hidden"
19
- class:list={style === "book" ? "rounded-xs" : "rounded-md"}
18
+ class="relative shrink-0 overflow-hidden shadow-sm"
19
+ class:list={style === "book" ? "rounded-sm" : "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="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"
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 shadow-sm 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="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"
10
+ class="flex cursor-pointer items-center justify-center gap-2 rounded-2xl bg-gray-200 px-6 py-3 font-bold uppercase text-gray-600 shadow-sm 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="md:rounded-xs group flex overflow-hidden py-6 transition-colors ease-in-out hover:bg-gray-100 md:py-10"
55
+ className="group flex overflow-hidden py-6 transition-colors ease-in-out md:rounded-sm md:py-10 md:hover:bg-gray-100"
56
56
  >
57
57
  <div className="flex h-36 w-36 shrink-0 flex-col items-start justify-center">
58
58
  <img
59
- className="rounded-xs max-h-36 w-auto max-w-36 object-contain shadow-md"
59
+ className="max-h-36 w-auto max-w-36 rounded-sm object-contain shadow-md"
60
60
  src={item.image.src}
61
61
  width={item.image.width}
62
62
  height={item.image.height}
@@ -99,7 +99,7 @@ export default function ResultList({
99
99
 
100
100
  <div className="hidden sm:block">
101
101
  <p
102
- className="line-clamp-3 max-w-screen-sm text-xs text-gray-500"
102
+ className="line-clamp-3 max-w-screen-sm text-xs"
103
103
  lang={item.language}
104
104
  dir={languages[item.language].direction}
105
105
  >
@@ -108,7 +108,7 @@ export default function ResultList({
108
108
  </div>
109
109
  </div>
110
110
  <Icon
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"
111
+ className="mdi--chevron-right md: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
  />
@@ -95,7 +95,7 @@ export default function SearchFilter({
95
95
 
96
96
  return (
97
97
  <>
98
- <label className="dy-input dy-input-md dy-input-bordered mb-2 flex w-full items-center gap-2">
98
+ <label className="dy-input dy-input-bordered mb-2 flex items-center gap-2">
99
99
  <input
100
100
  type="search"
101
101
  className="grow"
@@ -13,7 +13,7 @@ export default function Select({
13
13
  }: Props) {
14
14
  return (
15
15
  <label className="dy-form-control">
16
- <span className="mb-1 mt-2 block text-xs font-bold uppercase text-gray-500">
16
+ <span className="my-2 block text-xs font-bold uppercase text-gray-500">
17
17
  {label}
18
18
  </span>
19
19
  <select
@@ -4,7 +4,7 @@ export function useDebounce<T>(
4
4
  callback: (...args: T[]) => unknown,
5
5
  time: number,
6
6
  ) {
7
- const timeout = useRef<number>()
7
+ const timeout = useRef<number>(undefined)
8
8
  return (...args: T[]) => {
9
9
  if (timeout.current) {
10
10
  window.clearTimeout(timeout.current)
@@ -11,7 +11,7 @@ export type SearchQuery = {
11
11
  }
12
12
 
13
13
  export function useSearch() {
14
- const fuse = useRef<Fuse<SearchItem>>()
14
+ const fuse = useRef<Fuse<SearchItem>>(undefined)
15
15
  const [allItems, setAllItems] = useState<SearchItem[]>([])
16
16
  const [isLoading, setIsLoading] = useState(true)
17
17
  const [query, setQuery] = useState<SearchQuery>({})
@@ -9,32 +9,33 @@ export function detailsPagePath(
9
9
  locale: string | undefined,
10
10
  { id }: { id: string },
11
11
  ) {
12
- return localizePath(locale, `/media/${id}`)
12
+ return `/${locale}/media/${id}`
13
13
  }
14
14
 
15
15
  /**
16
16
  * Build path to the search page.
17
17
  *
18
- * @param language current locale
18
+ * @param locale current locale
19
19
  * @param query search query params
20
20
  * @returns path to the search page eg. '/en/media?category=comics'
21
21
  */
22
22
  export function searchPagePath(
23
- language: string | undefined,
23
+ locale: string | undefined,
24
24
  filter?: { category: string },
25
25
  ) {
26
26
  const searchParams = new URLSearchParams()
27
27
  if (filter?.category) {
28
28
  searchParams.append("category", filter.category)
29
29
  }
30
- return localizePath(
31
- language,
32
- `/media${searchParams.size ? `?${searchParams.toString()}` : ""}`,
33
- )
30
+ const query = searchParams.size ? `?${searchParams.toString()}` : ""
31
+ return `/${locale}/media${query}`
34
32
  }
35
33
 
36
34
  /**
37
35
  * Resolve a path for a given locale.
36
+ * Use this if you create paths based on user's input. In
37
+ * cases where you control the full path, JavaScript template strings
38
+ * are the easier solution to create a localized path.
38
39
  *
39
40
  * @param locale current locale
40
41
  * @param path to be resolved. A '/' at the beginning of the path is not required.
@@ -0,0 +1,56 @@
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({})
@@ -1,267 +0,0 @@
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
- }
@@ -1,49 +0,0 @@
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
- }