Skip to content
This repository has been archived by the owner on Apr 2, 2022. It is now read-only.
/ pihub Public archive

PiHub, a website-desktop for your touchscreen Raspberry Pi.

Notifications You must be signed in to change notification settings

blt950/pihub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pihub

How to install modules:

1. Place the module folder into modules folder in the root of the project.
2. Locate the config.js file in the root directory, add the modules name into the modules array.

How to create a module

Creating modules for PiHub, is incredibly easy. A few simple steps is all thats required!
Start by creating a folder in the modules directory, for this guide we will be creating a simple alert module with a icon.

Create the folder "alertbutton" in modules directory, then create a js file with the same name inside that folder.
At this point you should have /modules/alertbutton/alertbutton.js created, then add the following code:

alertbutton.js
function alertbutton_init() {
  addAppIcon("fa-exclamation-triangle", "alert('Hello World!')");
}

Youre done, it's that easy! Now head over to your config.js and add "alertbutton" into the array, and watch the button automaticly appear.

More advanced functions to come, undocumented example usage required is loadCSS which will load css files in a modules css folder.

About

PiHub, a website-desktop for your touchscreen Raspberry Pi.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published