-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9da3edf
Showing
38 changed files
with
1,083 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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,6 @@ | ||
*.log | ||
~* | ||
|
||
node_modules | ||
gh-pages | ||
.publish |
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 @@ | ||
# [blivesta.com](http://blivesta.com) |
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,262 @@ | ||
'use strict'; | ||
|
||
var banner = [ | ||
'/*!', | ||
' * <%= pkg.name %> - <%= pkg.description %>', | ||
' * Version <%= pkg.version %>', | ||
' * <%= pkg.homepage %>', | ||
' * Author : <%= pkg.author %>', | ||
' * License : <%= pkg.license %>', | ||
' */', | ||
'' | ||
].join('\n'); | ||
|
||
var del = require('del'); | ||
var fs = require('fs'); | ||
var ghpages = require('gulp-gh-pages'); | ||
var gulp = require('gulp'); | ||
var pkg = require('./package.json'); | ||
var pagespeed = require('psi'); | ||
var rename = require('gulp-rename'); | ||
var runSequence = require('run-sequence'); | ||
|
||
var browserify = require('browserify'); | ||
var jshint = require('gulp-jshint'); | ||
var source = require('vinyl-source-stream'); | ||
var stylish = require('jshint-stylish'); | ||
var uglify = require('gulp-uglify'); | ||
|
||
var csso = require('gulp-csso'); | ||
var cssnext = require('gulp-cssnext'); | ||
var header = require('gulp-header'); | ||
|
||
var browserSync = require('browser-sync'); | ||
var reload = browserSync.reload; | ||
|
||
var fm = require('gulp-front-matter'); | ||
var sitemap = require('gulp-sitemap'); | ||
var hb = require('gulp-hb'); | ||
var htmlmin = require('gulp-htmlmin'); | ||
var htmlhint = require("gulp-htmlhint"); | ||
var yaml = require('js-yaml'); | ||
|
||
// ---------------------------------------------------------------- | ||
|
||
gulp.task('html', function() { | ||
return gulp | ||
.src(['src/**/*.hbs', '!src/{partials,partials/**}']) | ||
.pipe(fm({ | ||
property: 'meta' | ||
})) | ||
.pipe(hb({ | ||
bustCache: true, | ||
debug: true, | ||
data: { | ||
pkg: pkg, | ||
site: yaml.safeLoad(fs.readFileSync('./site.yml', 'utf8')) | ||
}, | ||
helpers: './node_modules/site-boilerplate-helpers/index.js', | ||
partials: './src/partials/**/*.hbs' | ||
})) | ||
.pipe(rename(function(path) { | ||
if (path.basename == 'index') { | ||
path.extname = '.html'; | ||
} else { | ||
path.dirname = (path.dirname ? path.dirname + '/' : '') + path.basename; | ||
path.basename = 'index'; | ||
path.extname = '.html'; | ||
} | ||
})) | ||
.pipe(gulp.dest('./gh-pages')); | ||
}); | ||
|
||
gulp.task('htmlmin', function() { | ||
return gulp | ||
.src('./gh-pages/**/*.html') | ||
.pipe(htmlmin({ | ||
collapseWhitespace: true | ||
})) | ||
.pipe(gulp.dest('./gh-pages')); | ||
}); | ||
|
||
gulp.task('htmlhint', function() { | ||
return gulp | ||
.src('./gh-pages/**/*.html') | ||
.pipe(htmlhint()) | ||
.pipe(htmlhint.reporter('htmlhint-stylish')); | ||
}); | ||
|
||
gulp.task('sitemap', function() { | ||
return gulp | ||
.src('./gh-pages/**/*.html') | ||
.pipe(sitemap({ | ||
siteUrl: pkg.homepage | ||
})) | ||
.pipe(gulp.dest('./gh-pages')); | ||
}); | ||
|
||
// ---------------------------------------------------------------- | ||
|
||
gulp.task('js', function() { | ||
return browserify('./src/js/blivesta.js', { | ||
debug: true | ||
}) | ||
.bundle() | ||
.on('error', function(err) { | ||
console.log('Error : ' + err.message); | ||
this.emit('end'); | ||
}) | ||
.pipe(source('blivesta.js')) | ||
.pipe(gulp.dest('./gh-pages/js')); | ||
}); | ||
|
||
gulp.task('jsmin', function() { | ||
return gulp | ||
.src('./gh-pages/js/blivesta.js') | ||
.pipe(uglify()) | ||
.pipe(gulp.dest('./gh-pages/js')); | ||
}); | ||
|
||
gulp.task('jshint', function() { | ||
return gulp | ||
.src('./src/**/*.js') | ||
.pipe(jshint()) | ||
.pipe(jshint.reporter(stylish)); | ||
}); | ||
|
||
// ---------------------------------------------------------------- | ||
|
||
gulp.task('css', function() { | ||
return gulp | ||
.src('./src/css/blivesta.css') | ||
.pipe(header(banner, { | ||
pkg: pkg | ||
})) | ||
.pipe(cssnext({ | ||
browsers: ['last 2 versions'], | ||
sourcemap: true | ||
})) | ||
.pipe(gulp.dest('./gh-pages/css')); | ||
}); | ||
|
||
gulp.task('cssmin', function() { | ||
return gulp | ||
.src('./gh-pages/css/blivesta.css') | ||
.pipe(csso()) | ||
.pipe(gulp.dest('./gh-pages/css')); | ||
}); | ||
|
||
// ---------------------------------------------------------------- | ||
|
||
gulp.task('serve', function() { | ||
browserSync.init({ | ||
server: { | ||
baseDir: './gh-pages', | ||
open: 'external' | ||
} | ||
}); | ||
gulp.watch(['./src/css/**/*.css'], ['css']); | ||
gulp.watch(['./src/js/**/*.js'], ['js']); | ||
gulp.watch(['./src/**/*.hbs'], ['html']); | ||
gulp.watch(['./gh-pages/{css,js}/*.{css,js}']).on('change', reload); | ||
gulp.watch(['./gh-pages/*.html']).on('change', reload); | ||
}); | ||
|
||
// ---------------------------------------------------------------- | ||
|
||
gulp.task('pagespeed', function() { | ||
return pagespeed(pkg.homepage, { | ||
nokey: 'true', | ||
strategy: 'desktop', | ||
}, function(err, data) { | ||
console.log('Score: ' + data.score); | ||
console.log('Page stats'); | ||
console.log(data.pageStats); | ||
}); | ||
}); | ||
|
||
|
||
gulp.task('copy', function() { | ||
return gulp | ||
.src([ | ||
'./src/webfonts/**', | ||
'./src/ico/**' | ||
],{ | ||
base:"./src" | ||
}) | ||
.pipe(gulp.dest('./gh-pages/')); | ||
}); | ||
|
||
|
||
|
||
// ---------------------------------------------------------------- | ||
|
||
gulp.task('cleanup', function(cb) { | ||
return del(['./gh-pages'], cb); | ||
}); | ||
|
||
// ---------------------------------------------------------------- | ||
|
||
gulp.task('ghpages', function() { | ||
return gulp | ||
|
||
.src('./gh-pages/**/*') | ||
.pipe(ghpages({ | ||
remoteUrl: '[email protected]:blivesta-com/blivesta-com.github.io.git', | ||
branch: 'master' | ||
})); | ||
}); | ||
|
||
gulp.task('ghpages-staging', function() { | ||
return gulp | ||
.src('./gh-pages/**/*') | ||
.pipe(ghpages({ | ||
remoteUrl: '[email protected]:blivesta/staging.git', | ||
branch: 'gh-pages' | ||
})); | ||
}); | ||
|
||
|
||
// ---------------------------------------------------------------- | ||
|
||
gulp.task('minify', ['cssmin', 'jsmin', 'htmlmin']); | ||
|
||
// ---------------------------------------------------------------- | ||
|
||
gulp.task('default', ['build'], function(cb) { | ||
runSequence( | ||
['serve'], | ||
cb | ||
); | ||
}); | ||
|
||
// ---------------------------------------------------------------- | ||
|
||
gulp.task('build', ['cleanup'], function(cb) { | ||
runSequence( | ||
'js', 'css', 'html', 'copy', | ||
['sitemap', 'jshint', 'htmlhint'], | ||
cb | ||
); | ||
}); | ||
|
||
// ---------------------------------------------------------------- | ||
|
||
gulp.task('deploy', ['build'], function(cb) { | ||
runSequence( | ||
['minify'], | ||
'ghpages', ['pagespeed'], | ||
cb | ||
); | ||
}); | ||
|
||
// ---------------------------------------------------------------- | ||
|
||
gulp.task('staging', ['build'], function(cb) { | ||
runSequence( | ||
['minify'], | ||
'ghpages-staging', | ||
['pagespeed'], | ||
cb | ||
); | ||
}); |
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,41 @@ | ||
{ | ||
"name": "blivesta.com", | ||
"description": "Desgin & Build Based in Tokyo", | ||
"author": "Yasuyuki Enomoto <[email protected]> (http://blivesta.com/)", | ||
"homepage": "http://blivesta.com/", | ||
"scripts": { | ||
"setup": "npm i && gulp build", | ||
"build": "gulp build" | ||
}, | ||
"private":true, | ||
"dependencies": { | ||
"jquery": "3.0.0-alpha1", | ||
"normalize.css":"^3.0.3", | ||
"sircus": "^1.0.0-alpha.3" | ||
}, | ||
"devDependencies": { | ||
"browser-sync": "^2.8.0", | ||
"browserify": "^11.0.0", | ||
"del": "^1.2.0", | ||
"gulp": "^3.9.0", | ||
"gulp-cssnext": "^1.0.1", | ||
"gulp-csso":"1.0.0", | ||
"gulp-front-matter": "^1.2.3", | ||
"gulp-hb": "^2.6.1", | ||
"gulp-gh-pages": "^0.5.2", | ||
"gulp-header": "^1.2.2", | ||
"gulp-htmlhint": "^0.3.0", | ||
"gulp-htmlmin": "^1.1.3", | ||
"gulp-jshint": "^1.11.2", | ||
"gulp-rename": "^1.2.2", | ||
"gulp-sitemap": "^2.1.1", | ||
"gulp-uglify": "^1.2.0", | ||
"htmlhint-stylish": "^1.0.3", | ||
"js-yaml": "^3.3.1", | ||
"jshint-stylish": "^2.0.1", | ||
"psi": "^1.0.6", | ||
"run-sequence": "^1.1.2", | ||
"site-boilerplate-helpers": "^1.0.1", | ||
"vinyl-source-stream": "^1.1.0" | ||
} | ||
} |
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,4 @@ | ||
title: blivesta Web site | ||
repo_url: https://github.com/blivesta/blivesta.com | ||
url: http://blivesta.com/ | ||
description: Design & Build Based in Tokyo |
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 @@ | ||
www.blivesta.com |
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,37 @@ | ||
@import "normalize.css"; | ||
|
||
@import "sircus"; | ||
|
||
@import "./elements/elements"; | ||
|
||
@import "./layouts/header"; | ||
@import "./layouts/footer"; | ||
|
||
@import "./components/wrap"; | ||
@import "./components/icon"; | ||
@import "./components/card"; | ||
@import "./components/block"; | ||
@import "./components/text"; | ||
@import "./components/sns"; | ||
@import "./components/ruler"; | ||
|
||
|
||
:root { | ||
--g-primary: rgba(0, 0, 0, 1); | ||
|
||
--g-fontFamily-ag: "ITCAvantGardeW04-Bold"; | ||
--g-fontFamily-sansEn: "Helvetica Neue", Helvetica, sans-serif; | ||
--g-fontFamily: var(--g-fontFamily-ag); | ||
|
||
--g-borderColor: var(--g-primary); | ||
|
||
--body-fontFamily: var(--g-fontFamily); | ||
--body-fontColor: var(--g-primary); | ||
--body-fill: var(--g-primary); | ||
|
||
--heading-color: var(--g-primary); | ||
|
||
--link-color: var(--g-primary); | ||
--link-color-hover: var(--g-primary); | ||
|
||
} |
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,15 @@ | ||
.Block { | ||
padding-top: 20%; | ||
padding-bottom: 20%; | ||
} | ||
|
||
.Block--borderTop { | ||
border-top: 3px solid var(--g-borderColor); | ||
} | ||
|
||
@media (--g-viewport-sm) { | ||
.Block { | ||
padding-top: 8%; | ||
padding-bottom: 8%; | ||
} | ||
} |
Oops, something went wrong.