Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/s-a/theme-roller-js
https://github.com/s-a/theme-roller-js
Last synced: about 5 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/s-a/theme-roller-js
- Owner: s-a
- Created: 2013-10-08T16:38:21.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-10-08T17:49:01.000Z (about 11 years ago)
- Last Synced: 2024-04-14T22:49:11.545Z (7 months ago)
- Language: JavaScript
- Size: 125 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
theme-roller-js
====================This JavaScript library is used by the [deep-js](https://github.com/s-a/deep-js) [Theme Roller package](https://github.com/s-a/deep-js-theme-roller).
[Online demo](http://app.deep-js.com/#theme-roller/index)
### Html skeleton
```html.style-selector-item:hover{
background-color: #333;
color: ghostwhite!important;
}#sheet-colors{
position: fixed;
right: 0;
top: 43px;
z-index: 3000;
border: solid 11px #333;
border-radius: 11px;
background-color: white;
}.style-selector-item{
border-bottom: solid 1px #333;
padding: 3px;
}
#sheet-colors-header{
width: 100%;
}#sheet-colors-content{
overflow: auto;
max-height: 300px;
}#sheet-colors-header, #sheet-colors-content{
padding: 6px;
}
.theme-roller-style-container{
text-overflow: ellipsis;
width: inherit;
white-space: nowrap;
overflow: hidden;
font-size: 80%;
}
{{_ "Sorry"}}!
{{_ "The Theme Roller is not good to handle on small devices."}}
```### JavaScript sample
```javascript
ThemeRoller.init($("#sheet-colors")), {
"translate" : Deep.translate, // optional - custom translation method.
"error": function(userValue) { // optional custom error method.
Deep.Web.UI.msg({type: "error", msg: Deep.translate("invalid__color__value", userValue )});
}
});
Deep.on("sa.theme-roller.index.render", function(){
var watchElements = $("body").find("*:not(#sheet-colors):not(#sheet-colors *)");
ThemeRoller.listen(watchElements);
});
```MIT and GPL licensed