Add custom images
This commit is contained in:
parent
e024a15a95
commit
a4fd809ef5
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,6 +2,3 @@ node_modules/
|
||||
.cache/
|
||||
public
|
||||
secrets.json
|
||||
src/images/weather
|
||||
src/images/bg
|
||||
src/images/sleep.gif
|
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -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
|
||||
|
5
package-lock.json
generated
5
package-lock.json
generated
@ -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",
|
||||
|
@ -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;
|
||||
|
1
src/images/custom
Submodule
1
src/images/custom
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 5f0444e2b24aa8308ebe081794cf96b5d7dadddc
|
@ -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);
|
||||
|
@ -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;}
|
||||
|
Loading…
Reference in New Issue
Block a user