Skip to content

juhamust/mozaik-ext-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mozaïk image extension

Show image in a widget. Supports also refreshing the image in timely bases, making it handy for webcams, daily comics or kittens :)

📢 NOTE: See mozaik-2 branch for Mozaik 2 compatible extension

preview

Table of contents

Setup

  • Install extension: npm i -S mozaik-ext-image
  • Register widget: mozaik.addBatch('image', require('mozaik-ext-image'));
  • Add widget(s) in dashboard config.js (see Widget parameters)

Widget: image.image

Show the image in widget.

parameters

key required description
url yes URL to an image.
title no Title to show in widget. Defaults to URL
refreshInterval no Image refreshing interval in seconds (refreshing is done automatically by adding/incrementing counter attribute). Defaults to no refresh. Example: 30
backgroundSize no Image size (set as background image). Defaults to 'cover'
backgroundColor no Background color, handy with transparent images. Defaults to parent color
backgroundPosition no Background position, defaults to 'center center'

usage

{
  type: 'image.image',
  title: 'My webcam',
  url: 'http://domain.com/webcam.jpg',
  backgroundSize: 'cover',
  backgroundPosition: 'center -7vh',
  // Refresh every 30s
  refreshInterval: 30,
  columns: 1, rows: 1,
  x: 0, y: 0
}

License

Distributed under the MIT license

About

Image widget for Mozaïk dashboard

Resources

Stars

Watchers

Forks

Packages

No packages published