This repository was archived by the owner on Mar 18, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Homework Week2 #13
Open
CleezyITP
wants to merge
2
commits into
bfl-itp:gh-pages
Choose a base branch
from
CleezyITP:gh-pages
base: gh-pages
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Homework Week2 #13
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,80 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>So-and-so's Instructional Assignment</title> | ||
<link rel="stylesheet" href="main.css"> | ||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | ||
<script type="text/javascript" src="main.js"></script> | ||
<title>Claire's Instructional Assignment</title> | ||
</head> | ||
|
||
<body> | ||
YOUR CODE HERE | ||
<div id="tops"> | ||
<img id="logo" src="img/logo.png" style="height:90px;width:110px"> | ||
|
||
<h1>Avoiding Immigration Scams</h1> | ||
|
||
</div> | ||
|
||
<div class="nav"> | ||
|
||
|
||
<ul> | ||
<li><a href="http://www.uscis.gov"> US Office of Immigration</a></li> | ||
|
||
<li> | ||
|
||
|
||
<a text="Resources"> Resources</a> | ||
|
||
<ul> | ||
|
||
<li><a href="http://www.uscis.gov/forms"> forms</a></li> | ||
<li><a href="http://www.uscis.gov/archive/archive-laws/archive-legal-documents/finding-free-legal-advice"> free legal advice</a></li> | ||
<li><a href="http://www.uscis.gov/about-us/find-uscis-office"> find an immigration office</a></li> | ||
|
||
</ul> | ||
|
||
</li> | ||
|
||
|
||
</ul> | ||
|
||
|
||
|
||
|
||
|
||
</div> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div id="imageHolder"> | ||
<!-- <div class="thumbnails"> | ||
|
||
</div> --> | ||
|
||
<img src="img/title.png" style="height:400px;width:400px"> | ||
<div id="carousel"> | ||
<img style="border:50px;height:105%" src= "img/c1.png" alt="c1" id="mainImg"> | ||
</div> | ||
|
||
|
||
</div> | ||
|
||
<!-- <div id="controlPanel"> | ||
<span id="leftButton" class="button" ><</span> | ||
<span id="rightButton" class="button" >></span> | ||
</div> --> | ||
|
||
|
||
</body> | ||
|
||
|
||
<footer> | ||
<img src="img/phone.png" style="height:90px;width:190px"> | ||
<a href="http://www.uscis.gov/">http://www.uscis.gov</a> | ||
</footer> | ||
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
|
||
body{ | ||
font-family: Helvetica, georgia, sans-serif; | ||
text-align: center; | ||
background-color: white; | ||
background-size: 80%; | ||
} | ||
|
||
h1{ | ||
margin-left: -50px; | ||
margin-top: 50px; | ||
margin-bottom: 10px; | ||
font-weight: 20px; | ||
font-size: 80px; | ||
text-align: left; | ||
|
||
|
||
} | ||
|
||
|
||
.thumbnails{ | ||
word-spacing: 100px; | ||
margin: 80px; | ||
padding-right: 20px; | ||
cursor:pointer; | ||
} | ||
|
||
.thumb{ | ||
width: 65px; | ||
height: 65px; | ||
border: 5px solid black; | ||
margin-right: 10px; | ||
|
||
} | ||
|
||
#carousel { | ||
width:32%; | ||
float:center; | ||
margin-top:50px; | ||
margin-left: 25%; | ||
border: 5px solid black; | ||
background-color: black; | ||
margin-left:550px; | ||
|
||
} | ||
|
||
#logo{ | ||
float:left; | ||
margin-left: 220px; | ||
} | ||
|
||
#imageHolder{ | ||
margin-top: 0px; | ||
|
||
} | ||
|
||
#tops{ | ||
|
||
display: inline; | ||
|
||
} | ||
|
||
#controlPanel{ | ||
float:center; | ||
} | ||
|
||
.button{ | ||
cursor:pointer; | ||
background-color: black; | ||
color: white; | ||
border-radius: 10px; | ||
text-align: center; | ||
padding: 20px; | ||
margin-left: 20%; | ||
margin-right: 20%; | ||
margin-top: -50px; | ||
cursor: pointer; | ||
margin-bottom: 120px; | ||
|
||
} | ||
|
||
footer{ | ||
float:center; | ||
margin:100px; | ||
} | ||
|
||
.nav{ | ||
margin-bottom: 20px; | ||
} | ||
|
||
|
||
ul a{ | ||
text-decoration: none; | ||
color: black; | ||
} | ||
|
||
ul { | ||
text-decoration: none; | ||
text-align: left; | ||
display: inline; | ||
font-family: Helvetica; | ||
color:black; | ||
padding: 15px 4px 170px 0; | ||
list-style: none; | ||
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.15); | ||
-moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.15); | ||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.15); | ||
} | ||
ul li { | ||
text-decoration: none; | ||
font: bold 12px/18px sans-serif; | ||
display: inline-block; | ||
margin-right: -4px; | ||
position: relative; | ||
padding: 15px 20px; | ||
background: #fff; | ||
cursor: pointer; | ||
-webkit-transition: all 0.2s; | ||
-moz-transition: all 0.2s; | ||
-ms-transition: all 0.2s; | ||
-o-transition: all 0.2s; | ||
transition: all 0.2s; | ||
} | ||
ul li:hover { | ||
background: #d3d3d3; | ||
color: #d3d3d3; | ||
} | ||
ul li ul { | ||
padding: 0; | ||
position: absolute; | ||
top: 48px; | ||
left: 0; | ||
width: 150px; | ||
-webkit-box-shadow: none; | ||
-moz-box-shadow: none; | ||
box-shadow: none; | ||
display: none; | ||
opacity: 0; | ||
visibility: hidden; | ||
-webkit-transiton: opacity 0.2s; | ||
-moz-transition: opacity 0.2s; | ||
-ms-transition: opacity 0.2s; | ||
-o-transition: opacity 0.2s; | ||
-transition: opacity 0.2s; | ||
} | ||
ul li ul li { | ||
background: white; | ||
display: block; | ||
color: #d3d3d3; | ||
text-shadow: 0 -1px 0 #000; | ||
} | ||
ul li ul li:hover { background: #d3d3d3; } | ||
ul li:hover ul { | ||
display: block; | ||
opacity: 1; | ||
visibility: visible; | ||
} | ||
|
||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
|
||
var myImages=[ "img/c1.png","img/c2.png","img/c3.png"]; | ||
var currentImg=0; | ||
|
||
$(document).ready(function(){ | ||
|
||
//this dynamically loads the images in the html as thumbnails | ||
$(myImages).each(function(index){ | ||
$('.thumbnails').append("<img src='"+ myImages[index] + "' class='thumb'/>"); | ||
}); | ||
|
||
Mytimer(); | ||
|
||
$("#leftButton").click(function(){ | ||
console.log(currentImg); | ||
prev(); | ||
|
||
}); | ||
|
||
$("#rightButton").click(function(){ | ||
console.log(currentImg); | ||
next(); | ||
}); | ||
|
||
$(".thumbnails").on('click', '.thumb', function(){ | ||
var thisSlide = $(this).attr('src'); | ||
$("#mainImg").attr('src', thisSlide); | ||
|
||
}); | ||
|
||
|
||
function next(){ | ||
if (currentImg>2){ | ||
currentImg= myImages.length-3; | ||
$("#mainImg").attr('src', myImages[currentImg]); | ||
} else { | ||
currentImg++; | ||
$("#mainImg").attr('src', myImages[currentImg]); | ||
|
||
} | ||
|
||
|
||
}; | ||
|
||
function prev(){ | ||
// $(myImages).each(function(index){ | ||
if (currentImg<1){ | ||
currentImg= myImages.length-1; | ||
$("#mainImg").attr('src', myImages[currentImg]); | ||
} else { | ||
currentImg--; | ||
$("#mainImg").attr('src', myImages[currentImg]); | ||
|
||
} | ||
|
||
|
||
}; | ||
|
||
|
||
function Mytimer(){ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This error is referring to the convention that SentenceCase function names in JavaScript are a convention for a "class", which this is not. It was expecting |
||
setInterval(function(){next()},3000); | ||
|
||
|
||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Re: this error, It's considered good style to define functions/variables before you use them. In other words, move these functions to line ~4. |
||
|
||
|
||
}); | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just FYI, filenames (on GitHub Pages, at least) are case-sensitive, so the image is broken on the live version. Unfortunately, you may find that changing the case of a file is harder than it should be:
http://stackoverflow.com/a/20907647/358804
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a.k.a. it might be easier to leave the filename capitalized and just change it here.