Skip to content
This repository has been archived by the owner on Sep 3, 2018. It is now read-only.

Commit

Permalink
Modern theme mostly working.
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSGill committed Jan 2, 2015
1 parent 28b75a3 commit ae707b2
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 65 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ WebApp/src/js/*.map
WebApp/src/js/**/*.js
WebApp/src/js/**/*.map

WebApp/src/app.*

# Except for this one, which isn't generated
!WebApp/src/js/sample_dropbox_key.js

# Ignore generated CSS files
WebApp/src/css/**/*.css
WebApp/src/css/*.css
WebApp/src/css/*.map

# Server (WebApp Mirror)

Expand Down
2 changes: 1 addition & 1 deletion .idea/jsLibraryMappings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/watcherTasks.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

90 changes: 52 additions & 38 deletions WebApp/GruntFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************/


module.exports = function (grunt) {

var version = grunt.option('version') || '1.6.0';
Expand All @@ -40,52 +39,41 @@ module.exports = function (grunt) {
server: {
options: {
port: 60000,
base: './src/'
base: './src/',
debug: true
}
}
},

typescript: {
base: {
src: ['./src/**/*.ts'],
dest: './src/js/app.js',
dest: './src/app.js',
options: {
module: 'commonjs',
target: 'es5',
sourcemap: true,
fullSourceMapPath: true
sourceMap: true,
fullSourceMapPath: true,
removeComments: true
}
}
},

less: {
production: {
release: {
options: {
yuicompress: true
compress: true,
sourceMap: true
},
files: {
"./src/css/modern.css": "./src/css/modern.less",
"./src/css/simple_default.css": "./src/css/simple_default.less",
"./src/css/simple_solarized_dark.css": "./src/css/simple_solarized_dark.less",
"./src/css/simple_solarized_light.css": "./src/css/simple_solarized_light.less"
}
}
},
watch: {
typescript:
{
files: './src/**/*.ts',
tasks: ['typescript']
},
less:
{
files: './src/**/*.less',
tasks: ['less']
}
},
open: {
dev: {
path: 'http://localhost:60000/todotxt.html'
files: [
{ src: ["./src/css/modern.less"], dest: './src/css/modern.css' },
{ src: ["./src/css/simple_default.less"], dest: './src/css/simple_default.css' },
{ src: ["./src/css/simple_solarized_dark.less"], dest: './src/css/simple_solarized_dark.css' },
{ src: ["./src/css/simple_solarized_light.less"], dest: './src/css/simple_solarized_light.css' }
]
}
},

uglify: {
options: {
compress: {
Expand All @@ -95,12 +83,18 @@ module.exports = function (grunt) {
dead_code: true
}
},
my_target: {
files: {
'./src/js/app.min.js': ['./src/js/app.js']
}
release: {
options:
{
sourceMap: true,
sourceMapIn: './src/app.js.map'
},
files: [
{ src: ['./src/app.js'], dest: './src/app.min.js' }
]
}
},

compress: {
release: {
options: {
Expand All @@ -109,18 +103,38 @@ module.exports = function (grunt) {
files: [
{ expand: true, cwd: 'src/', src: ['*'], filter: 'isFile'},
{ expand: true, cwd: 'src/', src: ['.htaccess'] },
{ expand: true, cwd: 'src/', src: ['js/app.min.js']},
{ expand: true, cwd: 'src/', src: ['app.min.js']},
{ expand: true, cwd: 'src/', src: ['js/sample_dropbox_key.js']},
{ expand: true, cwd: 'src/', src: ['js/bindings/binding_todo.js']},
{ expand: true, cwd: 'src/', src: ['js/lib/jquery.hotkeys.js']},
{ expand: true, cwd: 'src/', src: ['css/*.css']},
{ expand: true, cwd: 'src/', src: ['css/*.css','!css/_*.css']},
{ expand: true, cwd: 'src/', src: ['images/*']}
]
}
},

watch: {
typescript:
{
files: './src/**/*.ts',
tasks: ['typescript']
},
less:
{
files: './src/**/*.less',
tasks: ['less']
}
},

open: {
dev: {
path: 'http://localhost:60000/todotxt.html'
}
}

});

grunt.registerTask('release', ['build', 'uglify', 'compress']);
grunt.registerTask('build', ['typescript', 'less']);
grunt.registerTask('release', ['build', 'compress']);
grunt.registerTask('build', ['typescript', 'less', 'uglify']);
grunt.registerTask('default', ['build', 'connect', 'open', 'watch']);
};
1 change: 1 addition & 0 deletions WebApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"karma": ">=0.12.0",
"karma-chrome-launcher": ">=0.1.2",
"karma-qunit": ">=0.1.1",
"less": "^2.1.2",
"typescript": ">=0.9.1"
},
"scripts": {
Expand Down
28 changes: 18 additions & 10 deletions WebApp/src/css/modern.less
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ section.hidden { display: none; }
////////////////////////////////////////////////////////////////////////
section.toolbar
{
position: fixed;
position: absolute;
top: @toolbar-top;
width: 100%;
height: @toolbar-height;
Expand Down Expand Up @@ -349,7 +349,7 @@ section.toolbar
div.logo
{
display: inline-block;
position: fixed;
position: absolute;
top: 10px;
left: 5px;
width: 32px;
Expand All @@ -361,7 +361,7 @@ div.logo
span.pageHeading
{
display: block;
position: fixed;
position: absolute;
top: 6px;
left: 50px;
color: white;
Expand All @@ -376,7 +376,7 @@ span.pageHeading
section.addTodo
{
top: @addTodo-top;
position: fixed;
position: absolute;
clear: both;
padding: @addTodo-padding;
background-color: @add-color;
Expand Down Expand Up @@ -408,7 +408,7 @@ section.addTodo
///////////////////////////////////////////////////////
section.filters
{
position: fixed;
position: absolute;
top: @filter-top;
padding: @filter-padding;
background-color: @filter-color;
Expand Down Expand Up @@ -528,8 +528,9 @@ section#main {
display: table;
width: 100%;
top: @main-top;
bottom: -@footer-height;
position: fixed;
position: absolute;

margin-bottom: @footer-height;

border: 0 solid;
border-top-width: 5px;
Expand Down Expand Up @@ -575,10 +576,15 @@ section#main {

.todo-view-index
{
display: none;
width: 20px;
.font-heading;
vertical-align: middle;
display: inline-block;
width: 18px;
padding: 1px;
text-align: right;
font-size: 0.5em;
font-size: 0.4em;
border: thin solid #9b8f00;
background-color: #c09d00;
}

.todo-view-completedFlag
Expand Down Expand Up @@ -714,6 +720,8 @@ section#main {
.deleteButton
{
display: inline-table;
float: right;
margin-top: 5px;

a
{
Expand Down
8 changes: 1 addition & 7 deletions WebApp/src/todotxt.html
Original file line number Diff line number Diff line change
Expand Up @@ -543,13 +543,7 @@ <h2>Addendum</h2>
$.getScript('js/lib/jquery.hotkeys.js');
$.getScript('js/bindings/binding_todo.js');
$.getScript('js/dropbox_key.js').always(function(){
// Only Load after key has been loaded.

// Load Debug first, if it exists
$.getScript('js/app.js').fail(function(){
// else release
$.getScript('js/app.min.js');
});
$.getScript('app.min.js');
});

// Optional use if you want to react to events.
Expand Down
9 changes: 1 addition & 8 deletions todotxtjs.iml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,7 @@
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/WebApp/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/WebApp/tests" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/WebApp/build/node_modules" />
<excludeFolder url="file://$MODULE_DIR$/bin" />
<excludeFolder url="file://$MODULE_DIR$/obj" />
</content>
<content url="file://$MODULE_DIR$" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="jQuery-2.0.0" level="application" />
<orderEntry type="library" name="jQuery UI-1.10.2" level="application" />
Expand Down

0 comments on commit ae707b2

Please sign in to comment.