You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
14 KiB
1 line
14 KiB
5 months ago
|
(function(c,f,h,k){var g=function(a,b){this.eve=a;this.defaults={width:230,height:400,color:"#1926dc",recommend:!1,title:"\u6700\u8fd1\u4f7f\u7528"};this.options=c.extend({},this.defaults,b);console.log(this.options)};g.prototype={init:function(){this.getPosition();this.initDefaultColor();this.latelyColor();this.createHtml();this.on()},createHtml:function(){var a=this.options,b=a.bg.r+","+a.bg.g+","+a.bg.b,d="";c.each(a.lately,function(a,b){if(9<a)return!1;d+='\x3cdiv style\x3d"width: 20px;height: 20px;margin:5px 11px;float: left;box-shadow: 0 0 5px #ccc;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg\x3d\x3d)"\x3e\x3cdiv style\x3d"width: 100%px;height: 100%;background: rgba('+b+');" class\x3d"paigusu-lately" data-color\x3d"'+b+'"\x3e\x3c/div\x3e\x3c/div\x3e'});a=['\x3cdiv style\x3d"position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 9999;" id\x3d"paigusu-screen"\x3e','\x3cdiv style\x3d"width: '+a.width+"px;height: "+a.height+"px;background: #fff;position: absolute;top: "+a.positionTop+"px;left: "+a.positionLeft+'px;border-radius: 6px 6px 0 0;box-shadow: 0 0 10px #ddd;z-index:99999;" id\x3d"paigusu-color-picker"\x3e','\x3cdiv style\x3d"width:100%;height: 150px;background: rgb('+b+');position: absolute;border-radius: 6px 6px 0 0 ;overflow: hidden;" id\x3d"color-block"\x3e','\x3cdiv style\x3d"width:100%;height:100%;background: linear-gradient(to right, #fff, rgba(255,255,255,0));position: absolute;"\x3e\x3cdiv style\x3d"width: 100%;height: 100%;background: linear-gradient(to top, #000, rgba(0,0,0,0));position: absolute;"\x3e','\x3cdiv style\x3d"width: 12px;height: 12px;border-radius: 6px;box-shadow: inset 0 0 0 1px #fff;position: absolute;top: '+a.ident.top+"px;left: "+a.ident.left+'px; z-index:1;" id\x3d"block-ident"\x3e\x3c/div\x3e','\x3cdiv style\x3d"width:100%;height:100%;position:absolute;top:0;left:0;right:0;bottom:0;z-index:2;" id\x3d"paigusu-palette"\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv style\x3d"width: 100%;height:100px;position: absolute;top: 150px;box-shadow: 0 2px 10px #ccc;padding: 10px 20px;box-sizing: border-box;"\x3e\x3cdiv style\x3d"width:16px;height:16px;border-radius: 8px;background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg\x3d\x3d);box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); float: left;margin-top: 5px;"\x3e','\x3cdiv style\x3d"width:16px;height:16px;border-radius: 8px;background: rgba('+a.color.r+","+a.color.g+","+a.color.b+');" id\x3d"final-color"\x3e\x3c/div\x3e','\x3c/div\x3e\x3cdiv style\x3d"width:160px;height: 10px;background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);float: right;position:relative;margin-bottom: 10px;"\x3e','\x3cdiv style\x3d"width:10px;height: 10px;background-color: #fff;border-radius: 5px;box-shadow: 0 0 2px #ccc;position: absolute;left:'+(a.colorSlider-5)+'px; z-index:1;" id\x3d"paigusu-slider-btn"\x3e\x3c/div\x3e','\x3cdiv style\x3d"width:100%;height:100%;position: absolute;left:0;top:0;right:0;bottom:0;z-index:2;" id\x3d"paigusu-slider"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv style\x3d"width:160px;height: 10px;float: right;background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg\x3d\x3d);position: relative;"\x3e','\x3cdiv style\x3d"width: 100%;height: 10px;background:linear-gradient(to right, rgba('+b+", 0) 0%, rgba("+b+', 1) 100%);position: relative;" id\x3d"paigusu-alpha-block"\x3e','\x3cdiv style\x3d"width:10px;height: 10px;background-color: #fff;border-radius: 5px;box-shadow: 0 0 2px #ccc;position: absolute;right:-5px;z-index:1;" id\x3d"paigusu-alpha-btn"\x3e\x3c/div\x3e\x3cdiv style\x3d"width:100%;height:100%;position: absolute;left:0;top:0;right:0;bottom:0;z-index:2;" id\x3d"paigusu-alpha"\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv style\x3d"width: 100%;height:45px;clear: both;padding-top: 10px;"\x
|