-
Notifications
You must be signed in to change notification settings - Fork 1
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 86495a3
Showing
17 changed files
with
411 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,3 @@ | ||
.DS_Store | ||
node_modules | ||
.sass-cache |
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,90 @@ | ||
html, body { | ||
overflow: hidden; | ||
width: 100%; | ||
height: 100%; | ||
margin: 0; | ||
padding: 0; | ||
font-size: 0; } | ||
|
||
.bg { | ||
background-image: url("/assets/images/bg.jpg"); | ||
background-size: cover; | ||
background-position: center; | ||
width: 100%; | ||
height: 100%; | ||
position: absolute; | ||
left: 0; | ||
top: 0; | ||
z-index: 10; } | ||
|
||
.mask { | ||
background-color: #fff; | ||
opacity: .25; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
z-index: 100; } | ||
|
||
.content { | ||
width: 100%; | ||
height: 100%; | ||
position: absolute; | ||
z-index: 1000; } | ||
.content #title { | ||
width: 700px; | ||
height: 100%; | ||
display: block; | ||
margin: 0 auto; | ||
background-image: url("/assets/images/title.svg"); | ||
background-repeat: no-repeat; | ||
background-size: 100% auto; | ||
background-position: center; } | ||
.content .info { | ||
position: absolute; | ||
bottom: 0; | ||
width: 100%; | ||
padding-bottom: 50px; } | ||
.content .info .left { | ||
margin-left: 75px; } | ||
.content .info .left a { | ||
height: 45px; | ||
display: inline-block; | ||
vertical-align: bottom; } | ||
.content .info .left a img { | ||
height: 100%; } | ||
.content .info .right { | ||
font-size: 12px; | ||
text-align: right; | ||
color: white; | ||
float: right; | ||
margin-right: 75px; } | ||
|
||
.slash { | ||
display: inline-block; | ||
vertical-align: bottom; | ||
width: 50px; | ||
height: 50px; | ||
background-image: url("/assets/images/line.svg"); | ||
background-repeat: no-repeat; | ||
background-size: contain; | ||
background-position: center; } | ||
|
||
@media (max-width: 700px) { | ||
.bg { | ||
background-image: url("/assets/images/bg-s.jpg"); } | ||
|
||
.content #title { | ||
width: 100%; } | ||
.content .info { | ||
padding-bottom: 20px; } | ||
.content .info .left, .content .info .right { | ||
display: block; | ||
margin: 0; | ||
text-align: center; | ||
width: 100%; | ||
padding-bottom: 10px; } | ||
|
||
.slash { | ||
display: none; } } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,104 @@ | ||
var gulp = require('gulp'), | ||
sass = require('gulp-ruby-sass'), | ||
autoprefixer = require('gulp-autoprefixer'), | ||
minifycss = require('gulp-minify-css'), | ||
rename = require('gulp-rename'), | ||
uglify = require('gulp-uglify'), | ||
concat = require('gulp-concat'), | ||
livereload = require('gulp-livereload'), | ||
connect = require('gulp-connect'); | ||
|
||
gulp.task('default', function() { | ||
// 将你的默认的任务代码放在这 | ||
//gulp.run("libs"); | ||
gulp.run("generate"); | ||
gulp.run("watch"); | ||
gulp.run("server"); | ||
}); | ||
|
||
var paths = { | ||
sassSrcPath: ['src/stylesheets/application.scss'], | ||
sassDestPath: ['assets/css/'], | ||
sassImportsPath: ['src/stylesheets/'] | ||
}; | ||
|
||
gulp.task('scss', function() { | ||
gulp.src(paths.sassSrcPath) | ||
//.pipe(autoprefixer({ | ||
// browsers: ['last 5 Chrome versions', 'iOS > 0', 'Android > 0', '> 5%'], | ||
// cascade: true, | ||
// remove:true | ||
// })) | ||
sass(paths.sassSrcPath,{precision: 5, loadPath: [paths.sassImportsPath]} ) | ||
|
||
//.pipe(uncss({html: ['public/*.html']})) | ||
.pipe(gulp.dest('assets/css')) | ||
.pipe(rename({suffix: '.min'})) | ||
.pipe(minifycss()) | ||
.pipe(gulp.dest('assets/css')); | ||
}); | ||
|
||
gulp.task('image', function() { | ||
gulp.src('./src/images/*.*') | ||
//.pipe(imagemin({ | ||
// progressive: true, | ||
// svgoPlugins: [{removeViewBox: false}] | ||
// })) | ||
.pipe(gulp.dest('assets/images')); | ||
gulp.src(['./src/images/*.jpg', './src/images/*.png']) | ||
//.pipe(imagemin({ | ||
// progressive: true, | ||
// svgoPlugins: [{removeViewBox: false}] | ||
// })) | ||
.pipe(gulp.dest('assets/images')); | ||
}); | ||
|
||
gulp.task('js', function() { | ||
gulp.src(['./src/javascripts/*.js','./src/javascripts/**/*.js']) | ||
.pipe(gulp.dest('assets/js')) | ||
.pipe(rename({suffix: '.min'})) | ||
.pipe(uglify()) | ||
.pipe(gulp.dest('assets/js')); | ||
}); | ||
|
||
// Basic Functions Done ================================== | ||
|
||
// Libs Done ============================================ | ||
|
||
// Start a Assets Server ============================ | ||
gulp.task('server', [ 'generate' ], function() { | ||
return connect.server({ | ||
root: [ '.' ], | ||
livereload: true | ||
}); | ||
}); | ||
|
||
// Server Doen ====================================== | ||
|
||
gulp.task('generate', ['image', 'scss', 'js']) | ||
|
||
gulp.task('clean', function(cb) { | ||
del(['assets/css/*.css', 'assets/css/*.map', 'assets/js'], cb) | ||
}); | ||
|
||
gulp.task('reload', ['clean', 'default']) | ||
|
||
gulp.task('watch', function() { | ||
|
||
livereload.listen(); | ||
gulp.watch(['src/**']).on('change', livereload.changed); | ||
|
||
gulp.watch('src/images/*.*', ['image']); | ||
|
||
// Watch .scss files/ | ||
gulp.watch('src/stylesheets/**/*.css', ['css']); | ||
gulp.watch('src/stylesheets/*.css', ['css']); | ||
gulp.watch('src/stylesheets/**/*.scss', ['scss']); | ||
gulp.watch('src/stylesheets/*.scss', ['scss']); | ||
|
||
|
||
// Watch .js files | ||
gulp.watch('src/javascripts/*.js', ['js']); | ||
gulp.watch('src/javascripts/**/*.js', ['js']); | ||
|
||
}); |
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,25 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>RubyConf. China 2016</title> | ||
<link rel="stylesheet" href="/assets/css/application.min.css"> | ||
|
||
</head> | ||
<body> | ||
<div class="bg"></div> | ||
<div class="mask"></div> | ||
<div class="content"> | ||
<div id="title"></div> | ||
<div class="info"> | ||
<div class="left"> | ||
<div class="slash"></div> | ||
<a href="https://ruby-china.org"> | ||
<img src="/assets/images/ruby-china-white-outline.png" alt=""> | ||
</a> | ||
</div> | ||
<div class="right">Copyright 2016, RubyChina.</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
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,22 @@ | ||
{ | ||
"name": "ruby-conf-china", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "Cassius Chen", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"gulp": "^3.9.1", | ||
"gulp-autoprefixer": "^3.1.0", | ||
"gulp-concat": "^2.6.0", | ||
"gulp-connect": "^4.0.0", | ||
"gulp-livereload": "^3.8.1", | ||
"gulp-minify-css": "^1.2.4", | ||
"gulp-rename": "^1.2.2", | ||
"gulp-ruby-sass": "^2.0.6", | ||
"gulp-uglify": "^1.5.3" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,112 @@ | ||
html, body { | ||
overflow: hidden; | ||
width: 100%; | ||
height: 100%; | ||
margin: 0; | ||
padding: 0; | ||
font-size: 0; | ||
} | ||
|
||
.bg { | ||
background-image: url('/assets/images/bg.jpg'); | ||
background-size: cover; | ||
background-position: center; | ||
width: 100%; | ||
height: 100%; | ||
position: absolute; | ||
left: 0; | ||
top: 0; | ||
z-index: 10; | ||
} | ||
|
||
.mask { | ||
background-color: #fff; | ||
opacity: .25; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
z-index: 100; | ||
} | ||
|
||
.content { | ||
width: 100%; | ||
height: 100%; | ||
position: absolute; | ||
z-index: 1000; | ||
|
||
#title { | ||
width: 700px; | ||
height: 100%; | ||
display: block; | ||
margin: 0 auto; | ||
background-image: url('/assets/images/title.svg'); | ||
background-repeat: no-repeat; | ||
background-size: 100% auto; | ||
background-position: center; | ||
} | ||
|
||
.info { | ||
position: absolute; | ||
bottom: 0; | ||
width: 100%; | ||
padding-bottom: 50px; | ||
.left { | ||
margin-left: 75px; | ||
a { | ||
height: 45px; | ||
display: inline-block; | ||
vertical-align: bottom; | ||
img { | ||
height: 100%; | ||
} | ||
} | ||
} | ||
.right { | ||
font-size: 12px; | ||
text-align: right; | ||
color: white; | ||
float: right; | ||
margin-right: 75px; | ||
} | ||
} | ||
} | ||
|
||
.slash { | ||
display: inline-block; | ||
vertical-align: bottom; | ||
width: 50px; | ||
height: 50px; | ||
background-image: url('/assets/images/line.svg'); | ||
background-repeat: no-repeat; | ||
background-size: contain; | ||
background-position: center; | ||
} | ||
|
||
@media (max-width: 700px) { | ||
.bg { | ||
background-image: url('/assets/images/bg-s.jpg'); | ||
} | ||
|
||
.content { | ||
#title { | ||
width: 100%; | ||
} | ||
|
||
.info { | ||
padding-bottom: 20px; | ||
.left, .right { | ||
display: block; | ||
margin: 0; | ||
text-align: center; | ||
width: 100%; | ||
padding-bottom: 10px; | ||
} | ||
} | ||
} | ||
|
||
.slash { | ||
display: none; | ||
} | ||
} |