Skip to content

Workshop content on gh-pages #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
source "https://rubygems.org"

# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.


group :jekyll_plugins do
gem 'jekyll-livereload'
gem "github-pages"
end

gem "json"

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
49 changes: 49 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely edit after that. If you find
# yourself editing this file very often, consider using Jekyll's data files
# feature for the data you need to update frequently.
#
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'bundle exec jekyll serve'. If you change this file, please restart the server process.

# Site settings
# These are used to personalize your new site. If you look in the HTML files,
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.
title: "Node Girls"
workshopname: "Intro to Javascript"
email: your-email@domain.com
description: > # this means to ignore newlines until "baseurl:"
This is an introductory workshop for Javascript.
baseurl: "/js-intro-workshop" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com

# Build settings
markdown: kramdown
# theme: node-girls

collections:
steps:
output: true
challenges:
output: true

challenge_separator: "<!--BREAK-->"
challenge_difficulties:
- NONE
- Minor tweak of existing feature
- Adding new code derived from existing features
- Expands on existing concepts
- Introduces multiple new concepts
- Multiple new concepts. Might need to some research.

plugins:
- jekyll-feed
- jemoji

exclude:
- Gemfile
- Gemfile.lock
20 changes: 20 additions & 0 deletions _includes/disqus_comments.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{% if page.comments != false and jekyll.environment == "production" %}

<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = '{{ page.url | absolute_url }}';
this.page.identifier = '{{ page.url | absolute_url }}';
};

(function() {
var d = document, s = d.createElement('script');

s.src = 'https://{{ site.disqus.shortname }}.disqus.com/embed.js';

s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
{% endif %}
17 changes: 17 additions & 0 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<footer class="site-footer">

<div class="wrapper">

<div class="social-media centered">
<ul>
<li><i class="fa fa-home" aria-hidden="true"></i>&nbsp;&nbsp;<a href="http://nodegirls.com.au/" target="_blank">nodegirls.com.au</a></li>
<li><i class="fa fa-paper-plane-o" aria-hidden="true"></i>&nbsp;&nbsp;<a href="mailto:info@nodegirls.com.au">info@nodegirls.com.au</a></li>
</ul>
<ul>
<li><i class="fa fa-facebook" aria-hidden="true"></i>&nbsp;&nbsp;&nbsp;<a href="https://www.facebook.com/NodeGirlsAustralia/" target="_blank">facebook.com/NodeGirlsAustralia</a></li>
<li><i class="fa fa-github-alt" aria-hidden="true"></i>&nbsp;&nbsp;<a href="https://github.com/node-girls-australia" target="_blank">github.com/node-girls-australia</a></li>
<li><i class="fa fa-twitter" aria-hidden="true"></i>&nbsp;&nbsp;<a href="https://twitter.com/NodeGirlsBri" target="_blank">twitter.com/NodeGirlsBri</a></li>
</ul>
</div>

</footer>
11 changes: 11 additions & 0 deletions _includes/google-analytics.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');

</script>

34 changes: 34 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>{{ site.workshopname | escape }}: {% if page.title %}{{ page.title | escape }}{% endif %}</title>
<meta name="description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}">
<link rel="icon" type="image/x-icon" href="/express-workshop-2/favicon.ico" />
<link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ "/feed.xml" | relative_url }}">

<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<script>
$(document).ready(function(){
$('div.solution').each( function(){
$(this).prepend('<h5 class="toggle hiding"><i class="fa fa-chevron-up" aria-hidden="true"></i> Click to <span class="action"></span> solution</h5>');
});
$('div.solution .highlight').first().addClass('hidden');
$('h5.toggle').click(function(e){
$(this).parent().children('.highlight').first().slideToggle('show');
$(this).toggleClass('showing');
$(this).toggleClass('hiding');
$(this).children('i.fa').toggleClass('fa-chevron-up');
$(this).children('i.fa').toggleClass('fa-chevron-down');

});
});
</script>
{% if jekyll.environment == 'production' and site.google_analytics %}
{% include google-analytics.html %}
{% endif %}
</head>
28 changes: 28 additions & 0 deletions _includes/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<header class="site-header" role="banner">

<div class="wrapper">
{% assign default_paths = site.pages | map: "path" %}
{% assign page_paths = site.header_pages | default: default_paths %}
<a class="site-title" href="{{ "/" | relative_url }}">{{ site.title | escape }} <small>{{ site.workshopname | escape }}</small></a>

{% if page_paths %}
<nav class="site-nav">
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger">
<span class="menu-icon">
<svg viewBox="0 0 18 15" width="18px" height="15px">
<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"/>
<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"/>
<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"/>
</svg>
</span>
</label>

<div class="trigger">
<a class="page-link" href="{{ '/' | relative_url }}">Home</a>
<a class="page-link go-link" href="{{ 'step0/' | relative_url }}"><i class="fa fa-rocket" aria-hidden="true"></i> Start</a>
</div>
</nav>
{% endif %}
</div>
</header>
1 change: 1 addition & 0 deletions _includes/icon-github.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<a href="https://github.com/{{ include.username }}"><span class="icon icon--github">{% include icon-github.svg %}</span><span class="username">{{ include.username }}</span></a>
1 change: 1 addition & 0 deletions _includes/icon-github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions _includes/icon-twitter.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<a href="https://twitter.com/{{ include.username }}"><span class="icon icon--twitter">{% include icon-twitter.svg %}</span><span class="username">{{ include.username }}</span></a>
1 change: 1 addition & 0 deletions _includes/icon-twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions _includes/keywords-table.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{% if page.keywords %}
{% assign sorted_keywords = page.keywords | sort: 'term' %}
<table class="reference">
<thead>
<tr>
<th>Keyword</th>
<th>Explanation</th>
</tr>
</thead>
<tbody>
{% for keyword in sorted_keywords %}
<tr>
<td>{{keyword.term}}</td>
<td>{{ keyword.define | markdownify }}</td>
</tr>

{% endfor %}

</tbody>
</table>
{% endif %}
7 changes: 7 additions & 0 deletions _includes/page-nav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% assign next = page.number | plus: 1 %}

{% unless page.end %}
<div class="page-nav">
<a class='go-link' href='../step{{next}}'>Go to Step {{next}}</a>
</div>
{% endunless %}
72 changes: 72 additions & 0 deletions _includes/step-nav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{% assign steps = site.steps | sort: "number" %}

<div class="step-nav">
<ul class="main">
<li class="{% if page.url == '/' }} %}active{% endif %}"><a href="{{ '/' | relative_url }}">Home</a></li>
</ul>

<h3>Part 0 - Getting Started</h3>
<ul>
{% for step in steps %}
{% if step.part == 0 %}
<li class='{% if page.number == step.number %}active{% endif %}'>
<a href="{{ step.url | relative_url }}">
{% if step.number != "start" %}{{step.number}} - {% endif %}{{ step.title | escape }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>


<h3>Part 1 - Basics</h3>
<ul>
{% for step in steps %}
{% if step.part == 1 %}
<li class='{% if page.number == step.number %}active{% endif %}'>
<a href="{{ step.url | relative_url }}">
{% if step.number != "start" %}{{step.number}} - {% endif %}{{ step.title | escape }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>

<h3>Part 2 - The Browser</h3>
<ul>
{% for step in steps %}
{% if step.part == 2 %}
<li class='{% if page.number == step.number %}active{% endif %}'>
<a href="{{ step.url | relative_url }}">
{% if step.number != "start" %}{{step.number}} - {% endif %}{{ step.title | escape }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>

<!-- <h3>Challenges</h3>
<ul>
{% for challenge in site.challenges %}
<li class='{% if page.cnumber == challenge.cnumber %}active{% endif %}'>
<a href="{{ challenge.url | relative_url }}">
{% if challenge.cnumber != "start" %}{{challenge.cnumber}} - {% endif %}{{ challenge.title | escape }}
</a>
</li>
{% endfor %}
</ul> -->

<ul class="main">
<!-- <li class="{% if page.url == '/troubleshooting/' }} %}active{% endif %}"><a href="{{ '/troubleshooting/' | relative_url }}">Troubleshooting</a></li> -->
<li class="{% if page.url == '/journey-continues/' }} %}active{% endif %}"><a href="{{ '/journey-continues/' | relative_url }}">The Journey Continues</a></li>
</ul>


<h3>Useful Links</h3>
<ul>
<li><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference">MDN Javascript Reference</a></li>

</ul>


</div>
36 changes: 36 additions & 0 deletions _layouts/challenge.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
layout: default
---
{% assign contentArray = page.content | markdownify | split: site.challenge_separator %}

<article class="post">

<header class="post-header">
<h2 class="post-title"> Challenge {{page.cnumber}} - {{ page.title | escape }}</h1>
</header>

<div class="post-content">
<div><b>Difficulty: </b>
{% for i in (1..page.difficulty) %}<span class="fa fa-star"></span>{% endfor %}{% for i in (page.difficulty..4) %}<span class="fa fa-star-o"></span>{% endfor %}
{{site.challenge_difficulties[page.difficulty]}}
</div>

{{ contentArray.first }}
<div class="challenge">
<p>Here's how a challenge works:</p>
<ol>
<li>We tell you how to change the front-end for the new feature.</li>
<li>We describe the expectations for the backend changes.</li>
<li>We'll discuss the steps & things you need to understand to do this and give some hints.</li>
<li>Then you have to implement the backend changes yourself. </li>
</ol>
<p>
There will be a solution at the end. But remember there is always more than one way of doing things. :smile:
</p>
</div>
{{ contentArray.last }}
{% include keywords-table.html %}

</div>

</article>
22 changes: 22 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="{{ page.lang | default: site.lang | default: "en" }}">

{% include head.html %}

<body>

{% include header.html %}

<main class="page-content" aria-label="Content">
<div class="wrapper">
{% include step-nav.html %}
{{ content }}
</div>

</main>

{% include footer.html %}

</body>

</html>
15 changes: 15 additions & 0 deletions _layouts/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
layout: default
---

<article class="post">

<div class="post-content home">
{{ content }}
<div class="page-nav">
<h3 style="border:none"><a class="go-link" href="step0">Now click here to get started!</a></h3>
</div>

</div>

</article>
14 changes: 14 additions & 0 deletions _layouts/page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
layout: default
---
<article class="post">

<header class="post-header">
<h1 class="post-title">{{ page.title | escape }}</h1>
</header>

<div class="post-content">
{{ content }}
</div>

</article>
Loading