Skip to content

Commit

Permalink
update: error msgs for themes
Browse files Browse the repository at this point in the history
  • Loading branch information
FarhadG committed Nov 25, 2015
1 parent d7a2565 commit 5bf20a1
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 36 deletions.
2 changes: 1 addition & 1 deletion build/repo-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ var RepoCard = RepoCard || (function() {
}
else {
this.theme = RepoCard.themes['doodle'];
console.warn('A Repo Card theme was not provided -- reverting to default');
console.warn('"%s" is an invalid Repo Card theme. Reverting to default', name);
}
return this;
};
Expand Down
72 changes: 39 additions & 33 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
</head>
<body>

<!--one way of adding repo cards which needs the ID and the data points
<script src="./repo-card.min.js"
id="repo-card-lib"
data-repo="init"
data-username="farhadg"
data-title="Repo Card">
</script>
-->


<!--one way of adding repo cards which needs the ID and the data points-->
<!--<script src="./repo-card.min.js"-->
<!--id="repo-card-lib"-->
<!--data-repo="init"-->
<!--data-username="farhadg"-->
<!--data-title="Repo Card">-->
<!--</script>-->


<!-- another way of adding repo cards: a script tag with another configuring the options -->
<script src="./repo-card.js"></script>
Expand All @@ -26,37 +28,41 @@
username: 'farhadg',
title: 'Init',
subtitle: '<a href="http:https://www.github.com/farhadg" target="_blank">@farhadg</a>',
thumb: 'red',
background: 'black',
info: 'Being able to quickly navigate to the oldest commit in a repo is quite helpful. Go ahead and drag the bookmarklet onto your bookmark bar and click it whenever you would like',
thumb: 'green',
background: 'red',
info: 'djksjdklsajdsajlkdjsalk',
position: {
bottom: 15,
left: 15
}
})
.configure({
repo: 'mesh-code-editor'
})
.setTheme('asjkajsklajskl')
.setStyling({
background: 'url(http:https://subtlepatterns2015.subtlepatterns.netdna-cdn.com/patterns/dark_embroidery.png)',
thumb: 'url(https://avatars0.githubusercontent.com/u/1647596?v=3&s=460)',
position: {
top: 15,
right: 15
}
})
.configure({
theme: 'test',
repo: 'init',
username: 'farhadg',
title: 'Init',
subtitle: '<a href="http:https://www.github.com/farhadg" target="_blank">@farhadg</a>',
thumb: 'green',
background: 'red',
info: 'djksjdklsajdsajlkdjsalk',
position: {
bottom: 15,
left: 15
}
})

// .setStyling({
// background: 'url(http:https://subtlepatterns2015.subtlepatterns.netdna-cdn.com/patterns/dark_embroidery.png)',
// thumb: 'url(https://avatars0.githubusercontent.com/u/1647596?v=3&s=460)',
// position: {
// top: 15,
// right: 15
// }
// })
//
// .configure({
// repo: 'mesh-code-editor'
// })
//
// .setStyling({
// background: 'url(http:https://subtlepatterns2015.subtlepatterns.netdna-cdn.com/patterns/dark_embroidery.png)',
// thumb: 'url(https://avatars0.githubusercontent.com/u/1647596?v=3&s=460)',
// position: {
// top: 15,
// right: 15
// }
// })

</script>

</body>
Expand Down
2 changes: 1 addition & 1 deletion repo-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ var RepoCard = RepoCard || (function() {
}
else {
this.theme = RepoCard.themes['doodle'];
console.warn('A Repo Card theme was not provided -- reverting to default');
console.warn('"%s" is an invalid Repo Card theme. Reverting to default', name);
}
return this;
};
Expand Down
Loading

0 comments on commit 5bf20a1

Please sign in to comment.