-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
black badge css is loaded if background of badge is black
- Loading branch information
Showing
10 changed files
with
246 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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,68 @@ | ||
#github-badge { | ||
padding: .2em; | ||
color: white; | ||
background-color: black; | ||
font: 12px "Lucida Grande", "Trebuchet MS", Verdana, sans-serif; | ||
} | ||
|
||
#github-badge a { | ||
color: #4183c4; /* blue */ | ||
text-decoration: none; | ||
} | ||
|
||
#github-badge a:hover { | ||
color: #4183c4; /* blue */ | ||
text-decoration: underline; | ||
} | ||
|
||
#github-badge a:visited { | ||
color: #4183c4; /* blue */ | ||
} | ||
|
||
#github-badge div.header { | ||
font: 16px "Lucida Grande", "Trebuchet MS", Verdana, sans-serif; | ||
} | ||
|
||
#github-badge .header span { | ||
font: 15px "Lucida Grande", "Trebuchet MS", Verdana, sans-serif; | ||
} | ||
|
||
#github-badge .footer { | ||
font: 10px "Lucida Grande", "Trebuchet MS", Verdana, sans-serif; | ||
} | ||
|
||
#github-badge .repos ul#repo_listing { | ||
padding: .2em; | ||
margin: 0px; | ||
} | ||
|
||
#github-badge .repos li { | ||
list-style: none; | ||
margin-bottom: 0.25em; | ||
padding: .1em; | ||
font-size: 110%; | ||
background: transparent none repeat scroll 0%; | ||
} | ||
|
||
#github-badge .watching li { | ||
font-size: 110%; | ||
} | ||
|
||
#github-badge .repos img { | ||
padding-right: .2em; | ||
vertical-align: middle; | ||
} | ||
|
||
#github-badge .repos .public { | ||
border: 1px solid rgb(50,50,50); | ||
background-color: rgb(20,20,20); | ||
} | ||
|
||
#github-badge .repos .public .description { | ||
margin-left: 18px; | ||
} | ||
|
||
#github-badge .clickable { | ||
cursor: pointer; | ||
cursor: hand; | ||
} |
This file contains 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
This file contains 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
This file contains 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,65 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
<head> | ||
<title>JavaScript unit test file</title> | ||
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | ||
<script src="../assets/jsunittest.js" type="text/javascript"></script> | ||
<script src="../../src/ext/jquery.js"></script> | ||
<script src="../../src/ext/jquery.template.js"></script> | ||
<script src="../../src/github-badge-launcher.js"></script> | ||
<script src="../../src/user_badge.js" type="text/javascript"></script> | ||
<script src="../fixtures/mocked_user_data.js"></script> | ||
|
||
<link rel="stylesheet" href="../../src/ext/stylesheets/black_badge.css" type="text/css" media="screen" title="no title" charset="utf-8"> | ||
<link rel="stylesheet" href="../assets/unittest.css" type="text/css" /> | ||
<style type="text/css" media="screen"> | ||
div#sample { | ||
background-color: black; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<div id="content"> | ||
|
||
<div id="header"> | ||
<h1>JavaScript unit test file</h1> | ||
<p> | ||
This file tests <strong>user_badge.js</strong>. | ||
</p> | ||
</div> | ||
|
||
<!-- Log output (one per Runner, via {testLog: "testlog"} option)--> | ||
<div id="testlog"></div> | ||
|
||
<!-- Put sample/test html here --> | ||
<div id="sample"> | ||
<div id="github-badge"> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
|
||
<script type="text/javascript"> | ||
// <![CDATA[ | ||
new Test.Unit.Runner({ | ||
setup: function() { | ||
GitHubBadge.buildUserBadge("drnic"); | ||
this.badge = $('div#github-badge'); | ||
GitHubBadge.loadUserInfo(GitHubBadge.mockedUserData); | ||
this.black = "rgb(0, 0, 0)"; | ||
}, | ||
|
||
"test that background behind badge is black": function() { with(this) { | ||
assertEqual(black, badge.parent().css('background-color')); | ||
}}, | ||
|
||
"test that background of badge is black": function() { with(this) { | ||
assertEqual(black, badge.css('background-color')); | ||
}}, | ||
}, {testLog: "testlog"}); | ||
// ]]> | ||
</script> | ||
</body> | ||
</html> |
This file contains 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
This file contains 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,85 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
<head> | ||
<title>JavaScript unit test file</title> | ||
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | ||
<script src="../assets/jsunittest.js" type="text/javascript"></script> | ||
|
||
<link rel="stylesheet" href="../assets/unittest.css" type="text/css" /> | ||
<style type="text/css" media="screen"> | ||
div#sample { | ||
background-color: black; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<div id="content"> | ||
|
||
<div id="header"> | ||
<h1>JavaScript unit test file</h1> | ||
<p> | ||
This file tests <strong>launcher.js</strong>. | ||
</p> | ||
</div> | ||
|
||
<!-- Log output (one per Runner, via {testLog: "testlog"} option)--> | ||
<div id="testlog"></div> | ||
|
||
<script type="text/javascript" charset="utf-8"> | ||
GITHUB_USERNAME = 'drnic'; | ||
GITHUB_LIST_LENGTH = 5; | ||
var GitHubBadge = GitHubBadge || {}; | ||
GitHubBadge.buildUserBadgeExecuted = false; | ||
GitHubBadge.buildUserBadge = function() { | ||
GitHubBadge.buildUserBadgeExecuted = true; | ||
}; | ||
</script> | ||
<!-- Put sample/test html here --> | ||
<div id="sample"> | ||
<div id="github-badge" width="150px"></div> | ||
<script src="../../src/github-badge-launcher.js" type="text/javascript"></script> | ||
<script type="text/javascript" charset="utf-8"> | ||
GitHubBadge.Launcher.init(); | ||
</script> | ||
</div> | ||
</div> | ||
|
||
<script type="text/javascript"> | ||
// <![CDATA[ | ||
|
||
new Test.Unit.Runner({ | ||
setup: function() { | ||
this.badge = $('#github-badge'); | ||
this.black = "rgb(0, 0, 0)"; | ||
}, | ||
|
||
"test that jQuery + jQuery.template loaded": function() { with(this) { | ||
assert(jQuery, 'jQuery not loaded'); | ||
assert(jQuery.template, 'jQuery.template not loaded'); | ||
}}, | ||
|
||
"test that badge built": function() { with(this) { | ||
assert(GitHubBadge.buildUserBadgeExecuted, 'Badge code was not executed'); | ||
}}, | ||
|
||
"test that background behind badge is black": function() { with(this) { | ||
assertEqual(black, badge.parent().css('background-color')); | ||
}}, | ||
|
||
"test that black_badge.css loaded": function() { with(this) { | ||
var css = $('style#black_badge'); | ||
assertEqual(1, css.size(), 'No style#black_badge added'); | ||
}}, | ||
|
||
}, {testLog: "testlog"}); | ||
// For each Test.UnitRunner instance, specify the element id where results will be | ||
// published; e.g. <div id="testlog"/> above. | ||
// That is, you can have multiple "new Test.Unit.Runner() { ... }" on this page, just | ||
// create more <div id="testlog2"></div> etc, and pass the element id to the hash above: | ||
// e.g. {testLog: "testlog2"} | ||
// ]]> | ||
</script> | ||
</body> | ||
</html> |
This file contains 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
This file contains 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
This file contains 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