This repository has been archived by the owner on Nov 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 278
Screensaver configuration
Gina Häußge edited this page Feb 12, 2020
·
3 revisions
screensaver
is an optional object in global CONFIG
May have next fields:
-
timeout
in seconds -
slidesTimeout
timeout between slides -
styles
object of js-css styles -
slides
array of slides objects -
leftBottom
,leftTop
,rightBottom
,rightTop
- optional arrays withSCREENSAVER_ITEMS
SCREENSAVER_ITEMS
is similar (basically the same) to HEADER_ITEMS
from the header
. Read more https://github.com/resoai/TileBoard/wiki/Header-configuration
slides
- array of slides object. Each object should have bg
field for the bg image.
styles
, leftBottom
, leftTop
, rightBottom
, rightTop
are also supported for any slide.
So you basically can have global SCREENSAVER_ITEMS
for every slides, or different items for different slides.
{
timeout: 300,
slidesTimeout: 10,
styles: { fontSize: '40px' },
leftBottom: [{ type: SCREENSAVER_ITEMS.DATETIME }],
slides: [
{ bg: 'images/bg1.jpeg' },
{
bg: 'images/bg2.png',
rightTop: [ // put text to the 2nd slide
{
type: SCREENSAVER_ITEMS.CUSTOM_HTML,
html: 'Welcome to the <b>TileBoard</b>',
styles: { fontSize: '40px' }
}
]
},
{ bg: 'images/bg3.jpg' }
]
}
Also there're global function to start and hide screensaver
window.showScreensaver()
and window.hideScreensaver()