Giter Site home page Giter Site logo

mmm-simplelogo's Introduction

Module: MMM-SimpleLogo

The MMM-SimpleLogo module is third party modules of the MagicMirror. This module simply displays logo.

Installation

cd ~/MagicMirror/modules
git clone https://github.com/frdteknikelektro/MMM-SimpleLogo.git

Updating

cd ~/MagicMirror/modules/MMM-SimpleLogo
git pull

Using the module

To use this module, add it to the modules array in the config/config.js file:

modules: [
    {
        module: 'MMM-SimpleLogo',
        position: 'top_left',    // This can be any of the regions.
        config: {
            // The config property is optional.
            // See 'Configuration options' for more information.
        }
    }
]

Configuration options

The following properties can be configured:

Option Description
fileUrl File url.

Possible values: Logo link form internet or path to your local files relative to MagicMirror directory
Default value: 'modules/MMM-SimpleLogo/public/logo.png'
width Set width of your logo, height is auto.

Possible values: '300px' or '50%'
Default value: '200px'
position Horizontal position on current container

Possible values: left, center, or right
Default value: left
refreshInterval Refresh/refetch image file between interval. Only use this if your image url return different image after some interval of time, even the fileUrl is not changed. See this case #2, awesome project by @ElYoM

Possible values: 1000, 2000, or 10000
Default value: 0 (disabled)
text Text above the image.

Possible values: Any text
Default value: Simple Logo

Notification Events

The MMM-SimpleLogo module supports the notification event SIMPLE_LOGO_UPDATE which allows the configuration to be dynamically modified. As an example, the MMM-OnScreenMenu module might be used to dynamic adjust the fileURL parameter as follows:

{
    module: "MMM-OnScreenMenu",
    position: "top_left",
    config: {
        menuItems: {
            notify1: {
                title: "Show Cat",
                notification: "SIMPLE_LOGO_UPDATE",
                payload: {
                    fileUrl: "cat.jpg",
                    width: "750px"
                }
            },
            notify2: {
                title: "Show Dog",
                notification: "SIMPLE_LOGO_UPDATE",
                payload: {
                    fileUrl: "dog.jpg",
                    width: "1050px"
                }
            }
        }
    }
}

mmm-simplelogo's People

Contributors

frdteknikelektro avatar dathbe avatar dgburr avatar kibotu avatar lastof avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.