diff --git a/Labs/.DS_Store b/Labs/.DS_Store new file mode 100644 index 0000000..b57ce28 Binary files /dev/null and b/Labs/.DS_Store differ diff --git a/Labs/Lab6/cat.css b/Labs/Lab6/cat.css new file mode 100644 index 0000000..7abb5f3 --- /dev/null +++ b/Labs/Lab6/cat.css @@ -0,0 +1,15 @@ +body{ + + display:inline-block; +} + +.div1{ + width : 50%; + float:left; + +} + +.div2{ + width:50%; + float:right; +} \ No newline at end of file diff --git a/Labs/Lab6/cat.js b/Labs/Lab6/cat.js new file mode 100644 index 0000000..f8111f9 --- /dev/null +++ b/Labs/Lab6/cat.js @@ -0,0 +1,67 @@ +// function myfunction() { +// var count = parseInt(document.getElementById("span1").innerText); +// count = count + 1; +// document.getElementById("span1").innerText = count; +// } + +$("#cat_img").click(function(){ + var count = parseInt(document.getElementById("span1").innerText); + count = count + 1; + document.getElementById("span1").innerText = count; + + + +}); + +$("#cat_img2").click(function(){ + var count = parseInt(document.getElementById("span2").innerText); + count = count + 1; + document.getElementById("span2").innerText = count; + +}); + +$("#cat_img3").click(function(){ + var count = parseInt(document.getElementById("span3").innerText); + count = count + 1; + document.getElementById("span3").innerText = count; + +}); + +$("#cat_img4").click(function(){ + var count = parseInt(document.getElementById("span4").innerText); + count = count + 1; + document.getElementById("span4").innerText = count; + +}); + +$("#button_1").click(function(){ +$("#div1").show(); +$("#div2").hide(); +$("#div3").hide(); +$("#div4").hide(); + +}); + +$("#button_2").click(function(){ +$("#div1").hide(); +$("#div2").show(); +$("#div3").hide(); +$("#div4").hide(); + +}); + +$("#button_3").click(function(){ +$("#div1").hide(); +$("#div2").hide(); +$("#div3").show(); +$("#div4").hide(); + +}); + +$("#button_4").click(function(){ +$("#div1").hide(); +$("#div2").hide(); +$("#div3").hide(); +$("#div4").show(); + +}); \ No newline at end of file diff --git a/Labs/Lab6/practice.html b/Labs/Lab6/practice.html new file mode 100644 index 0000000..c6b1a83 --- /dev/null +++ b/Labs/Lab6/practice.html @@ -0,0 +1,43 @@ + +
+ + + + ++ +
+ 0 clicks + + ++ +
+ + + +
++ +
++ +
+ 0 clicks ++ +
+ + + +
+
+
+| + | + | + | + + |
+ +
+ + + + + + + + + + \ No newline at end of file diff --git a/Labs/Lab9 - Flask Survey/.DS_Store b/Labs/Lab9 - Flask Survey/.DS_Store new file mode 100644 index 0000000..8c7ec23 Binary files /dev/null and b/Labs/Lab9 - Flask Survey/.DS_Store differ diff --git a/Labs/Lab9 - Flask Survey/Flask Lab 2.docx b/Labs/Lab9 - Flask Survey/Flask Lab 2.docx new file mode 100644 index 0000000..61f5f2f Binary files /dev/null and b/Labs/Lab9 - Flask Survey/Flask Lab 2.docx differ diff --git a/Labs/Lab9 - Flask Survey/Flask Lab 2.txt b/Labs/Lab9 - Flask Survey/Flask Lab 2.txt new file mode 100644 index 0000000..661dc9b --- /dev/null +++ b/Labs/Lab9 - Flask Survey/Flask Lab 2.txt @@ -0,0 +1,46 @@ +Flask Lab 2 +In this lab weÕll be implementing a simple survey web app using Flask. +The general concepts weÕll be covering are: +* Routing +* Templating +* Passing Parameters +* Sessions +We will walk through this lab in class and for homework you should redesign the questions and the survey and get creative. Also, make the e-mail link work and send the survey results to us! +Requirements +1. Download the flaskLab2.zip file from bCourses>Files>Labs +Creating a login page +2. Open the Ôlogin.htmlÕ template in your text editor +a. Make this file an extension of the Ôbase.htmlÕ template +b. Use the existing form and create form inputs that capture the userÕs name and email +c. Make sure the HTML in this file is replacing the block called ÔcontentÕ in the Ôbase.htmlÕ template +d. Make the form submit to the Ô/loginÕ endpoint +Creating a session +3. Open the Ôviews.pyÕ file in your text editor +a. Find the route for Ô/loginÕ +b. Within the Ôlogin()Õ function, if the request method is POST +i. set the sessionÕs ÔusernameÕ key to whatever the user entered for their username +ii. Redirect the user to the ÔindexÕ route +Extending and reusing content from the Ôbase.htmlÕ template for the Ôsurvey.htmlÕ template +4. Open the Ôsurvey.htmlÕ template in your text editor +a. Make this file an extension of the Ôbase.htmlÕ template +b. The HTML in this file for the form with the id of ÔlogoutÕ is currently replacing the entire contents of the
+
+