diff --git a/INFO-1251 (Web Server)/Labs/Lab 1/Home Network Diagram.drawio b/INFO-1251 (Web Server)/Labs/Lab 1/Home Network Diagram.drawio index 6e319b2..2e0225d 100644 --- a/INFO-1251 (Web Server)/Labs/Lab 1/Home Network Diagram.drawio +++ b/INFO-1251 (Web Server)/Labs/Lab 1/Home Network Diagram.drawio @@ -1,3 +1,4 @@ +<<<<<<< HEAD @@ -109,3 +110,116 @@ +======= + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb diff --git a/INFO-1252 (Front End Dev)/Labs/Lab-1/index.html b/INFO-1252 (Front End Dev)/Labs/Lab-1/index.html index cb621b5..7fc04e4 100644 --- a/INFO-1252 (Front End Dev)/Labs/Lab-1/index.html +++ b/INFO-1252 (Front End Dev)/Labs/Lab-1/index.html @@ -1,3 +1,4 @@ +<<<<<<< HEAD @@ -34,4 +35,42 @@

© 2025 | IWD2-01 INFO-1252 Lab 1 Test Website | Made by Levi McLean

+======= + + + + My First Sample Site + + + + +

Heading One

+ +
+

Lorem ipsum dolor sit amet consectetur adipisicing elit. Itaque quidem explicabo animi accusamus temporibus ex error odit porro dolore in quasi nulla voluptatem consectetur labore, quis, autem, voluptates id natus! Lorem ipsum dolor sit amet consectetur adipisicing elit. Iusto, nesciunt deleniti, exercitationem totam amet a laudantium ut tenetur itaque quos similique in molestiae eligendi ipsam voluptatibus repellendus vitae sequi consequatur.

+ This is a smaller paragraph! + +

Heading Two

+

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Unde illo ratione culpa nisi. Repellat, at! Eaque quasi, sequi, quo exercitationem similique provident incidunt, temporibus nam repellendus dolores vero dolor sed? Lorem ipsum dolor, sit amet consectetur adipisicing elit. Corrupti deserunt quaerat quas, non ipsa pariatur? Nulla cum ullam, dolore autem repellat voluptatum est modi fuga a odit at repudiandae dolor!

+ A picture of bricks + A picture of rust + A picture of wood +

Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempora quidem rem, autem deserunt pariatur ex quos ab excepturi quasi odit veritatis labore vitae animi fugit dicta, totam commodi. Cumque, expedita! Lorem ipsum dolor sit amet consectetur adipisicing elit. Maiores cum illum, tempore nisi maxime est aut delectus exercitationem sapiente veritatis id vero enim, reiciendis blanditiis quis temporibus voluptate dolorum dignissimos?

+
    +
  1. First item
  2. +
  3. Second item
  4. +
  5. Third item
  6. +
  7. Fouth item
  8. +
+ + + +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb \ No newline at end of file diff --git a/INFO-1252 (Front End Dev)/Labs/Lab-1/style.css b/INFO-1252 (Front End Dev)/Labs/Lab-1/style.css index aabf8c2..b453275 100644 --- a/INFO-1252 (Front End Dev)/Labs/Lab-1/style.css +++ b/INFO-1252 (Front End Dev)/Labs/Lab-1/style.css @@ -1,3 +1,4 @@ +<<<<<<< HEAD body { text-align: center; background: #333; @@ -19,4 +20,27 @@ a { color: deepskyblue; text-align: center; margin: auto; +======= +body { + text-align: center; + background: #333; + color: white; +} + +ul, ol { + margin: 0; + padding: 0; + display: inline-block; + text-align: left; +} + +ul li { + list-style: none; +} + +a { + color: deepskyblue; + text-align: center; + margin: auto; +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb } \ No newline at end of file diff --git a/INFO-1252 (Front End Dev)/Labs/Lab-2/about.html b/INFO-1252 (Front End Dev)/Labs/Lab-2/about.html index fefcc1e..2d12284 100644 --- a/INFO-1252 (Front End Dev)/Labs/Lab-2/about.html +++ b/INFO-1252 (Front End Dev)/Labs/Lab-2/about.html @@ -1,3 +1,4 @@ +<<<<<<< HEAD @@ -30,4 +31,38 @@

Copyright © 2022. Travel Spot.

+======= + + + + + + + About Page - Travel Spot + + + + Company logo + +
+

About the Travel Spot

+ The eiffel tower +

Lorem ipsum dolor sit amet consectetur adipisicing elit. Sapiente laborum non voluptatibus ad dignissimos culpa labore vitae quae nostrum in ullam officia, nobis quis tempora corporis repellendus suscipit quo nisi. Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquam eum officia provident cumque rem earum perferendis similique expedita quos ipsa! Ipsum cumque illum eius reprehenderit harum minus, deserunt iusto fugiat!

+

Satisfaction Guaranteed!

+

Lorem ipsum dolor sit amet consectetur adipisicing elit. Deleniti libero commodi, nesciunt sed non a necessitatibus iste illum architecto eum cumque quo nemo, praesentium magni vero facilis iusto. Quaerat, nulla! Lorem ipsum dolor sit amet consectetur adipisicing elit. Placeat eveniet dicta, similique facilis impedit corporis repellat aliquid autem veritatis eaque eos, velit cupiditate ratione enim vel dolorum, laborum ut. Ipsum.

+

Four Reasons to travel with us

+
    +
  1. customer service
  2. +
  3. prices
  4. +
  5. variety
  6. +
  7. experience
  8. +
+
+

Copyright © 2022. Travel Spot.

+ +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb \ No newline at end of file diff --git a/INFO-1252 (Front End Dev)/Labs/Lab-2/contact.html b/INFO-1252 (Front End Dev)/Labs/Lab-2/contact.html index 1f8647b..36c9d71 100644 --- a/INFO-1252 (Front End Dev)/Labs/Lab-2/contact.html +++ b/INFO-1252 (Front End Dev)/Labs/Lab-2/contact.html @@ -1,3 +1,4 @@ +<<<<<<< HEAD @@ -56,4 +57,64 @@

Copyright © 2022. Travel Spot.

+======= + + + + + + + Contact Page - Travel Spot + + + + Company logo + +
+

Contact the Travel Spot

+

152 King Street
London, Ontario N6R 4T5 +
+ tel: 519 555-9045 +
+ email: info@travel.com +

+

Special Prices

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ Note:

Meals are not included.

+
Destination1 Week2 Weeks3 Weeks
Paris$850$1,250$1,990
Italy$750$1,000$1,500
Brazil$900$1,300$2,100
+
+

Copyright © 2022. Travel Spot.

+ +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb \ No newline at end of file diff --git a/INFO-1252 (Front End Dev)/Labs/Lab-2/index.html b/INFO-1252 (Front End Dev)/Labs/Lab-2/index.html index e25c11d..cd2d613 100644 --- a/INFO-1252 (Front End Dev)/Labs/Lab-2/index.html +++ b/INFO-1252 (Front End Dev)/Labs/Lab-2/index.html @@ -1,3 +1,4 @@ +<<<<<<< HEAD @@ -22,4 +23,30 @@

Copyright © 2022. Travel Spot.

+======= + + + + + + + Home Page - Travel Spot + + + + Company logo + +
+

Welcome to the Travel Spot

+

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Nostrum autem odio voluptas similique quae quam totam, est sapiente neque omnis veniam pariatur sint, culpa mollitia, porro facilis deserunt eum dicta! Lorem ipsum dolor sit amet consectetur adipisicing elit. Eaque provident cum, est iusto, a suscipit beatae expedita voluptatem dignissimos harum porro sint eveniet tempore. Et itaque dolorum recusandae quis soluta. Lorem ipsum dolor sit amet consectetur adipisicing elit. Quas quidem voluptatibus amet, reiciendis sit eligendi nihil! Ducimus praesentium delectus at itaque quaerat blanditiis rem asperiores adipisci facilis aliquam? Error, libero!

+ A beach in Barbados +

Lorem ipsum dolor sit amet consectetur adipisicing elit. Sapiente laborum non voluptatibus ad dignissimos culpa labore vitae quae nostrum in ullam officia, nobis quis tempora corporis repellendus suscipit quo nisi. Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquam eum officia provident cumque rem earum perferendis similique expedita quos ipsa! Ipsum cumque illum eius reprehenderit harum minus, deserunt iusto fugiat!

+
+

Copyright © 2022. Travel Spot.

+ +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb \ No newline at end of file diff --git a/INFO-1252 (Front End Dev)/Labs/Lab-2/style.css b/INFO-1252 (Front End Dev)/Labs/Lab-2/style.css index a06349e..1b940f8 100644 --- a/INFO-1252 (Front End Dev)/Labs/Lab-2/style.css +++ b/INFO-1252 (Front End Dev)/Labs/Lab-2/style.css @@ -1,3 +1,4 @@ +<<<<<<< HEAD .mainNav { text-align: center; list-style: none; @@ -27,3 +28,34 @@ ul, ol { caption p { display: inline; } +======= +.mainNav { + text-align: center; + list-style: none; +} + +img { + display: block; + margin: auto; +} + +body { + text-align: center; +} + +ul, ol { + margin: 0; + padding: 0; + display: inline-block; + text-align: left; +} + +.priceTable { + margin-left: auto; + margin-right: auto; +} + +caption p { + display: inline; +} +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb diff --git a/INFO-1252 (Front End Dev)/Labs/Lab-3/index.html b/INFO-1252 (Front End Dev)/Labs/Lab-3/index.html index 4cb7de4..7ef5e65 100644 --- a/INFO-1252 (Front End Dev)/Labs/Lab-3/index.html +++ b/INFO-1252 (Front End Dev)/Labs/Lab-3/index.html @@ -1,3 +1,4 @@ +<<<<<<< HEAD @@ -112,4 +113,120 @@

Copyright © 2025. Travel Spot.

+======= + + + + Registration - Travel Spot + + + + + + + Company logo +
+

Sign Up

+

Your next travel starts here!

+

Fill in the form below:

+ + + +

+ + +
+
+ Personal Information + + +
+ +
+ +
+ +
+ + +
+

+ + +
+
+ Travel Destination +

Tell us where you want to go:

+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+

+ + +
+
+ Travel Experience +

Tell us about your last travel experience (leave this section empty if you have never travelled before):

+ +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ +
+ +
+

+ + + + + + +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb \ No newline at end of file diff --git a/INFO-1252 (Front End Dev)/Labs/Lab-3/style.css b/INFO-1252 (Front End Dev)/Labs/Lab-3/style.css index 89fe22a..4bc53e6 100644 --- a/INFO-1252 (Front End Dev)/Labs/Lab-3/style.css +++ b/INFO-1252 (Front End Dev)/Labs/Lab-3/style.css @@ -1,3 +1,4 @@ +<<<<<<< HEAD body { font-family: Arial, sans-serif; margin: 20px; @@ -82,4 +83,90 @@ footer { display: inline-block; margin-right: 4px; } +======= +body { + font-family: Arial, sans-serif; + margin: 20px; + background-color: #f9fafc; + color: #333; +} + +img { + display: block; + margin: 0 auto 10px auto; + border-radius: 8px; +} + +h1 { + text-align: center; + color: #2a6ebb; + margin-bottom: 5px; +} + +h2 { + text-align: center; + color: #555; +} + +fieldset { + border: 1px solid #ccc; + border-radius: 8px; + padding: 15px; + margin-bottom: 20px; + background: #fff; + box-shadow: 0 2px 4px rgba(0,0,0,0.05); +} + +legend { + font-weight: bold; + color: #2a6ebb; +} + +label { + display: inline-block; + width: 180px; + margin: 6px 0; +} + +input, select, textarea { + padding: 6px; + margin: 4px 0; + border: 1px solid #ccc; + border-radius: 4px; +} + +button { + padding: 8px 16px; + margin: 5px; + border: none; + border-radius: 6px; + background-color: #2a6ebb; + color: #fff; + cursor: pointer; +} + +button:hover { + background-color: #1d4f88; +} + +footer { + text-align: center; + margin-top: 30px; + font-size: 0.9em; + color: #777; +} + +@media (max-width: 880px) { + input[type="radio"] + label { + display: inline-block; + margin-right: 10px; + width: auto; + white-space: nowrap; + } + + input[type="radio"] { + display: inline-block; + margin-right: 4px; + } +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb } \ No newline at end of file diff --git a/INFO-1252 (Front End Dev)/Labs/Lab-4/index.html b/INFO-1252 (Front End Dev)/Labs/Lab-4/index.html index ce0b6ce..b26b26a 100644 --- a/INFO-1252 (Front End Dev)/Labs/Lab-4/index.html +++ b/INFO-1252 (Front End Dev)/Labs/Lab-4/index.html @@ -1,3 +1,4 @@ +<<<<<<< HEAD @@ -108,4 +109,116 @@ +======= + + + + + + + + + Sandy's Cooking Blog + + + + +
+ +

Sandy's Cooking Blog

+
+ + + + + +
+ +
+
+

Dinner Party Ideas

+
By: John
+
Jan 11, 2022
+ Dinner party food +

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc + mollis, nulla non elementum tincidunt, felis ligula sodales lectus, + sit amet dignissim quam massa sit amet lorem. Aenean lorem risus, + tempus nec, gravida eu. +

+
+ +
+

Weeknight Meals

+
By: Mary
+
Jan 07, 2022
+ Nice dinner +

+ Donec cursus faucibus turpis. Quisque auctor est at magna. In + sagittis quam ac ante. Etiam et erat. Morbi sem. Mauris faucibus + elit eu est. Nulla wisi eros, vehicula et, congue quis, consectetuer + non, leo. Phasellus suscipit felis non est. +

+
+ +
+

Superbowl Snacks

+
By: Sandy
+
Jan 06, 2022
+ Plate of nachos +

+ Pellentesque habitant morbi tristique senectus et netus et malesuada + fames ac turpis egestas. Morbi condimentum, odio sit amet aliquet + adipiscing, nunc odio fermentum tellus, tincidunt pulvinar leo purus + quis libero. Vivamus quam. +

+
+
+ + +
+

About Sandy

+ + + +

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum + gravida mattis molestie. Donec in urna ut dolor imperdiet faucibus. + Pellentesque habitant morbi tristique senectus et netus et malesuada + fames ac turpis egestas. Sed luctus a mi et facilisis. Class aptent + taciti sociosqu ad litora torquent per conubia nostra, per inceptos + himenaeos. Ut condimentum purus eu luctus tincidunt. Maecenas + elementum, augue at vulputate ornare, ipsum enim lacinia orci, id + elementum velit enim gravida diam. Aliquam vitae pharetra ex. In hac + habitasse platea dictumst. Curabitur vitae facilisis nulla. Morbi quis + condimentum lorem. Fusce sit amet orci mauris. Donec fringilla lectus + nec efficitur sagittis. Aliquam sed nunc ligula. +

+

+ Quisque tempus ornare est, eu scelerisque sem ultricies et. Sed sed + interdum odio. Suspendisse id lacinia sem. Cras fermentum tortor sit + amet mollis commodo. Morbi facilisis arcu a est dapibus, vitae laoreet + sapien feugiat. Aenean vel viverra arcu, eu pulvinar nulla. + Pellentesque habitant morbi tristique senectus et netus et malesuada + fames ac turpis egestas. Mauris id viverra leo, sed pellentesque est. + Maecenas quis hendrerit dui, tincidunt maximus velit. +

+
+
+ + + + + +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb \ No newline at end of file diff --git a/INFO-1252 (Front End Dev)/Labs/Lab-4/styles/styles.css b/INFO-1252 (Front End Dev)/Labs/Lab-4/styles/styles.css index 49fd60b..699e801 100644 --- a/INFO-1252 (Front End Dev)/Labs/Lab-4/styles/styles.css +++ b/INFO-1252 (Front End Dev)/Labs/Lab-4/styles/styles.css @@ -1,3 +1,4 @@ +<<<<<<< HEAD /* Beginner elements */ * { margin: 0; @@ -123,4 +124,131 @@ footer { footer strong { color: white; +======= +/* Beginner elements */ +* { + margin: 0; +} + +body { + background: url(../images/squares_bg.png); + font-family: Helvetica, sans-serif; + font-size: 1rem; +} + +/* Header and logo */ +.logo { + opacity: 30%; + display: block; + margin: 2rem auto; +} + +h1, +h2 { + font-family: "Dancing Script", cursive; + color: teal; + font-size: 2rem; + text-shadow: 2px 2px 4px grey; + margin-left: 1.2rem; +} + +.main-heading { + font-size: 2.2rem; + text-align: center; +} + +/* Navbar styling */ +nav { + background-color: white; + border-top: 5px solid teal; + border-bottom: 5px solid teal; + margin: 2rem 0; +} + +ul, +a { + font-size: 1rem; + text-decoration: none; + list-style: none; + display: block; + text-align: center; + margin: 1.5rem 0; + color: grey; + font-weight: bold; + font-family: Helvetica, sans-serif; +} + +/* Recipe card styling */ +.recipe-card { + margin: 2rem 1rem; + font-size: 1rem; + border: 2px solid grey; + background-color: white; + border-radius: 5px; + box-shadow: 2px 2px 4px grey; +} + +.recipe-card img { + display: block; + margin: 1.5rem auto; + border-radius: 60%; +} + +.recipe-card p { + text-align: left; + line-height: 25px; + margin: 2rem; + color: grey; + font-weight: bold; + font-family: Helvetica, sans-serif; +} + +.author { + text-align: right; + margin-right: 1rem; + color: grey; +} + +.publish-date { + text-align: right; + color: rgba(75, 75, 75, 0.507); + margin-right: 1rem; +} + +/* About section styling */ +.about-sandy { + background-color: grey; + background-image: url(../images/squares_bg.png); + padding-bottom: 1rem; + margin-bottom: 0.3rem; +} + +.about-sandy p { + text-align: left; + line-height: 1.6rem; + margin: 2rem; + color: lightgrey; + font-weight: bold; +} + +.about-sandy h2 { + color: white; + font-size: 3rem; + text-shadow: 2px 2px 4px black; +} + +/* Footer styling */ +footer { + background: teal; + font-size: 1rem; + color: lightgrey; + padding: 2rem; + text-align: center; + line-height: 1.6; +} + + +footer strong { + color: white; +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb } \ No newline at end of file diff --git a/INFO-1252 (Front End Dev)/Labs/Lab-5/index.html b/INFO-1252 (Front End Dev)/Labs/Lab-5/index.html index 3375b4d..eeaa280 100644 --- a/INFO-1252 (Front End Dev)/Labs/Lab-5/index.html +++ b/INFO-1252 (Front End Dev)/Labs/Lab-5/index.html @@ -1,3 +1,4 @@ +<<<<<<< HEAD @@ -108,4 +109,116 @@ +======= + + + + + Sandy's Cooking Blog + + + + + + + + + +
+ +

Sandy's Cooking Blog

+ + +
+ + +
+ +
+
+

Dinner Party Ideas

+
By: John
+
Jan 11, 2022
+ dinner party food +

+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc + mollis, nulla non elementum tincidunt, felis ligula sodales lectus, + sit amet dignissim quam massa sit amet lorem. Aenean lorem risus, + tempus nec, gravida eu. +

+
+ +
+

Weeknight Meals

+
By: Mary
+
Jan 07, 2022
+ nice dinner +

+ Donec cursus faucibus turpis. Quisque auctor est at magna. In + sagittis quam ac ante. Etiam et erat. Morbi sem. Mauris faucibus + elit eu est. Nulla wisi eros, vehicula et, congue quis, consectetuer + non, leo. Phasellus suscipit felis non est. +

+
+ +
+

Superbowl Snacks

+
By: Sandy
+
Jan 06, 2022
+ plate of nachos +

+ Pellentesque habitant morbi tristique senectus et netus et malesuada + fames ac turpis egestas. Morbi condimentum, odio sit amet aliquet + adipiscing, nunc odio fermentum tellus, tincidunt pulvinar leo purus + quis libero. Vivamus quam. +

+
+
+ + +
+

About Sandy

+ +

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum + gravida mattis molestie. Donec in urna ut dolor imperdiet faucibus. + Pellentesque habitant morbi tristique senectus et netus et malesuada + fames ac turpis egestas. Sed luctus a mi et facilisis. Class aptent + taciti sociosqu ad litora torquent per conubia nostra, per inceptos + himenaeos. Ut condimentum purus eu luctus tincidunt. Maecenas + elementum, augue at vulputate ornare, ipsum enim lacinia orci, id + elementum velit enim gravida diam. Aliquam vitae pharetra ex. In hac + habitasse platea dictumst. Curabitur vitae facilisis nulla. Morbi quis + condimentum lorem. Fusce sit amet orci mauris. Donec fringilla lectus + nec efficitur sagittis. Aliquam sed nunc ligula. +

+

+ Quisque tempus ornare est, eu scelerisque sem ultricies et. Sed sed + interdum odio. Suspendisse id lacinia sem. Cras fermentum tortor sit + amet mollis commodo. Morbi facilisis arcu a est dapibus, vitae laoreet + sapien feugiat. Aenean vel viverra arcu, eu pulvinar nulla. + Pellentesque habitant morbi tristique senectus et netus et malesuada + fames ac turpis egestas. Mauris id viverra leo, sed pellentesque est. + Maecenas quis hendrerit dui, tincidunt maximus velit. +

+
+
+ + + + + +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb \ No newline at end of file diff --git a/INFO-1252 (Front End Dev)/Labs/Lab-5/styles/main.css b/INFO-1252 (Front End Dev)/Labs/Lab-5/styles/main.css index 27fdab5..7d5fe5c 100644 --- a/INFO-1252 (Front End Dev)/Labs/Lab-5/styles/main.css +++ b/INFO-1252 (Front End Dev)/Labs/Lab-5/styles/main.css @@ -1,3 +1,4 @@ +<<<<<<< HEAD /* global settings */ *, *::before, @@ -300,4 +301,308 @@ a { .footer-name { float: none; } +======= +/* global settings */ +*, +*::before, +*::after { + box-sizing: inherit; + padding: 0; + margin: 0; +} + +html { + box-sizing: border-box; + font-size: 62.5%; + line-height: 1.6; +} + +body { + font-family: "Roboto", sans-serif; + background: url(../images/squares_bg.png); + color: #686868; +} + +li { + list-style-type: none; +} + +a { + text-decoration: none; +} + +/* Header */ +.header-logo { + display: block; + margin: 2rem auto; + opacity: 30%; + width: 50%; +} + +.header-title { + font-family: "Dancing script"; + font-size: 4.2rem; + text-align: center; + color: teal; +} + +.header-nav { + background-color: #fff; + text-align: center; + border-top: 5px solid teal; + border-bottom: 5px solid teal; + padding: 0.4rem 0; + margin-top: 2.4rem; +} + +.header-nav-list-item { + margin: 0.8rem 0; +} + +.header-nav-list-item a:link, +.header-nav-list-item a:visited { + font-size: 2.4rem; + color: #686868; +} + +.header-nav-list-item a:hover, +.header-nav-list-item a:active { + color: teal; + font-weight: 600; +} + +/* Main */ +.recipes { + margin-top: 2.4rem; +} + +.recipe { + margin: 2rem 1rem; + border: 1px solid grey; + background-color: white; + border-radius: 20px; + padding: 2.4rem 1.2rem; +} + +.recipe:hover { + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.25); + transform: translateY(-10px); + /* we will learn this later. Don't worry about this line*/ +} + +.recipe-title { + font-family: "Dancing script"; + text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.25); + font-size: 3.6rem; + color: teal; + margin-bottom: 2.4rem; +} + +.recipe-by, +.recipe-by strong, +.recipe-date { + text-align: right; + font-size: 1.6rem; +} + +.recipe-image { + width: 80%; + border-radius: 50%; + display: block; + margin: 1rem auto; +} + +.recipe-desc { + font-size: 1.8rem; + margin-top: 2.4rem; + padding: 0 1.2rem; +} + +/* About */ +.about { + padding: 2.4rem; + background-color: rgb(82, 82, 82); + opacity: 70%; +} + +.about-title { + font-family: "Dancing script"; + font-size: 4.8rem; + color: #fff; + margin-top: 2rem; + text-shadow: 5px 5px 0 rgba(0, 0, 0, 0.75); +} + +.about-text { + /* use white colour + opacity or grey font color to achieve this result*/ + color: #fff; + opacity: 0.75; + font-size: 1.8rem; + margin: 2rem 0; + text-shadow: 1px 1px 0 black; +} + +.about-logo { + display: none; +} + +/* Footer */ +.footer { + background-color: teal; + color: rgb(207, 207, 207); + text-align: center; + padding: 3.6rem 0; + font-size: 2.4rem; +} + +.footer-name { + color: #fff; + font-size: 2.4rem; +} + +@media only screen and (min-width: 820px) { + /* Header */ + .header { + position: relative; + } + + .header-logo { + position: absolute; + left: 5%; + top: 33%; + transform: translateY(-50%); + width: 25%; + opacity: 0.3; + z-index: 0; + } + + .header-title { + font-size: 6rem; + } + + .header-nav { + position: relative; + z-index: 1; + display: flex; + justify-content: center; + align-items: center; + padding: 1rem 0; + } + + .header-nav-list { + display: flex; + justify-content: center; + align-items: center; + gap: 4rem; + width: 100%; + } + + /* Recipe cards */ + .recipe { + position: relative; + } + + .recipe-image { + display: block; + width: 30%; + border-radius: 50%; + margin: 0; + float: left; + } + + .recipe-title { + font-size: 4.8rem; + } + + .recipe-desc { + display: inline-block; + width: 65%; + margin-left: 1.5rem; + margin-bottom: 1.5rem; + padding: 0; + } + + /* About Sandy */ + .about-logo { + display: inline; + float: left; + margin-top: 2rem; + margin-right: 4rem; + margin-bottom: 2rem; + } + + .about-text { + display: inline; + vertical-align: top; + font-size: 1.8rem; + } + + /* Footer needs no changes */ +} + +@media only screen and (min-width: 1200px) { + /* Header */ + .header-logo { + width: 10%; + } + + /* Recipe cards */ + .recipes { + display: flex; + gap: 2rem; + } + + .recipe-image { + width: 100%; + margin: auto; + } + + .recipe-title { + font-size: 8rem; + margin: 0; + line-height: normal; + } + + .recipe-by { + font-size: 2rem; + } + + .recipe-date { + font-size: 2rem; + } + .recipe-desc { + width: 95%; + font-size: 2rem; + } + + /* About Sandy */ + .about-title { + font-size: 8rem; + } + + .about-logo { + width: 300px; + } + + .about-text { + font-size: 2.2rem; + } + + /* Footer */ + .footer { + margin-top: 0.2rem; + display: flex; + justify-content: space-between; + align-items: center; + padding: 3.6rem 2rem; + } + + .footer p { + margin: 0; + } + + .footer-name { + float: none; + } +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb } \ No newline at end of file diff --git a/INFO-1272 (JS 1)/Labs/Lab 1/Levi_Lab1.html b/INFO-1272 (JS 1)/Labs/Lab 1/Levi_Lab1.html index b3ab188..3275207 100644 --- a/INFO-1272 (JS 1)/Labs/Lab 1/Levi_Lab1.html +++ b/INFO-1272 (JS 1)/Labs/Lab 1/Levi_Lab1.html @@ -1,3 +1,4 @@ +<<<<<<< HEAD @@ -32,4 +33,40 @@ +======= + + + + + Lab 2 + + + +

Lab 2

+ + + +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb \ No newline at end of file diff --git a/INFO-1272 (JS 1)/Labs/Lab 2/levi_lab2.html b/INFO-1272 (JS 1)/Labs/Lab 2/levi_lab2.html index 1eb9f13..698756e 100644 --- a/INFO-1272 (JS 1)/Labs/Lab 2/levi_lab2.html +++ b/INFO-1272 (JS 1)/Labs/Lab 2/levi_lab2.html @@ -1,3 +1,4 @@ +<<<<<<< HEAD @@ -78,4 +79,86 @@ +======= + + + + + Lab 2 + + + +

Theme Park Tickets

+ + + +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb \ No newline at end of file diff --git a/INFO-1272 (JS 1)/Labs/Lab 3/Levi_Lab3.html b/INFO-1272 (JS 1)/Labs/Lab 3/Levi_Lab3.html index cb13a8c..541544d 100644 --- a/INFO-1272 (JS 1)/Labs/Lab 3/Levi_Lab3.html +++ b/INFO-1272 (JS 1)/Labs/Lab 3/Levi_Lab3.html @@ -1,3 +1,4 @@ +<<<<<<< HEAD @@ -58,4 +59,66 @@ } +======= + + + + Lab 3 + + + + +

Lab 3

+ + +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb \ No newline at end of file diff --git a/INFO-1272 (JS 1)/Labs/Lab 5/Levi_Lab5.html b/INFO-1272 (JS 1)/Labs/Lab 5/Levi_Lab5.html index 902020e..ee4f9e1 100644 --- a/INFO-1272 (JS 1)/Labs/Lab 5/Levi_Lab5.html +++ b/INFO-1272 (JS 1)/Labs/Lab 5/Levi_Lab5.html @@ -1,3 +1,4 @@ +<<<<<<< HEAD @@ -90,4 +91,98 @@ +======= + + + + + Lab 5 + + + + +

Lab 5

+ + + +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb \ No newline at end of file diff --git a/INFO-1272 (JS 1)/Labs/Midterm Part B/Levi_McLean_MidtermTest copy.html b/INFO-1272 (JS 1)/Labs/Midterm Part B/Levi_McLean_MidtermTest copy.html index 87d3c71..d27524d 100644 --- a/INFO-1272 (JS 1)/Labs/Midterm Part B/Levi_McLean_MidtermTest copy.html +++ b/INFO-1272 (JS 1)/Labs/Midterm Part B/Levi_McLean_MidtermTest copy.html @@ -1,3 +1,4 @@ +<<<<<<< HEAD @@ -127,4 +128,135 @@ } +======= + + + + Levi McLean Midterm Part B + + + + +

Levi McLean Midterm Part B

+ + +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb \ No newline at end of file diff --git a/INFO-1272 (JS 1)/Labs/Midterm Part B/Levi_McLean_MidtermTest.html b/INFO-1272 (JS 1)/Labs/Midterm Part B/Levi_McLean_MidtermTest.html index 7c6613f..ea14425 100644 --- a/INFO-1272 (JS 1)/Labs/Midterm Part B/Levi_McLean_MidtermTest.html +++ b/INFO-1272 (JS 1)/Labs/Midterm Part B/Levi_McLean_MidtermTest.html @@ -1,3 +1,4 @@ +<<<<<<< HEAD @@ -135,4 +136,143 @@ } +======= + + + + Levi McLean Midterm Part B + + + + +

Levi McLean Midterm Part B

+ + +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb \ No newline at end of file diff --git a/INFO-1272 (JS 1)/Notes/Final/index.html b/INFO-1272 (JS 1)/Notes/Final/index.html new file mode 100644 index 0000000..04b1e03 --- /dev/null +++ b/INFO-1272 (JS 1)/Notes/Final/index.html @@ -0,0 +1,35 @@ + + + + + + + INFO-1272 Final Notes + + + +

INFO-1272 Final Notes

+ +
+ Setup Quiz +
+
+ +
+
+ + +
+ + +
+ + + + \ No newline at end of file diff --git a/INFO-1272 (JS 1)/Notes/Final/index.js b/INFO-1272 (JS 1)/Notes/Final/index.js new file mode 100644 index 0000000..58f0bb7 --- /dev/null +++ b/INFO-1272 (JS 1)/Notes/Final/index.js @@ -0,0 +1,239 @@ +// for (var count = 0; count <= 5; count++) { +// console.log("This is count: " + count); +// } + +// for (var count = 0; count < 7; count += 2) { +// console.log("This is count: " + count); +// } + +// for (var count = 10; count >= 0; count--) { +// console.log("This is count: " + count); +// } + +// console.log(Math.round(4.6666666)); +// console.log(Math.ceil(4.6666666)); +// console.log(Math.min(0, 100)); + +// function sumArray(arr) { +// var sum = 0; +// for (var i = 0; i < arr.length; i++) { +// sum += arr[i]; +// } +// return sum; +// } + +// function reverseString(inString) { +// var outString = ""; +// for (var i = inString.length - 1; i >= 0; i--) { +// outString += inString[i]; +// } +// return outString; +// } + +// function printMessage() { +// var userInput = document.getElementById("textInput").value; +// console.log("You entered: ", userInput); +// } + +// function currentTime() { +// var now = new Date(); +// console.log(now.toLocaleDateString()); +// } + +// function randomArray(arr) { +// var numElements = 10; +// for (var i = 0; i < numElements; i++) { +// arr.push(Math.floor(Math.random() * 100) + 1); +// } +// return arr; +// } + +// var testArr = [1,2,3,4,5]; +// var total = sumArray(testArr); +// console.log(total); + +// console.log(reverseString("Penis")); + +// // printMessage(); +// currentTime(); +// console.log(randomArray(testArr)); + +// var testDate = new Date(); +// console.log(testDate.getDate()); // DAY OF MONTH +// console.log(testDate.getDay()); // DAY OF WEEK +// console.log(testDate.getFullYear()); +// console.log(testDate.getMonth()); // STARTS AT 0 +// console.log(testDate.getTime()); +// console.log(testDate.getHours()); + +// function dateSlashes() { +// var date = new Date(); +// var day = date.getDate(); +// var month = date.getMonth() + 1; +// var year = date.getFullYear() +// console.log(month + "/" + day + "/" + year); +// } + +// function dateSlashesReverse() { +// var date = new Date(); +// var day = date.getDate(); +// var month = date.getMonth() + 1; +// var year = date.getFullYear() +// console.log(year + "/" + month + "/" + day); +// } + +// function monthWords () { +// var date = new Date(); +// var day = date.getDate(); +// var monthNames = [ +// "January", "February", "March", "April", "May", "June", +// "July", "August", "September", "October", "November", "December" +// ] +// var month = monthNames[date.getMonth()]; +// var year = date.getFullYear(); +// console.log(month + " " + day + ", " + year); +// } + +// function monthWordsLong () { +// var date = new Date(); +// var dayNames = [ +// "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" +// ] +// var weekDay = dayNames[date.getDay()]; +// var day = date.getDate(); +// var monthNames = [ +// "January", "February", "March", "April", "May", "June", +// "July", "August", "September", "October", "November", "December" +// ] +// var month = monthNames[date.getMonth()]; +// var year = date.getFullYear(); +// console.log(weekDay + ", " + month + " " + day + ", " + year); +// } + +// function printTime() { +// var date = new Date(); +// var hour = date.getHours(); +// var minutes = date.getMinutes(); +// if (minutes < 10) { +// minutes = "0" + date.getMinutes(); +// } +// console.log(hour + ":" + minutes); +// } + +// function printTime12Hr() { +// var date = new Date(); +// var hour = date.getHours(); +// var minutes = date.getMinutes(); +// if (minutes < 10) { +// minutes = "0" + minutes; +// } +// var half = hour < 12 ? "AM" : "PM"; + +// hour = hour % 12; +// if (hour === 0) { +// hour = 12; +// } + +// console.log(hour + ":" + minutes + " " + half); +// } + +// dateSlashes(); +// dateSlashesReverse(); +// monthWords(); +// monthWordsLong(); +// printTime(); +// printTime12Hr(); + +// switch(expression) { +// case x: // can be anything really +// //thing to do +// break; +// case y: +// //different thing to do +// break; +// default: +// //default behaviour +// break; // without break, the program will execute the following cases +// } + +// person = { +// name: "Undefined", +// age: 0 +// }; + +// function Person(name, age) { +// this.name = name; +// this.age = age; +// } + +// console.log(person); +// var people = [new Person("Levi", 20), new Person("Tyler", 20), new Person("Stu", 19), new Person("Andrew", 21)] +// console.log(people); + +function Student(name) { + this.name = name; + this.score = 0; +} + +function generateQuestions() { + for (let i = 0; i < numQuestions; i++) { + const q = generateRandomQuestion(); + console.log(q.question, q.answer); + document.getElementById("question").textContent = q.question; + } + +}; + +function generateRandomQuestion() { + const operators = ["+", "-", "*", "/"]; + const operator = operators[Math.floor(Math.random() * operators.length)]; + var num1 = Math.floor(Math.random() * 20) + 1; + var num2 = Math.floor(Math.random() * 20) + 1; + + if (operator === "/") { + num1 = num1 * num2; + } + + const questionStr = `${num1} ${operator} ${num2}`; + var answer; + + switch(operator) { + case "+": + answer = num1 + num2; + break; + case "-": + answer = num1 - num2; + break; + case "*": + answer = num1 * num2; + break; + case "/": + answer = num1 / num2; + break; + } + + return { question: questionStr, answer: answer }; +} + +var currentStudent = null; +var numQuestions = 0; +var currentQuestion = 0; + +document.getElementById("startBtn").addEventListener("click", function() { + const nameInput = document.getElementById("studentName").value.trim(); + const numInput = parseInt(document.getElementById("numQuestions").value); + + if (nameInput === "" || isNaN(numInput) || numInput <= 0) { + alert("Please enter a valid name and a number of questions above 0."); + return; + } + + currentStudent = new Student(nameInput); + numQuestions = numInput; + currentQuestion = 1; + + document.getElementById("quizArea").style.display = "block"; + document.getElementById("currentStudent").textContent = "Student: " + currentStudent.name; + + generateQuestions(); +}); \ No newline at end of file diff --git a/INFO-1272 (JS 1)/Notes/Final/index2.html b/INFO-1272 (JS 1)/Notes/Final/index2.html new file mode 100644 index 0000000..c874d5f --- /dev/null +++ b/INFO-1272 (JS 1)/Notes/Final/index2.html @@ -0,0 +1,9 @@ + + + Index 2 Final Notes + + + +

Index 2 Final Notes

+ + \ No newline at end of file diff --git a/INFO-1272 (JS 1)/Notes/Final/index2.js b/INFO-1272 (JS 1)/Notes/Final/index2.js new file mode 100644 index 0000000..17275bf --- /dev/null +++ b/INFO-1272 (JS 1)/Notes/Final/index2.js @@ -0,0 +1,97 @@ +function Student(name, age, grade) { + this.name = name, + this.age = age, + this.grade = grade +}; + +function Car(brand, model, year, isElectric) { + this.brand = brand, + this.model = model, + this.year = year, + this.isElectric = isElectric, + this.describe = function() { + console.log(`This is a ${this.year} ${this.brand} ${this.model}`); + } +}; + +function House(type, bedrooms, price) { + this.type = type; + this.bedrooms = bedrooms; + this.price = price; +} + +function Employee(name, position, salary) { + this.name = name, + this.position = position, + this.salary = salary, + this.increaseSalary = function(amount) { + this.salary += amount; + } +} + +function Movie(title, genre, rating) { + this.title = title, + this.genre = genre, + this.rating = rating, + this.rateMovie = function(newRating) { + this.rating = newRating; + } +} + +function Course(courseName, instructor, schedule) { + this.courseName = courseName; + this.instructor = instructor; + this.schedule = schedule; +} + +var student1 = new Student("Levi McLean", 20, 99); +var student2 = new Student("Tyler Hird", 19, 88); +var student3 = new Student("Joe Jefferson", 21, 75); + +var car1 = new Car("Tesla", "Model 3", 2025, true); +var car2 = new Car("Ford", "F-150", 2020, false); + +var house1 = new House("Bungalow", 2, 250000); +var house2 = new House("Town House", 3, 375000); + +var employee1 = new Employee("Jimmy Joe", "Manager", 80000); + +var movie1 = new Movie("Kill Bill", "Action", 4.4); +var movie2 = new Movie("Star Wars", "Action", 3.7); + +console.log(student1.name + " " + student1.grade); +console.log(student2.name + " " + student2.grade); +console.log(student3.name + " " + student3.grade); + +if (car1.isElectric === true) { + console.log(`${car1.brand} ${car1.model} is an electric car!`) +} if (car2.isElectric === true) { + console.log(`${car2.brand} ${car2.model} is an electric car!`) +} + +car1.describe(); +car2.describe(); + +console.log(`The ${house1.type} has ${house1.bedrooms} bedrooms and costs $${house1.price}`); +console.log(`The ${house2.type} has ${house2.bedrooms} bedrooms and costs $${house2.price}`); + +console.log(`Previous ${employee1.position} salary: $${employee1.salary}.`); +console.log("Increasing salary by $1000000"); +employee1.increaseSalary(1000000); +console.log(`New ${employee1.position} salary: $${employee1.salary}.`); + +console.log(`Previous rating for ${movie1.title}: ${movie1.rating}`); +console.log(`Previous rating for ${movie2.title}: ${movie2.rating}`); +movie1.rateMovie(5); +console.log(`New rating for ${movie1.title}: ${movie1.rating}`); +console.log(`New rating for ${movie2.title}: ${movie2.rating}`); + +var courseSchedule = { + day: "Monday", + time: "10:00 AM", + location: "Room 101" +}; + +var course1 = new Course("JavaScript 1", "Mr. Smith", courseSchedule); + +console.log(`The ${course1.courseName} course is taught by ${course1.instructor} on ${course1.schedule.day} at ${course1.schedule.time} in ${course1.schedule.location}`) \ No newline at end of file diff --git a/INFO-1272 (JS 1)/Notes/Midterm/index.html b/INFO-1272 (JS 1)/Notes/Midterm/index.html index a57e362..3408e6d 100644 --- a/INFO-1272 (JS 1)/Notes/Midterm/index.html +++ b/INFO-1272 (JS 1)/Notes/Midterm/index.html @@ -1,3 +1,4 @@ +<<<<<<< HEAD @@ -173,4 +174,181 @@ +======= + + + + + Midterm Study + + + + +

Midterm Study

+

Introduction to Web Pages

+
    +
  1. A web page is a container for the following three technologies. Describe the purpose of each for a web page: +
  2. + +
+

Answers:

+ +
+ +

Introduction to javascript

+
    +
  1. Browser pop-up dialogue box functions
  2. + +
+

Answers:

+ +
+ +

Data Types and Variables

+
    +
  1. Name JavaScript's three data types. Describe the types of data they store
  2. +
  3. JavaScript is a weakly-typed language. Describe what this means.
  4. +
  5. What are the naming rules for a variables name? What are naming conventions?
  6. +
  7. What is a constant in JavaScript? Describe how you would declare a JavaScript constant.
  8. +
+

Answers:

+
    +
  1. Number, String and Boolean
  2. +
  3. weakly-typed language implies that data types do not need to be defined at initialization, the compiler will + decide, cast and convert the data type unless explicitly cast
  4. +
  5. A naming convention is a recommended way of naming variables to ensure readability and organize code. + JavaScript uses camelCase for variables and classes and UPPER_SNAKE_CASE for constants
  6. + + let customerAge = 23;
    + const ONT_TAX_RATE = 0.13; +
    +
  7. A constant is a variable whose value cannot be changed once initialized, making it constant. To define a + constant, use the "const" keyword.
  8. +
+
+ +

Operators

+
    +
  1. Explain the following binary operators: + - * / %
  2. +
  3. Explain the multiple uses of the + operator.
  4. +
  5. Describe how the increment/decrement operators (++ and --) work.
  6. +
+

Answers:

+
    +
  1. The + operator is used to get the sum, the - operator is to get the difference, the * operator multiplies, + the / operator divides and the % (modulus) operator determines if two numbers divided have a remainder and + how much of one
  2. +
  3. The + operator can be used to add two numbers together to find their sum, or you can use it to concatenate + multiple Strings together.
  4. +
  5. The ++ (increment) operator is used to increase the value of a variable by exactly one. The -- (decrement) + operator is used to decrease the value of a variable by exactly 1.
  6. +
+
+ +

The JavaScript Math object

+
    +
  1. Describe the operation and the return for the following Math methods:
  2. + +
+

Answers:

+ +
+ +

JavaScript Number Methods

+
    +
  1. Describe the operation and the return for the following Number methods:
  2. + +
+

Answers:

+ +
+ +

JavaScript Global Functions

+
    +
  1. Describe the operation and the return for the following global functions:
  2. + +
+

Answers:

+ +
+ +

JavaScript String Methods

+
    +
  1. Describe the operation and the return for the following String methods.
  2. + +
+

Answers:

+ + +

Playground

+

Interactive JavaScript follows

+ + + + +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb \ No newline at end of file diff --git a/INFO-1272 (JS 1)/Notes/Midterm/index.js b/INFO-1272 (JS 1)/Notes/Midterm/index.js index 24132e3..870ba0c 100644 --- a/INFO-1272 (JS 1)/Notes/Midterm/index.js +++ b/INFO-1272 (JS 1)/Notes/Midterm/index.js @@ -1,3 +1,4 @@ +<<<<<<< HEAD // for (var i = 1; i < 10; i++) { // console.log("Ran " + i + " time(s).") // }; @@ -187,4 +188,195 @@ if (charCount >= 10 && numCount >= 3 && symCount >= 1) { window.alert("Your password is OKAY"); } else { window.alert("Your password is WEAK"); +======= +// for (var i = 1; i < 10; i++) { +// console.log("Ran " + i + " time(s).") +// }; + +// console.log(window.confirm("Feel prepared?")); // true or false + +// var question = ("50" === 50); +// console.log(question); + +// var question2 = (true && false); +// console.log(question2); + +// var question3 = (true || false); +// console.log(question3); + +// // VAR price = 35.6; <-- WRONG +// var price = 35.6; // <-- RIGHT + +// var city = "London"; + +// if (city.toLowerCase() === "london") { +// console.log("I live there too!"); +// } else { +// console.log("I dont know where that is.") +// } + +// var userName = window.prompt("Please enter your name:"); +// greetUser(userName); + +// var radius = window.prompt("Please enter circle radius:"); +// calcCirc(radius); + +// var testNum = window.prompt("Number to test for even:"); +// isEven(testNum); + +// function greetUser(userName) { +// alert("Hello " + userName + " welcome to the page"); +// } + +// function calcCirc(radius) { +// var Circ = ((2 * Math.PI) * radius).toFixed(2); +// alert("Circumference is: " + Circ + " Inches."); +// } + +// function isEven(number) { +// if (number % 2 == 0) { +// console.log(number + " is even"); +// } else { +// console.log(number + " is odd"); +// } +// } + +// NUMBER GUESSING GAME +// var randomNum = Math.floor((Math.random() * 100) + 1); +// console.log("Random Number: " + randomNum); + +// var userGuess; +// do { +// var input = window.prompt("Guess a number from 1-100: "); +// if (input === null) { +// window.alert("Game cancelled."); +// break; +// } + +// userGuess = parseInt(input, 10); +// if (isNaN(userGuess) || userGuess < 1 || userGuess > 100) { +// window.alert("Please enter a valid number between 1 and 100."); +// } else if (userGuess !== randomNum) { +// window.alert("Incorrect number, try again!"); +// } +// } while (userGuess !== randomNum); + +// if (userGuess === randomNum) { +// window.alert("You guessed the right number! The number was " + randomNum); +// } + +// ROCK PAPER SCISSORS GAME +// var choices = ["rock", "paper", "scissors"]; +// var compChoice = choices[Math.floor(Math.random() * 3)]; +// console.log("Computer choice: " + compChoice); + +// var userChoice = window.prompt("Enter rock, paper or scissors: ").toLowerCase(); +// console.log("User choice: " + userChoice); + +// if (!choices.includes(userChoice)) { +// window.alert("Invalid choice!"); +// } else if (userChoice === compChoice) { +// window.alert("It's a tie!"); +// } else { +// var winsAgainst = { +// rock: "scissors", +// paper: "rock", +// scissors: "paper" +// }; + +// if (winsAgainst[userChoice] === compChoice) { +// window.alert("You win!"); +// } else { +// window.alert("Computer wins!"); +// } +// } + +// SAMPLE BANK ACCOUNT +// var bankBalance = 0; +// console.log("Bank balance: $" + bankBalance); + +// function getAmount(message) { +// var input = window.prompt(message); +// if (input === null) return null; +// var amount = parseInt(input, 10); +// if (isNaN(amount)) { +// window.alert("Please enter a valid number."); +// return null; +// } +// return amount; +// } + +// while (true) { +// var userChoice = window.prompt( +// "Welcome! Your bank balance is: $" + bankBalance + +// ". Would you like to (w)ithdraw, (d)eposit or (v)iew balance, or (q)uit?"); +// if (userChoice === null || userChoice.toLowerCase() === "q") break; +// userChoice = userChoice.toLowerCase(); +// console.log(userChoice); + +// if (userChoice === "w" || userChoice === "withdrawl") { +// var widthdrawlAmount = getAmount("How much would you like to widthdraw?"); +// if (widthdrawlAmount === null) continue; +// if (widthdrawlAmount > bankBalance) { +// window.alert("Not enough in balance to widthdraw, sorry!"); +// } else if (widthdrawlAmount <= 0) { +// window.alert("Cannot widthdraw negative or 0 dollars."); +// } else { +// bankBalance -= widthdrawlAmount; +// console.log("Bank balance: $" + bankBalance); +// } +// } else if (userChoice === "d" || userChoice === "deposit") { +// var depositAmount = getAmount("How much would you like to deposit?"); +// if (depositAmount === null) continue; +// if (depositAmount <= 0) { +// window.alert("Cannot deposit negative or 0 dollars."); +// } else { +// bankBalance += depositAmount; +// console.log("Bank balance: $" + bankBalance); +// } +// } else if (userChoice === "v" || userChoice === "view") { +// window.alert("Your balance is: $" + bankBalance + " dollars. Thank you for banking with us!"); +// console.log("Bank balance: $" + bankBalance); +// } else { +// window.alert("Invalid choice, please try again"); +// } +// } + +// ARRAY STATS CALCULATOR +// var stats = []; +// var sum = 0; + +// for (var i = 0; i < 50; i++) { +// var randomNum = Math.floor(Math.random() * 50); +// sum += randomNum; +// stats.push(randomNum); +// console.log(randomNum); +// } +// console.log(stats); + +// console.log("Sum of stats: " + sum); +// console.log("Average of stats: " + (sum / stats.length)); +// console.log("Min of stats: " + Math.min(...stats)); +// console.log("Max of stats: " + Math.max(...stats)); + +// PASSWORD STRENGTH CHECKER +var userPass = window.prompt("Enter a password to test: "); +var charCount, numCount, symCount; + +charCount = userPass.length; +console.log(charCount); + +numCount = (userPass.match(/\d/g) || []).length; +console.log(numCount); + +symCount = (userPass.match(/[^a-zA-Z0-9]/g) || []).length; +console.log(symCount); + +if (charCount >= 10 && numCount >= 3 && symCount >= 1) { + window.alert("Your password is STRONG"); +} else if (charCount >= 10 && numCount >= 1) { + window.alert("Your password is OKAY"); +} else { + window.alert("Your password is WEAK"); +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb } \ No newline at end of file diff --git a/INFO-1272 (JS 1)/Notes/Week 1/index.html b/INFO-1272 (JS 1)/Notes/Week 1/index.html index 5e84ced..8e4f2eb 100644 --- a/INFO-1272 (JS 1)/Notes/Week 1/index.html +++ b/INFO-1272 (JS 1)/Notes/Week 1/index.html @@ -1,3 +1,4 @@ +<<<<<<< HEAD @@ -31,4 +32,39 @@ +======= + + + + Week 1 Class 1 + + +

Javascript test

+ + +

Button pressed!

+
+

Form example

+ + + + +

You entered:

+ + + +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb \ No newline at end of file diff --git a/INFO-1272 (JS 1)/Notes/Week 1/index.js b/INFO-1272 (JS 1)/Notes/Week 1/index.js index 3ca4bc5..f554c63 100644 --- a/INFO-1272 (JS 1)/Notes/Week 1/index.js +++ b/INFO-1272 (JS 1)/Notes/Week 1/index.js @@ -1,3 +1,4 @@ +<<<<<<< HEAD document.getElementById("buttonLabel").style.display = "none"; function testButton() { @@ -16,4 +17,24 @@ function repeatInfo() { const email = document.getElementById("email").value; const phone = Number(document.getElementById("phone").value); formLabel.innerHTML += `${firstName} ${lastName}, ${email}, ${phone}` +======= +document.getElementById("buttonLabel").style.display = "none"; + +function testButton() { + const buttonLabel = document.getElementById("buttonLabel"); + if (buttonLabel.style.display === "block") { + buttonLabel.style.display = "none"; + } else { + buttonLabel.style.display = "block"; + } +} + +function repeatInfo() { + const formLabel = document.getElementById("formLabel"); + const firstName = document.getElementById("firstName").value; + const lastName = document.getElementById("lastName").value; + const email = document.getElementById("email").value; + const phone = Number(document.getElementById("phone").value); + formLabel.innerHTML += `${firstName} ${lastName}, ${email}, ${phone}` +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb } \ No newline at end of file diff --git a/INFO-1272 (JS 1)/Notes/Week 2/index.html b/INFO-1272 (JS 1)/Notes/Week 2/index.html index 858fef9..1972fe2 100644 --- a/INFO-1272 (JS 1)/Notes/Week 2/index.html +++ b/INFO-1272 (JS 1)/Notes/Week 2/index.html @@ -1,3 +1,4 @@ +<<<<<<< HEAD @@ -15,4 +16,23 @@

Entered Details:

+======= + + + + Week 3 Class 1 + + + +

Week 3 Class 1

+

Enter some details

+ + + + + +

Entered Details:

+ + +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb \ No newline at end of file diff --git a/INFO-1272 (JS 1)/Notes/Week 2/index.js b/INFO-1272 (JS 1)/Notes/Week 2/index.js index 1de13f8..c5d1790 100644 --- a/INFO-1272 (JS 1)/Notes/Week 2/index.js +++ b/INFO-1272 (JS 1)/Notes/Week 2/index.js @@ -1,3 +1,4 @@ +<<<<<<< HEAD function showDetails() { var firstName = document.getElementById("firstNameBox").value; var lastName = document.getElementById("lastNameBox").value; @@ -11,4 +12,19 @@ function showDetails() { console.log(10 - 3); console.log(100 / 25); console.log(100 % 3); +======= +function showDetails() { + var firstName = document.getElementById("firstNameBox").value; + var lastName = document.getElementById("lastNameBox").value; + var age = Number(document.getElementById("ageBox").value); + var password = document.getElementById("passwordBox").value; + console.log(`You entered: ${firstName}, ${lastName}, ${age}, ${password}`); + document.getElementById("detailsLabel").innerHTML += `${firstName}, ${lastName}, ${age}, ${password}`; + + console.log(10 + 10); + console.log(10 * 10); + console.log(10 - 3); + console.log(100 / 25); + console.log(100 % 3); +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb } \ No newline at end of file diff --git a/INFO-1272 (JS 1)/Notes/Week 8/index.html b/INFO-1272 (JS 1)/Notes/Week 8/index.html index ff6a169..80c1f3f 100644 --- a/INFO-1272 (JS 1)/Notes/Week 8/index.html +++ b/INFO-1272 (JS 1)/Notes/Week 8/index.html @@ -1,3 +1,4 @@ +<<<<<<< HEAD @@ -8,4 +9,16 @@

Week 8 JS Object Practice

+======= + + + + Week 8 JS Object Practice + + + +

Week 8 JS Object Practice

+ + +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb \ No newline at end of file diff --git a/INFO-1272 (JS 1)/Notes/Week 8/index.js b/INFO-1272 (JS 1)/Notes/Week 8/index.js index 9e38af6..52da54b 100644 --- a/INFO-1272 (JS 1)/Notes/Week 8/index.js +++ b/INFO-1272 (JS 1)/Notes/Week 8/index.js @@ -1,3 +1,4 @@ +<<<<<<< HEAD // Question 1 function person(firstName, lastName, age, city) { return { @@ -61,3 +62,68 @@ console.log("Last Song"); console.log(playlist.songs[playlist.songs.length - 1]); // Always get last entry // Question 5 +======= +// Question 1 +function person(firstName, lastName, age, city) { + return { + firstName: firstName, + lastName: lastName, + age: age, + city: city + }; +} + +var testPerson = person("Levi", "McLean", 20, "Woodstock"); +console.log(testPerson.firstName); +console.log(testPerson.lastName); +console.log(testPerson.age); +console.log(testPerson.city); + +// Question 2 +function book(title, author, pages) { + return { + title: title, + author: author, + pages: pages + }; +} + +var testBook = book("1984", "George Orwell", 386); +console.log(testBook.title); +console.log(testBook.author); +console.log(testBook.pages); +console.log("Update pages to 555"); +testBook.pages = 555; +console.log(testBook.pages); + +// Question 3 +function movie(name, year, rating) { + return { + name: name, + year: year, + rating: rating + }; +} + +var testMovie = movie("Kill Bill", 2003, 9.5); +console.log(testMovie.name); +console.log(testMovie.year); +console.log(testMovie.rating); +console.log("Adding new property director"); +testMovie.director = "Quentin Tarantino"; +console.log(testMovie.director); + +// Question 4 +const playlist = { + name: "Cool Jams", + songs: ["Rap song", "Metal song", "Pop song"] +}; + +console.log(playlist.songs); +console.log("First Song"); +console.log(playlist.songs[0]); +console.log("Last Song"); +console.log(playlist.songs[playlist.songs.length - 1]); // Always get last entry + +// Question 5 +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb diff --git a/INFO-1272 (JS 1)/Projects/Final Project/index.html b/INFO-1272 (JS 1)/Projects/Final Project/index.html index c8bef7d..10230ec 100644 --- a/INFO-1272 (JS 1)/Projects/Final Project/index.html +++ b/INFO-1272 (JS 1)/Projects/Final Project/index.html @@ -1,3 +1,4 @@ +<<<<<<< HEAD @@ -113,4 +114,121 @@ +======= + + + + Flowery Flower Shop + + + + + +

Flowery Flower Shop

+ Browse our flowers below... + +

Available flowers

+
+
+

Rose

+ +
+ + +
+
+
+

Tulip

+ +
+ + +
+
+
+

Sunflower

+ +
+ + +
+
+
+ +

Shopping Cart

+
+ + + + + + + + + + + + + +
FlowerPriceQuantitySubtotalRemove
+
+

Subtotal: $0.00

+

Tax: $0.00

+ Total: $0.00 +
+ +
+
+ +

Testimonials and Feedback

+
+
+ + + + +
+
+ +
+
+ + +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb \ No newline at end of file diff --git a/INFO-1272 (JS 1)/Projects/Final Project/index.js b/INFO-1272 (JS 1)/Projects/Final Project/index.js index 481e68b..a4f054a 100644 --- a/INFO-1272 (JS 1)/Projects/Final Project/index.js +++ b/INFO-1272 (JS 1)/Projects/Final Project/index.js @@ -1,3 +1,4 @@ +<<<<<<< HEAD // Object called flowers that contains 3 flower objects with their information const flowers = { "rose": { @@ -181,4 +182,189 @@ document.getElementById("feedback-form").addEventListener("submit", function(e) populateCatalog(); setupCartForms(); updateCartDisplay(); +======= +// Object called flowers that contains 3 flower objects with their information +const flowers = { + "rose": { + name: "Rose", + price: 2.5, + category: "Romance", + stock: 20, + description: "The classic red rose for that someone special." + }, + "tulip": { + name: "Tulip", + price: 3.0, + category: "Springtime", + stock: 15, + description: "A perfect spring time flower for a bouquet." + }, + "sunflower": { + name: "Sunflower", + price: 5.0, + category: "Exclusives", + stock: 10, + description: "Large iconic flower perfect for an Autumn garden." + } +}; + +let feedback = [ + {flower: "Rose", rating: 5, content: "A beautiful bouqet delivered on time with care!"}, + {flower: "Tulip", rating: 4, content: "Reminds me of Spring any time of year!"}, + {flower: "Sunflower", rating: 5, content: "Sunflower was tall and healthy, so elegant!"} +]; + +// Function to add flower information (price, stock, description, category) to HTML catalog +function populateCatalog() { + Object.values(flowers).forEach(flower => { + const article = document.getElementById(`${flower.name.toLowerCase()}`) + if (article) { + const listItems = article.querySelectorAll("ul li"); + listItems[0].textContent = `Price: $${flower.price.toFixed(2)}`; + listItems[1].textContent = `Category: ${flower.category}`; + listItems[2].textContent = `Stock: ${flower.stock}`; + listItems[3].textContent = `Description: ${flower.description}`; + } + }); +} + +// Function to update items inside cart, used by addToCart() and at initialization +function updateCartDisplay() { + const tbody = document.querySelector("#cart-table tbody"); + tbody.innerHTML = ""; + let subtotal = 0; + cart.forEach((item, idx) => { + const row = document.createElement("tr"); + row.innerHTML = ` + ${flowers[item.name].name} + $${item.price.toFixed(2)} + ${item.quantity} + ${(item.price * item.quantity).toFixed(2)} + + ` + tbody.appendChild(row); + subtotal += item.price * item.quantity; + }); + + const tax = subtotal * 0.13; + const total = subtotal + tax; + + document.getElementById("subtotal").textContent = subtotal.toFixed(2); + document.getElementById("tax").textContent = tax.toFixed(2); + document.getElementById("total").textContent = total.toFixed(2); + + document.querySelectorAll(".remove-button").forEach(btn => { + btn.addEventListener("click", function() { + const idx = Number(btn.getAttribute("data-idx")); + const item = cart[idx]; + flowers[item.name].stock += item.quantity; + cart.splice(idx,1); + updateCartDisplay(); + populateCatalog(); + }) + }) +} + +// Function to handle getting the correct flower name and quantity to add to cart +function setupCartForms() { + document.querySelectorAll(".add-to-cart").forEach(form => { + form.addEventListener("submit", function(e) { + e.preventDefault(); + const article = form.closest("article"); + const flowerName = article.querySelector("h3").textContent; + const quantity = form.querySelector("input[name='quantity']").value; + addToCart(flowerName, quantity); + form.reset(); + }); + }); +} + +// Start with empty cart +let cart = []; + +// Funcion to add items to cart +function addToCart(flowerName, quantity) { + quantity = Number(quantity); + + const key = flowerName.toLowerCase(); + const flower = flowers[key]; + + if (!flower || quantity < 1 || quantity > flower.stock) { + alert("Too many or too few flowers added to cart, rejecting."); + return; + } + + const existing = cart.find(item => item.name === flowerName); + if (existing) { + if (quantity > flower.stock) { + alert("Added quantity goes over stock limit, rejecting."); + return + } + existing.quantity += quantity; + } else { + cart.push({ + name: key, + price: flower.price, + quantity: quantity + }); + } + flower.stock -= quantity; + updateCartDisplay(); + populateCatalog(); +} + +// Function to create feedback HTML elements from list +function renderFeedback() { + const feedbackList = document.getElementById("feedback-list"); + feedbackList.innerHTML = ""; + if (feedback.length === 0) { + feedbackList.innerHTML = "

No feedback yet. Be our first review?

"; + return; + } + feedback.forEach(fb => { + const div = document.createElement("div"); + div.className = "testimonial"; + div.innerHTML = ` + ${fb.flower} + (${fb.rating}★) +

${fb.content}

+
+ ` + feedbackList.appendChild(div); + }) +} + +// Event listener for checkout button to show checkout message and reset cart +document.getElementById("checkout-button").addEventListener("click", function() { + if (cart.length === 0) { + document.getElementById("checkout-message").textContent = "Your cart is empty!"; + return; + } + const confirmed = confirm("Are you sure you want to finalize cart and check out?"); + if (confirmed) { + document.getElementById("checkout-message").textContent = "Thank you for your order!"; + cart = []; + updateCartDisplay(); + populateCatalog(); + } +}); + +document.getElementById("feedback-form").addEventListener("submit", function(e) { + e.preventDefault(); + const form = e.target; + const flower = form.flower.value; + const rating = Number(form.rating.value); + const content = form.content.value.trim() + + if (!flower || !rating || !content) return; + + feedback.unshift({ flower, rating, content }); + renderFeedback(); + form.reset(); +}) + +populateCatalog(); +setupCartForms(); +updateCartDisplay(); +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb renderFeedback(); \ No newline at end of file diff --git a/INFO-1272 (JS 1)/Projects/Final Project/style.css b/INFO-1272 (JS 1)/Projects/Final Project/style.css index 323fc0a..749037d 100644 --- a/INFO-1272 (JS 1)/Projects/Final Project/style.css +++ b/INFO-1272 (JS 1)/Projects/Final Project/style.css @@ -1,3 +1,4 @@ +<<<<<<< HEAD body { font-family: Arial, Helvetica, sans-serif; background: #fafafa; @@ -79,4 +80,87 @@ button:hover { border-radius: 4px; margin: 8px 0; padding: 8px; +======= +body { + font-family: Arial, Helvetica, sans-serif; + background: #fafafa; + color: #222; + margin: 0; + padding: 0; +} + +h1 { + text-align: center; + margin: 24px 0 12px 0; +} + +small { + display: block; + text-align: center; + margin: 0 0 18px 0; + color: #555; + font-size: 0.98em; +} + +h2 { + margin-top: 32px; + margin-bottom: 8px; + text-align: center; +} + +section { + margin: 0 auto 24px auto; + max-width: 700px; +} + +article { + border: 1px solid #ddd; + border-radius: 6px; + padding: 12px; + margin: 12px 0; + background: #fff; +} + +table { + width: 100%; + border-collapse: collapse; + margin-bottom: 12px; +} + +th, td { + border: 1px solid #ccc; + padding: 6px 8px; + text-align: center; +} + +form label { + display: block; + margin: 6px 0; +} + +input[type="number"], input[type="text"], select { + padding: 2px 4px; + margin-left: 4px; +} + +button { + margin-top: 6px; + padding: 4px 10px; + border: 1px solid #bbb; + border-radius: 3px; + background: #f0f0f0; + cursor: pointer; +} + +button:hover { + background: #e0e0e0; +} + +#feedback-list .testimonial { + background: #f9f9f9; + border: 1px solid #eee; + border-radius: 4px; + margin: 8px 0; + padding: 8px; +>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb } \ No newline at end of file diff --git a/INFO-1274 (Graphic Design)/Labs/Lab 12/Library Screenshot.png b/INFO-1274 (Graphic Design)/Labs/Lab 12/Library Screenshot.png new file mode 100644 index 0000000..ce513b3 Binary files /dev/null and b/INFO-1274 (Graphic Design)/Labs/Lab 12/Library Screenshot.png differ diff --git a/INFO-1274 (Graphic Design)/Labs/Lab 12/McLean_Lab12_Desktop.mp4 b/INFO-1274 (Graphic Design)/Labs/Lab 12/McLean_Lab12_Desktop.mp4 new file mode 100644 index 0000000..28c89b5 Binary files /dev/null and b/INFO-1274 (Graphic Design)/Labs/Lab 12/McLean_Lab12_Desktop.mp4 differ diff --git a/INFO-1274 (Graphic Design)/Labs/Lab 12/McLean_Lab12_Mobile.mp4 b/INFO-1274 (Graphic Design)/Labs/Lab 12/McLean_Lab12_Mobile.mp4 new file mode 100644 index 0000000..97ef7ce Binary files /dev/null and b/INFO-1274 (Graphic Design)/Labs/Lab 12/McLean_Lab12_Mobile.mp4 differ diff --git a/INFO-1274 (Graphic Design)/Labs/Lab 12/farmers market.webp b/INFO-1274 (Graphic Design)/Labs/Lab 12/farmers market.webp new file mode 100644 index 0000000..48bb0cb Binary files /dev/null and b/INFO-1274 (Graphic Design)/Labs/Lab 12/farmers market.webp differ