Permalink
Browse files

Moving demos to the gh-pages branch.

  • Loading branch information...
1 parent 732b931 commit 10cb5ac8f03ef929aeebdd6558848e4dc4f7d133 Micky Hulse committed Dec 24, 2012
Showing with 21 additions and 1,133 deletions.
  1. +8 −0 CHANGELOG.md
  2. +13 −10 README.md
  3. +0 −38 demo/demo.css
  4. +0 −86 demo/demo.js
  5. +0 −37 demo/index.html
  6. +0 −503 demo/plugins/normalize.css
  7. +0 −99 demo/plugins/onmediaquery.css
  8. +0 −354 demo/plugins/onmediaquery.js
  9. +0 −6 demo/plugins/respond.min.js
View
@@ -1,5 +1,13 @@
# Changelog
+## v2.0.0
+#### December 23, 2012
+
+* Moved v1.x.x code to `defunct` repository.
+* First release of v2.x.x to Github.
+
+---
+
## vX.X.X
#### Mmmmm [D]D, YYYY
View
@@ -1,25 +1,28 @@
# Responsive ads, on _demand_!
-### Responsive serving of [OpenX](http://www.openx.com) ads based on viewport size!
+### Responsive serving of ads based on viewport size!
---
-#### STATE OF THE REPO
+#### SIMPLE DEMO
-We've had a bumpy road to get where we're at today (to say the least).
+Scan with phone and/or click to view the [latest demo](http://registerguard.github.com/ads-on-demand/demo/):
-My (Micky's) initial testing can be found in this "[**failed**](https://github.com/registerguard/ads-on-demand/tree/failed)" branch, which "faild" for two primary reasons:
+[![qr code](http://chart.apis.google.com/chart?cht=qr&chl=https://github.com/registerguard/ads-on-demand&chs=240x240)](http://registerguard.github.com/ads-on-demand/demo/)
-1. [Horrible ad javascript and markup](https://groups.google.com/d/topic/writecapturejs-users/636Ez8YniPQ/discussion) coming from 3rd parties.
-2. OpenX's code base is a moving target (from what we experienced, OpenX changes their code base every month or two).
+**Note:** Our demo serves ads using [OpenX Enterprise-level ad serving solutions for publishers](http://www.openx.com/publisher/enterprise-ad-server); this repo's concepts and techniques should be easy to adapt to other ad serving software.
-...
+---
+
+#### v1.x.x BRANCH
+
+Many hours of work can be found via the [**defunct**](https://github.com/registerguard/ads-on-demand/tree/defunct) branch, which we abandoned for two primary reasons:
-More details coming soon.
+##### 1. Seriously crappy, third party, HTML and/or javascript!
-
+The crap HTML and/or javascript was a huge problem for when it came to using [writeCapture](https://github.com/iamnoah/writeCapture) or [PostScribe](https://github.com/krux/postscribe/) plugins (example here).
-We've found a working solution! Code to be posted in the next few days.
+##### 2. The moving target that is OpenX's code base!
---
View
@@ -1,38 +0,0 @@
-/**
- * Boilerplate ad styles.
- */
-
-.advert {
- text-align: center; /* Oldschool centering technique. */
- position: relative; /* Just in case ad decides to `position: absolute;` without a `position: relative;` parent. */
- margin: .75em auto; /* Putting `auto` here to assist `.advert`s that have a width. */
-}
- .advert * {
- /* http://meyerweb.com/eric/tools/css/reset/ */
- font-size: 100%;
- font: inherit;
- border: 0;
- margin: 0 auto;
- padding: 0;
- outline: 0;
- }
- .advert img {
- /* Responsive images: */
- width: auto;
- height: auto;
- max-width: 100%;
- max-height: 100%;
- -ms-interpolation-mode: bicubic;
- }
-
-/*--------------------------------------------------------------------*/
-
-/**
- * Show/hide ads.
- */
-
-.leaderboard_728 { display: none; }
-@media only screen and (min-width: 1005px) {
- .leaderboard_320 { display: none; }
- .leaderboard_728 { display: block; }
-}
View
@@ -1,86 +0,0 @@
-/**
- * Super basic Ads on Demand example.
- * You'd want to write your own javascript and/or convert the below to something more OOP.
- *
- * @see https://github.com/registerguard/ads-on-demand
- * @see https://github.com/registerguard/js-media-queries
- */
-
-//--------------------------------------------------------------------
-
-/**
- * Builds and returns our `<iframe>` html.
- *
- * @param auid { integer } Ad unit ID.
- * @param width { integer } Width of `<iframe>`.
- * @param height { integer } Height of `<iframe>`.
- */
-
-function make_iframe(auid, width, height) {
-
- return '<iframe src="http://ox-d.registerguard.com/w/1.0/afr?auid=' + auid + '&cb=' + (Math.random() * 10000000000000000) + '"' + 'frameBorder="0" frameSpacing="0" scrolling="no" width="' + width + '" height="' + height + '"><\/iframe>';
-
-}
-
-//--------------------------------------------------------------------
-
-// Simple `onload` checking:
-window.onload = function() {
-
- // Used to count query media query matches:
- flag = 1,
-
- // The `onmediaquery` setup:
- queries = [
-
- // Mobile:
-
- {
-
- context : ['alpha', 'bravo'],
- call_for_each_context : false,
- match : function() {
-
- // Using `flag` to avoid loading ads more than once:
- if (flag <= 2) {
-
- // Inject `<iframe>` into DOM:
- document.getElementById('leaderboard_320').innerHTML = make_iframe(314042, 320, 50);
-
- // Up the flag count:
- flag++;
-
- }
-
- }
-
- },
-
- // Desktop:
-
- {
-
- context : ['charlie', 'delta'],
- call_for_each_context : false,
- match : function() {
-
- if (flag <= 2) {
-
- document.getElementById('leaderboard_728').innerHTML = make_iframe(314041, 728, 90);
-
- flag++;
-
- }
-
- }
-
- }
-
- ];
-
- //--------------------------------------------------------------------
-
- // Initialize the `onmediaquery` plugin:
- oMQ.init(queries);
-
-};
View
@@ -1,37 +0,0 @@
-<!doctype html>
-<html>
-
-<head>
-
- <meta charset="utf-8">
-
- <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
-
- <title>Ads on Demand</title>
-
- <meta name="description" content="">
- <meta name="keywords" content="">
-
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <meta name="apple-mobile-web-app-capable" content="yes">
-
- <link rel="stylesheet" href="plugins/normalize.css">
- <link rel="stylesheet" href="plugins/onmediaquery.css">
- <link rel="stylesheet" href="demo.css">
-
- <!--[if (lt IE 9) & (!IEMobile)]>
- <script src="plugins/respond.min.js"></script>
- <![endif]-->
-
-</head>
-<body>
-
- <div id="leaderboard_728" class="advert leaderboard_728"></div>
-
- <div id="leaderboard_320" class="advert leaderboard_320"></div>
-
- <script src="plugins/onmediaquery.js"></script>
- <script src="demo.js"></script>
-
-</body>
-</html>
Oops, something went wrong.

0 comments on commit 10cb5ac

Please sign in to comment.