demo.2
- restructured input files - sorted gulpfile and separated old stuff - next up are node module updates
This commit is contained in:
parent
8bc8da74db
commit
ce6597b6d1
53 changed files with 216 additions and 285 deletions
241
gulpfile.js
241
gulpfile.js
|
|
@ -1,13 +1,14 @@
|
||||||
// Setup project
|
// Setup project
|
||||||
var source = {
|
var source_folder = {
|
||||||
watch: ['source/style/**/*.scss', 'source/templates/**/*.+(html|njk)', 'source/pages/**/*.+(html|njk)'],
|
watch: ['source/style/hippie/**/*.scss', 'source/style/**/*.scss', 'source/templates/**/*.+(html|njk)', 'source/pages/**/*.+(html|njk)'],
|
||||||
styles: ['source/style/example.scss', 'source/style/maintenance.scss'],
|
styles: ['source/style/hippie/*.+(scss|sass)', 'source/style/**/*.+(scss|sass)'],
|
||||||
scripts: ['source/code/variables.js', 'source/code/functions.js', 'source/code/global.js', 'source/code/**/*.coffee', '!source/vendor/**/*', ],
|
scripts: ['source/code/hippie/variables.js', 'source/code/hippie/functions.js', 'source/code/hippie/global.js', 'source/code/**/*.coffee', '!source/vendor/**/*', ],
|
||||||
images: 'source/art/**/*',
|
images: 'source/art/**/*',
|
||||||
pages: 'source/pages/**/*.+(html|njk)',
|
pages: 'source/pages/**/*.+(html|njk)',
|
||||||
vendor: 'vendor/**/*'
|
vendor: 'vendor/**/*',
|
||||||
|
root: 'source'
|
||||||
};
|
};
|
||||||
var build = {
|
var build_folder = {
|
||||||
styles: 'build/css',
|
styles: 'build/css',
|
||||||
scripts: 'build/js',
|
scripts: 'build/js',
|
||||||
images: 'build/art',
|
images: 'build/art',
|
||||||
|
|
@ -15,69 +16,60 @@ var build = {
|
||||||
root: 'build'
|
root: 'build'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var fs = require('fs');
|
|
||||||
// Load plugins
|
// Load plugins
|
||||||
|
var fs = require('fs');
|
||||||
const gulp = require('gulp'),
|
const gulp = require('gulp'),
|
||||||
rename = require('gulp-rename'),
|
// rename = require('gulp-rename'),
|
||||||
del = require('del');
|
del = require('del');
|
||||||
gulpif = require('gulp-if');
|
gulpif = require('gulp-if');
|
||||||
sequencer = require('run-sequence');
|
sequencer = require('run-sequence');
|
||||||
concat = require('gulp-concat'),
|
// concat = require('gulp-concat'),
|
||||||
pump = require('pump'),
|
// pump = require('pump'),
|
||||||
sourcemap = require('gulp-sourcemaps'),
|
sourcemap = require('gulp-sourcemaps'),
|
||||||
prefix = require('gulp-autoprefixer'),
|
prefix = require('gulp-autoprefixer'),
|
||||||
sass = require('gulp-sass'),
|
sass = require('gulp-sass'),
|
||||||
rubysass = require('gulp-ruby-sass'),
|
// rubysass = require('gulp-ruby-sass'),
|
||||||
nunjucks = require('gulp-nunjucks-render');
|
nunjucks = require('gulp-nunjucks-render');
|
||||||
cssnano = require('gulp-cssnano'),
|
// cssnano = require('gulp-cssnano'),
|
||||||
jshint = require('gulp-jshint'),
|
jshint = require('gulp-jshint'),
|
||||||
jscs = require('gulp-jscs'),
|
jscs = require('gulp-jscs'),
|
||||||
useref = require('gulp-useref'),
|
// useref = require('gulp-useref'),
|
||||||
sasslint = require('gulp-sass-lint'),
|
sasslint = require('gulp-sass-lint'),
|
||||||
uglifyjs = require('uglify-es'),
|
// uglifyjs = require('uglify-es'),
|
||||||
composer = require('gulp-uglify/composer'),
|
// composer = require('gulp-uglify/composer'),
|
||||||
// imagemin = require('gulp-imagemin'),
|
// imagemin = require('gulp-imagemin'),
|
||||||
spritesmith = require('gulp.spritesmith'),
|
spritesmith = require('gulp.spritesmith'),
|
||||||
cache = require('gulp-cached'),
|
// cache = require('gulp-cached'),
|
||||||
remember = require('gulp-remember'),
|
// remember = require('gulp-remember'),
|
||||||
changed = require('gulp-changed'),
|
// changed = require('gulp-changed'),
|
||||||
newer = require('gulp-newer'),
|
// newer = require('gulp-newer'),
|
||||||
plumber = require('gulp-plumber'),
|
plumber = require('gulp-plumber'),
|
||||||
notify = require('gulp-notify'),
|
notify = require('gulp-notify'),
|
||||||
data = require('gulp-data'),
|
data = require('gulp-data'),
|
||||||
browsersync = require('browser-sync').create();
|
browsersync = require('browser-sync').create();
|
||||||
|
|
||||||
var minify = composer(uglifyjs, console);
|
// var minify = composer(uglifyjs, console);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Task for the looks
|
|
||||||
|
// this is for the looks
|
||||||
gulp.task('sass', function() {
|
gulp.task('sass', function() {
|
||||||
return gulp.src('source/style/**/*.+(scss|sass)')
|
return gulp.src(source_folder.styles)
|
||||||
.pipe(plumbError('Error Running Sass'))
|
.pipe(plumbError('Error Running Sass'))
|
||||||
.pipe(sourcemap.init())
|
.pipe(sourcemap.init())
|
||||||
.pipe(sass({
|
.pipe(sass({
|
||||||
includePaths: ['source/bower_components']
|
includePaths: [source_folder.root+'/bower_components']
|
||||||
}))
|
}))
|
||||||
.pipe(prefix(['>= 4%', 'last 2 version']))
|
.pipe(prefix(['>= 4%', 'last 2 version']))
|
||||||
.pipe(sourcemap.write())
|
.pipe(sourcemap.write())
|
||||||
.pipe(gulp.dest('build/css'))
|
.pipe(gulp.dest(build_folder.styles))
|
||||||
.pipe(browsersync.reload({
|
.pipe(browsersync.reload({
|
||||||
stream: true
|
stream: true
|
||||||
}))
|
}))
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// Task for automagically reload browsers
|
|
||||||
gulp.task('syncreload', function() {
|
|
||||||
browsersync.init({
|
|
||||||
open: false,
|
|
||||||
server: 'build',
|
|
||||||
// proxy: "http://verser.vrt/virtual/"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// templating engine
|
// templating engine
|
||||||
gulp.task('nunjucks', function() {
|
gulp.task('nunjucks', function() {
|
||||||
return gulp.src('source/pages/**/*.+(html|njk)')
|
return gulp.src('source/pages/**/*.+(html|njk)')
|
||||||
|
|
@ -91,22 +83,36 @@ gulp.task('nunjucks', function() {
|
||||||
trimBlocks: true
|
trimBlocks: true
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
.pipe(gulp.dest('build'))
|
.pipe(gulp.dest(build_folder.root))
|
||||||
.pipe(browsersync.reload({
|
.pipe(browsersync.reload({
|
||||||
stream: true
|
stream: true
|
||||||
}))
|
}))
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// automagically reload browsers
|
||||||
|
gulp.task('syncreload', function() {
|
||||||
|
browsersync.init({
|
||||||
|
open: false,
|
||||||
|
server: 'build',
|
||||||
|
// proxy: "http://verser.vrt/virtual/"
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// creates sprites from files in art/sprites folder
|
||||||
gulp.task('sprites', function() {
|
gulp.task('sprites', function() {
|
||||||
gulp.src('source/art/sprites/**/*')
|
gulp.src('source/art/sprites/**/*')
|
||||||
.pipe(spritesmith({
|
.pipe(spritesmith({
|
||||||
cssName: '_sprites.scss',
|
cssName: '_sprites.scss',
|
||||||
imgName: 'sprites.png'
|
imgName: 'sprites.png'
|
||||||
}))
|
}))
|
||||||
.pipe(gulpif('*.png', gulp.dest('build/images')))
|
.pipe(gulpif('*.png', gulp.dest(build_folder.images)))
|
||||||
.pipe(gulpif('*.scss', gulp.dest('source/style/modules/media')));
|
.pipe(gulpif('*.scss', gulp.dest('source/style/hippie/modules/media')));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// linting ...
|
||||||
gulp.task('lint:js', function() {
|
gulp.task('lint:js', function() {
|
||||||
return gulp.src('source/code/**/*.js')
|
return gulp.src('source/code/**/*.js')
|
||||||
.pipe(plumbError('JSHint Error'))
|
.pipe(plumbError('JSHint Error'))
|
||||||
|
|
@ -122,7 +128,6 @@ gulp.task('lint:js', function() {
|
||||||
}))
|
}))
|
||||||
// .pipe(jscs.reporter());
|
// .pipe(jscs.reporter());
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('lint:scss', function() {
|
gulp.task('lint:scss', function() {
|
||||||
return gulp.src('source/style/**/*.scss')
|
return gulp.src('source/style/**/*.scss')
|
||||||
.pipe(plumbError('SASSLint Error'))
|
.pipe(plumbError('SASSLint Error'))
|
||||||
|
|
@ -131,36 +136,99 @@ gulp.task('lint:scss', function() {
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
// cleans the build folder
|
||||||
gulp.task('clean:dev', function() {
|
gulp.task('clean:dev', function() {
|
||||||
del.sync([
|
del.sync([
|
||||||
'build/css',
|
build_folder.styles,
|
||||||
'build/*.html'
|
build_folder.root+'/*.html'
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// watch over changes and react
|
||||||
|
// split up into sub tasks
|
||||||
|
gulp.task('watch-js', ['lint:js'], browsersync.reload);
|
||||||
|
|
||||||
|
gulp.task('overwatch', function() {
|
||||||
|
gulp.watch('source/code/**/*.js', ['watch-js'])
|
||||||
|
gulp.watch('source/style/**/*.+(scss|sass)', ['sass', 'lint:scss']);
|
||||||
|
gulp.watch([
|
||||||
|
'source/templates/**/*',
|
||||||
|
'source/pages/**/*.+(html|njk)',
|
||||||
|
'source/data.json'
|
||||||
|
], ['nunjucks']);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// The default task (called when you run `gulp` from cli)
|
||||||
|
gulp.task('default', function(callback) {
|
||||||
|
sequencer(
|
||||||
|
'clean:dev',
|
||||||
|
['sprites', 'lint:js', 'lint:scss'],
|
||||||
|
['sass', 'nunjucks'],
|
||||||
|
['syncreload', 'overwatch'],
|
||||||
|
callback
|
||||||
|
)
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function plumbError(errTitle) {
|
||||||
|
return plumber({
|
||||||
|
errorHandler: notify.onError({
|
||||||
|
// Customizing error title
|
||||||
|
title: errTitle || "Error running Gulp",
|
||||||
|
message: "Error: <%= error.message %>",
|
||||||
|
sound: true
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// NOTE // to be deleted
|
||||||
|
|
||||||
|
var oldsource = {
|
||||||
|
watch: ['source/style/hippie/**/*.scss', 'source/style/**/*.scss', 'source/templates/**/*.+(html|njk)', 'source/pages/**/*.+(html|njk)'],
|
||||||
|
styles: ['source/style/demo.scss', 'source/style/maintenance.scss'],
|
||||||
|
scripts: ['source/code/hippie/variables.js', 'source/code/hippie/functions.js', 'source/code/hippie/global.js', 'source/code/**/*.coffee', '!source/vendor/**/*', ],
|
||||||
|
images: 'source/art/**/*',
|
||||||
|
pages: 'source/pages/**/*.+(html|njk)',
|
||||||
|
vendor: 'vendor/**/*'
|
||||||
|
};
|
||||||
|
var oldbuild = {
|
||||||
|
styles: 'build/css',
|
||||||
|
scripts: 'build/js',
|
||||||
|
images: 'build/art',
|
||||||
|
vendor: 'build/vendor',
|
||||||
|
root: 'build'
|
||||||
|
}
|
||||||
|
|
||||||
// Task - Clean build directory
|
// Task - Clean build directory
|
||||||
gulp.task('clean', function() {
|
gulp.task('clean', function() {
|
||||||
return del([build.scripts, build.styles, build.images]);
|
return del([oldbuild.scripts, oldbuild.styles, oldbuild.images]);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Task - Styles
|
// Task - Styles
|
||||||
gulp.task('styles', () => rubysass(source.styles, {sourcemap: true})
|
gulp.task('styles', () => rubysass(oldsource.styles, {sourcemap: true})
|
||||||
.on('error', rubysass.logError)
|
.on('error', rubysass.logError)
|
||||||
// .pipe(newer({dest: build.styles, ext: '.css'}))
|
// .pipe(newer({dest: oldbuild.styles, ext: '.css'}))
|
||||||
.pipe(prefix('last 2 version'))
|
.pipe(prefix('last 2 version'))
|
||||||
.pipe(gulp.dest(build.styles))
|
.pipe(gulp.dest(oldbuild.styles))
|
||||||
.pipe(rename({suffix: '.min'}))
|
.pipe(rename({suffix: '.min'}))
|
||||||
.pipe(cssnano())
|
.pipe(cssnano())
|
||||||
.pipe(sourcemap.write('.', {
|
.pipe(sourcemap.write('.', {
|
||||||
includeContent: false,
|
includeContent: false,
|
||||||
sourceRoot: 'source'
|
sourceRoot: 'source'
|
||||||
}))
|
}))
|
||||||
.pipe(gulp.dest(build.styles))
|
.pipe(gulp.dest(oldbuild.styles))
|
||||||
.pipe(browsersync.stream({match: '**/*.css'}))
|
.pipe(browsersync.stream({match: '**/*.css'}))
|
||||||
// .pipe(notify({message: 'Style task complete'}))
|
// .pipe(notify({message: 'Style task complete'}))
|
||||||
);
|
);
|
||||||
|
|
@ -168,7 +236,7 @@ gulp.task('styles', () => rubysass(source.styles, {sourcemap: true})
|
||||||
// Task - Scripts
|
// Task - Scripts
|
||||||
gulp.task('scripts', function(cb) {
|
gulp.task('scripts', function(cb) {
|
||||||
pump([
|
pump([
|
||||||
gulp.src(source.scripts),
|
gulp.src(oldsource.scripts),
|
||||||
cache('scripts'),
|
cache('scripts'),
|
||||||
jshint('.jshintrc'),
|
jshint('.jshintrc'),
|
||||||
jshint.reporter('default'),
|
jshint.reporter('default'),
|
||||||
|
|
@ -177,125 +245,76 @@ gulp.task('scripts', function(cb) {
|
||||||
remember('scripts'),
|
remember('scripts'),
|
||||||
concat('all.min.js'),
|
concat('all.min.js'),
|
||||||
sourcemap.write(),
|
sourcemap.write(),
|
||||||
gulp.dest(build.scripts),
|
gulp.dest(oldbuild.scripts),
|
||||||
browsersync.stream()
|
browsersync.stream()
|
||||||
], cb);
|
], cb);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Task - Images
|
// Task - Images
|
||||||
gulp.task('images', function() {
|
gulp.task('images', function() {
|
||||||
return gulp.src(source.images)
|
return gulp.src(oldsource.images)
|
||||||
.pipe(changed(build.images))
|
.pipe(changed(oldbuild.images))
|
||||||
// .pipe(cache(imagemin({
|
// .pipe(cache(imagemin({
|
||||||
// optimizationLevel: 3,
|
// optimizationLevel: 3,
|
||||||
// progressive: true,
|
// progressive: true,
|
||||||
// interlaced: true })))
|
// interlaced: true })))
|
||||||
// )
|
// )
|
||||||
.pipe(gulp.dest(build.images))
|
.pipe(gulp.dest(oldbuild.images))
|
||||||
// .pipe(notify({ message: 'Images task complete' }))
|
// .pipe(notify({ message: 'Images task complete' }))
|
||||||
;
|
;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Task - Vendor
|
// Task - Vendor
|
||||||
gulp.task('vendor', function() {
|
gulp.task('vendor', function() {
|
||||||
return gulp.src(source.vendor)
|
return gulp.src(oldsource.vendor)
|
||||||
.pipe(plumbError())
|
.pipe(plumbError())
|
||||||
.pipe(gulp.dest(build.vendor))
|
.pipe(gulp.dest(oldbuild.vendor))
|
||||||
;
|
;
|
||||||
});
|
});
|
||||||
|
|
||||||
//Task - Nunjucks
|
//Task - Nunjucks
|
||||||
gulp.task('oldnunjucks', function() {
|
gulp.task('oldnunjucks', function() {
|
||||||
return gulp.src(source.pages)
|
return gulp.src(oldsource.pages)
|
||||||
// .pipe(changed(build.root))
|
// .pipe(changed(oldbuild.root))
|
||||||
.pipe(nunjucks({
|
.pipe(nunjucks({
|
||||||
path: ['source/templates'],
|
path: ['source/templates'],
|
||||||
envOptions: {
|
envOptions: {
|
||||||
trimBlocks: true
|
trimBlocks: true
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
.pipe(gulp.dest(build.root))
|
.pipe(gulp.dest(oldbuild.root))
|
||||||
});
|
});
|
||||||
|
|
||||||
// a task that ensures the other task is complete before reloading browsers
|
// a task that ensures the other task is complete before reloading browsers
|
||||||
gulp.task('overwatch', ['oldnunjucks', 'styles'], function(done) {
|
gulp.task('prewatch', ['oldnunjucks', 'styles'], function(done) {
|
||||||
browsersync.reload();
|
browsersync.reload();
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TEST - Watch
|
|
||||||
gulp.task('watch-js', ['lint:js'], browsersync.reload);
|
|
||||||
|
|
||||||
gulp.task('testwatch', function() {
|
|
||||||
gulp.watch('source/code/**/*.js', ['watch-js'])
|
|
||||||
gulp.watch('source/style/**/*.+(scss|sass)', ['sass', 'lint:scss']);
|
|
||||||
gulp.watch([
|
|
||||||
'source/templates/**/*',
|
|
||||||
'source/pages/**/*.+(html|njk)',
|
|
||||||
'source/data.json'
|
|
||||||
], ['nunjucks']);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Old watch for file changes
|
// Old watch for file changes
|
||||||
gulp.task('watch', ['styles', 'scripts', 'oldnunjucks'], function() {
|
gulp.task('oldwatch', ['styles', 'scripts', 'oldnunjucks'], function() {
|
||||||
browsersync.init({
|
browsersync.init({
|
||||||
open: false,
|
open: false,
|
||||||
server: build.root,
|
server: oldbuild.root,
|
||||||
// proxy: "http://verser.vrt/virtual/"
|
// proxy: "http://verser.vrt/virtual/"
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.watch(source.scripts, ['scripts']).on('change', function(event) {
|
gulp.watch(oldsource.scripts, ['scripts']).on('change', function(event) {
|
||||||
if (event.type === 'deleted') {
|
if (event.type === 'deleted') {
|
||||||
delete cache.caches['scripts'][event.path];
|
delete cache.caches['scripts'][event.path];
|
||||||
remember.forget('scripts', event.path);
|
remember.forget('scripts', event.path);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// gulp.watch(source.watch, ['overwatch']);
|
// gulp.watch(oldsource.watch, ['prewatch']);
|
||||||
gulp.watch(source.watch, ['styles', 'oldnunjucks']).on('change', browsersync.reload);
|
gulp.watch(oldsource.watch, ['styles', 'oldnunjucks']).on('change', browsersync.reload);
|
||||||
// gulp.watch(source.images, ['images']);
|
// gulp.watch(oldsource.images, ['images']);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('olddefault', ['clean', 'styles', 'scripts', 'images', 'nunjucks']);
|
gulp.task('olddefault', ['clean', 'styles', 'scripts', 'images', 'nunjucks']);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// The default task (called when you run `gulp` from cli)
|
|
||||||
gulp.task('default', function(callback) {
|
|
||||||
sequencer(
|
|
||||||
'clean:dev',
|
|
||||||
['sprites', 'lint:js', 'lint:scss'],
|
|
||||||
['sass', 'nunjucks'],
|
|
||||||
['syncreload', 'testwatch'],
|
|
||||||
callback
|
|
||||||
)
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// function errorHandler(err) {
|
// function errorHandler(err) {
|
||||||
// // Logs out error in the command line
|
// // Logs out error in the command line
|
||||||
// console.log(err.toString());
|
// console.log(err.toString());
|
||||||
// // Ends the current pipe, so Gulp watch doesn't break
|
// // Ends the current pipe, so Gulp watch doesn't break
|
||||||
// this.emit('end');
|
// this.emit('end');
|
||||||
// }
|
// }
|
||||||
|
|
||||||
function plumbError(errTitle) {
|
|
||||||
return plumber({
|
|
||||||
errorHandler: notify.onError({
|
|
||||||
// Customizing error title
|
|
||||||
title: errTitle || "Error running Gulp",
|
|
||||||
message: "Error: <%= error.message %>",
|
|
||||||
sound: true
|
|
||||||
})
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
'use strict';
|
"use strict";
|
||||||
|
|
||||||
function setup() {
|
function setup() {
|
||||||
if($('#js_tph').length && full_view_hover) {
|
if($('#js_tph').length && full_view_hover) {
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
'use strict';
|
"use strict";
|
||||||
|
|
||||||
// DOM ready
|
// DOM ready
|
||||||
// ------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------
|
||||||
|
|
@ -22,9 +22,9 @@ $( document ).ready(function() {
|
||||||
function() {
|
function() {
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
|
|
||||||
if($(this).attr("emmet")){
|
// if($(this).attr("emmet")){
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
|
||||||
$(this).next(".exp_pop").show();
|
$(this).next(".exp_pop").show();
|
||||||
}, function() {
|
}, function() {
|
||||||
|
|
@ -47,11 +47,11 @@ $( document ).ready(function() {
|
||||||
$(".exp_help_btn").click(function(e){
|
$(".exp_help_btn").click(function(e){
|
||||||
var $wrap, $pop;
|
var $wrap, $pop;
|
||||||
|
|
||||||
if(exp_mode != true){
|
if(exp_mode !== true){
|
||||||
exp_mode = true;
|
exp_mode = true;
|
||||||
|
|
||||||
$(".js_pop").each(function(i, e){
|
$(".js_pop").each(function(i, e){
|
||||||
if($(this).css("position") == "static") {
|
if($(this).css("position") === "static") {
|
||||||
$(this).addClass("js_changed_pos");
|
$(this).addClass("js_changed_pos");
|
||||||
$(this).css("position", "relative");
|
$(this).css("position", "relative");
|
||||||
}
|
}
|
||||||
|
|
@ -70,7 +70,7 @@ $( document ).ready(function() {
|
||||||
$(this).after($pop);
|
$(this).after($pop);
|
||||||
if($(this).hasClass("js_changed_pos")){
|
if($(this).hasClass("js_changed_pos")){
|
||||||
$(this).css("position", "");
|
$(this).css("position", "");
|
||||||
if($(this).attr("style") == "") {
|
if($(this).attr("style") === "") {
|
||||||
$(this).removeAttr("style");
|
$(this).removeAttr("style");
|
||||||
}
|
}
|
||||||
$(this).removeClass("js_changed_pos");
|
$(this).removeClass("js_changed_pos");
|
||||||
|
|
@ -112,14 +112,14 @@ $( document ).ready(function() {
|
||||||
var i = 0;
|
var i = 0;
|
||||||
$( ".pass-def dd" ).each(function() {
|
$( ".pass-def dd" ).each(function() {
|
||||||
$( this ).find( "li" ).each(function( index ) {
|
$( this ).find( "li" ).each(function( index ) {
|
||||||
if ( 0 == $( this ).children( "ul" ).length ) {
|
if ( 0 === $( this ).children( "ul" ).length ) {
|
||||||
//console.log( index + ": " + $( this ).text() );
|
//console.log( index + ": " + $( this ).text() );
|
||||||
var tempContent = $( this ).html();
|
var tempContent = $( this ).html();
|
||||||
//$( this ).html( "<span class=\"list-count\"></span>" );
|
//$( this ).html( "<span class=\"list-count\"></span>" );
|
||||||
$( this ).html( tempContent +"<span class=\"list-count\">"+ i +"</span>" );
|
$( this ).html( tempContent +"<span class=\"list-count\">"+ i +"</span>" );
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
'use strict';
|
"use strict";
|
||||||
|
|
||||||
var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
|
var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
|
||||||
var h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
|
var h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
|
||||||
|
|
@ -4,6 +4,10 @@
|
||||||
"href": "demo/intro.html",
|
"href": "demo/intro.html",
|
||||||
"text": "Intro"
|
"text": "Intro"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"href": "demo/elements.html",
|
||||||
|
"text": "Elements"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"href": "demo/os.html",
|
"href": "demo/os.html",
|
||||||
"text": "OS"
|
"text": "OS"
|
||||||
|
|
@ -18,10 +22,6 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"links": [
|
"links": [
|
||||||
{
|
|
||||||
"href": "elements.html",
|
|
||||||
"text": "Elements"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"href": "blank.html",
|
"href": "blank.html",
|
||||||
"text": "Blank"
|
"text": "Blank"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
// Override for configuration file
|
// Override for configuration file
|
||||||
|
// All variables setup with !default in gloabl/_config.scss can be used
|
||||||
// ------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// $basic_back_color: yellow;
|
||||||
// $basic_link_color: magenta;
|
// $basic_link_color: magenta;
|
||||||
16
source/style/demo.scss
Normal file
16
source/style/demo.scss
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
// Start a new project by creating YOUR-PROJECT.scss and _YOUR-CONFIG.scss
|
||||||
|
// Then import your config and hippie
|
||||||
|
// NOTE // No css rules allowed in here
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
@import "demo_config";
|
||||||
|
@import "hippie/hippie";
|
||||||
|
|
||||||
|
|
||||||
|
// Additional Modules and variables
|
||||||
|
// in dependency to other basic styles
|
||||||
|
// could be defined here
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
@import "modules/demo/demo_module";
|
||||||
|
// @import "modules/YOUR-MODULE/YOUR-FILES";
|
||||||
|
// New
|
||||||
|
@import "new";
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
// Add hippie
|
|
||||||
// ------------------------------------------------------------------------------
|
|
||||||
@import "hippie";
|
|
||||||
|
|
||||||
// NOTE // No css rules allowed in here
|
|
||||||
|
|
@ -1,30 +1,7 @@
|
||||||
/*
|
|
||||||
* # TABLE OF CONTENTS
|
|
||||||
*
|
|
||||||
* - Reset
|
|
||||||
* - Global functions and mixins
|
|
||||||
* - Configuration
|
|
||||||
* - Special modules
|
|
||||||
* - Basic styles
|
|
||||||
* - Common
|
|
||||||
* - Typography
|
|
||||||
*
|
|
||||||
* - Sections
|
|
||||||
* - Grouping
|
|
||||||
* - Textlevel
|
|
||||||
* - Embedded
|
|
||||||
* - Tables
|
|
||||||
* - Interactive
|
|
||||||
* - Modules
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
// Reset
|
// Reset
|
||||||
// Use a file outside of hippie i.e. vendor/normalize.css
|
// Use a file outside of hippie i.e. vendor/normalize.css
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
@import "../../vendor/normalizecss/normalize.css";
|
@import "../../vendor/normalizecss/normalize.css";
|
||||||
// @import "vendor/YOUR-FILES.css";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -39,26 +16,20 @@
|
||||||
// Fonts
|
// Fonts
|
||||||
// Use a central file outside of hippie for font definitions with @font-face
|
// Use a central file outside of hippie for font definitions with @font-face
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// @import "vendor/fonts.css";
|
// @import "../../vendor/fonts.css";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Global configuration with default values
|
// Global configuration with default values
|
||||||
// Adjustments can be made by copying values from _config.scss to _override.scss
|
|
||||||
// Be careful though changes will get lost if hippie gets updated
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// @import "global/default"; // DO NOT EDIT
|
@import "global/config";
|
||||||
@import "settings"; // EDIT
|
|
||||||
@import "global/config"; // DO NOT EDIT
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Modules and variables
|
// Modules and variables
|
||||||
// Additional modules can be defined here
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
@import "modules/vendor";
|
@import "modules/vendor";
|
||||||
// @import modules/all deprecated because of the new vendor mixin
|
// @import modules/all deprecated because of the new vendor mixin
|
||||||
// @import "modules/YOUR-MODULE/YOUR-FILES";
|
|
||||||
|
|
||||||
// Basic styles - this is the core of definitions
|
// Basic styles - this is the core of definitions
|
||||||
// Individual styles can be added her
|
// Individual styles can be added her
|
||||||
|
|
@ -73,29 +44,10 @@
|
||||||
@import "elements/embedded";
|
@import "elements/embedded";
|
||||||
@import "elements/tables";
|
@import "elements/tables";
|
||||||
@import "elements/interactive";
|
@import "elements/interactive";
|
||||||
// @import "YOU-NAME-IT";
|
|
||||||
|
|
||||||
// Individual Modules and variables
|
// Individual Modules and variables
|
||||||
// in dependency to other styles
|
// in dependency to other styles
|
||||||
// Additional modules can be defined here
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
@import "modules/breakpoint/breakpoint_module";
|
@import "modules/breakpoint/breakpoint_module";
|
||||||
@import "modules/navigation/nav_module";
|
|
||||||
@import "modules/tables/tables_module";
|
@import "modules/tables/tables_module";
|
||||||
@import "modules/card/card_module";
|
@import "modules/maintenance/maintenance_module";
|
||||||
@import "modules/editor/editor_module";
|
|
||||||
@import "modules/explanation/explanation_module";
|
|
||||||
@import "modules/print/print_module";
|
|
||||||
// @import "modules/YOUR-MODULE/YOUR-FILES";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Demonstration
|
|
||||||
@import "modules/demo/demo_module";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Not yet sorted
|
|
||||||
@import "elements/new";
|
|
||||||
|
|
||||||
// NOTE // No css rules allowed in here
|
|
||||||
33
source/style/hippie/_hippie.scss
Normal file
33
source/style/hippie/_hippie.scss
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
/*
|
||||||
|
* # TABLE OF CONTENTS
|
||||||
|
*
|
||||||
|
* - Reset
|
||||||
|
* - Global functions and mixins
|
||||||
|
* - Configuration
|
||||||
|
* - Special modules
|
||||||
|
* - Basic styles
|
||||||
|
* - Common
|
||||||
|
* - Typography
|
||||||
|
*
|
||||||
|
* - Sections
|
||||||
|
* - Grouping
|
||||||
|
* - Textlevel
|
||||||
|
* - Embedded
|
||||||
|
* - Tables
|
||||||
|
* - Interactive
|
||||||
|
* - Modules
|
||||||
|
- Breakpoint
|
||||||
|
- Tables
|
||||||
|
- Maintenance
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@import "basic";
|
||||||
|
|
||||||
|
// Additional Modules and variables
|
||||||
|
// in dependency to other basic styles
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
@import "modules/navigation/nav_module";
|
||||||
|
@import "modules/card/card_module";
|
||||||
|
@import "modules/editor/editor_module";
|
||||||
|
@import "modules/explanation/explanation_module";
|
||||||
|
@import "modules/print/print_module";
|
||||||
|
|
@ -1,102 +1,16 @@
|
||||||
/*
|
// Start a new project by creating YOUR-PROJECT.scss and _YOUR-CONFIG.scss
|
||||||
* # TABLE OF CONTENTS
|
// Then import your config and hippie
|
||||||
*
|
|
||||||
* - Reset
|
|
||||||
* - Global functions and mixins
|
|
||||||
* - Configuration
|
|
||||||
* - Special modules
|
|
||||||
* - Basic styles
|
|
||||||
* - Common
|
|
||||||
* - Typography
|
|
||||||
*
|
|
||||||
* - Sections
|
|
||||||
* - Grouping
|
|
||||||
* - Textlevel
|
|
||||||
* - Embedded
|
|
||||||
* - Tables
|
|
||||||
* - Interactive
|
|
||||||
* - Modules
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
// Reset
|
|
||||||
// Use a file outside of hippie i.e. vendor/normalize.css
|
|
||||||
// -----------------------------------------------------------------------------
|
|
||||||
@import "../vendor/normalizecss/normalize.css";
|
|
||||||
// @import "normalize-css/normalize.css";
|
|
||||||
// @import "vendor/YOUR-FILES.css";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Functions and Mixins
|
|
||||||
// Important code constructions
|
|
||||||
// -----------------------------------------------------------------------------
|
|
||||||
@import "functions/all";
|
|
||||||
@import "mixins/all";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Fonts
|
|
||||||
// Use a central file outside of hippie for font definitions with @font-face
|
|
||||||
// -----------------------------------------------------------------------------
|
|
||||||
// @import "vendor/fonts.css";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Global configuration with default values
|
|
||||||
// Adjustments can be made by copying values from _config.scss to _override.scss
|
|
||||||
// Be careful though changes will get lost if hippie gets updated
|
|
||||||
// -----------------------------------------------------------------------------
|
|
||||||
// @import "global/default"; // DO NOT EDIT
|
|
||||||
@import "settings"; // EDIT
|
|
||||||
@import "global/config"; // DO NOT EDIT
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Modules and variables
|
|
||||||
// Additional modules can be defined here
|
|
||||||
// -----------------------------------------------------------------------------
|
|
||||||
// @import "modules/vendor";
|
|
||||||
// @import modules/all deprecated because of the new vendor mixin
|
|
||||||
// @import "modules/YOUR-MODULE/YOUR-FILES";
|
|
||||||
|
|
||||||
// Basic styles - this is the core of definitions
|
|
||||||
// Individual styles can be added her
|
|
||||||
// -----------------------------------------------------------------------------
|
|
||||||
@import "global/common";
|
|
||||||
@import "elements/typography";
|
|
||||||
// Following the w3c document element structure
|
|
||||||
// https://w3c.github.io/html/index.html#contents
|
|
||||||
@import "elements/sections";
|
|
||||||
@import "elements/grouping";
|
|
||||||
@import "elements/textlevel";
|
|
||||||
@import "elements/embedded";
|
|
||||||
@import "elements/tables";
|
|
||||||
@import "elements/interactive";
|
|
||||||
// @import "YOU-NAME-IT";
|
|
||||||
|
|
||||||
// Individual Modules and variables
|
|
||||||
// in dependency to other styles
|
|
||||||
// Additional modules can be defined here
|
|
||||||
// -----------------------------------------------------------------------------
|
|
||||||
@import "modules/breakpoint/breakpoint_module";
|
|
||||||
// @import "modules/navigation/nav_module";
|
|
||||||
@import "modules/tables/tables_module";
|
|
||||||
// @import "modules/card/card_module";
|
|
||||||
// @import "modules/editor/editor_module";
|
|
||||||
// @import "modules/explanation/explanation_module";
|
|
||||||
// @import "modules/print/print_module";
|
|
||||||
// @import "modules/YOUR-MODULE/YOUR-FILES";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Demonstration
|
|
||||||
@import "modules/maintenance/maintenance_module";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Not yet sorted
|
|
||||||
// @import "elements/new";
|
|
||||||
|
|
||||||
// NOTE // No css rules allowed in here
|
// NOTE // No css rules allowed in here
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
@import "demo_config";
|
||||||
|
@import "hippie/basic";
|
||||||
|
|
||||||
|
|
||||||
|
// Additional Modules and variables
|
||||||
|
// in dependency to other basic styles
|
||||||
|
// could be defined here
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
@import "modules/demo/demo_module";
|
||||||
|
// @import "modules/YOUR-MODULE/YOUR-FILES";
|
||||||
|
// New
|
||||||
|
@import "new";
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
<link rel="icon" href="./favicon.ico" type="image/vnd.microsoft.icon">
|
<link rel="icon" href="./favicon.ico" type="image/vnd.microsoft.icon">
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="./favicon.ico" />
|
<link rel="shortcut icon" type="image/x-icon" href="./favicon.ico" />
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" media="all" href="./css/example.css"/>
|
<link rel="stylesheet" type="text/css" media="all" href="./css/demo.css"/>
|
||||||
<!-- <link rel="stylesheet" type="text/css" media="print" href="./css/print.css"/> -->
|
<!-- <link rel="stylesheet" type="text/css" media="print" href="./css/print.css"/> -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="./favicon.ico" />
|
<link rel="shortcut icon" type="image/x-icon" href="./favicon.ico" />
|
||||||
|
|
||||||
<!-- <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,400italic,500,500italic,700' rel='stylesheet' type='text/css'> -->
|
<!-- <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,400italic,500,500italic,700' rel='stylesheet' type='text/css'> -->
|
||||||
<link rel="stylesheet" type="text/css" media="all" href="../css/example.css"/>
|
<link rel="stylesheet" type="text/css" media="all" href="../css/demo.css"/>
|
||||||
<!-- <link rel="stylesheet" type="text/css" media="print" href="./css/print.css"/> -->
|
<!-- <link rel="stylesheet" type="text/css" media="print" href="./css/print.css"/> -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue