+
+
+
+
+
+
+
+
+
+ Click to enlighten yourself
+
+
+
+
+
+
+
+ diff --git a/Week1/homework/js2-exercises/1-books.css b/Week1/homework/js2-exercises/1-books.css new file mode 100644 index 000000000..c272e5223 --- /dev/null +++ b/Week1/homework/js2-exercises/1-books.css @@ -0,0 +1,4 @@ +img{ + width: 350px; + height: 350px; + } \ No newline at end of file diff --git a/Week1/homework/js2-exercises/1-books.html b/Week1/homework/js2-exercises/1-books.html new file mode 100644 index 000000000..91c5e5dd7 --- /dev/null +++ b/Week1/homework/js2-exercises/1-books.html @@ -0,0 +1,17 @@ + + + +
+ + +
+
+
+
\ No newline at end of file
diff --git a/Week1/homework/js2-exercises/5-catWalking.js b/Week1/homework/js2-exercises/5-catWalking.js
new file mode 100644
index 000000000..dbf0adba6
--- /dev/null
+++ b/Week1/homework/js2-exercises/5-catWalking.js
@@ -0,0 +1,23 @@
+const img = document.querySelector('img');
+const srcCatWalking = 'http://www.anniemation.com/clip_art/images/cat-walk.gif';
+const srcCatDancIng = 'https://media2.giphy.com/media/3mXcJgVhPxWZa/giphy.gif';
+let left = 0
+
+function catWalk() {
+ setInterval(frame, 50)
+ function frame() {
+ left = left > 1280 ? 0 : left;
+ img.style.left = left + 'px';
+
+ if (left === 640) {
+ if (img.src != srcCatDancIng){
+ setTimeout(() => { img.src = srcCatWalking; left += 10 }, 5000)
+ img.src = srcCatDancIng;
+ }
+ }else {
+ img.style.left;
+ left += 10;
+ }
+ }
+}
+catWalk();
\ No newline at end of file
diff --git a/Week1/homework/js2-exercises/img.gif b/Week1/homework/js2-exercises/img.gif
new file mode 100644
index 000000000..c2b2b5349
Binary files /dev/null and b/Week1/homework/js2-exercises/img.gif differ
diff --git a/Week1/homework/js2-exercises/project w1 quateGenerator.css b/Week1/homework/js2-exercises/project w1 quateGenerator.css
new file mode 100644
index 000000000..23c7ae962
--- /dev/null
+++ b/Week1/homework/js2-exercises/project w1 quateGenerator.css
@@ -0,0 +1,59 @@
+section{
+ background-image: url(./img.gif);
+ background-size: cover;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 100%;
+ width: 100%;
+ position: relative;
+ margin: auto;
+ }
+ #mid-box{
+ margin-top: 30%;
+ }
+ #quote-text {
+ color:whitesmoke;
+ position: relative;
+ height: 40%;
+ display: flex;
+ justify-items: stretch;
+ justify-content: space-around;
+
+ }
+ .btn-wrapper {
+ position: relative;
+ align-items: center;
+ display: flex;
+ justify-content: center;
+ bottom: 20px;
+ }
+
+ #btn {
+ position: relative;
+ border: solid rgb(255, 255, 255) 1px;
+ border-radius: 10px;
+ font-size: 1em;
+ text-align: center;
+ padding: 10px;
+ font-family: 'Source Sans Pro', sans-serif;
+ background-color: transparent;
+ color:whitesmoke;
+ }
+ #btn:active {
+ box-shadow: 0 0 40px 40px rgba(255, 255, 255, 0.281) inset;
+ position: relative;
+ top: 2px;
+ }
+ p {
+ font-size: 3em;
+ }
+ .text-wrapper {
+ padding-top: 20%;
+ }
+ #name {
+ right: 0px;
+ text-align: end;
+ font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
+
+ }
\ No newline at end of file
diff --git a/Week1/homework/js2-exercises/project w1 quateGenerator.html b/Week1/homework/js2-exercises/project w1 quateGenerator.html
new file mode 100644
index 000000000..e77eb3946
--- /dev/null
+++ b/Week1/homework/js2-exercises/project w1 quateGenerator.html
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+ Click to enlighten yourself
+