Skip to content

Commit ebe76ef

Browse files
committed
initial commit
0 parents  commit ebe76ef

28 files changed

+946
-0
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
_site
2+
.sass-cache
3+
.jekyll-metadata
4+
node_modules
5+
.DS_Store

_config.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Site settings
2+
title: Scala Center
3+
4+
description: > # this means to ignore newlines until "baseurl:"
5+
The Scala Center at EPFL. Not-for-profit, "for the good of all"
6+
steward of Scala.
7+
baseurl: "" # the subpath of your site, e.g. /blog
8+
url: "http://scala.epfl.ch" # the base hostname & protocol for your site
9+
twitter_username: scala_lang
10+
github_username: scala
11+
12+
# Build settings
13+
markdown: kramdown
14+
exclude: ["node_modules", "gulpfile.js", "package.json"]
15+
sass:
16+
sass_dir: resources/css/sass

_includes/footer.html

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<footer class="site-footer">
2+
3+
</footer>

_includes/head.html

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<head>
2+
<meta charset="utf-8">
3+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
4+
<meta name="viewport" content="width=device-width, initial-scale=1">
5+
6+
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
7+
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
8+
9+
<link rel="icon" type="image/png" href="{{ site.baseurl }}/resources/favicon.ico">
10+
<link rel="shortcut icon" type="image/png" href="{{ site.baseurl }}/resources/favicon.ico">
11+
12+
<!-- Typekit fonts -->
13+
<script src="https://use.typekit.net/slz1hxf.js"></script>
14+
<script>try{Typekit.load({ async: true });}catch(e){}</script>
15+
16+
<!-- JQuery JS -->
17+
<script src="{{ site.baseurl }}/resources/js/vendor/jquery-1.11.3.min.js" type="text/javascript" ></script>
18+
19+
<!-- Retina JS -->
20+
<script src="{{ site.baseurl }}/resources/js/vendor/retina-1.3.0.min.js" type="text/javascript" ></script>
21+
22+
<!-- Bootstram CSS -->
23+
<link rel="stylesheet" href="{{ site.baseurl }}/resources/css/vendor/bootstrap.min.css" type="text/css" />
24+
25+
<!-- Custom stylesheet -->
26+
<link rel="stylesheet" href="{{ site.baseurl }}/resources/css/main.css" type="text/css" />
27+
28+
<!-- Custom javascript -->
29+
<script src="{{ site.baseurl }}/resources/js/main.js" type="text/javascript" ></script>
30+
31+
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
32+
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
33+
34+
<!-- Google Analytics -->
35+
<script>
36+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
37+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
38+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
39+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
40+
41+
ga('create', 'UA-574683-14', 'auto');
42+
ga('send', 'pageview');
43+
44+
</script>
45+
46+
</head>

_includes/header.html

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<header class="site-header">
2+
3+
<!-- <div class="wrapper">
4+
5+
<a class="site-title" href="{{ site.baseurl }}/">{{ site.title }}</a>
6+
7+
<nav class="site-nav">
8+
<a href="#" class="menu-icon">
9+
<svg viewBox="0 0 18 15">
10+
<path fill="#424242" d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.031C17.335,0,18,0.665,18,1.484L18,1.484z"/>
11+
<path fill="#424242" d="M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0c0-0.82,0.665-1.484,1.484-1.484 h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/>
12+
<path fill="#424242" d="M18,13.516C18,14.335,17.335,15,16.516,15H1.484C0.665,15,0,14.335,0,13.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,12.031,18,12.696,18,13.516L18,13.516z"/>
13+
</svg>
14+
</a>
15+
16+
<div class="trigger">
17+
{% for my_page in site.pages %}
18+
{% if my_page.title %}
19+
<a class="page-link" href="{{ my_page.url | prepend: site.baseurl }}">{{ my_page.title }}</a>
20+
{% endif %}
21+
{% endfor %}
22+
</div>
23+
</nav>
24+
25+
</div> -->
26+
27+
</header>

_layouts/default.html

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
{% include head.html %}
5+
6+
<body>
7+
8+
{% include header.html %}
9+
10+
<div class="container">
11+
<div class="row">
12+
<div class="col-md-12">
13+
{{ content }}
14+
</div>
15+
</div>
16+
</div>
17+
18+
{% include footer.html %}
19+
20+
</body>
21+
22+
</html>

_layouts/frontpage.html

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
{% include head.html %}
5+
6+
<body>
7+
8+
{% include header.html %}
9+
10+
<div class="splash">
11+
12+
<div class="container">
13+
<div class="row">
14+
<div class="col-md-12">
15+
<img src="{{ site.baseurl }}/resources/img/scala-center-logo.png">
16+
<div class="scalacenter-logo"></div>
17+
For open source. For education.
18+
{{ content }}
19+
</div>
20+
</div>
21+
</div>
22+
23+
</div>
24+
25+
{% include footer.html %}
26+
27+
</body>
28+
29+
</html>

_layouts/page.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
layout: default
3+
---
4+
<article class="post">
5+
6+
<header class="post-header">
7+
<h1 class="post-title">{{ page.title }}</h1>
8+
</header>
9+
10+
<div class="post-content">
11+
{{ content }}
12+
</div>
13+
14+
</article>

_layouts/post.html

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
layout: default
3+
---
4+
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
5+
6+
<header class="post-header">
7+
<h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
8+
<p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}</p>
9+
</header>
10+
11+
<div class="post-content" itemprop="articleBody">
12+
{{ content }}
13+
</div>
14+
15+
</article>

feed.xml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
layout: null
3+
---
4+
<?xml version="1.0" encoding="UTF-8"?>
5+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
6+
<channel>
7+
<title>{{ site.title | xml_escape }}</title>
8+
<description>{{ site.description | xml_escape }}</description>
9+
<link>{{ site.url }}{{ site.baseurl }}/</link>
10+
<atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/>
11+
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
12+
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
13+
<generator>Jekyll v{{ jekyll.version }}</generator>
14+
{% for post in site.posts limit:10 %}
15+
<item>
16+
<title>{{ post.title | xml_escape }}</title>
17+
<description>{{ post.content | xml_escape }}</description>
18+
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
19+
<link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
20+
<guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
21+
{% for tag in post.tags %}
22+
<category>{{ tag | xml_escape }}</category>
23+
{% endfor %}
24+
{% for cat in post.categories %}
25+
<category>{{ cat | xml_escape }}</category>
26+
{% endfor %}
27+
</item>
28+
{% endfor %}
29+
</channel>
30+
</rss>

gulpfile.js

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
var gulp = require('gulp');
2+
var browserSync = require('browser-sync');
3+
var sass = require('gulp-sass');
4+
var prefix = require('gulp-autoprefixer');
5+
var cp = require('child_process');
6+
7+
var messages = {
8+
jekyllBuild: '<span style="color: grey">Running:</span> $ jekyll build'
9+
};
10+
11+
/**
12+
* Build the Jekyll Site
13+
*/
14+
gulp.task('jekyll-build', function (done) {
15+
browserSync.notify(messages.jekyllBuild);
16+
return cp.spawn('jekyll', ['build'], {stdio: 'inherit'})
17+
.on('close', done);
18+
});
19+
20+
/**
21+
* Rebuild Jekyll & do page reload
22+
*/
23+
gulp.task('jekyll-rebuild', ['jekyll-build'], function () {
24+
browserSync.reload();
25+
});
26+
27+
/**
28+
* Wait for jekyll-build, then launch the Server
29+
*/
30+
gulp.task('browser-sync', ['sass', 'jekyll-build'], function() {
31+
browserSync({
32+
server: {
33+
baseDir: '_site'
34+
}
35+
});
36+
});
37+
38+
/**
39+
* Compile files from _scss into both _site/css (for live injecting) and site (for future jekyll builds)
40+
*/
41+
gulp.task('sass', function () {
42+
return gulp.src('_scss/main.scss')
43+
.pipe(sass({
44+
includePaths: ['scss'],
45+
onError: browserSync.notify
46+
}))
47+
.pipe(prefix(['last 15 versions', '> 1%', 'ie 8', 'ie 7'], { cascade: true }))
48+
.pipe(gulp.dest('_site/css'))
49+
.pipe(browserSync.reload({stream:true}))
50+
.pipe(gulp.dest('css'));
51+
});
52+
53+
/**
54+
* Watch scss files for changes & recompile
55+
* Watch html/md files, run jekyll & reload BrowserSync
56+
*/
57+
gulp.task('watch', function () {
58+
gulp.watch('_scss/*.scss', ['sass']);
59+
gulp.watch(['index.html', '_layouts/*.html', '_posts/*'], ['jekyll-rebuild']);
60+
});
61+
62+
/**
63+
* Default task, running just `gulp` will compile the sass,
64+
* compile the jekyll site, launch BrowserSync & watch files.
65+
*/
66+
gulp.task('default', ['browser-sync', 'watch']);

index.html

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
layout: frontpage
3+
---

package.json

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "browser-sync-jekyll",
3+
"version": "0.0.0",
4+
"description": "A starter project including full setup for Jekyll, GulpJS, SASS & BrowserSync",
5+
"main": "gulpfile.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"author": "Shane Osbourne",
10+
"license": "ISC",
11+
"devDependencies": {
12+
"gulp": "^3.8.8",
13+
"gulp-sass": "^2.1.0",
14+
"browser-sync": "^1.3.7",
15+
"gulp-autoprefixer": "1.0.0"
16+
},
17+
"repository": {
18+
"type": "git",
19+
"url": "https://github.com/shakyShane/jekyll-gulp-sass-browser-sync.git"
20+
},
21+
"keywords": [
22+
"jekyll",
23+
"gulp",
24+
"sass",
25+
"browsersync"
26+
],
27+
"bugs": {
28+
"url": "https://github.com/shakyShane/jekyll-gulp-sass-browser-sync/issues"
29+
},
30+
"homepage": "https://github.com/shakyShane/jekyll-gulp-sass-browser-sync"
31+
}

resources/css/main.scss

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
# Only the main Sass file needs front matter (the dashes are enough)
3+
---
4+
@charset "utf-8";
5+
6+
7+
8+
// Our variables
9+
$base-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
10+
$base-font-size: 16px;
11+
$base-font-weight: 200;
12+
$small-font-size: $base-font-size * 0.875;
13+
$base-line-height: 1.5;
14+
15+
$spacing-unit: 30px;
16+
17+
$text-color: #fff;
18+
$background-color: #002b37;
19+
$link-color: #2a7ae2;
20+
21+
$grey-color: #828282;
22+
$grey-color-light: lighten($grey-color, 40%);
23+
$grey-color-dark: darken($grey-color, 25%);
24+
25+
// Width of the content area
26+
$content-width: 800px;
27+
28+
$on-palm: 600px;
29+
$on-laptop: 800px;
30+
31+
32+
33+
// Use media queries like this:
34+
// @include media-query($on-palm) {
35+
// .wrapper {
36+
// padding-right: $spacing-unit / 2;
37+
// padding-left: $spacing-unit / 2;
38+
// }
39+
// }
40+
@mixin media-query($device) {
41+
@media screen and (max-width: $device) {
42+
@content;
43+
}
44+
}
45+
46+
47+
48+
// Import partials from `sass_dir` (defaults to `_sass`)
49+
@import
50+
"base",
51+
"frontpage"
52+
;
53+
// @import
54+
// "base",
55+
// "syntax-highlighting"
56+
// ;
57+
58+
59+
.splash {
60+
// @include center;
61+
text-align: center;
62+
background: url({{ site.baseurl }}/resources/img/lakegeneva-gradientmapped.jpg) no-repeat center center fixed;
63+
-webkit-background-size: cover;
64+
-moz-background-size: cover;
65+
-o-background-size: cover;
66+
background-size: cover;
67+
min-height: 640px;
68+
font-family: "ff-enzo-web",sans-serif;
69+
font-style: normal;
70+
font-weight: 100;
71+
font-size: 42px;
72+
padding-top: 140px;
73+
}

0 commit comments

Comments
 (0)