diff --git a/.gitignore b/.gitignore
index 7c797f2..d7c2e9c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,7 +4,5 @@ dist
.sass-cache
bower_components
test/bower_components
-awsConfig.json
-.awspublish-th-splash
-deployConfig.json
+deployConfig.js
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..1720f90
--- /dev/null
+++ b/README.md
@@ -0,0 +1,18 @@
+example config `deployConfig.js`
+
+```js
+module.exports = {
+ staging: {
+ host: '123',
+ user: 'ubuntu',
+ keyLocation: '/Users/mattia/.ssh/xxx.pem',
+ remotePath: '/var/www/techhub.com/splash'
+ },
+ production: {
+ host: '123',
+ user: 'ubuntu',
+ keyLocation: '/Users/mattia/.ssh/id_rsa',
+ remotePath: '/var/www/techhub.com/splash'
+ }
+}
+```
\ No newline at end of file
diff --git a/app/index.html b/app/index.html
index df47178..868e2ef 100644
--- a/app/index.html
+++ b/app/index.html
@@ -78,6 +78,12 @@
exports.loadCSS = n : e.loadCSS = n
}("undefined" != typeof global ? global : this);
loadCSS('https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css');
+ var trackOutboundLink = function(url) {
+ ga('send', 'event', 'outbound', 'click', url, {
+ 'transport': 'beacon',
+ 'hitCallback': function(){document.location = url;}
+ });
+ }
@@ -192,7 +198,7 @@
The global community
for technology startups
- Attend an Event
+ Attend an Event
Locations
diff --git a/app/scripts/main.js b/app/scripts/main.js
index 93c30a6..3e7abc6 100644
--- a/app/scripts/main.js
+++ b/app/scripts/main.js
@@ -2,7 +2,18 @@
'use strict';
// link membership boxes
- $('.full-bg-membership').click(function() {
+ $('.full-bg-flex').click(function() {
+ ga('send', 'event', 'main_flex', 'click');
+ window.open('https://apply.techhub.com');
+ });
+
+ $('.full-bg-resident').click(function() {
+ ga('send', 'event', 'main_resident', 'click');
+ window.open('https://apply.techhub.com');
+ });
+
+ $('.full-bg-team').click(function() {
+ ga('send', 'event', 'main_team', 'click');
window.open('https://apply.techhub.com');
});
@@ -11,6 +22,7 @@
// smooth scroll
$('#join-the-community').click(function() {
+ ga('send', 'event', 'join_community', 'click');
if (location.pathname.replace(/^\//, '') === this.pathname.replace(/^\//, '') && location.hostname === this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
diff --git a/gulpfile.babel.js b/gulpfile.babel.js
index 0216222..bbf3ab7 100644
--- a/gulpfile.babel.js
+++ b/gulpfile.babel.js
@@ -14,23 +14,7 @@ import s3Index from 'gulp-s3-index';
const $ = gulpLoadPlugins();
const reload = browserSync.reload;
-const awsConfig = JSON.parse(fs.readFileSync('./awsConfig.json'));
-const deployConfig = JSON.parse(fs.readFileSync('./deployConfig.json'));
-
-const publisher = $.awspublish.create({
- 'params': {
- 'Bucket': 'th-splash',
- },
- 'accessKeyId': awsConfig.key,
- 'secretAccessKey': awsConfig.secret,
-});
-
-const cloudfrontConfig = {
- 'accessKeyId': awsConfig.key,
- 'secretAccessKey': awsConfig.secret,
- 'distributionId': awsConfig.distributionId,
- 'bucket':'th-splash',
-};
+const deployConfig = require('./deployConfig');
gulp.task('styles', () => {
return gulp.src('app/styles/*.scss')
@@ -126,12 +110,11 @@ gulp.task('images', () => {
.pipe(gulp.dest('dist/images'));
});
-gulp.task('fonts', () => {
- return gulp.src(require('main-bower-files')('**/*.{eot,svg,ttf,woff,woff2}', function(err) {})
- .concat('app/fonts/**/*'))
- .pipe(gulp.dest('.tmp/fonts'))
- .pipe(gulp.dest('dist/fonts'));
-});
+// gulp.task('fonts', () => {
+// return gulp.src('app/fonts/**/*')
+// .pipe(gulp.dest('.tmp/fonts'))
+// .pipe(gulp.dest('dist/fonts'));
+// });
gulp.task('videos', () => {
return gulp.src('app/videos/*.*')
@@ -149,7 +132,7 @@ gulp.task('extras', () => {
gulp.task('clean', del.bind(null, ['.tmp', 'dist']));
-gulp.task('serve', ['styles', 'scripts', 'fonts'], () => {
+gulp.task('serve', ['styles', 'scripts'], () => {
browserSync({
notify: false,
port: 9000,
@@ -165,13 +148,10 @@ gulp.task('serve', ['styles', 'scripts', 'fonts'], () => {
'app/*.html',
'.tmp/scripts/**/*.js',
'app/images/**/*',
- '.tmp/fonts/**/*'
]).on('change', reload);
gulp.watch('app/styles/**/*.scss', ['styles']);
gulp.watch('app/scripts/**/*.js', ['scripts']);
- gulp.watch('app/fonts/**/*', ['fonts']);
- gulp.watch('bower.json', ['wiredep', 'fonts']);
});
gulp.task('serve:dist', () => {
@@ -203,25 +183,6 @@ gulp.task('serve:test', ['scripts'], () => {
gulp.watch('test/spec/**/*.js', ['lint:test']);
});
-gulp.task('publish', () => {
- // define custom headers
- const headers = {
- 'Cache-Control': 'max-age=315360000, no-transform, public'
- };
-
- let revAll = new RevAll({ dontRenameFile: [/^\/favicon.ico$/g, 'robots.txt', 'apple-touch-icon.png'], });
-
- return gulp.src('dist/**/*.*')
- // .pipe(revAll.revision())
- .pipe($.awspublish.gzip())
- .pipe(publisher.publish(headers))
- .pipe(publisher.sync())
- .pipe(publisher.cache())
- .pipe($.awspublish.reporter())
- .pipe($.cloudfront(cloudfrontConfig))
- // .pipe(s3Index(cloudfrontConfig));
-});
-
gulp.task('sftp_staging', function () {
return gulp.src('dist/**/*.*')
.pipe($.sftp(deployConfig.staging));
@@ -255,7 +216,7 @@ gulp.task('wiredep', () => {
.pipe(gulp.dest('app'));
});
-gulp.task('build', ['lint', 'html', 'images', 'fonts', 'videos', 'extras'], () => {
+gulp.task('build', ['lint', 'html', 'images', 'videos', 'extras'], () => {
return gulp.src('dist/**/*').pipe($.size({
title: 'build',
gzip: true