...
 
Commits (5)
zh* zh*
LICENSE* LICENSE*
bin/*.js
*.html *.html
!test/index.html !test/index.html
*.min.js *.min.js*
*.sa.js *.js.map
#data/*.json
src/*.json
*copy* *copy*
*.php *.php
src/*
!src/widget-src.js
x_legacy/ x_legacy/
node_modules/ node_modules/
*.log *.log
*.diff
composer.* composer.*
vendor/ vendor/
*.js.map
*BAK* *BAK*
*.js i18n-texts.js
widget-run.js
[![Build status — Travis-CI][travis-icon]][travis] [![Build status — Travis-CI][travis-icon]][travis]
[![GAAD-widget on Npmjs][npm-icon]][npm]
[![js-semistandard-style][semi-icon]][semi] [![js-semistandard-style][semi-icon]][semi]
...@@ -13,7 +14,7 @@ The banner displays for a configurable period before and after the day. ...@@ -13,7 +14,7 @@ The banner displays for a configurable period before and after the day.
> The purpose of GAAD is to get everyone talking, thinking and learning about digital > The purpose of GAAD is to get everyone talking, thinking and learning about digital
> (web, software, mobile, etc.) access/inclusion and people with different disabilities. > (web, software, mobile, etc.) access/inclusion and people with different disabilities.
Built on [Datejs][]. [Blog post][blog]. Built on [Datejs][].
Note ~ this is not an official widget! Note ~ this is not an official widget!
...@@ -58,7 +59,15 @@ npm test ...@@ -58,7 +59,15 @@ npm test
## Usage ## Usage
Via [RawGit][] - production / CDN: Via [unpkg][] - production CDN:
```html
<div id="id-gaad"></div>
<script src="https://unpkg.com/gaad-widget@2.2.0-beta/build/GAAD.widget.js"></script>
```
Via [RawGit][] - production CDN:
```html ```html
<div id="id-gaad"></div> <div id="id-gaad"></div>
...@@ -105,6 +114,10 @@ Français (French): ...@@ -105,6 +114,10 @@ Français (French):
<script src="build/GAAD.widget.js" data-gaad='{ "lang": "fr" }' ></script> <script src="build/GAAD.widget.js" data-gaad='{ "lang": "fr" }' ></script>
``` ```
## WordPress
A [plugin for WordPress][wp].
## License ## License
License: [MIT][]. License: [MIT][].
...@@ -112,6 +125,7 @@ License: [MIT][]. ...@@ -112,6 +125,7 @@ License: [MIT][].
Twitter: [@nfreear][], [@gbla11yday][]. Twitter: [@nfreear][], [@gbla11yday][].
[blog]: http://nick.freear.org.uk/2017/05/14/gaad-widget.html
[GAAD]: http://globalaccessibilityawarenessday.org/?utm_source=github&utm_campaign=gaad-widget [GAAD]: http://globalaccessibilityawarenessday.org/?utm_source=github&utm_campaign=gaad-widget
[@gbla11yday]: https://twitter.com/gbla11yday [@gbla11yday]: https://twitter.com/gbla11yday
[@nfreear]: https://twitter.com/nfreear [@nfreear]: https://twitter.com/nfreear
...@@ -124,13 +138,17 @@ Twitter: [@nfreear][], [@gbla11yday][]. ...@@ -124,13 +138,17 @@ Twitter: [@nfreear][], [@gbla11yday][].
[b/a]: https://github.com/nfreear/gaad-widget/issues/5 "Bug #5, Separate before and after messages (v 2.x)" [b/a]: https://github.com/nfreear/gaad-widget/issues/5 "Bug #5, Separate before and after messages (v 2.x)"
[ie]: https://github.com/nfreear/gaad-widget/issues/3#!-MSIE-9-11 "Bug #3, Browser compatibility" [ie]: https://github.com/nfreear/gaad-widget/issues/3#!-MSIE-9-11 "Bug #3, Browser compatibility"
[gist]: https://gist.github.com/nfreear/eef4be96147cb5c1182cbc9e595f2833 [gist]: https://gist.github.com/nfreear/eef4be96147cb5c1182cbc9e595f2833
[wp]: https://gist.github.com/nfreear/e5520adbb930e537ef5fe2e0aab231d1 "WordPress plugin (PHP)"
[Datejs]: https://github.com/datejs/Datejs [Datejs]: https://github.com/datejs/Datejs
[RawGit]: https://rawgit.com/ [RawGit]: https://rawgit.com/
"Serves Git files with the correct mime-type; content delivery network (CDN)" "RawGit serves Git files with the correct mime-type; a content delivery network (CDN)"
[MIT]: https://nfreear.mit-license.org/2017#!-gaad-widget "MIT License" [unpkg]: https://unpkg.com/ "unpkg is a fast content delivery network for everything on npm"
[MIT]: https://nfreear.mit-license.org/2017#!-gaad-widget "MIT License | © Nick Freear 2017-04-27"
[travis]: https://travis-ci.org/nfreear/gaad-widget [travis]: https://travis-ci.org/nfreear/gaad-widget
[travis-icon]: https://api.travis-ci.org/nfreear/gaad-widget.svg [travis-icon]: https://api.travis-ci.org/nfreear/gaad-widget.svg
"Build status – Travis-CI (NPM/eslint)" "Build status – Travis-CI (NPM/eslint)"
[semi]: https://github.com/Flet/semistandard [semi]: https://github.com/Flet/semistandard
[semi-icon]: https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg?style=flat-square [semi-icon]: https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg?style=flat-square
"Javascript coding style — 'semistandard'" "Javascript coding style — 'semistandard'"
[npm]: https://npmjs.com/package/gaad-widget
[npm-icon]: https://img.shields.io/npm/v/gaad-widget
{ {
"//": "License: MIT. The data is provided \"as is\". I accept no responsibility for the accuracy or otherwise of the data, or any losses arising.", "//": "License: MIT. The data is provided \"as is\". I accept no responsibility for the accuracy or otherwise of the data, or any losses arising.",
"timestamp": "2017-05-21 10:29:48Z", "timestamp": "2017-06-04 15:10:12Z",
"texts": { "texts": {
"en": { "en": {
"name": "Global Accessibility Awareness Day (GAAD)", "name": "Global Accessibility Awareness Day (GAAD)",
"before": "Join us on Thursday May {d}{th}, {y} and mark the {x}th <a {at}>{g}</a>{g}</a>.", "before": "Join us on Thursday May {d}{th}, {y} and mark the {x}th <a {at}>{g}</a>.",
"after": "Put next year's <a {at}>{g}</a>{g}</a>, Thursday May {d}{th}, {y}, in your diary. See you then!", "after": "Put next year's <a {at}>{g}</a>, Thursday May {d}{th}, {y}, in your diary. See you then!",
"url": "http://globalaccessibilityawarenessday.org" "url": "http://globalaccessibilityawarenessday.org"
}, },
"fr": { "fr": {
......
...@@ -15,6 +15,6 @@ Usage: ...@@ -15,6 +15,6 @@ Usage:
iframe.gaad-widget-ifr { width: 100%; height: 4.2em; border: none; } iframe.gaad-widget-ifr { width: 100%; height: 4.2em; border: none; }
</style> </style>
<iframe src="https://cdn.rawgit.com/nfreear/gaad-widget/2.0-beta/embed/" class="gaad-widget-ifr"></iframe> <iframe src="https://cdn.rawgit.com/nfreear/gaad-widget/2.2-beta/embed/" class="gaad-widget-ifr"></iframe>
--> -->
{ {
"name": "Global Accessibility Awareness Day (GAAD)", "name": "Global Accessibility Awareness Day (GAAD)",
"before": "Join us on Thursday May {d}{th}, {y} and mark the {x}th <a {at}>{g}</a>{g}</a>.", "before": "Join us on Thursday May {d}{th}, {y} and mark the {x}th <a {at}>{g}</a>.",
"after": "Put next year's <a {at}>{g}</a>{g}</a>, Thursday May {d}{th}, {y}, in your diary. See you then!", "after": "Put next year's <a {at}>{g}</a>, Thursday May {d}{th}, {y}, in your diary. See you then!",
"url": "http://globalaccessibilityawarenessday.org" "url": "http://globalaccessibilityawarenessday.org"
} }
{ {
"name": "gaad-widget", "name": "gaad-widget",
"version": "2.1.0-beta", "version": "2.2.0-beta",
"description": "Display a banner-link to promote Global Accessibility Awareness Day (GAAD). Display the banner for a period before and after the day.", "description": "Display a banner-link to promote Global Accessibility Awareness Day (GAAD). Display the banner for a period before and after the day.",
"author": "Nick Freear {@nfreear}",
"license": "MIT", "license": "MIT",
"repository": { "browser": "build/GAAD.widget.js",
"type": "git", "keywords": [ "accessibility", "a11y", "browser-widget", "date", "datejs", "icalendar", "event", "day", "international", "GAAD" ],
"url": "https://github.com/nfreear/gaad-widget" "author": "Nick Freear {@nfreear}",
}, "repository": "https://github.com/nfreear/gaad-widget",
"bugs": "https://github.com/nfreear/gaad-widget/issues",
"homepage": "http://nick.freear.org.uk/2017/05/14/gaad-widget.html?utm_source=npm",
"dependencies": { "dependencies": {
"datejs": "^1.0.0-rc3", "datejs": "^1.0.0-rc3",
"icalendar": "^0.7.1" "icalendar": "^0.7.1"
}, },
"devDependencies": { "devDependencies": {
"csslint": "^1.0.5", "csslint": "^1.0.5",
"jsonlint": "^1.6.2",
"nice-package": "^3.0.3",
"revalidator": "^0.3.1",
"semistandard": "^11.0.0", "semistandard": "^11.0.0",
"uglify-js": "^2.8.26" "uglify-js": "^2.8.26"
}, },
...@@ -25,10 +29,11 @@ ...@@ -25,10 +29,11 @@
}, },
"scripts": { "scripts": {
"install-legacy-datejs": "mkdir x_legacy; npm i --prefix x_legacy https://github.com/datejs/Datejs#8164739566", "install-legacy-datejs": "mkdir x_legacy; npm i --prefix x_legacy https://github.com/datejs/Datejs#8164739566",
"build": "node_modules/.bin/uglifyjs src/c*.js x_legacy/node_modules/Datejs/build/date.js src/w*.js --comments=/^[!*]/ -bo build/GAAD.widget.js", "build": "uglifyjs src/c*.js x_legacy/node_modules/Datejs/build/date.js src/w*c.js --comments=/^[!*]/ -bo build/GAAD.widget.js",
"x-build-sa": "node_modules/.bin/uglifyjs src/c*.js node_modules/superagent/superagent.js src/w*.js --comments=/^[!*]/ -bo build/GAAD.sa.js", "x-build-sa": "uglifyjs src/c*.js node_modules/superagent/superagent.js src/w*.js --comments=/^[!*]/ -bo build/GAAD.sa.js",
"build-min": "node_modules/.bin/uglifyjs build/*.widget.js --comments=/^[!*]/ -mco build/GAAD.widget.min.js", "build-min": "uglifyjs build/*.widget.js --comments=/^[!*]/ -mco build/GAAD.widget.min.js",
"test": "node_modules/.bin/semistandard; node_modules/.bin/csslint style" "test": "semistandard && csslint style && jsonlint -q **/*.json",
"x-test": "npm test && node bin/nice.js && node bin/lintl.js"
}, },
"semistandard": { "semistandard": {
"ignore": "build/" "ignore": "build/"
......
/*! /*!
GAAD.widget.js | ©2017 Nick Freear | License: MIT | This is not an official widget! GAAD.widget.js | ©2017 Nick Freear | License: MIT | NOT an official widget!
https://github.com/nfreear/gaad-widget https://github.com/nfreear/gaad-widget
http://globalaccessibilityawarenessday.org/ http://globalaccessibilityawarenessday.org
*/ */
/*! /*!
GAAD.widget.js | ©Nick Freear 2017-04-27 | License: MIT. GAAD.widget.js | ©Nick Freear 2017-04-27 | License: MIT.
https://github.com/nfreear/gaad-widget
*/ */
(function (W, D, location, console, Date) { (function (W, D, location, console, Date) {
...@@ -18,7 +16,7 @@ ...@@ -18,7 +16,7 @@
var defaults = { var defaults = {
id: 'id-gaad', id: 'id-gaad',
script: 'GAAD.widget.', // .js OR .min.js; script: 'GAAD.widget.', // '.js' OR '.min.js';
lang: 'en', lang: 'en',
dir: 'ltr', dir: 'ltr',
texts: { texts: {
...@@ -157,10 +155,6 @@ ...@@ -157,10 +155,6 @@
styleEl.type = 'text/css'; styleEl.type = 'text/css';
styleEl.href = url; styleEl.href = url;
/* var styleEl = D.createElement('style');
styleEl.id = gaad.id + '-css';
styleEl.innerText = gaad.css.join('\n'); */
D.head.appendChild(styleEl); D.head.appendChild(styleEl);
} }
})(window, window.document, window.location, window.console, window.Date); })(window, window.document, window.location, window.console, window.Date);
...@@ -7,9 +7,6 @@ ...@@ -7,9 +7,6 @@
<div id="id-gaad"></div> <div id="id-gaad"></div>
<script data-CDN-src="https://cdn.rawgit.com/nfreear/gaad-widget/2.0-beta/build/GAAD.widget.js"></script>
<script src="../build/GAAD.widget.js" data-gaad='{ "debug": true, "X-lang": "fr", "X-theme": "black" }'></script> <script src="../build/GAAD.widget.js" data-gaad='{ "debug": true, "X-lang": "fr", "X-theme": "black" }'></script>
...@@ -20,6 +17,6 @@ ...@@ -20,6 +17,6 @@
GAAD.widget.js | © 2017 Nick Freear | License: MIT. GAAD.widget.js | © 2017 Nick Freear | License: MIT.
* https://github.com/nfreear/gaad-widget * https://github.com/nfreear/gaad-widget
* http://www.globalaccessibilityawarenessday.org * http://globalaccessibilityawarenessday.org
</pre> </pre>