├── .editorconfig
├── .gitignore
├── README.md
├── Syllabus.md
├── week-1
├── chapter
│ ├── 10_clubs.png
│ ├── 10_diamonds.png
│ ├── 10_hearts.png
│ ├── 10_spades.png
│ ├── 2_clubs.png
│ ├── 2_diamonds.png
│ ├── 2_hearts.png
│ ├── 2_spades.png
│ ├── 3_clubs.png
│ ├── 3_diamonds.png
│ ├── 3_hearts.png
│ ├── 3_spades.png
│ ├── 4_clubs.png
│ ├── 4_diamonds.png
│ ├── 4_hearts.png
│ ├── 4_spades.png
│ ├── 5_clubs.png
│ ├── 5_diamonds.png
│ ├── 5_hearts.png
│ ├── 5_spades.png
│ ├── 6_clubs.png
│ ├── 6_diamonds.png
│ ├── 6_hearts.png
│ ├── 6_spades.png
│ ├── 7_clubs.png
│ ├── 7_diamonds.png
│ ├── 7_hearts.png
│ ├── 7_spades.png
│ ├── 8_clubs.png
│ ├── 8_diamonds.png
│ ├── 8_hearts.png
│ ├── 8_spades.png
│ ├── 9_clubs.png
│ ├── 9_diamonds.png
│ ├── 9_hearts.png
│ ├── 9_spades.png
│ ├── ace_clubs.png
│ ├── ace_diamonds.png
│ ├── ace_hearts.png
│ ├── ace_spades.png
│ ├── blank.gif
│ ├── cardback.png
│ ├── cardstack.png
│ ├── debug.log
│ ├── jack_clubs.png
│ ├── jack_diamonds.png
│ ├── jack_hearts.png
│ ├── jack_spades.png
│ ├── js08_txt.html
│ ├── js08_txt.js
│ ├── king_clubs.png
│ ├── king_diamonds.png
│ ├── king_hearts.png
│ ├── king_spades.png
│ ├── objects_txt.js
│ ├── queen_clubs.png
│ ├── queen_diamonds.png
│ ├── queen_hearts.png
│ ├── queen_spades.png
│ └── styles.css
└── project08-01
│ ├── project08-01_txt.html
│ ├── project08-01_txt.js
│ └── styles.css
├── week-2
└── character-generator
│ ├── index.html
│ ├── script.js
│ └── styles.css
├── week-3
├── chapter
│ ├── ewis.png
│ ├── js09a_txt.html
│ ├── js09b_txt.html
│ ├── js09b_txt.js
│ ├── js09c_txt.html
│ ├── js09c_txt.js
│ ├── styles.css
│ └── styleshh.css
└── project09-02
│ ├── project09-02a_txt.html
│ ├── project09-02a_txt.js
│ ├── project09-02b_txt.html
│ ├── project09-02b_txt.js
│ └── styles.css
├── week-4
├── chapter
│ ├── js10a_txt.html
│ ├── js10a_txt.js
│ ├── js10b_txt .html
│ ├── js10b_txt.js
│ ├── oaklogo.png
│ ├── stylesa.css
│ └── stylesb.css
└── project10-01
│ ├── piece1.png
│ ├── piece10.png
│ ├── piece11.png
│ ├── piece12.png
│ ├── piece13.png
│ ├── piece14.png
│ ├── piece15.png
│ ├── piece16.png
│ ├── piece17.png
│ ├── piece18.png
│ ├── piece19.png
│ ├── piece2.png
│ ├── piece20.png
│ ├── piece21.png
│ ├── piece22.png
│ ├── piece23.png
│ ├── piece24.png
│ ├── piece25.png
│ ├── piece26.png
│ ├── piece27.png
│ ├── piece28.png
│ ├── piece29.png
│ ├── piece3.png
│ ├── piece30.png
│ ├── piece31.png
│ ├── piece32.png
│ ├── piece33.png
│ ├── piece34.png
│ ├── piece35.png
│ ├── piece36.png
│ ├── piece37.png
│ ├── piece38.png
│ ├── piece39.png
│ ├── piece4.png
│ ├── piece40.png
│ ├── piece41.png
│ ├── piece42.png
│ ├── piece43.png
│ ├── piece44.png
│ ├── piece45.png
│ ├── piece46.png
│ ├── piece47.png
│ ├── piece48.png
│ ├── piece5.png
│ ├── piece6.png
│ ├── piece7.png
│ ├── piece8.png
│ ├── piece9.png
│ ├── project10-01_txt.html
│ ├── project10-01_txt.js
│ ├── puzzle.png
│ └── styles.css
├── week-5
└── restaurant-reservation
│ ├── index.html
│ ├── script.js
│ └── styles.css
├── week-6
├── chapter
│ ├── archives.pl
│ ├── commentary.html
│ ├── headlines.xml
│ ├── js11_txt.html
│ ├── js11_txt.js
│ ├── keywords.pl
│ ├── sblogo.jpg
│ ├── search.png
│ └── styles.css
└── project11-02
│ ├── project11-02_txt.html
│ ├── project11-02_txt.js
│ └── styles.css
├── week-7
└── chef-dashboard
│ ├── index.html
│ ├── script.js
│ └── styles.css
├── week-8
└── movie-app
│ ├── index.html
│ ├── script.js
│ └── styles.css
└── week-9
├── chapter
├── js12_txt.html
├── js12_txt.js
├── logo.png
├── minus.png
├── plus.png
└── styles.css
└── project12-03
├── halfstar.png
├── logo.png
├── minus.png
├── plus.png
├── project12-03_txt.html
├── project12-03_txt.js
├── star.png
├── styles.css
└── torte.png
/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see https://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = false
9 | trim_trailing_whitespace = true
10 |
11 | [*.js]
12 | quote_type = single
13 |
14 | [*.md]
15 | max_line_length = off
16 | trim_trailing_whitespace = false
17 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # IDE
2 | .vscode
3 | .idea
4 |
5 | # Node ddependency directories
6 | node_modules/
7 | */ndoe_modules
8 |
9 | # Optional npm cache directory
10 | .npm
11 |
12 | # Optional eslint cache
13 | .eslintcache
14 |
15 | # macOS files
16 | .DS_Store
17 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # WEB 330 Enterprise JavaScript II
2 | ## [Bellevue University](http://bellevue.edu "Bellevue University is a private, non-profit university located in Bellevue, Nebraska, United States.")
3 |
4 | Address: 1000 Galvin Rd S, Bellevue, Nebraska 68005 - [Directions](https://www.google.com/maps/dir/''/Bellevue+University/@41.1509562,-95.9896355,12z/data=!4m8!4m7!1m0!1m5!1m1!1s0x8793886a86ca807f:0x838e857240d175eb!2m2!1d-95.9195956!2d41.1509774 "Google maps")
5 |
6 | Web Development [Degree](http://www.bellevue.edu/degrees/bachelor/web-development-bs/ "Designed by developers for developers.")
7 |
8 | ## Course Description
9 | Master JavaScript by learning and solving real-world problems. This course continues where the
10 | introductory JavaScript course left off. Students use a wide range of JavaScript programming
11 | strategies to build interactive programs. Topics include object-oriented programming, unit testing,
12 | asynchronous executions, files and streams, lambda expressions, and module bundlers. Problem solving
13 | using advanced JavaScript techniques is emphasized. GitHub is used to host and share coding projects.
14 |
15 | ## Course Prerequisites
16 | WEB 200 and WEB 231
17 |
18 | ## Course Skills
19 | * Develop programs using JavaScript, HTML5, and CSS to meet project requirements.
20 | * Utilize effective time management and task prioritization techniques to meet project obligations.
21 |
22 | ## Course Objectives
23 | Students who successfully complete this course should be able to:
24 | * Apply object-oriented programming concepts to solve complex problems.
25 | * Develop programs using JavaScript classes and static functions.
26 | * Experiment with JavaScript Iterators and Generators.
27 | * Utilize market research to design UI/UX prototypes.
28 | * Build dynamic HTML using JavaScript and Web Components.
29 | * Make use of asynchronous executions to load dynamic datasets.
30 |
31 | ## Topic Outline
32 | ### Advanced JavaScript
33 | * Unit Testing
34 | * Date, Time, and Strings
35 | * Regular Expressions
36 | * Module Bundlers
37 | ### Object-Oriented Programming
38 | * Classes
39 | * Protected Properties
40 | * Static Properties and Functions
41 | * Inheritance
42 | * Iterators and Generators
43 | ### Asynchronous Executions
44 | * Files and Streams
45 | * Promises
46 | * Async/Await
47 | * Ajax
48 | ### Scalable HTML and CSS
49 | * Web Components
50 | * Flex Layouts
51 | * Dynamic HTML
52 | * XML and JSON
53 |
54 | ## Repository Overview
55 |
56 | Carefully read the assigned chapters, videos, and narrative I've included under each exercise and assignment.
57 |
58 | Most exercises and assignments have runnable sample code, so you can visually see the concept "in action." Assignments are broken into "milestones" and each "milestone" builds on the last.
59 |
60 | Approach every week from top-to-bottom and do not move to the next assignment/exercise without fully understanding the previous.
61 |
62 | ```bash
63 | git clone https://github.com/buwebdev/web-330.git
64 | cd web-330
65 | ```
66 |
--------------------------------------------------------------------------------
/Syllabus.md:
--------------------------------------------------------------------------------
1 | # WEB 330 Enterprise JavaScript II
2 |
3 | ## Course Description
4 | Master JavaScript by learning and solving real-world problems. This course continues where the
5 | introductory JavaScript course left off. Students use a wide range of JavaScript programming
6 | strategies to build interactive programs. Topics include object-oriented programming, unit testing,
7 | asynchronous executions, files and streams, lambda expressions, and module bundlers. Problem solving
8 | using advanced JavaScript techniques is emphasized. GitHub is used to host and share coding projects.
9 |
10 | ## Course Prerequisites
11 | WEB 200 and WEB 231
12 |
13 | ## Course Skills
14 | * Develop programs using JavaScript, HTML5, and CSS to meet project requirements.
15 | * Utilize effective time management and task prioritization techniques to meet project obligations.
16 |
17 | ## Course Objectives
18 | Students who successfully complete this course should be able to:
19 | * Apply object-oriented programming concepts to solve complex problems.
20 | * Develop programs using JavaScript classes and static functions.
21 | * Experiment with JavaScript Iterators and Generators.
22 | * Utilize market research to design UI/UX prototypes.
23 | * Build dynamic HTML using JavaScript and Web Components.
24 | * Make use of asynchronous executions to load dynamic datasets.
25 |
26 | ## Topic Outline
27 | ### Advanced JavaScript
28 | * Unit Testing
29 | * Date, Time, and Strings
30 | * Regular Expressions
31 | * Module Bundlers
32 | ### Object-Oriented Programming
33 | * Classes
34 | * Protected Properties
35 | * Static Properties and Functions
36 | * Inheritance
37 | * Iterators and Generators
38 | ### Asynchronous Executions
39 | * Files and Streams
40 | * Promises
41 | * Async/Await
42 | * Ajax
43 | ### Scalable HTML and CSS
44 | * Web Components
45 | * Flex Layouts
46 | * Dynamic HTML
47 | * XML and JSON
48 |
--------------------------------------------------------------------------------
/week-1/chapter/10_clubs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/10_clubs.png
--------------------------------------------------------------------------------
/week-1/chapter/10_diamonds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/10_diamonds.png
--------------------------------------------------------------------------------
/week-1/chapter/10_hearts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/10_hearts.png
--------------------------------------------------------------------------------
/week-1/chapter/10_spades.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/10_spades.png
--------------------------------------------------------------------------------
/week-1/chapter/2_clubs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/2_clubs.png
--------------------------------------------------------------------------------
/week-1/chapter/2_diamonds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/2_diamonds.png
--------------------------------------------------------------------------------
/week-1/chapter/2_hearts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/2_hearts.png
--------------------------------------------------------------------------------
/week-1/chapter/2_spades.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/2_spades.png
--------------------------------------------------------------------------------
/week-1/chapter/3_clubs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/3_clubs.png
--------------------------------------------------------------------------------
/week-1/chapter/3_diamonds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/3_diamonds.png
--------------------------------------------------------------------------------
/week-1/chapter/3_hearts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/3_hearts.png
--------------------------------------------------------------------------------
/week-1/chapter/3_spades.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/3_spades.png
--------------------------------------------------------------------------------
/week-1/chapter/4_clubs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/4_clubs.png
--------------------------------------------------------------------------------
/week-1/chapter/4_diamonds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/4_diamonds.png
--------------------------------------------------------------------------------
/week-1/chapter/4_hearts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/4_hearts.png
--------------------------------------------------------------------------------
/week-1/chapter/4_spades.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/4_spades.png
--------------------------------------------------------------------------------
/week-1/chapter/5_clubs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/5_clubs.png
--------------------------------------------------------------------------------
/week-1/chapter/5_diamonds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/5_diamonds.png
--------------------------------------------------------------------------------
/week-1/chapter/5_hearts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/5_hearts.png
--------------------------------------------------------------------------------
/week-1/chapter/5_spades.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/5_spades.png
--------------------------------------------------------------------------------
/week-1/chapter/6_clubs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/6_clubs.png
--------------------------------------------------------------------------------
/week-1/chapter/6_diamonds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/6_diamonds.png
--------------------------------------------------------------------------------
/week-1/chapter/6_hearts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/6_hearts.png
--------------------------------------------------------------------------------
/week-1/chapter/6_spades.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/6_spades.png
--------------------------------------------------------------------------------
/week-1/chapter/7_clubs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/7_clubs.png
--------------------------------------------------------------------------------
/week-1/chapter/7_diamonds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/7_diamonds.png
--------------------------------------------------------------------------------
/week-1/chapter/7_hearts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/7_hearts.png
--------------------------------------------------------------------------------
/week-1/chapter/7_spades.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/7_spades.png
--------------------------------------------------------------------------------
/week-1/chapter/8_clubs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/8_clubs.png
--------------------------------------------------------------------------------
/week-1/chapter/8_diamonds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/8_diamonds.png
--------------------------------------------------------------------------------
/week-1/chapter/8_hearts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/8_hearts.png
--------------------------------------------------------------------------------
/week-1/chapter/8_spades.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/8_spades.png
--------------------------------------------------------------------------------
/week-1/chapter/9_clubs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/9_clubs.png
--------------------------------------------------------------------------------
/week-1/chapter/9_diamonds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/9_diamonds.png
--------------------------------------------------------------------------------
/week-1/chapter/9_hearts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/9_hearts.png
--------------------------------------------------------------------------------
/week-1/chapter/9_spades.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/9_spades.png
--------------------------------------------------------------------------------
/week-1/chapter/ace_clubs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/ace_clubs.png
--------------------------------------------------------------------------------
/week-1/chapter/ace_diamonds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/ace_diamonds.png
--------------------------------------------------------------------------------
/week-1/chapter/ace_hearts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/ace_hearts.png
--------------------------------------------------------------------------------
/week-1/chapter/ace_spades.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/ace_spades.png
--------------------------------------------------------------------------------
/week-1/chapter/blank.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/blank.gif
--------------------------------------------------------------------------------
/week-1/chapter/cardback.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/cardback.png
--------------------------------------------------------------------------------
/week-1/chapter/cardstack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/cardstack.png
--------------------------------------------------------------------------------
/week-1/chapter/debug.log:
--------------------------------------------------------------------------------
1 | [1122/075513.841:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3)
2 | [1123/121308.227:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3)
3 | [1125/055359.756:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3)
4 | [1126/064834.399:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3)
5 | [1127/064837.569:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3)
6 | [1128/064839.661:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3)
7 | [1129/064842.051:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3)
8 | [1130/064844.472:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3)
9 |
--------------------------------------------------------------------------------
/week-1/chapter/jack_clubs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/jack_clubs.png
--------------------------------------------------------------------------------
/week-1/chapter/jack_diamonds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/jack_diamonds.png
--------------------------------------------------------------------------------
/week-1/chapter/jack_hearts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/jack_hearts.png
--------------------------------------------------------------------------------
/week-1/chapter/jack_spades.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/jack_spades.png
--------------------------------------------------------------------------------
/week-1/chapter/js08_txt.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
16 | Chapter 8 Case Problem: Draw Poker
17 |
18 |
19 |
20 |
21 |
22 |
23 | Draw Poker
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
BANK
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | BET
45 |
46 | $25
47 | $50
48 | $75
49 | $100
50 |
51 |
52 |
53 |
54 | Select the size of your bet from the drop-down list box and then
55 | click the Deal button to deal the hand. To draw new
56 | cards, click the cards to be discarded and then click the
57 | Draw button. To stand pat, click the
58 | Stand button. To restart the game, click the
59 | Reset button.
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | Hand
71 | Payoff
72 | Hand
73 | Payoff
74 |
75 |
76 | Royal Flush
77 | x 250
78 | Straight
79 | x 4
80 |
81 |
82 | Straight Flush
83 | x 50
84 | 3 of a Kind
85 | x 3
86 |
87 |
88 | 4 of a Kind
89 | x 25
90 | 2 Pair
91 | x 2
92 |
93 |
94 | Full House
95 | x 9
96 | Jacks or Better
97 | x 1
98 |
99 |
100 | Flush
101 | x 6
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
--------------------------------------------------------------------------------
/week-1/chapter/js08_txt.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | /* JavaScript 7th Edition
3 | Chapter 8
4 | Chapter case
5 |
6 | Draw Poker Game using Object Oriented Programming
7 | Author:
8 | Date:
9 |
10 | Filename: js08.js
11 | */
12 |
13 | window.addEventListener("load", playDrawPoker);
14 |
15 | function playDrawPoker() {
16 | // Reference buttons and images within the Poker Game page
17 | let dealButton = document.getElementById("dealB");
18 | let drawButton = document.getElementById("drawB");
19 | let standButton = document.getElementById("standB");
20 | let resetButton = document.getElementById("resetB");
21 | let statusBox = document.getElementById("status");
22 | let betSelection = document.getElementById("bet");
23 | let bankBox = document.getElementById("bank");
24 | let cardImages = document.querySelectorAll("img.cardImg");
25 |
26 |
27 | dealButton.addEventListener("click", function() {
28 | if (pokerGame.currentBank >= pokerGame.currentBet) {
29 | // Enable the Draw and Stand buttons after the initial deal
30 | dealButton.disabled = true; // Turn off the Deal button
31 | betSelection.disabled = true; // Turn off the Bet Selection list
32 | drawButton.disabled = false; // Turn on the Draw button
33 | standButton.disabled = false; // Turn on the Stand Button
34 | statusBox.textContent = ""; // Erase any status messages
35 |
36 |
37 | });
38 |
39 |
40 | drawButton.addEventListener("click", function() {
41 | // Enable the Deal and Bet options when the player chooses to draw new cards
42 | dealButton.disabled = false; // Turn on the Deal button
43 | betSelection.disabled = false; // Turn on the Bet Selection list
44 | drawButton.disabled = true; // Turn off the Draw button
45 | standButton.disabled = true; // Turn off the Stand Button
46 |
47 |
48 |
49 | });
50 |
51 |
52 | standButton.addEventListener("click", function() {
53 | // Enable the Deal and Bet options when the player chooses to stand with their hand
54 | dealButton.disabled = false; // Turn on the Deal button
55 | betSelection.disabled = false; // Turn on the Bet Selection list
56 | drawButton.disabled = true; // Turn off the Draw button
57 | standButton.disabled = true; // Turn off the Stand Button
58 |
59 |
60 | });
61 |
62 |
63 | // Reload the current page when the Reset button is clicked
64 | resetButton.addEventListener("click", function() {
65 | location.reload();
66 | });
67 | }
--------------------------------------------------------------------------------
/week-1/chapter/king_clubs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/king_clubs.png
--------------------------------------------------------------------------------
/week-1/chapter/king_diamonds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/king_diamonds.png
--------------------------------------------------------------------------------
/week-1/chapter/king_hearts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/king_hearts.png
--------------------------------------------------------------------------------
/week-1/chapter/king_spades.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/king_spades.png
--------------------------------------------------------------------------------
/week-1/chapter/objects_txt.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | /* JavaScript 7th Edition
4 | Chapter 8
5 | Chapter case
6 |
7 | Custom Objects Used in Poker Games
8 | Author:
9 | Date:
10 |
11 | Filename: objects.js
12 | */
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | /* ------------------------------------------------+
46 | | The handType() function returns a text string of |
47 | | the type of hand held by 5-card poker hand. |
48 | +-------------------------------------------------*/
49 | function handType(pokerHand) {
50 | /* Determine the rank value of each card in the hand
51 | by creating a property named rankValue */
52 | for (let i = 0; i < pokerHand.cards.length; i++) {
53 | if (pokerHand.cards[i].rank === "ace") {
54 | pokerHand.cards[i].rankValue = 14;
55 | } else if (pokerHand.cards[i].rank === "king") {
56 | pokerHand.cards[i].rankValue = 13;
57 | } else if (pokerHand.cards[i].rank === "queen") {
58 | pokerHand.cards[i].rankValue = 12;
59 | } else if (pokerHand.cards[i].rank === "jack") {
60 | pokerHand.cards[i].rankValue = 11;
61 | } else {
62 | pokerHand.cards[i].rankValue = parseInt(pokerHand.cards[i].rank);
63 | }
64 | }
65 |
66 | /* Function to return the highest ranked value in a five-card hand */
67 | function highCard() {
68 | return Math.max(pokerHand.cards[0].rankValue, pokerHand.cards[1].rankValue,
69 | pokerHand.cards[2].rankValue, pokerHand.cards[3].rankValue,
70 | pokerHand.cards[4].rankValue);
71 | }
72 |
73 | /* Function to test for the presence of a flush in which all
74 | five cards have the same suit */
75 | function hasFlush() {
76 | let firstSuit = pokerHand.cards[0].suit;
77 | return pokerHand.cards.every(function(card) {
78 | return card.suit === firstSuit;
79 | });
80 | };
81 |
82 | /* Function to test for the presence of a straight in which the
83 | rank value of the cards can be placed in sequential order */
84 | function hasStraight() {
85 | pokerHand.cards.sort(function(a, b) {
86 | return a.rankValue - b.rankValue;
87 | });
88 | return pokerHand.cards.every(function(card, i, cards) {
89 | if (i > 0) {
90 | return (cards[i].rankValue - cards[i-1].rankValue === 1);
91 | } else {
92 | return true;
93 | }
94 | });
95 | };
96 |
97 | /* Function to test for the presence of a straight flush */
98 | function hasStraightFlush() {
99 | return hasFlush() && hasStraight();
100 | };
101 |
102 | /* Function to test for the presence of a royal flush
103 | which consists of 10-J-Q-K-A of the same suit */
104 | function hasRoyalFlush() {
105 | return hasStraightFlush() && highCard() === 14;
106 | };
107 |
108 | /* Function to test for the presence of: pairs, two pairs,
109 | three of a kind, four of a kind, and full houses */
110 | function hasSets() {
111 | // handSets creates an associative array of the duplicates in the hand
112 | let handSets = {};
113 | pokerHand.cards.forEach(function(card) {
114 | if (handSets.hasOwnProperty(card.rankValue)) {
115 | handSets[card.rankValue]++;
116 | } else {
117 | handSets[card.rankValue] = 1;
118 | }
119 | });
120 |
121 | let sets = "none";
122 | let pairRank;
123 |
124 | for (let cardRank in handSets){
125 | if (handSets[cardRank] === 4) {sets = "Four of a Kind";}
126 | if (handSets[cardRank] === 3) {
127 | if (sets === "Pair") {sets = "Full House";}
128 | else {sets = "Three of a Kind";}
129 | }
130 | if (handSets[cardRank] === 2) {
131 | if (sets === "Three of a Kind") {sets = "Full House";}
132 | else if (sets === "Pair") {sets = "Two Pair";}
133 | else {sets = "Pair"; pairRank = cardRank;}
134 | }
135 | }
136 |
137 | if (sets === "Pair" && pairRank >= 11) {
138 | sets = "Jacks or Better";
139 | }
140 |
141 | return sets;
142 | }
143 |
144 | // Return a text string describing the hand for draw poker //
145 | if (hasRoyalFlush()) {return "Royal Flush";}
146 | else if (hasStraightFlush()) {return "Straight Flush";}
147 | else if (hasFlush()) {return "Flush";}
148 | else if (hasStraight()) {return "Straight";}
149 | else {
150 | let sets = hasSets();
151 | if (sets === "Pair" || sets === "none") {sets = "No Winner";}
152 | return sets;
153 | }
154 | }
155 | /* ------------------------------------------------+
156 | | End of the handType() function |
157 | +-------------------------------------------------*/
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
--------------------------------------------------------------------------------
/week-1/chapter/queen_clubs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/queen_clubs.png
--------------------------------------------------------------------------------
/week-1/chapter/queen_diamonds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/queen_diamonds.png
--------------------------------------------------------------------------------
/week-1/chapter/queen_hearts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/queen_hearts.png
--------------------------------------------------------------------------------
/week-1/chapter/queen_spades.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-1/chapter/queen_spades.png
--------------------------------------------------------------------------------
/week-1/chapter/styles.css:
--------------------------------------------------------------------------------
1 | /* JavaScript 7th Edition
2 | Chapter 8
3 | Chapter Case
4 |
5 | Filename: styles.css
6 | */
7 |
8 | /* apply a natural box layout model to all elements */
9 | * {
10 | -moz-box-sizing: border-box;
11 | -webkit-box-sizing: border-box;
12 | box-sizing: border-box;
13 | }
14 |
15 | /* reset rules */
16 | html, body, div, span, applet, object, iframe,
17 | h1, h2, h3, h4, h5, h6, p, blockquote, pre,
18 | a, abbr, acronym, address, big, cite, code,
19 | del, dfn, em, img, ins, kbd, q, s, samp,
20 | small, strike, strong, sub, sup, tt, var,
21 | b, u, i, center,
22 | dl, dt, dd, ol, ul, li,
23 | fieldset, form, label, legend,
24 | table, caption, tbody, tfoot, thead, tr, th, td,
25 | article, aside, canvas, details, embed,
26 | figure, figcaption, footer, header, hgroup,
27 | menu, nav, output, ruby, section, summary,
28 | time, mark, audio, video {
29 | margin: 0;
30 | padding: 0;
31 | border: 0;
32 | font-size: 100%;
33 | font: inherit;
34 | vertical-align: baseline;
35 | }
36 |
37 | /* HTML5 display-role reset for older browsers */
38 | article, aside, details, figcaption, figure,
39 | footer, header, hgroup, menu, nav, section {
40 | display: block;
41 | }
42 |
43 | body {
44 | line-height: 1;
45 | width: 1000px;
46 | background: white;
47 | margin: 0 auto;
48 | font-family: Arial, Helvetica, sans-serif;
49 | }
50 |
51 | ol, ul {
52 | list-style: none;
53 | }
54 |
55 |
56 | /* Styles for this Project */
57 |
58 |
59 | html {
60 | font-family: Verdana, Geneva, sans-serif;
61 | font-size: 12px;
62 | }
63 |
64 |
65 | body {
66 | margin: 0px auto;
67 | display: -webkit-flex;
68 | display: flex;
69 | -webkit-flex-flow: row wrap;
70 | flex-flow: row wrap;
71 | background-color: rgb(70, 136, 89);
72 | }
73 |
74 | /* Poker Table Styles */
75 |
76 |
77 |
78 | section#pokerTable h1 {
79 | text-align: center;
80 | font-size: 8.5em;
81 | font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", "Arial Black", "sans-serif";
82 | color: rgb(0, 88, 0);
83 | letter-spacing: 0.1em;
84 | margin: 10px 0 0;
85 | font-weight: normal;
86 | font-variant: small-caps;
87 | text-shadow: black 1px 1px 1px, white 0px -4px 0px;
88 | transform: perspective(350px) rotateX(-15deg);
89 | }
90 |
91 | div#table {
92 | width: 682px;
93 | height: 337px;
94 | position: relative;
95 | margin: 5px auto 20px;
96 | transform: perspective(350px) rotateX(10deg);
97 | background: radial-gradient(farthest-corner, rgb(0, 182, 0), rgb(0, 121, 0) 30%, rgb(0, 41, 0) 70%, black);
98 | border: 15px outset rgba(162, 162, 172, 0.9);
99 | border-radius: 20%;
100 | box-shadow: black 0px 10px 10px 2px;
101 | }
102 |
103 | div#table img#cardstack {
104 | display: block;
105 | position: absolute;
106 | top: 5px;
107 | left: 5px;
108 | }
109 |
110 | div#table img.cardImg {
111 | display: block;
112 | width: 71px;
113 | height: 96px;
114 | cursor: pointer;
115 | position: absolute;
116 | top: 100px;
117 | box-shadow: rgb(51, 51, 51) 3px 3px 10px;
118 | }
119 |
120 | div#table img#card0 {
121 | left: 144px;
122 | }
123 | div#table img#card1 {
124 | left: 220px;
125 | }
126 | div#table img#card2 {
127 | left: 298px;
128 | }
129 | div#table img#card3 {
130 | left: 374px;
131 | }
132 | div#table img#card4 {
133 | left: 450px;
134 | }
135 |
136 | div#status {
137 | position: absolute;
138 | top: 220px;
139 | left: 165px;
140 | width: 375px;
141 | text-align: center;
142 | color: yellow;
143 | font-size: 1.8em;
144 | letter-spacing: 0.3em;
145 | }
146 |
147 | input.pokerButton, select#bet {
148 | position: absolute;
149 | top: 255px;
150 | text-align: center;
151 | display: block;
152 | width: 100px;
153 | font-size: 1.4em;
154 | color: white;
155 | letter-spacing: 0.2em;
156 | background-color: rgb(64, 76, 64);
157 | border: 6px ridge rgba(255, 255, 255, 0.4);
158 | cursor: pointer;
159 | box-shadow: black 0px 4px 4px;
160 | opacity: 1;
161 | }
162 |
163 | input.pokerButton:disabled, select#bet:disabled {
164 | opacity: 0.25;
165 | }
166 |
167 | input#dealB {
168 | left: 64px;
169 | }
170 | input#drawB {
171 | left: 180px;
172 | }
173 | input#standB {
174 | left: 294px;
175 | }
176 | input#resetB {
177 | left: 404px;
178 | }
179 |
180 |
181 | label#betLabel {
182 | font-size: 1.7em;
183 | text-align: center;
184 | display: block;
185 | position: absolute;
186 | top: 232px;
187 | left: 514px;
188 | width: 80px;
189 | color: rgba(121, 181, 121, 0.7);
190 | text-shadow: black 1px 1px 2px, white -1px -1px 0px;
191 | letter-spacing: 0.2em;
192 | }
193 |
194 | label#bankLabel {
195 | font-size: 2.2em;
196 | text-align: center;
197 | display: block;
198 | position: absolute;
199 | top: 114px;
200 | left: 532px;
201 | width: 120px;
202 | color: rgba(121, 181, 121, 0.7);
203 | text-shadow: black 1px 1px 2px, white -1px -1px 0px;
204 | letter-spacing: 0.2em;
205 | }
206 |
207 | input#bank {
208 | position: absolute;
209 | top: 140px;
210 | left: 536px;
211 | width: 90px;
212 | height: 40px;
213 | display: block;
214 | font-size: 1.7em;
215 | color: white;
216 | letter-spacing: 0.2em;
217 | background-color: transparent;
218 | border: 6px double rgba(255, 255, 255, 0.2);
219 | text-align: right;
220 | }
221 |
222 | select#bet {
223 | left: 514px;
224 | width: 90px;
225 | text-align: right;
226 | }
227 |
228 | p#instructions {
229 | margin: 60px auto 20px;
230 | font-size: 1.4em;
231 | line-height: 1.4;
232 | color: rgba(255, 255, 255, 0.7);
233 | width: 700px;
234 | }
235 |
236 | p#instructions strong {
237 | color: rgba(255, 255, 101, 0.8);
238 | font-weight: normal;
239 | }
240 |
241 | #oddsTable {
242 | margin: 20px auto;
243 | background-color: rgba(255, 255, 255, 0.6);
244 | border: 2px solid rgb(64, 76, 64);
245 | border-collapse: collapse;
246 | font-size: 1.2em;
247 | }
248 |
249 | #oddsTable th {
250 | background-color: rgb(64, 76, 64);
251 | text-align: center;
252 | font-weight: normal;
253 | color: yellow;
254 | padding: 4px 10px;
255 | border-right: 1px solid yellow;
256 | vertical-align: top;
257 | }
258 | #oddsTable td {
259 | border: 1px solid rgb(64, 76, 64);
260 | text-align: right;
261 | padding: 2px 12px;
262 | vertical-align: top;
263 | }
264 | #oddsTable .firstCol {
265 | width: 200px;
266 | }
267 | #oddsTable .secondCol {
268 | background-color: rgb(255, 255, 192);
269 | width: 80px;
270 | }
271 |
272 |
--------------------------------------------------------------------------------
/week-1/project08-01/project08-01_txt.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
16 | Hands-on Project 8-1
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | Hands-on Project 8-1
25 |
26 |
27 |
28 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/week-1/project08-01/project08-01_txt.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | /* JavaScript 7th Edition
3 | Chapter 8
4 | Project 08-01
5 |
6 | Project to create a timer object
7 | Author:
8 | Date:
9 |
10 | Filename: project08-01.js
11 | */
12 |
13 | /*--------------- Object Code --------------------*/
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | /*---------------Interface Code -----------------*/
22 |
23 | /* Interface Objects */
24 | let minBox = document.getElementById("minutesBox");
25 | let secBox = document.getElementById("secondsBox");
26 | let runPauseTimer = document.getElementById("runPauseButton");
27 |
28 |
--------------------------------------------------------------------------------
/week-1/project08-01/styles.css:
--------------------------------------------------------------------------------
1 | /* JavaScript 7th Edition
2 | Chapter 8
3 | Hands-on Project 8-1
4 |
5 | Filename: styles.css
6 | */
7 |
8 | /* apply a natural box layout model to all elements */
9 | * {
10 | -moz-box-sizing: border-box;
11 | -webkit-box-sizing: border-box;
12 | box-sizing: border-box;
13 | }
14 |
15 | /* reset rules */
16 | html, body, div, span, applet, object, iframe,
17 | h1, h2, h3, h4, h5, h6, p, blockquote, pre,
18 | a, abbr, acronym, address, big, cite, code,
19 | del, dfn, em, img, ins, kbd, q, s, samp,
20 | small, strike, strong, sub, sup, tt, var,
21 | b, u, i, center,
22 | dl, dt, dd, ol, ul, li,
23 | fieldset, form, label, legend,
24 | table, caption, tbody, tfoot, thead, tr, th, td,
25 | article, aside, canvas, details, embed,
26 | figure, figcaption, footer, header, hgroup,
27 | menu, nav, output, ruby, section, summary,
28 | time, mark, audio, video {
29 | margin: 0;
30 | padding: 0;
31 | border: 0;
32 | font-size: 100%;
33 | font: inherit;
34 | vertical-align: baseline;
35 | }
36 |
37 | /* HTML5 display-role reset for older browsers */
38 | article, aside, details, figcaption, figure,
39 | footer, header, hgroup, menu, nav, section {
40 | display: block;
41 | }
42 |
43 | body {
44 | line-height: 1;
45 | width: 960px;
46 | background: white;
47 | margin: 0 auto;
48 | font-family: Verdana, Geneva, sans-serif;
49 | }
50 |
51 | ol, ul {
52 | list-style: none;
53 | }
54 |
55 | /* page header */
56 | header {
57 | background: #5472B2;
58 | width: 100%;
59 | color: #FFFFFF;
60 | font-size: 48px;
61 | text-align: center;
62 | line-height: 1.5em;
63 | margin-bottom: 0;
64 | }
65 |
66 |
67 |
68 | /*-------------------- Project Styles ------------------*/
69 |
70 | section {
71 | background-color: #FFDB70;
72 | margin-top: 0;
73 | padding-bottom: 20px;
74 | user-select:none;
75 | height: 340px;
76 | }
77 |
78 | section h1 {
79 | font-size: 2.8em;
80 | text-align: center;
81 | margin: 0;
82 | padding: 20px 0;
83 | }
84 |
85 | div#timerClock {
86 | display: block;
87 | margin: 0 auto;
88 | width: 300px;
89 | background-color: rgba(130, 130, 130, 0.9);
90 | text-align: center;
91 | height: 200px;
92 | border: 10px outset gray;
93 | }
94 | input#minutesBox, input#secondsBox {
95 | font-size: 3em;
96 | display: inline-block;
97 | width: 90px;
98 | text-align: right;
99 | padding: 5px;
100 | background-color: black;
101 | color:#F0F4B6;
102 | margin-top: 20px;
103 |
104 | }
105 |
106 | span#separator {
107 | display: inline-block;
108 | font-size: 3em;
109 | text-align: center;
110 | }
111 |
112 | span#minLabel, span#secLabel {
113 | display: inline-block;
114 | margin: 5px 30px;
115 | color: blue;
116 | }
117 |
118 | input#runPauseButton {
119 | font-size: 1.2em;
120 | display: block;
121 | width: 160px;
122 | height: 35px;
123 | margin: 10px auto;
124 | cursor: pointer;
125 | }
--------------------------------------------------------------------------------
/week-2/character-generator/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 | Roleplay Character Generator
14 |
15 |
16 |
17 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/week-2/character-generator/script.js:
--------------------------------------------------------------------------------
1 | /*
2 | Pragmatic JavaScript
3 | Chapter 1
4 | Programming Assignment
5 |
6 | Author:
7 | Date:
8 | Filename:
9 | */
10 |
11 | "use strict";
12 |
13 | function createCharacter(name, gender, characterClass) {
14 | // TODO: Implement this function
15 | }
16 |
17 | document.getElementById("generateHero").addEventListener("click", function(e) {
18 | e.preventDefault();
19 |
20 | // TODO: Get form values
21 |
22 | // TODO: Create character
23 |
24 | // TODO: Display character information
25 | });
--------------------------------------------------------------------------------
/week-2/character-generator/styles.css:
--------------------------------------------------------------------------------
1 | /*
2 | Pragmatic JavaScript
3 | Chapter 1
4 | Programming Assignment
5 |
6 | Author:
7 | Date:
8 | Filename:
9 | */
10 |
11 | /* Your CSS goes here */
--------------------------------------------------------------------------------
/week-3/chapter/ewis.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-3/chapter/ewis.png
--------------------------------------------------------------------------------
/week-3/chapter/js09a_txt.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
17 | Eating Well in Season - Order
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | Eating Well in Season
31 |
32 |
33 |
34 |
40 |
41 |
42 |
43 |
44 | Sign Up
45 |
46 |
47 |
Your info
48 |
Your preferences
49 |
50 |
51 |
74 |
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/week-3/chapter/js09b_txt.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
17 | Eating Well in Season - Order
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | Eating Well in Season
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 | Sign Up
44 |
45 |
46 |
Your info
47 |
Your preferences
48 |
49 |
50 |
79 |
80 |
81 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/week-3/chapter/js09b_txt.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | /* JavaScript 7th Edition
3 | Chapter 9
4 | Chapter case
5 |
6 | Eating Well in Season
7 | Author:
8 | Date:
9 |
10 | Filename: js09b.js
11 | */
12 |
--------------------------------------------------------------------------------
/week-3/chapter/js09c_txt.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
17 | Eating Well in Season - Results
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | Eating Well in Season
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 | Your Eating Well Preferences
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/week-3/chapter/js09c_txt.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | /* JavaScript 7th Edition
3 | Chapter 9
4 | Chapter case
5 |
6 | Eating Well in Season Retrieving Data from Local Storage
7 | Author:
8 | Date:
9 |
10 | Filename: js09c.js
11 | */
12 |
13 |
--------------------------------------------------------------------------------
/week-3/chapter/styles.css:
--------------------------------------------------------------------------------
1 | /* JavaScript 7th Edition
2 | Chapter 9
3 | Chapter case
4 |
5 | Eating Well in Season
6 | Large format style sheet
7 |
8 | Filename: styles.css
9 | */
10 |
11 | /* apply a natural box layout model to all elements */
12 | * {
13 | -moz-box-sizing: border-box;
14 | -webkit-box-sizing: border-box;
15 | box-sizing: border-box;
16 | }
17 |
18 | /* reset rules */
19 | html, body, div, span, applet, object, iframe,
20 | h1, h2, h3, h4, h5, h6, p, blockquote, pre,
21 | a, abbr, acronym, address, big, cite, code,
22 | del, dfn, em, img, ins, kbd, q, s, samp,
23 | small, strike, strong, sub, sup, tt, var,
24 | b, u, i, center,
25 | dl, dt, dd, ol, ul, li,
26 | fieldset, form, label, legend,
27 | table, caption, tbody, tfoot, thead, tr, th, td,
28 | article, aside, canvas, details, embed,
29 | figure, figcaption, footer, header,
30 | menu, nav, output, ruby, section, summary,
31 | time, mark, audio, video {
32 | margin: 0;
33 | padding: 0;
34 | border: 0;
35 | font-size: 100%;
36 | font: inherit;
37 | vertical-align: baseline;
38 | }
39 |
40 | /* HTML5 display-role reset for older browsers */
41 | article, aside, details, figcaption, figure,
42 | footer, header, menu, nav, section {
43 | display: block;
44 | }
45 |
46 | body {
47 | line-height: 1;
48 | width: 800px;
49 | margin: 0 auto;
50 | font-family: "Alegreya Sans", arial, helvetica, sans-serif;
51 | background: rgb(170,189,126);
52 | }
53 |
54 | ol, ul {
55 | list-style: none;
56 | }
57 |
58 | table {
59 | border-collapse: collapse;
60 | border-spacing: 0;
61 | }
62 |
63 | a:link, a:visited {
64 | text-decoration: none;
65 | color: inherit;
66 | }
67 |
68 | a:hover {
69 | text-decoration: none;
70 | color: inherit;
71 | }
72 |
73 | a:active {
74 | text-decoration: none;
75 | color: inherit;
76 | }
77 |
78 | /* container */
79 | #container {
80 | overflow: auto;
81 | position: relative;
82 | }
83 |
84 | /* page header */
85 | header {
86 | float: left;
87 | background: rgb(161,127,67);
88 | }
89 |
90 | header h1 {
91 | padding: 10px;
92 | -webkit-border-radius: 15px;
93 | -moz-border-radius: 15px;
94 | border-radius: 15px;
95 | background: rgb(152,192,61);
96 | margin: 15px;
97 | float: left;
98 | }
99 |
100 | header h1 img {
101 | width: 206px;
102 | height: 132px;
103 | }
104 |
105 | header p {
106 | color: rgb(246,224,65);
107 | font-size: 60px;
108 | padding: 10px;
109 | text-align: center;
110 | position: absolute;
111 | top: 15px;
112 | right: 20px;
113 | z-index: 2;
114 | }
115 |
116 | /* navigation */
117 | nav {
118 | padding: 10px 10px 10px 0;
119 | background: rgb(161,127,67);
120 | font-size: 24px;
121 | float: right;
122 | height: 185px;
123 | position: relative;
124 | width: 544px;
125 | }
126 |
127 | nav ul {
128 | text-align: center;
129 | position: relative;
130 | top: 100px;
131 | }
132 |
133 | nav ul li {
134 | padding: 5px 10px;
135 | display: inline-block;
136 | margin: 0 13px;
137 | background: rgb(152,192,61);
138 | -moz-border-radius: 10px;
139 | -webkit-border-radius: 10px;
140 | border-radius: 10px;
141 | background: black;
142 | color: rgb(152,192,61);
143 | }
144 |
145 | nav ul li.currentPage {
146 | color: black;
147 | background: rgb(152,192,61);
148 | border: 3px solid black;
149 | padding: 2px 10px;
150 | }
151 |
152 | nav ul li:hover {
153 | box-shadow: 10px 0px 17px white,
154 | -10px 0px 17px white;
155 | }
156 |
157 | nav ul li.currentPage:hover {
158 | box-shadow: none;
159 | }
160 |
161 | /* main content */
162 | article {
163 | padding: 20px 20px 40px;
164 | background: white;
165 | position: relative;
166 | overflow: auto;
167 | }
168 |
169 | article h2 {
170 | font-size: 32px;
171 | text-align: left;
172 | margin-bottom: 20px;
173 | margin-right: 20px;
174 | float: left;
175 | }
176 |
177 | article h3 {
178 | font-size: 24px;
179 | font-weight: 700;
180 | text-align: center;
181 | margin-bottom: 0.5em;
182 | }
183 |
184 | article div.otherPage {
185 | font-size: 18px;
186 | float: left;
187 | background: darkgray;
188 | color: lightgray;
189 | padding: 10px;
190 | border: 1px solid darkgray;
191 | }
192 |
193 | article div.currentPage {
194 | font-size: 18px;
195 | float: left;
196 | padding: 10px;
197 | font-weight: 700;
198 | background: gray;
199 | color: rgb(246,224,65);
200 | border: 1px solid black;
201 | }
202 |
203 | article div.results {
204 | color: black;
205 | float: left;
206 | clear: left;
207 | background: lightgray;
208 | padding: 0.8em;
209 | }
210 |
211 | /* form */
212 | form {
213 | width: 100%;
214 | }
215 |
216 | fieldset.text, fieldset.checks {
217 | padding: 5px;
218 | width: 45%;
219 | float: left;
220 | }
221 |
222 | fieldset#fs0 {
223 | width: 400px;
224 | clear: left;
225 | }
226 |
227 | fieldset#fs1 {
228 | width: 200px;
229 | }
230 |
231 | fieldset.checks {
232 | width: 25%;
233 | }
234 |
235 | fieldset.btn {
236 | float: right;
237 | clear: right;
238 | }
239 |
240 | legend {
241 | font-weight: 700;
242 | font-size: 18px;
243 | text-align: left;
244 | padding-left: 0;
245 | margin-bottom: 0.5em;
246 | }
247 |
248 | input, label {
249 | line-height: 1.2em;
250 | display: block;
251 | }
252 |
253 | fieldset.checks legend {
254 | font-weight: 700;
255 | font-size: 14px;
256 | }
257 |
258 | fieldset.checks input, fieldset.checks textarea {
259 | float: left;
260 | clear: left;
261 | margin-right: 5px;
262 | font-size: 18px;
263 | }
264 |
265 | fieldset.checks textarea {
266 | margin-left: 0;
267 | width: 10em;
268 | height: 8em;
269 | }
270 |
271 | fieldset.checks label {
272 | line-height: 1.2em;
273 | margin-bottom: 4px;
274 | }
275 |
276 | fieldset.text label {
277 | width: 4em;
278 | text-align: right;
279 | float: left;
280 | clear: left;
281 | margin: 5px 10px 0 0;
282 | font-weight: 700;
283 | font-size: 18px;
284 | }
285 |
286 | fieldset.text input {
287 | margin: 7px 5px 0 0;
288 | }
289 |
290 | input[type=button], input[type=submit] {
291 | margin: 15px auto 0;
292 | font-size: 20px;
293 | font-weight: 700;
294 | color: rgb(246,224,65);
295 | background: rgb(161,127,67);
296 | border: 3px solid black;
297 | border-radius: 10px;
298 | cursor: pointer;
299 | }
300 |
301 | div#contactInfo {
302 | width: 40%;
303 | float: left;
304 | clear: left;
305 | color: gray;
306 | }
307 |
308 | div#contactInfo label {
309 | float: left;
310 | clear: left;
311 | width: 75px;
312 | margin-bottom: 5px;
313 | display: inline-block;
314 | }
315 |
316 | div#contactInfo input {
317 | float: left;
318 | margin-bottom: 5px;
319 | }
320 |
321 | div#contactInfo input[id=""] {
322 | visibility: hidden;
323 | }
324 |
325 | div#contactInfo input[disabled] {
326 | border: 0px solid transparent;
327 | background-color: transparent;
328 | color: gray;
329 | }
330 |
331 | /* My Preferences Table */
332 |
333 | article > h2#prefHeading {
334 | text-align: center;
335 | width: 100%;
336 | }
337 |
338 | table#prefTable {
339 | border-collapse: collapse;
340 | margin: 30px auto;
341 | }
342 |
343 | table#prefTable td {
344 | border: 1px solid gray;
345 | padding: 5px;
346 | background-color: ivory;
347 | }
348 |
349 | table#prefTable tr td:last-of-type {
350 | min-width: 150px;
351 | }
352 |
353 |
354 |
355 | /* footer */
356 | footer {
357 | background: black;
358 | color: rgb(152,192,61);
359 | text-align: center;
360 | padding: 10px;
361 | font-size: 20px;
362 | }
--------------------------------------------------------------------------------
/week-3/chapter/styleshh.css:
--------------------------------------------------------------------------------
1 | /* JavaScript 7th Edition
2 | Chapter 9
3 | Chapter case
4 |
5 | Eating Well in Season
6 | Handheld style sheet
7 |
8 | Filename: styleshh.css
9 | */
10 |
11 | /* apply a natural box layout model to all elements */
12 | * {
13 | -moz-box-sizing: border-box;
14 | -webkit-box-sizing: border-box;
15 | box-sizing: border-box;
16 | }
17 |
18 | /* reset rules */
19 | html, body, div, span, applet, object, iframe,
20 | h1, h2, h3, h4, h5, h6, p, blockquote, pre,
21 | a, abbr, acronym, address, big, cite, code,
22 | del, dfn, em, img, ins, kbd, q, s, samp,
23 | small, strike, strong, sub, sup, tt, var,
24 | b, u, i, center,
25 | dl, dt, dd, ol, ul, li,
26 | fieldset, form, label, legend,
27 | table, caption, tbody, tfoot, thead, tr, th, td,
28 | article, aside, canvas, details, embed,
29 | figure, figcaption, footer, header,
30 | menu, nav, output, ruby, section, summary,
31 | time, mark, audio, video {
32 | margin: 0;
33 | padding: 0;
34 | border: 0;
35 | font-size: 100%;
36 | font: inherit;
37 | vertical-align: baseline;
38 | }
39 |
40 | /* HTML5 display-role reset for older browsers */
41 | article, aside, details, figcaption, figure,
42 | footer, header, menu, nav, section {
43 | display: block;
44 | }
45 |
46 | body {
47 | line-height: 1;
48 | margin: 0 auto;
49 | font-family: "Alegreya Sans", arial, helvetica, sans-serif;
50 | }
51 |
52 | ol, ul {
53 | list-style: none;
54 | }
55 |
56 | table {
57 | border-collapse: collapse;
58 | border-spacing: 0;
59 | }
60 |
61 | a:link, a:visited {
62 | text-decoration: none;
63 | color: inherit;
64 | }
65 |
66 | a:hover {
67 | text-decoration: none;
68 | color: inherit;
69 | }
70 |
71 | a:active {
72 | text-decoration: none;
73 | color: inherit;
74 | }
75 |
76 | /* container */
77 | #container {
78 | overflow: auto;
79 | position: relative;
80 | }
81 |
82 | /* page header */
83 | header {
84 | background: rgb(161,127,67);
85 | overflow: auto;
86 | }
87 |
88 | header h1 {
89 | padding: 10px;
90 | -webkit-border-radius: 15px;
91 | -moz-border-radius: 15px;
92 | border-radius: 15px;
93 | background: rgb(152,192,61);
94 | margin: 15px;
95 | float: left;
96 | }
97 |
98 | header h1 img {
99 | width: 68.6667px;
100 | height: 44px;
101 | }
102 |
103 | header p {
104 | color: rgb(246,224,65);
105 | font-size: 22px;
106 | padding: 10px;
107 | text-align: center;
108 | position: absolute;
109 | top: 25px;
110 | right: 5px;
111 | float: right;
112 | }
113 |
114 | /* navigation */
115 | nav {
116 | padding: 10px 10px 10px 0;
117 | background: rgb(161,127,67);
118 | font-size: 16px;
119 | float: right;
120 | position: relative;
121 | width: 100%;
122 | }
123 |
124 | nav ul {
125 | text-align: center;
126 | }
127 |
128 | nav ul li {
129 | padding: 5px;
130 | display: inline-block;
131 | margin: 0 4px 5px;
132 | background: rgb(152,192,61);
133 | -moz-border-radius: 10px;
134 | -webkit-border-radius: 10px;
135 | border-radius: 10px;
136 | background: black;
137 | color: rgb(152,192,61);
138 | }
139 |
140 | nav ul li.currentPage {
141 | color: black;
142 | background: rgb(152,192,61);
143 | border: 3px solid black;
144 | padding: 2px 10px;
145 | }
146 |
147 | nav ul li:hover {
148 | box-shadow: 10px 0px 17px white,
149 | -10px 0px 17px white;
150 | }
151 |
152 | nav ul li.currentPage:hover {
153 | box-shadow: none;
154 | }
155 |
156 | /* main content */
157 | article {
158 | padding: 20px 20px 40px;
159 | background: white;
160 | position: relative;
161 | overflow: auto;
162 | }
163 |
164 | article h2 {
165 | font-size: 32px;
166 | text-align: left;
167 | margin-bottom: 20px;
168 | margin-right: 20px;
169 | float: left;
170 | }
171 |
172 | article h3 {
173 | font-size: 24px;
174 | font-weight: 700;
175 | text-align: center;
176 | margin-bottom: 0.5em;
177 | }
178 |
179 | article div.trail {
180 | clear: left;
181 | }
182 |
183 | article div.otherPage {
184 | font-size: 18px;
185 | float: left;
186 | background: darkgray;
187 | color: lightgray;
188 | padding: 10px;
189 | border: 1px solid darkgray;
190 | margin-bottom: 1em;
191 | }
192 |
193 | article div.currentPage {
194 | font-size: 18px;
195 | float: left;
196 | padding: 10px;
197 | font-weight: 700;
198 | background: gray;
199 | color: rgb(246,224,65);
200 | border: 1px solid black;
201 | margin-bottom: 1em;
202 | }
203 |
204 | article div.results {
205 | color: black;
206 | clear: left;
207 | background: lightgray;
208 | }
209 |
210 | /* form */
211 | form {
212 | width: 100%;
213 | }
214 |
215 | fieldset.text, fieldset.checks {
216 | padding: 5px;
217 | }
218 |
219 | fieldset:first-of-type {
220 | clear: left;
221 | }
222 |
223 | fieldset.btn {
224 | float: right;
225 | clear: right;
226 | }
227 |
228 | legend {
229 | font-weight: 700;
230 | font-size: 18px;
231 | text-align: left;
232 | padding-left: 1.4em;
233 | margin-bottom: 0.5em;
234 | }
235 |
236 | #name, #email, #phone {
237 | width: 15em;
238 | }
239 |
240 | #address {
241 | width: 15em;
242 | }
243 |
244 | #city, #zip {
245 | width: 10em;
246 | }
247 |
248 | #state {
249 | width: 3em;
250 | }
251 |
252 | input, label {
253 | line-height: 1.2em;
254 | display: block;
255 | }
256 |
257 | fieldset.checks legend {
258 | font-weight: 700;
259 | font-size: 14px;
260 | }
261 |
262 | fieldset.checks input, fieldset.checks textarea {
263 | float: left;
264 | clear: left;
265 | margin-right: 5px;
266 | margin-left: 3em;
267 | font-size: 18px;
268 | }
269 |
270 | fieldset.checks textarea {
271 | margin-left: 4em;
272 | width: 10em;
273 | height: 8em;
274 | }
275 |
276 | fieldset.checks label {
277 | line-height: 1.2em;
278 | margin-bottom: 4px;
279 | }
280 |
281 | fieldset.text label {
282 | width: 4em;
283 | text-align: right;
284 | float: left;
285 | clear: left;
286 | margin: 5px 10px 0 0;
287 | font-weight: 700;
288 | font-size: 18px;
289 | }
290 |
291 | fieldset.text input {
292 | margin: 7px 5px 0 0;
293 | }
294 |
295 | input[type=submit] {
296 | margin: 15px auto 0;
297 | font-size: 20px;
298 | font-weight: 700;
299 | color: rgb(246,224,65);
300 | background: rgb(161,127,67);
301 | border: 3px solid black;
302 | -moz-border-radius: 10px;
303 | -webkit-border-radius: 10px;
304 | border-radius: 10px;
305 | }
306 |
307 | /* footer */
308 | footer {
309 | background: black;
310 | color: rgb(152,192,61);
311 | text-align: center;
312 | padding: 10px;
313 | font-size: 20px;
314 | }
315 |
316 |
317 | div#contactInfo {
318 | width: 40%;
319 | float: left;
320 | color: gray;
321 | }
322 |
323 | div#contactInfo label {
324 | float: left;
325 | clear: left;
326 | width: 75px;
327 | margin-bottom: 5px;
328 | display: inline-block;
329 | }
330 |
331 | div#contactInfo input {
332 | float: left;
333 | margin-bottom: 5px;
334 | }
335 |
336 | div#contactInfo input[id=""] {
337 | visibility: hidden;
338 | }
339 |
340 | div#contactInfo input[disabled] {
341 | border: 0px solid transparent;
342 | background-color: transparent;
343 | color: gray;
344 | }
345 |
--------------------------------------------------------------------------------
/week-3/project09-02/project09-02a_txt.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 | Hands-on Project 9-2
16 |
17 |
18 |
19 |
20 |
21 |
22 | Hands-on Project 9-2
23 |
24 |
25 |
26 |
136 |
137 |
138 |
--------------------------------------------------------------------------------
/week-3/project09-02/project09-02a_txt.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | /* JavaScript 7th Edition
3 | Chapter 9
4 | Project 09-02
5 |
6 | Project to read field values from web storage
7 | Author:
8 | Date:
9 |
10 | Filename: project09-02a.js
11 | */
12 |
13 | /* Page Objects */
14 |
15 | let riderName = document.getElementById("riderName");
16 | let ageGroup = document.getElementById("ageGroup");
17 | let bikeOption = document.getElementById("bikeOption");
18 | let routeOption = document.getElementById("routeOption");
19 | let accOption = document.getElementById("accOption");
20 | let region = document.getElementById("region");
21 | let miles = document.getElementById("miles");
22 | let comments = document.getElementById("comments");
23 |
--------------------------------------------------------------------------------
/week-3/project09-02/project09-02b_txt.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
16 | Hands-on Project 9-2
17 |
18 |
19 |
20 |
21 |
22 |
23 | Hands-on Project 9-2
24 |
25 |
26 |
27 |
28 | My Membership Information
29 |
30 |
31 |
32 | Rider Name
33 |
34 |
35 |
36 | Age Group
37 |
38 |
39 |
40 | Bike
41 |
42 |
43 |
44 | Route
45 |
46 |
47 |
48 | Accomodation
49 |
50 |
51 |
52 | Region
53 |
54 |
55 |
56 | Miles per Day
57 |
58 |
59 |
60 | Comments
61 |
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/week-3/project09-02/project09-02b_txt.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | /* JavaScript 7th Edition
3 | Chapter 9
4 | Project 09-01
5 |
6 | Project to read field values from session storage
7 | Author:
8 | Date:
9 |
10 | Filename: project09-02b.js
11 | */
12 |
13 | /* Page Objects */
14 |
15 | let riderName = document.getElementById("riderName");
16 | let ageGroup = document.getElementById("ageGroup");
17 | let bikeOption = document.getElementById("bikeOption");
18 | let routeOption = document.getElementById("routeOption");
19 | let accOption = document.getElementById("accOption");
20 | let region = document.getElementById("region");
21 | let miles = document.getElementById("miles");
22 | let comments = document.getElementById("comments");
23 |
24 |
25 |
--------------------------------------------------------------------------------
/week-3/project09-02/styles.css:
--------------------------------------------------------------------------------
1 | /* JavaScript 7th Edition
2 | Chapter 9
3 | Hands-on Project 9-2
4 |
5 | Filename: styles.css
6 | */
7 |
8 | /* apply a natural box layout model to all elements */
9 | * {
10 | -moz-box-sizing: border-box;
11 | -webkit-box-sizing: border-box;
12 | box-sizing: border-box;
13 | }
14 |
15 | /* reset rules */
16 | html, body, div, span, applet, object, iframe,
17 | h1, h2, h3, h4, h5, h6, p, blockquote, pre,
18 | a, abbr, acronym, address, big, cite, code,
19 | del, dfn, em, img, ins, kbd, q, s, samp,
20 | small, strike, strong, sub, sup, tt, var,
21 | b, u, i, center,
22 | dl, dt, dd, ol, ul, li,
23 | form, label, legend,
24 | table, caption, tbody, tfoot, thead, tr, th, td,
25 | article, aside, canvas, details, embed,
26 | figure, figcaption, footer, header, hgroup,
27 | menu, nav, output, ruby, section, summary,
28 | time, mark, audio, video {
29 | margin: 0;
30 | padding: 0;
31 | border: 0;
32 | font-size: 100%;
33 | font: inherit;
34 | vertical-align: baseline;
35 | }
36 |
37 | /* HTML5 display-role reset for older browsers */
38 | article, aside, details, figcaption, figure,
39 | footer, header, hgroup, menu, nav, section {
40 | display: block;
41 | }
42 |
43 | body {
44 | line-height: 1;
45 | width: 960px;
46 | background: white;
47 | margin: 0 auto;
48 | font-family: Verdana, Geneva, sans-serif;
49 | }
50 |
51 | ol, ul {
52 | list-style: none;
53 | }
54 |
55 | /* page header */
56 | header {
57 | background: #5472B2;
58 | width: 100%;
59 | color: #FFFFFF;
60 | font-size: 48px;
61 | text-align: center;
62 | line-height: 1.5em;
63 | margin-bottom: 0;
64 | }
65 |
66 |
67 |
68 | /*-------------------- Project Styles ------------------*/
69 |
70 | section {
71 | background-color: #FFDB70;
72 | margin-top: 0;
73 | padding-bottom: 20px;
74 | user-select:none;
75 | height: 540px;
76 | }
77 |
78 | section h1 {
79 | font-size: 2.8em;
80 | text-align: center;
81 | margin: 0;
82 | padding: 20px 0;
83 | }
84 |
85 | section h1#h2b {
86 | font-size: 1.6em;
87 | text-align: center;
88 | margin: 0;
89 | padding: 20px 0;
90 | }
91 |
92 | #intro {
93 | font-size: 1em;
94 | width: 88%;
95 | margin: 0 auto 15px;
96 | border-bottom: 1px solid gray;
97 | padding-bottom: 8px;
98 | line-height: 1.3;
99 | }
100 |
101 | table#profile {
102 | width: 90%;
103 | font-size: 1em;
104 | padding: 10px;
105 | border-bottom: 1px solid gray;
106 | margin: 0 auto 20px;
107 | }
108 |
109 | table#profile col#firstCol {
110 | width: 160px;
111 | }
112 |
113 | table#profile input {
114 | font-size: 1em;
115 | margin-right: 10px;
116 | }
117 |
118 | table#profile td {
119 | vertical-align: top;
120 | height: 23px;
121 | }
122 |
123 | table#profile textarea {
124 | width: 90%;
125 | height: 90px;
126 | }
127 |
128 | table#profile select {
129 | font-size: 0.9em;
130 | width: 240px;
131 | }
132 |
133 | table#profile #submitButton {
134 | width: 150px;
135 | letter-spacing: 3px;
136 | background-color: rgb(193,193, 193);
137 | }
138 |
139 | table#order {
140 | width: 80%;
141 | margin: 0 auto;
142 | border-collapse: collapse;
143 | background-color: ivory;
144 | }
145 |
146 | table#order th {
147 | border: 1px solid gray;
148 | text-align: left;
149 | width: 110px;
150 | padding: 8px;
151 | background-color:rgba(232,191,102,1.00);
152 | }
153 |
154 | table#order td {
155 | border: 1px solid gray;
156 | padding: 8px;
157 | line-height: 1.4;
158 | }
--------------------------------------------------------------------------------
/week-4/chapter/js10a_txt.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
17 | Oak Top House: Table Setup
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | Oak Top House
26 |
27 |
28 |
29 | Rose Room Setup
30 | The Rose Room is perfect for your medium-sized special event.
31 | Add tables to the room by clicking the table icons from the Table Storage
32 | box. Drag and drop the tables to design the room layout for your event. To remove
33 | a table, press the Shift key and click the table image.
34 | Remember to leave space in the aisles for the wait
35 | staff and any equipment your event requires.
36 |
37 |
38 |
Rose Room (Guests: 0 )
39 |
40 |
Storage
41 |
20
42 |
20
43 |
12
44 |
8
45 |
46 |
47 |
48 |
49 |
50 | Long tables can comforably accommodate 20 guests. Large round tables can
51 | fit 12 guests and smaller round tables can fit 8 guests. Tables
52 | of other sizes and dimensions are available upon request.
53 | Contact the Special Events coordinator for special needs items such as
54 | stages, bars, computer workstations, AV equipment, DJ stations, and kiosks. If you need
55 | a larger venue for your event, please consider the Orchid Room .
56 |
57 |
58 |
59 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/week-4/chapter/js10a_txt.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | /* JavaScript 7th Edition
3 | Chapter 10
4 | Chapter case
5 |
6 | Oak Top House
7 | Author:
8 | Date:
9 |
10 | Filename: js10a.js
11 | */
12 |
13 |
14 | window.addEventListener("load", setupRoom);
15 |
16 | // perform setup tasks when page first loads
17 | function setupRoom() {
18 | //Page objects
19 | let room = document.getElementById("room"); // banquet hall
20 | let storage = document.getElementsByTagName("storage"); // storage room
21 | let roomTables = document.querySelectorAll("#room > div.table"); // Tables in the banquet hall
22 | let storageTables = document.querySelectorAll("#storage > div.table"); // Tables in the storage room
23 | let zIndexCounter = 0; // Count the highest z-Index value
24 |
25 | // Function to calculate available seats in the room layout
26 | function countSeats() {
27 | let guests = 0;
28 | let seatCount = document.getElementById("seatCount");
29 | let tablesToCount = document.querySelectorAll("#room > div.table");
30 | for (let items of tablesToCount) {
31 | guests += parseInt(items.textContent);
32 | }
33 | seatCount.textContent = guests;
34 | }
35 |
36 | }
--------------------------------------------------------------------------------
/week-4/chapter/js10b_txt .html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
17 | Oak Top House: Driving Directions
18 |
19 |
20 |
21 |
22 |
26 |
27 |
28 |
29 |
30 | Oak Top House
31 |
32 |
33 |
34 | Oak Top House Directions
35 | Stop by for a visit. The Oak Top House is conveniently located in downtown Columbus near
36 | the Ohio Statehouse, one block away from the Ohio Theater on East Capital Street.
37 | Enjoy a gourmet dinner at the Oak Top cafe, open daily from 7am to 10pm.
38 | Tour the facilities with one of our experienced event coordinates in preparation for
39 | your special event. Free and ample parking is always
40 | available for our guests and patrons. We look forward to seeing you!
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/week-4/chapter/js10b_txt.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | /* JavaScript 7th Edition
3 | Chapter 10
4 | Chapter case
5 |
6 | Oak Top House Directions
7 | Author:
8 | Date:
9 |
10 | Filename: js10b.js
11 | */
12 |
13 |
14 | // Function to set up and display the Oak Top House Map
15 | function initMap() {
16 |
17 | // Page objects
18 | let displayMap = document.getElementById("displayMap");
19 | let routeBox = document.getElementById("routeBox");
20 |
21 |
22 | }
23 |
24 |
25 |
--------------------------------------------------------------------------------
/week-4/chapter/oaklogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/chapter/oaklogo.png
--------------------------------------------------------------------------------
/week-4/chapter/stylesa.css:
--------------------------------------------------------------------------------
1 | /* JavaScript 7th Edition
2 | Chapter 10
3 | Chapter case
4 |
5 | Oak Top House
6 | Style sheet for Banquet Setup
7 |
8 | Filename: stylesa.css
9 | */
10 |
11 | /* apply a natural box layout model to all elements */
12 | * {
13 | box-sizing: border-box;
14 | }
15 |
16 | /* reset rules */
17 | html, body, div, span, applet, object, iframe,
18 | h1, h2, h3, h4, h5, h6, p, blockquote, pre,
19 | abbr, acronym, address, big, cite, code,
20 | del, dfn, em, img, ins, kbd, q, s, samp,
21 | small, strike, strong, sub, sup, tt, var,
22 | b, u, i, center,
23 | dl, dt, dd, ol, ul, li,
24 | fieldset, form, label, legend,
25 | table, caption, tbody, tfoot, thead, tr, th, td,
26 | article, aside, canvas, details, embed,
27 | figure, figcaption, footer, header, hgroup,
28 | menu, nav, output, ruby, section, summary,
29 | time, mark, audio, video {
30 | margin: 0;
31 | padding: 0;
32 | border: 0;
33 | font-size: 100%;
34 | font: inherit;
35 | vertical-align: baseline;
36 | }
37 |
38 | /* HTML5 display-role reset for older browsers */
39 | article, aside, details, figcaption, figure,
40 | footer, header, hgroup, menu, nav, section {
41 | display: block;
42 | }
43 |
44 | body {
45 | line-height: 1;
46 | width: 1024px;
47 | background: #F5F5F5;
48 | margin: 0 auto;
49 | font-family: Georgia, "Droid Serif", serif;
50 | }
51 |
52 | ol, ul {
53 | list-style: none;
54 | }
55 |
56 | blockquote, q {
57 | quotes: none;
58 | }
59 |
60 | blockquote:before, blockquote:after,
61 | q:before, q:after {
62 | content: '';
63 | content: none;
64 | }
65 |
66 | table {
67 | border-collapse: collapse;
68 | border-spacing: 0;
69 | }
70 |
71 |
72 |
73 | /* header */
74 | header {
75 | font-family: Aladin, cursive;
76 | font-size: 72px;
77 | background: #BBBBBB;
78 | color: #5B291B;
79 | text-align: center;
80 | overflow: hidden;
81 | }
82 |
83 | header h1 {
84 | margin: 20px;
85 | }
86 |
87 |
88 |
89 | /* article */
90 | article {
91 | background: #F0EAD6;
92 | padding: 20px 40px;
93 | font-family: Gotham, "Helvetica Neue", Helvetica, Arial, "sans-serif";
94 | }
95 |
96 | article h1 {
97 | font-size: 1.8em;
98 | margin-bottom: 12px;
99 | }
100 |
101 | article p {
102 | line-height: 1.2;
103 | font-size: 1.15em;
104 | margin-bottom: 20px;
105 | }
106 |
107 |
108 | div#room {
109 | position: relative;
110 | width: 600px;
111 | height: 350px;
112 | background-color: rgba(235,132,117,1.00);
113 | color: white;
114 | margin: 10px auto;
115 | user-select: none;
116 | }
117 |
118 | div#room p {
119 | font-size: 1.2em;
120 | margin: 5px 0 0 5px;
121 | }
122 |
123 | div#room > div.table {
124 | position: absolute;
125 | z-index: 1;
126 | cursor: pointer;
127 | color: white;
128 | background-color: rgba(114, 114, 114, 0.8);
129 | box-shadow: 3px 3px 5px black;
130 | text-align: center;
131 | font-size: 0.8em;
132 | padding-top: 1em;
133 | border: 3px solid #666666;
134 | font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", Verdana, "sans-serif";
135 | user-select: none;
136 | }
137 |
138 |
139 | div#room > div.biground {
140 | width: 100px;
141 | height: 100px;
142 | cursor: pointer;
143 | margin: 5px;
144 | color: white;
145 | background-color: rgba(114, 114, 114, 0.8);
146 | box-shadow: 3px 3px 5px black;
147 | text-align: center;
148 | font-size: 0.8em;
149 | padding-top: 1em;
150 | border: 3px solid #666666;
151 | border-radius: 50%;
152 | font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", Verdana, "sans-serif";
153 | top: 50px;
154 | left: 100px;
155 | }
156 |
157 |
158 |
159 | div#room > div.smallround {
160 | width: 74px;
161 | height: 74px;
162 | cursor: pointer;
163 | margin: 5px;
164 | color: white;
165 | background-color: rgba(114, 114, 114, 0.8);
166 | box-shadow: 3px 3px 5px black;
167 | text-align: center;
168 | font-size: 0.8em;
169 | padding-top: 1em;
170 | border: 3px solid #666666;
171 | border-radius: 50%;
172 | font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", Verdana, "sans-serif";
173 | top: 68px;
174 | left: 240px;
175 | }
176 |
177 |
178 | div#room > div.tallstage {
179 | width: 50px;
180 | height: 270px;
181 | line-height: 25px;
182 | top: 50px;
183 | left: 15px;
184 | }
185 |
186 | div#room > div.longstage {
187 | width: 270px;
188 | height: 50px;
189 | line-height: 25px;
190 | top: 270px;
191 | left: 100px;
192 | }
193 |
194 | div#room > div#storage {
195 | position: relative;
196 | width: 150px;
197 | height: 100px;
198 | border: 1px solid gray;
199 | background-color: ivory;
200 | top: -24px;
201 | left: 450px;
202 | user-select: none;
203 | }
204 |
205 | div#storage p {
206 | font-size: 1.15em;
207 | color: gray;
208 | text-align: right;
209 | margin-right: 8px;
210 | }
211 | div#storage div.table {
212 | position: absolute;
213 | z-index: 1;
214 | cursor: pointer;
215 | background-color: rgba(114, 114, 114, 0.8);
216 | font-size: 0em;
217 | padding-top: 0;
218 | border: transparent;
219 | }
220 |
221 |
222 | div#storage div.biground {
223 | width: 40px;
224 | height: 40px;
225 | cursor: pointer;
226 | margin: 5px;
227 | color: white;
228 | background-color: rgba(114, 114, 114, 0.8);
229 | text-align: center;
230 | border: transparent;
231 | border-radius: 50%;
232 | top: 20px;
233 | left: 40px;
234 | }
235 |
236 |
237 |
238 | div#storage div.smallround {
239 | width: 25px;
240 | height: 25px;
241 | cursor: pointer;
242 | margin: 5px;
243 | color: white;
244 | background-color: rgba(114, 114, 114, 0.8);
245 | font-size: 0em;
246 | border: transparent;
247 | border-radius: 50%;
248 | top: 30px;
249 | left: 95px;
250 | }
251 |
252 |
253 | div#storage div.tallstage {
254 | width: 20px;
255 | height: 80px;
256 | top: 10px;
257 | left: 10px;
258 | }
259 |
260 | div#storage div.longstage {
261 | width: 80px;
262 | height: 20px;
263 | top: 70px;
264 | left: 45px;
265 | }
266 |
267 | div#door1 {
268 | position: absolute;
269 | width: 150px;
270 | height: 8px;
271 | background-color: rgb(120, 120, 120);
272 | top: 345px;
273 | left: 100px;
274 | }
275 |
276 | div#door2 {
277 | position: absolute;
278 | width: 150px;
279 | height: 8px;
280 | background-color: rgb(120, 120, 120);
281 | top: 345px;
282 | left: 300px;
283 | }
284 |
285 | div#door3 {
286 | position: absolute;
287 | width: 8px;
288 | height: 150px;
289 | background-color: rgb(120, 120, 120);
290 | top: 140px;
291 | left: 595px;
292 | }
293 |
294 | /* footer */
295 | footer {
296 | width: 100%;
297 | text-align: center;
298 | padding: 0.3em;
299 | background: #BBBBBB;
300 | color: #5B291B;
301 | clear: both;
302 | }
303 |
304 |
--------------------------------------------------------------------------------
/week-4/chapter/stylesb.css:
--------------------------------------------------------------------------------
1 | /* JavaScript 7th Edition
2 | Chapter 10
3 | Chapter case
4 |
5 | Oak Top House
6 | Style sheet for Oak Top House Directions
7 |
8 | Filename: stylesb.css
9 | */
10 |
11 | /* apply a natural box layout model to all elements */
12 | * {
13 | box-sizing: border-box;
14 | }
15 |
16 | /* reset rules */
17 | html, body, div, span, applet, object, iframe,
18 | h1, h2, h3, h4, h5, h6, p, blockquote, pre,
19 | abbr, acronym, address, big, cite, code,
20 | del, dfn, em, img, ins, kbd, q, s, samp,
21 | small, strike, strong, sub, sup, tt, var,
22 | b, u, i, center,
23 | dl, dt, dd, ol, ul, li,
24 | fieldset, form, label, legend,
25 | table, caption, tbody, tfoot, thead, tr, th, td,
26 | article, aside, canvas, details, embed,
27 | figure, figcaption, footer, header, hgroup,
28 | menu, nav, output, ruby, section, summary,
29 | time, mark, audio, video {
30 | margin: 0;
31 | padding: 0;
32 | border: 0;
33 | font-size: 100%;
34 | font: inherit;
35 | vertical-align: baseline;
36 | }
37 |
38 | /* HTML5 display-role reset for older browsers */
39 | article, aside, details, figcaption, figure,
40 | footer, header, hgroup, menu, nav, section {
41 | display: block;
42 | }
43 |
44 | body {
45 | line-height: 1;
46 | width: 1024px;
47 | background: #F5F5F5;
48 | margin: 0 auto;
49 | font-family: Georgia, "Droid Serif", serif;
50 | }
51 |
52 | ol, ul {
53 | list-style: none;
54 | }
55 |
56 | blockquote, q {
57 | quotes: none;
58 | }
59 |
60 | blockquote:before, blockquote:after,
61 | q:before, q:after {
62 | content: '';
63 | content: none;
64 | }
65 |
66 | table {
67 | border-collapse: collapse;
68 | border-spacing: 0;
69 | }
70 |
71 |
72 |
73 | /* header */
74 | header {
75 | font-family: Aladin, cursive;
76 | font-size: 72px;
77 | background: #BBBBBB;
78 | color: #5B291B;
79 | text-align: center;
80 | overflow: hidden;
81 | }
82 |
83 |
84 | header h1 {
85 | margin: 20px;
86 | }
87 |
88 |
89 |
90 | /* article */
91 | article {
92 | background: #F0EAD6;
93 | padding: 20px 0;
94 | font-family: Gotham, "Helvetica Neue", Helvetica, Arial, "sans-serif";
95 | }
96 |
97 | article h1 {
98 | font-size: 1.8em;
99 | text-align: center;
100 | margin: 0 0 15px 0;
101 | }
102 |
103 | article p {
104 | margin: 0 6% 10px;
105 | font-size: 1.2em;
106 | text-align: justify;
107 | line-height: 1.4;
108 | }
109 |
110 | /* Map Styles */
111 |
112 | div#displayMap {
113 | width: 40%;
114 | padding-bottom: 30%;
115 | height: 0;
116 | margin: 20px auto;
117 | border: 3px solid gray;
118 | }
119 |
120 | div#routeBox {
121 | width: 70%;
122 | margin: 10px auto;
123 | min-height: 50px;
124 | border: 3px solid gray;
125 | text-align: center;
126 | }
127 |
128 | /* footer */
129 | footer {
130 | width: 100%;
131 | text-align: center;
132 | padding: 0.3em;
133 | background: #BBBBBB;
134 | color: #5B291B;
135 | clear: both;
136 | }
137 |
138 |
--------------------------------------------------------------------------------
/week-4/project10-01/piece1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece1.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece10.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece11.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece12.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece13.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece14.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece15.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece16.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece17.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece17.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece18.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece18.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece19.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece2.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece20.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece21.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece21.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece22.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece22.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece23.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece23.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece24.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece25.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece25.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece26.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece26.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece27.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece27.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece28.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece28.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece29.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece3.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece30.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece30.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece31.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece31.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece32.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece33.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece33.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece34.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece34.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece35.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece35.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece36.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece36.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece37.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece37.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece38.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece38.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece39.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece39.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece4.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece40.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece41.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece41.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece42.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece42.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece43.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece43.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece44.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece44.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece45.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece45.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece46.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece46.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece47.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece47.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece48.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece5.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece6.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece7.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece8.png
--------------------------------------------------------------------------------
/week-4/project10-01/piece9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/piece9.png
--------------------------------------------------------------------------------
/week-4/project10-01/project10-01_txt.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
16 | Hands-on Project 10-1
17 |
18 |
19 |
20 |
21 |
22 |
23 | Hands-on Project 10-1
24 |
25 |
26 |
27 |
28 | Jigsaw Puzzle
29 |
30 | Complete the jigsaw puzzle for the flower image shown at the
31 | right. Use your pointer to drag and drop the pieces into position.
32 | TIP: Place the corners first and then the four edges, finishing
33 | with the interior pieces. Good luck!
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/week-4/project10-01/project10-01_txt.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | /* JavaScript 7th Edition
3 | Chapter 10
4 | Project 10-01
5 |
6 | Project to create a drag and drop jigsaw puzzle
7 | Author:
8 | Date:
9 |
10 | Filename: project10-01.js
11 | */
12 |
13 | // Reference to the puzzle board
14 | let puzzleBoard = document.getElementById("puzzleBoard");
15 | // Counter for the zIndex style of each puzzle piece
16 | let zCounter = 1;
17 | // Array of integers from 1 to 48
18 | let intList = new Array(48);
19 | // pointerX and pointerY will contain the initial coordinates of the pointerX
20 | // pieceX and pieceY will contain the initial coordinates of a puzzle piece
21 | let pointerX, pointerY, pieceX, pieceY;
22 |
23 | // Sort the integers from 1 to 48 in random order
24 | for (let i = 0; i < 48 ; i++) {
25 | intList[i] = i+1;
26 | }
27 | intList.sort(function() {
28 | return 0.5 - Math.random();
29 | });
30 |
31 | // generate randomly-sorted puzzle pieces
32 | for (let i = 0; i < 48; i++) {
33 | let piece = document.createElement("img");
34 | piece.src = "piece" + intList[i] + ".png";
35 | let rowNum = Math.ceil((i+1)/8);
36 | let colNum = (i + 1) - (rowNum - 1)*8;
37 | piece.style.top = (rowNum - 1)*98 + 7 + "px";
38 | piece.style.left = (colNum - 1)*98 + 7 + "px";
39 | piece.draggable = false; // override the default draggability of images
40 | puzzleBoard.appendChild(piece);
41 | }
42 |
43 | // Node list representing the puzzle pieces
44 | let pieces = document.querySelectorAll("div#puzzleBoard img");
45 |
46 |
--------------------------------------------------------------------------------
/week-4/project10-01/puzzle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-4/project10-01/puzzle.png
--------------------------------------------------------------------------------
/week-4/project10-01/styles.css:
--------------------------------------------------------------------------------
1 | /* JavaScript 7th Edition
2 | Chapter 10
3 | Hands-on Project 10-1
4 |
5 | Filename: styles.css
6 | */
7 |
8 | /* apply a natural box layout model to all elements */
9 | * {
10 | -moz-box-sizing: border-box;
11 | -webkit-box-sizing: border-box;
12 | box-sizing: border-box;
13 | }
14 |
15 | /* reset rules */
16 | html, body, div, span, applet, object, iframe,
17 | h1, h2, h3, h4, h5, h6, p, blockquote, pre,
18 | a, abbr, acronym, address, big, cite, code,
19 | del, dfn, em, img, ins, kbd, q, s, samp,
20 | small, strike, strong, sub, sup, tt, var,
21 | b, u, i, center,
22 | dl, dt, dd, ol, ul, li,
23 | form, label, legend,
24 | table, caption, tbody, tfoot, thead, tr, th, td,
25 | article, aside, canvas, details, embed,
26 | figure, figcaption, footer, header, hgroup,
27 | menu, nav, output, ruby, section, summary,
28 | time, mark, audio, video {
29 | margin: 0;
30 | padding: 0;
31 | border: 0;
32 | font-size: 100%;
33 | font: inherit;
34 | vertical-align: baseline;
35 | }
36 |
37 | /* HTML5 display-role reset for older browsers */
38 | article, aside, details, figcaption, figure,
39 | footer, header, hgroup, menu, nav, section {
40 | display: block;
41 | }
42 |
43 | body {
44 | line-height: 1;
45 | width: 960px;
46 | background: white;
47 | margin: 0 auto;
48 | font-family: Verdana, Geneva, sans-serif;
49 | }
50 |
51 | ol, ul {
52 | list-style: none;
53 | }
54 |
55 | /* page header */
56 | header {
57 | background: #5472B2;
58 | width: 100%;
59 | color: #FFFFFF;
60 | font-size: 48px;
61 | text-align: center;
62 | line-height: 1.5em;
63 | margin-bottom: 0;
64 | }
65 |
66 |
67 |
68 | /*-------------------- Project Styles ------------------*/
69 |
70 | section {
71 | background-color: #FFDB70;
72 | margin-top: 0;
73 | padding-bottom: 20px;
74 | user-select:none;
75 | height: 980px;
76 | }
77 |
78 | section h1 {
79 | font-size: 2.8em;
80 | text-align: center;
81 | margin: 0;
82 | padding: 20px 0;
83 | }
84 |
85 | section p {
86 | width: 800px;
87 | margin: 0 auto;
88 | font-size: 1.3em;
89 | line-height: 1.3;
90 | font-family: Baskerville, "Palatino Linotype", Palatino, "Century Schoolbook L", "Times New Roman", "serif"
91 | }
92 | section p img {
93 | float: right;
94 | margin: 0 20px 20px 20px;
95 | width: 280px;
96 | }
97 |
98 | em {
99 | font-style: italic;
100 | }
101 |
102 | div#puzzleBoard {
103 | clear: right;
104 | width: 800px;
105 | height: 600px;
106 | margin: 20px auto;
107 | border: 5px solid gray;
108 | position: relative;
109 | background-color: yellow;
110 | }
111 |
112 | div#puzzleBoard img {
113 | position: absolute;
114 | user-drag: none;
115 | user-select: none;
116 | filter: drop-shadow(2px 2px 5px black);
117 | cursor: pointer;
118 | display: block;
119 | }
120 |
--------------------------------------------------------------------------------
/week-5/restaurant-reservation/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 | Table Reservation
14 |
15 |
16 |
17 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/week-5/restaurant-reservation/script.js:
--------------------------------------------------------------------------------
1 | /*
2 | Pragmatic JavaScript
3 | Chapter 2
4 | Programming Assignment
5 |
6 | Author:
7 | Date:
8 | Filename:
9 | */
10 |
11 | // Create an in-memory object array for each table in the restaurant
12 | let tables = [
13 | // Add your table objects here
14 | ];
15 |
16 | // Create a function reserveTable
17 | function reserveTable(tableNumber, callback, time) {
18 | // Add your code here
19 | }
20 |
21 | // When the form is submitted, call the reserveTable function
22 | document
23 | .getElementById("reservationForm")
24 | .addEventListener("submit", function (e) {
25 | // Add your code here
26 | });
27 |
--------------------------------------------------------------------------------
/week-5/restaurant-reservation/styles.css:
--------------------------------------------------------------------------------
1 | /*
2 | Pragmatic JavaScript
3 | Chapter 2
4 | Programming Assignment
5 |
6 | Author:
7 | Date:
8 | Filename:
9 | */
10 |
11 | /* Add your CSS styles here */
--------------------------------------------------------------------------------
/week-6/chapter/archives.pl:
--------------------------------------------------------------------------------
1 | #!"D:\xampp\perl\bin\perl.exe"
2 |
3 | # Confirm that perl is located in the usr/bin/perl folder on the server
4 |
5 | #All perl scripts should use strict
6 | use strict;
7 |
8 | use CGI;
9 | my $cgi_object = new CGI();
10 |
11 | # Print out the http header
12 | print $cgi_object->header();
13 |
14 | # Retrieve the value of the skey parameter
15 | my $input = $cgi_object->param('skey');
16 |
17 | # This is the hashtable storing a sample of archived articles in HTML format
18 | my @articles = (
19 | { searchkey => "Packers",
20 | content => "A Cheesy Monument
21 | Keyword: Packers
22 | Green Bay native Jeff Miller
23 | loves Packers QB Brian Paulson. And he loves the
24 | Packers. And he loves cheese. So what could be more
25 | natural than carving a life-size statue of his beloved
26 | player in a huge block of gouda? Speaking of natural,
27 | Jeff's wife is starting to complain about the natural
28 | odor of the monument. 'I suppose I'll have to give it
29 | up, ' sighed Jeff.
30 | For his next creation, Jeff can do the entire porous GB
31 | defense ... in swiss cheese; or he can simply do a
32 | statue of beleaguered GB defense back Chris Conners in
33 | toast.
34 | Posted: 11/1/2024 @ 1:25 am "
35 | },
36 | { searchkey => "Astros",
37 | content => "DL on DL
38 | Keyword: Astros
39 | Astro relief pitcher Dabne Lipscomb will be on the
40 | disable list for the next three weeks. It seems Dabne
41 | cut the index finger on his throwing hand trying to open
42 | his new XBox game with a pen knife. The game he couldn't wait to play?
43 | Blade of Honor .
44 | Lipscomb is no stranger to unusual injuries.
45 | Last year he was out for 3 weeks with a lower back injury
46 | due to what he termed as a very violent sneeze .
47 | The year before that he was laid up due to an alergic
48 | reaction to pine tar.
49 | It would seem that Lipscomb's initials are not DL for
50 | nothing!
51 | Posted: 6/14/2024 @ 3:12 pm "
52 | },
53 | { searchkey => "Baseball",
54 | content =>"Basebrawl
55 | Keyword: Baseball
56 | Pittsburgh and
57 | Los Angeles ended their seasons with the biggest bench-clearing
58 | brawl of the year. Apparently with nothing to play
59 | for, but plenty to fight for, six players were ejected,
60 | including Pirate skipper, Whyte Kohlmann.
61 |
62 | The fight started when Pirate pitcher, Gary Tribbit
63 | hit LA slugger, Yale
64 | Iverson in retaliation for Iverson's 3rd-inning
65 | homerun. 'I thought he spent a little too much time
66 | trotting around
67 | the bases,' explained Tribbit. Given
68 | Iverson's anemic 185 batting average, you have
69 | to give him the benefit of the doubt. It was the
70 | first time he's cleared the yard this year and
71 | he was probably in a state of shock.
72 |
73 | Posted: 9/18/2024 @ 12:05 pm "
74 | },
75 | { searchkey => "Baseball",
76 | content =>"Hit by a No Hitter
77 | Keyword: Baseball
78 | Ken Bryce of the Double A Tipton Turbines threw
79 | a no hitter against Clinton last week. Of course just
80 | because there were no hits, doesn't means there weren't
81 | any hits . There were three of them:
82 | all beanballs thrown by a often wild Bryce.
83 | No runs resulted as Tipton beat Clinton
84 | 2 - 0.
85 |
86 | Posted: 8/9/2024 @ 8:11 pm "
87 | },
88 | { searchkey => "Basketball",
89 | content => "Jenkins on Ice
90 | Keyword: Basketball
91 | Retired NBA star Dennis Jenkins announced today that
92 | he has signed a contract with Long Sleep to
93 | have his body frozen before death, to be revived only
94 | when medical science has discovered a cure to the aging
95 | process.
96 |
97 | 'Lots of guys get frozen for cancer and stuff, '
98 | explains the always-entertaining Jenkins, 'I just want
99 | to return once they can give me back my eternal youth.'
100 | [sic] Perhaps Jenkins is also hoping medical science can
101 | cure his free-throw shooting - 47% and falling during
102 | his last year in the league.
103 | A reader tells us that Jenkins may not be aware that
104 | part of the Long Sleep process is to remove the
105 | head, keeping only the brain to be revived. This would
106 | be a problem for Jenkins since he would be left with his
107 | least-valuable asset.
108 | Posted: 8/10/2024 @11:39 am "
109 | },
110 | { searchkey => "Texans",
111 | content => "Check that Pen!
112 | Keyword: Texans
113 | After a long holdout, ESPN is reporting that Houston
114 | Texans running back JT Olson has come to terms with the
115 | team, signing a three-year deal for $12 million. 'I'm
116 | really happy with the contract,' claims JT, 'and I'm
117 | looking forward to holding out again next year for an
118 | even bigger contract after I win the rushing title!'
119 | My advice to the Texans: Check JT's pen to make sure
120 | it wasn't filled with disappearing ink!
121 | Posted: 8/9/2024 @ 10:31 pm "
122 | },
123 | { searchkey => "Golf",
124 | content => "Physician Heal Thyself
125 | Keyword: Golf
126 | Gilbert Gott missed the cut at the PGA Championship after carding
127 | a snowman on the final hole with four putts inside of 5 feet.
128 | Gott got gone without speaking to the press, claiming that he had to get
129 | home to Sarasota to host a high-priced golfing clinic.
130 | The theme of the clinic? Golf like Gott .
131 | I don't need to attend his golfing clinic.
132 | Check my scorecard: I've been golfing like Gott for 20
133 | years!
134 | Posted: 8/11/2024 @ 6:42 pm "
135 | }
136 |
137 | );
138 |
139 | # Keep track of the number of hits using the count variable
140 | my $count = 0;
141 | foreach my $row (@articles) {
142 | if ( $row->{searchkey} =~ /^$input$/i) {
143 | $count ++;
144 | print "$row->{content}"
145 | }
146 | }
147 |
148 | # If no hits, print this fact
149 | if ($count == 0) {
150 | print "No Articles Found Come back again, we're still setting up our database!
";
151 | }
--------------------------------------------------------------------------------
/week-6/chapter/commentary.html:
--------------------------------------------------------------------------------
1 | Jenkins on Ice
2 | Keyword: Basketball
3 | Retired NBA star Dennis Jenkins announced today that he has signed a
4 | contract with Long Sleep to have his body frozen before death, to
5 | be revived only when medical science has discovered a cure to the aging
6 | process.
7 | 'Lots of guys get frozen for cancer and stuff, ' explains the
8 | always-entertaining Jenkins, 'I just want to return once they
9 | can give me back my eternal youth.' [sic] Perhaps Jenkins is also hoping
10 | medical science can cure his free-throw shooting - 47% and falling during his
11 | last year in the league.
12 | A reader tells us that Jenkins may not be aware that part
13 | of the Long Sleep process is to remove the head, keeping only the
14 | brain to be revived. This would be a problem for Jenkins since he would be
15 | left with his least-valuable asset.
16 | Posted: 8/10/2024 @11:39 am
17 |
18 | Check that Pen!
19 | Keyword: Texans
20 | After a long holdout, ESPN is reporting that Houston Texans running back
21 | JT Olson has come to terms with the team, signing a three-year deal for
22 | $12 million. 'I'm really happy with the contract,' claims JT, 'and I'm
23 | looking forward to holding out again next year for an even bigger contract
24 | after I win the rushing title!'
25 | My advice to the Texans: Check JT's pen to make sure it wasn't filled with
26 | disappearing ink!
27 | Posted: 8/9/2024 @ 10:31 pm
28 |
--------------------------------------------------------------------------------
/week-6/chapter/headlines.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
15 |
16 |
17 | Current Headlines
18 | Sports News Feed
19 |
20 | -
21 |
Carls leads at PGA
22 | http://www.sbloggernewslinks.com/pga/pga238.html
23 | Brett Carls took a three stroke lead into
24 | the final round of the PGA Championship at Whistling
25 | Straits.
26 |
27 |
28 |
29 | -
30 |
Groveney Signs
31 | http://www.sbloggernewslinks.com/nhl/nhl38891.html
32 | New York signed leading defenseman Steve Groveney
33 | to a 2-year contract on Thursday.
34 |
35 |
36 |
37 | -
38 |
Olson Out for 2 Weeks
39 | http://www.sbloggernewslinks.com/nfl/nfl8771.html
40 | Team officials announced that Kansas City QB Drew Olson will miss two weeks
41 | of practice due to a sprained knee.
42 |
43 |
44 |
45 | -
46 |
Koke Triumphs in Malaysia
47 | http://www.sbloggernewslinks.com/surf/surf8717.html
48 | Koke won the Men's Open
49 | Division victory in the closely contested
50 | final of the Malaysian Surfing Pro Am.
51 |
52 |
53 |
54 | -
55 |
Gregg Called Up
56 | http://www.sbloggernewslinks.com/mlb/mlb81808.html
57 | Steve Gregg was recalled to the majors
58 | after allowing two hits in six innings in
59 | his third start for the Tipton Turbines.
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/week-6/chapter/js11_txt.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 | Sblogger News
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
Enter a search keyword
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
63 |
64 |
65 |
66 |
67 |
68 | Current Headlines
69 |
70 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/week-6/chapter/js11_txt.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | /*
3 | JavaScript 7th Edition
4 | Chapter 11
5 | Chapter Case
6 |
7 | Author:
8 | Date:
9 |
10 | Filename: js11.js
11 |
12 |
13 | */
14 |
15 | window.addEventListener("load", init);
16 |
17 | function init() {
18 | // Page Objects
19 | let stories = document.getElementById("stories");
20 | let news = document.getElementById("news");
21 | let sInput = document.getElementById("sInput");
22 | let sButton = document.getElementById("sButton");
23 | let suggestBox = document.getElementById("suggestBox");
24 |
25 |
26 |
27 | }
--------------------------------------------------------------------------------
/week-6/chapter/keywords.pl:
--------------------------------------------------------------------------------
1 | #!"D:\xampp\perl\bin\perl.exe"
2 |
3 | #Confirm that perl is located in the /usr/bin/perl folder
4 | #of your Web server
5 |
6 | #All perl scripts should use strict
7 | use strict;
8 |
9 | use CGI;
10 | my $cgi_object = new CGI();
11 |
12 | # Printout out the header
13 | print $cgi_object->header();
14 |
15 | # Retrieve the value of the suggest parameter
16 | my $input = $cgi_object->param('suggest');
17 |
18 | # This is the hashtable holding a list of the SBlogger keywords
19 | # This could just as easily placed in a MySQL database.
20 |
21 | my @keys = (
22 | { key => "49ers" },
23 | { key => "76ers" },
24 | { key => "Angels" },
25 | { key => "Astros" },
26 | { key => "Athletics" },
27 | { key => "Baseball" },
28 | { key => "Basketball" },
29 | { key => "Bears" },
30 | { key => "Bengals" },
31 | { key => "Bills" },
32 | { key => "Blue Jays" },
33 | { key => "Bobcats" },
34 | { key => "Braves" },
35 | { key => "Brewers" },
36 | { key => "Broncos" },
37 | { key => "Browns" },
38 | { key => "Buccaneers" },
39 | { key => "Bucks" },
40 | { key => "Bulls" },
41 | { key => "Cardinals Baseball" },
42 | { key => "Cardinals Football" },
43 | { key => "Cavaliers" },
44 | { key => "Celtics" },
45 | { key => "Chargers" },
46 | { key => "Chiefs" },
47 | { key => "Clippers" },
48 | { key => "Colts" },
49 | { key => "Cowboys" },
50 | { key => "Cubs" },
51 | { key => "Diamondbacks" },
52 | { key => "Dodgers" },
53 | { key => "Dolphins" },
54 | { key => "Eagles" },
55 | { key => "Falcons" },
56 | { key => "Football" },
57 | { key => "Giants Football" },
58 | { key => "Giants Baseball" },
59 | { key => "Golf" },
60 | { key => "Grizzlies" },
61 | { key => "Hawks" },
62 | { key => "Heat" },
63 | { key => "Hockey" },
64 | { key => "Hornets" },
65 | { key => "Indians" },
66 | { key => "Jaguars" },
67 | { key => "Jazz" },
68 | { key => "Jets" },
69 | { key => "Kings" },
70 | { key => "Knicks" },
71 | { key => "Lakers" },
72 | { key => "Lions" },
73 | { key => "Magic" },
74 | { key => "Mariners" },
75 | { key => "Marlins" },
76 | { key => "Mavericks" },
77 | { key => "Mets" },
78 | { key => "MLB" },
79 | { key => "Nationals" },
80 | { key => "NBA" },
81 | { key => "Nets" },
82 | { key => "NFL" },
83 | { key => "Nuggets" },
84 | { key => "Orioles" },
85 | { key => "Olympics" },
86 | { key => "Pacers" },
87 | { key => "Packers" },
88 | { key => "Padres" },
89 | { key => "Panthers" },
90 | { key => "Patriots" },
91 | { key => "Phillies" },
92 | { key => "Pirates" },
93 | { key => "Pistons" },
94 | { key => "Premier League" },
95 | { key => "Raiders" },
96 | { key => "Rams" },
97 | { key => "Raptors" },
98 | { key => "Ravens" },
99 | { key => "Red Sox" },
100 | { key => "Reds" },
101 | { key => "Redskins" },
102 | { key => "Rockets" },
103 | { key => "Royals" },
104 | { key => "Saints" },
105 | { key => "Seahawks" },
106 | { key => "Senators" },
107 | { key => "Soccer" },
108 | { key => "Spurs" },
109 | { key => "Steelers" },
110 | { key => "Suns" },
111 | { key => "Texans" },
112 | { key => "Tigers" },
113 | { key => "Timberwolves" },
114 | { key => "Titans" },
115 | { key => "Trail Blazers" },
116 | { key => "Twins" },
117 | { key => "Vikings" },
118 | { key => "Warriors" },
119 | { key => "White Sox" },
120 | { key => "Wizards" },
121 | { key => "Yankees" }
122 | );
123 |
124 | # Keep track of the number of hits using the count variable
125 | my $count = 0;
126 |
127 | # Start printing the keyword hits in an array in JSON format
128 | print "{\"matches\": [\n";
129 |
130 | # Loop through the list of keys to locate the number of hits
131 | foreach my $row (@keys) {
132 | if ( $row->{key} =~ /^$input/i) {
133 | $count++;
134 | if ($count == 1) {
135 | print "\"$row->{key}\"\n"
136 | } else {
137 | print ",\"$row->{key}\"\n"
138 | }
139 |
140 | # Limit the number of hits to 5
141 | if ($count == 5) {
142 | last;
143 | }
144 | }
145 | }
146 |
147 | # Conclude printing the hits in JSON format
148 | print "]\n}";
--------------------------------------------------------------------------------
/week-6/chapter/sblogo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-6/chapter/sblogo.jpg
--------------------------------------------------------------------------------
/week-6/chapter/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-6/chapter/search.png
--------------------------------------------------------------------------------
/week-6/chapter/styles.css:
--------------------------------------------------------------------------------
1 | /* JavaScript 7th Edition
2 | Chapter 11
3 | Chapter case
4 |
5 | Style sheet for SBlogger website
6 |
7 | Filename: styles.css
8 | */
9 |
10 | /* apply a natural box layout model to all elements */
11 | * {
12 | box-sizing: border-box;
13 | }
14 |
15 | /* reset rules */
16 | html, body, div, span, applet, object, iframe,
17 | h1, h2, h3, h4, h5, h6, p, blockquote, pre,
18 | abbr, acronym, address, big, cite, code,
19 | del, dfn, img, ins, kbd, q, s, samp,
20 | small, strike, strong, sub, sup, tt, var,
21 | b, u, i, center,
22 | dl, dt, dd, ol, ul, li,
23 | fieldset, form, label, legend,
24 | table, caption, tbody, tfoot, thead, tr, th, td,
25 | article, aside, canvas, details, embed,
26 | figure, figcaption, footer, header, hgroup,
27 | menu, nav, output, ruby, section, summary,
28 | time, mark, audio, video {
29 | margin: 0;
30 | padding: 0;
31 | border: 0;
32 | font-size: 100%;
33 | font: inherit;
34 | vertical-align: baseline;
35 | }
36 |
37 | /* HTML5 display-role reset for older browsers */
38 | article, aside, details, figcaption, figure,
39 | footer, header, hgroup, menu, nav, section {
40 | display: block;
41 | }
42 |
43 | body {
44 | line-height: 1;
45 | width: 920px;
46 | background: ivory;
47 | box-shadow: 3px 0px 15px gray, -3px 0px 15px gray;
48 | margin: 0 auto;
49 | font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", Verdana, "sans-serif";
50 | }
51 |
52 | ol, ul {
53 | list-style: none;
54 | }
55 |
56 | blockquote, q {
57 | quotes: none;
58 | }
59 |
60 | blockquote:before, blockquote:after,
61 | q:before, q:after {
62 | content: '';
63 | content: none;
64 | }
65 |
66 | table {
67 | border-collapse: collapse;
68 | border-spacing: 0;
69 | }
70 |
71 | body > header {
72 | width: 100%;
73 | background-color: white;
74 | position: relative;
75 | }
76 |
77 |
78 |
79 | /* Search Button Style */
80 | #search {
81 | position: absolute;
82 | top: 20px;
83 | right: 20px;
84 | }
85 |
86 | #search label {
87 | font-size: 0.9em;
88 |
89 | }
90 |
91 | #sInput {
92 | width: 200px;
93 | font-size: 0.9em;
94 | }
95 |
96 | #sButton {
97 | vertical-align: middle;
98 | width: 30px;
99 | height: auto;
100 | }
101 |
102 | section {
103 | display: flex;
104 | flex-flow: row nowrap;
105 | border: 1px solid gray;
106 | }
107 |
108 | section > nav#links {
109 | flex: 1 3 150px;
110 | }
111 |
112 | section > article#stories {
113 | flex: 3 1 450px;
114 | }
115 |
116 | section > aside#news {
117 | flex: 1 3 150px;
118 | }
119 |
120 | /* Navigation Links */
121 | nav#links {
122 | background-color: rgb(81, 105, 167);
123 | padding: 10px;
124 | flex: 1 1 150px;
125 | }
126 |
127 | nav#links ul li {
128 | font-size: 0.9em;
129 | line-height: 1.4em;
130 | }
131 |
132 | nav#links li.linktitle {
133 | color: rgb(229, 247, 165);
134 | font-size: 1em;
135 | margin: 20px 0 8px;
136 | }
137 |
138 | nav#links ul li a {
139 | text-decoration: none;
140 | color: white;
141 | }
142 |
143 | nav#links ul li a:hover {
144 | color: black;
145 | }
146 |
147 | body > section > article#stories {
148 | padding: 7px;
149 | border-right: 1px solid rgb(81, 105, 165);
150 | background-color: rgba(0,0, 211, 0.1);
151 | }
152 |
153 | body > section > article#stories h1 {
154 | font-size: 1.5em;
155 | font-weight: normal;
156 | color: rgb(0, 78, 156);
157 | letter-spacing: 5px;
158 | margin: 5px 0 0 5px;
159 | }
160 |
161 | body > section > article#stories h6 {
162 | font-size: 1em;
163 | color: rgb(80, 158, 235);
164 | text-align: right;
165 | font-weight: normal;
166 | margin: 0 20px 10px 5px;
167 | }
168 |
169 | body > section > article#stories p {
170 | font-size: 1em;
171 | line-height: 1.2;
172 | font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", Verdana, "sans-serif";
173 | margin: 0 0 15px 0;
174 | }
175 | body > section > article#stories cite {
176 | display: block;
177 | font-size: 0.8em;
178 | text-align: right;
179 | padding-bottom: 7px;
180 | margin: 0 20px 10px 0;
181 | border-bottom: 1px solid rgb(0, 78, 156)}
182 |
183 | body > section > article#stories img {
184 | display: block;
185 | width: 70%;
186 | height: auto;
187 | margin: 0 auto;
188 | }
189 |
190 |
191 | aside#news {
192 | background-color: rgb(255,255,192);
193 | padding: 0 15px 0 10px;
194 | }
195 |
196 | aside#news > article {
197 | border-bottom:
198 | }
199 | aside#news h1 {
200 | font-size: 1.1em;
201 | font-weight: bold;
202 | font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", Verdana, "sans-serif";
203 | color: rgb(0, 78, 156);
204 | letter-spacing: 3px;
205 | text-align: center;
206 | margin: 5px 0 15px;
207 | }
208 |
209 | aside#news > article h2 {
210 | font-size: 1em;
211 | font-weight: bold;
212 | font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", Verdana, "sans-serif";
213 | margin: 0 0 5px 0;
214 | }
215 |
216 |
217 | aside#news > article h2 a {
218 | color: rgb(0, 78, 156);
219 | text-decoration: none;
220 | }
221 |
222 | aside#news >article h2 a:hover {
223 | color: red;
224 | }
225 |
226 | aside#news > article p {
227 | font-size: 0.8em;
228 | font-family:"Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", Verdana, "sans-serif";
229 | padding-bottom: 7px;
230 | line-height: 1.2;
231 | margin: 0 0 15px 0;
232 | border-bottom: 1px solid rgb(0, 78, 156);
233 | }
234 |
235 | /* Suggestion Box Styles */
236 |
237 | div#suggestBox {
238 | position: absolute;
239 | top: 38px;
240 | left: 0px;
241 | width: 203px;
242 | background-color: white;
243 | font-size: 1em;
244 | border: 1px solid rgb(151, 151, 151);
245 | display: none;
246 | }
247 | div#suggestBox > div {
248 | background-color: white;
249 | color: rgb(91, 91, 91);
250 | margin: 8px 0 8px 5px;
251 | cursor: pointer;
252 | }
253 |
254 | div#suggestBox > div:hover {
255 | background-color: rgb(0, 78, 156);
256 | color: rgb(255, 255, 192);
257 | }
258 |
--------------------------------------------------------------------------------
/week-6/project11-02/project11-02_txt.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
16 | Hands-on Project 11-2
17 |
18 |
19 |
20 |
21 |
22 |
23 | Hands-on Project 11-2
24 |
25 |
26 |
27 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/week-6/project11-02/project11-02_txt.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | /* JavaScript 7th Edition
3 | Chapter 11
4 | Project 11-02
5 |
6 | Project to city and state information from a provided postal code
7 | Author:
8 | Date:
9 |
10 | Filename: project11-02.js
11 | */
12 |
13 | let postalCode = document.getElementById("postalCode");
14 | let place = document.getElementById("place");
15 | let region = document.getElementById("region");
16 | let country = document.getElementById("country");
17 |
18 | postalCode.onblur = function() {
19 |
20 | }
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/week-6/project11-02/styles.css:
--------------------------------------------------------------------------------
1 | /* JavaScript 7th Edition
2 | Chapter 11
3 | Hands-on Project 11-2
4 |
5 | Filename: styles.css
6 | */
7 |
8 | /* apply a natural box layout model to all elements */
9 | * {
10 | -moz-box-sizing: border-box;
11 | -webkit-box-sizing: border-box;
12 | box-sizing: border-box;
13 | }
14 |
15 | /* reset rules */
16 | html, body, div, span, applet, object, iframe,
17 | h1, h2, h3, h4, h5, h6, p, blockquote, pre,
18 | a, abbr, acronym, address, big, cite, code,
19 | del, dfn, em, img, ins, kbd, q, s, samp,
20 | small, strike, strong, sub, sup, tt, var,
21 | b, u, i, center,
22 | dl, dt, dd, ol, ul, li,
23 | form, label, legend,
24 | table, caption, tbody, tfoot, thead, tr, th, td,
25 | article, aside, canvas, details, embed,
26 | figure, figcaption, footer, header, hgroup,
27 | menu, nav, output, ruby, section, summary,
28 | time, mark, audio, video {
29 | margin: 0;
30 | padding: 0;
31 | border: 0;
32 | font-size: 100%;
33 | font: inherit;
34 | vertical-align: baseline;
35 | }
36 |
37 | /* HTML5 display-role reset for older browsers */
38 | article, aside, details, figcaption, figure,
39 | footer, header, hgroup, menu, nav, section {
40 | display: block;
41 | }
42 |
43 | body {
44 | line-height: 1;
45 | width: 960px;
46 | background: white;
47 | margin: 0 auto;
48 | font-family: Verdana, Geneva, sans-serif;
49 | }
50 |
51 | ol, ul {
52 | list-style: none;
53 | }
54 |
55 | /* page header */
56 | header {
57 | background: #5472B2;
58 | width: 100%;
59 | color: #FFFFFF;
60 | font-size: 48px;
61 | text-align: center;
62 | line-height: 1.5em;
63 | margin-bottom: 0;
64 | }
65 |
66 |
67 |
68 |
69 |
70 | /*-------------------- Project Styles ------------------*/
71 |
72 | section {
73 | background-color: #FFDB70;
74 | margin-top: 0;
75 | padding-bottom: 20px;
76 | user-select:none;
77 | height: 350px;
78 | }
79 |
80 | section > h1 {
81 | font-size: 2em;
82 | text-align: center;
83 | margin: 0;
84 | padding: 20px 0;
85 | }
86 |
87 | fieldset#addressFields {
88 | display: block;
89 | margin: 0 auto;
90 | width: 60%;
91 | text-align: center;
92 | padding-top: 20px;
93 | }
94 |
95 | label {
96 | display: block;
97 | width: 200px;
98 | float: left;
99 | clear: left;
100 | margin: 5px 12px 12px 80px;
101 | text-align: right;
102 | }
103 |
104 | select {
105 | display: block;
106 | float: left;
107 | }
108 |
109 | input {
110 | display: block;
111 | float: left;
112 | }
113 |
114 | input#postalCode {
115 | width: 120px;
116 | }
117 |
118 | input#place {
119 | width: 250px;
120 | }
121 |
122 | input#region {
123 | width: 120px;
124 | }
125 |
--------------------------------------------------------------------------------
/week-7/chef-dashboard/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 | Chef Dashboard
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/week-7/chef-dashboard/script.js:
--------------------------------------------------------------------------------
1 | /*
2 | Pragmatic JavaScript
3 | Chapter 3
4 | Programming Assignment
5 |
6 | Author:
7 | Date:
8 | Filename: chefs.js
9 | */
10 |
11 | "use strict";
12 |
13 | // TODO: Define an array of chef objects
14 | let chefs = [
15 | // Each chef object should have a name, specialty, weakness, and restaurantLocation
16 | ];
17 |
18 | // TODO: Define a function to retrieve the first chef's information
19 | function retrieveChef1() {
20 | // This function should return a promise that resolves with the chef's information after a delay
21 | }
22 |
23 | // TODO: Define a function to retrieve the second chef's information
24 | function retrieveChef2() {
25 | // This function should return a promise that resolves with the chef's information after a delay
26 | }
27 |
28 | // TODO: Define a function to retrieve the third chef's information
29 | function retrieveChef3() {
30 | // This function should return a promise that resolves with the chef's information after a delay
31 | }
32 |
33 | // TODO: Use Promise.allSettled to retrieve all chefs' information and update the webpage accordingly
--------------------------------------------------------------------------------
/week-7/chef-dashboard/styles.css:
--------------------------------------------------------------------------------
1 | /*
2 | Pragmatic JavaScript
3 | Chapter 3
4 | Programming Assignment
5 |
6 | Author:
7 | Date:
8 | Filename:
9 | */
10 |
11 | /* Add your CSS styles here */
--------------------------------------------------------------------------------
/week-8/movie-app/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
14 |
15 |
16 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/week-8/movie-app/script.js:
--------------------------------------------------------------------------------
1 | /*
2 | Pragmatic JavaScript
3 | Chapter 4
4 | Programming Assignment
5 |
6 | Author:
7 | Date:
8 | Filename:
9 | */
10 |
11 | "use strict";
12 |
13 | const movies = [
14 | // Add your movie objects here
15 | ];
16 |
17 | function fetchMovie(title) {
18 | // Implement this function
19 | }
20 |
21 | document.getElementById("movie-form").addEventListener("submit", async (event) => {
22 | // Implement this function
23 | });
--------------------------------------------------------------------------------
/week-8/movie-app/styles.css:
--------------------------------------------------------------------------------
1 | /*
2 | Pragmatic JavaScript
3 | Chapter 4
4 | Programming Assignment
5 |
6 | Author:
7 | Date:
8 | Filename:
9 | */
10 |
11 | /* Add your styles here */
--------------------------------------------------------------------------------
/week-9/chapter/js12_txt.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
17 |
18 | Bonsai Expressions FAQ
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | Frequently Asked Questions
29 |
30 | What is the meaning of "bonsai"?
31 |
32 | The word "Bon-sai" is a Japanese term which, literally translates to,
33 | "planted in a container." The art of Bonsai derives from an ancient Chinese
34 | horticultural practice, part of which was then redeveloped under
35 | the influence of Japanese Zen Buddhism.
36 |
37 |
38 | Why makes a bonsai small?
39 |
40 | Several factors contribute to keeing bonsai small. The tree is grown in a
41 | container which limits the growth and extent of the tree roots. Trimming,
42 | pruning and repotting limit the tree's growth. A shallow container limits
43 | the amount of soil and nutrients available to the tree. But even though its
44 | growth is limited, a properly managed bonsai will still maintain the
45 | characteristics of a fully grown
46 |
47 |
48 | Can any tree be bonsai?
49 |
50 | Yes, that's the beauty of bonsai! Bonsai is not a tree species, it's a combination of
51 | cultivation techniques to produce small trees that mimic the shape and scale of full-size
52 | trees in small containers. Some popular tree species include the Maple, Pines, and Junipers,
53 | but you might have your own favorites that you want to try. You can find information on
54 | several different species on our website .
55 |
56 |
57 | What type of bonsai should I get?
58 |
59 | The first decision you have to make is whether the bonsai will be placed
60 | indoors or outdoors. The most popular indoor bonsai are Ficus and Carmona
61 | trees. If you prefer growing outdoors the most popular tree species are
62 | Maples, Pines, and Junipers.
63 |
64 | If this would be your first bonsai, the Ficus is an excellent choice for
65 | indoors and the Juniper works well for outdoors. Both species are resilient
66 | and very forgiving of mistakes!
67 |
68 |
69 | How hard is it to care for a bonsai?
70 |
71 | Bonsai do require more work than an ordinary houseplant. Indoor bonsai should be
72 | placed next to a South-facing window with ample sunshine. Species like the Ficus
73 | or Carmona require relatively high-humidity, so invest in a humidity tray.
74 | As a general rule, place outdoor Bonsai at a bright spot with lots of light.
75 | If your summers are especially hot, providing afternoon shade will be beneficial
76 | for your bonsai. In winter you might need to protect your trees from cold and frost.
77 | Watering is crucial to the health of your bonsai. How often a tree needs to be watered
78 | depends on the tree species, the time of year, the soil mixture, the climate and the size
79 | of the tree and the pot. Read up on the watering needs of your species to choose
80 | the approach that will result in a healthy and vibrant tree.
81 |
82 | How often should I water my bonsai?
83 |
84 | Too much watering can lead to longterm problems, so don't be tied to a fixed schedule.
85 | Instead, keep a close eye on the topsoil, and when you see
86 | that it's drying out slightly, water it so that the entire root mass is thoroughly wetted.
87 |
88 | How do I keep my bonsai free of disease and insects?
89 |
90 | Like all living trees, bonsai are susceptible to insect attacks and disease.
91 | You can keep your bonsai healthy by: a) Giving your bonsai ample light, fresh
92 | air, and ventilation; b) Keeping the solie free of spent blooms and fallen leaves
93 | which will decay and foul the soil, and c) Use proper watering techniques that will not
94 | leave the soil overly moist or muddy.
95 |
96 |
97 |
To prevent insects from harming your tree, consider using an insecticidal soap spray which is
98 | not harmful to humans or animals. The soap spray may require more than one application
99 | to control the insect population. A weekly spray is often recommended.
100 |
101 |
102 | How old do bonsai get?
103 |
104 | How old do trees get? If properly cared for, bonsai can outlive fully grown trees in nature.
105 | Some mountain-born bonsai live to over 800 years old. These treasures are often
106 | passed on from one generation to the next in the bonsai nurseries of Japan. The
107 | oldest bonsai is believed to be a Ficus tree at Crespi, Italy with an estimated age of over
108 | 1000 years!
109 |
110 | The bonsai that you grow and cultivate might become a family heirloom to be passed on
111 | and treasured by your descendants.
112 |
113 |
114 |
115 |
116 |
117 |
118 |
--------------------------------------------------------------------------------
/week-9/chapter/js12_txt.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | /* JavaScript 7th Edition
4 | Chapter 12
5 | Chapter case
6 |
7 | Bonsai Expressions FAQ
8 | Author:
9 | Date:
10 |
11 | Filename: js12.js
12 | */
13 |
14 |
--------------------------------------------------------------------------------
/week-9/chapter/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-9/chapter/logo.png
--------------------------------------------------------------------------------
/week-9/chapter/minus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-9/chapter/minus.png
--------------------------------------------------------------------------------
/week-9/chapter/plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-9/chapter/plus.png
--------------------------------------------------------------------------------
/week-9/chapter/styles.css:
--------------------------------------------------------------------------------
1 | /* JavaScript 7th Edition
2 | Chapter 12
3 | Chapter case
4 |
5 | Bonsai Expressions
6 | Style sheet
7 |
8 | Filename: styles.css
9 | */
10 |
11 | /* apply a natural box layout model to all elements */
12 | * {
13 | -moz-box-sizing: border-box;
14 | -webkit-box-sizing: border-box;
15 | box-sizing: border-box;
16 | }
17 |
18 | /* reset rules */
19 | html, body, div, span, applet, object, iframe,
20 | h1, h2, h3, h4, h5, h6, p, blockquote, pre,
21 | a, abbr, acronym, address, big, cite, code,
22 | del, dfn, em, img, ins, kbd, q, s, samp,
23 | small, strike, strong, sub, sup, tt, var,
24 | b, u, i, center,
25 | dl, dt, dd, ol, ul, li,
26 | fieldset, form, label, legend,
27 | table, caption, tbody, tfoot, thead, tr, th, td,
28 | article, aside, canvas, details, embed,
29 | figure, figcaption, footer, header, hgroup,
30 | menu, nav, output, ruby, section, summary,
31 | time, mark, audio, video {
32 | margin: 0;
33 | padding: 0;
34 | border: 0;
35 | font-size: 100%;
36 | font: inherit;
37 | vertical-align: baseline;
38 | }
39 |
40 | /* HTML5 display-role reset for older browsers */
41 | article, aside, details, figcaption, figure,
42 | footer, header, hgroup, menu, nav, section {
43 | display: block;
44 | }
45 |
46 | html {
47 | display: flex;
48 | height: 100%;
49 | }
50 |
51 | body {
52 | background-color: white;
53 | line-height: 1;
54 | width: 960px;
55 | margin: 0 auto;
56 | font-family: arial, helvetica, sans-serif;
57 | }
58 |
59 | ol, ul {
60 | list-style: none;
61 | }
62 |
63 | table {
64 | border-collapse: collapse;
65 | border-spacing: 0;
66 | }
67 |
68 | a:link, a:visited {
69 | text-decoration: none;
70 | color: inherit;
71 | }
72 |
73 | a:hover {
74 | text-decoration: none;
75 | color: inherit;
76 | }
77 |
78 | a:active {
79 | text-decoration: none;
80 | color: inherit;
81 | }
82 |
83 | body {
84 | display: flex;
85 | flex-flow: column nowrap;
86 | height: 100%;
87 | }
88 |
89 | header {
90 | background-color: white;
91 | box-shadow: 5px 0 20px #000000, -5px 0 20px rgb(120, 120, 120);
92 | }
93 |
94 | header > img {
95 | display: block;
96 | margin: 0 auto;
97 | }
98 |
99 | section {
100 | background-color: white;
101 | box-shadow: 5px 0 20px #000000, -5px 0 20px rgb(120, 120, 120);
102 | flex: 1;
103 | }
104 |
105 | section > h1 {
106 | text-align: center;
107 | padding-top: 20px;
108 | font-family: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, "sans-serif";
109 | font-size: 2.3em;
110 | color: rgba(91,155,213,1.00);
111 | letter-spacing: 0.08em;
112 | }
113 |
114 | span.plusminus img {
115 | display: inline-block;
116 | width: 30px;
117 | margin: -5px 30px -5px 10px;
118 | }
119 | dl#faq {
120 | display: block;
121 | width: 85%;
122 | margin: 0 auto;
123 | padding-bottom: 10px;
124 | font-family: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, "sans-serif";
125 | }
126 |
127 | dl#faq dt {
128 | background: url("minus.png") left center/25px no-repeat ;
129 | font-size: 1.4em;
130 | display: block;
131 | margin: 10px 0 10px;
132 | text-indent: 60px;
133 | color: rgba(91,155,213,1.00);
134 | cursor: pointer;
135 | user-select: none;
136 | }
137 |
138 | dl#faq dt.hiddenAnswer {
139 | background: url("plus.png") left center/25px no-repeat ;
140 | }
141 |
142 |
143 | dt + dd {
144 | display: none;
145 | }
146 |
147 | dl#faq dd p {
148 | font-size: 1.2em;
149 | line-height: 1.2;
150 | margin: 0 0 15px 65px;
151 | font-family: "Gill Sans", Helvetica, Arial, sans-serif;
152 | text-align: justify;
153 | }
154 |
155 | footer {
156 | background-color: rgba(91,155,213,1.00);
157 | box-shadow: 5px 0 20px #000000, -5px 0 20px rgb(120, 120, 120);
158 | height: 50px;
159 | }
160 | footer p {
161 | color: ivory;
162 | text-align: center;
163 | line-height: 3;
164 |
165 | }
166 |
167 | footer p span {
168 | color: #ffab00;
169 | }
170 |
171 | footer p em {
172 | font-family: "Times", "Times New Roman", "serif";
173 | font-style: italic;
174 | letter-spacing: 0.08em;
175 | }
176 |
--------------------------------------------------------------------------------
/week-9/project12-03/halfstar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-9/project12-03/halfstar.png
--------------------------------------------------------------------------------
/week-9/project12-03/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-9/project12-03/logo.png
--------------------------------------------------------------------------------
/week-9/project12-03/minus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-9/project12-03/minus.png
--------------------------------------------------------------------------------
/week-9/project12-03/plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-9/project12-03/plus.png
--------------------------------------------------------------------------------
/week-9/project12-03/project12-03_txt.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
17 |
18 | Hands-on Project 12-3
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | Hands-on Project 12-3
27 |
28 |
29 |
30 |
78 |
79 |
--------------------------------------------------------------------------------
/week-9/project12-03/project12-03_txt.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | /* JavaScript 7th Edition
3 | Chapter 12
4 | Project 12-03
5 |
6 | Project to show a recipe with expanding/contracting content
7 | Author:
8 | Date:
9 |
10 | Filename: project12-03.js
11 | */
12 |
13 |
14 |
--------------------------------------------------------------------------------
/week-9/project12-03/star.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-9/project12-03/star.png
--------------------------------------------------------------------------------
/week-9/project12-03/styles.css:
--------------------------------------------------------------------------------
1 | /* JavaScript 7th Edition
2 | Chapter 12
3 | Hands-on Project 12-3
4 |
5 | Filename: styles.css
6 | */
7 |
8 | /* apply a natural box layout model to all elements */
9 | * {
10 | -moz-box-sizing: border-box;
11 | -webkit-box-sizing: border-box;
12 | box-sizing: border-box;
13 | }
14 |
15 | /* reset rules */
16 | html, body, div, span, applet, object, iframe,
17 | h1, h2, h3, h4, h5, h6, p, blockquote, pre,
18 | a, abbr, acronym, address, big, cite, code,
19 | del, dfn, em, img, ins, kbd, q, s, samp,
20 | small, strike, strong, sub, sup, tt, var,
21 | b, u, i, center,
22 | dl, dt, dd, ol, ul, li,
23 | form, label, legend,
24 | table, caption, tbody, tfoot, thead, tr, th, td,
25 | article, aside, canvas, details, embed,
26 | figure, figcaption, footer, header, hgroup,
27 | menu, nav, output, ruby, section, summary,
28 | time, mark, audio, video {
29 | margin: 0;
30 | padding: 0;
31 | border: 0;
32 | font-size: 100%;
33 | font: inherit;
34 | vertical-align: baseline;
35 | }
36 |
37 | /* HTML5 display-role reset for older browsers */
38 | article, aside, details, figcaption, figure,
39 | footer, header, hgroup, menu, nav, section {
40 | display: block;
41 | }
42 |
43 | body {
44 | line-height: 1;
45 | width: 960px;
46 | background: white;
47 | margin: 0 auto;
48 | font-family: Verdana, Geneva, sans-serif;
49 | }
50 |
51 | ol, ul {
52 | list-style: none;
53 | }
54 |
55 | /* page header */
56 | body > header {
57 | background: #5472B2;
58 | width: 100%;
59 | color: #FFFFFF;
60 | font-size: 48px;
61 | text-align: center;
62 | line-height: 1.5em;
63 | margin-bottom: 0;
64 | }
65 |
66 |
67 |
68 |
69 |
70 | /*-------------------- Project Styles ------------------*/
71 |
72 | section {
73 | background-color: #FFDB70;
74 | margin-top: 0;
75 | padding-bottom: 70px;
76 | }
77 |
78 | /* main content */
79 |
80 | header > img {
81 | display: block;
82 | width: 50%;
83 | margin: 0 auto;
84 | padding: 10px 0;
85 | }
86 |
87 | article {
88 | width: 80%;
89 | margin: 0 auto;
90 | padding-bottom: 20px;
91 | }
92 |
93 | article h1 {
94 | font-size: 2.2em;
95 | margin: 0 0 20px;
96 | }
97 |
98 | article h1 img {
99 | display: inline-block;
100 | width: 30px;
101 | }
102 |
103 | article > img {
104 | float: right;
105 | width: 30%;
106 | box-shadow: 5px 5px 30px rgba(0, 0, 0, 0.4);
107 | }
108 |
109 | article > p {
110 | font-size: 1.1em;
111 | font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", Verdana, "sans-serif";
112 | line-height: 1.3;
113 | margin: 0 0 15px;
114 | }
115 |
116 | article > h2 {
117 | font-size: 1.2em;
118 | margin: 0 0 15px 0;
119 | cursor: pointer;
120 | }
121 |
122 | article > h2 > img {
123 | width: 20px;
124 | margin-right: 20px;
125 | }
126 |
127 | article > ul {
128 | margin: 0 0 15px 60px;
129 | list-style-type:square;
130 | font-size: 1.1em;
131 | font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", Verdana, "sans-serif";
132 | line-height: 1.4em;
133 | display: none;
134 | }
135 |
136 | article > ol {
137 | margin: 0 0 15px 60px;
138 | list-style-type: decimal;
139 | font-size: 1.1em;
140 | font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", Verdana, "sans-serif";
141 | line-height: 1.4em;
142 | display: none;
143 | }
144 |
145 | article li {
146 | margin-bottom: 6px;
147 | }
--------------------------------------------------------------------------------
/week-9/project12-03/torte.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/buwebdev/web-330/63e964ce862b22b018a57531c467481a3ca0214e/week-9/project12-03/torte.png
--------------------------------------------------------------------------------