mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-03-28 06:17:46 +01:00
Assets path, re-add async, fix z
This commit is contained in:
parent
7b4a047d90
commit
f32190bde9
6 changed files with 12 additions and 12 deletions
2
assets/package-lock.json
generated
2
assets/package-lock.json
generated
|
@ -28,7 +28,7 @@
|
|||
"eslint-plugin-jest-dom": "^5.4.0",
|
||||
"jest": "^29.7.0",
|
||||
"jest-fetch-mock": "^3.0.3",
|
||||
"ts-jest": "^29.1.2z"
|
||||
"ts-jest": "^29.1.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@adobe/css-tools": {
|
||||
|
|
|
@ -33,6 +33,6 @@
|
|||
"eslint-plugin-jest-dom": "^5.4.0",
|
||||
"jest": "^29.7.0",
|
||||
"jest-fetch-mock": "^3.0.3",
|
||||
"ts-jest": "^29.1.2z"
|
||||
"ts-jest": "^29.1.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,9 +51,9 @@ export default defineConfig(({ command }: ConfigEnv): UserConfig => {
|
|||
...Object.fromEntries(themes)
|
||||
},
|
||||
output: {
|
||||
entryFileNames: 'assets/[name].js',
|
||||
entryFileNames: '[name].js',
|
||||
chunkFileNames: '[name].js',
|
||||
assetFileNames: 'assets/[name][extname]'
|
||||
assetFileNames: '[name][extname]'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -19,7 +19,7 @@ html lang="en"
|
|||
meta name="theme-color" content="#618fc3"
|
||||
meta name="format-detection" content="telephone=no"
|
||||
= csrf_meta_tag()
|
||||
script type="module" src=Routes.static_path(@conn, "/assets/js/app.js")
|
||||
script type="module" src=Routes.static_path(@conn, "/js/app.js") async="async"
|
||||
= render PhilomenaWeb.LayoutView, "_opengraph.html", assigns
|
||||
body data-theme=theme_name(@current_user)
|
||||
= render PhilomenaWeb.LayoutView, "_burger.html", assigns
|
||||
|
|
|
@ -65,16 +65,16 @@ defmodule PhilomenaWeb.LayoutView do
|
|||
end
|
||||
|
||||
def stylesheet_path(conn, %{theme: "dark"}),
|
||||
do: Routes.static_path(conn, "/assets/css/dark.css")
|
||||
do: Routes.static_path(conn, "/css/dark.css")
|
||||
|
||||
def stylesheet_path(conn, %{theme: "red"}),
|
||||
do: Routes.static_path(conn, "/assets/css/red.css")
|
||||
do: Routes.static_path(conn, "/css/red.css")
|
||||
|
||||
def stylesheet_path(conn, _user),
|
||||
do: Routes.static_path(conn, "/assets/css/default.css")
|
||||
do: Routes.static_path(conn, "/css/default.css")
|
||||
|
||||
def dark_stylesheet_path(conn),
|
||||
do: Routes.static_path(conn, "/assets/css/dark.css")
|
||||
do: Routes.static_path(conn, "/css/dark.css")
|
||||
|
||||
def theme_name(%{theme: theme}), do: theme
|
||||
def theme_name(_user), do: "default"
|
||||
|
|
|
@ -6,10 +6,10 @@ defmodule PhilomenaWeb.SettingView do
|
|||
[
|
||||
key: "Default",
|
||||
value: "default",
|
||||
data: [theme_path: Routes.static_path(conn, "/assets/css/default.css")]
|
||||
data: [theme_path: Routes.static_path(conn, "/css/default.css")]
|
||||
],
|
||||
[key: "Dark", value: "dark", data: [theme_path: Routes.static_path(conn, "/assets/css/dark.css")]],
|
||||
[key: "Red", value: "red", data: [theme_path: Routes.static_path(conn, "/assets/css/red.css")]]
|
||||
[key: "Dark", value: "dark", data: [theme_path: Routes.static_path(conn, "/css/dark.css")]],
|
||||
[key: "Red", value: "red", data: [theme_path: Routes.static_path(conn, "/css/red.css")]]
|
||||
]
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue