|
|
|
@ -12,6 +12,7 @@
|
|
|
|
|
templateName: 'identicon-svg',
|
|
|
|
|
initialize: function(options) {
|
|
|
|
|
this.render_attributes = options;
|
|
|
|
|
this.render_attributes.color = COLORS[this.render_attributes.color];
|
|
|
|
|
},
|
|
|
|
|
getSVGUrl: function() {
|
|
|
|
|
var html = this.render().$el.html();
|
|
|
|
@ -36,4 +37,23 @@
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var COLORS = {
|
|
|
|
|
red : '#EF5350',
|
|
|
|
|
pink : '#EC407A',
|
|
|
|
|
purple : '#AB47BC',
|
|
|
|
|
deep_purple : '#7E57C2',
|
|
|
|
|
indigo : '#5C6BC0',
|
|
|
|
|
blue : '#2196F3',
|
|
|
|
|
light_blue : '#03A9F4',
|
|
|
|
|
cyan : '#00BCD4',
|
|
|
|
|
teal : '#009688',
|
|
|
|
|
green : '#4CAF50',
|
|
|
|
|
light_green : '#7CB342',
|
|
|
|
|
orange : '#FF9800',
|
|
|
|
|
deep_orange : '#FF5722',
|
|
|
|
|
amber : '#FFB300',
|
|
|
|
|
blue_grey : '#607D8B'
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
})();
|
|
|
|
|