Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Topic 5 #21

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file added assets/Thumbs.db
Binary file not shown.
3 changes: 3 additions & 0 deletions topic1/assets/css/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.section {
text-align: center;
}
38 changes: 38 additions & 0 deletions topic1/assets/js/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
function request(url, config) {
return new Promise(function(resolve, reject){
fetch(url, config)
.then(function(response) {
return response.json();
})
.then(function(response) {
resolve(response);
})
.catch(function(error){
reject(error);
});
})
}

function append(string) {
$('.js-joke-container')
.empty()
.append(string);
}

$(document).ready(function(){
$("#not-visible").hide();
$("#not-visible").fadeIn(500);
$("#not-visible").fadeOut(500);

$('#joke').on('click', function(e) {
request('http://api.icndb.com/jokes/random')
.then(function(response){
console.log(response)
append(response.value.joke);
})
.catch(function(error){
document.body.style.backgroundColor = "red";
console.log(error);
});
});
});
2 changes: 2 additions & 0 deletions topic1/assets/js/jquery-3.3.1.min.js

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions topic1/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="..\topic1\assets\css\index.css">
<script src="..\topic1\assets\js\jquery-3.3.1.min.js"></script>
<script src="..\topic1\assets\js\index.js"></script>
</head>
<body>
<section>hi</section>
<p id="not-visible">Hello world</p>
<button id="joke" >Joke</button>
<div class="js-joke-container"></div>
</body>
</html>
2 changes: 2 additions & 0 deletions topic5/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
1 change: 1 addition & 0 deletions topic5/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*node_modules/*
15 changes: 15 additions & 0 deletions topic5/node_modules/.bin/acorn

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions topic5/node_modules/.bin/acorn.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions topic5/node_modules/.bin/ansi-html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions topic5/node_modules/.bin/ansi-html.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions topic5/node_modules/.bin/atob

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions topic5/node_modules/.bin/atob.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions topic5/node_modules/.bin/babylon

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions topic5/node_modules/.bin/babylon.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions topic5/node_modules/.bin/browserslist

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions topic5/node_modules/.bin/browserslist.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions topic5/node_modules/.bin/cssesc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions topic5/node_modules/.bin/cssesc.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions topic5/node_modules/.bin/csso

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions topic5/node_modules/.bin/csso.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions topic5/node_modules/.bin/detect

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions topic5/node_modules/.bin/detect-port

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions topic5/node_modules/.bin/detect-port.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions topic5/node_modules/.bin/detect.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions topic5/node_modules/.bin/errno

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions topic5/node_modules/.bin/errno.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions topic5/node_modules/.bin/escodegen

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions topic5/node_modules/.bin/escodegen.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions topic5/node_modules/.bin/esgenerate

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions topic5/node_modules/.bin/esgenerate.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions topic5/node_modules/.bin/eslint

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions topic5/node_modules/.bin/eslint.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading