Skip to content

Commit 79e079e

Browse files
Revised forms to be official last exercise. Everything else will be moved to homework.
1 parent f72d2e8 commit 79e079e

File tree

2 files changed

+181
-47
lines changed

2 files changed

+181
-47
lines changed

framework/extras-form-controls.html

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
6+
<title>Ladies Learning Code: Intro to HTML & CSS</title>
7+
<!-- Don't alter slideshow.css, CSSS slide deck needs it to work -->
8+
<link rel="stylesheet" href="css/slideshow.css">
9+
10+
<!-- Theme-specific styles -->
11+
<link href='http://fonts.googleapis.com/css?family=Quicksand|Pacifico|Open+Sans:400,300' rel='stylesheet' type='text/css'>
12+
<link rel="stylesheet" href="css/font-awesome.css">
13+
<link rel="stylesheet" href="css/highlightjs-themes/monokai.css">
14+
<link rel="stylesheet" href="css/theme-llc.css">
15+
<link rel="shortcut icon" href="img/favicon.ico">
16+
17+
<!-- Workshop-specific styles -->
18+
<link rel="stylesheet" href="css/workshop.css">
19+
20+
<!-- Takes care of CSS3 prefixes! -->
21+
<script src="scripts/prefixfree.min.js"></script>
22+
</head>
23+
24+
<body>
25+
26+
<base target="_blank">
27+
28+
<main>
29+
<section class="slide" data-markdown>
30+
##Form controls: putting it all together
31+
32+
`input` elements are used to allow the user to type in their information and is used with a `type` attribute to determine the kind of information it is.
33+
34+
The `label` tags are used to label the input.
35+
36+
The `name` attribute is used to label the fields when sending the form data to the server.
37+
38+
The `for` and `id` attributes are used to associate the label to the input and should have matching values.
39+
40+
A form can contain any HTML markup (paragraphs, lists, etc.) in addition to form specific HTML tags.
41+
42+
[Each part of a form is considered a paragraph](http://dev.w3.org/html5/spec-LC/forms.html#forms) and can be separated using `&lt;p>` elements.
43+
44+
**Further reading: ** [MDN forms](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Forms)
45+
</section>
46+
</main><!-- cls main section -->
47+
48+
<footer>
49+
<p class="license"><a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/"><img alt="Creative Commons License" src="img/cc-by-nc.svg" /></a> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://ladieslearningcode.com" property="cc:attributionName" rel="cc:attributionURL">Ladies Learning Code</a></p>
50+
<p class="instructions">Use the left <i class="fa fa-arrow-left"></i> and right <i class="fa fa-arrow-right"></i> arrow keys to navigate</p>
51+
</footer>
52+
53+
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
54+
<script src="scripts/slideshow.js"></script>
55+
56+
<!-- Uncomment the plugins you need -->
57+
<script src="scripts/plugins/css-edit.js"></script>
58+
<script src="scripts/plugins/css-snippets.js"></script>
59+
<script src="scripts/plugins/css-Ctrls.js"></script>
60+
<!-- <script src="plugins/code-highlight.js"></script>-->
61+
62+
<script src="scripts/plugins/markdown/marked.js"></script>
63+
<script src="scripts/plugins/markdown/markdown.js"></script>
64+
<script src="scripts/plugins/highlight/highlight.js"></script>
65+
<script>hljs.initHighlightingOnLoad();</script>
66+
67+
<!-- Prettify -->
68+
<script src="scripts/plugins/prettify.js"></script>
69+
<script src="scripts/plugins/lang-css.js"></script>
70+
<script src="scripts/plugins/prism.js"></script>
71+
72+
<script>
73+
var slideshow = new SlideShow();
74+
75+
// Grabs all the .snippet elements
76+
var snippets = document.querySelectorAll('.snippet');
77+
for(var i=0; i<snippets.length; i++) {
78+
new CSSSnippet(snippets[i]);
79+
}
80+
81+
// Opens all links in a new window
82+
var links = document.getElementsByTagName("a");
83+
for (var i = 0; i < links.length; i++) {
84+
var link = links[i];
85+
link.addEventListener(function() {
86+
window.open(this.href);
87+
});
88+
}
89+
90+
jQuery(document).ready(function(){
91+
jQuery(".snippet").before("<span class=\"edit\">edit me</span>");
92+
});
93+
</script>
94+
</body>
95+
</html>

index.html

Lines changed: 86 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ <h2><span>with</span> Instructor Name</h2>
4444
</ul>
4545
</div>
4646
<div class="presenter-notes">
47-
<p>It's important to note at the beginning that a lot of material will be covered and their site will not be 100% complete by the end of the day. The goal of the day is to learn about the concepts. However, they will have most of the project done by the end of the day and "homework" and additional resources are provided at the end to help them complete their project. It's a lot to cover in one day and today will be a "guided tour."</p>
47+
<p>It's important to note at the beginning that a lot of material will be covered and their site will not be 100% complete by the end of the day. The goal of the day is to learn about the concepts. However, they will have about 75% of the project done by end of the day and "homework" and additional resources are provided at the end to help them complete their project. It's a lot to cover in one day and today will just be a "guided tour."</p>
4848
<p>All code blocks in white are editable and CSS changes will be reflected in the slide. For exercises, all instructions listed under <strong>bonus</strong> are for those who complete the exercises early to make sure learners at all different levels have something to work on.</p>
4949
</div>
5050
</header>
@@ -1653,7 +1653,7 @@ <h2>Class Exercise - Positioning the Header &amp; Nav</h2>
16531653
</section>
16541654

16551655
<section class="slide" data-markdown>
1656-
##Class Exercise: Background Images
1656+
##Class Exercise #8: Background Images
16571657

16581658
So far, we've used `background` to add colours. We can also use it to add images. We've added images in the HTML using `img` but we can also set images as a background style using CSS.
16591659

@@ -1693,7 +1693,7 @@ <h2>Class Exercise - Positioning the Header &amp; Nav</h2>
16931693
</section>
16941694

16951695
<section class="slide">
1696-
<h2>Class exercise: Background-size</h2>
1696+
<h2>Class exercise #8: Background-size</h2>
16971697

16981698
<p>Thanks to CSS3, we can now change the size of a background image. </p>
16991699
<p><code>background-size</code> is the longhand property. To include it in the shorthand <code>background</code> property, it <em>must</em> be included after <code>background-position</code>, separated with the <code>/</code> character. </p>
@@ -1741,73 +1741,112 @@ <h2>Class exercise: Background-size</h2>
17411741
</section>
17421742

17431743
<section class="slide" data-markdown>
1744-
##Forms: organizing the interface
1744+
##Forms
17451745

17461746
Forms are used to capture information from a user. The information processing and form submission usually requires the use of a server-side language such as PHP, Ruby or Python. But there are different services available to help do the processing for us without writing any of these languages!
17471747

1748-
Today we're going to use http://forms.brace.io/ to submit our form info and the information will be forwarded to your email. Simple!
1748+
Let's look at the markup first.
17491749

17501750
All forms begin with the `form` element and requires
17511751
two attributes, `method` (defines how the form will communicate with the web server) and `action` (provides the file path to where the form script is processed after the form is submitted.
17521752

1753-
Since we're using a 3rd party service, the `action` value is their url *and* the email you want the form to be submitted to.
1754-
17551753
```xml
1756-
&lt;form method="POST" action="http://forms.brace.io/hello@email.com">
1754+
&lt;form method="POST" action="path/to/form/script/processing">
17571755
...
17581756
&lt;/form>
17591757
```
17601758
</section>
17611759

1762-
<section class="slide" data-markdown>
1763-
##Forms (continued)
1760+
<section class="slide">
1761+
<h2>Class Exercise #9 - Contact Form</h2>
1762+
1763+
<p>On your contact page, under the header, create a new <code>&lt;section&gt;</code> tag. Add the below markup <em>in between</em> the <code>section</code> element.</p>
1764+
1765+
<pre><code class="xml">&lt;section&gt;
1766+
&lt;form class="contact-form" method="POST" action="" &gt;
1767+
&lt;h2&gt;Let's meet for coffee!&lt;/h2&gt;
1768+
1769+
&lt;p&gt;Send me a message at &lt;a href="mailto:hello@your-email.com"&gt;hello@your-email.com&lt;/a&gt;,
1770+
use the form below or say "hi!" on one of my social networks.&lt;/p&gt;
1771+
&lt;p&gt;
1772+
&lt;label for="name"&gt;Name&lt;/label&gt;
1773+
&lt;input id="name" type="text" name="name"&gt;
1774+
&lt;/p&gt;
1775+
&lt;p&gt;
1776+
&lt;label for="email"&gt;Email&lt;/label&gt;
1777+
&lt;input id="email" type="email" name="replyto"&gt;
1778+
&lt;/p&gt;
1779+
&lt;p&gt;
1780+
&lt;label for="message"&gt;Message&lt;/label&gt;
1781+
&lt;textarea id="message" name="message"&gt;&lt;/textarea&gt;
1782+
&lt;/p&gt;
1783+
&lt;input type="submit" value="SEND"&gt;
1784+
&lt;/form&gt;
1785+
&lt;/section&gt;
1786+
</code></pre>
1787+
<p>Your contact page and form should look similar to <a href="project/examples/exercise9-contact.html">Example 9</a>.</p>
17641788

1765-
`input` elements are used to allow the user to type in their information and is used with a `type` attribute to determine the kind of information it is.
1789+
<div class="presenter-notes">
1790+
<p>Give an general overview of what each from control is used for as you are adding in the code. There's further resources available in the next slide.</p>
17661791

1767-
The `label` tags are used to label the input.
1792+
<p>This will be the official last exercise for the day. Though there are plenty of other lessons in the next steps/homework section. If you find yourself with extra time, congratulate the class on picking up the concepts so well and either give them free time to tweak their projects, pick one of the homework assignments to go through together. Save some time to briefly cover the next steps.</p>
1793+
</div>
1794+
</section>
17681795

1769-
The `name` attribute is used to label the fields when sending the form data to the server.
1796+
<!-- <section class="slide" data-markdown>
1797+
##Forms
17701798
1771-
The `for` and `id` attributes are used to associate the label to the input and should have matching values.
1772-
1773-
A form can contain any HTML markup (paragraphs, lists, etc.) in addition to form specific HTML tags.
1774-
1775-
[Each part of a form is considered a paragraph](http://dev.w3.org/html5/spec-LC/forms.html#forms) and can be separated using `&lt;p>` elements.
1776-
1777-
**Example:** [MDN form example](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Forms/How_to_structure_an_HTML_form/Example)
1778-
</section>
1799+
Forms are used to capture information from a user. The information processing and form submission usually requires the use of a server-side language such as PHP, Ruby or Python. But there are different services available to help do the processing for us without writing any of these languages!
17791800
1780-
<section class="slide" data-markdown>
1781-
##Exercise #9 - Contact Form
1801+
Today we're going to use http://forms.brace.io/ to submit our form info. Through this service, the information will be forwarded to your email. Simple!
17821802
1783-
On your contact page, under the header, create a `&lt;section>` tag. Add the below markup *in between* the `section` element.
1803+
All forms begin with the `form` element and requires
1804+
two attributes, `method` (defines how the form will communicate with the web server) and `action` (provides the file path to where the form script is processed after the form is submitted.
17841805
1785-
Brace.io requires that you verify your email. The verification email will be sent on the first form submit so make sure you test your form first!
1806+
Since we're using a 3rd party service, the `action` value is their url *and* the email you want the form to be submitted to.
17861807
17871808
```xml
1788-
&lt;form class="contact-form" action=&quot;http://forms.brace.io/hello@your-email.com&quot; method=&quot;POST&quot;&gt;
1789-
&lt;h2&gt;Let's meet for coffee!&lt;/h2&gt;
1790-
1791-
&lt;p&gt;Send me a message at &lt;a href=&quot;mailto:hello@your-email.com&quot;&gt;hello@your-email.com&lt;/a&gt;,
1792-
use the form below or say &quot;hi!&quot; on one of my social networks.&lt;/p&gt;
1793-
&lt;p&gt;
1794-
&lt;label for=&quot;name&quot;&gt;Name&lt;/label&gt;
1795-
&lt;input id=&quot;name&quot; type=&quot;text&quot; name=&quot;name&quot;&gt;
1796-
&lt;/p&gt;
1797-
&lt;p&gt;
1798-
&lt;label for=&quot;email&quot;&gt;Email&lt;/label&gt;
1799-
&lt;input id=&quot;email&quot; type=&quot;email&quot; name=&quot;replyto&quot;&gt;
1800-
&lt;/p&gt;
1801-
&lt;p&gt;
1802-
&lt;label for=&quot;message&quot;&gt;Message&lt;/label&gt;
1803-
&lt;textarea id=&quot;message&quot; name=&quot;message&quot;&gt;&lt;/textarea&gt;
1804-
&lt;/p&gt;
1805-
&lt;input type=&quot;submit&quot; value=&quot;SEND&quot;&gt;
1806-
&lt;/form&gt;
1809+
&lt;form method="POST" action="http://forms.brace.io/hello@email.com">
1810+
...
1811+
&lt;/form>
18071812
```
1813+
</section> -->
1814+
1815+
<!-- <section class="slide">
1816+
<h2>Class Exercise #9 - Contact Form</h2>
1817+
1818+
<p>On your contact page, under the header, create a new <code>&lt;section&gt;</code> tag. Add the below markup <em>in between</em> the <code>section</code> element.</p>
1819+
<p>Brace.io requires that you verify your email first. The verification email will be sent on the <strong>first</strong> form submit so make sure you test your form first!</p>
1820+
1821+
<pre><code class="xml">&lt;section&gt;
1822+
&lt;form class="contact-form" action="http://forms.brace.io/hello@your-email.com" method="POST"&gt;
1823+
&lt;h2&gt;Let's meet for coffee!&lt;/h2&gt;
1824+
1825+
&lt;p&gt;Send me a message at &lt;a href="mailto:hello@your-email.com"&gt;hello@your-email.com&lt;/a&gt;,
1826+
use the form below or say "hi!" on one of my social networks.&lt;/p&gt;
1827+
&lt;p&gt;
1828+
&lt;label for="name"&gt;Name&lt;/label&gt;
1829+
&lt;input id="name" type="text" name="name"&gt;
1830+
&lt;/p&gt;
1831+
&lt;p&gt;
1832+
&lt;label for="email"&gt;Email&lt;/label&gt;
1833+
&lt;input id="email" type="email" name="replyto"&gt;
1834+
&lt;/p&gt;
1835+
&lt;p&gt;
1836+
&lt;label for="message"&gt;Message&lt;/label&gt;
1837+
&lt;textarea id="message" name="message"&gt;&lt;/textarea&gt;
1838+
&lt;/p&gt;
1839+
&lt;input type="submit" value="SEND"&gt;
1840+
&lt;/form&gt;
1841+
&lt;/section&gt;
1842+
</code></pre>
1843+
<p>Your contact page and form should look similar to <a href="project/examples/exercise9-contact.html">Example 9</a>.</p>
1844+
<p>For more information about forms, <a href="framework/extras-form-controls.html">go here</a>.</p>
18081845
1809-
Your contact page and form should look similar to [Example 9](project/examples/exercise9-contact.html).
1810-
</section>
1846+
<div class="presenter-notes">
1847+
<p>Give an general overview of what each from control is used for as you are adding in the code. There's further resources available in the link provided in this slide.</p>
1848+
</div>
1849+
</section> -->
18111850

18121851
<section class="slide">
18131852
<h2>Center aligning with margin</h2>
@@ -1985,7 +2024,7 @@ <h2>Center aligning with margin</h2>
19852024

19862025
You will need to register a domain name (www.mysite.com) and get hosting. Here are a couple domain & hosting options:
19872026

1988-
* [hover.com](https://www.hover.com/?ircid=2799&irmpname=Ladies+Learning+Code)
2027+
* [hover.com](hover.com/ladiescode)
19892028
* [dreamhost.com](http://www.dreamhost.com/r.cgi?205190)
19902029
* [bluehost.com](http://www.bluehost.com/)
19912030

0 commit comments

Comments
 (0)