diff --git a/.gitignore b/.gitignore index e38f8cd..5f26612 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,3 @@ node_modules/ .cache/ public secrets.json -src/images/weather -src/images/bg -src/images/sleep.gif \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 7a18919..b0bc905 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "src/images/weather-icons"] path = src/images/weather-icons url = git@github.com:erikflowers/weather-icons.git +[submodule "src/images/custom"] + path = src/images/custom + url = git@git.c0ntroller.de:c0ntroller/infoscreen-custom-images.git diff --git a/package-lock.json b/package-lock.json index 98fea44..f8b0f62 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,13 @@ { - "name": "infoscreen_gatsby", + "name": "infoscreen", "version": "1.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "infoscreen_gatsby", + "name": "infoscreen", "version": "1.0.0", + "license": "GPL-3.0-only", "dependencies": { "buffer": "^6.0.3", "fast-xml-parser": "^4.0.0-beta.8", diff --git a/src/components/WeatherRadar.tsx b/src/components/WeatherRadar.tsx index e7dc1fb..cbb5cb4 100644 --- a/src/components/WeatherRadar.tsx +++ b/src/components/WeatherRadar.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import sleep from "../images/sleep.gif"; +import sleep from "../images/custom/sleep.gif"; import * as styles from "../styles/containers/WeatherRadar.module.css"; const RADAR_REFRESH_INTERVAL = 15 * 60 * 1000; diff --git a/src/images/custom b/src/images/custom new file mode 160000 index 0000000..5f0444e --- /dev/null +++ b/src/images/custom @@ -0,0 +1 @@ +Subproject commit 5f0444e2b24aa8308ebe081794cf96b5d7dadddc diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 8d5eb46..9bcddf9 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -12,7 +12,7 @@ function importAll(r) { return r.keys().map(r); } -const images = importAll(require.context('../images/bg/', false, /\.(png|jpe?g|svg)$/)); +const images = importAll(require.context('../images/custom/bg/', false, /\.(png|jpe?g|svg)$/)); const IndexPage = () => { const [currentBg, setCurrentBg] = React.useState(0); diff --git a/src/styles/global.css b/src/styles/global.css index ea77251..32cef8d 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -45,7 +45,7 @@ main { } :root[data-theme="night"] main { - background-image: url("../images/bg/3.jpg") !important; + background-image: url("../images/custom/bg/3.jpg") !important; } :root[data-theme="day"] .radar {display: block;}