Compare commits
No commits in common. 'master' and '1.0.4' have entirely different histories.
7 changed files with 14 additions and 62 deletions
@ -1,2 +1,2 @@ |
|||||||
primary_html: "index.html" |
primary_html: "index.html" |
||||||
secondary_html: "secondary.html" |
secondary_html: "index.html" |
||||||
|
@ -1,20 +0,0 @@ |
|||||||
<!DOCTYPE html> |
|
||||||
<html lang="en"> |
|
||||||
<head> |
|
||||||
<meta charset="UTF-8"> |
|
||||||
<link rel="stylesheet" href="style.css" class="style"> |
|
||||||
<script type="text/javascript" src="wallpapper.js"></script> |
|
||||||
<script type="text/javascript"> |
|
||||||
function initGreeter() { |
|
||||||
let defaultWallpapper = window.localStorage.getItem(DEFAULT_WALLPAPPER); |
|
||||||
if(defaultWallpapper) { |
|
||||||
updateWallpapper(defaultWallpapper); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
window.addEventListener("GreeterReady", initGreeter) |
|
||||||
</script> |
|
||||||
<title>Example Theme</title> |
|
||||||
</head> |
|
||||||
<body /> |
|
||||||
</html> |
|
@ -1,30 +0,0 @@ |
|||||||
const DEFAULT_WALLPAPPER = "defaultWallpapper"; |
|
||||||
const WALLPAPPER_ELEMENT = "wallpappers"; |
|
||||||
|
|
||||||
|
|
||||||
function setWallpapper(wallpapper) { |
|
||||||
console.log(wallpapper) |
|
||||||
var body = document.getElementsByTagName('body')[0]; |
|
||||||
body.style.backgroundImage = wallpapper; |
|
||||||
} |
|
||||||
|
|
||||||
function updateWallpapper(wallpapper) { |
|
||||||
let wall_file = `url(wallpappers/${wallpapper})` |
|
||||||
if (wallpapper === 'User') { |
|
||||||
setWallpapper(`url(wallpappers/Rosatomflot.jpg)`) |
|
||||||
theme_utils.dirlist(`/usr/share/web-greeter/themes/basealt/wallpappers`, true, (images) => { |
|
||||||
if(images) { |
|
||||||
console.log(images) |
|
||||||
for (let i = 0; i < images.length; i++) { |
|
||||||
let image = images[i] |
|
||||||
if(image.indexOf("/wallpapper.png") == image.length - 15) { |
|
||||||
setWallpapper(`url(${image})`) |
|
||||||
console.log(wall_file) |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
}); |
|
||||||
} else { |
|
||||||
setWallpapper(`url(wallpappers/${wallpapper})`) |
|
||||||
} |
|
||||||
} |
|
Loading…
Reference in new issue