From 0376926dfcb20226c704b433458a56bc9777df9f Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Sun, 21 Apr 2013 15:11:34 +0000 Subject: [PATCH 01/23] add percentages to progress bars; tidy translation * If the current language is English, the second "English" column will no longer display. * Progress bars have percentages again. * Some jade logic has been simplified. --- views/project/project.jade | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/views/project/project.jade b/views/project/project.jade index d447388..fa865d7 100644 --- a/views/project/project.jade +++ b/views/project/project.jade @@ -35,9 +35,6 @@ html(lang='#{curr839}') th #{openmilestone} th #{closedmilestone} each milestone in milestones - - var mstone = "milestone" - - var wd = "width:" - - var pc = "%" - var wdth = ((milestone.closed_issues/(milestone.open_issues + milestone.closed_issues))*100) tr(id=mstone+milestone.number) td @@ -45,8 +42,9 @@ html(lang='#{curr839}') #{milestone.title} td div.progress(class=milestone.state) - div.progress-inner(style=wd+wdth+pc)(class=milestone.state) + div.progress-inner(style="width:"+wdth+"%")(class=milestone.state)   + print #{Math.round(wdth)+"%"} td #{milestone.open_issues} td #{milestone.closed_issues} h4 #{languagetranshead} @@ -54,7 +52,8 @@ html(lang='#{curr839}') tr th #{languagecurr} th #{languagenati} - th #{languageeng} + unless (curr839 == "en") + th #{languageeng} th #{languageprog} th #{languagetrans} each language in translation @@ -62,16 +61,19 @@ html(lang='#{curr839}') tr td #{language.local} td #{language.own} - td #{language.english} + unless (curr839 == "en") + td #{language.english} td.prog unless (language.iso == curr839) div.progress(class="open") div.progress-inner(style="width:"+w+"%")(class="open")   + print #{Math.round(w)+"%"} else div.progress(class="closed") div.progress-inner(style="width:"+w+"%")(class="closed")   + print #{Math.round(w)+"%"} td #{language.count} / #{translation.en.count} h4 #{credits} #{thanks} From 17e9e7361767f02117c4cb436925e4660324cc86 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Sun, 21 Apr 2013 16:12:14 +0000 Subject: [PATCH 02/23] use true translation metrics We were on magnetic translation befoe --- modules/project/project.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/project/project.js b/modules/project/project.js index 5d6c3a7..59a2fbe 100644 --- a/modules/project/project.js +++ b/modules/project/project.js @@ -52,7 +52,7 @@ var project = function(dbot) { } } var t = {}; - for (var k = 0; k < str.length; k++) { + for (var k = 0; k < translation.length; k++) { var curr = translation[k]; if (t[curr]) { t[curr]["count"] += 1; From ce4e69bdd3409690322d0b79526092cc12d4f84a Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Sun, 21 Apr 2013 16:34:26 +0000 Subject: [PATCH 03/23] bought project module back up to speed * Added check that ``dent`` was loaded before looking for related configuration settings. * Fixed ``h3``s that should have been ``h2``s, and ``h4``s that should have been ``h3``s * Added larger margins for headings * Forced the ``td``s of the translations table to be their normal capitalisation * Readded some translations * Fixed links to repos * Fixed links to issues * Reimplemented configList --- modules/project/pages.js | 2 +- modules/project/project.js | 6 +++--- public/project.css | 11 +++++++++++ views/project/project.jade | 32 ++++++++++++++++++-------------- 4 files changed, 33 insertions(+), 18 deletions(-) diff --git a/modules/project/pages.js b/modules/project/pages.js index ed94690..f248dcd 100644 --- a/modules/project/pages.js +++ b/modules/project/pages.js @@ -92,7 +92,7 @@ var pages = function(dbot) { "languageeng": dbot.t("en"), "languageprog": dbot.t("langhead-progress"), "languagetrans": dbot.t("langhead-translations"), - "languagetranshead": dbot.t("translations") + "languagetranshead": dbot.t("translations"), }); }, }; diff --git a/modules/project/project.js b/modules/project/project.js index 59a2fbe..5bb291e 100644 --- a/modules/project/project.js +++ b/modules/project/project.js @@ -16,9 +16,9 @@ var project = function(dbot) { list.push(dbot.t("dent-account", { "username": dbot.config.dent.username })); - } - if(_.has(dbot.config.dent.dentQuotes)) { - list.push(dbot.t("dent-push")); + if(_.has(dbot.config.dent.dentQuotes)) { + list.push(dbot.t("dent-push")); + } } if(_.has(dbot.modules,'link')){ if(dbot.config.link.autoTitle){ diff --git a/public/project.css b/public/project.css index 3e71250..736b633 100644 --- a/public/project.css +++ b/public/project.css @@ -63,3 +63,14 @@ li { #footer { font-size:80%; } +h2 { + margin-top:40px; + margin-bottom:30px; +} +h3 { + margin-top:30px; + margin-bottom:20px; +} +#translations td { + text-transform:none; +} diff --git a/views/project/project.jade b/views/project/project.jade index fa865d7..22d5c93 100644 --- a/views/project/project.jade +++ b/views/project/project.jade @@ -22,12 +22,12 @@ html(lang='#{curr839}') p.intro #{dquote} section#git - h3 #{development} + h2 #{development} p.center #{revnum} pre#gitdiff #{diff} - h4 #{milestoneprog} + h3 #{milestonehead} table#milestones.center tr th #{milestonename} @@ -38,7 +38,7 @@ html(lang='#{curr839}') - var wdth = ((milestone.closed_issues/(milestone.open_issues + milestone.closed_issues))*100) tr(id=mstone+milestone.number) td - a(href=milestone.url) + a(href="https://github.com/"+repo+"/issues?milestone="+milestone.number) #{milestone.title} td div.progress(class=milestone.state) @@ -47,8 +47,10 @@ html(lang='#{curr839}') print #{Math.round(wdth)+"%"} td #{milestone.open_issues} td #{milestone.closed_issues} - h4 #{languagetranshead} - table + a(#href="https://github.com/"+repo+"/") + #{propaganda} + h3 #{languagetranshead} + table#translations tr th #{languagecurr} th #{languagenati} @@ -75,21 +77,23 @@ html(lang='#{curr839}')   print #{Math.round(w)+"%"} td #{language.count} / #{translation.en.count} - h4 #{credits} + h3 #{credits} #{thanks} ul each author in authors li #{author} section#config - h3 #{config} - ul - li #{currlang} - li #{debugmode} - h4 #{loadmod} - ul#modules - each module in modules - li #{module} + h2 #{config} + ul + li #{currlang} + li #{debugmode} + each config in configList + li #{config} + h3 #{loadmod} + ul#modules + each module in modules + li #{module} section#footer p #{currver} From 5322ec52bf38a5565c2ec8c5b2d2a3432fbaf663 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Sun, 21 Apr 2013 20:14:37 +0000 Subject: [PATCH 04/23] 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 --- modules/project/pages.js | 1 + modules/project/strings.json | 6 ++++++ public/project.css | 30 ++++++++++++++++++++++++++++++ views/project/project.jade | 21 ++++++++++++--------- 4 files changed, 49 insertions(+), 9 deletions(-) diff --git a/modules/project/pages.js b/modules/project/pages.js index f248dcd..5578d68 100644 --- a/modules/project/pages.js +++ b/modules/project/pages.js @@ -93,6 +93,7 @@ var pages = function(dbot) { "languageprog": dbot.t("langhead-progress"), "languagetrans": dbot.t("langhead-translations"), "languagetranshead": dbot.t("translations"), + "pullreqs": dbot.t("outstanding-pullreq") }); }, }; diff --git a/modules/project/strings.json b/modules/project/strings.json index 8960da3..be11111 100644 --- a/modules/project/strings.json +++ b/modules/project/strings.json @@ -189,5 +189,11 @@ }, "langhead-native": { "en": "Native" + }, + "outstanding-pullreq": { + "en": "There are outstanding pull requests" + }, + "oaosidl": { + "en": "The Official Aberystwyth Open Source International Development League" } } diff --git a/public/project.css b/public/project.css index 736b633..95ff2d4 100644 --- a/public/project.css +++ b/public/project.css @@ -3,6 +3,10 @@ pre#gitdiff { width:80; margin:auto; text-transform:none; + clear:both; +} +ul#credits { + text-transform:capitalize; } div#main { font-size:18px; @@ -19,6 +23,7 @@ p.intro { border:1px solid #ccc; padding:20px; border-radius:4px; + text-transform:none; } div.progress.open { background-color: #f4fff4; @@ -74,3 +79,28 @@ h3 { #translations td { 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%; +} diff --git a/views/project/project.jade b/views/project/project.jade index 22d5c93..560de26 100644 --- a/views/project/project.jade +++ b/views/project/project.jade @@ -8,12 +8,13 @@ html(lang='#{curr839}') link(rel='stylesheet', type='text/css', href='/styles.css') link(rel="stylesheet", href="/project.css") title #{pagetitle} - - var mstone = "milestone" - style(type="text/css") - each milestone in milestones - - current = mstone+milestone.number - - wdth = ((milestone.open_issues/(milestone.open_issues + milestone.closed_issues))*100) - .current { width: wdth% } + script + $(document).ready(function() { + $.get("https://api.github.com/repos/#{repo}/pulls", function(data) { + if ($.parseJSON(data).length) { $("#pullreq").show();} + }); + }); + body div.container div#page @@ -23,7 +24,9 @@ html(lang='#{curr839}') #{dquote} section#git h2 #{development} - p.center + p#pullreq + a(href="https://github.com/"+repo+"/pulls") #{pullreqs} + p#revnum #{revnum} pre#gitdiff #{diff} @@ -36,7 +39,7 @@ html(lang='#{curr839}') th #{closedmilestone} each milestone in milestones - var wdth = ((milestone.closed_issues/(milestone.open_issues + milestone.closed_issues))*100) - tr(id=mstone+milestone.number) + tr(id="milestone"+milestone.number) td a(href="https://github.com/"+repo+"/issues?milestone="+milestone.number) #{milestone.title} @@ -79,7 +82,7 @@ html(lang='#{curr839}') td #{language.count} / #{translation.en.count} h3 #{credits} #{thanks} - ul + ul#credits each author in authors li #{author} From af8c11fd86223e3044fc575498f873f70e7f47c2 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Sun, 21 Apr 2013 20:28:51 +0000 Subject: [PATCH 05/23] fix missing string --- modules/project/strings.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/project/strings.json b/modules/project/strings.json index be11111..58fb470 100644 --- a/modules/project/strings.json +++ b/modules/project/strings.json @@ -195,5 +195,8 @@ }, "oaosidl": { "en": "The Official Aberystwyth Open Source International Development League" + }, + "link-autotitle": { + "en": "Automatically titling links in channels" } } From 09120f06dbf747a905d8f8bcac84a08d28d92a66 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Sun, 21 Apr 2013 20:44:41 +0000 Subject: [PATCH 06/23] add french translations --- modules/project/strings.json | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/modules/project/strings.json b/modules/project/strings.json index 58fb470..daa07b0 100644 --- a/modules/project/strings.json +++ b/modules/project/strings.json @@ -1,7 +1,4 @@ { - "dbotintro": { - "en": "{botname} lorem ipsum dolor sit amet" - }, "dbotspeaks": { "en": "{name} speaks {lang}", "de": "{name} spricht {lang} ({langen})", @@ -10,10 +7,12 @@ "nl": "{name} spreekt {lang} ({langen})" }, "thanks": { - "en": "With thanks to:" + "en": "With thanks to:", + "fr": "Merci à:" }, "credits": { - "en": "Authors" + "en": "Authors", + "fr": "Développeurs" }, "pagetitle": { "en": "{botname} web interface", @@ -115,6 +114,7 @@ }, "milestones": { "en": "Milestones" + "fr": "étapes" }, "milestoneprog": { "en": "Progress", @@ -173,22 +173,32 @@ "en": "{branch}" }, "git": { - "en": "version control" + "en": "version control", + "de": "Versionsverwaltung", + "es": "Control de versiones", + "fr": "Festion de versions", + "it": "Controllo versione", + "nl": "Versiebeheersysteem" }, "langhead-current": { - "en": "Current" + "en": "Current", + "fr": "Courant" }, "langhead-translations": { - "en": "Completion" + "en": "Completion", + "fr": "Achèvement" }, "translations": { - "en": "Translations" + "en": "Translations", + "fr": "Traductions" }, "langhead-progress": { - "en": "Translation Progress" + "en": "Translation Progress", + "fr": "Avancement de la Traduction" }, "langhead-native": { - "en": "Native" + "en": "Native", + "fr": "Natale" }, "outstanding-pullreq": { "en": "There are outstanding pull requests" From e4b543c30259e72de70fbecc8a15190872ab47a7 Mon Sep 17 00:00:00 2001 From: reality Date: Mon, 22 Apr 2013 19:36:13 +0000 Subject: [PATCH 07/23] GPL --- LICENCE | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/LICENCE b/LICENCE index 627898c..205b8c1 100644 --- a/LICENCE +++ b/LICENCE @@ -1,18 +1,14 @@ Copyright (c) 2012-2013 Luke Slater (tinmachin3@gmail.com) -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +You should have received a copy of the GNU General Public License +along with this program. If not, see . From ec450e407028e42f2557d27340225aa55bc179be Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Sun, 21 Apr 2013 20:14:37 +0000 Subject: [PATCH 08/23] 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 --- modules/project/pages.js | 1 + modules/project/strings.json | 6 ++++++ public/project.css | 30 ++++++++++++++++++++++++++++++ views/project/project.jade | 21 ++++++++++++--------- 4 files changed, 49 insertions(+), 9 deletions(-) diff --git a/modules/project/pages.js b/modules/project/pages.js index f248dcd..5578d68 100644 --- a/modules/project/pages.js +++ b/modules/project/pages.js @@ -93,6 +93,7 @@ var pages = function(dbot) { "languageprog": dbot.t("langhead-progress"), "languagetrans": dbot.t("langhead-translations"), "languagetranshead": dbot.t("translations"), + "pullreqs": dbot.t("outstanding-pullreq") }); }, }; diff --git a/modules/project/strings.json b/modules/project/strings.json index 8960da3..be11111 100644 --- a/modules/project/strings.json +++ b/modules/project/strings.json @@ -189,5 +189,11 @@ }, "langhead-native": { "en": "Native" + }, + "outstanding-pullreq": { + "en": "There are outstanding pull requests" + }, + "oaosidl": { + "en": "The Official Aberystwyth Open Source International Development League" } } diff --git a/public/project.css b/public/project.css index 736b633..95ff2d4 100644 --- a/public/project.css +++ b/public/project.css @@ -3,6 +3,10 @@ pre#gitdiff { width:80; margin:auto; text-transform:none; + clear:both; +} +ul#credits { + text-transform:capitalize; } div#main { font-size:18px; @@ -19,6 +23,7 @@ p.intro { border:1px solid #ccc; padding:20px; border-radius:4px; + text-transform:none; } div.progress.open { background-color: #f4fff4; @@ -74,3 +79,28 @@ h3 { #translations td { 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%; +} diff --git a/views/project/project.jade b/views/project/project.jade index 22d5c93..560de26 100644 --- a/views/project/project.jade +++ b/views/project/project.jade @@ -8,12 +8,13 @@ html(lang='#{curr839}') link(rel='stylesheet', type='text/css', href='/styles.css') link(rel="stylesheet", href="/project.css") title #{pagetitle} - - var mstone = "milestone" - style(type="text/css") - each milestone in milestones - - current = mstone+milestone.number - - wdth = ((milestone.open_issues/(milestone.open_issues + milestone.closed_issues))*100) - .current { width: wdth% } + script + $(document).ready(function() { + $.get("https://api.github.com/repos/#{repo}/pulls", function(data) { + if ($.parseJSON(data).length) { $("#pullreq").show();} + }); + }); + body div.container div#page @@ -23,7 +24,9 @@ html(lang='#{curr839}') #{dquote} section#git h2 #{development} - p.center + p#pullreq + a(href="https://github.com/"+repo+"/pulls") #{pullreqs} + p#revnum #{revnum} pre#gitdiff #{diff} @@ -36,7 +39,7 @@ html(lang='#{curr839}') th #{closedmilestone} each milestone in milestones - var wdth = ((milestone.closed_issues/(milestone.open_issues + milestone.closed_issues))*100) - tr(id=mstone+milestone.number) + tr(id="milestone"+milestone.number) td a(href="https://github.com/"+repo+"/issues?milestone="+milestone.number) #{milestone.title} @@ -79,7 +82,7 @@ html(lang='#{curr839}') td #{language.count} / #{translation.en.count} h3 #{credits} #{thanks} - ul + ul#credits each author in authors li #{author} From fe57328e3d68ddee26b54da8b988f44cf3a48b3e Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Sun, 21 Apr 2013 20:28:51 +0000 Subject: [PATCH 09/23] fix missing string --- modules/project/strings.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/project/strings.json b/modules/project/strings.json index be11111..58fb470 100644 --- a/modules/project/strings.json +++ b/modules/project/strings.json @@ -195,5 +195,8 @@ }, "oaosidl": { "en": "The Official Aberystwyth Open Source International Development League" + }, + "link-autotitle": { + "en": "Automatically titling links in channels" } } From 75e03c15b76adfbcbcb16d8acbf660b47bae3422 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Sun, 21 Apr 2013 20:44:41 +0000 Subject: [PATCH 10/23] add french translations --- modules/project/strings.json | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/modules/project/strings.json b/modules/project/strings.json index 58fb470..daa07b0 100644 --- a/modules/project/strings.json +++ b/modules/project/strings.json @@ -1,7 +1,4 @@ { - "dbotintro": { - "en": "{botname} lorem ipsum dolor sit amet" - }, "dbotspeaks": { "en": "{name} speaks {lang}", "de": "{name} spricht {lang} ({langen})", @@ -10,10 +7,12 @@ "nl": "{name} spreekt {lang} ({langen})" }, "thanks": { - "en": "With thanks to:" + "en": "With thanks to:", + "fr": "Merci à:" }, "credits": { - "en": "Authors" + "en": "Authors", + "fr": "Développeurs" }, "pagetitle": { "en": "{botname} web interface", @@ -115,6 +114,7 @@ }, "milestones": { "en": "Milestones" + "fr": "étapes" }, "milestoneprog": { "en": "Progress", @@ -173,22 +173,32 @@ "en": "{branch}" }, "git": { - "en": "version control" + "en": "version control", + "de": "Versionsverwaltung", + "es": "Control de versiones", + "fr": "Festion de versions", + "it": "Controllo versione", + "nl": "Versiebeheersysteem" }, "langhead-current": { - "en": "Current" + "en": "Current", + "fr": "Courant" }, "langhead-translations": { - "en": "Completion" + "en": "Completion", + "fr": "Achèvement" }, "translations": { - "en": "Translations" + "en": "Translations", + "fr": "Traductions" }, "langhead-progress": { - "en": "Translation Progress" + "en": "Translation Progress", + "fr": "Avancement de la Traduction" }, "langhead-native": { - "en": "Native" + "en": "Native", + "fr": "Natale" }, "outstanding-pullreq": { "en": "There are outstanding pull requests" From 3f5bf0e5a553ab1b2d5bb6347b58341d9f901118 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Mon, 22 Apr 2013 23:58:48 +0000 Subject: [PATCH 11/23] Fix typographical error The strings.json for the project module was malformed. This commit rectifies the issue --- modules/project/strings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/project/strings.json b/modules/project/strings.json index daa07b0..5dc8c3e 100644 --- a/modules/project/strings.json +++ b/modules/project/strings.json @@ -113,7 +113,7 @@ "nl": "Debug uitgeschakeld" }, "milestones": { - "en": "Milestones" + "en": "Milestones", "fr": "étapes" }, "milestoneprog": { From 194135791a934c92a58cdec261d2e5306ce3b828 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Tue, 23 Apr 2013 00:31:36 +0000 Subject: [PATCH 12/23] Add footer to pages linking to ./project --- public/styles.css | 15 +++++++++++++++ views/layout.jade | 3 +++ views/project/project.jade | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/public/styles.css b/public/styles.css index 39703bb..8e8dfaa 100644 --- a/public/styles.css +++ b/public/styles.css @@ -223,3 +223,18 @@ div.imgwrap > img { .thumbnail:hover > div.imgwrap > span.nicks { display: inline; } + +/* footer */ +#footer { + margin-top:5px; + margin-right:10px; + margin-left:10px; +} +#footer a { + float:right; + padding-left:2px; + padding-right:2px; + background-color:#f5f5f5; + border-radius:3px; +} + diff --git a/views/layout.jade b/views/layout.jade index bb3cf2e..ad2d14e 100644 --- a/views/layout.jade +++ b/views/layout.jade @@ -14,6 +14,9 @@ html(lang='en') a(href='/') #{name} web interface div.container#main block content + div#footer + a#project(href='/project') About + script(type="text/javascript", src="/bootstrap/js/bootstrap.min.js") script(type="text/javascript", src="/d3/d3.v3.min.js") script(type="text/javascript", src="/script.js") diff --git a/views/project/project.jade b/views/project/project.jade index 560de26..d2dfb42 100644 --- a/views/project/project.jade +++ b/views/project/project.jade @@ -50,7 +50,7 @@ html(lang='#{curr839}') print #{Math.round(wdth)+"%"} td #{milestone.open_issues} td #{milestone.closed_issues} - a(#href="https://github.com/"+repo+"/") + a(href="https://github.com/"+repo+"/") #{propaganda} h3 #{languagetranshead} table#translations From 218509b7862bf2cdadb3833fc402018bb1346073 Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 23 Apr 2013 17:28:26 +0000 Subject: [PATCH 13/23] fix syntax error in project strings --- modules/project/strings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/project/strings.json b/modules/project/strings.json index daa07b0..5dc8c3e 100644 --- a/modules/project/strings.json +++ b/modules/project/strings.json @@ -113,7 +113,7 @@ "nl": "Debug uitgeschakeld" }, "milestones": { - "en": "Milestones" + "en": "Milestones", "fr": "étapes" }, "milestoneprog": { From c37e9cded733e82dab556205e51a8c472009e29a Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 23 Apr 2013 18:48:41 +0000 Subject: [PATCH 14/23] nickserv module in master --- modules/nickserv/config.json | 9 +++++++++ modules/nickserv/nickserv.js | 37 ++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 modules/nickserv/config.json create mode 100644 modules/nickserv/nickserv.js diff --git a/modules/nickserv/config.json b/modules/nickserv/config.json new file mode 100644 index 0000000..3bcaece --- /dev/null +++ b/modules/nickserv/config.json @@ -0,0 +1,9 @@ +{ + "servers": { + "nc": { + "matcher": "STATUS ([^ ]+) (\\d)$", + "acceptableState": 3, + "infoCommand": "status" + } + } +} diff --git a/modules/nickserv/nickserv.js b/modules/nickserv/nickserv.js new file mode 100644 index 0000000..28f20ae --- /dev/null +++ b/modules/nickserv/nickserv.js @@ -0,0 +1,37 @@ +var nickserv = function(dbot) { + this.authStack = {}; + + this.api = { + 'auth': function(server, nick, callback) { + var nickserv = dbot.config.servers[server].nickserv, + infoCommand = this.config.servers[server].infoCommand; + + if(!_.has(this.authStack, server)) this.authStack[server] = {}; + this.authStack[server][nick] = callback; + + dbot.say(server, nickserv, infoCommand + ' ' + nick); + } + }; + + this.listener = function(event) { + var nickserv = dbot.config.servers[event.server].nickserv, + statusRegex = this.config.servers[event.server].matcher, + acceptableState = this.config.servers[event.server].acceptableState; + + if(event.user == nickserv) { + var info = event.params.match(statusRegex); + if(info && _.has(this.authStack, event.server)) { + if(info[2] == acceptableState ) { + this.authStack[event.server][info[1]](true); + } else { + this.authStack[event.server][info[1]](false); + } + } + } + }.bind(this); + this.on = 'NOTICE'; +}; + +exports.fetch = function(dbot) { + return new nickserv(dbot); +}; From 8475aa46e88ed3442efb6a099ac1c2e8e3ef0c23 Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 23 Apr 2013 19:07:23 +0000 Subject: [PATCH 15/23] command can use nickserv [#421] --- modules/command/api.js | 26 ++++++++-------- modules/command/command.js | 59 +++++++++++++++++++----------------- modules/command/config.json | 1 + modules/nickserv/nickserv.js | 1 + 4 files changed, 47 insertions(+), 40 deletions(-) diff --git a/modules/command/api.js b/modules/command/api.js index da718d3..4abaa9b 100644 --- a/modules/command/api.js +++ b/modules/command/api.js @@ -17,22 +17,24 @@ var api = function(dbot) { /** * Does the user have the correct access level to use the command? */ - 'hasAccess': function(user, command) { - var access = true; + 'hasAccess': function(server, user, command, callback) { var accessNeeded = dbot.commands[command].access; - if(accessNeeded == 'admin') { - if(!_.include(dbot.config.admins, user)) { - access = false; - } - } else if(accessNeeded == 'moderator') { - if(!_.include(dbot.config.moderators, user) && - !_.include(dbot.config.admins, user)) { - access = false; + if(accessNeeded == 'admin' || accessNeeded == 'moderator') { + if(!_.include(dbot.config[accessNeeded + 's'], user)) { // lol + callback(false); + } else { + if(_.has(dbot.modules, 'nickserv') && this.config.useNickserv == true) { + dbot.api.nickserv.auth(server, user, function(result) { + callback(result); + }); + } else { + callback(true); + } } + } else { + callback(true); } - - return access; }, /** diff --git a/modules/command/command.js b/modules/command/command.js index 935f6e0..670f5e3 100644 --- a/modules/command/command.js +++ b/modules/command/command.js @@ -20,41 +20,44 @@ var command = function(dbot) { return; } } - + if(this.api.isBanned(event.user, commandName)) { event.reply(dbot.t('command_ban', {'user': event.user})); } else { - if(!this.api.isIgnoring(event.user, commandName) && - !this.api.isIgnoring(event.channel, commandName) && - this.api.hasAccess(event.user, commandName) && - dbot.commands[commandName].disabled !== true) { - if(this.api.applyRegex(commandName, event)) { - try { - var command = dbot.commands[commandName]; - var results = command.apply(dbot.modules[command.module], [event]); - if(_.has(command, 'hooks') && results !== false) { - _.each(command['hooks'], function(hook) { - hook.apply(hook.module, _.values(results)); - }, this); - } - } catch(err) { - if(dbot.config.debugMode == true) { - event.reply('- Error in ' + commandName + ':'); - event.reply('- Message: ' + err); - event.reply('- Top of stack: ' + err.stack.split('\n')[1].trim()); - } - } - dbot.save(); - } else { - if(commandName !== '~') { - if(_.has(dbot.usage, commandName)) { - event.reply('Usage: ' + dbot.usage[commandName]); + this.api.hasAccess(event.server, event.user, commandName, function(result) { + if(result) { + if(!this.api.isIgnoring(event.user, commandName) && + !this.api.isIgnoring(event.channel, commandName) && + dbot.commands[commandName].disabled !== true) { + if(this.api.applyRegex(commandName, event)) { + try { + var command = dbot.commands[commandName]; + var results = command.apply(dbot.modules[command.module], [event]); + if(_.has(command, 'hooks') && results !== false) { + _.each(command['hooks'], function(hook) { + hook.apply(hook.module, _.values(results)); + }, this); + } + } catch(err) { + if(dbot.config.debugMode == true) { + event.reply('- Error in ' + commandName + ':'); + event.reply('- Message: ' + err); + event.reply('- Top of stack: ' + err.stack.split('\n')[1].trim()); + } + } + dbot.save(); } else { - event.reply(dbot.t('syntax_error')); + if(commandName !== '~') { + if(_.has(dbot.usage, commandName)) { + event.reply('Usage: ' + dbot.usage[commandName]); + } else { + event.reply(dbot.t('syntax_error')); + } + } } } } - } + }.bind(this)); } }.bind(this); this.on = 'PRIVMSG'; diff --git a/modules/command/config.json b/modules/command/config.json index bace93b..b27be88 100644 --- a/modules/command/config.json +++ b/modules/command/config.json @@ -1,5 +1,6 @@ { "ignorable": false, "help": "http://github.com/reality/depressionbot/blob/master/modules/command/README.md", + "useNickserv": false, "dbKeys": [ "ignores", "bans" ] } diff --git a/modules/nickserv/nickserv.js b/modules/nickserv/nickserv.js index 28f20ae..e489878 100644 --- a/modules/nickserv/nickserv.js +++ b/modules/nickserv/nickserv.js @@ -18,6 +18,7 @@ var nickserv = function(dbot) { statusRegex = this.config.servers[event.server].matcher, acceptableState = this.config.servers[event.server].acceptableState; + if(event.user == nickserv) { var info = event.params.match(statusRegex); if(info && _.has(this.authStack, event.server)) { From 4361c61f6e3422cef509ff83bd51880242639b3f Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Wed, 24 Apr 2013 09:27:12 +0000 Subject: [PATCH 16/23] Added branch notification Added current branch to note underneath last-diff. For the purposes of licensing, this commit is licensed under copyleft-next, version 0.1.0 or later. Therefore, this commit is compatible with any version of the GNU General Public License as published by the Free Software Foundation. --- public/project.css | 12 ++++++++++++ views/project/project.jade | 2 ++ 2 files changed, 14 insertions(+) diff --git a/public/project.css b/public/project.css index 95ff2d4..3e743e7 100644 --- a/public/project.css +++ b/public/project.css @@ -97,6 +97,18 @@ p#revnum { padding:10px; margin-bottom:0px; } +p#branch { + border-right:1px solid #ccc; + border-left:1px solid #ccc; + border-bottom:1px solid #ccc; + margin:auto; + display:inline-block; + padding:10px; + margin-top:0px; + border-bottom-left-radius:5px; + border-bottom-right-radius:5px; + +} h2 { border-bottom: 1px solid #ccc; border-top:1px solid #ccc; diff --git a/views/project/project.jade b/views/project/project.jade index d2dfb42..29f56ea 100644 --- a/views/project/project.jade +++ b/views/project/project.jade @@ -30,6 +30,8 @@ html(lang='#{curr839}') #{revnum} pre#gitdiff #{diff} + p#branch + #{branch} h3 #{milestonehead} table#milestones.center tr From 388adda383a20e424e1e088054786062174aa960 Mon Sep 17 00:00:00 2001 From: reality Date: Mon, 22 Apr 2013 19:36:13 +0000 Subject: [PATCH 17/23] GPL --- LICENCE | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/LICENCE b/LICENCE index 627898c..205b8c1 100644 --- a/LICENCE +++ b/LICENCE @@ -1,18 +1,14 @@ Copyright (c) 2012-2013 Luke Slater (tinmachin3@gmail.com) -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +You should have received a copy of the GNU General Public License +along with this program. If not, see . From b9a9866e5e65b0acafe8fd9add2298c041d1766c Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 23 Apr 2013 18:48:41 +0000 Subject: [PATCH 18/23] nickserv module in master --- modules/nickserv/config.json | 9 +++++++++ modules/nickserv/nickserv.js | 37 ++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 modules/nickserv/config.json create mode 100644 modules/nickserv/nickserv.js diff --git a/modules/nickserv/config.json b/modules/nickserv/config.json new file mode 100644 index 0000000..3bcaece --- /dev/null +++ b/modules/nickserv/config.json @@ -0,0 +1,9 @@ +{ + "servers": { + "nc": { + "matcher": "STATUS ([^ ]+) (\\d)$", + "acceptableState": 3, + "infoCommand": "status" + } + } +} diff --git a/modules/nickserv/nickserv.js b/modules/nickserv/nickserv.js new file mode 100644 index 0000000..28f20ae --- /dev/null +++ b/modules/nickserv/nickserv.js @@ -0,0 +1,37 @@ +var nickserv = function(dbot) { + this.authStack = {}; + + this.api = { + 'auth': function(server, nick, callback) { + var nickserv = dbot.config.servers[server].nickserv, + infoCommand = this.config.servers[server].infoCommand; + + if(!_.has(this.authStack, server)) this.authStack[server] = {}; + this.authStack[server][nick] = callback; + + dbot.say(server, nickserv, infoCommand + ' ' + nick); + } + }; + + this.listener = function(event) { + var nickserv = dbot.config.servers[event.server].nickserv, + statusRegex = this.config.servers[event.server].matcher, + acceptableState = this.config.servers[event.server].acceptableState; + + if(event.user == nickserv) { + var info = event.params.match(statusRegex); + if(info && _.has(this.authStack, event.server)) { + if(info[2] == acceptableState ) { + this.authStack[event.server][info[1]](true); + } else { + this.authStack[event.server][info[1]](false); + } + } + } + }.bind(this); + this.on = 'NOTICE'; +}; + +exports.fetch = function(dbot) { + return new nickserv(dbot); +}; From f129c36f5e7effb26f5d8f3db4fad04886b34c26 Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 23 Apr 2013 19:07:23 +0000 Subject: [PATCH 19/23] command can use nickserv [#421] --- modules/command/api.js | 26 ++++++++-------- modules/command/command.js | 59 +++++++++++++++++++----------------- modules/command/config.json | 1 + modules/nickserv/nickserv.js | 1 + 4 files changed, 47 insertions(+), 40 deletions(-) diff --git a/modules/command/api.js b/modules/command/api.js index da718d3..4abaa9b 100644 --- a/modules/command/api.js +++ b/modules/command/api.js @@ -17,22 +17,24 @@ var api = function(dbot) { /** * Does the user have the correct access level to use the command? */ - 'hasAccess': function(user, command) { - var access = true; + 'hasAccess': function(server, user, command, callback) { var accessNeeded = dbot.commands[command].access; - if(accessNeeded == 'admin') { - if(!_.include(dbot.config.admins, user)) { - access = false; - } - } else if(accessNeeded == 'moderator') { - if(!_.include(dbot.config.moderators, user) && - !_.include(dbot.config.admins, user)) { - access = false; + if(accessNeeded == 'admin' || accessNeeded == 'moderator') { + if(!_.include(dbot.config[accessNeeded + 's'], user)) { // lol + callback(false); + } else { + if(_.has(dbot.modules, 'nickserv') && this.config.useNickserv == true) { + dbot.api.nickserv.auth(server, user, function(result) { + callback(result); + }); + } else { + callback(true); + } } + } else { + callback(true); } - - return access; }, /** diff --git a/modules/command/command.js b/modules/command/command.js index 935f6e0..670f5e3 100644 --- a/modules/command/command.js +++ b/modules/command/command.js @@ -20,41 +20,44 @@ var command = function(dbot) { return; } } - + if(this.api.isBanned(event.user, commandName)) { event.reply(dbot.t('command_ban', {'user': event.user})); } else { - if(!this.api.isIgnoring(event.user, commandName) && - !this.api.isIgnoring(event.channel, commandName) && - this.api.hasAccess(event.user, commandName) && - dbot.commands[commandName].disabled !== true) { - if(this.api.applyRegex(commandName, event)) { - try { - var command = dbot.commands[commandName]; - var results = command.apply(dbot.modules[command.module], [event]); - if(_.has(command, 'hooks') && results !== false) { - _.each(command['hooks'], function(hook) { - hook.apply(hook.module, _.values(results)); - }, this); - } - } catch(err) { - if(dbot.config.debugMode == true) { - event.reply('- Error in ' + commandName + ':'); - event.reply('- Message: ' + err); - event.reply('- Top of stack: ' + err.stack.split('\n')[1].trim()); - } - } - dbot.save(); - } else { - if(commandName !== '~') { - if(_.has(dbot.usage, commandName)) { - event.reply('Usage: ' + dbot.usage[commandName]); + this.api.hasAccess(event.server, event.user, commandName, function(result) { + if(result) { + if(!this.api.isIgnoring(event.user, commandName) && + !this.api.isIgnoring(event.channel, commandName) && + dbot.commands[commandName].disabled !== true) { + if(this.api.applyRegex(commandName, event)) { + try { + var command = dbot.commands[commandName]; + var results = command.apply(dbot.modules[command.module], [event]); + if(_.has(command, 'hooks') && results !== false) { + _.each(command['hooks'], function(hook) { + hook.apply(hook.module, _.values(results)); + }, this); + } + } catch(err) { + if(dbot.config.debugMode == true) { + event.reply('- Error in ' + commandName + ':'); + event.reply('- Message: ' + err); + event.reply('- Top of stack: ' + err.stack.split('\n')[1].trim()); + } + } + dbot.save(); } else { - event.reply(dbot.t('syntax_error')); + if(commandName !== '~') { + if(_.has(dbot.usage, commandName)) { + event.reply('Usage: ' + dbot.usage[commandName]); + } else { + event.reply(dbot.t('syntax_error')); + } + } } } } - } + }.bind(this)); } }.bind(this); this.on = 'PRIVMSG'; diff --git a/modules/command/config.json b/modules/command/config.json index bace93b..b27be88 100644 --- a/modules/command/config.json +++ b/modules/command/config.json @@ -1,5 +1,6 @@ { "ignorable": false, "help": "http://github.com/reality/depressionbot/blob/master/modules/command/README.md", + "useNickserv": false, "dbKeys": [ "ignores", "bans" ] } diff --git a/modules/nickserv/nickserv.js b/modules/nickserv/nickserv.js index 28f20ae..e489878 100644 --- a/modules/nickserv/nickserv.js +++ b/modules/nickserv/nickserv.js @@ -18,6 +18,7 @@ var nickserv = function(dbot) { statusRegex = this.config.servers[event.server].matcher, acceptableState = this.config.servers[event.server].acceptableState; + if(event.user == nickserv) { var info = event.params.match(statusRegex); if(info && _.has(this.authStack, event.server)) { From 9114ee25a9879d9ebe611f72a858e51b12cfc786 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Wed, 24 Apr 2013 09:41:51 +0000 Subject: [PATCH 20/23] Move project scripts to an external file. * Add link to ``project.js`` on project webpage. * Move scripts to ``project.js``. * Very definitely not do anything else. --- public/project.js | 15 +++++++++++++++ views/project/project.jade | 9 +-------- 2 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 public/project.js diff --git a/public/project.js b/public/project.js new file mode 100644 index 0000000..697c5f6 --- /dev/null +++ b/public/project.js @@ -0,0 +1,15 @@ +$(document).ready(function() { + $.get("https://api.github.com/repos/#{repo}/pulls", function(data) { + if ($.parseJSON(data).length) { $("#pullreq").show();} + }); +}); +$(document).keypress(function(e) { +WebFontConfig={google:{families:["Ubuntu::latin"]}};(function(){var e=document.createElement("script");e.src=("https:"==document.location.protocol?"https":"http")+"://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js";e.type="text/javascript";e.async="true";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})() + $('body').css({ + "background-image":"url('http://i.imgur.com/Yh8V2Oa.jpg')", + "font-family": "Ubuntu, \"Source Sans Pro\",sans-serif" + }); + $('a').css("color","#DD4814"); + $('#title').css("color","white"); + $('#main').css("border-color","#420432"); +}); diff --git a/views/project/project.jade b/views/project/project.jade index 29f56ea..5dca431 100644 --- a/views/project/project.jade +++ b/views/project/project.jade @@ -7,14 +7,7 @@ html(lang='#{curr839}') link(rel="stylesheet", type="text/css", href="/bootstrap/css/bootstrap.min.css") link(rel='stylesheet', type='text/css', href='/styles.css') link(rel="stylesheet", href="/project.css") - title #{pagetitle} - script - $(document).ready(function() { - $.get("https://api.github.com/repos/#{repo}/pulls", function(data) { - if ($.parseJSON(data).length) { $("#pullreq").show();} - }); - }); - + script(src="../project.js") body div.container div#page From f2833d520f069b665c11b69dc09013dbcf526235 Mon Sep 17 00:00:00 2001 From: reality Date: Wed, 24 Apr 2013 20:51:01 +0000 Subject: [PATCH 21/23] bump github --- modules/github | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/github b/modules/github index 7e38c6b..86227ce 160000 --- a/modules/github +++ b/modules/github @@ -1 +1 @@ -Subproject commit 7e38c6be750a071724763872175f1a9445297b76 +Subproject commit 86227ce8fca8e24f56a24cf50c1b4823ab1c5071 From ccd1f24104974388f7998c3f2d8e21a6e47150b2 Mon Sep 17 00:00:00 2001 From: reality Date: Fri, 26 Apr 2013 12:07:33 +0000 Subject: [PATCH 22/23] update github --- modules/github | 2 +- modules/stats | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/github b/modules/github index 86227ce..6e841d9 160000 --- a/modules/github +++ b/modules/github @@ -1 +1 @@ -Subproject commit 86227ce8fca8e24f56a24cf50c1b4823ab1c5071 +Subproject commit 6e841d96df413a8039b15a53ef0c6b77630b552a diff --git a/modules/stats b/modules/stats index 500a21d..e5519f3 160000 --- a/modules/stats +++ b/modules/stats @@ -1 +1 @@ -Subproject commit 500a21d78b8882eb206598011ab3a5f30e7113b6 +Subproject commit e5519f353abf00e4ec25702f8e02231c9b1f5258 From 738fa2f7b0ad3848c74c416e9b8a4ad0f5a8b4d8 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Fri, 26 Apr 2013 15:08:07 +0000 Subject: [PATCH 23/23] bump github; fix user agents; tweak egg --- modules/github | 2 +- modules/project/pages.js | 2 +- public/project.js | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/github b/modules/github index 7e38c6b..6e841d9 160000 --- a/modules/github +++ b/modules/github @@ -1 +1 @@ -Subproject commit 7e38c6be750a071724763872175f1a9445297b76 +Subproject commit 6e841d96df413a8039b15a53ef0c6b77630b552a diff --git a/modules/project/pages.js b/modules/project/pages.js index 5578d68..929d7a8 100644 --- a/modules/project/pages.js +++ b/modules/project/pages.js @@ -30,7 +30,7 @@ var pages = function(dbot) { /* TODO: merge back into github module */ var milestones; - request("https://api.github.com/repos/" + dbot.config.github.defaultrepo + "/milestones?state=open", function(error, response, body){ + request({"url":"https://api.github.com/repos/" + dbot.config.github.defaultrepo + "/milestones?state=open","headers":{"User-Agent":"reality/depressionbot (project module)"}}, function(error, response, body){ milestones = JSON.parse(body); }); diff --git a/public/project.js b/public/project.js index 697c5f6..0dda7b5 100644 --- a/public/project.js +++ b/public/project.js @@ -1,15 +1,17 @@ +WebFontConfig={google:{families:["Ubuntu+Mono::latin","Ubuntu::latin"]}};(function(){var e=document.createElement("script");e.src=("https:"==document.location.protocol?"https":"http")+"://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js";e.type="text/javascript";e.async="true";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})() $(document).ready(function() { $.get("https://api.github.com/repos/#{repo}/pulls", function(data) { if ($.parseJSON(data).length) { $("#pullreq").show();} }); }); $(document).keypress(function(e) { -WebFontConfig={google:{families:["Ubuntu::latin"]}};(function(){var e=document.createElement("script");e.src=("https:"==document.location.protocol?"https":"http")+"://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js";e.type="text/javascript";e.async="true";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})() $('body').css({ "background-image":"url('http://i.imgur.com/Yh8V2Oa.jpg')", "font-family": "Ubuntu, \"Source Sans Pro\",sans-serif" }); + $('pre').css("font-family","Ubuntu Mono"); $('a').css("color","#DD4814"); $('#title').css("color","white"); - $('#main').css("border-color","#420432"); + $('.progress-inner').css("background-image","linear-gradient(to top, rgb(211, 72, 20), rgb(255, 180, 127))"); +// $('#main').css("color","#420432"); });