Skip to content

Commit

Permalink
Bug #1, add package.json; move Javascript to separate file [iet:101…
Browse files Browse the repository at this point in the history
…16746]
  • Loading branch information
nfreear committed Sep 28, 2017
1 parent 13d6b9b commit 2a990c3
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 29 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#.gitignore for headstar_web

*email.*

oembed.*

node_modules/
Expand Down
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ before_install:

install:
- make install
- make npm-install
- npm install
#- make npm-install

script: grunt

Expand Down
Binary file added eab/images/EAB-logo-small-trans.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions eab/includes/scripts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*!
Headstar Javascripts | © 2015-2017 Nick Freear.
*/

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-7941798-1']);
_gaq.push(['_trackPageview']);

(function(document) {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = 'https://www.google-analytics.com/ga.js'; // ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})(window.document);

(function (W, D) {

var page = W.location.pathname.replace(/.+\//, '').replace(/\..+/, ''),
el = D.querySelector("#foot .y"),
year = 1900 + (new Date()).getYear();

el.innerHTML = year;
D.body.className += " pg-" + page;

if (W.location.href.match(/[&\?]embed=(1|true)/)) {
D.body.className += " pg-embed";
}

})(window, window.document);
32 changes: 4 additions & 28 deletions eab_base/__E-ACCESS__.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
<link rel="stylesheet" media="all" href="includes/noscript.css" />
<link rel="alternate stylesheet" media="screen" href="includes/textonly.css" title="Text" />
<link rel="alternate stylesheet" media="screen" href="includes/graphic.css" title="Graphic" />
<script src="includes/styleswitcher.js"></script>

<link rel="home" href="./" />
<link rel="help" href="site.html#help" />
Expand Down Expand Up @@ -101,31 +100,8 @@ <h2 class="accesshide" id="nav-lbl"><a class="Bookmark">Site Menu</a></h2>
<p id="totop"><a href="#top" title="Goto top of page">To the top.</a></p>

</div><!--id="Body"-->
<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-7941798-1']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script>
(function (W, D) {

var page = W.location.pathname.replace(/.+\//, '').replace(/\..+/, ''),
el = D.querySelector("#foot .y"),
year = 1900 + (new Date()).getYear();

el.innerHTML = year;
D.body.className += " pg-" + page;

if (W.location.href.match(/[&\?]embed=(1|true)/)) {
D.body.className += " pg-embed";
}

})(window, window.document);
</script>

<script src="includes/scripts.js" data-analytics-id="UA-7941798-1"></script>
<script src="includes/styleswitcher.js"></script>

</html>
32 changes: 32 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"private": true,
"name": "headstar-web",
"version": "1.0.0",
"description": "E-Access Bulletin | Copyright © 2000-2017 Headstar Limited. All rights reserved.",
"main": "Gruntfile.js",
"dependencies": { },
"devDependencies": {
"grunt": "^1.0.1",
"grunt-contrib-jshint": "^1.0.0",
"grunt-contrib-validate-xml": "^0.0.1",
"grunt-exec": "^1.0.1",
"grunt-htmlhint": "^0.9.13",
"grunt-notify": "^0.4.5"
},
"scripts": {
"test": "grunt"
},
"repository": {
"type": "git",
"url": "git+https://github.com/nfreear/headstar-web.git"
},
"keywords": [
"accessibility", "bulletin"
],
"author": "Nick Freear (@nfreear)",
"license": "UNLICENSED",
"bugs": {
"url": "https://github.com/nfreear/headstar-web/issues"
},
"homepage": "http://headstar.com/eab/"
}

0 comments on commit 2a990c3

Please sign in to comment.