Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/s-a/theme-roller-js


https://github.com/s-a/theme-roller-js

Last synced: about 5 hours ago
JSON representation

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."}}




Roller




{{_ "intro__text__a"}}

{{_ "intro__text__b"}}
{{_ "intro__text__c"}}


```

### 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