Permalink
Browse files

* Merge in common platform changes.

* Various improvements.
* Use SVG for logos.
  • Loading branch information...
1 parent 96f511a commit 403f3985a72266e308165d266617553d5c5369c7 @dannyakakong committed Jan 5, 2015
View
@@ -0,0 +1,108 @@
+var gulp = require('gulp');
+
+var clean = require('gulp-clean');
+var concat = require('gulp-concat');
+var header = require('gulp-header');
+var uglify = require('gulp-uglify');
+var stylus = require('gulp-stylus');
+var autoprefixer = require('gulp-autoprefixer');
+var minifyCSS = require('gulp-minify-css');
+var cleanhtml = require('gulp-cleanhtml');
+var imagemin = require('gulp-imagemin');
+
+
+gulp.task('clean_js', function () {
+ 'use strict';
+
+ return gulp.src(
+ [
+ './static/js/min'
+ ],
+ {
+ read: false
+ })
+ .pipe(clean());
+});
+
+gulp.task('js', ['clean_js'], function () {
+ 'use strict';
+
+ return gulp.src(
+ [
+ './static/js/shadowbox.js',
+ './static/js/base.js'
+ ])
+ .pipe(concat('all.js'))
+ .pipe(uglify())
+ .pipe(header('// enzyme-project.org ' + new Date().toISOString().replace(/T/, ' ').replace(/\..+/, '') + '\n'))
+ .pipe(gulp.dest('./static/js/min'));
+});
+
+
+gulp.task('clean_css', function () {
+ 'use strict';
+
+ return gulp.src(
+ [
+ './static/css/min'
+ ],
+ {
+ read: false
+ })
+ .pipe(clean());
+});
+
+gulp.task('css', ['clean_css'], function () {
+ 'use strict';
+
+ return gulp.src(
+ [
+ './static/css/style.styl'
+ ])
+ .pipe(concat('all.css'))
+ .pipe(stylus({
+ use: ['nib']
+ }))
+ .pipe(autoprefixer('last 1 version', '> 1%', 'ie 8', 'ie 7'))
+ .pipe(minifyCSS({
+ 'removeEmpty': true
+ }))
+ .pipe(header('/* enzyme-project.org ' + new Date().toISOString().replace(/T/, ' ').replace(/\..+/, '') + '*/\n'))
+ .pipe(gulp.dest('./static/css/min'));
+});
+
+
+gulp.task('clean_html', function () {
+ 'use strict';
+
+ return gulp.src(
+ [
+ './templates/min'
+ ],
+ {
+ read: false
+ })
+ .pipe(clean());
+});
+
+gulp.task('html', ['clean_html'], function () {
+ 'use strict';
+
+ return gulp.src('./templates/**/*.html')
+ .pipe(cleanhtml())
+ .pipe(gulp.dest('./templates/min'));
+});
+
+
+gulp.task('img', function () {
+ 'use strict';
+
+ return gulp.src('./static/img/**/*')
+ .pipe(imagemin())
+ .pipe(gulp.dest('./static/img'));
+});
+
+
+gulp.task('default', [
+ 'js', 'css', 'html'
+]);
View
@@ -14,11 +14,16 @@
app = Flask(__name__)
+app.config["TESTING"] = False
app.config["STATIC_MINIFY_FILENAME"] = {
- ".js": ".min.js",
- ".css": ".min.css",
+ "js/": "js/min/",
+ "css/": "css/min/",
}
+# set template directory (original vs. minified)
+if not app.config["TESTING"]:
+ app.template_folder += "/min"
+
@app.template_filter("humandate")
def humandate(value):
@@ -74,7 +79,7 @@ def index():
"site_url": "http://enzyme-project.org/",
"product_name": "Enzyme Project",
"copyright": (
- 2010, 2014
+ 2010, 2015
),
"github_enzyme": "https://github.com/dannyakakong/Enzyme",
@@ -108,5 +113,5 @@ def index():
if __name__ == "__main__":
- app.debug = True
+ app.debug = app.config["TESTING"]
app.run()
@@ -0,0 +1,2 @@
+/* enzyme-project.org 2015-01-05 01:10:06*/
+html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}table{border-collapse:collapse;border-spacing:0}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(http://themes.googleusercontent.com/static/fonts/opensans/v7/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(http://themes.googleusercontent.com/static/fonts/opensans/v7/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:400;src:local('Open Sans Italic'),local('OpenSans-Italic'),url(http://themes.googleusercontent.com/static/fonts/opensans/v7/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff) format('woff')}body{background-color:#f8f8f9;font-family:'Open Sans',sans-serif;margin:0;font-size:1.1em;line-height:1.4em}div.container{padding:2em}div.container article{margin:3em 0 0}div.container article.hero{max-width:50%;margin-top:1em;padding:0 0 2em;border-bottom:1px solid #e6e6e6}div.container article.hero ul{padding:0 0 1em 2em;list-style:disc}div.container article.hero ul li{margin-bottom:1em}h1,h2,h3{font-weight:700;line-height:1em;margin:0}h1{font-size:2.5em;margin:0 0 .5em -.05em}h2{font-size:1.5em}p{margin:1em 0}b{font-weight:700}i{font-style:italic}section{margin:1em}section ul{list-style:square;margin:0 0 0 1em;padding:0;line-height:1.5em}header,footer{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}header{position:relative;top:0;padding:8px;background-color:#000}header a.logo{display:block;width:214px;height:38px;cursor:pointer}header a.logo svg{opacity:.8;-ms-filter:"alpha(Opacity=80)";filter:alpha(opacity=80)}header a.logo svg:hover{opacity:1;-ms-filter:none;-webkit-filter:none;filter:none}header nav ul{position:absolute;right:0;top:0;padding:0;margin:0;list-style:none}header nav ul li{display:inline-block}header nav ul li a{display:inline-block;margin-left:-5px;padding:15px 20px;height:54px;text-transform:uppercase;color:#a9a39c;text-decoration:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}header nav ul li a:hover{color:#fff;background-color:#5b628f}article a[href]{color:#000;text-decoration:none;padding-bottom:-1px;border-bottom:1px dotted #000}article a[href]:hover{border-bottom-style:solid}div.container article.l-features{max-width:50%}aside{position:absolute;top:6.75em;padding:1em;right:3.5em;max-width:30%;background:rgba(0,0,0,.8);color:#e6e6e6;border-radius:.5em}aside h2{font-weight:700}aside ul{list-style:none;padding:0;margin:1em 0 0;border-top:2px solid #e6e6e6;border-bottom:2px solid #e6e6e6}aside ul li{padding:1em 0;border-bottom:2px dotted #e6e6e6}aside ul li:last-child{border-bottom:0}aside#commits h2 a{color:#fff;text-decoration:none;padding-bottom:-1px;border-bottom:1px dotted #fff}aside#commits h2 a:hover{border-bottom-style:solid}aside#commits h2 a span{display:inline-block;position:absolute;top:19px;right:16px}aside#commits h2 a span svg{fill:#fff}aside#commits h2 a span i{display:none}aside#commits ul{max-height:328px;overflow-y:auto;padding-right:22px}aside#commits ul a{color:#e6e6e6;text-decoration:none}aside#commits ul .message{font-size:.95em;margin-right:1em}aside#commits ul .date{font-size:.8em}footer{padding:10px;background:#000}footer p{display:inline-block;padding:0;margin:0;font-size:1em;color:#fff}footer p.licence{float:right}footer p a{color:#fff;text-decoration:none;padding-bottom:-1px;border-bottom:1px dotted #fff}footer p a:hover{border-bottom-style:solid}.l-screenshots h2 span{display:inline-block;margin-left:.25em;font-style:italic;font-weight:400;font-size:.6em;color:#999}.l-screenshots ul{list-style:none;margin:0;line-height:0}.l-screenshots ul li{display:inline-block;width:320px;margin:0 1em 0 0;vertical-align:top}.l-screenshots ul li h3{display:block;margin:0 0 .3em;font-size:1.2em}.l-screenshots ul li p{display:block;line-height:1.2em;margin:0 0 2em}.l-screenshots ul li a{display:block;padding:.5em;margin:0 0 1em;border:1px solid #e6e6e6}.l-screenshots ul li a img{border:1px solid #ccc}.l-screenshots ul li a:hover{background-color:#fff;border:1px solid #ccc}.l-screenshots ul li a:hover img{border:1px solid #999}#sb-title-inner,#sb-info-inner,#sb-loading-inner{font-family:HelveticaNeue-Light,"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:200;color:#fff}#sb-container{position:fixed;margin:0;padding:0;top:0;left:0;z-index:999;text-align:left;visibility:hidden;display:none}#sb-overlay{position:relative;height:100%;width:100%}#sb-wrapper{position:absolute;visibility:hidden;width:100px}#sb-wrapper-inner{position:relative;border:1px solid #303030;overflow:hidden;height:100px}#sb-body{position:relative;height:100%}#sb-body-inner{position:absolute;height:100%;width:100%}#sb-body img{border:0}#sb-loading{position:relative;height:100%}#sb-loading-inner{position:absolute;font-size:14px;line-height:24px;height:24px;top:50%;margin-top:-12px;width:100%;text-align:center}#sb-loading-inner span{background:url(/static/img/loading.gif) no-repeat;padding-left:34px;display:inline-block}#sb-body,#sb-loading{background-color:#060606}#sb-title,#sb-info{position:relative;margin:0;padding:0;overflow:hidden}#sb-title,#sb-title-inner{height:26px;line-height:26px}#sb-title-inner{font-size:16px}#sb-info,#sb-info-inner{height:20px;line-height:20px}#sb-info-inner{font-size:12px}#sb-nav{float:right;height:16px;padding:2px 0;width:45%}#sb-nav a{display:block;float:right;height:16px;width:16px;margin-left:3px;cursor:pointer;background-repeat:no-repeat}#sb-nav-close{background-image:url(/static/img/close.png)}#sb-nav-next{background-image:url(/static/img/next.png)}#sb-nav-previous{background-image:url(/static/img/previous.png)}#sb-nav-play{background-image:url(/static/img/play.png)}#sb-nav-pause{background-image:url(/static/img/pause.png)}#sb-counter{float:left;width:45%}@media (max-width 1440px){aside#commits h2 a span{display:none}}div.screen span{display:none;position:fixed;top:0;right:0;padding:4px;z-index:2000;font-family:monospace;font-weight:700}@media (min-width:0) and (max-width:450px){div.screen .screen_tiny{display:block;background:#fff;color:#000}}@media (min-width:450px) and (max-width:626px){div.screen .screen_mini{display:block;background:#fafad2;color:#000}}@media (min-width:626px) and (max-width:780px){div.screen .screen_mobile{display:block;background:#ff0;color:#000}}@media (min-width:780px) and (max-width:980px){div.screen .screen_small{display:block;background:#ffa500;color:#000}}@media (min-width:980px) and (max-width:1180px){div.screen .screen_medium{display:block;background:red;color:#fff}}@media (min-width:1180px) and (max-width:1280px){div.screen .screen_large{display:block;background:purple;color:#fff}}
View
@@ -0,0 +1,123 @@
+html,
+body,
+div,
+span,
+applet,
+object,
+iframe,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+p,
+blockquote,
+pre,
+a,
+abbr,
+acronym,
+address,
+big,
+cite,
+code,
+del,
+dfn,
+em,
+img,
+ins,
+kbd,
+q,
+s,
+samp,
+small,
+strike,
+strong,
+sub,
+sup,
+tt,
+var,
+b,
+u,
+i,
+center,
+dl,
+dt,
+dd,
+ol,
+ul,
+li,
+fieldset,
+form,
+label,
+legend,
+table,
+caption,
+tbody,
+tfoot,
+thead,
+tr,
+th,
+td,
+article,
+aside,
+canvas,
+details,
+embed,
+figure,
+figcaption,
+footer,
+header,
+hgroup,
+menu,
+nav,
+output,
+ruby,
+section,
+summary,
+time,
+mark,
+audio,
+video {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-size: 100%;
+ font: inherit;
+ vertical-align: baseline;
+}
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+menu,
+nav,
+section {
+ display: block;
+}
+body {
+ line-height: 1;
+}
+ol,
+ul {
+ list-style: none;
+}
+blockquote,
+q {
+ quotes: none;
+}
+blockquote:before,
+blockquote:after,
+q:before,
+q:after {
+ content: '';
+ content: none;
+}
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
View
@@ -0,0 +1,42 @@
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, embed,
+figure, figcaption, footer, header, hgroup,
+menu, nav, output, ruby, section, summary,
+time, mark, audio, video {
+ margin 0
+ padding 0
+ border 0
+ font-size 100%
+ font inherit
+ vertical-align baseline
+}
+article, aside, details, figcaption, figure,
+footer, header, hgroup, menu, nav, section {
+ display block
+}
+body {
+ line-height 1
+}
+ol, ul {
+ list-style none
+}
+blockquote, q {
+ quotes none
+}
+blockquote:before, blockquote:after,
+q:before, q:after {
+ content ''
+ content none
+}
+table {
+ border-collapse collapse
+ border-spacing 0
+}
Oops, something went wrong.

0 comments on commit 403f398

Please sign in to comment.