Skip to content

Commit 9adf409

Browse files
committed
Merge pull request #2 from geoknee/master
geoknee's improved notes
2 parents 84152da + 38643c8 commit 9adf409

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+295
-162
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
_site/
22
_gh-pages/
3-
CNAME
3+
CNAME
4+
*.swp
5+
.DS_Store

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
source 'https://rubygems.org'
22

3-
gem 'jekyll'
3+
gem 'jekyll','1.1.2'

Gemfile.lock

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
GEM
2+
remote: https://rubygems.org/
23
specs:
34
classifier (1.3.4)
45
fast-stemmer (>= 1.0.0)
56
colorator (0.1)
6-
commander (4.1.5)
7+
commander (4.1.6)
78
highline (~> 1.6.11)
89
directory_watcher (1.4.1)
910
fast-stemmer (1.0.2)
10-
highline (1.6.20)
11+
highline (1.6.21)
1112
jekyll (1.1.2)
1213
classifier (~> 1.3)
1314
colorator (~> 0.1)
@@ -20,8 +21,8 @@ GEM
2021
redcarpet (~> 2.2.2)
2122
safe_yaml (~> 0.7.0)
2223
kramdown (1.0.2)
23-
liquid (2.5.1)
24-
maruku (0.7.0)
24+
liquid (2.5.5)
25+
maruku (0.7.1)
2526
posix-spawn (0.3.8)
2627
pygments.rb (0.5.4)
2728
posix-spawn (~> 0.3.6)
@@ -34,4 +35,4 @@ PLATFORMS
3435
ruby
3536

3637
DEPENDENCIES
37-
jekyll
38+
jekyll (= 1.1.2)

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
name: Learn to Code
2-
pygments: true
2+
highlighter: pygments

_layouts/session.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@
33
---
44

55
<div class="page-header">
6-
<h1>{{page.title }} <small>{{ page.strapline}}</small></h1>
6+
<a href ="/contents/"><img src="/assets/code61_logo_66x66.png" ></a><h1>{{page.title }} <small>{{ page.strapline}}</small></h1>
77
</div>
88

99
<div class="tabbable tabs-left">
1010
<ul class="nav nav-tabs" id="myTab">
1111
{% for task in page.tasks %}
1212
{% if forloop.first %}
13-
<li class="active"><a href="#{{ task.name }}" data-toggle="tab">{{ task.title }} </a></li>
13+
<li class="active"><a href="#{{ task.basename }}" data-toggle="tab">{{ task.title }} </a></li>
1414
{% else %}
15-
<li><a href="#{{ task.name }}" data-toggle="tab">{{ task.title }} </a></li>
15+
<li><a href="#{{ task.basename }}" data-toggle="tab">{{ task.title }} </a></li>
1616
{% endif %}
1717
{% endfor %}
1818
</ul>
1919

2020
<div class="tab-content">
2121
{% for task in page.tasks %}
2222
{% if forloop.first %}
23-
<div class="tab-pane active" id="{{ task.name }}">
23+
<div class="tab-pane active" id="{{ task.basename }}">
2424
{% else %}
25-
<div class="tab-pane " id="{{ task.name }}">
25+
<div class="tab-pane " id="{{ task.basename }}">
2626
{% endif %}
2727

2828
<h2>{{ task.title }}</h2>

_plugins/sessions.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def initialize(site, base, dir, name)
7979
self.process(@name) # separates into @basename and @ext
8080
self.read_yaml(File.join(base,'_sessions', dir), name)
8181

82-
self.data['name'] = @basename
82+
self.data['basename'] = @basename
8383

8484
# self.data['title'] = "#{category_title_prefix}#{category}" # should have title already
8585
end
File renamed without changes.

_sessions/c1s1/1_what_is_a_webpage.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,17 @@ Several browsers also provide developer tools, which allow you to *interactively
5151
There are a few features of the Chrome developer tools that it is worth pointing out now.
5252

5353

54-
{% exercise %}
55-
1. Open this page in Google Chrome
56-
2. View the page source by doing one of the following:
57-
* View > Developer > View Source
58-
* Tools > View Source
59-
3. Open the developer tools by doing one of the following:
60-
* View > Developer > Developer Tools
61-
* Tools > Developer Tools
62-
4. Use the magnifying glass in the bottom left to hover over bits of the page and find the related HTML.
63-
5. Hover over the HTML code in the developer tools box and watch as different parts of the page are highlighted.
64-
6. Try changing some of the CSS on the right hand side. To undo any changes just refresh the page.
65-
7. Have a look on the `Resources` tab. See if you can find the CSS, javascript and image files used on this page.
66-
8. Visit a few of your favourite websites and repeat this process.
67-
{% endexercise %}
54+
{% exercise %}
55+
1. Open this page in Google Chrome
56+
2. View the page source by doing one of the following:
57+
* View > Developer > View Source
58+
* Tools > View Source
59+
3. Open the developer tools by doing one of the following:
60+
* View > Developer > Developer Tools
61+
* Tools > Developer Tools
62+
4. Use the magnifying glass in the bottom left to hover over bits of the page and find the related HTML.
63+
5. Hover over the HTML code in the developer tools box and watch as different parts of the page are highlighted.
64+
6. Try changing some of the CSS on the right hand side. To undo any changes just refresh the page.
65+
7. Have a look on the `Resources` tab. See if you can find the CSS, javascript and image files used on this page.
66+
8. Visit a few of your favourite websites and repeat this process.
67+
{% endexercise %}

_sessions/c1s1/3_urls_and_dns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Each computer on the internet has an address (an _IP address_) so that requests
2323

2424
IP addresses are a sequence of numbers and '.'s such as `212.58.244.67`. These aren't very easy to remember. Instead the internet works on a domain name system, that matches domain names such as `bbc.co.uk` to IP addresses.
2525

26-
{% exercise %}
26+
{% exercise %}
2727
Type `212.58.244.67` into your browser's address bar. What happens?
2828
{% endexercise %}
2929

_sessions/c1s1/4_first_page.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: Creating an HTML page
3+
---
4+
5+
One of the nice things about HTML is you don't need any fancy software to test it out on your laptop: all you need is a text editor and a web browser.
6+
7+
{% exercise %}
8+
1. Inside your `coding_course` folder create another folder called `first_site`.
9+
2. Open Sublime Text.
10+
3. Write "Hello"
11+
4. Save the file as `index.html` in the `first_site` folder
12+
5. Open `index.html` in Chrome. Depending on your version of Chrome
13+
* File > Open ...
14+
* Cmd-o (Mac) or Ctrl-o (Windows)
15+
16+
{% endexercise %}
17+
18+
### Why index.html?
19+
20+
In the old days of the web, navigating a website was a lot more like moving around the folder system on your laptop. You would go to a base site and there would just be a list of the files and folders available: an index. Because of this `index.html` is still the default file that a server will serve when you navigate to a folder in the web browser.
21+
22+
{% exercise %}
23+
1. Go back to 'index.html' in Sublime Text.
24+
2. Change the text to
25+
{% highlight html %}
26+
<h1>Hello</h1>
27+
{% endhighlight %}
28+
3. Go back to 'index.html' in Chrome and refresh the page (Cmd-R)
29+
{% endexercise %}
30+
31+
This is your first line of HTML. It has an open tag and a close tag. They tell your browser to display the text in-between as a heading.

0 commit comments

Comments
 (0)