Skip to content

Commit b2af84d

Browse files
Source code for Fn Tutorial Jekyll Theme
1 parent f926c70 commit b2af84d

34 files changed

+4602
-0
lines changed

_config.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
title: Fn Tutorials
2+
theme: minima
3+
description: >- # this means to ignore newlines until "baseurl:"
4+
This site provides tutorials on installing and using the Fn project to build
5+
serverless applications.
6+
baseurl: /tutorials
7+
markdown: kramdown
8+
defaults:
9+
-
10+
scope:
11+
path: "" # All files in the project
12+
values:
13+
layout: "tutorial"

_includes/footer.html

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<footer class="site-footer h-card">
2+
<data class="u-url" href="{{ "/" | relative_url }}"></data>
3+
4+
<div class="wrapper">
5+
6+
<h2 class="footer-heading">{{ site.title | escape }}</h2>
7+
8+
<div class="footer-col-wrapper">
9+
<div class="footer-col footer-col-1">
10+
<ul class="contact-list">
11+
<li class="p-name">
12+
{% if site.author %}
13+
{{ site.author | escape }}
14+
{% else %}
15+
{{ site.title | escape }}
16+
{% endif %}
17+
</li>
18+
{% if site.email %}
19+
<li><a class="u-email" href="mailto:{{ site.email }}">{{ site.email }}</a></li>
20+
{% endif %}
21+
</ul>
22+
</div>
23+
24+
<div class="footer-col footer-col-2">
25+
{% include social.html %}
26+
</div>
27+
28+
<div class="footer-col footer-col-3">
29+
<p>{{ site.description | escape }}</p>
30+
</div>
31+
</div>
32+
33+
</div>
34+
35+
</footer>

_includes/head.html

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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+
{% seo %}
6+
<link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
7+
{% feed_meta %}
8+
</head>

_includes/header.html

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<header class="site-header" role="banner">
2+
3+
<div class="wrapper">
4+
{% assign default_paths = site.pages | map: "path" %}
5+
{% assign page_paths = site.header_pages | default: default_paths %}
6+
<a class="site-title" rel="author" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
7+
8+
{% if page_paths %}
9+
<nav class="site-nav">
10+
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
11+
<label for="nav-trigger">
12+
<span class="menu-icon">
13+
<svg viewBox="0 0 18 15" width="18px" height="15px">
14+
<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"/>
15+
<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"/>
16+
<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"/>
17+
</svg>
18+
</span>
19+
</label>
20+
21+
<div class="trigger">
22+
{% for path in page_paths %}
23+
{% assign my_page = site.pages | where: "path", path | first %}
24+
{% if my_page.title %}
25+
<a class="page-link" href="{{ my_page.url | relative_url }}">{{ my_page.title | escape }}</a>
26+
{% endif %}
27+
{% endfor %}
28+
</div>
29+
</nav>
30+
{% endif %}
31+
</div>
32+
</header>

_includes/social.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<ul class="social-media-list">
2+
{% if site.dribbble_username%}<li><a href="https://dribbble.com/{{ site.dribbble_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="/assets/minima-social-icons.svg#dribbble"></use></svg> <span class="username">{{ site.dribbble_username| escape }}</span></a></li>{% endif %}
3+
{% if site.facebook_username%}<li><a href="https://www.facebook.com/{{ site.facebook_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="/assets/minima-social-icons.svg#facebook"></use></svg> <span class="username">{{ site.facebook_username| escape }}</span></a></li>{% endif %}
4+
{% if site.flickr_username%}<li><a href="https://www.flickr.com/photos/{{ site.flickr_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="/assets/minima-social-icons.svg#flickr"></use></svg> <span class="username">{{ site.flickr_username| escape }}</span></a></li>{% endif %}
5+
{% if site.github_username%}<li><a href="https://github.com/{{ site.github_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="/assets/minima-social-icons.svg#github"></use></svg> <span class="username">{{ site.github_username| escape }}</span></a></li>{% endif %}
6+
{% if site.instagram_username%}<li><a href="https://instagram.com/{{ site.instagram_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="/assets/minima-social-icons.svg#instagram"></use></svg> <span class="username">{{ site.instagram_username| escape }}</span></a></li>{% endif %}
7+
{% if site.linkedin_username%}<li><a href="https://www.linkedin.com/in/{{ site.linkedin_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="/assets/minima-social-icons.svg#linkedin"></use></svg> <span class="username">{{ site.linkedin_username| escape }}</span></a></li>{% endif %}
8+
{% if site.pinterest_username%}<li><a href="https://www.pinterest.com/{{ site.pinterest_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="/assets/minima-social-icons.svg#pinterest"></use></svg> <span class="username">{{ site.pinterest_username| escape }}</span></a></li>{% endif %}
9+
{% if site.twitter_username%}<li><a href="https://www.twitter.com/{{ site.twitter_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="/assets/minima-social-icons.svg#twitter"></use></svg> <span class="username">{{ site.twitter_username| escape }}</span></a></li>{% endif %}
10+
{% if site.youtube_username%}<li><a href="https://youtube.com/{{ site.youtube_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="/assets/minima-social-icons.svg#youtube"></use></svg> <span class="username">{{ site.youtube_username| escape }}</span></a></li>{% endif %}
11+
{% if site.googleplus_username%}<li><a href="https://plus.google.com/{{ site.googleplus_username| escape }}"><svg class="svg-icon"><use xlink:href="/assets/minima-social-icons.svg#googleplus"></use></svg> <span class="username">{{ site.googleplus_username| escape }}</span></a></li>{% endif %}
12+
{% if site.rss %}<li><a href="{{ 'feed.xml' | relative_url }}"><svg class="svg-icon"><use xlink:href="/assets/minima-social-icons.svg#rss"></use></svg> <span>{{ site.rss | escape }}</span></a></li>{% endif %}
13+
</ul>

_layouts/default.html

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
3+
4+
{% include head.html %}
5+
6+
<body>
7+
8+
{% include header.html %}
9+
10+
<main class="page-content" aria-label="Content">
11+
<div class="wrapper">
12+
{{ content }}
13+
</div>
14+
</main>
15+
16+
{% include footer.html %}
17+
18+
</body>
19+
20+
</html>

_layouts/home.html

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
layout: default
3+
---
4+
5+
<div class="home">
6+
{% if page.title %}
7+
<h1 class="page-heading">{{ page.title }}</h1>
8+
{% endif %}
9+
10+
{{ content }}
11+
12+
{% if site.posts.size > 0 %}
13+
<h2 class="post-list-heading">{{ page.list_title | default: "Posts" }}</h2>
14+
<ul class="post-list">
15+
{% for post in site.posts %}
16+
<li>
17+
{% assign date_format = site.minima.date_format | default: "%b %-d, %Y" %}
18+
<span class="post-meta">{{ post.date | date: date_format }}</span>
19+
<h3>
20+
<a class="post-link" href="{{ post.url | relative_url }}">
21+
{{ post.title | escape }}
22+
</a>
23+
</h3>
24+
{% if site.show_excerpts %}
25+
{{ post.excerpt }}
26+
{% endif %}
27+
</li>
28+
{% endfor %}
29+
</ul>
30+
31+
<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | relative_url }}">via RSS</a></p>
32+
{% endif %}
33+
34+
</div>

_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 | escape }}</h1>
8+
</header>
9+
10+
<div class="post-content">
11+
{{ content }}
12+
</div>
13+
14+
</article>

_layouts/post.html

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
layout: default
3+
---
4+
<article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting">
5+
6+
<header class="post-header">
7+
<h1 class="post-title p-name" itemprop="name headline">{{ page.title | escape }}</h1>
8+
<p class="post-meta">
9+
<time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
10+
{% assign date_format = site.minima.date_format | default: "%b %-d, %Y" %}
11+
{{ page.date | date: date_format }}
12+
</time>
13+
{% if page.author %}
14+
<span itemprop="author" itemscope itemtype="http://schema.org/Person"><span class="p-author h-card" itemprop="name">{{ page.author }}</span></span>
15+
{% endif %}</p>
16+
</header>
17+
18+
<div class="post-content e-content" itemprop="articleBody">
19+
{{ content }}
20+
</div>
21+
22+
{% if site.disqus.shortname %}
23+
{% include disqus_comments.html %}
24+
{% endif %}
25+
26+
<a class="u-url" href="{{ page.url | relative_url }}" hidden></a>
27+
</article>

_layouts/tutorial.html

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta content="text/html; charset=utf-8" http-equiv="content-type">
5+
<title>{{ page.title }}</title>
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
7+
<meta name="robots" content="INDEX, FOLLOW">
8+
<meta name="description" content="{{ page.description }}">
9+
<meta name="viewport" content="width=device-width, initial-scale=1">
10+
<link rel="icon" type="image/png" sizes="32x32" href="{{ site.baseurl }}/favicon-32.png">
11+
<link rel="stylesheet" href="{{ site.baseurl }}/assets/main.css">
12+
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/normalize.min.css">
13+
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/font-awesome.min.css">
14+
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/obe-lite.css">
15+
<script src="{{ site.baseurl }}/assets/js/jquery-1.11.0.min.js"></script>
16+
<script src="{{ site.baseurl }}/assets/js/jquery-ui-1.10.4.custom.js"></script>
17+
<script src="{{ site.baseurl }}/assets/js/jquery.tocify.jd.js"></script>
18+
<script src="{{ site.baseurl }}/assets/js/leftnav.js"></script>
19+
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/fn.css">
20+
</head>
21+
<body>
22+
<header>
23+
<div class="w1024"> <a href="https://github.com/fnproject" target="_blank">
24+
<img src="{{ site.baseurl }}/assets/images/fn-logo-trans-sm.png" alt="fn-logo" height="90px" width="180px"></a>
25+
</div>
26+
</header>
27+
<!--end header-->
28+
29+
<div id="content">
30+
31+
<div class="w1024 cleartop">
32+
<div class="navbackwide border-right"><!-- --></div>
33+
<div id="shownav" title="Show Navigation" tabindex="0"><span class="fa fa-list"></span></div>
34+
<div id="sidebar"><!-- -->
35+
<div class="left-nav-tut"><!-- -->
36+
<div id="hidenavw" title="Hide Navigation" tabindex="0"><span class="fa fa-close"></span></div>
37+
<div id="navbar" class="left-nav-w"><!-- -->
38+
<div id="toc" class="tocify"><!-- --></div>
39+
</div>
40+
</div>
41+
</div>
42+
<div id="bookContainer">
43+
<article>
44+
<section>
45+
{{ content }}
46+
</section>
47+
48+
</article>
49+
</div>
50+
<br class="clearfloat">
51+
</div>
52+
</div>
53+
<!--close main-->
54+
<!--end content-->
55+
<div class="footer-container ">
56+
<footer class="footer-list">
57+
<ul>
58+
<li> <a href="https://github.com/fnproject/fn" target="_blank">About Fn Project</a> </li>
59+
<li><a href="https://github.com/fnproject/tutorials" target="_blank">Fn Tutorials</a> </li>
60+
<li> <a href="https://github.com/fnproject/fn/blob/master/docs/README.md#for-operators" target="_blank">Operating Fn</a> </li>
61+
<li> <a href="https://github.com/fnproject/flow" target="_blank">Fn Flow</a> </li>
62+
</ul>
63+
</footer>
64+
</div>
65+
</body>
66+
</html>

_sass/minima.scss

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
@charset "utf-8";
2+
3+
// Define defaults for each variable.
4+
5+
$base-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !default;
6+
$base-font-size: 16px !default;
7+
$base-font-weight: 400 !default;
8+
$small-font-size: $base-font-size * 0.875 !default;
9+
$base-line-height: 1.5 !default;
10+
11+
$spacing-unit: 30px !default;
12+
13+
$text-color: #111 !default;
14+
$background-color: #fdfdfd !default;
15+
$brand-color: #2a7ae2 !default;
16+
17+
$grey-color: #828282 !default;
18+
$grey-color-light: lighten($grey-color, 40%) !default;
19+
$grey-color-dark: darken($grey-color, 25%) !default;
20+
21+
$table-text-align: left !default;
22+
23+
// Width of the content area
24+
$content-width: 800px !default;
25+
26+
$on-palm: 600px !default;
27+
$on-laptop: 800px !default;
28+
29+
// Use media queries like this:
30+
// @include media-query($on-palm) {
31+
// .wrapper {
32+
// padding-right: $spacing-unit / 2;
33+
// padding-left: $spacing-unit / 2;
34+
// }
35+
// }
36+
@mixin media-query($device) {
37+
@media screen and (max-width: $device) {
38+
@content;
39+
}
40+
}
41+
42+
@mixin relative-font-size($ratio) {
43+
font-size: $base-font-size * $ratio;
44+
}
45+
46+
// Import partials.
47+
@import
48+
//"minima/base",
49+
//"minima/layout",
50+
"minima/syntax-highlighting"
51+
;

0 commit comments

Comments
 (0)