From 9114ee25a9879d9ebe611f72a858e51b12cfc786 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Wed, 24 Apr 2013 09:41:51 +0000 Subject: [PATCH] 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