From 0973f4b95b23679b91c9f309d614a7a2fb1c27fa Mon Sep 17 00:00:00 2001 From: Shikiryu Date: Sun, 25 Jan 2015 23:53:42 +0100 Subject: [PATCH] workspace cleaning --- Gruntfile.js | 35 ++++++++ index.html | 29 ------- package.json | 11 +++ src/css/style.css | 19 +++++ src/index.html | 23 ++++++ const.js => src/js/const.js | 0 script.js => src/js/script.js | 2 +- style.css | 151 ---------------------------------- 8 files changed, 89 insertions(+), 181 deletions(-) create mode 100644 Gruntfile.js delete mode 100644 index.html create mode 100644 package.json create mode 100644 src/css/style.css create mode 100644 src/index.html rename const.js => src/js/const.js (100%) rename script.js => src/js/script.js (98%) delete mode 100644 style.css diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..b7e7d3b --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,35 @@ +module.exports = function(grunt) { + + // Project configuration. + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + uglify: { + options: { + banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n' + }, + build: { + src: 'src/js/*.js', + dest: 'dist/js/<%= pkg.name %>.min.js' + } + }, + cssmin: { + target: { + files: { + 'dist/css/<%= pkg.name %>.css': 'src/css/*.css' + } + } + }, + jshint: { + all: ['src/js/*.js'] + } + }); + + // Load the plugin that provides the "uglify" task. + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-cssmin'); + + // Default task(s). + grunt.registerTask('default', ['jshint', 'uglify','cssmin' ]); + +}; \ No newline at end of file diff --git a/index.html b/index.html deleted file mode 100644 index 3ca7470..0000000 --- a/index.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - Mot mélés - - - - - - -

Mots Mélés

-
- -
-
-
- - -
    - -
-
- -
-
-
- - - \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..21e2d24 --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "name": "motsmeles", + "version": "0.0.1", + "description": "a simple 'mots mélés' game", + "author": "Shikiryu", + "devDependencies": { + "grunt-contrib-cssmin": "^0.11.0", + "grunt-contrib-jshint": "^0.11.0", + "grunt-contrib-uglify": "^0.7.0" + } +} diff --git a/src/css/style.css b/src/css/style.css new file mode 100644 index 0000000..093f243 --- /dev/null +++ b/src/css/style.css @@ -0,0 +1,19 @@ +body { + font-family: Helvetica, Arial, sans-serif; + font-size: 20px; + font-weight: bold; +} +h1 { + width: 600px; + text-align: center; + margin: 15px auto; + z-index: 10; + font-weight: bold; + color: #6C9BD9; + font-size: 50px; +} +ul {list-style: none; float: left; margin: 100px 0 50px 0; line-height: 28px;} +ul li.validate {color: green; font-weight: bold; text-decoration : line-through;} +ul li.validate:before {content: '\2713 '; color: green; font-weight: bold;} +.canvas-container {float: left; margin: 100px 30px 30px 50px;} +#playground {background: url(feuille-de-papier.jpg) top left no-repeat; display: block; width: 600px; height:600px; margin: 0 auto;} \ No newline at end of file diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..6deef41 --- /dev/null +++ b/src/index.html @@ -0,0 +1,23 @@ + + + + Mot mélés + + + + + + +

Mots Mélés

+
+
+ + +
    + +
+
+
+ + + \ No newline at end of file diff --git a/const.js b/src/js/const.js similarity index 100% rename from const.js rename to src/js/const.js diff --git a/script.js b/src/js/script.js similarity index 98% rename from script.js rename to src/js/script.js index 4e0a92b..fe071d8 100644 --- a/script.js +++ b/src/js/script.js @@ -12,7 +12,7 @@ var LabeledRect = fabric.util.createClass(fabric.Rect, { type: 'labeledRect', initialize: function(options) { - options || (options = { }); + options = options || {}; this.callSuper('initialize', options); this.set('label', options.label || ''); }, diff --git a/style.css b/style.css deleted file mode 100644 index 17a2b2e..0000000 --- a/style.css +++ /dev/null @@ -1,151 +0,0 @@ -body { - font-family: "SkipLegDay", Helvetica, Arial, sans-serif; - font-size: 20px; - font-weight: bold; - background: linear-gradient(180deg, #3F618C, #223A59); - background-size: 400% 400%; - -webkit-animation: AnimationName 10s ease infinite; - -moz-animation: AnimationName 10s ease infinite; - animation: AnimationName 10s ease infinite; - - @-webkit-keyframes AnimationName { - 0% { - background-position: 51% 0% - } - 50% { - background-position: 50% 100% - } - 100% { - background-position: 51% 0% - } - } - @-moz-keyframes AnimationName { - 0% { - background-position: 51% 0% - } - 50% { - background-position: 50% 100% - } - 100% { - background-position: 51% 0% - } - } - @keyframes AnimationName { - 0% { - background-position: 51% 0% - } - 50% { - background-position: 50% 100% - } - 100% { - background-position: 51% 0% - } - } -} -h1, small { - width: 600px; - text-align: center; - margin: 0 auto; - z-index: 10; - font-weight: bold; - color: #6C9BD9; -} -h1 { - font-size: 50px; - margin-top: 15px; -} -small { - display: block; - font-size: 18px; - line-height: 20px; -} -ul {list-style: none; float: left; margin: 100px 0 50px 0; line-height: 28px;} -ul li.validate {color: green; font-weight: bold; text-decoration : line-through;} -ul li.validate:before {content: '\2713 '; color: green; font-weight: bold;} -.canvas-container {float: left; margin: 100px 30px 30px 50px;} -#answer-container {display: none; clear: both; text-align: center;} -#answer-container input { } -#playground {background: url(feuille-de-papier.jpg) top left no-repeat; display: block; width: 600px; height:600px; margin: 0 auto;} - - -/* from http://davidwalsh.name/demo/css-flip.php */ -.flip-container, .front, .back { - width: 600; - height: 600px; -} - -/* flip speed goes here */ -.flipper { - transition: 3s; - transform-style: preserve-3d; - position: relative; -} - - -/* entire container, keeps perspective */ -.flip-container { - perspective: 1000; - transform-style: preserve-3d; -} -/* UPDATED! flip the pane when hovered */ -.flip-container.flip .back { - transform: rotateY(0deg); -} -.flip-container.flip .front { - transform: rotateY(180deg); -} - -/* hide back of pane during swap */ -.front, .back { - backface-visibility: hidden; - transition: 3s; - transform-style: preserve-3d; - - position: absolute; - top: 0; - left: 0; -} - -/* front pane, placed above back */ -.front { - z-index: 2; - /* for firefox 31 */ - transform: rotateY(0deg); -} - -/* back, initially hidden pane */ -.back { - transform: rotateY(-180deg); -} - -.button { - border-top: 1px solid #96d1f8; - background: #0f1926; - background: -webkit-gradient(linear, left top, left bottom, from(#0f1926), to(#0f1926)); - background: -webkit-linear-gradient(top, #0f1926, #0f1926); - background: -moz-linear-gradient(top, #0f1926, #0f1926); - background: -ms-linear-gradient(top, #0f1926, #0f1926); - background: -o-linear-gradient(top, #0f1926, #0f1926); - padding: 11px 22px; - -webkit-border-radius: 27px; - -moz-border-radius: 27px; - border-radius: 27px; - -webkit-box-shadow: rgba(0,0,0,1) 0 1px 0; - -moz-box-shadow: rgba(0,0,0,1) 0 1px 0; - box-shadow: rgba(0,0,0,1) 0 1px 0; - text-shadow: rgba(0,0,0,.4) 0 1px 0; - color: white; - font-size: 11px; - font-family: Helvetica, Arial, Sans-Serif; - text-decoration: none; - vertical-align: middle; -} -.button:hover { - border-top-color: #28597a; - background: #28597a; - color: #ccc; -} -.button:active { - border-top-color: #0f1926; - background: #0f1926; -} \ No newline at end of file