Clean mockup assets
This commit is contained in:
parent
4eb01b47d2
commit
e2527f79cf
49 changed files with 92 additions and 5432 deletions
Gruntfile.jsREADME.mdconfig.codekit3
mockup
Gruntfile.jsimagesindex-compressed.htmlindex.htmlnews-details.html
assets
css
fonts
FontAwesome.otf
bootstrap
glyphicons-halflings-regular.eotglyphicons-halflings-regular.svgglyphicons-halflings-regular.ttfglyphicons-halflings-regular.woffglyphicons-halflings-regular.woff2
fontawesome-webfont.eotfontawesome-webfont.svgfontawesome-webfont.ttffontawesome-webfont.wofffontawesome-webfont.woff2slick.eotslick.svgslick.ttfslick.woffjs
libsslick
vagrant
|
@ -29,7 +29,7 @@ module.exports = function(grunt) {
|
|||
sourcemap: 'none'
|
||||
},
|
||||
files: { // Dictionary of files
|
||||
"publichealth/static/mockup/assets/css/main.css": "publichealth/static/css/main.scss"
|
||||
"./assets/css/main.css": "publichealth/static/css/main.scss"
|
||||
}
|
||||
},
|
||||
dist: {
|
||||
|
@ -38,7 +38,7 @@ module.exports = function(grunt) {
|
|||
sourcemap: 'none'
|
||||
},
|
||||
files: {
|
||||
"publichealth/static/mockup/assets/css/main.min.css": "publichealth/static/css/main.scss"
|
||||
"./assets/css/main.min.css": "publichealth/static/css/main.scss"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -58,8 +58,8 @@ module.exports = function(grunt) {
|
|||
dev: {
|
||||
bsFiles: {
|
||||
src: [
|
||||
"publichealth/static/mockup/assets/css/*.css",
|
||||
"publichealth/static/mockup/*.html"
|
||||
"./assets/css/*.css",
|
||||
"./*.html"
|
||||
]
|
||||
},
|
||||
options: {
|
||||
|
|
|
@ -29,7 +29,7 @@ bower install
|
|||
|
||||
The first command (`..install -g..`) may require `sudo` if you installed node.js as a system package.
|
||||
|
||||
If you are only working on the frontend, you can start a local webserver and work on frontend assets without the backend setup described below. Mock content is at `publichealth/static/mockup`
|
||||
If you are only working on the frontend, you can start a local webserver and work on frontend assets without the backend setup described below. Mock content is at `mockup`, and there is a `grunt browser-sync` setup for working with frontend assets.
|
||||
|
||||
**Backend setup**
|
||||
|
||||
|
@ -57,13 +57,12 @@ If you have one installed, also start your local redis server (`service redis st
|
|||
Run this after completing setup:
|
||||
|
||||
```
|
||||
./manage.py runserver &
|
||||
grunt browser-sync
|
||||
./manage.py runserver
|
||||
```
|
||||
|
||||
A default browser should open pointing to the default home page.
|
||||
|
||||
Now access the admin panel with the user account you created earlier: http://localhost:3000/admin/
|
||||
Now access the admin panel with the user account you created earlier: http://localhost:8000/admin/
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
|
|
5423
config.codekit3
5423
config.codekit3
File diff suppressed because it is too large
Load diff
84
mockup/Gruntfile.js
Normal file
84
mockup/Gruntfile.js
Normal file
|
@ -0,0 +1,84 @@
|
|||
module.exports = function(grunt) {
|
||||
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
|
||||
imagemin: {
|
||||
media: {
|
||||
files: [{
|
||||
expand: true,
|
||||
cwd: 'media/images/',
|
||||
src: '{,*/}*.{png,jpg,jpeg,gif}',
|
||||
dest: 'media/images'
|
||||
}]
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
sass: {
|
||||
files: "publichealth/static/**/*.scss",
|
||||
tasks: ['sass:dev']
|
||||
}
|
||||
},
|
||||
|
||||
// TODO: switch to https://github.com/sindresorhus/grunt-sass
|
||||
sass: { // Task
|
||||
dev: { // Target
|
||||
options: { // Target options
|
||||
style: 'expanded',
|
||||
sourcemap: 'none'
|
||||
},
|
||||
files: { // Dictionary of files
|
||||
"mockup/assets/css/main.css": "publichealth/static/css/main.scss"
|
||||
}
|
||||
},
|
||||
dist: {
|
||||
options: {
|
||||
style: 'compressed',
|
||||
sourcemap: 'none'
|
||||
},
|
||||
files: {
|
||||
"mockup/assets/css/main.min.css": "publichealth/static/css/main.scss"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
bgShell: {
|
||||
_defaults: {
|
||||
bg: true,
|
||||
stdout: false,
|
||||
stderr: false,
|
||||
},
|
||||
runDjango: {
|
||||
cmd: 'python manage.py runserver'
|
||||
},
|
||||
},
|
||||
|
||||
browserSync: {
|
||||
dev: {
|
||||
bsFiles: {
|
||||
src: [
|
||||
"mockup/assets/css/*.css",
|
||||
"mockup/*.html"
|
||||
]
|
||||
},
|
||||
options: {
|
||||
watchTask: true,
|
||||
proxy: "localhost:8000"
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-imagemin');
|
||||
grunt.loadNpmTasks('grunt-contrib-sass');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-bg-shell');
|
||||
grunt.loadNpmTasks('grunt-browser-sync');
|
||||
grunt.registerTask('default', ['imagemin', 'sass']);
|
||||
grunt.registerTask('browser-sync', [
|
||||
'bgShell',
|
||||
'browserSync',
|
||||
'watch'
|
||||
]);
|
||||
};
|
Before (image error) Size: 4.1 KiB After (image error) Size: 4.1 KiB |
Before (image error) Size: 106 KiB After (image error) Size: 106 KiB |
Before (image error) Size: 382 KiB After (image error) Size: 382 KiB |
Before (image error) Size: 2.1 KiB After (image error) Size: 2.1 KiB |
Before (image error) Size: 4.1 KiB After (image error) Size: 4.1 KiB |
Before (image error) Size: 2.1 KiB After (image error) Size: 2.1 KiB |
|
@ -54,6 +54,6 @@ cd $PROJECT_DIR
|
|||
npm install -g bower grunt-cli
|
||||
npm install
|
||||
bower install
|
||||
alias liverun="grunt browser-sync"
|
||||
alias bower="bower install"
|
||||
|
||||
EOF
|
||||
|
|
Loading…
Reference in a new issue