This commit is contained in:
Mahdi Dibaiee 2014-11-06 13:28:24 +03:30
parent 709ce388cc
commit 56d7bc93ff
93 changed files with 914 additions and 260 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
*.swp *.swp
*.swo *.swo
*~ *~
*.zip
node_modules node_modules

View File

@ -1,136 +0,0 @@
$(document).ready(function() {
$(document).on('resume', function() {
sizeAndPos();
})
document.addEventListener('deviceready', function() {
sizeAndPos();
$('*').off('click mousemove mousedown mouseup mouseleave').on('click mousemove mousedown mouseup mouseleave', function(e) {
e.preventDefault;
})
/*$('a[href^="http"]').tap(function(e) {
e.preventDefault();
var href = $(this).attr('href');
var view = new MozActivity({
name: 'view',
data: {
type: 'url',
url: href
}
})
return false;
}).click(function(e) {
e.preventDefault();
return false;
})*/
/*$('a[href^="mailto"]').tap(function(e) {
e.preventDefault();
var mail = new MozActivity({
name: 'new',
data: {
type: 'mail',
url: $(this).attr('href')
}
})
return false;
}).click(function(e) {
e.preventDefault();
return false;
})*/
window.save = function() {
var f = c.getImageData(0, 0, width(), height());
switch(save.background) {
case 'white': {
c.fillStyle = 'white';
c.globalCompositeOperation = 'destination-over';
c.fillRect(0, 0, width(), height());
c.fillStyle = settings.color;
c.globalCompositeOperation = settings.composite;
break;
}
case 'current color': {
c.fillStyle = settings.bg;
c.globalCompositeOperation = 'destination-over';
c.fillRect(0, 0, width(), height());
c.globalCompositeOperation = settings.composite;
break;
}
}
var data = $c[0].toDataURL();
if( save.type == 'sketchy project' ) {
var list = JSON.parse(localStorage.getItem('projects'));
var index;
if( list && list.some(function(a, i) { if( a.name == save['file name'] ) {index = i; return true} return false }) ) {
if( confirm('A sketch with this name already exists. Do you want to overwrite ' + save['file name'] + '?') ) {
console.log(index);
list[index] = {
name: save['file name'],
data: data,
points: window.points,
settings: settings
}
localStorage.setItem('projects', JSON.stringify(list));
}
}
else {
list ? list.push({
name: save['file name'],
data: data,
points: window.points,
settings: settings
}) : list = [{
name: save['file name'],
data: data,
points: window.points,
settings: settings
}];
localStorage.setItem('projects', JSON.stringify(list));
}
} else {
var img = dataToBlob(data);
var sd = window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fs) {
window.alert('SD');
/*var req = fs.root.getFile(save['file name'] + '.png', {create: true}, function(entry) {
alert('Entry');
entry.createWriter(function(writer) {
writer.write(img);
alert('Your Sketch was saved successfuly');
}, function() {
alert('Something bad happened trying to save your sketch ' + save['file name'] + '\n Possible reasons:\n Duplicate Name \n Not enough permission')
})
})*/
}, function(e) {
alert('SD Error')
//alert('Couldn\'t access filesystem\nERR: ' + e.code);
});
}
c.putImageData(f, 0, 0);
}
window.load = function() {
var file = JSON.parse(localStorage.getItem('projects')).filter(function(a) { return a.name == load.file })[0];
var img = document.createElement('img');
img.src = file.data;
img.onload = function() {
c.clearRect(0, 0, width(), height());
c.drawImage(img, 0, 0);
window.points = file.points;
window.points.history = [{ data: c.createImageData($c.width(), $c.height()), points: []}, { data: c.getImageData(0, 0, width(), height()), points: file.points}];
$c.first().css('background', file.settings.bg);
window.settings.bg = file.settings.bg;
}
}
if( !localStorage.getItem('sawVote') ) {
$('.vote').removeClass('hidden');
localStorage.setItem('sawVote', true);
}
}, false)
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -21,13 +21,6 @@ module.exports = function(grunt) {
dest: 'build/web/js', dest: 'build/web/js',
filter: 'isFile' filter: 'isFile'
}, },
{
expand: true,
cwd: 'Shared/js',
src: '**',
dest: 'build/android/js',
filter: 'isFile'
},
{ {
expand: true, expand: true,
cwd: 'Mobile/js/', cwd: 'Mobile/js/',
@ -35,13 +28,6 @@ module.exports = function(grunt) {
dest: 'build/mobile/js', dest: 'build/mobile/js',
filter: 'isFile' filter: 'isFile'
}, },
{
expand: true,
cwd: 'Android/js/',
src: '*',
dest: 'build/android/js',
filter: 'isFile'
},
{ {
expand: true, expand: true,
cwd: 'Web/js/', cwd: 'Web/js/',
@ -56,7 +42,6 @@ module.exports = function(grunt) {
production: { production: {
files: { files: {
'build/mobile/css/main.css': 'Shared/css/main.less', 'build/mobile/css/main.css': 'Shared/css/main.less',
'build/android/css/main.css': 'Shared/css/main.less',
'build/web/css/main.css': 'Shared/css/main.less' 'build/web/css/main.css': 'Shared/css/main.less'
}, },
compress: true compress: true
@ -83,12 +68,6 @@ module.exports = function(grunt) {
src: ['index.html', 'manifest.webapp'], src: ['index.html', 'manifest.webapp'],
dest: 'build/mobile' dest: 'build/mobile'
}, },
{
expand: true,
cwd: 'Android',
src: ['index.html', 'config.xml', 'AndroidManifest.xml', 'res/**', 'icon.png'],
dest: 'build/android'
},
{ {
expand: true, expand: true,
cwd: 'Web', cwd: 'Web',
@ -105,12 +84,6 @@ module.exports = function(grunt) {
src: '*/**', src: '*/**',
dest: 'build/mobile/css' dest: 'build/mobile/css'
}, },
{
expand: true,
cwd: 'Shared/css',
src: '*/**',
dest: 'build/android/css'
},
{ {
expand: true, expand: true,
cwd: 'Shared/css', cwd: 'Shared/css',

View File

@ -4,6 +4,7 @@
<head> <head>
<title>Sketchy</title> <title>Sketchy</title>
<meta charset='UTF-8'> <meta charset='UTF-8'>
<meta name="viewport" content="width=device-width user-scalable=no initial-scale=1">
<link rel='stylesheet' href='css/main.css'> <link rel='stylesheet' href='css/main.css'>
</head> </head>
@ -238,19 +239,6 @@
<button class='close'>x</button> <button class='close'>x</button>
</div> </div>
<div class='vote overlay hidden'>
<p>King of Firefox OS Apps</p>
<span>Hey! FirefoxOSGuide.com has started a competition, judging the best Firefox OS application by users' vote.</span><br /><span>Would you consider taking a few minutes to vote for us, please?</span><br /><br />
<span>We're working to add new features to Sketchy like sharing and maybe some 'hosted' addons.</span><br /><br />
<span>If you would like to see something in Sketchy's new version, please get in touch with us.</span>
<br /><br />
<a href='http://bit.ly/1irTueS'>What's your Favorite Firefox OS application?</a>
<br />
<a href='http://bit.ly/1hosWbM'>Original post on Firefox OS Guide</a>
<button class='button'>OK!</button>
<button class='close'>x</button>
</div>
<!-- PRELOADER --> <!-- PRELOADER -->
<div class='hidden'> <div class='hidden'>
<img src='css/value_selector/images/ui/pattern.png'> <img src='css/value_selector/images/ui/pattern.png'>

View File

@ -111,9 +111,4 @@ $(document).ready(function() {
} }
} }
if( !localStorage.getItem('sawVote') ) {
$('.vote').removeClass('hidden');
localStorage.setItem('sawVote', true);
}
}) })

View File

@ -1,7 +1,7 @@
{ {
"name": "Sketchy", "name": "Sketchy",
"description": "Free full-featured Sketch app", "description": "Free full-featured Sketch app",
"version": "1.2.1", "version": "1.2.2",
"fullscreen": "true", "fullscreen": "true",
"type": "privileged", "type": "privileged",
"launch_path": "/index.html", "launch_path": "/index.html",
@ -37,6 +37,9 @@
"device-storage:pictures": { "device-storage:pictures": {
"description": "Required to save sketches", "description": "Required to save sketches",
"access": "readwrite" "access": "readwrite"
},
"video-capture": {
"description": "Test"
} }
} }
} }

View File

@ -84,47 +84,20 @@ $(document).ready(function() {
window.load = load; window.load = load;
window.save = save; window.save = save;
// TODO: Check for Update // Unity WebApp
alert(typeof external.getUnityObject);
if(external.getUnityObject) {
window.Unity = external.getUnityObject(1.0);
/*var request = navigator.mozApps.getInstalled(); function unityReady() {
request.onsuccess = function() { console.log('Ready');
var app = this.result[0]; Unity.Notification.showNotification('Salam', 'Chetori!');
var latest = $.ajax({url:'manifest-web.webapp'});
var selfApp = navigator.mozApps.getSelf();
selfApp.onsuccess = function() {
if(this.result) {
latest.onload = function() {
if( this.response ) {
var lapp = JSON.parse(this.response);
alert(lapp.version);
alert(app.manifest.version);
if( lapp.version != app.manifest.version &&
confirm('A new version of this app is available, do you want to update?')) {
var ins = navigator.mozApps.install();
ins.onsuccess = function() {
alert('The app was installed successfuly');
}
ins.onerror = function() {
alert('There was an error installing app - ' + this.error.name)
}
}
}
}
}
}
if( !app && confirm('Do you want to Install this app?') ) {
var ins = navigator.mozApps.install('http://mdibaiee.github.io/Sketchy/Web/manifest-web.webapp');
ins.onsuccess = function() {
alert('The app was installed successfuly');
}
ins.onerror = function() {
alert('There was an error installing app')
console.log(this.error);
}
} }
Unity.init({
name: 'Sketchy',
iconUrl: 'file:///home/mahdi/Documents/Workshop/Sketchy/build/web/img/icons/icon60.png',
onInit: unityReady
})
} }
request.onerror = function() {
alert('An error occured while trying to check for updates');
}*/
}) })

View File

@ -4,6 +4,7 @@
<head> <head>
<title>Sketchy</title> <title>Sketchy</title>
<meta charset='UTF-8'> <meta charset='UTF-8'>
<meta name="viewport" content="width=device-width user-scalable=no initial-scale=1">
<link rel='stylesheet' href='css/main.css'> <link rel='stylesheet' href='css/main.css'>
</head> </head>
@ -238,19 +239,6 @@
<button class='close'>x</button> <button class='close'>x</button>
</div> </div>
<div class='vote overlay hidden'>
<p>King of Firefox OS Apps</p>
<span>Hey! FirefoxOSGuide.com has started a competition, judging the best Firefox OS application by users' vote.</span><br /><span>Would you consider taking a few minutes to vote for us, please?</span><br /><br />
<span>We're working to add new features to Sketchy like sharing and maybe some 'hosted' addons.</span><br /><br />
<span>If you would like to see something in Sketchy's new version, please get in touch with us.</span>
<br /><br />
<a href='http://bit.ly/1irTueS'>What's your Favorite Firefox OS application?</a>
<br />
<a href='http://bit.ly/1hosWbM'>Original post on Firefox OS Guide</a>
<button class='button'>OK!</button>
<button class='close'>x</button>
</div>
<!-- PRELOADER --> <!-- PRELOADER -->
<div class='hidden'> <div class='hidden'>
<img src='css/value_selector/images/ui/pattern.png'> <img src='css/value_selector/images/ui/pattern.png'>

View File

@ -1 +1 @@
$(document).ready(function(){$("*").off("click mousemove mousedown mouseup mouseleave").on("click mousemove mousedown mouseup mouseleave",function(a){a.preventDefault}),$('a[href^="http"]').tap(function(a){a.preventDefault();{var b=$(this).attr("href");new MozActivity({name:"view",data:{type:"url",url:b}})}return!1}).click(function(a){return a.preventDefault(),!1}),$('a[href^="mailto"]').tap(function(a){a.preventDefault();new MozActivity({name:"new",data:{type:"mail",url:$(this).attr("href")}});return!1}).click(function(a){return a.preventDefault(),!1}),window.save=function(){var a=c.getImageData(0,0,width(),height());switch(save.background){case"white":c.fillStyle="white",c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.fillStyle=settings.color,c.globalCompositeOperation=settings.composite;break;case"current color":c.fillStyle=settings.bg,c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.globalCompositeOperation=settings.composite}var b=$c[0].toDataURL();if("sketchy project"==save.type){var d,e=JSON.parse(localStorage.getItem("projects"));e&&e.some(function(a,b){return a.name==save["file name"]?(d=b,!0):!1})?confirm("A sketch with this name already exists. Do you want to overwrite "+save["file name"]+"?")&&(console.log(d),e[d]={name:save["file name"],data:b,points:window.points,settings:settings},localStorage.setItem("projects",JSON.stringify(e))):(e?e.push({name:save["file name"],data:b,points:window.points,settings:settings}):e=[{name:save["file name"],data:b,points:window.points,settings:settings}],localStorage.setItem("projects",JSON.stringify(e)))}else{var f=navigator.getDeviceStorage("pictures"),g=dataToBlob(b),h=f.addNamed(g,save["file name"]+".png");h.onsuccess=function(){alert("Your Sketch was saved successfuly: "+this.result)},h.onerror=function(){alert("Something bad happened trying to save your sketch "+save["file name"]+"\n Possible reasons:\n Duplicate Name \n Not enough permission")}}c.putImageData(a,0,0)},window.load=function(){var a=JSON.parse(localStorage.getItem("projects")).filter(function(a){return a.name==load.file})[0],b=document.createElement("img");b.src=a.data,b.onload=function(){c.clearRect(0,0,width(),height()),c.drawImage(b,0,0),window.points=a.points,window.points.history=[{data:c.createImageData($c.width(),$c.height()),points:[]},{data:c.getImageData(0,0,width(),height()),points:a.points}],$c.first().css("background",a.settings.bg),window.settings.bg=a.settings.bg}},localStorage.getItem("sawVote")||($(".vote").removeClass("hidden"),localStorage.setItem("sawVote",!0))}); $(document).ready(function(){$("*").off("click mousemove mousedown mouseup mouseleave").on("click mousemove mousedown mouseup mouseleave",function(a){a.preventDefault}),$('a[href^="http"]').tap(function(a){a.preventDefault();{var b=$(this).attr("href");new MozActivity({name:"view",data:{type:"url",url:b}})}return!1}).click(function(a){return a.preventDefault(),!1}),$('a[href^="mailto"]').tap(function(a){a.preventDefault();new MozActivity({name:"new",data:{type:"mail",url:$(this).attr("href")}});return!1}).click(function(a){return a.preventDefault(),!1}),window.save=function(){var a=c.getImageData(0,0,width(),height());switch(save.background){case"white":c.fillStyle="white",c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.fillStyle=settings.color,c.globalCompositeOperation=settings.composite;break;case"current color":c.fillStyle=settings.bg,c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.globalCompositeOperation=settings.composite}var b=$c[0].toDataURL();if("sketchy project"==save.type){var d,e=JSON.parse(localStorage.getItem("projects"));e&&e.some(function(a,b){return a.name==save["file name"]?(d=b,!0):!1})?confirm("A sketch with this name already exists. Do you want to overwrite "+save["file name"]+"?")&&(console.log(d),e[d]={name:save["file name"],data:b,points:window.points,settings:settings},localStorage.setItem("projects",JSON.stringify(e))):(e?e.push({name:save["file name"],data:b,points:window.points,settings:settings}):e=[{name:save["file name"],data:b,points:window.points,settings:settings}],localStorage.setItem("projects",JSON.stringify(e)))}else{var f=navigator.getDeviceStorage("pictures"),g=dataToBlob(b),h=f.addNamed(g,save["file name"]+".png");h.onsuccess=function(){alert("Your Sketch was saved successfuly: "+this.result)},h.onerror=function(){alert("Something bad happened trying to save your sketch "+save["file name"]+"\n Possible reasons:\n Duplicate Name \n Not enough permission")}}c.putImageData(a,0,0)},window.load=function(){var a=JSON.parse(localStorage.getItem("projects")).filter(function(a){return a.name==load.file})[0],b=document.createElement("img");b.src=a.data,b.onload=function(){c.clearRect(0,0,width(),height()),c.drawImage(b,0,0),window.points=a.points,window.points.history=[{data:c.createImageData($c.width(),$c.height()),points:[]},{data:c.getImageData(0,0,width(),height()),points:a.points}],$c.first().css("background",a.settings.bg),window.settings.bg=a.settings.bg}}});

View File

@ -1,7 +1,7 @@
{ {
"name": "Sketchy", "name": "Sketchy",
"description": "Free full-featured Sketch app", "description": "Free full-featured Sketch app",
"version": "1.2.1", "version": "1.2.2",
"fullscreen": "true", "fullscreen": "true",
"type": "privileged", "type": "privileged",
"launch_path": "/index.html", "launch_path": "/index.html",
@ -37,6 +37,9 @@
"device-storage:pictures": { "device-storage:pictures": {
"description": "Required to save sketches", "description": "Required to save sketches",
"access": "readwrite" "access": "readwrite"
},
"video-capture": {
"description": "Test"
} }
} }
} }

View File

@ -1 +1 @@
"use strict";$(document).ready(function(){function a(){var b=c.getImageData(0,0,width(),height());switch(a.background){case"white":c.fillStyle="white",c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.fillStyle=settings.color,c.globalCompositeOperation=settings.composite;break;case"current color":c.fillStyle=settings.bg,c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.globalCompositeOperation=settings.composite}var d=$c[0].toDataURL();if("sketchy project"==a.type){var e,f=JSON.parse(localStorage.getItem("projects"));f&&f.some(function(b,c){return b.name==a["file name"]?(e=c,!0):!1})?confirm("A sketch with this name already exists. Do you want to overwrite "+a["file name"]+"?")&&(console.log(e),f[e]={name:a["file name"],data:d,points:window.points,settings:settings},localStorage.setItem("projects",JSON.stringify(f))):f?f.push({name:a["file name"],data:d,points:window.points,settings:settings}):f=[{name:a["file name"],data:d,points:window.points,settings:settings}],localStorage.setItem("projects",JSON.stringify(f))}else $('<a href="'+d+'" download="'+a["file name"]+'.png"></a>').click();c.putImageData(b,0,0)}function b(){var a=JSON.parse(localStorage.getItem("projects")).filter(function(a){return a.name==b.file})[0],d=document.createElement("img");d.src=a.data,d.onload=function(){c.clearRect(0,0,width(),height()),c.drawImage(d,0,0),window.points=a.points,window.points.history=[{data:c.createImageData($c.width(),$c.height()),points:[]},{data:c.getImageData(0,0,width(),height()),points:a.points}],$c.first().css("background",a.settings.bg),window.settings.bg=a.settings.bg}}yepnope({test:window.mobile,yep:["js/mobile.js","js/libs/color-picker-touch.js"],nope:["js/libs/color-picker.js"]}),$(window).resize(sizeAndPos),window.load=b,window.save=a}); "use strict";$(document).ready(function(){function a(){var b=c.getImageData(0,0,width(),height());switch(a.background){case"white":c.fillStyle="white",c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.fillStyle=settings.color,c.globalCompositeOperation=settings.composite;break;case"current color":c.fillStyle=settings.bg,c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.globalCompositeOperation=settings.composite}var d=$c[0].toDataURL();if("sketchy project"==a.type){var e,f=JSON.parse(localStorage.getItem("projects"));f&&f.some(function(b,c){return b.name==a["file name"]?(e=c,!0):!1})?confirm("A sketch with this name already exists. Do you want to overwrite "+a["file name"]+"?")&&(console.log(e),f[e]={name:a["file name"],data:d,points:window.points,settings:settings},localStorage.setItem("projects",JSON.stringify(f))):f?f.push({name:a["file name"],data:d,points:window.points,settings:settings}):f=[{name:a["file name"],data:d,points:window.points,settings:settings}],localStorage.setItem("projects",JSON.stringify(f))}else $('<a href="'+d+'" download="'+a["file name"]+'.png"></a>').click();c.putImageData(b,0,0)}function b(){var a=JSON.parse(localStorage.getItem("projects")).filter(function(a){return a.name==b.file})[0],d=document.createElement("img");d.src=a.data,d.onload=function(){c.clearRect(0,0,width(),height()),c.drawImage(d,0,0),window.points=a.points,window.points.history=[{data:c.createImageData($c.width(),$c.height()),points:[]},{data:c.getImageData(0,0,width(),height()),points:a.points}],$c.first().css("background",a.settings.bg),window.settings.bg=a.settings.bg}}function d(){console.log("Ready"),Unity.Notification.showNotification("Salam","Chetori!")}yepnope({test:window.mobile,yep:["js/mobile.js","js/libs/color-picker-touch.js"],nope:["js/libs/color-picker.js"]}),$(window).resize(sizeAndPos),window.load=b,window.save=a,alert(typeof external.getUnityObject),external.getUnityObject&&(window.Unity=external.getUnityObject(1),Unity.init({name:"Sketchy",iconUrl:"file:///home/mahdi/Documents/Workshop/Sketchy/build/web/img/icons/icon60.png",onInit:d}))});

View File

@ -1,6 +0,0 @@
#!/bin/bash
grunt;
cp -R build/android/* ~/Documents/Workshop/Sketchy-Android/sketchy/www/
cd ~/Documents/Workshop/Sketchy-Android/sketchy
phonegap run android

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 B

BIN
out/css/imgs/clear.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
out/css/imgs/download.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
out/css/imgs/load.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 B

BIN
out/css/imgs/menu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

BIN
out/css/imgs/redo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
out/css/imgs/settings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
out/css/imgs/undo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

650
out/css/main.css Normal file
View File

@ -0,0 +1,650 @@
@font-face {
font-family: 'MozTT-Regular';
src: url('fonts/MozTT-Regular.ttf');
}
@font-face {
font-family: 'MozTT-Light';
src: url('fonts/MozTT-Light.ttf');
}
@font-face {
font-family: 'MozTT-Medium';
src: url('fonts/MozTT-Medium.ttf');
}
@font-face {
font-family: 'MozTT-Bold';
src: url('fonts/MozTT-Bold.ttf');
}
/* Purty Picker Copyright 2013 Jayden Seric (MIT license): https://github.com/jaydenseric/Purty-Picker */
/* Core: No touchy! */
.color-picker .spectrum {
position: relative;
/* To position pin, luminosity filter */
background: linear-gradient(#808080, transparent), linear-gradient(90deg, #ff0000, #ff2b00, #ff5500, #ff8000, #ffaa00, #ffd500, #ffff00, #d4ff00, #aaff00, #80ff00, #55ff00, #2bff00, #00ff00, #00ff2b, #00ff55, #00ff80, #00ffaa, #00ffd5, #00ffff, #00d4ff, #00aaff, #007fff, #0055ff, #002bff, #0000ff, #2a00ff, #5500ff, #7f00ff, #aa00ff, #d400ff, #ff00ff, #ff00d4, #ff00aa, #ff0080, #ff0055, #ff002b, #ff0000);
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
/* Prevent pin interaction causing content selection */
cursor: crosshair;
}
.color-picker .spectrum.active {
cursor: none;
}
.color-picker .spectrum.active .pin {
cursor: none;
}
.color-picker .spectrum > div {
/* Luminosity filter */
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.color-picker .spectrum .pin {
position: absolute;
cursor: move;
}
/* Customization: Default skin */
.color-picker {
margin: 20px;
padding: 11px;
border: 1px solid #e3e3e3;
border-radius: 4px;
background-color: #f5f5f5;
}
.color-picker .color,
.color-picker .luminosity {
-moz-box-sizing: border-box;
box-sizing: border-box;
display: block;
width: 100%;
}
.color-picker .format {
display: block;
margin: 0 auto 10px auto;
}
.color-picker .color {
-webkit-appearance: none;
border: 0;
border-radius: 2px;
padding: 10px;
text-align: center;
font-size: 11px;
letter-spacing: 1px;
font-family: Consolas, Monaco, 'Andale Mono', monospace;
color: rgba(0, 0, 0, 0.6);
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
transition: color 0.2s;
}
.color-picker .color.dark {
color: rgba(255, 255, 255, 0.7);
}
.color-picker .spectrum {
height: 150px;
/* Arbitary but required */
overflow: hidden;
/* Prevent pin overflowing container */
border-radius: 2px;
margin: 10px 0;
}
.color-picker .spectrum > div {
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}
.color-picker .spectrum .pin {
margin-left: -4px;
margin-top: -4px;
width: 4px;
height: 4px;
border: 2px solid white;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
border-radius: 100%;
}
.color-picker .luminosity {
margin: 0;
}
/* ----------------------------------
* Seekbars
* ---------------------------------- */
div[role="slider"] {
position: relative;
height: 3.5rem;
}
div[role="slider"] > div {
display: block;
padding: 0;
overflow-y: hidden;
position: relative;
height: 100%;
}
div[role="slider"] progress {
width: 100%;
background: #000;
border: none;
height: 0.1rem;
display: block;
border-radius: 0;
margin-top: 1.9rem;
}
div[role="slider"] progress::-moz-progress-bar {
background: #01c5ed;
height: 0.6rem;
margin-top: -0.3rem;
border-radius: 0;
}
div[role="slider"] > label {
font-size: 1.5rem;
line-height: 3.8rem;
font-family: sans-serif;
color: #00aacb;
float: right;
padding: 0 0 0 1rem;
height: 3.5rem;
width: auto;
}
div[role="slider"] label:first-of-type {
float: left;
padding: 0 1rem 0 0;
}
div[role="slider"] > label.icon {
width: 3rem;
height: 3rem;
margin-top: 0.5rem;
font-size: 0;
background: no-repeat right top / 3rem auto;
}
div[role="slider"] > label.icon:first-of-type {
background-position: top left;
}
div[role="slider"] button {
width: 3.2rem;
height: 3.2rem;
background: url(seekbars/images/ui/handler.png) no-repeat center center / 3rem auto;
font: 0/0 a;
position: absolute;
top: 50%;
left: 0;
margin: -1.5rem 0 0 -1.6rem;
border-radius: 3.2rem;
border: solid 0.1rem transparent;
transition: border 0.15s ease;
padding: 0;
z-index: 10;
}
div[role="slider"] button:active {
border: solid 0.5rem #01c5ed;
}
/* ----------------------------------
* Value selector (Single & Multiple)
* ---------------------------------- */
/* Main dialog setup */
form[role="dialog"][data-type="value-selector"] {
background: url(value_selector/images/ui/pattern.png) repeat left top, url(value_selector/images/ui/gradient.png) no-repeat left top / 100% 100%;
overflow: hidden;
position: absolute;
z-index: 100;
top: 0;
left: 0;
right: 0;
bottom: 0;
padding: 0 0 7rem;
color: #fff;
font-family: sans-serif;
}
form[role="dialog"][data-type="value-selector"] > section {
padding: 0 1.5rem 0;
-moz-box-sizing: padding-box;
width: 100%;
height: 100%;
overflow: auto;
}
form[role="dialog"][data-type="value-selector"] h1 {
font-weight: 400;
font-size: 1.9rem;
line-height: 4.8rem;
color: #fff;
border-bottom: 0.1rem solid #616262;
background: rgba(0, 0, 0, 0.2);
margin: 0 -1.5rem;
padding: 0 3rem 1rem;
height: 4.8rem;
-moz-box-sizing: border-box;
}
/* Specific component code */
form[role="dialog"][data-type="value-selector"] [role="listbox"] {
position: relative;
padding: 0;
margin: 0 -1.5rem;
max-height: calc(95%);
overflow: auto;
border-top: solid 0.1rem #222323;
}
form[role="dialog"][data-type="value-selector"] .scrollable:before {
content: "";
display: block;
position: absolute;
pointer-events: none;
top: 4.8rem;
left: 0;
right: 0;
bottom: 6.9rem;
background: url(value_selector/images/ui/shadow.png) repeat-x left top, url(value_selector/images/ui/shadow-invert.png) repeat-x left bottom;
}
form[role="dialog"][data-type="value-selector"] [role="listbox"] li {
margin: 0;
padding: 0 1.5rem;
height: auto;
list-style: none;
position: relative;
font-weight: lighter;
font-size: 2.2rem;
line-height: 3.9rem;
color: #fff;
transition: background-color 0.2s ease;
}
form[role="dialog"][data-type="value-selector"] [role="listbox"] li:first-child label {
border-top-color: transparent;
}
form[role="dialog"][data-type="value-selector"] [role="listbox"] li label {
outline: none;
display: block;
color: #fff;
border-top: 0.1rem solid #666;
border-bottom: 0.1rem solid #000;
}
form[role="dialog"][data-type="value-selector"] [role="listbox"] li:last-child label {
border-bottom-color: transparent;
}
form[role="dialog"][data-type="value-selector"] [role="listbox"] li label span {
display: block;
padding: 1rem 1.5rem;
line-height: 4rem;
word-wrap: break-word;
}
/* Pressed status */
form[role="dialog"][data-type="value-selector"] [role="listbox"] li:active {
background-color: #00ABCC;
}
form[role="dialog"][data-type="value-selector"] [role="listbox"] li:active label {
border-color: transparent;
}
form[role="dialog"][data-type="value-selector"] [role="listbox"] li:active + li label {
border-top-color: #000;
}
form[role="dialog"][data-type="value-selector"] [role="listbox"] li:active label span {
color: #fff !important;
background-image: none;
}
/* Checked status */
form[role="dialog"][data-type="value-selector"] [role="listbox"] li[aria-selected="true"]:not([data-input]) span {
padding-right: 2.6rem;
margin-right: 1.2rem;
color: #00abcd;
background: transparent url(value_selector/images/icons/checked.png) no-repeat 100% 50%;
background-size: 2rem;
}
/* Menu & buttons setup */
form[role="dialog"][data-type="value-selector"] menu {
white-space: nowrap;
margin: 0;
padding: 1.5rem;
border-top: solid 0.1rem rgba(255, 255, 255, 0.1);
background: #2d2d2d url(value_selector/images/ui/pattern.png) repeat left top;
display: block;
overflow: hidden;
position: absolute;
left: 0;
right: 0;
bottom: 0;
}
form[role="dialog"][data-type="value-selector"] menu button::-moz-focus-inner {
border: none;
outline: none;
}
form[role="dialog"][data-type="value-selector"] menu button,
.button {
width: calc(49.5%);
height: 3.8rem;
margin: 0 0 1rem;
padding: 0 1.5rem;
-moz-box-sizing: border-box;
display: inline-block;
vertical-align: middle;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
background: #fafafa url(value_selector/images/ui/default.png) repeat-x left bottom / auto 100%;
border: 0.1rem solid #a6a6a6;
border-radius: 0.3rem;
font-weight: 500;
font-size: 1.6rem;
line-height: 3.8rem;
color: #333;
text-align: center;
text-shadow: 0.1rem 0.1rem 0 rgba(255, 255, 255, 0.3);
text-decoration: none;
outline: none;
}
/* Press (default & affirmative) */
form[role="dialog"][data-type="value-selector"] menu button:active,
form[role="dialog"][data-type="value-selector"] menu button.affirmative:active,
.button:active {
border-color: #008aaa;
background: #008aaa;
color: #333;
}
/* affirmative */
form[role="dialog"][data-type="value-selector"] menu button.affirmative,
.button.affirmative {
background-image: url(value_selector/images/ui/affirmative.png);
background-color: #00caf2;
border-color: #008eab;
}
form[role="dialog"][data-type="value-selector"] menu button:last-child {
margin-left: 1rem;
}
form[role="dialog"][data-type="value-selector"] menu button,
form[role="dialog"][data-type="value-selector"] menu button:first-child {
margin: 0;
}
form[role="dialog"][data-type="value-selector"] menu button.full,
.button.full {
width: 100%;
}
/* Right to left tweaks */
html[dir="rtl"] #value-selector li input:checked + span,
html[dir="rtl"] #value-selector li[aria-selected="true"] span {
padding-left: 2.6rem;
margin-left: 1.2rem;
}
html,
body {
margin: 0;
font-size: 10px;
overflow: hidden;
width: 100%;
height: 100%;
position: absolute;
}
*::-moz-focus-inner {
border: none;
}
*:focus {
outline: none;
}
.hidden {
display: none !important;
visibility: none !important;
}
div#container {
position: absolute;
}
canvas {
position: absolute;
top: 0;
left: 0;
}
canvas:first-of-type {
background: white;
}
.separator {
display: block;
height: 4.8rem;
width: 0.1rem;
}
.separator.long {
background: url('imgs/div_line_lg_black.png');
}
.separator.small {
background: url('imgs/div_line_sm_black.png');
}
.separator.left {
float: left;
}
.separator.right {
float: right;
}
.separator.menu {
position: relative;
left: -3rem;
}
.overlay {
z-index: 9999;
position: absolute;
left: 0;
top: 5.3rem;
}
button {
-moz-appearance: none;
z-index: 1;
position: relative;
border: none;
}
.close {
display: block;
width: 2rem;
height: 2rem;
padding: 0 0 0.2rem 0.2rem;
font-size: 10pt;
border: 1px solid #e3e3e3;
border-radius: 50%;
position: absolute;
text-align: center;
top: -2%;
left: 97%;
}
.picker,
.about,
.tour,
.vote {
font-family: 'MozTT-Light';
width: 30rem;
height: 24.6rem;
position: absolute;
left: 50%;
top: 50%;
margin-top: -12.3rem;
margin-left: -15rem;
}
.picker .color-picker,
.about .color-picker,
.tour .color-picker,
.vote .color-picker {
margin: 0;
}
.about,
.tour,
.vote {
background: #262626;
padding: 1rem 2rem;
height: 23rem;
margin-top: -11.5rem;
margin-left: -17rem;
border-radius: 0.2rem;
color: white;
box-shadow: 0 0 0.3rem black;
}
.about a,
.tour a,
.vote a,
.about a:link,
.tour a:link,
.vote a:link,
.about a:visited,
.tour a:visited,
.vote a:visited,
.about a:active,
.tour a:active,
.vote a:active {
color: white;
}
.about .close,
.tour .close,
.vote .close {
background: #262626;
color: white;
border: 1px solid gray;
}
.about p,
.tour p,
.vote p {
font-size: 11pt;
}
.about span,
.tour span,
.vote span {
font-size: 8pt;
}
.tour .button,
.vote .button {
width: 30rem;
position: absolute;
bottom: 1rem;
left: 1.8rem;
}
.vote {
height: 30rem;
}
header {
width: 100%;
height: 5.3rem;
background: url('imgs/header_bg_black.png');
}
header button {
width: 5rem;
height: 5rem;
}
header .menu {
background: url('imgs/menu.png') -12px center no-repeat;
float: left;
}
header .menu:active {
background: url('imgs/menu.png') -12px center no-repeat, url('imgs/bg_overlay_pressed_1.png') left no-repeat;
}
header .save {
background: url('imgs/download.png') center center no-repeat;
float: right;
}
header .save:active {
background: url('imgs/download.png') center center no-repeat, url('imgs/bg_overlay_pressed_2.png') center center;
}
header .load {
background: url('imgs/load.png') center center no-repeat;
float: right;
}
header .load:active {
background: url('imgs/load.png') center center no-repeat, url('imgs/bg_overlay_pressed_2.png') center center;
}
header #title {
color: white;
font-size: 11pt;
font-family: 'MozTT-Regular';
float: left;
margin: 1.5rem 0;
position: relative;
left: -2rem;
}
#menu {
width: 15.4rem;
height: 100%;
display: block;
background: #262626;
position: absolute;
left: -15.4rem;
top: 5rem;
color: white;
transition: left 0.3s ease-out;
border-collapse: collapse;
overflow: hidden;
}
#menu.pulled {
left: 0;
transition: left 0.3s ease-out;
}
#menu button[id^='set'],
#menu p,
#menu .bottom button {
background: none;
display: block;
width: 75%;
color: white;
text-align: left;
margin: 1rem 2.5rem;
font-family: 'MozTT-Light' !important;
font-size: 9pt;
padding: 0 0.6rem;
cursor: pointer;
}
#menu p {
width: 65%;
}
#menu span {
float: right;
font-size: 7pt;
padding-top: 0.3rem;
}
#menu div[role='slider'] {
width: 60%;
float: right;
margin: 0 2rem 0 0;
}
#menu div[role='slider'] div {
overflow: visible;
}
#menu div[role='slider'] div button {
margin-top: -3.4rem;
left: 0%;
}
#menu hr {
clear: both;
padding: 0.7rem 0;
margin-bottom: 0.7rem;
border: none;
border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}
#menu *[class^='icon'] {
display: block;
margin: 1rem 0.5rem;
font-family: 'MozTT-Regular' !important;
}
#menu *[class^='icon']:nth-of-type(2) {
padding-top: 0.5rem;
}
#menu *[class^='icon']:before {
content: '';
background-size: 2rem;
width: 2rem;
height: 2rem;
display: block;
float: left;
margin: -0.3rem 0.5rem 0 0;
}
#menu .icon-settings:before {
background-image: url('imgs/settings.png');
}
#menu .icon-clear:before {
background-image: url('imgs/clear.png');
}
#menu .icon-undo:before {
background-image: url('imgs/undo.png');
}
#menu .icon-redo:before {
background-image: url('imgs/redo.png');
}
#menu .options {
display: table-row;
vertical-align: top;
margin-top: 1rem;
width: 100%;
}
#menu .bottom {
width: 100%;
position: absolute;
bottom: 5rem;
}
#menu .bottom button[class^='icon'] {
margin-left: 3.5rem;
}
#menu .bottom button {
margin-left: 5rem;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 960 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 938 B

View File

@ -0,0 +1,79 @@
/* ----------------------------------
* Seekbars
* ---------------------------------- */
div[role="slider"] {
position: relative;
height: 3.5rem;
}
div[role="slider"] > div {
display: block;
overflow: hidden;
padding: 0;
position: relative;
height: 100%;
}
div[role="slider"] progress {
width: 100%;
background: #000;
border: none;
height: 0.1rem;
display: block;
border-radius: 0;
margin-top: 1.9rem;
}
div[role="slider"] progress::-moz-progress-bar {
background: #01c5ed;
height: 0.6rem;
margin-top: -0.3rem;
border-radius: 0;
}
div[role="slider"] > label {
font-size: 1.5rem;
line-height: 3.8rem;
font-family: sans-serif;
color: #00aacb;
float: right;
padding: 0 0 0 1rem;
height: 3.5rem;
width: auto;
}
div[role="slider"] label:first-of-type {
float: left;
padding: 0 1rem 0 0;
}
div[role="slider"] > label.icon {
width: 3rem;
height: 3rem;
margin-top: 0.5rem;
font-size: 0;
background: no-repeat right top / 3rem auto;
}
div[role="slider"] > label.icon:first-of-type {
background-position: top left;
}
div[role="slider"] button {
width: 3.2rem;
height: 3.2rem;
background: url(seekbars/images/ui/handler.png) no-repeat center center / 3rem auto;
font: 0/0 a;
position: absolute;
top: 50%;
left: 0;
margin: -1.5rem 0 0 -1.6rem;
border-radius: 3.2rem;
border: solid 0.1rem transparent;
transition: border 0.15s ease;
padding: 0;
}
div[role="slider"] button:active {
border: solid 0.5rem #01c5ed;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 583 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 946 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 583 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 946 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 578 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 889 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 755 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
out/img/icons/icon120.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

BIN
out/img/icons/icon128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

BIN
out/img/icons/icon16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

BIN
out/img/icons/icon2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

102
out/img/icons/icon2.svg Normal file
View File

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="60"
height="60"
id="svg3029"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="icon2.svg"
inkscape:export-filename="/home/mahdi/Documents/Workshop/Mobile Editor/img/icons/icon128.png"
inkscape:export-xdpi="192"
inkscape:export-ydpi="192">
<defs
id="defs3031" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="-103.49318"
inkscape:cy="83.371075"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="1600"
inkscape:window-height="876"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1" />
<metadata
id="metadata3034">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer"
transform="translate(0,12)">
<path
sodipodi:type="arc"
style="fill:#636363;fill-opacity:1;stroke:none"
id="path3037"
sodipodi:cx="31.428572"
sodipodi:cy="29.285715"
sodipodi:rx="26.428572"
sodipodi:ry="26.428572"
d="m 57.857143,29.285715 c 0,14.596097 -11.832474,26.428572 -26.428571,26.428572 C 16.832475,55.714287 5,43.881812 5,29.285715 5,14.689618 16.832475,2.8571434 31.428572,2.8571434 c 14.596097,0 26.428571,11.8324746 26.428571,26.4285716 z"
transform="matrix(1.0972973,0,0,1.0972973,-4.4864869,-14.135136)" />
<path
style="fill:#dedede;fill-opacity:1;stroke:#383838;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 40.415998,-0.2045792 c 0,0 -22.715805,23.0693572 -23.422911,25.0139012 -0.707107,1.944544 -2.740039,7.601398 -2.032932,8.485281 0.707106,0.883883 7.689786,-1.502602 9.015611,-2.828427 C 25.301591,29.140351 47.60072,6.06032 47.840618,4.833556 48.06427,3.68987 41.877086,-1.6684275 40.415998,-0.2045792 z"
id="path3054"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cssssc" />
<path
style="fill:#9e9e9e;fill-opacity:1;stroke:none"
d="m 44.875383,3.203193 c 0,0 -23.929105,24.058149 -24.015804,24.932991 -0.0867,0.874841 1.387194,2.71201 1.820692,2.187104 C 23.11377,29.798383 46.435977,5.9152018 46.522677,5.0403605 46.609378,4.1655182 45.222182,3.2906768 44.875383,3.203193 z"
id="path3841"
inkscape:connector-curvature="0" />
<path
style="fill:#c0c0c0;fill-opacity:1;stroke:none"
d="m 42.401427,1.6217284 c 0,0 -23.399153,24.3933116 -23.394823,24.6432736 0.0043,0.249963 1.094444,1.292086 1.650364,0.907398 0.55592,-0.384687 23.207727,-24.0757977 23.264805,-24.3893335 0.05708,-0.3135357 -1.2693,-1.1031781 -1.520346,-1.1613381 z"
id="path3861"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccssc" />
<path
style="fill:#494949;fill-opacity:1;stroke:none"
d="m 15.695313,42.429687 c 0,0 -0.515625,1.960938 -0.359375,2.539063 0.0078,0 0.141085,0.342965 2.430147,-0.344535 -0.01563,0.0078 -0.647057,-2.041553 -2.070772,-2.194528 z"
id="path3865"
inkscape:connector-curvature="0"
transform="translate(0,-12)"
sodipodi:nodetypes="cccc" />
<image
y="-11.715099"
x="0.21543235"
id="image3962"
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABHNCSVQICAgIfAhkiAAABwNJREFU aIHlm01MG+kZx3/vjIevNTEfNhvA3RqWbmirqKcGlMKlbZRL0kMPrSqUgIxCyIVISc45IUWRckmv vVXNIWqVNjRqN60qVZuqXdE0yiZebdRslV3YJSZmiw3YgzHD9PB6YuPYMLbHHqT+pUfGlud9n5+f 93nejxmEaZr8P0lx24F6y1ODNkWJz/cbSpVeV5acAhZ5ZuZZOSr8vtWeUkWbb0hUmcOWQwLYccqp In3kg1v9VNZYFcBq1okdwKi0kXr3WQmwADTkr7yN8xG1078n+5opt/9ygVUk7HbW3JQnaxnKiHY5 wB4kbBo5pA6CFKARCW0rAHbn4YasHSRYkL6kyfm3r+wAW43pHCxYSzu3bt3afPbsWfPc3Fzzfl/e b0hrQDOwwQGBFUJYRUvLvqqAEggExNmzZ72apsWuXbuWLHX9XhFWgbeAFAcAVgjRIIRoBToAH9CC HHkqIGKxGHNzc7qmaW/Pzs6WHN6lgAXQCmziYjUWUi1CiE4kZBO5hc4b9vz58535+fktRVF6rl69 WnSpWgq4Jfu66SiBTVmgQCfgJRtFO3b//v2tly9fehobG/3F2i4GbA3ldadB7EgI0YAEbaUM0Hy7 c+dOUlGUrps3b74xtIsB+5AVuV7LReB1VH3IHLVWUhXZ0tKSGYlENtPpdG9hP4XAVlUuWeVqISGE B/AjU6li0Hy7e/eurqpq2/Xr15vy+yoE9iFh61aVhRCNQAD5YzsCC4hkMkkkEkl5vd5dUVYK/vZS x9zNFiY/uV2Qo3bv3j0d8M/Pz6tWn/nAXmRVrkvu5lXhktNMtbaysmJGo9HMw4cPA1a/+cDWcK65 hBDNyMg6HtVCe/z4sa4oymGrbwtYIAtGzYGz004XNYxsvj148CCtqmr77du3FcidabUgt1g1LVZC CAV4G5mzdVEikWB1ddU0DKMd+MqK8FvUZ1UVQO5faz6U8y0ajW4h53fqBiyE8CLrRF1hAWVxcTGj adqhfOBmYKuGsAKZt67o1atXr4GtHG6khsDI6cfWiUQttLi4aGRH2C7gmmwDs4XKmm9d0fLysqko ShPkgDVqV6E7s+27plQqZS1hXwNb2zBHz5izuRvAxegCaJomFEXxQA7YJHfG66R8uJi7ltra2jxm 9vDOAt6hNsAduBxdgI6ODs0wjF3AGWTh0p3qJFusfMhUcVWHDx9uUFV1E3LAm8jFR9zBfqwjGtcV DAZbDMNYgxzwBjIaXzrYj48DAhwKhXymaX4OufyKI6cPJ9VKHXZDdqynp6dN1/Uo5CL8X6At+96p BYiXA1CwfD6f6vf7W6PR6Bewu0onkFu3qoe1EELD5cWGpRMnTnSaprk8MzOTgd3PeHwJfB1n8ti6 Q+C6jh071qPr+iPrfb5Ti0AvcnqqVg24sA0stK6ursa+vj5/Op1+Ugx4C1gC3nMAuKqDdKdsbGys d3t7+9Pz58+nigEDfAx8m+rzz/Xoer1ez9DQUH88Hv8g37HC57TiwDLwTeAJ1cnVHD537lzIMIyF 6enpL/I/L+bUQ+AouTuIlcjExaEcCoWaRkdH+3Rdv1voWDHgdeATYKQK4AwuDudLly4dTaVSH05O TsbsAAN8hFwaDlYInHYLNhwOv9Pb2+tJJpN/LOZYKWAD+BNwHHmHoFzpbsAODw+3nT59ejAej/9i amqq6FZ3r8KSAD4ATiGXibZlmqaB3IHVLW8HBgaar1y5ciyRSPw6HA6/LOXbfpX0U+AR8GPkUW45 WqsXbDAYbJqdnf1eKpV6f3x8/B97OWVn6ngC/Bv4KXDIPi+r9YAdHBxsuXHjxohpmn8/c+bM+/s5 Zfd56Q+RK7GfAb8FXtm4JkaN5+Ljx4/7Ll++PKTr+h/GxsZ+b+each4Qf4Q8KPgJ8ABZyUvKNM24 EGKT8lPBli5cuBA6derUe7FY7Ffj4+N/s3tdJY8PdwA/Qha1vyBztXjjQnwH+Ea5HeylI0eOtMzM zBwNBoPEYrGfT05OLpZzfaUPiKvAEPBdYB65OntjGhBCtAM/rKSDQvl8PnV6evrdkZGRd9fX1/+8 vr7+m1JTz16q9l8A2oDvA18D/pW1XSefQogfUMXxUXd3d8PExET/8PBwv2EYz1ZXV38ZDoeXKm2v WmBLXciIHwE+B54CL4C0EKKXMpepnZ2dnpMnT3aNjo6+EwqFOjc2Nj7a2Nj43cTExH+qddQpYEvN wLeQS9JeYAVYuHjx4sDTp0+VhYUFPRqNbiWTSUPTNNHR0aG1t7d7uru7m0KhkLevr+9Qf3+/PxAI eHVd/2xtbe2fuq7/dWpqKuGUg04D50sFgkAwEokMvHjx4qimaa2qqrYoitIAsLOzs2UYRiqTySQz mcxKOp1e0HX9k+3t7SeV5Kcd1RL4QOp/GtofUQrANYgAAAAASUVORK5CYII= "
height="60"
width="60" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
out/img/icons/icon32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
out/img/icons/icon64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
out/img/icons/icon90.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -4,10 +4,10 @@
<head> <head>
<title>Sketchy</title> <title>Sketchy</title>
<meta charset='UTF-8'> <meta charset='UTF-8'>
<meta name="viewport" content="width=device-width user-scalable=no initial-scale=1">
<link rel='stylesheet' href='css/main.css'> <link rel='stylesheet' href='css/main.css'>
<script src='cordova.js'></script>
</head> </head>
<body> <body>
<header> <header>
@ -239,19 +239,6 @@
<button class='close'>x</button> <button class='close'>x</button>
</div> </div>
<div class='vote overlay hidden'>
<p>King of Firefox OS Apps</p>
<span>Hey! FirefoxOSGuide.com has started a competition, judging the best Firefox OS application by users' vote.</span><br /><span>Would you consider taking a few minutes to vote for us, please?</span><br /><br />
<span>We're working to add new features to Sketchy like sharing and maybe some 'hosted' addons.</span><br /><br />
<span>If you would like to see something in Sketchy's new version, please get in touch with us.</span>
<br /><br />
<a href='http://bit.ly/1irTueS'>What's your Favorite Firefox OS application?</a>
<br />
<a href='http://bit.ly/1hosWbM'>Original post on Firefox OS Guide</a>
<button class='button'>OK!</button>
<button class='close'>x</button>
</div>
<!-- PRELOADER --> <!-- PRELOADER -->
<div class='hidden'> <div class='hidden'>
<img src='css/value_selector/images/ui/pattern.png'> <img src='css/value_selector/images/ui/pattern.png'>

1
out/js/diff.js Normal file
View File

@ -0,0 +1 @@
$(document).ready(function(){$("*").off("click mousemove mousedown mouseup mouseleave").on("click mousemove mousedown mouseup mouseleave",function(a){a.preventDefault}),$('a[href^="http"]').tap(function(a){a.preventDefault();{var b=$(this).attr("href");new MozActivity({name:"view",data:{type:"url",url:b}})}return!1}).click(function(a){return a.preventDefault(),!1}),$('a[href^="mailto"]').tap(function(a){a.preventDefault();new MozActivity({name:"new",data:{type:"mail",url:$(this).attr("href")}});return!1}).click(function(a){return a.preventDefault(),!1}),window.save=function(){var a=c.getImageData(0,0,width(),height());switch(save.background){case"white":c.fillStyle="white",c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.fillStyle=settings.color,c.globalCompositeOperation=settings.composite;break;case"current color":c.fillStyle=settings.bg,c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.globalCompositeOperation=settings.composite}var b=$c[0].toDataURL();if("sketchy project"==save.type){var d,e=JSON.parse(localStorage.getItem("projects"));e&&e.some(function(a,b){return a.name==save["file name"]?(d=b,!0):!1})?confirm("A sketch with this name already exists. Do you want to overwrite "+save["file name"]+"?")&&(console.log(d),e[d]={name:save["file name"],data:b,points:window.points,settings:settings},localStorage.setItem("projects",JSON.stringify(e))):(e?e.push({name:save["file name"],data:b,points:window.points,settings:settings}):e=[{name:save["file name"],data:b,points:window.points,settings:settings}],localStorage.setItem("projects",JSON.stringify(e)))}else{var f=navigator.getDeviceStorage("pictures"),g=dataToBlob(b),h=f.addNamed(g,save["file name"]+".png");h.onsuccess=function(){alert("Your Sketch was saved successfuly: "+this.result)},h.onerror=function(){alert("Something bad happened trying to save your sketch "+save["file name"]+"\n Possible reasons:\n Duplicate Name \n Not enough permission")}}c.putImageData(a,0,0)},window.load=function(){var a=JSON.parse(localStorage.getItem("projects")).filter(function(a){return a.name==load.file})[0],b=document.createElement("img");b.src=a.data,b.onload=function(){c.clearRect(0,0,width(),height()),c.drawImage(b,0,0),window.points=a.points,window.points.history=[{data:c.createImageData($c.width(),$c.height()),points:[]},{data:c.getImageData(0,0,width(),height()),points:a.points}],$c.first().css("background",a.settings.bg),window.settings.bg=a.settings.bg}}});

1
out/js/events.js Normal file

File diff suppressed because one or more lines are too long

1
out/js/functions.js Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
$(function(){"use strict";function a(a,b,c){a/=360,b/=100,c/=100;var d,e,f;if(0==b)d=e=f=c;else{var g=function(a,b,c){return 0>c&&(c+=1),c>1&&(c-=1),1/6>c?a+6*(b-a)*c:.5>c?b:2/3>c?a+(b-a)*(2/3-c)*6:a},h=.5>c?c*(1+b):c+b-c*b,i=2*c-h;d=g(i,h,a+1/3),e=g(i,h,a),f=g(i,h,a-1/3)}return{red:Math.round(255*d),green:Math.round(255*e),blue:Math.round(255*f)}}function b(a,b,c){a/=255,b/=255,c/=255;var d,e,f=Math.max(a,b,c),g=Math.min(a,b,c),h=(f+g)/2;if(f==g)d=e=0;else{var i=f-g;switch(e=h>.5?i/(2-f-g):i/(f+g),f){case a:d=(b-c)/i+(c>b?6:0);break;case b:d=(c-a)/i+2;break;case c:d=(a-b)/i+4}d/=6}return{hue:Math.round(360*d),saturation:Math.round(100*e),luminosity:Math.round(100*h)}}function c(a,b,c){return"#"+((1<<24)+(a<<16)+(b<<8)+c).toString(16).slice(1)}function d(a){var b=parseInt(a.replace("#",""),16),c=b>>16&255,d=b>>8&255,e=255&b;return{red:c,green:d,blue:e}}function e(a){var c=d(a);return b(c.red,c.green,c.blue)}function f(b,d,e){var f=a(b,d,e);return c(f.red,f.green,f.blue)}$.each($(".color-picker"),function(){function c(){var a=h.find(".pin").position(),b=l.width(),c=l.height();return{hue:Math.round(a.left/b*360),saturation:Math.round(a.top/c*100),luminosity:k.val()}}function d(){var b=c();switch(i.val()){case"HSL":j.val("hsl("+b.hue+", "+b.saturation+"%, "+b.luminosity+"%)");break;case"RGB":var d=a(b.hue,b.saturation,b.luminosity);j.val("rgb("+d.red+", "+d.green+", "+d.blue+")");break;case"Hex":j.val(f(b.hue,b.saturation,b.luminosity))}h.trigger("change")}function g(a){var b,c;50>=a?(b="0, 0, 0",c=1-a/100*2):(b="255, 255, 255",c=a/100*2-1),l.children().css("background-color","rgba("+b+", "+c+")")}var h=$(this),i=h.find(".format"),j=h.find(".color"),k=h.find("input[type=range]"),l=h.find(".spectrum"),m=h.find(".pin");i.on("change",function(){d()}),j.on("change",function(){var a;switch(i.val()){case"HSL":var c=$(this).val().match(/\d+/g);a={hue:c[0],saturation:c[1],luminosity:c[2]};break;case"RGB":var c=$(this).val().match(/\d+/g);a=b(c[0],c[1],c[2]);break;case"Hex":a=e($(this).val())}k.val(a.luminosity),g(a.luminosity),m.css({left:a.hue/360*100+"%",top:a.saturation+"%"}),h.trigger("change")}),k.on("change",function(){g($(this).val()),d()});var n=function(a){var b=l.offset(),c=l.width(),e=l.height(),f=a.changedTouches[0].clientX-b.left,g=a.changedTouches[0].clientY-b.top;0>f?f=0:f>=c&&(f=c),0>g?g=0:g>=e&&(g=e),m.css({left:f/c*100+"%",top:g/e*100+"%"}),d()};l.on("touchstart",function(a){a.preventDefault(),n(a),l.addClass("active"),$(document).on("touchmove",n)}),$(document).on("touchend",function(){l.removeClass("active"),$(document).off("touchmove",n)}),l.on("touchmove touchstart",n),h.on("change",function(){j.css("background-color",j.val()).toggleClass("dark",k.val()<=50)}),j.trigger("change")})});

View File

@ -0,0 +1 @@
$(function(){"use strict";function a(a,b,c){a/=360,b/=100,c/=100;var d,e,f;if(0==b)d=e=f=c;else{var g=function(a,b,c){return 0>c&&(c+=1),c>1&&(c-=1),1/6>c?a+6*(b-a)*c:.5>c?b:2/3>c?a+(b-a)*(2/3-c)*6:a},h=.5>c?c*(1+b):c+b-c*b,i=2*c-h;d=g(i,h,a+1/3),e=g(i,h,a),f=g(i,h,a-1/3)}return{red:Math.round(255*d),green:Math.round(255*e),blue:Math.round(255*f)}}function b(a,b,c){a/=255,b/=255,c/=255;var d,e,f=Math.max(a,b,c),g=Math.min(a,b,c),h=(f+g)/2;if(f==g)d=e=0;else{var i=f-g;switch(e=h>.5?i/(2-f-g):i/(f+g),f){case a:d=(b-c)/i+(c>b?6:0);break;case b:d=(c-a)/i+2;break;case c:d=(a-b)/i+4}d/=6}return{hue:Math.round(360*d),saturation:Math.round(100*e),luminosity:Math.round(100*h)}}function c(a,b,c){return"#"+((1<<24)+(a<<16)+(b<<8)+c).toString(16).slice(1)}function d(a){var b=parseInt(a.replace("#",""),16),c=b>>16&255,d=b>>8&255,e=255&b;return{red:c,green:d,blue:e}}function e(a){var c=d(a);return b(c.red,c.green,c.blue)}function f(b,d,e){var f=a(b,d,e);return c(f.red,f.green,f.blue)}$.each($(".color-picker"),function(){function c(){var a=h.find(".pin").position(),b=l.width(),c=l.height();return{hue:Math.round(a.left/b*360),saturation:Math.round(a.top/c*100),luminosity:k.val()}}function d(){var b=c();switch(i.val()){case"HSL":j.val("hsl("+b.hue+", "+b.saturation+"%, "+b.luminosity+"%)");break;case"RGB":var d=a(b.hue,b.saturation,b.luminosity);j.val("rgb("+d.red+", "+d.green+", "+d.blue+")");break;case"Hex":j.val(f(b.hue,b.saturation,b.luminosity))}h.trigger("change")}function g(a){var b,c;50>=a?(b="0, 0, 0",c=1-a/100*2):(b="255, 255, 255",c=a/100*2-1),l.children().css("background-color","rgba("+b+", "+c+")")}var h=$(this),i=h.find(".format"),j=h.find(".color"),k=h.find("input[type=range]"),l=h.find(".spectrum"),m=h.find(".pin");i.on("change",function(){d()}),j.on("change",function(){var a;switch(i.val()){case"HSL":var c=$(this).val().match(/\d+/g);a={hue:c[0],saturation:c[1],luminosity:c[2]};break;case"RGB":var c=$(this).val().match(/\d+/g);a=b(c[0],c[1],c[2]);break;case"Hex":a=e($(this).val())}k.val(a.luminosity),g(a.luminosity),m.css({left:a.hue/360*100+"%",top:a.saturation+"%"}),h.trigger("change")}),k.on("change",function(){g($(this).val()),d()});var n=function(a){var b=l.offset(),c=l.width(),e=l.height(),f=a.clientX-b.left,g=a.clientY-b.top;0>f?f=0:f>=c&&(f=c),0>g?g=0:g>=e&&(g=e),m.css({left:f/c*100+"%",top:g/e*100+"%"}),d()};l.on("mousedown",function(a){a.preventDefault(),n(a),l.addClass("active"),$(document).on("mousemove",n)}),$(document).on("mouseup",function(){l.removeClass("active"),$(document).off("mousemove",n)}),l.on("touchmove touchstart",n),h.on("change",function(){j.css("background-color",j.val()).toggleClass("dark",k.val()<=50)}),j.trigger("change")})});

View File

@ -0,0 +1 @@
!function(a){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))&&(window.mobile=!0)}(navigator.userAgent||navigator.vendor||window.opera,"http://detectmobilebrowser.com/mobile");

1
out/js/libs/stack.js Normal file
View File

@ -0,0 +1 @@
!function(a){a.fn.end=function(){return this.prevObject||a()},a.fn.andSelf=function(){return this.add(this.prevObject||a())},"filter,add,not,eq,first,last,find,closest,parents,parent,children,siblings".split(",").forEach(function(b){var c=a.fn[b];a.fn[b]=function(){var a=c.apply(this,arguments);return a.prevObject=this,a}})}(Zepto);

1
out/js/libs/touch.js Normal file
View File

@ -0,0 +1 @@
!function(a){function b(a,b,c,d){return Math.abs(a-b)>=Math.abs(c-d)?a-b>0?"Left":"Right":c-d>0?"Up":"Down"}function c(){k=null,m.last&&(m.el.trigger("longTap"),window.touchEl=m.el,m={})}function d(){k&&clearTimeout(k),k=null}function e(){h&&clearTimeout(h),i&&clearTimeout(i),j&&clearTimeout(j),k&&clearTimeout(k),h=i=j=k=null,m={}}function f(a){return("touch"==a.pointerType||a.pointerType==a.MSPOINTER_TYPE_TOUCH)&&a.isPrimary}function g(a,b){return a.type=="pointer"+b||a.type.toLowerCase()=="mspointer"+b}var h,i,j,k,l,m={},n=750;a(document).ready(function(){var o,p,q,r,s=0,t=0;"MSGesture"in window&&(l=new MSGesture,l.target=document.body),a(document).bind("MSGestureEnd",function(a){var b=a.velocityX>1?"Right":a.velocityX<-1?"Left":a.velocityY>1?"Down":a.velocityY<-1?"Up":null;b&&(m.el.trigger("swipe"),m.el.trigger("swipe"+b))}).on("touchstart MSPointerDown pointerdown",function(b){(!(r=g(b,"down"))||f(b))&&(q=r?b:b.touches[0],b.touches&&1===b.touches.length&&m.x2&&(m.x2=void 0,m.y2=void 0),o=Date.now(),p=o-(m.last||o),m.el=a("tagName"in q.target?q.target:q.target.parentNode),h&&clearTimeout(h),m.x1=q.pageX,m.y1=q.pageY,p>0&&250>=p&&(m.isDoubleTap=!0),m.last=o,k=setTimeout(c,n),l&&r&&l.addPointer(b.pointerId))}).on("touchmove MSPointerMove pointermove",function(b){(!(r=g(b,"move"))||f(b))&&(q=r?b:b.touches[0],a.moveCancel&&d(),m.x2=q.pageX,m.y2=q.pageY,s+=Math.abs(m.x1-m.x2),t+=Math.abs(m.y1-m.y2))}).on("touchend MSPointerUp pointerup",function(c){(!(r=g(c,"up"))||f(c))&&(d(),m.x2&&Math.abs(m.x1-m.x2)>30||m.y2&&Math.abs(m.y1-m.y2)>30?j=setTimeout(function(){m.el.trigger("swipe"),m.el.trigger("swipe"+b(m.x1,m.x2,m.y1,m.y2)),m={}},0):"last"in m&&(30>s&&30>t?i=setTimeout(function(){var b=a.Event("tap");b.cancelTouch=e,m.el.trigger(b),m.isDoubleTap?(m.el&&m.el.trigger("doubleTap"),m={}):h=setTimeout(function(){h=null,m.el&&m.el.trigger("singleTap"),m={}},250)},0):m={}),s=t=0)}).on("touchcancel MSPointerCancel pointercancel",e),a(window).on("scroll",e)}),["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap","singleTap","longTap"].forEach(function(b){a.fn[b]=function(a){return this.on(b,a)}})}(Zepto);

1
out/js/libs/yepnope.min.js vendored Normal file
View File

@ -0,0 +1 @@
!function(a,b,c){function d(a){return"[object Function]"==q.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=r.shift();s=1,a?a.t?o(function(){("c"==a.t?m.injectCss:m.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):s=0}function i(a,c,d,e,f,i,j){function k(b){if(!n&&g(l.readyState)&&(t.r=n=1,!s&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&o(function(){v.removeChild(l)},50);for(var d in A[c])A[c].hasOwnProperty(d)&&A[c][d].onload()}}var j=j||m.errorTimeout,l=b.createElement(a),n=0,q=0,t={t:d,s:c,e:f,a:i,x:j};1===A[c]&&(q=1,A[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,q)},r.splice(e,0,t),"img"!=a&&(q||2===A[c]?(v.insertBefore(l,u?null:p),o(k,j)):A[c].push(l))}function j(a,b,c,d,f){return s=0,b=b||"j",e(a)?i("c"==b?x:w,a,b,this.i++,c,d,f):(r.splice(this.i++,0,a),1==r.length&&h()),this}function k(){var a=m;return a.loader={load:j,i:0},a}var l,m,n=b.documentElement,o=a.setTimeout,p=b.getElementsByTagName("script")[0],q={}.toString,r=[],s=0,t="MozAppearance"in n.style,u=t&&!!b.createRange().compareNode,v=u?n:p.parentNode,n=a.opera&&"[object Opera]"==q.call(a.opera),n=!!b.attachEvent&&!n,w=t?"object":n?"script":"img",x=n?"script":w,y=Array.isArray||function(a){return"[object Array]"==q.call(a)},z=[],A={},B={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}};m=function(a){function b(a){var b,c,d,a=a.split("!"),e=z.length,f=a.pop(),g=a.length,f={url:f,origUrl:f,prefixes:a};for(c=0;g>c;c++)d=a[c].split("="),(b=B[d.shift()])&&(f=b(f,d));for(c=0;e>c;c++)f=z[c](f);return f}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(A[i.url]?i.noexec=!0:A[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),A[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(l=function(){var a=[].slice.call(arguments);m.apply(this,a),n()}),g(a,l,b,0,j);else if(Object(a)===a)for(i in h=function(){var b,c=0;for(b in a)a.hasOwnProperty(b)&&c++;return c}(),a)a.hasOwnProperty(i)&&(!c&&!--h&&(d(l)?l=function(){var a=[].slice.call(arguments);m.apply(this,a),n()}:l[i]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),n()}}(m[i])),g(a[i],l,b,i,j))}else!c&&n()}var h,i,j=!!a.test,k=a.load||a.both,l=a.callback||f,m=l,n=a.complete||f;c(j?a.yep:a.nope,!!k),k&&c(k)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(y(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):y(j)?m(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},m.addPrefix=function(a,b){B[a]=b},m.addFilter=function(a){z.push(a)},m.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",l=function(){b.removeEventListener("DOMContentLoaded",l,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k,l,n=b.createElement("script"),e=e||m.errorTimeout;n.src=a;for(l in d)n.setAttribute(l,d[l]);c=j?h:c||f,n.onreadystatechange=n.onload=function(){!k&&g(n.readyState)&&(k=1,c(),n.onload=n.onreadystatechange=null)},o(function(){k||(k=1,c(1))},e),i?n.onload():p.parentNode.insertBefore(n,p)},a.yepnope.injectCss=function(a,c,d,e,g,i){var j,e=b.createElement("link"),c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(p.parentNode.insertBefore(e,p),o(c,0))}}(this,document);

1
out/js/libs/zepto.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1
out/js/main.js Normal file
View File

@ -0,0 +1 @@
"use strict";$(document).ready(function(){window.c=$("canvas")[0].getContext("2d"),window.o=$("canvas")[1].getContext("2d"),window.c.clear=window.o.clear=function(){this.clearRect(0,0,width(),height())},window.settings={stroke:!0,fill:!1,lineWidth:2,color:"black",type:"sketch",lineCap:"round",lineJoin:"round",furLength:50,connectTelorance:40,composite:"source-over",shape:"circle",shapeStart:{},comShape:{},drawingLine:[],version:1.2},window.points=[],window.$c=$("canvas"),window.points.history=[{data:c.createImageData($c.width(),$c.height()),points:[]}],window.points.history.last=0,sizeAndPos(),localStorage.getItem("sawTips")!=settings.version&&($(".tour").removeClass("hidden"),localStorage.setItem("sawTips",settings.version))});

1
out/js/shared.js Normal file
View File

@ -0,0 +1 @@
$(document).ready(function(){window.c=$("canvas")[0].getContext("2d"),window.o=$("canvas")[1].getContext("2d"),window.c.clear=window.o.clear=function(){this.clearRect(0,0,width(),height())},window.settings={stroke:!0,fill:!1,lineWidth:2,color:"black",bg:"white",type:"sketch",lineCap:"round",lineJoin:"round",furLength:50,connectTelorance:40,composite:"source-over",shape:"circle",shapeStart:{},comShape:{},drawingLine:[],version:1.2},window.points=[],window.$c=$("canvas"),window.points.history=[{data:c.createImageData($c.width(),$c.height()),points:[]}],window.points.history.last=0,sizeAndPos(),$(".color-picker").change(function(){var a=$(this).find(".color").val(),b=$(this).parent().attr("data-caller");settings[b]=a,$("#set"+b+" span").html(a),"bg"==b&&$c.first().css("background",a)}),$(".color").val("#000000"),localStorage.getItem("sawTips")!=settings.version&&($(".tour").removeClass("hidden"),localStorage.setItem("sawTips",settings.version))});

42
out/manifest.webapp Normal file
View File

@ -0,0 +1,42 @@
{
"name": "Sketchy",
"description": "Free full-featured Sketch app",
"version": "1.2.2",
"fullscreen": "true",
"type": "privileged",
"launch_path": "/index.html",
"default_locale": "en",
"icons": {
"16": "/img/icons/icon16.png",
"32": "/img/icons/icon32.png",
"48": "/img/icons/icon48.png",
"60": "/img/icons/icon60.png",
"64": "/img/icons/icon64.png",
"90": "/img/icons/icon90.png",
"120": "/img/icons/icon120.png",
"128": "/img/icons/icon128.png"
},
"developer": {
"name": "Mahdi Dibaiee",
"url": "http://dibaiee.ir/"
},
"locales": {
"en": {
"name": "Sketchy",
"description": "Free Sketch/Paint app"
},
"fa": {
"name": "Sketchy",
"description": "برنامه‌ی رایگان طراحی/نقاشی"
}
},
"orientation": [
"portrait"
],
"permissions": {
"device-storage:pictures": {
"description": "Required to save sketches",
"access": "readwrite"
}
}
}

BIN
out/sketchy.apk Normal file

Binary file not shown.

View File

@ -1,6 +1,6 @@
{ {
"name": "Sketchy", "name": "Sketchy",
"version": "1.2.0", "version": "1.2.2",
"description": "Free Firefox Sketch/Paint Tool", "description": "Free Firefox Sketch/Paint Tool",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

Binary file not shown.

Binary file not shown.