Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5501
}
77 changes: 73 additions & 4 deletions GitHubCard/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Step 1: using axios, send a GET request to the following URL
(replacing the palceholder with your Github name):
(replacing the placeholder with your Github name):
https://api.github.com/users/<your name>
*/

Expand Down Expand Up @@ -35,21 +35,90 @@ const followersArray = [];
<h3 class="name">{users name}</h3>
<p class="username">{users user name}</p>
<p>Location: {users location}</p>
<p>Profile:
<p>Profile:
<a href={address to users github page}>{address to users github page}</a>
</p>
<p>Followers: {users followers count}</p>
<p>Following: {users following count}</p>
<p>Bio: {users bio}</p>
</div>
</div>

*/

/* List of LS Instructors Github username's:
/* List of LS Instructors Github username's:
tetondan
dustinmyers
justsml
luishrd
bigknell
*/
axios.get('https://api.github.com/users/1professionalusername')
.then(response => {
console.log(response)
})
.catch(err => {

})

//create elements
// function createCard(imgUrl) {
// const newcard = document.createElement('div')
// newimage = document.createElement("img"),
// cardinfo = document.createElement("div"),
// name = document.createElement("h3");
// username = document.createElement("p"),
// location = document.createElement("p"),
// followers = document.createElement("p");
// following = document.createElement("p"),
// bio = document.createElement("p"),

// //content
// name.textContent = "blue";
// newimage.src = 'blue';

// //classes
// newcard.classList.add("card");
// cardInfo.classList.add("card-info");
// name.classList.add('name');
// username.classList.add('username');

// //append
// newCard.appendChild(newImage);
// newCard.appendChild(cardInfo);
// cardInfo.appendChild(name);
// cardInfo.appendChild(username);
// cardInfo.appendChild(location);
// cardInfo.appendChild(profile);
// profile.appendChild(a);
// cardInfo.appendChild(followers);
// cardInfo.appendChild(following);
// cardInfo.appendChild(bio);

// // add this functionality later
// newCard.addEventListener("click", () => {
// newCard.classList.toggle("selected");
// });

// return createCard;
// }

function DogCard(imgUrl) {
const
newCard = document.createElement("div"),
newImage = document.createElement("h3"),
breed = document.createElement("h3");

breed.textContent = "Breed: Mastiff";
newImage.textContent = "Breed";
newImage.classList.add("dog-image");
newCard.classList.add("dog-card");
newCard.appendChild(newImage);
newCard.appendChild(breed);

// add this functionality later
newCard.addEventListener("click", () => {
newCard.classList.toggle("selected");
});

return newCard;
}
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ In this project we are going to be accessing the GitHub API and building a socia

**Follow these steps to set up and work on your project:**

* [ ] Create a forked copy of this project.
* [ ] Add your project manager as collaborator on Github.
* [ ] Clone your OWN version of the repository (Not Lambda's by mistake!).
* [ ] Create a new branch: git checkout -b `<firstName-lastName>`.
* [ ] Implement the project on your newly created `<firstName-lastName>` branch, committing changes regularly.
* [ ] Push commits: git push origin `<firstName-lastName>`.
* [x] Create a forked copy of this project.
* [x] Add your project manager as collaborator on Github.
* [x] Clone your OWN version of the repository (Not Lambda's by mistake!).
* [x] Create a new branch: git checkout -b `<firstName-lastName>`.
* [x] Implement the project on your newly created `<firstName-lastName>` branch, committing changes regularly.
* [x] Push commits: git push origin `<firstName-lastName>`.

**Follow these steps for completing your project.**

* [ ] Submit a Pull-Request to merge <firstName-lastName> Branch into master (student's Repo). **Please don't merge your own pull request**
* [ ] Add your project manager as a reviewer on the pull-request
* [ ] Your project manager will count the project as complete by merging the branch back into master.
* [x] Submit a Pull-Request to merge <firstName-lastName> Branch into master (student's Repo). **Please don't merge your own pull request**
* [x] Add your project manager as a reviewer on the pull-request
* [x] Your project manager will count the project as complete by merging the branch back into master.

### Preprocessor Setup

Expand Down
38 changes: 21 additions & 17 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
<!-- Do NOT change anything here except TODO line -->
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./index.css">
</head>
<body>
<div class="container">
<div class="header">
<img src="./assets/lambdalogo.png" alt="Lambda Logo"/>
<p>❤️'s</p>
<img src="./assets/githublogo.png" alt="GitHub Logo" />
</div>
<div class="cards"></div>

<head>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./index.css">
</head>

<body>
<div class="container">
<div class="header">
<img src="./assets/lambdalogo.png" alt="Lambda Logo" />
<p>❤️'s</p>
<img src="./assets/githublogo.png" alt="GitHub Logo" />
</div>
<!-- TODO: add CDN library here -->
<script src="./GitHubCard/index.js"></script>
</body>
<div class="cards"></div>
</div>
<!-- TODO: add CDN library here -->
<script src="./GitHubCard/index.js"></script>
</body>

</html>
<!-- Do NOT change anything here except TODO line -->
<!-- Do NOT change anything here except TODO line -->
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": {
"axios": "^0.19.0"
}
}
35 changes: 35 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


axios@^0.19.0:
version "0.19.0"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.0.tgz#8e09bff3d9122e133f7b8101c8fbdd00ed3d2ab8"
integrity sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==
dependencies:
follow-redirects "1.5.10"
is-buffer "^2.0.2"

debug@=3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==
dependencies:
ms "2.0.0"

follow-redirects@1.5.10:
version "1.5.10"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a"
integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==
dependencies:
debug "=3.1.0"

is-buffer@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.3.tgz#4ecf3fcf749cbd1e472689e109ac66261a25e725"
integrity sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==

ms@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=