Skip to content

Commit

Permalink
coming soon.
Browse files Browse the repository at this point in the history
  • Loading branch information
cassiuschen committed May 30, 2016
0 parents commit 86495a3
Show file tree
Hide file tree
Showing 17 changed files with 411 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.DS_Store
node_modules
.sass-cache
90 changes: 90 additions & 0 deletions assets/css/application.css
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; } }
1 change: 1 addition & 0 deletions assets/css/application.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added assets/images/bg-s.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/bg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions assets/images/line.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/ruby-china-white-outline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions assets/images/title.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
104 changes: 104 additions & 0 deletions gulpfile.js
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']);

});
25 changes: 25 additions & 0 deletions index.html
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>
22 changes: 22 additions & 0 deletions package.json
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"
}
}
Binary file added src/images/bg-s.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/bg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/images/line.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/ruby-china-white-outline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions src/images/title.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
112 changes: 112 additions & 0 deletions src/stylesheets/application.scss
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;
}
}

0 comments on commit 86495a3

Please sign in to comment.