-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
src/Bundle/Sucrose.Bundle/Showcase/Lorem Picsum Wallpaper-1/Lorem.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta name="viewport" content="width=device-width"> | ||
<link rel="stylesheet" href="css/style.css"> | ||
</head> | ||
<body> | ||
<img id="lorempicsumwallpaper" src="img/lorempicsum.svg" alt="Lorem Picsum Wallpaper"> | ||
</body> | ||
<script src="js/script.js"></script> | ||
</html> |
3 changes: 3 additions & 0 deletions
3
src/Bundle/Sucrose.Bundle/Showcase/Lorem Picsum Wallpaper-1/SucroseCompatible.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"StretchMode": "SucroseStretchMode('{0}');" | ||
} |
15 changes: 15 additions & 0 deletions
15
src/Bundle/Sucrose.Bundle/Showcase/Lorem Picsum Wallpaper-1/SucroseInfo.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"AppVersion": "25.1.27.0", | ||
"Version": "1.0.0.0", | ||
"Title": "Lorem Picsum Wallpaper", | ||
"Thumbnail": "thumbnail.jpg", | ||
"Preview": "preview.gif", | ||
"Description": "This theme displays random high-quality images from Lorem Picsum as your wallpaper.", | ||
"Author": "Taiizor", | ||
"License": null, | ||
"Contact": "https://github.com/Taiizor", | ||
"Type": 2, | ||
"Source": "Lorem.html", | ||
"Tags": null, | ||
"Arguments": null | ||
} |
34 changes: 34 additions & 0 deletions
34
src/Bundle/Sucrose.Bundle/Showcase/Lorem Picsum Wallpaper-1/SucroseProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"PropertyListener": "SucrosePropertyListener('{0}', {1});", | ||
"PropertyList": { | ||
"refreshInterval": { | ||
"max": 1440, | ||
"min": 1, | ||
"step": 1, | ||
"text": "Change Wallpaper Minutes", | ||
"help": "Set the wallpaper change interval in minutes", | ||
"type": "slider", | ||
"value": 1 | ||
}, | ||
"wallpaperResolution": { | ||
"type": "dropdown", | ||
"text": "Wallpaper Resolution", | ||
"help": "Select the resolution of the wallpaper image that will be downloaded", | ||
"value": 10, | ||
"items": [ | ||
"1366x768", | ||
"1600x900", | ||
"1920x1080", | ||
"1920x1200", | ||
"2048x1080", | ||
"2048x1152", | ||
"2560x1440", | ||
"2560x1600", | ||
"3440x1440", | ||
"3840x1600", | ||
"3840x2160", | ||
"4096x2160" | ||
] | ||
} | ||
} | ||
} |
Empty file.
13 changes: 13 additions & 0 deletions
13
src/Bundle/Sucrose.Bundle/Showcase/Lorem Picsum Wallpaper-1/css/style.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
html, | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
height: 100%; | ||
overflow: hidden; | ||
} | ||
|
||
img { | ||
width: 100%; | ||
height: 100%; | ||
object-fit: none; | ||
} |
Binary file added
BIN
+25 KB
src/Bundle/Sucrose.Bundle/Showcase/Lorem Picsum Wallpaper-1/img/lorempicsum.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
src/Bundle/Sucrose.Bundle/Showcase/Lorem Picsum Wallpaper-1/img/lorempicsum.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions
54
src/Bundle/Sucrose.Bundle/Showcase/Lorem Picsum Wallpaper-1/js/script.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
var lorempicsumwallpaper = document.getElementById("lorempicsumwallpaper"); | ||
let currentResolution = "3840x2160"; // Default resolution | ||
|
||
async function GetLoremPicsumWallpaper() { | ||
try { | ||
const [width, height] = currentResolution.split('x'); | ||
const wallpaperUrl = `https://picsum.photos/${width}/${height}`; | ||
|
||
// Add timestamp to prevent caching | ||
lorempicsumwallpaper.src = `${wallpaperUrl}?t=${Date.now()}`; | ||
lorempicsumwallpaper.alt = "Lorem Picsum Wallpaper"; | ||
} catch (error) { | ||
console.error("An error occurred while loading Lorem Picsum Wallpaper: ", error); | ||
} | ||
} | ||
|
||
function SucrosePropertyListener(name, val) { | ||
switch (name) { | ||
case "refreshInterval": | ||
// Update interval | ||
clearInterval(wallpaperInterval); | ||
wallpaperInterval = setInterval(GetLoremPicsumWallpaper, val.value * 60000); | ||
break; | ||
case "wallpaperResolution": | ||
// Update resolution | ||
currentResolution = val.items[val.value]; | ||
GetLoremPicsumWallpaper(); | ||
break; | ||
} | ||
} | ||
|
||
function SucroseStretchMode(Type) { | ||
switch (Type) { | ||
case "None": | ||
lorempicsumwallpaper.style.objectFit = "none"; | ||
break; | ||
case "Fill": | ||
lorempicsumwallpaper.style.objectFit = "fill"; | ||
break; | ||
case "Uniform": | ||
lorempicsumwallpaper.style.objectFit = "contain"; | ||
break; | ||
case "UniformToFill": | ||
lorempicsumwallpaper.style.objectFit = "cover"; | ||
break; | ||
default: | ||
break; | ||
} | ||
} | ||
|
||
window.addEventListener("load", GetLoremPicsumWallpaper); | ||
|
||
// Initial interval (60 seconds) | ||
let wallpaperInterval = setInterval(GetLoremPicsumWallpaper, 60000); |
Binary file added
BIN
+115 KB
src/Bundle/Sucrose.Bundle/Showcase/Lorem Picsum Wallpaper-1/preview.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+447 KB
src/Bundle/Sucrose.Bundle/Showcase/Lorem Picsum Wallpaper-1/thumbnail.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+266 KB
src/Bundle/Sucrose.Bundle/Showcase/Lorem Picsum Wallpaper-1/thumbnail2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+323 KB
src/Bundle/Sucrose.Bundle/Showcase/Lorem Picsum Wallpaper-1/thumbnail3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.