3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-25 04:02:39 +01:00

Add pull request notification

* Add message when there are pull requests with client side javascript
* Add string for OAOSIDL, for future usage
* Title cased credits
* Removed text transform from random quote
* Shoved commit count to left
* Added lines to top and bottom of ``h2``
* Removed redundant CSS
* Added JQuery
This commit is contained in:
Douglas Gardner 2013-04-21 20:14:37 +00:00
parent c3d6a52413
commit 5322ec52bf
4 changed files with 49 additions and 9 deletions

View File

@ -93,6 +93,7 @@ var pages = function(dbot) {
"languageprog": dbot.t("langhead-progress"), "languageprog": dbot.t("langhead-progress"),
"languagetrans": dbot.t("langhead-translations"), "languagetrans": dbot.t("langhead-translations"),
"languagetranshead": dbot.t("translations"), "languagetranshead": dbot.t("translations"),
"pullreqs": dbot.t("outstanding-pullreq")
}); });
}, },
}; };

View File

@ -189,5 +189,11 @@
}, },
"langhead-native": { "langhead-native": {
"en": "Native" "en": "Native"
},
"outstanding-pullreq": {
"en": "There are outstanding pull requests"
},
"oaosidl": {
"en": "The Official Aberystwyth Open Source International Development League"
} }
} }

View File

@ -3,6 +3,10 @@ pre#gitdiff {
width:80; width:80;
margin:auto; margin:auto;
text-transform:none; text-transform:none;
clear:both;
}
ul#credits {
text-transform:capitalize;
} }
div#main { div#main {
font-size:18px; font-size:18px;
@ -19,6 +23,7 @@ p.intro {
border:1px solid #ccc; border:1px solid #ccc;
padding:20px; padding:20px;
border-radius:4px; border-radius:4px;
text-transform:none;
} }
div.progress.open { div.progress.open {
background-color: #f4fff4; background-color: #f4fff4;
@ -74,3 +79,28 @@ h3 {
#translations td { #translations td {
text-transform:none; text-transform:none;
} }
p#pullreq {
float:right;
border-left:1px solid #ccc;
border-top:1px solid #ccc;
border-top-left-radius:5px;
padding:10px;
margin:5px;
display:none;
}
p#revnum {
float:left;
border-right:1px solid #ccc;
border-top:1px solid #ccc;
border-top-right-radius: 5px;
margin:5px;
padding:10px;
margin-bottom:0px;
}
h2 {
border-bottom: 1px solid #ccc;
border-top:1px solid #ccc;
margin-left:auto;
margin-right:auto;
width:40%;
}

View File

@ -8,12 +8,13 @@ html(lang='#{curr839}')
link(rel='stylesheet', type='text/css', href='/styles.css') link(rel='stylesheet', type='text/css', href='/styles.css')
link(rel="stylesheet", href="/project.css") link(rel="stylesheet", href="/project.css")
title #{pagetitle} title #{pagetitle}
- var mstone = "milestone" script
style(type="text/css") $(document).ready(function() {
each milestone in milestones $.get("https://api.github.com/repos/#{repo}/pulls", function(data) {
- current = mstone+milestone.number if ($.parseJSON(data).length) { $("#pullreq").show();}
- wdth = ((milestone.open_issues/(milestone.open_issues + milestone.closed_issues))*100) });
.current { width: wdth% } });
body body
div.container div.container
div#page div#page
@ -23,7 +24,9 @@ html(lang='#{curr839}')
#{dquote} #{dquote}
section#git section#git
h2 #{development} h2 #{development}
p.center p#pullreq
a(href="https://github.com/"+repo+"/pulls") #{pullreqs}
p#revnum
#{revnum} #{revnum}
pre#gitdiff pre#gitdiff
#{diff} #{diff}
@ -36,7 +39,7 @@ html(lang='#{curr839}')
th #{closedmilestone} th #{closedmilestone}
each milestone in milestones each milestone in milestones
- var wdth = ((milestone.closed_issues/(milestone.open_issues + milestone.closed_issues))*100) - var wdth = ((milestone.closed_issues/(milestone.open_issues + milestone.closed_issues))*100)
tr(id=mstone+milestone.number) tr(id="milestone"+milestone.number)
td td
a(href="https://github.com/"+repo+"/issues?milestone="+milestone.number) a(href="https://github.com/"+repo+"/issues?milestone="+milestone.number)
#{milestone.title} #{milestone.title}
@ -79,7 +82,7 @@ html(lang='#{curr839}')
td #{language.count} / #{translation.en.count} td #{language.count} / #{translation.en.count}
h3 #{credits} h3 #{credits}
#{thanks} #{thanks}
ul ul#credits
each author in authors each author in authors
li li
#{author} #{author}