Skip to content

Commit a3d39f3

Browse files
committed
2 parents 6be2edf + 3d41347 commit a3d39f3

Some content is hidden

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

42 files changed

+1281
-29
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,3 +170,4 @@ yahoo_clone.iml
170170
signup.iml
171171
days/013-016-css-basics/demos/selectorville/.idea/encodings.xml
172172
days/013-016-css-basics/demos/selectorville/.idea/selectorville.iml
173+
**.DS_Store

days/013-016-css-basics/your-turn/README.md

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,55 @@
11
# Days 13 - 16: CSS Basics
22

3-
Now you have seen the videos from this chapter, you're ready to start experimenting with HTML & HTML 5. But don't sweat the web design yet. We'll stay focused on the 90's for our sites so we get the native unstyled feel working for us.
3+
Now you have seen the videos from this chapter, you're ready to start exploring the world of CSS.
44

55
## Day 1: Watch the video lessons
66

77
The watch the videos and keep track of where you might want to grab some examples. Remember you have everything you saw typed in the demos folder adjacent to this one if you need them.
88

9-
## Days 2-3: Recreate Google's homepage
9+
## Days 2: Play with the selectors
1010

11-
For your hands-on exercises during this chapter, you'll do something quick and easy: recreate Google!
11+
Today you get to play with CSS selectors. These are incredibly important because the way you target elements in CSS files are by specifying the selectors.
1212

13-
While I made fun of Yahoo! for being nothing but a glamorized Yellow Pages, the tech behind Google was truly revolutionary at the time.
13+
Open the selector section of our demo app (from the videos). It's located adjacent to this foyer:
1414

15-
But their web design was decidedly not special. Check it out in the way back machine (choose 1998 for your time frame):
15+
`013-016-css-basics/demos/selectorville/selectors.html`
1616

17-
[https://web.archive.org/web/19981202230410/http://www.google.com/](https://web.archive.org/web/19981202230410/http://www.google.com/)
17+
Remember that you can just open that file directory from your hard drive.
1818

19-
Here's the design with a few visual notes on what is required for each part of the page (yes, tables make a comeback). No really, view the source, it's tables and the center tag even!
19+
Use the "What can I use" dialog to find some interesting things to query and highlight. Look at the source code of the HTML file to find other interesting CSS selectors to run as well.
2020

21-
![](./google-1998-marked-up.png)
21+
## Day 3: Build a nav out of a UL
2222

23-
Your job is to recreate this home page. Feel free to save the Google logo from the way back machine for your page (right-click, save image as...). Then recreate the home page with forms and validation per the graphic above.
23+
In the Layout demo part of the you saw that we can convert a HTML list into a navigational element by changing the display and other CSS properties.
2424

25-
If you are unfamiliar with HTML tables, here's a primer:
25+
On this day, use a similar technique to convert a list of hyperlinks into the Talk Python To Me podcast's site navigation:
2626

27-
```
28-
<table border="0" width="90%">
29-
<tr>
30-
<td bgcolor="#EEEEEE">
31-
column details here...
32-
</td>
33-
<td bgcolor="#EEEEEE">
34-
column details here...
35-
</td>
36-
<td bgcolor="#EEEEEE">
37-
column details here...
38-
</td>
39-
</tr>
40-
</table>
41-
```
27+
![](talk-python-nav.png)
4228

29+
Don't worry about the big image below or the Linode ad banner. Just recreate the nav over at [https://talkpython.fm/](https://talkpython.fm/) from something like:
4330

44-
## Day 4: Use the data model
31+
- TalkPython['Podcast']
32+
- Episodes
33+
- Python Courses
34+
- Friends of the show
35+
- Patreon
36+
- Contact
4537

46-
Imagine Google more like it is today, with services that require a dedicated account.
38+
Bonus points if you can recreate the search graphic using [font-awesome](https://fontawesome.com/icons) (as it was originally created).
4739

48-
Extend your basic Google homepage to have a register page (link to a second HTML file). Use what you learned about input validation and HTML forms to build the nicest registration form you can without worrying about design just yet.
40+
## Day 4: Research Bootstrap themes
41+
42+
While we did not have time to cover [Bootstrap](https://getbootstrap.com/) and the rich theme ecosystem, it is very helpful when building web applications and speeding up the design process.
43+
44+
So, this day is to dream a little. Imagine some cool business or product you'd like to create some day or maybe your company is working on but has a poor design.
45+
46+
Then visit Wrap Bootstrap, a commercial theme site:
47+
48+
[https://wrapbootstrap.com/](https://wrapbootstrap.com/)
49+
50+
Yes, you would have to buy these themes, but they are often just $20 once for a whole web design. Your goal is to search around here and find 3 potential themes as the starting point for your new website for your product or service.
51+
52+
You don't have to build anything. We just want you to get a little exposure to the idea of themes and Bootstrap.
4953

5054
### Time to share what you've accomplished!
5155

164 KB
Loading

days/025-028-javascript/README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Day 25 – JavaScript Introduction
2+
3+
In the coming 4 days you are going to write some 'Vanilla' (pure / no frameworks) Javascript.
4+
5+
## Day 1
6+
7+
Watch the first 9 videos about the history of JS, how to run it and some fundamental building blocks of the language.
8+
9+
## Day 2
10+
11+
Check out video 10 and practice what you've learned doing 1-4 optional exercises using _control flow_, _functions_, _looping_ and _objects_.
12+
13+
Check them out [here](demo/language/): use the _topic.html_ files to start, and look at the _topic-solution.html_ files if you get stuck.
14+
15+
Of course you are free to skip ahead but I recommend you at least try to code in JS a bit at this point to have the materials sink in quicker.
16+
17+
## Day 3
18+
19+
Watch videos 11-15 about working with the DOM (Document Object Model) - demo code [here](demo/dom) -, debugging, JS gotchas and more resources.
20+
21+
## Day 4
22+
23+
Check out video 16: I got two project apps you can work on today. Depending your expertise and time available, pick one or two:
24+
25+
1. [A simple calculator](demo/calculator) -> [starter template](demo/calculator/index-template.html)
26+
27+
2. [A calorie counter](demo/calories) -> [starter template](demo/calories/js/script-template.js)
28+
29+
You can look at my solutions [here](demo/calculator/index.html) and [here](demo/calories/js/script.js) respectively if you get stuck.
30+
31+
Of course these two projects are *optional*, convenient if you don't have use cases for JS yet.
32+
33+
However if you have some front-end stuff you can work on for your own projects, feel free to do that instead.
34+
35+
The most important is to try to put some of the JS you've learned so far into practice!
36+
37+
---
38+
39+
If you take this course it's likely you do some kind of web development. From full-stack developer to administrating a site, JS is an important skill to have!
40+
41+
So learn as much as you can these 4 days, it's effort well invested! Good luck and remember: _the learning is in the practice_.
42+
43+
In future lessons you will build upon these skills building apps with 2 popular JS frameworks: Vue.js and React, exciting ...
44+
45+
### Time to share what you've accomplished!
46+
47+
Be sure to share your last couple of days work on Twitter or Facebook. Use the hashtag **#100DaysOfWeb**.
48+
49+
Here are [some examples](https://twitter.com/search?q=%23100DaysOfCode) to inspire you. Consider including [@talkpython](https://twitter.com/talkpython) and [@pybites](https://twitter.com/pybites) in your tweets.
50+
51+
*See a mistake in these instructions? Please [submit a new issue](https://github.com/talkpython/100daysofweb-with-python-course/issues) or fix it and [submit a PR](https://github.com/talkpython/100daysofweb-with-python-course/pulls).*
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>JS is Fun!</title>
5+
<style>
6+
body {
7+
width: 800px;
8+
margin: 0 auto;
9+
}
10+
#result {
11+
font-size: 200%;
12+
font-weight: bold;
13+
}
14+
#result, #calculateForm {
15+
padding: 10px;
16+
margin: 10px 0;
17+
border: 1px solid #ddd;
18+
}
19+
</style>
20+
</head>
21+
<body>
22+
23+
<h1>Basic JS Calculator</h1>
24+
25+
<form id="calculateForm">
26+
<input id="num1">
27+
<select id="operator">
28+
<option name="+">+</option>
29+
<option name="-">-</option>
30+
<option name="*">*</option>
31+
<option name="/">/</option>
32+
</select>
33+
<input id="num2">
34+
<button type="button" id="calculate" onclick="doCalculation();">Calculate!</button>
35+
</form>
36+
37+
<div id="result"></div>
38+
39+
<script type="text/javascript">
40+
function doCalculation(){
41+
// you code
42+
}
43+
</script>
44+
45+
</body>
46+
</html>
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>JS is Fun!</title>
5+
<style>
6+
body {
7+
width: 800px;
8+
margin: 0 auto;
9+
}
10+
#result {
11+
font-size: 200%;
12+
font-weight: bold;
13+
}
14+
#result, #calculateForm {
15+
padding: 10px;
16+
margin: 10px 0;
17+
border: 1px solid #ddd;
18+
}
19+
</style>
20+
</head>
21+
<body>
22+
23+
<h1>Basic JS Calculator</h1>
24+
25+
<form id="calculateForm">
26+
<input id="num1">
27+
<select id="operator">
28+
<option name="+">+</option>
29+
<option name="-">-</option>
30+
<option name="*">*</option>
31+
<option name="/">/</option>
32+
</select>
33+
<input id="num2">
34+
<button type="button" id="calculate" onclick="doCalculation();">Calculate!</button>
35+
</form>
36+
37+
<div id="result"></div>
38+
39+
<script type="text/javascript">
40+
// to avoid using evil eval!
41+
// https://stackoverflow.com/a/13077966
42+
const math_it_up = {
43+
'+': function (x, y) { return x + y },
44+
'-': function (x, y) { return x - y },
45+
'*': function (x, y) { return x * y },
46+
'/': function (x, y) { return x / y },
47+
}
48+
49+
function doCalculation(){
50+
let operator = document.getElementById("operator").value;
51+
let num1 = document.getElementById("num1").value;
52+
let num2 = document.getElementById("num2").value;
53+
54+
let result = math_it_up[operator](parseInt(num1), parseInt(num2));
55+
56+
if(isNaN(result) || !isFinite(result)){
57+
document.getElementById("result").style.color= "red";
58+
} else {
59+
document.getElementById("result").style.color= "green";
60+
}
61+
62+
document.getElementById("result").innerHTML = result;
63+
}
64+
</script>
65+
66+
</body>
67+
</html>

days/025-028-javascript/demo/calories/README.md

Whitespace-only changes.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.autocomplete-suggestions {
2+
text-align: left; cursor: default; border: 1px solid #ccc; border-top: 0; background: #fff; box-shadow: -1px 1px 3px rgba(0,0,0,.1);
3+
4+
/* core styles should not be changed */
5+
position: absolute; display: none; z-index: 9999; max-height: 254px; overflow: hidden; overflow-y: auto; box-sizing: border-box;
6+
}
7+
.autocomplete-suggestion { position: relative; padding: 0 .6em; line-height: 23px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.02em; color: #333; }
8+
.autocomplete-suggestion b { font-weight: normal; color: #1f8dd6; }
9+
.autocomplete-suggestion.selected { background: #f0f0f0; }

days/025-028-javascript/demo/calories/css/mui.min.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
th, td {
2+
text-align: left;
3+
}
4+
#logo {
5+
position: relative;
6+
top: 10px;
7+
right: 15px;
8+
}
9+
#content-wrapper {
10+
margin: 20px;
11+
}
12+
.delete {
13+
background: url('../img/delete.png') no-repeat top left;
14+
border: none;
15+
cursor: pointer;
16+
width: 20px;
17+
height: 20px;
18+
}
19+
.bold {
20+
font-weight: bold;
21+
}

0 commit comments

Comments
 (0)