Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move towards grunt with asset relocation etc
- Loading branch information
Showing
236 changed files
with
1,286 additions
and
2,408 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
*.DS_Store | ||
.DS_Store? | ||
.sass-cache | ||
.sass-cache | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
module.exports = function(grunt) { | ||
|
||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
|
||
compass: { | ||
dist: { | ||
options: { | ||
basePath: 'assets/css', | ||
sassDir: 'src', | ||
cssDir: 'build', | ||
imagesDir: '../img/build', | ||
outputStyle: 'compressed', | ||
relativeAssets: true, | ||
force: true | ||
} | ||
}, | ||
}, | ||
|
||
'compile-handlebars': { | ||
allStatic: { | ||
template: 'assets/templates/*.hbs', | ||
templateData: 'assets/data/nba.json', | ||
output: '*.html', | ||
helpers: 'assets/templates/helpers/*.js', | ||
partials: 'assets/templates/partials/*.hbs' | ||
} | ||
}, | ||
|
||
jshint: { | ||
all: ['assets/scripts/src/js.js'] | ||
}, | ||
|
||
watch: { | ||
grunt: { | ||
files: ['Gruntfile.js'], | ||
tasks: ['default'] | ||
}, | ||
handlebars: { | ||
files: ['assets/templates/**/*', 'assets/data/*.json'], | ||
tasks: ['compile-handlebars'] | ||
}, | ||
compass: { | ||
files: ['assets/css/src/*'], | ||
tasks: ['compass'] | ||
}, | ||
jshint: { | ||
files: ['assets/scripts/src/js.js'], | ||
tasks: ['jshint'] | ||
} | ||
} | ||
}); | ||
|
||
// Load the plugin that provides the "uglify" task. | ||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
grunt.loadNpmTasks('grunt-contrib-compass'); | ||
grunt.loadNpmTasks('grunt-compile-handlebars'); | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
|
||
// Default task(s). | ||
grunt.registerTask('default', [ | ||
'compass', | ||
'compile-handlebars', | ||
'jshint', | ||
'watch' | ||
]); | ||
|
||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
// | ||
// | ||
// Colors | ||
// ============================== | ||
// Displaying team colors and hex values | ||
// | ||
.colors { | ||
@include respond-to(one-col) { | ||
display: none; | ||
margin-bottom: 2em; | ||
|
||
.show & { | ||
display: block; | ||
} | ||
} | ||
} | ||
|
||
.color { | ||
margin: .25em 0; | ||
border-radius: 3px; | ||
padding: 1em .75em; | ||
text-transform: uppercase; | ||
border-radius: 3px; | ||
font-family: $font-family-monospace; | ||
color: #fff; | ||
@include text-shadow(0 1px 1px rgba(0,0,0,.4)); | ||
|
||
&:hover { | ||
cursor: pointer; | ||
} | ||
|
||
// | ||
// RGB | ||
// --- | ||
&.rgb { | ||
&:before { | ||
content: 'RGB('; | ||
} | ||
&:after { | ||
content: ')'; | ||
} | ||
} | ||
|
||
// | ||
// HEX | ||
// --- | ||
&.hex { | ||
&:before { | ||
content: '#'; | ||
} | ||
} | ||
|
||
// | ||
// CMYK | ||
// --- | ||
&.cmyk { | ||
&:before { | ||
content: 'CMYK('; | ||
} | ||
&:after { | ||
content: ')'; | ||
} | ||
} | ||
|
||
// | ||
// Pantone | ||
// --- | ||
&.pms { | ||
&:before { | ||
content: 'PMS '; | ||
} | ||
} | ||
} | ||
|
||
// | ||
// Color Mode | ||
// --- | ||
// This is only for the starter HTML, hidden otherwise | ||
.color-mode { | ||
display: none; | ||
} | ||
|
||
// li.team { | ||
// display: none; | ||
// } | ||
// .color { | ||
// display: none; | ||
// } | ||
|
||
|
||
// [data-active-league="all"] .team { | ||
// display: inline-block; | ||
// } | ||
// @each $league in $leagues { | ||
// [data-active-league="#{$league}"] .team[data-league="#{$league}"] { | ||
// display: inline-block; | ||
// } | ||
// } | ||
|
||
// @each $color in $colors { | ||
// [data-active-color="#{$color}"] .#{$color} { | ||
// display: block; | ||
// } | ||
// [data-active-color="#{$color}"] .team[data-colors~="#{$color}"] { | ||
// display: inline-block; | ||
// } | ||
// } |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// .team { | ||
// display: none; | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.