mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 21:00:57 +00:00
Merge pull request #1405 from ubertao/multi-line-compliments
Multi-line compliments
This commit is contained in:
@@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
*This release is scheduled to be released on 2018-10-01.*
|
*This release is scheduled to be released on 2018-10-01.*
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
- Support multi-line compliments
|
||||||
- Simplified Chinese translation for "Feels"
|
- Simplified Chinese translation for "Feels"
|
||||||
- Polish translate for "Feels"
|
- Polish translate for "Feels"
|
||||||
- French translate for "Feels"
|
- French translate for "Feels"
|
||||||
|
@@ -128,6 +128,10 @@ sup {
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pre-line {
|
||||||
|
white-space: pre-line;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Region Definitions.
|
* Region Definitions.
|
||||||
*/
|
*/
|
||||||
|
@@ -107,6 +107,13 @@ config: {
|
|||||||
}
|
}
|
||||||
````
|
````
|
||||||
|
|
||||||
|
#### Multi-line compliments:
|
||||||
|
Use `\n` to split compliment text into multiple lines, e.g. `First line.\nSecond line.` will be shown as:
|
||||||
|
```
|
||||||
|
First line.
|
||||||
|
Second line.
|
||||||
|
```
|
||||||
|
|
||||||
### External Compliment File
|
### External Compliment File
|
||||||
You may specify an external file that contains the three compliment arrays. This is particularly useful if you have a
|
You may specify an external file that contains the three compliment arrays. This is particularly useful if you have a
|
||||||
large number of compliments and do not wish to crowd your `config.js` file with a large array of compliments.
|
large number of compliments and do not wish to crowd your `config.js` file with a large array of compliments.
|
||||||
|
@@ -159,7 +159,7 @@ Module.register("compliments", {
|
|||||||
|
|
||||||
var compliment = document.createTextNode(complimentText);
|
var compliment = document.createTextNode(complimentText);
|
||||||
var wrapper = document.createElement("div");
|
var wrapper = document.createElement("div");
|
||||||
wrapper.className = this.config.classes ? this.config.classes : "thin xlarge bright";
|
wrapper.className = this.config.classes ? this.config.classes : "thin xlarge bright pre-line";
|
||||||
wrapper.appendChild(compliment);
|
wrapper.appendChild(compliment);
|
||||||
|
|
||||||
return wrapper;
|
return wrapper;
|
||||||
|
Reference in New Issue
Block a user