Compare commits
88 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
5d9d71dee8 | ||
|
1f558d46a4 | ||
|
36eb899c3b | ||
|
e223d752cb | ||
|
fcb503e885 | ||
|
c1055234d8 | ||
|
35ec98cf13 | ||
|
66a9138666 | ||
|
279582ff21 | ||
|
a9540ffabe | ||
|
8f02cb83ed | ||
|
5e94c8be7b | ||
|
ea6e9af5da | ||
|
1bb72262ba | ||
|
61ace7bd97 | ||
|
1a417cc36f | ||
|
00a11f4343 | ||
|
491bbacddd | ||
|
1b9daa0adb | ||
|
ccdc981756 | ||
|
b44dcc9f30 | ||
|
479ceb14e4 | ||
|
50e41d1999 | ||
|
f6e2073de0 | ||
|
271aab9746 | ||
|
8d9bf5cf17 | ||
|
ceb7ed093e | ||
|
abdbcbb741 | ||
|
51ac07cd34 | ||
|
4b29698c6c | ||
|
f93285846a | ||
|
44347db52e | ||
|
f2749ff17f | ||
|
3735342dfa | ||
|
fed6e1e82f | ||
|
58a59b624a | ||
|
1338918a89 | ||
|
831e7cdb3f | ||
|
2b8583e652 | ||
|
b0220e4200 | ||
|
0d94ef10ce | ||
|
544a1381fc | ||
|
bc17ef896e | ||
|
0bcbf999fb | ||
|
0c4c44f4b6 | ||
|
486956b762 | ||
|
8d1ef5291f | ||
|
611627ca97 | ||
|
732225b781 | ||
|
58f88075c8 | ||
|
e17ef5eccf | ||
|
70c697f094 | ||
|
4b5625e0b4 | ||
|
7df48870df | ||
|
4a309c49e5 | ||
|
b45899bf90 | ||
|
5ae3c8acfe | ||
|
ef5df5f01b | ||
|
9af7451a61 | ||
|
7048c550b7 | ||
|
f035627f42 | ||
|
7659ff1f77 | ||
|
3df4062a55 | ||
|
02bbbe668b | ||
|
2b82c8fdc9 | ||
|
93abaed0c2 | ||
|
b7fff6d452 | ||
|
d09f01db90 | ||
|
e0c1a58b84 | ||
|
1b82649cca | ||
|
9317e2a36b | ||
|
51aff8ccdc | ||
|
bdd3ea45af | ||
|
3eb5c77ac4 | ||
|
ccc85784c6 | ||
|
46806e8607 | ||
|
95f914d6bd | ||
|
0f86011106 | ||
|
acdd3c0602 | ||
|
05b7237add | ||
|
51f4e9e160 | ||
|
7bbac35d6b | ||
|
d280fe457c | ||
|
b5772af4c3 | ||
|
7ab79bb76e | ||
|
00e3cc26de | ||
|
4b491c43ff | ||
|
41233a933e |
26
.github/CONTRIBUTING.md
vendored
@@ -31,3 +31,29 @@ To run StyleLint, use `npm run stylelint`.
|
|||||||
We use [NU Validator](https://validator.w3.org/nu) to validate our HTML. The configuration is in the command in the package.json file.
|
We use [NU Validator](https://validator.w3.org/nu) to validate our HTML. The configuration is in the command in the package.json file.
|
||||||
|
|
||||||
To run HTML Validator, use `npm run htmlvalidator`.
|
To run HTML Validator, use `npm run htmlvalidator`.
|
||||||
|
|
||||||
|
## Submitting Issues
|
||||||
|
|
||||||
|
Please only submit reproducible issues.
|
||||||
|
|
||||||
|
If you're not sure if it's a real bug or if it's just you, please open a topic on the forum: https://forum.magicmirror.builders/category/15/bug-hunt - Problems installing or configuring your MagicMirror? Check out: https://forum.magicmirror.builders/category/10/troubleshooting
|
||||||
|
|
||||||
|
When submitting a new issue, please supply the following information:
|
||||||
|
|
||||||
|
**Platform** [ Raspberry Pi 2/3, Windows, Mac OS X, Linux, Etc ... ]:
|
||||||
|
|
||||||
|
**Node Version** [ 0.12.13 or later ]:
|
||||||
|
|
||||||
|
**MagicMirror Version** [ V1 / V2-Beta ]:
|
||||||
|
|
||||||
|
**Description:** Provide a detailed description about the issue and include specific details to help us understand the problem. Adding screenshots will help describing the problem.
|
||||||
|
|
||||||
|
**Steps to Reproduce:** List the step by step process to reproduce the issue.
|
||||||
|
|
||||||
|
**Expected Results:** Describe what you expected to see.
|
||||||
|
|
||||||
|
**Actual Results:** Describe what you actually saw.
|
||||||
|
|
||||||
|
**Configuration:** What does the used config.js file look like? (Don't forget to remove any sensitive information.)
|
||||||
|
|
||||||
|
**Additional Notes:** Provide any other relevant notes not previously mentioned (optional)
|
||||||
|
23
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,2 +1,21 @@
|
|||||||
* **Platform** [ Raspberry Pi 2/3, Windows, Mac OS X, Linux]:
|
Please only submit reproducible issues.
|
||||||
* **Node Version** [ 0.12.13 or later ]:
|
|
||||||
|
If you're not sure if it's a real bug or if it's just you, please open a topic on the forum: https://forum.magicmirror.builders/category/15/bug-hunt - Problems installing or configuring your MagicMirror? Check out: https://forum.magicmirror.builders/category/10/troubleshooting
|
||||||
|
|
||||||
|
**Platform** [ Raspberry Pi 2/3, Windows, Mac OS X, Linux, Etc ... ]:
|
||||||
|
|
||||||
|
**Node Version** [ 0.12.13 or later ]:
|
||||||
|
|
||||||
|
**MagicMirror Version** [ V1 / V2-Beta ]:
|
||||||
|
|
||||||
|
**Description:** Provide a detailed description about the issue and include specific details to help us understand the problem. Adding screenshots will help describing the problem.
|
||||||
|
|
||||||
|
**Steps to Reproduce:** List the step by step process to reproduce the issue.
|
||||||
|
|
||||||
|
**Expected Results:** Describe what you expected to see.
|
||||||
|
|
||||||
|
**Actual Results:** Describe what you actually saw.
|
||||||
|
|
||||||
|
**Configuration:** What does the used config.js file look like? (Don't forget to remove any sensitive information.)
|
||||||
|
|
||||||
|
**Additional Notes:** Provide any other relevant notes not previously mentioned (optional)
|
||||||
|
8
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,5 +1,9 @@
|
|||||||
|
> Please send your PR's the develop branch.
|
||||||
|
> Don't forget to add the change to changelog.md.
|
||||||
|
|
||||||
* Does the pull request solve a **related** issue? [yes | no]
|
* Does the pull request solve a **related** issue? [yes | no]
|
||||||
|
|
||||||
* If so, can you reference the issue?
|
* If so, can you reference the issue?
|
||||||
|
|
||||||
* What does the pull request accomplish? (please list)
|
* What does the pull request accomplish? (please list)
|
||||||
|
* If it includes major visual changes please add screenshots.
|
||||||
|
|
||||||
|
|
||||||
|
@@ -2,8 +2,6 @@ language: node_js
|
|||||||
node_js:
|
node_js:
|
||||||
- "6"
|
- "6"
|
||||||
- "5.1"
|
- "5.1"
|
||||||
- "4"
|
|
||||||
- "0.12"
|
|
||||||
before_script:
|
before_script:
|
||||||
- npm install grunt-cli -g
|
- npm install grunt-cli -g
|
||||||
script: grunt
|
script: grunt
|
||||||
|
51
CHANGELOG.md
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
# MagicMirror² Change Log
|
||||||
|
All notable changes to this project will be documented in this file.
|
||||||
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
## [2.0.3] - 2016-07-12
|
||||||
|
### Added
|
||||||
|
- Add max newsitems parameter to the newsfeed module.
|
||||||
|
- Translations for Simplified Chinese, Traditional Chinese and Japanese.
|
||||||
|
- Polish Translation
|
||||||
|
- Add an analog clock in addition to the digital one.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Edit Alert Module to display title & message if they are provided in the notification (Issue #300)
|
||||||
|
- Removed 'null' reference from updateModuleContent(). This fixes recent Edge and Internet Explorer browser displays (Issue #319)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Added default string to calendar titleReplace.
|
||||||
|
|
||||||
|
## [2.0.2] - 2016-06-05
|
||||||
|
### Added
|
||||||
|
- Norwegian Translations (nb and nn)
|
||||||
|
- Portuguese Translation
|
||||||
|
- Swedish Translation
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Added reference to Italian Translation.
|
||||||
|
- Added the missing NE translation to all languages. [#334](https://github.com/MichMich/MagicMirror/issues/344)
|
||||||
|
- Added proper User-Agent string to calendar call.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Add option to use locationID in weather modules.
|
||||||
|
|
||||||
|
## [2.0.1] - 2016-05-18
|
||||||
|
### Added
|
||||||
|
- Changelog
|
||||||
|
- Italian Translation
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Improve the installer by fetching the latest Node.js without any 3rd party interferences.
|
||||||
|
|
||||||
|
## [2.0.0] - 2016-05-03
|
||||||
|
### Initial release of MagicMirror²
|
||||||
|
It includes (but is not limited to) the following features:
|
||||||
|
- Modular system allowing 3rd party plugins.
|
||||||
|
- An Node/Electron based application taking away the need for external servers or browsers.
|
||||||
|
- A complete development API documentation.
|
||||||
|
- Small cute fairies that kiss you while you sleep.
|
||||||
|
|
||||||
|
## [1.0.0] - 2014-02-16
|
||||||
|
### Initial release of MagicMirror.
|
||||||
|
This was part of the blogpost: http://michaelteeuw.nl/post/83916869600/magic-mirror-part-vi-production-of-the
|
@@ -13,8 +13,6 @@
|
|||||||
|
|
||||||
MagicMirror² focuses on a modular plugin system and uses [Electron](http://electron.atom.io/) as an application wrapper. So no more web server or browser installs necessary!
|
MagicMirror² focuses on a modular plugin system and uses [Electron](http://electron.atom.io/) as an application wrapper. So no more web server or browser installs necessary!
|
||||||
|
|
||||||
**NOTE:** This version is in currently in beta stage. Please use the master branch if you need a thoroughly tested version.
|
|
||||||
|
|
||||||
## Table Of Contents
|
## Table Of Contents
|
||||||
|
|
||||||
- [Usage](#usage)
|
- [Usage](#usage)
|
||||||
@@ -33,7 +31,7 @@ Electron, the app wrapper around MagicMirror², only supports the Raspberry Pi 2
|
|||||||
|
|
||||||
Execute the following command on your Raspberry Pi to install MagicMirror²:
|
Execute the following command on your Raspberry Pi to install MagicMirror²:
|
||||||
````
|
````
|
||||||
curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/installers/raspberry.sh | bash
|
curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh | bash
|
||||||
````
|
````
|
||||||
|
|
||||||
#### Manual Installation
|
#### Manual Installation
|
||||||
|
@@ -41,6 +41,7 @@ var config = {
|
|||||||
position: 'top_right',
|
position: 'top_right',
|
||||||
config: {
|
config: {
|
||||||
location: 'New York',
|
location: 'New York',
|
||||||
|
locationID: '', //ID from bulk.openweather.org/sample/
|
||||||
appid: 'YOUR_OPENWEATHER_API_KEY'
|
appid: 'YOUR_OPENWEATHER_API_KEY'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -50,6 +51,7 @@ var config = {
|
|||||||
header: 'Weather Forecast',
|
header: 'Weather Forecast',
|
||||||
config: {
|
config: {
|
||||||
location: 'New York',
|
location: 'New York',
|
||||||
|
locationID: '5128581', //ID from bulk.openweather.org/sample/
|
||||||
appid: 'YOUR_OPENWEATHER_API_KEY'
|
appid: 'YOUR_OPENWEATHER_API_KEY'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@@ -18,7 +18,7 @@ echo ' \$$$$$$ |'
|
|||||||
echo ' \______/'
|
echo ' \______/'
|
||||||
echo -e "\e[0m"
|
echo -e "\e[0m"
|
||||||
|
|
||||||
# Define the tested version of node.
|
# Define the tested version of Node.js.
|
||||||
NODE_TESTED="v5.1.0"
|
NODE_TESTED="v5.1.0"
|
||||||
|
|
||||||
#Determine which Pi is running.
|
#Determine which Pi is running.
|
||||||
@@ -39,7 +39,7 @@ function command_exists () { type "$1" &> /dev/null ;}
|
|||||||
echo -e "\e[96mInstalling helper tools ...\e[90m"
|
echo -e "\e[96mInstalling helper tools ...\e[90m"
|
||||||
sudo apt-get install curl wget git build-essential unzip || exit
|
sudo apt-get install curl wget git build-essential unzip || exit
|
||||||
|
|
||||||
# Check if we need to install or upgrade node.
|
# Check if we need to install or upgrade Node.js.
|
||||||
echo -e "\e[96mCheck current Node installation ...\e[0m"
|
echo -e "\e[96mCheck current Node installation ...\e[0m"
|
||||||
NODE_INSTALL=false
|
NODE_INSTALL=false
|
||||||
if command_exists node; then
|
if command_exists node; then
|
||||||
@@ -60,63 +60,33 @@ if command_exists node; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
echo -e "\e[92mNo Node upgrade nessecery.\e[0m"
|
echo -e "\e[92mNo Node.js upgrade nessecery.\e[0m"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
echo -e "\e[93mNode is not installed.\e[0m";
|
echo -e "\e[93mNode.js is not installed.\e[0m";
|
||||||
NODE_INSTALL=true
|
NODE_INSTALL=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install or upgare node if nessecery.
|
# Install or upgare node if nessecery.
|
||||||
if $NODE_INSTALL; then
|
if $NODE_INSTALL; then
|
||||||
|
|
||||||
|
echo -e "\e[96mInstalling Node.js ...\e[90m"
|
||||||
|
|
||||||
echo -e "\e[96mStart Node download ...\e[0m"
|
#Fetch the latest version of Node.js from the selected branch
|
||||||
|
#The NODE_STABLE_BRANCH variable will need to be manually adjusted when a new branch is released. (e.g. 7.x)
|
||||||
#Fetch the latest version of Node.js.
|
#Only tested (stable) versions are recommended as newer versions could break MagicMirror.
|
||||||
#TODO: Is there a native way to fetch the latest node version?
|
|
||||||
echo -e "\e[39mRetrieving latest node version."
|
NODE_STABLE_BRANCH="6.x"
|
||||||
NODE_LATEST=$(curl -l http://api.jordidepoortere.com/nodejs-latest/ 2> /dev/null)
|
curl -sL https://deb.nodesource.com/setup_$NODE_STABLE_BRANCH | sudo -E bash -
|
||||||
|
sudo apt-get install -y nodejs
|
||||||
if [ "$NODE_LATEST" == "" ]; then
|
echo -e "\e[92mNode.js installation Done!\e[0m"
|
||||||
echo -e "\e[91mCould not retreive latest node version."
|
|
||||||
echo -e "\e[91mPlease try again or open an issue on GitHub."
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -e "Latest node version: \e[1m$NODE_LATEST\e[0m"
|
|
||||||
|
|
||||||
#Construct the download URL.
|
|
||||||
DOWNLOAD_URL="https://nodejs.org/dist/latest/node-$NODE_LATEST-linux-$ARM.tar.gz"
|
|
||||||
|
|
||||||
#Create Download Directory
|
|
||||||
rm -Rf ~/.MagicMirrorNodeInstaller || exit
|
|
||||||
mkdir ~/.MagicMirrorNodeInstaller || exit
|
|
||||||
cd ~/.MagicMirrorNodeInstaller || exit
|
|
||||||
|
|
||||||
#Download Installer
|
|
||||||
echo -e "\e[39mDownloading node ... \e[90m"
|
|
||||||
if wget $DOWNLOAD_URL --no-verbose --show-progress; then
|
|
||||||
echo -e "\e[39mDownload complete."
|
|
||||||
else
|
|
||||||
echo -e "\e[91mCould not download node."
|
|
||||||
exit;
|
|
||||||
fi
|
|
||||||
|
|
||||||
#Unpack and copy.
|
|
||||||
echo -e "\e[96mStart Node installation ...\e[90m"
|
|
||||||
tar xvf node-$NODE_LATEST-linux-$ARM.tar.gz || exit
|
|
||||||
cd node* || exit
|
|
||||||
sudo cp -R * /usr/local || exit
|
|
||||||
|
|
||||||
#Cleanup
|
|
||||||
rm -Rf ~/.MagicMirrorNodeInstaller || exit
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Install magic mirror
|
#Install magic mirror
|
||||||
cd ~
|
cd ~
|
||||||
if [ -d "$HOME/MagicMirror" ] ; then
|
if [ -d "$HOME/MagicMirror" ] ; then
|
||||||
echo -e "\e[93mIt seems like MagicMirror is allready installed."
|
echo -e "\e[93mIt seems like MagicMirror is already installed."
|
||||||
echo -e "To prevent overwriting, the installer will be aborted."
|
echo -e "To prevent overwriting, the installer will be aborted."
|
||||||
echo -e "Please rename the \e[1m~/MagicMirror\e[0m\e[93m folder and try again.\e[0m"
|
echo -e "Please rename the \e[1m~/MagicMirror\e[0m\e[93m folder and try again.\e[0m"
|
||||||
echo ""
|
echo ""
|
||||||
@@ -143,6 +113,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
echo -e "\e[92mWe're ready! Run \e[1m\e[97mDISPLAY=:0 npm start\e[0m\e[92m from the ~/MagicMirror directory to start your MagicMirror."
|
echo -e "\e[92mWe're ready! Run \e[1m\e[97mDISPLAY=:0 npm start\e[0m\e[92m from the ~/MagicMirror directory to start your MagicMirror.\e[0m"
|
||||||
echo " "
|
echo " "
|
||||||
echo " "
|
echo " "
|
||||||
|
@@ -144,7 +144,7 @@ var MM = (function() {
|
|||||||
var moduleWrapper = document.getElementById(module.identifier);
|
var moduleWrapper = document.getElementById(module.identifier);
|
||||||
var contentWrapper = moduleWrapper.getElementsByClassName("module-content")[0];
|
var contentWrapper = moduleWrapper.getElementsByClassName("module-content")[0];
|
||||||
|
|
||||||
contentWrapper.innerHTML = null;
|
contentWrapper.innerHTML = "";
|
||||||
contentWrapper.appendChild(content);
|
contentWrapper.appendChild(content);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -152,7 +152,7 @@ var Module = Class.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
/* socket()
|
/* socket()
|
||||||
* Returns a socket object. If it doesn"t exsist, it"s created.
|
* Returns a socket object. If it doesn"t exist, it"s created.
|
||||||
* It also registers the notification callback.
|
* It also registers the notification callback.
|
||||||
*/
|
*/
|
||||||
socket: function() {
|
socket: function() {
|
||||||
|
@@ -298,7 +298,7 @@ If no translation is found, a fallback will be used. The fallback sequence is as
|
|||||||
- 4. Translation as defined in core translation file of the fallback language (the first defined core translation file).
|
- 4. Translation as defined in core translation file of the fallback language (the first defined core translation file).
|
||||||
- 5. The key (identifier) of the translation.
|
- 5. The key (identifier) of the translation.
|
||||||
|
|
||||||
When adding translations to your module, it's a good idea to see if an apropriate translation is already available in the [core translation files](https://github.com/MichMich/MagicMirror/tree/master/translations). This way, your module can benefit from the exsisting translations.
|
When adding translations to your module, it's a good idea to see if an apropriate translation is already available in the [core translation files](https://github.com/MichMich/MagicMirror/tree/master/translations). This way, your module can benefit from the existing translations.
|
||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
````javascript
|
````javascript
|
||||||
|
@@ -35,9 +35,20 @@ Module.register("alert",{
|
|||||||
},
|
},
|
||||||
show_notification: function(message) {
|
show_notification: function(message) {
|
||||||
if (this.config.effect == "slide") {this.config.effect = this.config.effect + "-" + this.config.position;}
|
if (this.config.effect == "slide") {this.config.effect = this.config.effect + "-" + this.config.position;}
|
||||||
message = "<span class='thin' style='line-height: 35px; font-size:24px' color='#4A4A4A'>" + message.title + "</span><br /><span class='light' style='font-size:28px;line-height: 30px;'>" + message.message + "</span>";
|
|
||||||
|
msg = "";
|
||||||
|
if (message.title) {
|
||||||
|
msg += "<span class='thin' style='line-height: 35px; font-size:24px' color='#4A4A4A'>" + message.title + "</span>";
|
||||||
|
}
|
||||||
|
if (message.message){
|
||||||
|
if (msg != ""){
|
||||||
|
msg+= "<br />";
|
||||||
|
}
|
||||||
|
msg += "<span class='light' style='font-size:28px;line-height: 30px;'>" + message.message + "</span>";
|
||||||
|
}
|
||||||
|
|
||||||
new NotificationFx({
|
new NotificationFx({
|
||||||
message: message,
|
message: msg,
|
||||||
layout: "growl",
|
layout: "growl",
|
||||||
effect: this.config.effect,
|
effect: this.config.effect,
|
||||||
ttl: this.config.display_time
|
ttl: this.config.display_time
|
||||||
@@ -67,7 +78,19 @@ Module.register("alert",{
|
|||||||
this.hide_alert(sender);
|
this.hide_alert(sender);
|
||||||
}
|
}
|
||||||
|
|
||||||
message = "<span class='light' style='line-height: 35px; font-size:30px' color='#4A4A4A'>" + params.title + "</span><br /><span class='thin' style='font-size:22px;line-height: 30px;'>" + params.message + "</span>";
|
//Display title and message only if they are provided in notification parameters
|
||||||
|
message ="";
|
||||||
|
if (params.title) {
|
||||||
|
message += "<span class='light' style='line-height: 35px; font-size:30px' color='#4A4A4A'>" + params.title + "</span>"
|
||||||
|
}
|
||||||
|
if (params.message) {
|
||||||
|
if (message != ""){
|
||||||
|
message += "<br />";
|
||||||
|
}
|
||||||
|
|
||||||
|
message += "<span class='thin' style='font-size:22px;line-height: 30px;'>" + params.message + "</span>";
|
||||||
|
}
|
||||||
|
|
||||||
//Store alert in this.alerts
|
//Store alert in this.alerts
|
||||||
this.alerts[sender.name] = new NotificationFx({
|
this.alerts[sender.name] = new NotificationFx({
|
||||||
message: image + message,
|
message: image + message,
|
||||||
|
@@ -31,7 +31,8 @@ Module.register("calendar",{
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
titleReplace: {
|
titleReplace: {
|
||||||
"De verjaardag van ": ""
|
"De verjaardag van ": "",
|
||||||
|
"'s birthday": ""
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -49,7 +50,7 @@ Module.register("calendar",{
|
|||||||
getTranslations: function() {
|
getTranslations: function() {
|
||||||
// The translations for the defaut modules are defined in the core translation files.
|
// The translations for the defaut modules are defined in the core translation files.
|
||||||
// Therefor we can just return false. Otherwise we should have returned a dictionairy.
|
// Therefor we can just return false. Otherwise we should have returned a dictionairy.
|
||||||
// If you're trying to build yiur own module including translations, check out the documentation.
|
// If you're trying to build your own module including translations, check out the documentation.
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@@ -25,7 +25,12 @@ var CalendarFetcher = function(url, reloadInterval, maximumEntries, maximumNumbe
|
|||||||
clearTimeout(reloadTimer);
|
clearTimeout(reloadTimer);
|
||||||
reloadTimer = null;
|
reloadTimer = null;
|
||||||
|
|
||||||
ical.fromURL(url, {}, function(err, data) {
|
var opts = {
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Node.js 6.0.0) MagicMirror/v2 (https://github.com/MichMich/MagicMirror/)'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ical.fromURL(url, opts, function(err, data) {
|
||||||
if (err) {
|
if (err) {
|
||||||
fetchFailedCallback(self, err);
|
fetchFailedCallback(self, err);
|
||||||
scheduleTimer();
|
scheduleTimer();
|
||||||
@@ -188,7 +193,7 @@ var CalendarFetcher = function(url, reloadInterval, maximumEntries, maximumNumbe
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* broadcastItems()
|
/* broadcastItems()
|
||||||
* Broadcast the exsisting events.
|
* Broadcast the existing events.
|
||||||
*/
|
*/
|
||||||
this.broadcastEvents = function() {
|
this.broadcastEvents = function() {
|
||||||
//console.log('Broadcasting ' + events.length + ' events.');
|
//console.log('Broadcasting ' + events.length + ' events.');
|
||||||
|
@@ -30,8 +30,8 @@ module.exports = NodeHelper.create({
|
|||||||
},
|
},
|
||||||
|
|
||||||
/* createFetcher(url, reloadInterval)
|
/* createFetcher(url, reloadInterval)
|
||||||
* Creates a fetcher for a new url if it doesn't exsist yet.
|
* Creates a fetcher for a new url if it doesn't exist yet.
|
||||||
* Otherwise it reuses the exsisting one.
|
* Otherwise it reuses the existing one.
|
||||||
*
|
*
|
||||||
* attribute url string - URL of the news feed.
|
* attribute url string - URL of the news feed.
|
||||||
* attribute reloadInterval number - Reload interval in milliseconds.
|
* attribute reloadInterval number - Reload interval in milliseconds.
|
||||||
@@ -69,7 +69,7 @@ module.exports = NodeHelper.create({
|
|||||||
|
|
||||||
self.fetchers[url] = fetcher;
|
self.fetchers[url] = fetcher;
|
||||||
} else {
|
} else {
|
||||||
//console.log('Use exsisting news fetcher for url: ' + url);
|
//console.log('Use existing news fetcher for url: ' + url);
|
||||||
fetcher = self.fetchers[url];
|
fetcher = self.fetchers[url];
|
||||||
fetcher.broadcastEvents();
|
fetcher.broadcastEvents();
|
||||||
}
|
}
|
||||||
|
@@ -66,5 +66,40 @@ The following properties can be configured:
|
|||||||
<br><b>Default value:</b> <code>false</code>
|
<br><b>Default value:</b> <code>false</code>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>displayType</code></td>
|
||||||
|
<td>Display a digital clock, analog clock, or both together.<br>
|
||||||
|
<br><b>Possible values:</b> <code>digital</code>, <code>analog</code>, or <code>both</code>
|
||||||
|
<br><b>Default value:</b> <code>digital</code>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>analogSize</code></td>
|
||||||
|
<td><strong>Specific to the analog clock.</strong> Defines how large the analog display is.<br>
|
||||||
|
<br><b>Possible values:</b> A positive number of pixels</code>
|
||||||
|
<br><b>Default value:</b> <code>200px</code>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>analogFace</code></td>
|
||||||
|
<td><strong>Specific to the analog clock.</strong> Specifies which clock face to use.<br>
|
||||||
|
<br><b>Possible values:</b> <code>simple</code> for a simple border, <code>none</code> for no face or border, or <code>face-###</code> (where ### is currently a value between 001 and 012, inclusive)
|
||||||
|
<br><b>Default value:</b> <code>simple</code>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>secondsColor</code></td>
|
||||||
|
<td><strong>Specific to the analog clock.</strong> Specifies what color to make the 'seconds' hand.<br>
|
||||||
|
<br><b>Possible values:</b> <code>any HTML RGB Color</code>
|
||||||
|
<br><b>Default value:</b> <code>#888888</code>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>analogPlacement</code></td>
|
||||||
|
<td><strong>Specific to the analog clock. <em>(requires displayType set to <code>'both'</code>)</em></strong> Specifies where the analog clock is in relation to the digital clock<br>
|
||||||
|
<br><b>Possible values:</b> <code>top</code>, <code>right</code>, <code>bottom</code>, or <code>left</code>
|
||||||
|
<br><b>Default value:</b> <code>bottom</code>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -8,31 +8,51 @@
|
|||||||
Module.register("clock",{
|
Module.register("clock",{
|
||||||
// Module config defaults.
|
// Module config defaults.
|
||||||
defaults: {
|
defaults: {
|
||||||
|
displayType: 'digital', // options: digital, analog, both
|
||||||
|
|
||||||
timeFormat: config.timeFormat,
|
timeFormat: config.timeFormat,
|
||||||
displaySeconds: true,
|
displaySeconds: true,
|
||||||
showPeriod: true,
|
showPeriod: true,
|
||||||
showPeriodUpper: false,
|
showPeriodUpper: false,
|
||||||
clockBold: false
|
clockBold: false,
|
||||||
|
|
||||||
|
/* specific to the analog clock */
|
||||||
|
analogSize: '200px',
|
||||||
|
analogFace: 'simple', // options: 'none', 'simple', 'face-###' (where ### is 001 to 012 inclusive)
|
||||||
|
analogPlacement: 'bottom', // options: top, bottom, left, right
|
||||||
|
secondsColor: '#888888',
|
||||||
},
|
},
|
||||||
// Define required scripts.
|
// Define required scripts.
|
||||||
getScripts: function() {
|
getScripts: function() {
|
||||||
return ["moment.js"];
|
return ["moment.js"];
|
||||||
},
|
},
|
||||||
|
// Define styles.
|
||||||
|
getStyles: function() {
|
||||||
|
return ["clock_styles.css"];
|
||||||
|
},
|
||||||
// Define start sequence.
|
// Define start sequence.
|
||||||
start: function() {
|
start: function() {
|
||||||
Log.info("Starting module: " + this.name);
|
Log.info("Starting module: " + this.name);
|
||||||
|
|
||||||
// Schedule update interval.
|
// Schedule update interval.
|
||||||
var self = this;
|
var self = this;
|
||||||
setInterval(function() {
|
setInterval(function() {
|
||||||
self.updateDom();
|
self.updateDom();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
// Set locale.
|
// Set locale.
|
||||||
moment.locale(config.language);
|
moment.locale(config.language);
|
||||||
|
|
||||||
},
|
},
|
||||||
// Override dom generator.
|
// Override dom generator.
|
||||||
getDom: function() {
|
getDom: function() {
|
||||||
// Create wrappers.
|
|
||||||
var wrapper = document.createElement("div");
|
var wrapper = document.createElement("div");
|
||||||
|
|
||||||
|
/************************************
|
||||||
|
* Create wrappers for DIGITAL clock
|
||||||
|
*/
|
||||||
|
|
||||||
var dateWrapper = document.createElement("div");
|
var dateWrapper = document.createElement("div");
|
||||||
var timeWrapper = document.createElement("div");
|
var timeWrapper = document.createElement("div");
|
||||||
var secondsWrapper = document.createElement("sup");
|
var secondsWrapper = document.createElement("sup");
|
||||||
@@ -72,15 +92,127 @@ Module.register("clock",{
|
|||||||
} else {
|
} else {
|
||||||
periodWrapper.innerHTML = moment().format("a");
|
periodWrapper.innerHTML = moment().format("a");
|
||||||
}
|
}
|
||||||
// Combine wrappers.
|
|
||||||
wrapper.appendChild(dateWrapper);
|
|
||||||
wrapper.appendChild(timeWrapper);
|
|
||||||
if (this.config.displaySeconds) {
|
if (this.config.displaySeconds) {
|
||||||
timeWrapper.appendChild(secondsWrapper);
|
timeWrapper.appendChild(secondsWrapper);
|
||||||
}
|
}
|
||||||
if (this.config.showPeriod && this.config.timeFormat !== 24) {
|
if (this.config.showPeriod && this.config.timeFormat !== 24) {
|
||||||
timeWrapper.appendChild(periodWrapper);
|
timeWrapper.appendChild(periodWrapper);
|
||||||
}
|
}
|
||||||
|
if (this.config.displaySeconds) {
|
||||||
|
timeWrapper.appendChild(secondsWrapper);
|
||||||
|
}
|
||||||
|
if (this.config.showPeriod && this.config.timeFormat !== 24) {
|
||||||
|
timeWrapper.appendChild(periodWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************
|
||||||
|
* Create wrappers for ANALOG clock, only if specified in config
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (this.config.displayType !== 'digital') {
|
||||||
|
// If it isn't 'digital', then an 'analog' clock was also requested
|
||||||
|
|
||||||
|
// Calculate the degree offset for each hand of the clock
|
||||||
|
var now = moment(),
|
||||||
|
second = now.seconds() * 6,
|
||||||
|
minute = now.minute() * 6 + second / 60,
|
||||||
|
hour = ((now.hours() % 12) / 12) * 360 + 90 + minute / 12;
|
||||||
|
|
||||||
|
// Create wrappers
|
||||||
|
var wrapper = document.createElement("div");
|
||||||
|
var clockCircle = document.createElement("div");
|
||||||
|
clockCircle.className = "clockCircle";
|
||||||
|
clockCircle.style.width = this.config.analogSize;
|
||||||
|
clockCircle.style.height = this.config.analogSize;
|
||||||
|
|
||||||
|
if (this.config.analogFace != '' && this.config.analogFace != 'simple' && this.config.analogFace != 'none') {
|
||||||
|
clockCircle.style.background = "url("+ this.data.path + "faces/" + this.config.analogFace + ".svg)";
|
||||||
|
clockCircle.style.backgroundSize = "100%";
|
||||||
|
} else if (this.config.analogFace != 'none') {
|
||||||
|
clockCircle.style.border = "2px solid white";
|
||||||
|
}
|
||||||
|
var clockFace = document.createElement("div");
|
||||||
|
clockFace.className = "clockFace";
|
||||||
|
|
||||||
|
var clockHour = document.createElement("div");
|
||||||
|
clockHour.id = "clockHour";
|
||||||
|
clockHour.style.transform = "rotate(" + hour + "deg)";
|
||||||
|
clockHour.className = "clockHour";
|
||||||
|
var clockMinute = document.createElement("div");
|
||||||
|
clockMinute.id = "clockMinute";
|
||||||
|
clockMinute.style.transform = "rotate(" + minute + "deg)";
|
||||||
|
clockMinute.className = "clockMinute";
|
||||||
|
|
||||||
|
// Combine analog wrappers
|
||||||
|
clockFace.appendChild(clockHour);
|
||||||
|
clockFace.appendChild(clockMinute);
|
||||||
|
|
||||||
|
if (this.config.displaySeconds) {
|
||||||
|
var clockSecond = document.createElement("div");
|
||||||
|
clockSecond.id = "clockSecond";
|
||||||
|
clockSecond.style.transform = "rotate(" + second + "deg)";
|
||||||
|
clockSecond.className = "clockSecond";
|
||||||
|
clockSecond.style.backgroundColor = this.config.secondsColor;
|
||||||
|
clockFace.appendChild(clockSecond);
|
||||||
|
}
|
||||||
|
clockCircle.appendChild(clockFace);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*******************************************
|
||||||
|
* Combine wrappers, check for .displayType
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (this.config.displayType === 'digital') {
|
||||||
|
// Display only a digital clock
|
||||||
|
wrapper.appendChild(dateWrapper);
|
||||||
|
wrapper.appendChild(timeWrapper);
|
||||||
|
} else if (this.config.displayType === 'analog') {
|
||||||
|
// Display only an analog clock
|
||||||
|
dateWrapper.style.textAlign = "center";
|
||||||
|
dateWrapper.style.paddingBottom = "15px";
|
||||||
|
wrapper.appendChild(dateWrapper);
|
||||||
|
wrapper.appendChild(clockCircle);
|
||||||
|
} else {
|
||||||
|
// Both clocks have been configured, check position
|
||||||
|
var placement = this.config.analogPlacement;
|
||||||
|
|
||||||
|
analogWrapper = document.createElement("div");
|
||||||
|
analogWrapper.id = "analog";
|
||||||
|
analogWrapper.style.cssFloat = "none";
|
||||||
|
analogWrapper.appendChild(clockCircle);
|
||||||
|
digitalWrapper = document.createElement("div");
|
||||||
|
digitalWrapper.id = "digital";
|
||||||
|
digitalWrapper.style.cssFloat = "none";
|
||||||
|
digitalWrapper.appendChild(dateWrapper);
|
||||||
|
digitalWrapper.appendChild(timeWrapper);
|
||||||
|
|
||||||
|
if (placement === 'left' || placement === 'right') {
|
||||||
|
digitalWrapper.style.display = "inline-block";
|
||||||
|
digitalWrapper.style.verticalAlign = "top";
|
||||||
|
analogWrapper.style.display = "inline-block";
|
||||||
|
if (placement === 'left') {
|
||||||
|
analogWrapper.style.padding = "0 20px 0 0";
|
||||||
|
wrapper.appendChild(analogWrapper);
|
||||||
|
wrapper.appendChild(digitalWrapper);
|
||||||
|
} else {
|
||||||
|
analogWrapper.style.padding = "0 0 0 20px";
|
||||||
|
wrapper.appendChild(digitalWrapper);
|
||||||
|
wrapper.appendChild(analogWrapper);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
digitalWrapper.style.textAlign = "center";
|
||||||
|
if (placement === 'top') {
|
||||||
|
analogWrapper.style.padding = "0 0 20px 0";
|
||||||
|
wrapper.appendChild(analogWrapper);
|
||||||
|
wrapper.appendChild(digitalWrapper);
|
||||||
|
} else {
|
||||||
|
analogWrapper.style.padding = "20px 0 0 0";
|
||||||
|
wrapper.appendChild(digitalWrapper);
|
||||||
|
wrapper.appendChild(analogWrapper);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Return the wrapper to the dom.
|
// Return the wrapper to the dom.
|
||||||
return wrapper;
|
return wrapper;
|
||||||
}
|
}
|
||||||
|
74
modules/default/clock/clock_styles.css
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
#analog {
|
||||||
|
}
|
||||||
|
|
||||||
|
#digital {
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockCircle {
|
||||||
|
margin: 0 auto;
|
||||||
|
position: relative;
|
||||||
|
border-radius: 50%;
|
||||||
|
background-size: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockFace {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockFace:after {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
width: 6px;
|
||||||
|
height: 6px;
|
||||||
|
margin: -3px 0 0 -3px;
|
||||||
|
background: white;
|
||||||
|
border-radius: 3px;
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockHour {
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
margin: -2px 0 -2px -25%; /* numbers much match negative length & thickness */
|
||||||
|
padding: 2px 0 2px 25%; /* indicator length & thickness */
|
||||||
|
background: white;
|
||||||
|
-webkit-transform-origin: 100% 50%;
|
||||||
|
-ms-transform-origin: 100% 50%;
|
||||||
|
transform-origin: 100% 50%;
|
||||||
|
border-radius: 3px 0 0 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockMinute {
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
margin: -35% -2px 0; /* numbers must match negative length & thickness */
|
||||||
|
padding: 35% 2px 0; /* indicator length & thickness */
|
||||||
|
background: white;
|
||||||
|
-webkit-transform-origin: 50% 100%;
|
||||||
|
-ms-transform-origin: 50% 100%;
|
||||||
|
transform-origin: 50% 100%;
|
||||||
|
border-radius: 3px 0 0 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clockSecond {
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
margin: -38% -1px 0 0; /* numbers must match negative length & thickness */
|
||||||
|
padding: 38% 1px 0 0; /* indicator length & thickness */
|
||||||
|
background: #888888;
|
||||||
|
-webkit-transform-origin: 50% 100%;
|
||||||
|
-ms-transform-origin: 50% 100%;
|
||||||
|
transform-origin: 50% 100%;
|
||||||
|
}
|
1
modules/default/clock/faces/face-001.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg id="Hour_Markers_-_Singlets" data-name="Hour Markers - Singlets" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 250 250"><defs><style>.cls-1,.cls-2{fill:none;stroke:#fff;stroke-linecap:round;stroke-miterlimit:10;}.cls-2{stroke-width:0.5px;}</style></defs><title>face-001</title><line class="cls-1" x1="125" y1="1.25" x2="125" y2="16.23"/><line class="cls-1" x1="186.87" y1="17.83" x2="179.39" y2="30.8"/><line class="cls-1" x1="232.17" y1="63.12" x2="219.2" y2="70.61"/><line class="cls-1" x1="248.75" y1="125" x2="233.77" y2="125"/><line class="cls-1" x1="232.17" y1="186.87" x2="219.2" y2="179.39"/><line class="cls-1" x1="186.88" y1="232.17" x2="179.39" y2="219.2"/><line class="cls-1" x1="125" y1="248.75" x2="125" y2="233.77"/><line class="cls-1" x1="63.13" y1="232.17" x2="70.61" y2="219.2"/><line class="cls-1" x1="17.83" y1="186.88" x2="30.8" y2="179.39"/><line class="cls-1" x1="1.25" y1="125" x2="16.23" y2="125"/><line class="cls-1" x1="17.83" y1="63.13" x2="30.8" y2="70.61"/><line class="cls-1" x1="63.12" y1="17.83" x2="70.61" y2="30.8"/><line class="cls-2" x1="138.01" y1="1.25" x2="136.96" y2="11.23"/><line class="cls-2" x1="150.87" y1="3.29" x2="148.78" y2="13.11"/><line class="cls-2" x1="163.45" y1="6.66" x2="160.35" y2="16.21"/><line class="cls-2" x1="175.61" y1="11.33" x2="171.53" y2="20.5"/><line class="cls-2" x1="198.14" y1="24.33" x2="192.24" y2="32.45"/><line class="cls-2" x1="208.26" y1="32.53" x2="201.54" y2="39.99"/><line class="cls-2" x1="217.47" y1="41.74" x2="210.01" y2="48.46"/><line class="cls-2" x1="225.67" y1="51.86" x2="217.55" y2="57.76"/><line class="cls-2" x1="238.67" y1="74.39" x2="229.5" y2="78.47"/><line class="cls-2" x1="243.34" y1="86.55" x2="233.79" y2="89.65"/><line class="cls-2" x1="246.71" y1="99.13" x2="236.89" y2="101.22"/><line class="cls-2" x1="248.75" y1="111.99" x2="238.77" y2="113.04"/><line class="cls-2" x1="248.75" y1="138.01" x2="238.77" y2="136.96"/><line class="cls-2" x1="246.71" y1="150.87" x2="236.89" y2="148.78"/><line class="cls-2" x1="243.34" y1="163.45" x2="233.79" y2="160.35"/><line class="cls-2" x1="238.67" y1="175.61" x2="229.5" y2="171.53"/><line class="cls-2" x1="225.67" y1="198.14" x2="217.55" y2="192.24"/><line class="cls-2" x1="217.47" y1="208.26" x2="210.01" y2="201.54"/><line class="cls-2" x1="208.26" y1="217.47" x2="201.54" y2="210.01"/><line class="cls-2" x1="198.14" y1="225.67" x2="192.24" y2="217.55"/><line class="cls-2" x1="175.61" y1="238.67" x2="171.53" y2="229.5"/><line class="cls-2" x1="163.45" y1="243.34" x2="160.35" y2="233.79"/><line class="cls-2" x1="150.87" y1="246.71" x2="148.78" y2="236.89"/><line class="cls-2" x1="138.01" y1="248.75" x2="136.96" y2="238.77"/><line class="cls-2" x1="111.99" y1="248.75" x2="113.04" y2="238.77"/><line class="cls-2" x1="99.13" y1="246.71" x2="101.22" y2="236.89"/><line class="cls-2" x1="86.55" y1="243.34" x2="89.65" y2="233.79"/><line class="cls-2" x1="74.39" y1="238.67" x2="78.47" y2="229.5"/><line class="cls-2" x1="51.86" y1="225.67" x2="57.76" y2="217.55"/><line class="cls-2" x1="41.74" y1="217.47" x2="48.46" y2="210.01"/><line class="cls-2" x1="32.53" y1="208.26" x2="39.99" y2="201.54"/><line class="cls-2" x1="24.33" y1="198.14" x2="32.45" y2="192.24"/><line class="cls-2" x1="11.33" y1="175.61" x2="20.5" y2="171.53"/><line class="cls-2" x1="6.66" y1="163.45" x2="16.21" y2="160.35"/><line class="cls-2" x1="3.29" y1="150.87" x2="13.11" y2="148.78"/><line class="cls-2" x1="1.25" y1="138.01" x2="11.23" y2="136.96"/><line class="cls-2" x1="1.25" y1="111.99" x2="11.23" y2="113.04"/><line class="cls-2" x1="3.29" y1="99.13" x2="13.11" y2="101.22"/><line class="cls-2" x1="6.66" y1="86.55" x2="16.21" y2="89.65"/><line class="cls-2" x1="11.33" y1="74.39" x2="20.5" y2="78.47"/><line class="cls-2" x1="24.33" y1="51.86" x2="32.45" y2="57.76"/><line class="cls-2" x1="32.53" y1="41.74" x2="39.99" y2="48.46"/><line class="cls-2" x1="41.74" y1="32.53" x2="48.46" y2="39.99"/><line class="cls-2" x1="51.86" y1="24.33" x2="57.76" y2="32.45"/><line class="cls-2" x1="74.39" y1="11.33" x2="78.47" y2="20.5"/><line class="cls-2" x1="86.55" y1="6.66" x2="89.65" y2="16.21"/><line class="cls-2" x1="99.13" y1="3.29" x2="101.22" y2="13.11"/><line class="cls-2" x1="111.99" y1="1.25" x2="113.04" y2="11.23"/></svg>
|
After Width: | Height: | Size: 4.2 KiB |
1
modules/default/clock/faces/face-002.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg id="Hour_Markers_-_Doubles" data-name="Hour Markers - Doubles" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 250 250"><defs><style>.cls-1{fill:none;stroke:#fff;stroke-linecap:round;stroke-miterlimit:10;stroke-width:2.98px;}</style></defs><title>face-002</title><line class="cls-1" x1="122.01" y1="1.75" x2="122.01" y2="16.67"/><line class="cls-1" x1="186.62" y1="18.26" x2="179.17" y2="31.18"/><line class="cls-1" x1="231.74" y1="63.37" x2="218.82" y2="70.83"/><line class="cls-1" x1="248.25" y1="127.99" x2="233.33" y2="127.99"/><line class="cls-1" x1="231.74" y1="186.62" x2="218.82" y2="179.17"/><line class="cls-1" x1="186.63" y1="231.74" x2="179.17" y2="218.82"/><line class="cls-1" x1="127.99" y1="248.25" x2="127.99" y2="233.33"/><line class="cls-1" x1="63.38" y1="231.74" x2="70.83" y2="218.82"/><line class="cls-1" x1="18.26" y1="186.63" x2="31.18" y2="179.17"/><line class="cls-1" x1="1.75" y1="122.01" x2="16.67" y2="122.01"/><line class="cls-1" x1="18.26" y1="63.38" x2="31.18" y2="70.83"/><line class="cls-1" x1="63.37" y1="18.26" x2="70.83" y2="31.18"/><line class="cls-1" x1="127.99" y1="1.75" x2="127.99" y2="16.67"/><line class="cls-1" x1="248.25" y1="122.01" x2="233.33" y2="122.01"/><line class="cls-1" x1="122.01" y1="248.25" x2="122.01" y2="233.33"/><line class="cls-1" x1="1.75" y1="127.99" x2="16.67" y2="127.99"/></svg>
|
After Width: | Height: | Size: 1.3 KiB |
1
modules/default/clock/faces/face-003.svg
Normal file
After Width: | Height: | Size: 7.2 KiB |
1
modules/default/clock/faces/face-004.svg
Normal file
After Width: | Height: | Size: 5.2 KiB |
1
modules/default/clock/faces/face-005.svg
Normal file
After Width: | Height: | Size: 17 KiB |
1
modules/default/clock/faces/face-006.svg
Normal file
After Width: | Height: | Size: 15 KiB |
1
modules/default/clock/faces/face-007.svg
Normal file
After Width: | Height: | Size: 11 KiB |
1
modules/default/clock/faces/face-008.svg
Normal file
After Width: | Height: | Size: 6.8 KiB |
1
modules/default/clock/faces/face-009.svg
Normal file
After Width: | Height: | Size: 18 KiB |
1
modules/default/clock/faces/face-010.svg
Normal file
After Width: | Height: | Size: 17 KiB |
1
modules/default/clock/faces/face-011.svg
Normal file
After Width: | Height: | Size: 7.2 KiB |
1
modules/default/clock/faces/face-012.svg
Normal file
After Width: | Height: | Size: 7.1 KiB |
@@ -14,6 +14,7 @@ modules: [
|
|||||||
config: {
|
config: {
|
||||||
// See 'Configuration options' for more information.
|
// See 'Configuration options' for more information.
|
||||||
location: 'Amsterdam,Netherlands',
|
location: 'Amsterdam,Netherlands',
|
||||||
|
locationID: '', //Location ID from http://bulk.openweather.org/sample/
|
||||||
appid: 'abcde12345abcde12345abcde12345ab' //openweathermap.org API key.
|
appid: 'abcde12345abcde12345abcde12345ab' //openweathermap.org API key.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -34,7 +35,7 @@ The following properties can be configured:
|
|||||||
</tr>
|
</tr>
|
||||||
<thead>
|
<thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>location</code></td>
|
<td><code>location</code></td>
|
||||||
<td>The location used for weather information.<br>
|
<td>The location used for weather information.<br>
|
||||||
@@ -42,6 +43,13 @@ The following properties can be configured:
|
|||||||
<br><b>Default value:</b> <code>New York</code>
|
<br><b>Default value:</b> <code>New York</code>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>locationID</code></td>
|
||||||
|
<td>Location ID from <a href="http://bulk.openweather.org/sample/">OpenWeather</a> <b>This will override anything you put in location.</b><br>Leave blank if you want to use location.
|
||||||
|
<br><b>Example:</b> <code>1234567</code>
|
||||||
|
<br><b>Default value:</b> <code></code>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>appid</code></td>
|
<td><code>appid</code></td>
|
||||||
<td>The <a href="https://home.openweathermap.org" target="_blank">OpenWeatherMap</a> API key, which can be obtained by creating an OpenWeatherMap account.<br>
|
<td>The <a href="https://home.openweathermap.org" target="_blank">OpenWeatherMap</a> API key, which can be obtained by creating an OpenWeatherMap account.<br>
|
||||||
|
@@ -12,6 +12,7 @@ Module.register("currentweather",{
|
|||||||
// Default module config.
|
// Default module config.
|
||||||
defaults: {
|
defaults: {
|
||||||
location: "",
|
location: "",
|
||||||
|
locationID: "",
|
||||||
appid: "",
|
appid: "",
|
||||||
units: config.units,
|
units: config.units,
|
||||||
updateInterval: 10 * 60 * 1000, // every 10 minutes
|
updateInterval: 10 * 60 * 1000, // every 10 minutes
|
||||||
@@ -198,7 +199,11 @@ Module.register("currentweather",{
|
|||||||
*/
|
*/
|
||||||
getParams: function() {
|
getParams: function() {
|
||||||
var params = "?";
|
var params = "?";
|
||||||
params += "q=" + this.config.location;
|
if(this.config.locationID !== "") {
|
||||||
|
params += "id=" + this.config.locationID;
|
||||||
|
} else {
|
||||||
|
params += "q=" + this.config.location;
|
||||||
|
}
|
||||||
params += "&units=" + this.config.units;
|
params += "&units=" + this.config.units;
|
||||||
params += "&lang=" + this.config.lang;
|
params += "&lang=" + this.config.lang;
|
||||||
params += "&APPID=" + this.config.appid;
|
params += "&APPID=" + this.config.appid;
|
||||||
|
@@ -101,7 +101,13 @@ The following properties can be configured:
|
|||||||
<br><b>Default value:</b> <code>2000</code> (2.5 seconds)
|
<br><b>Default value:</b> <code>2000</code> (2.5 seconds)
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>maxNewsItems</code></td>
|
||||||
|
<td>Total amount of news items to cycle through. (0 for unlimited)<br>
|
||||||
|
<br><b>Possible values:</b><code>0</code> - <code>...</code>
|
||||||
|
<br><b>Default value:</b> <code>0</code>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -117,7 +117,7 @@ var Fetcher = function(url, reloadInterval, encoding) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* broadcastItems()
|
/* broadcastItems()
|
||||||
* Broadcast the exsisting items.
|
* Broadcast the existing items.
|
||||||
*/
|
*/
|
||||||
this.broadcastItems = function() {
|
this.broadcastItems = function() {
|
||||||
if (items.length <= 0) {
|
if (items.length <= 0) {
|
||||||
|
@@ -24,6 +24,7 @@ Module.register("newsfeed",{
|
|||||||
reloadInterval: 5 * 60 * 1000, // every 5 minutes
|
reloadInterval: 5 * 60 * 1000, // every 5 minutes
|
||||||
updateInterval: 10 * 1000,
|
updateInterval: 10 * 1000,
|
||||||
animationSpeed: 2.5 * 1000,
|
animationSpeed: 2.5 * 1000,
|
||||||
|
maxNewsItems: 0 // 0 for unlimited
|
||||||
},
|
},
|
||||||
|
|
||||||
// Define required scripts.
|
// Define required scripts.
|
||||||
@@ -151,7 +152,9 @@ Module.register("newsfeed",{
|
|||||||
var dateB = new Date(b.pubdate);
|
var dateB = new Date(b.pubdate);
|
||||||
return dateB - dateA;
|
return dateB - dateA;
|
||||||
});
|
});
|
||||||
|
if(this.config.maxNewsItems > 0) {
|
||||||
|
newsItems = newsItems.slice(0, this.config.maxNewsItems);
|
||||||
|
}
|
||||||
this.newsItems = newsItems;
|
this.newsItems = newsItems;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@@ -25,8 +25,8 @@ module.exports = NodeHelper.create({
|
|||||||
},
|
},
|
||||||
|
|
||||||
/* createFetcher(url, reloadInterval)
|
/* createFetcher(url, reloadInterval)
|
||||||
* Creates a fetcher for a new url if it doesn't exsist yet.
|
* Creates a fetcher for a new url if it doesn't exist yet.
|
||||||
* Otherwise it reoses the exsisting one.
|
* Otherwise it reoses the existing one.
|
||||||
*
|
*
|
||||||
* attribute url string - URL of the news feed.
|
* attribute url string - URL of the news feed.
|
||||||
* attribute reloadInterval number - Reload interval in milliseconds.
|
* attribute reloadInterval number - Reload interval in milliseconds.
|
||||||
@@ -62,7 +62,7 @@ module.exports = NodeHelper.create({
|
|||||||
|
|
||||||
self.fetchers[url] = fetcher;
|
self.fetchers[url] = fetcher;
|
||||||
} else {
|
} else {
|
||||||
console.log("Use exsisting news fetcher for url: " + url);
|
console.log("Use existing news fetcher for url: " + url);
|
||||||
fetcher = self.fetchers[url];
|
fetcher = self.fetchers[url];
|
||||||
fetcher.setReloadInterval(reloadInterval);
|
fetcher.setReloadInterval(reloadInterval);
|
||||||
fetcher.broadcastItems();
|
fetcher.broadcastItems();
|
||||||
|
@@ -14,6 +14,7 @@ modules: [
|
|||||||
config: {
|
config: {
|
||||||
// See 'Configuration options' for more information.
|
// See 'Configuration options' for more information.
|
||||||
location: 'Amsterdam,Netherlands',
|
location: 'Amsterdam,Netherlands',
|
||||||
|
locationID: '', //Location ID from http://bulk.openweather.org/sample/
|
||||||
appid: 'abcde12345abcde12345abcde12345ab' //openweathermap.org API key.
|
appid: 'abcde12345abcde12345abcde12345ab' //openweathermap.org API key.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -42,6 +43,13 @@ The following properties can be configured:
|
|||||||
<br><b>Default value:</b> <code>New York</code>
|
<br><b>Default value:</b> <code>New York</code>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>locationID</code></td>
|
||||||
|
<td>Location ID from <a href="http://bulk.openweather.org/sample/">OpenWeather</a> <b>This will override anything you put in location.</b><br>Leave blank if you want to use location.
|
||||||
|
<br><b>Example:</b> <code>1234567</code>
|
||||||
|
<br><b>Default value:</b> <code></code>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>appid</code></td>
|
<td><code>appid</code></td>
|
||||||
<td>The <a href="https://home.openweathermap.org" target="_blank">OpenWeatherMap</a> API key, which can be obtained by creating an OpenWeatherMap account.<br>
|
<td>The <a href="https://home.openweathermap.org" target="_blank">OpenWeatherMap</a> API key, which can be obtained by creating an OpenWeatherMap account.<br>
|
||||||
|
@@ -12,6 +12,7 @@ Module.register("weatherforecast",{
|
|||||||
// Default module config.
|
// Default module config.
|
||||||
defaults: {
|
defaults: {
|
||||||
location: "",
|
location: "",
|
||||||
|
locationID: "",
|
||||||
appid: "",
|
appid: "",
|
||||||
units: config.units,
|
units: config.units,
|
||||||
maxNumberOfDays: 7,
|
maxNumberOfDays: 7,
|
||||||
@@ -195,7 +196,11 @@ Module.register("weatherforecast",{
|
|||||||
*/
|
*/
|
||||||
getParams: function() {
|
getParams: function() {
|
||||||
var params = "?";
|
var params = "?";
|
||||||
params += "q=" + this.config.location;
|
if(this.config.locationID !== "") {
|
||||||
|
params += "id=" + this.config.locationID;
|
||||||
|
} else {
|
||||||
|
params += "q=" + this.config.location;
|
||||||
|
}
|
||||||
params += "&units=" + this.config.units;
|
params += "&units=" + this.config.units;
|
||||||
params += "&lang=" + this.config.lang;
|
params += "&lang=" + this.config.lang;
|
||||||
/*
|
/*
|
||||||
|
@@ -1,27 +1,28 @@
|
|||||||
{
|
{
|
||||||
/* GENERAL */
|
/* GENERAL */
|
||||||
"LOADING": "Lade …",
|
"LOADING": "Lade …",
|
||||||
|
|
||||||
/* CALENDAR */
|
/* CALENDAR */
|
||||||
"TODAY": "Heute",
|
"TODAY": "Heute",
|
||||||
"TOMORROW": "Morgen",
|
"TOMORROW": "Morgen",
|
||||||
"RUNNING": "noch",
|
"RUNNING": "noch",
|
||||||
"EMPTY": "Keine Termine.",
|
"EMPTY": "Keine Termine.",
|
||||||
|
|
||||||
/* WEATHER */
|
/* WEATHER */
|
||||||
"N": "N",
|
"N": "N",
|
||||||
"NNE": "NNO",
|
"NNE": "NNO",
|
||||||
"ENE": "ONO",
|
"NE": "NO",
|
||||||
"E": "O",
|
"ENE": "ONO",
|
||||||
"ESE": "OSO",
|
"E": "O",
|
||||||
"SE": "SO",
|
"ESE": "OSO",
|
||||||
"SSE": "SSO",
|
"SE": "SO",
|
||||||
"S": "S",
|
"SSE": "SSO",
|
||||||
"SSW": "SSW",
|
"S": "S",
|
||||||
"SW": "SW",
|
"SSW": "SSW",
|
||||||
"WSW": "WSW",
|
"SW": "SW",
|
||||||
"W": "W",
|
"WSW": "WSW",
|
||||||
"WNW": "WNW",
|
"W": "W",
|
||||||
"NW": "NW",
|
"WNW": "WNW",
|
||||||
"NNW": "NNW"
|
"NW": "NW",
|
||||||
|
"NNW": "NNW"
|
||||||
}
|
}
|
||||||
|
@@ -1,27 +1,28 @@
|
|||||||
{
|
{
|
||||||
/* GENERAL */
|
/* GENERAL */
|
||||||
"LOADING": "Loading …",
|
"LOADING": "Loading …",
|
||||||
|
|
||||||
/* CALENDAR */
|
/* CALENDAR */
|
||||||
"TODAY": "Today",
|
"TODAY": "Today",
|
||||||
"TOMORROW": "Tomorrow",
|
"TOMORROW": "Tomorrow",
|
||||||
"RUNNING": "Ends in",
|
"RUNNING": "Ends in",
|
||||||
"EMPTY": "No upcoming events.",
|
"EMPTY": "No upcoming events.",
|
||||||
|
|
||||||
/* WEATHER */
|
/* WEATHER */
|
||||||
"N": "N",
|
"N": "N",
|
||||||
"NNE": "NNE",
|
"NNE": "NNE",
|
||||||
"ENE": "ENE",
|
"NE": "NE",
|
||||||
"E": "E",
|
"ENE": "ENE",
|
||||||
"ESE": "ESE",
|
"E": "E",
|
||||||
"SE": "SE",
|
"ESE": "ESE",
|
||||||
"SSE": "SSE",
|
"SE": "SE",
|
||||||
"S": "S",
|
"SSE": "SSE",
|
||||||
"SSW": "SSW",
|
"S": "S",
|
||||||
"SW": "SW",
|
"SSW": "SSW",
|
||||||
"WSW": "WSW",
|
"SW": "SW",
|
||||||
"W": "W",
|
"WSW": "WSW",
|
||||||
"WNW": "WNW",
|
"W": "W",
|
||||||
"NW": "NW",
|
"WNW": "WNW",
|
||||||
"NNW": "NNW"
|
"NW": "NW",
|
||||||
|
"NNW": "NNW"
|
||||||
}
|
}
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
/* WEATHER */
|
/* WEATHER */
|
||||||
"N": "N",
|
"N": "N",
|
||||||
"NNE": "NNE",
|
"NNE": "NNE",
|
||||||
|
"NE": "NE",
|
||||||
"ENE": "ENE",
|
"ENE": "ENE",
|
||||||
"E": "E",
|
"E": "E",
|
||||||
"ESE": "ESE",
|
"ESE": "ESE",
|
||||||
|
@@ -1,27 +1,28 @@
|
|||||||
{
|
{
|
||||||
/* GENERAL */
|
/* GENERAL */
|
||||||
"LOADING": "Chargement …",
|
"LOADING": "Chargement …",
|
||||||
|
|
||||||
/* CALENDAR */
|
/* CALENDAR */
|
||||||
"TODAY": "Aujourd'hui",
|
"TODAY": "Aujourd'hui",
|
||||||
"TOMORROW": "Demain",
|
"TOMORROW": "Demain",
|
||||||
"RUNNING": "Se termine dans",
|
"RUNNING": "Se termine dans",
|
||||||
"EMPTY": "Aucun RDV.",
|
"EMPTY": "Aucun RDV.",
|
||||||
|
|
||||||
/* WEATHER */
|
/* WEATHER */
|
||||||
"N": "N",
|
"N": "N",
|
||||||
"NNE": "NNE",
|
"NNE": "NNE",
|
||||||
"ENE": "ENE",
|
"NE": "NE",
|
||||||
"E": "E",
|
"ENE": "ENE",
|
||||||
"ESE": "ESE",
|
"E": "E",
|
||||||
"SE": "SE",
|
"ESE": "ESE",
|
||||||
"SSE": "SSE",
|
"SE": "SE",
|
||||||
"S": "S",
|
"SSE": "SSE",
|
||||||
"SSW": "SSO",
|
"S": "S",
|
||||||
"SW": "SO",
|
"SSW": "SSO",
|
||||||
"WSW": "OSO",
|
"SW": "SO",
|
||||||
"W": "O",
|
"WSW": "OSO",
|
||||||
"WNW": "ONO",
|
"W": "O",
|
||||||
"NW": "NO",
|
"WNW": "ONO",
|
||||||
"NNW": "NNO"
|
"NW": "NO",
|
||||||
|
"NNW": "NNO"
|
||||||
}
|
}
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
/* WEATHER */
|
/* WEATHER */
|
||||||
"N": "N",
|
"N": "N",
|
||||||
"NNE": "NNE",
|
"NNE": "NNE",
|
||||||
|
"NE": "NE",
|
||||||
"ENE": "ENE",
|
"ENE": "ENE",
|
||||||
"E": "E",
|
"E": "E",
|
||||||
"ESE": "ESE",
|
"ESE": "ESE",
|
||||||
|
28
translations/it.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
/* GENERAL */
|
||||||
|
"LOADING": "Caricamento in corso …",
|
||||||
|
|
||||||
|
/* CALENDAR */
|
||||||
|
"TODAY": "Oggi",
|
||||||
|
"TOMORROW": "Domani",
|
||||||
|
"RUNNING": "Termina entro",
|
||||||
|
"EMPTY": "Nessun evento in arrivo.",
|
||||||
|
|
||||||
|
/* WEATHER */
|
||||||
|
"N": "N",
|
||||||
|
"NNE": "NNE",
|
||||||
|
"NE": "NE",
|
||||||
|
"ENE": "ENE",
|
||||||
|
"E": "E",
|
||||||
|
"ESE": "ESE",
|
||||||
|
"SE": "SE",
|
||||||
|
"SSE": "SSE",
|
||||||
|
"S": "S",
|
||||||
|
"SSW": "SSW",
|
||||||
|
"SW": "SW",
|
||||||
|
"WSW": "WSW",
|
||||||
|
"W": "W",
|
||||||
|
"WNW": "WNW",
|
||||||
|
"NW": "NW",
|
||||||
|
"NNW": "NNW"
|
||||||
|
}
|
28
translations/ja.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
/* GENERAL */
|
||||||
|
"LOADING": "ローディング …",
|
||||||
|
|
||||||
|
/* CALENDAR */
|
||||||
|
"TODAY":"今日",
|
||||||
|
"TOMORROW":"明日",
|
||||||
|
"RUNNING":"で終わります",
|
||||||
|
"EMPTY":"直近のイベントはありません",
|
||||||
|
|
||||||
|
/* WEATHER */
|
||||||
|
"N":"北",
|
||||||
|
"NNE":"北北東",
|
||||||
|
"NE":"北東",
|
||||||
|
"ENE":"東北東",
|
||||||
|
"E":"東",
|
||||||
|
"ESE":"東南東",
|
||||||
|
"SE":"南東",
|
||||||
|
"SSE":"南南東",
|
||||||
|
"S":"南",
|
||||||
|
"SSW":"南南西",
|
||||||
|
"SW":"南西",
|
||||||
|
"WSW":"西南西",
|
||||||
|
"W":"西",
|
||||||
|
"WNW":"西北西",
|
||||||
|
"NW":"北西",
|
||||||
|
"NNW":"北北西"
|
||||||
|
}
|
28
translations/nb.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
/* GENERAL */
|
||||||
|
"LOADING": "Laster …",
|
||||||
|
|
||||||
|
/* CALENDAR */
|
||||||
|
"TODAY": "I dag",
|
||||||
|
"TOMORROW": "I morgen",
|
||||||
|
"RUNNING": "Slutter om",
|
||||||
|
"EMPTY": "Ingen kommende arrangementer.",
|
||||||
|
|
||||||
|
/* WEATHER */
|
||||||
|
"N": "N",
|
||||||
|
"NNE": "NNØ",
|
||||||
|
"NE": "NØ",
|
||||||
|
"ENE": "ØNØ",
|
||||||
|
"E": "Ø",
|
||||||
|
"ESE": "ØSØ",
|
||||||
|
"SE": "SØ",
|
||||||
|
"SSE": "SSØ",
|
||||||
|
"S": "S",
|
||||||
|
"SSW": "SSV",
|
||||||
|
"SW": "SV",
|
||||||
|
"WSW": "VSV",
|
||||||
|
"W": "V",
|
||||||
|
"WNW": "VNV",
|
||||||
|
"NW": "NV",
|
||||||
|
"NNW": "NNV"
|
||||||
|
}
|
@@ -11,6 +11,7 @@
|
|||||||
/* WEATHER */
|
/* WEATHER */
|
||||||
"N": "N",
|
"N": "N",
|
||||||
"NNE": "NNO",
|
"NNE": "NNO",
|
||||||
|
"NE": "NO",
|
||||||
"ENE": "ONO",
|
"ENE": "ONO",
|
||||||
"E": "O",
|
"E": "O",
|
||||||
"ESE": "OZO",
|
"ESE": "OZO",
|
||||||
|
28
translations/nn.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
/* GENERAL */
|
||||||
|
"LOADING": "Lastar …",
|
||||||
|
|
||||||
|
/* CALENDAR */
|
||||||
|
"TODAY": "I dag",
|
||||||
|
"TOMORROW": "I morgon",
|
||||||
|
"RUNNING": "Sluttar om",
|
||||||
|
"EMPTY": "Ingen komande hendingar.",
|
||||||
|
|
||||||
|
/* WEATHER */
|
||||||
|
"N": "N",
|
||||||
|
"NNE": "NNA",
|
||||||
|
"NE": "NA",
|
||||||
|
"ENE": "ANA",
|
||||||
|
"E": "A",
|
||||||
|
"ESE": "ASA",
|
||||||
|
"SE": "SA",
|
||||||
|
"SSE": "SSA",
|
||||||
|
"S": "S",
|
||||||
|
"SSW": "SSV",
|
||||||
|
"SW": "SV",
|
||||||
|
"WSW": "VSV",
|
||||||
|
"W": "V",
|
||||||
|
"WNW": "VNV",
|
||||||
|
"NW": "NV",
|
||||||
|
"NNW": "NNV"
|
||||||
|
}
|
28
translations/pl.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
/* GENERAL */
|
||||||
|
"LOADING": "Ładowanie …",
|
||||||
|
|
||||||
|
/* CALENDAR */
|
||||||
|
"TODAY": "Dziś",
|
||||||
|
"TOMORROW": "Jutro",
|
||||||
|
"RUNNING": "Koniec za",
|
||||||
|
"EMPTY": "Brak wydarzeń.",
|
||||||
|
|
||||||
|
/* WEATHER */
|
||||||
|
"N": "N",
|
||||||
|
"NNE": "NNE",
|
||||||
|
"NE": "NE",
|
||||||
|
"ENE": "ENE",
|
||||||
|
"E": "E",
|
||||||
|
"ESE": "ESE",
|
||||||
|
"SE": "SE",
|
||||||
|
"SSE": "SSE",
|
||||||
|
"S": "S",
|
||||||
|
"SSW": "SSW",
|
||||||
|
"SW": "SW",
|
||||||
|
"WSW": "WSW",
|
||||||
|
"W": "W",
|
||||||
|
"WNW": "WNW",
|
||||||
|
"NW": "NW",
|
||||||
|
"NNW": "NNW"
|
||||||
|
}
|
28
translations/pt.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
/* GENERAL */
|
||||||
|
"LOADING": "A carregar …",
|
||||||
|
|
||||||
|
/* CALENDAR */
|
||||||
|
"TODAY": "Hoje",
|
||||||
|
"TOMORROW": "Amanhã",
|
||||||
|
"RUNNING": "Termina em",
|
||||||
|
"EMPTY": "Sem eventos a chegar.",
|
||||||
|
|
||||||
|
/* WEATHER */
|
||||||
|
"N": "N",
|
||||||
|
"NNE": "NNE",
|
||||||
|
"NE": "NE",
|
||||||
|
"ENE": "ENE",
|
||||||
|
"E": "E",
|
||||||
|
"ESE": "ESE",
|
||||||
|
"SE": "SE",
|
||||||
|
"SSE": "SSE",
|
||||||
|
"S": "S",
|
||||||
|
"SSW": "SSO",
|
||||||
|
"SW": "SO",
|
||||||
|
"WSW": "OSO",
|
||||||
|
"W": "O",
|
||||||
|
"WNW": "ONO",
|
||||||
|
"NW": "NO",
|
||||||
|
"NNW": "NNO"
|
||||||
|
}
|
28
translations/sv.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
/* GENERAL */
|
||||||
|
"LOADING": "Laddar …",
|
||||||
|
|
||||||
|
/* CALENDAR */
|
||||||
|
"TODAY": "Idag",
|
||||||
|
"TOMORROW": "Imorgon",
|
||||||
|
"RUNNING": "Slutar",
|
||||||
|
"EMPTY": "Inga kommande händelser.",
|
||||||
|
|
||||||
|
/* WEATHER */
|
||||||
|
"N": "N",
|
||||||
|
"NNE": "NNO",
|
||||||
|
"NE": "NO",
|
||||||
|
"ENE": "ONO",
|
||||||
|
"E": "Ö",
|
||||||
|
"ESE": "OSO",
|
||||||
|
"SE": "SO",
|
||||||
|
"SSE": "SSO",
|
||||||
|
"S": "S",
|
||||||
|
"SSW": "SSV",
|
||||||
|
"SW": "SV",
|
||||||
|
"WSW": "VSV",
|
||||||
|
"W": "V",
|
||||||
|
"WNW": "VNV",
|
||||||
|
"NW": "NV",
|
||||||
|
"NNW": "NNV"
|
||||||
|
}
|
@@ -6,10 +6,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
var translations = {
|
var translations = {
|
||||||
"en" : "translations/en.json",
|
"en" : "translations/en.json", // English
|
||||||
"nl" : "translations/nl.json",
|
"nl" : "translations/nl.json", // Dutch
|
||||||
"de" : "translations/de.json",
|
"de" : "translations/de.json", // German
|
||||||
"fr" : "translations/fr.json",
|
"fr" : "translations/fr.json", // French
|
||||||
"fy" : "translations/fy.json",
|
"fy" : "translations/fy.json", // Frysk
|
||||||
"es" : "translations/es.json",
|
"es" : "translations/es.json", // Spanish
|
||||||
|
"nb" : "translations/nb.json", // Norsk bokmål
|
||||||
|
"nn" : "translations/nn.json", // Norsk nynorsk
|
||||||
|
"pt" : "translations/pt.json", // Português
|
||||||
|
"sv" : "translations/sv.json", // Svenska
|
||||||
|
"it" : "translations/it.json", // Italian
|
||||||
|
"zh_cn" : "translations/zh_cn.json", // Simplified Chinese
|
||||||
|
"zh_tw" : "translations/zh_tw.json", // Traditional Chinese
|
||||||
|
"ja" : "translations/ja.json", // Japanese
|
||||||
|
"pl" : "translations/pl.json", // Polish
|
||||||
|
|
||||||
};
|
};
|
||||||
|
28
translations/zh_cn.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
/* GENERAL */
|
||||||
|
"LOADING": "正在加载 …",
|
||||||
|
|
||||||
|
/* CALENDAR */
|
||||||
|
"TODAY": "今天",
|
||||||
|
"TOMORROW": "明天",
|
||||||
|
"RUNNING": "结束日期",
|
||||||
|
"EMPTY": "没有更多的活动。",
|
||||||
|
|
||||||
|
/* WEATHER */
|
||||||
|
"N": "北风",
|
||||||
|
"NNE": "北偏东风",
|
||||||
|
"NE": "东北风",
|
||||||
|
"ENE": "东偏北风",
|
||||||
|
"E": "东风",
|
||||||
|
"ESE": "东偏南风",
|
||||||
|
"SE": "东南风",
|
||||||
|
"SSE": "南偏东风",
|
||||||
|
"S": "南风",
|
||||||
|
"SSW": "南偏西风",
|
||||||
|
"SW": "西南风",
|
||||||
|
"WSW": "西偏南风",
|
||||||
|
"W": "西风",
|
||||||
|
"WNW": "西偏北风",
|
||||||
|
"NW": "西北风",
|
||||||
|
"NNW": "北偏西风"
|
||||||
|
}
|
28
translations/zh_tw.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
/* GENERAL */
|
||||||
|
"LOADING": "正在加載 …",
|
||||||
|
|
||||||
|
/* CALENDAR */
|
||||||
|
"TODAY": "今天",
|
||||||
|
"TOMORROW": "明天",
|
||||||
|
"RUNNING": "結束日期",
|
||||||
|
"EMPTY": "沒有更多的活動。",
|
||||||
|
|
||||||
|
/* WEATHER */
|
||||||
|
"N": "北風",
|
||||||
|
"NNE": "北偏東風",
|
||||||
|
"NE": "東北風",
|
||||||
|
"ENE": "東偏北風",
|
||||||
|
"E": "東風",
|
||||||
|
"ESE": "東偏南風",
|
||||||
|
"SE": "東南風",
|
||||||
|
"SSE": "南偏東風",
|
||||||
|
"S": "南風",
|
||||||
|
"SSW": "南偏西風",
|
||||||
|
"SW": "西南風",
|
||||||
|
"WSW": "西偏南風",
|
||||||
|
"W": "西風",
|
||||||
|
"WNW": "西偏北風",
|
||||||
|
"NW": "西北風",
|
||||||
|
"NNW": "北偏西風"
|
||||||
|
}
|