├── .gitignore ├── README.md ├── htdocs-desktop-boilerplate └── .gitignore ├── htdocs-desktop-demoSite └── .gitignore ├── htdocs-mobile-boilerplate ├── _data │ └── .gitignore ├── _mock │ └── .gitignore ├── _moresnipets.html ├── _template │ └── .gitignore ├── _test │ ├── index.html │ ├── qunit │ │ ├── qunit.css │ │ └── qunit.js │ └── tests.js ├── common │ ├── css │ │ └── style.css │ ├── img │ │ ├── _dummy │ │ │ ├── 1.png │ │ │ └── grid.png │ │ ├── arrows │ │ │ └── .gitignore │ │ ├── buttons │ │ │ └── .gitignore │ │ ├── icons │ │ │ └── .gitignore │ │ └── misc │ │ │ └── .gitignore │ └── js │ │ ├── common.js │ │ ├── libs │ │ ├── jquery-1.5.2.js │ │ ├── jquery-1.5.2.min.js │ │ ├── mbp.js │ │ └── modernizr-custom.js │ │ └── mylibs │ │ ├── example1.js │ │ ├── example2.js │ │ └── example3.js ├── crossdomain.xml ├── favicon.ico ├── img │ ├── h │ │ ├── apple-touch-icon.png │ │ └── splash.png │ ├── l │ │ ├── apple-touch-icon-precomposed.png │ │ ├── apple-touch-icon.png │ │ └── splash.png │ └── m │ │ └── apple-touch-icon.png ├── index.html └── robots.txt └── htdocs-mobile-demoSite ├── .gitignore ├── _template ├── .gitignore └── modules.html ├── _test ├── index.html ├── qunit │ ├── qunit.css │ └── qunit.js └── tests.js ├── common ├── css │ └── style.css ├── img │ ├── _dummy │ │ ├── 1.png │ │ └── grid.png │ ├── arrows │ │ └── .gitignore │ ├── buttons │ │ └── .gitignore │ ├── icons │ │ └── .gitignore │ ├── misc │ │ └── .gitignore │ └── mod-mainvisual │ │ └── peco.jpg └── js │ ├── common.js │ ├── libs │ ├── jquery-1.5.2.js │ ├── jquery-1.5.2.min.js │ ├── mbp.js │ └── modernizr-custom.js │ └── mylibs │ └── jquery.tinyscroller.js ├── favicon.ico ├── img ├── h │ ├── apple-touch-icon.png │ └── splash.png ├── l │ ├── apple-touch-icon-precomposed.png │ ├── apple-touch-icon.png │ └── splash.png └── m │ └── apple-touch-icon.png ├── index.html └── robots.txt /.gitignore: -------------------------------------------------------------------------------- 1 | # Numerous always-ignore extensions 2 | *.diff 3 | *.err 4 | *.orig 5 | *.log 6 | *.rej 7 | *.swo 8 | *.swp 9 | *.vi 10 | *~ 11 | 12 | # OS or Editor folders 13 | .DS_Store 14 | .cache 15 | .project 16 | .settings 17 | nbproject 18 | thumbs.db 19 | 20 | # Dreamweaver added files 21 | _notes 22 | dwsync.xml 23 | 24 | # Komodo 25 | *.komodoproject 26 | .komodotools 27 | 28 | # Folders to ignore 29 | .hg 30 | .svn 31 | publish 32 | .idea 33 | 34 | # build script local files 35 | build/buildinfo.properties 36 | build/config/buildinfo.properties 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # pxg html boilerplate 2 | 3 | htmlテンプレート&ガイドライン。 4 | もうチョイ突っ込んだboilerplateを目指す。 5 | 後よく使うライブラリ等まとめたりなど、実務で使うことを想定。 6 | http://html5boilerplate.com/ 7 | http://html5boilerplate.com/mobile/ 8 | 9 | ## デモ 10 | 11 | モバイル版デモサイト (/htdocs-mobile-demoSite) 12 | http://bp-mobile.pxgrid.net/ 13 | http://bp-mobile.pxgrid.net/_template/modules.html 14 | 15 | デスクトップ版デモサイト (/htdocs-mobile-demoSite) 16 | 未 17 | 18 | ## ライセンス: 19 | 20 | ### コンポーネント: 21 | 22 | respond.js: Public Domain 23 | Bookmark bubble library: Apache License, Version 2.0 24 | Web Storage Portability Layer: Apache License, Version 2.0 25 | Modernizr: MIT/BSD license 26 | jQuery: MIT/GPL license 27 | HTML5Doctor CSS reset: Creative Commons 3.0 28 | CSS Reset Reloaded: Public Domain 29 | 30 | ### その他全部: 31 | 32 | The Unlicense (aka: public domain) 33 | -------------------------------------------------------------------------------- /htdocs-desktop-boilerplate/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-desktop-boilerplate/.gitignore -------------------------------------------------------------------------------- /htdocs-desktop-demoSite/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-desktop-demoSite/.gitignore -------------------------------------------------------------------------------- /htdocs-mobile-boilerplate/_data/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-boilerplate/_data/.gitignore -------------------------------------------------------------------------------- /htdocs-mobile-boilerplate/_mock/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-boilerplate/_mock/.gitignore -------------------------------------------------------------------------------- /htdocs-mobile-boilerplate/_moresnipets.html: -------------------------------------------------------------------------------- 1 |  2 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /htdocs-mobile-boilerplate/_template/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-boilerplate/_template/.gitignore -------------------------------------------------------------------------------- /htdocs-mobile-boilerplate/_test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | QUnit Tests 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

QUnit Test Suite

15 |

16 |
17 |

18 |
    19 |
    test markup
    20 | 21 | 22 | -------------------------------------------------------------------------------- /htdocs-mobile-boilerplate/_test/qunit/qunit.css: -------------------------------------------------------------------------------- 1 | /** Font Family and Sizes */ 2 | 3 | #qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult { 4 | font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial; 5 | } 6 | 7 | #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; } 8 | #qunit-tests { font-size: smaller; } 9 | 10 | 11 | /** Resets */ 12 | 13 | #qunit-tests, #qunit-tests li ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult { 14 | margin: 0; 15 | padding: 0; 16 | } 17 | 18 | 19 | /** Header */ 20 | 21 | #qunit-header { 22 | padding: 0.5em 0 0.5em 1em; 23 | 24 | color: #fff; 25 | text-shadow: rgba(0, 0, 0, 0.5) 4px 4px 1px; 26 | background-color: #0d3349; 27 | 28 | border-radius: 15px 15px 0 0; 29 | -moz-border-radius: 15px 15px 0 0; 30 | -webkit-border-top-right-radius: 15px; 31 | -webkit-border-top-left-radius: 15px; 32 | } 33 | 34 | #qunit-banner { 35 | height: 5px; 36 | } 37 | 38 | #qunit-testrunner-toolbar { 39 | padding: 0em 0 0.5em 2em; 40 | } 41 | 42 | #qunit-userAgent { 43 | padding: 0.5em 0 0.5em 2.5em; 44 | background-color: #2b81af; 45 | color: #fff; 46 | text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px; 47 | } 48 | 49 | 50 | /** Tests: Pass/Fail */ 51 | 52 | #qunit-tests { 53 | list-style-position: inside; 54 | } 55 | 56 | #qunit-tests li { 57 | padding: 0.4em 0.5em 0.4em 2.5em; 58 | border-bottom: 1px solid #fff; 59 | list-style-position: inside; 60 | } 61 | 62 | #qunit-tests li strong { 63 | cursor: pointer; 64 | } 65 | 66 | #qunit-tests li ol { 67 | margin-top: 0.5em; 68 | padding: 0.5em; 69 | 70 | background-color: #fff; 71 | 72 | border-radius: 15px; 73 | -moz-border-radius: 15px; 74 | -webkit-border-radius: 15px; 75 | 76 | box-shadow: inset 0px 2px 13px #999; 77 | -moz-box-shadow: inset 0px 2px 13px #999; 78 | -webkit-box-shadow: inset 0px 2px 13px #999; 79 | } 80 | 81 | #qunit-tests li li { 82 | margin: 0.5em; 83 | padding: 0.4em 0.5em 0.4em 0.5em; 84 | background-color: #fff; 85 | border-bottom: none; 86 | list-style-position: inside; 87 | } 88 | 89 | /*** Passing Styles */ 90 | 91 | #qunit-tests li li.pass { 92 | color: #5E740B; 93 | background-color: #fff; 94 | border-left: 26px solid #C6E746; 95 | } 96 | 97 | #qunit-tests li.pass { color: #528CE0; background-color: #D2E0E6; } 98 | #qunit-tests li.pass span.test-name { color: #366097; } 99 | 100 | #qunit-tests li li.pass span.test-actual, 101 | #qunit-tests li li.pass span.test-expected { color: #999999; } 102 | 103 | strong b.pass { color: #5E740B; } 104 | 105 | #qunit-banner.qunit-pass { background-color: #C6E746; } 106 | 107 | /*** Failing Styles */ 108 | 109 | #qunit-tests li li.fail { 110 | color: #710909; 111 | background-color: #fff; 112 | border-left: 26px solid #EE5757; 113 | } 114 | 115 | #qunit-tests li.fail { color: #000000; background-color: #EE5757; } 116 | #qunit-tests li.fail span.test-name, 117 | #qunit-tests li.fail span.module-name { color: #000000; } 118 | 119 | #qunit-tests li li.fail span.test-actual { color: #EE5757; } 120 | #qunit-tests li li.fail span.test-expected { color: green; } 121 | 122 | strong b.fail { color: #710909; } 123 | 124 | #qunit-banner.qunit-fail, 125 | #qunit-testrunner-toolbar { background-color: #EE5757; } 126 | 127 | 128 | /** Footer */ 129 | 130 | #qunit-testresult { 131 | padding: 0.5em 0.5em 0.5em 2.5em; 132 | 133 | color: #2b81af; 134 | background-color: #D2E0E6; 135 | 136 | border-radius: 0 0 15px 15px; 137 | -moz-border-radius: 0 0 15px 15px; 138 | -webkit-border-bottom-right-radius: 15px; 139 | -webkit-border-bottom-left-radius: 15px; 140 | } 141 | 142 | /** Fixture */ 143 | 144 | #qunit-fixture { 145 | position: absolute; 146 | top: -10000px; 147 | left: -10000px; 148 | } 149 | -------------------------------------------------------------------------------- /htdocs-mobile-boilerplate/_test/qunit/qunit.js: -------------------------------------------------------------------------------- 1 | /* 2 | * QUnit - A JavaScript Unit Testing Framework 3 | * 4 | * http://docs.jquery.com/QUnit 5 | * 6 | * Copyright (c) 2009 John Resig, Jörn Zaefferer 7 | * Dual licensed under the MIT (MIT-LICENSE.txt) 8 | * and GPL (GPL-LICENSE.txt) licenses. 9 | */ 10 | 11 | (function(window) { 12 | 13 | var QUnit = { 14 | 15 | // call on start of module test to prepend name to all tests 16 | module: function(name, testEnvironment) { 17 | config.currentModule = name; 18 | 19 | synchronize(function() { 20 | if ( config.currentModule ) { 21 | QUnit.moduleDone( config.currentModule, config.moduleStats.bad, config.moduleStats.all ); 22 | } 23 | 24 | config.currentModule = name; 25 | config.moduleTestEnvironment = testEnvironment; 26 | config.moduleStats = { all: 0, bad: 0 }; 27 | 28 | QUnit.moduleStart( name, testEnvironment ); 29 | }); 30 | }, 31 | 32 | asyncTest: function(testName, expected, callback) { 33 | if ( arguments.length === 2 ) { 34 | callback = expected; 35 | expected = 0; 36 | } 37 | 38 | QUnit.test(testName, expected, callback, true); 39 | }, 40 | 41 | test: function(testName, expected, callback, async) { 42 | var name = '' + testName + '', testEnvironment, testEnvironmentArg; 43 | 44 | if ( arguments.length === 2 ) { 45 | callback = expected; 46 | expected = null; 47 | } 48 | // is 2nd argument a testEnvironment? 49 | if ( expected && typeof expected === 'object') { 50 | testEnvironmentArg = expected; 51 | expected = null; 52 | } 53 | 54 | if ( config.currentModule ) { 55 | name = '' + config.currentModule + ": " + name; 56 | } 57 | 58 | if ( !validTest(config.currentModule + ": " + testName) ) { 59 | return; 60 | } 61 | 62 | synchronize(function() { 63 | 64 | testEnvironment = extend({ 65 | setup: function() {}, 66 | teardown: function() {} 67 | }, config.moduleTestEnvironment); 68 | if (testEnvironmentArg) { 69 | extend(testEnvironment,testEnvironmentArg); 70 | } 71 | 72 | QUnit.testStart( testName, testEnvironment ); 73 | 74 | // allow utility functions to access the current test environment 75 | QUnit.current_testEnvironment = testEnvironment; 76 | 77 | config.assertions = []; 78 | config.expected = expected; 79 | 80 | var tests = id("qunit-tests"); 81 | if (tests) { 82 | var b = document.createElement("strong"); 83 | b.innerHTML = "Running " + name; 84 | var li = document.createElement("li"); 85 | li.appendChild( b ); 86 | li.id = "current-test-output"; 87 | tests.appendChild( li ) 88 | } 89 | 90 | try { 91 | if ( !config.pollution ) { 92 | saveGlobal(); 93 | } 94 | 95 | testEnvironment.setup.call(testEnvironment); 96 | } catch(e) { 97 | QUnit.ok( false, "Setup failed on " + name + ": " + e.message ); 98 | } 99 | }); 100 | 101 | synchronize(function() { 102 | if ( async ) { 103 | QUnit.stop(); 104 | } 105 | 106 | try { 107 | callback.call(testEnvironment); 108 | } catch(e) { 109 | fail("Test " + name + " died, exception and test follows", e, callback); 110 | QUnit.ok( false, "Died on test #" + (config.assertions.length + 1) + ": " + e.message ); 111 | // else next test will carry the responsibility 112 | saveGlobal(); 113 | 114 | // Restart the tests if they're blocking 115 | if ( config.blocking ) { 116 | start(); 117 | } 118 | } 119 | }); 120 | 121 | synchronize(function() { 122 | try { 123 | checkPollution(); 124 | testEnvironment.teardown.call(testEnvironment); 125 | } catch(e) { 126 | QUnit.ok( false, "Teardown failed on " + name + ": " + e.message ); 127 | } 128 | }); 129 | 130 | synchronize(function() { 131 | try { 132 | QUnit.reset(); 133 | } catch(e) { 134 | fail("reset() failed, following Test " + name + ", exception and reset fn follows", e, reset); 135 | } 136 | 137 | if ( config.expected && config.expected != config.assertions.length ) { 138 | QUnit.ok( false, "Expected " + config.expected + " assertions, but " + config.assertions.length + " were run" ); 139 | } 140 | 141 | var good = 0, bad = 0, 142 | tests = id("qunit-tests"); 143 | 144 | config.stats.all += config.assertions.length; 145 | config.moduleStats.all += config.assertions.length; 146 | 147 | if ( tests ) { 148 | var ol = document.createElement("ol"); 149 | 150 | for ( var i = 0; i < config.assertions.length; i++ ) { 151 | var assertion = config.assertions[i]; 152 | 153 | var li = document.createElement("li"); 154 | li.className = assertion.result ? "pass" : "fail"; 155 | li.innerHTML = assertion.message || "(no message)"; 156 | ol.appendChild( li ); 157 | 158 | if ( assertion.result ) { 159 | good++; 160 | } else { 161 | bad++; 162 | config.stats.bad++; 163 | config.moduleStats.bad++; 164 | } 165 | } 166 | if (bad == 0) { 167 | ol.style.display = "none"; 168 | } 169 | 170 | var b = document.createElement("strong"); 171 | b.innerHTML = name + " (" + bad + ", " + good + ", " + config.assertions.length + ")"; 172 | 173 | addEvent(b, "click", function() { 174 | var next = b.nextSibling, display = next.style.display; 175 | next.style.display = display === "none" ? "block" : "none"; 176 | }); 177 | 178 | addEvent(b, "dblclick", function(e) { 179 | var target = e && e.target ? e.target : window.event.srcElement; 180 | if ( target.nodeName.toLowerCase() == "span" || target.nodeName.toLowerCase() == "b" ) { 181 | target = target.parentNode; 182 | } 183 | if ( window.location && target.nodeName.toLowerCase() === "strong" ) { 184 | window.location.search = "?" + encodeURIComponent(getText([target]).replace(/\(.+\)$/, "").replace(/(^\s*|\s*$)/g, "")); 185 | } 186 | }); 187 | 188 | var li = id("current-test-output"); 189 | li.id = ""; 190 | li.className = bad ? "fail" : "pass"; 191 | li.removeChild( li.firstChild ); 192 | li.appendChild( b ); 193 | li.appendChild( ol ); 194 | 195 | if ( bad ) { 196 | var toolbar = id("qunit-testrunner-toolbar"); 197 | if ( toolbar ) { 198 | toolbar.style.display = "block"; 199 | id("qunit-filter-pass").disabled = null; 200 | id("qunit-filter-missing").disabled = null; 201 | } 202 | } 203 | 204 | } else { 205 | for ( var i = 0; i < config.assertions.length; i++ ) { 206 | if ( !config.assertions[i].result ) { 207 | bad++; 208 | config.stats.bad++; 209 | config.moduleStats.bad++; 210 | } 211 | } 212 | } 213 | 214 | QUnit.testDone( testName, bad, config.assertions.length ); 215 | 216 | if ( !window.setTimeout && !config.queue.length ) { 217 | done(); 218 | } 219 | }); 220 | 221 | if ( window.setTimeout && !config.doneTimer ) { 222 | config.doneTimer = window.setTimeout(function(){ 223 | if ( !config.queue.length ) { 224 | done(); 225 | } else { 226 | synchronize( done ); 227 | } 228 | }, 13); 229 | } 230 | }, 231 | 232 | /** 233 | * Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through. 234 | */ 235 | expect: function(asserts) { 236 | config.expected = asserts; 237 | }, 238 | 239 | /** 240 | * Asserts true. 241 | * @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" ); 242 | */ 243 | ok: function(a, msg) { 244 | msg = escapeHtml(msg); 245 | QUnit.log(a, msg); 246 | 247 | config.assertions.push({ 248 | result: !!a, 249 | message: msg 250 | }); 251 | }, 252 | 253 | /** 254 | * Checks that the first two arguments are equal, with an optional message. 255 | * Prints out both actual and expected values. 256 | * 257 | * Prefered to ok( actual == expected, message ) 258 | * 259 | * @example equal( format("Received {0} bytes.", 2), "Received 2 bytes." ); 260 | * 261 | * @param Object actual 262 | * @param Object expected 263 | * @param String message (optional) 264 | */ 265 | equal: function(actual, expected, message) { 266 | push(expected == actual, actual, expected, message); 267 | }, 268 | 269 | notEqual: function(actual, expected, message) { 270 | push(expected != actual, actual, expected, message); 271 | }, 272 | 273 | deepEqual: function(actual, expected, message) { 274 | push(QUnit.equiv(actual, expected), actual, expected, message); 275 | }, 276 | 277 | notDeepEqual: function(actual, expected, message) { 278 | push(!QUnit.equiv(actual, expected), actual, expected, message); 279 | }, 280 | 281 | strictEqual: function(actual, expected, message) { 282 | push(expected === actual, actual, expected, message); 283 | }, 284 | 285 | notStrictEqual: function(actual, expected, message) { 286 | push(expected !== actual, actual, expected, message); 287 | }, 288 | 289 | raises: function(fn, message) { 290 | try { 291 | fn(); 292 | ok( false, message ); 293 | } 294 | catch (e) { 295 | ok( true, message ); 296 | } 297 | }, 298 | 299 | start: function() { 300 | // A slight delay, to avoid any current callbacks 301 | if ( window.setTimeout ) { 302 | window.setTimeout(function() { 303 | if ( config.timeout ) { 304 | clearTimeout(config.timeout); 305 | } 306 | 307 | config.blocking = false; 308 | process(); 309 | }, 13); 310 | } else { 311 | config.blocking = false; 312 | process(); 313 | } 314 | }, 315 | 316 | stop: function(timeout) { 317 | config.blocking = true; 318 | 319 | if ( timeout && window.setTimeout ) { 320 | config.timeout = window.setTimeout(function() { 321 | QUnit.ok( false, "Test timed out" ); 322 | QUnit.start(); 323 | }, timeout); 324 | } 325 | } 326 | 327 | }; 328 | 329 | // Backwards compatibility, deprecated 330 | QUnit.equals = QUnit.equal; 331 | QUnit.same = QUnit.deepEqual; 332 | 333 | // Maintain internal state 334 | var config = { 335 | // The queue of tests to run 336 | queue: [], 337 | 338 | // block until document ready 339 | blocking: true 340 | }; 341 | 342 | // Load paramaters 343 | (function() { 344 | var location = window.location || { search: "", protocol: "file:" }, 345 | GETParams = location.search.slice(1).split('&'); 346 | 347 | for ( var i = 0; i < GETParams.length; i++ ) { 348 | GETParams[i] = decodeURIComponent( GETParams[i] ); 349 | if ( GETParams[i] === "noglobals" ) { 350 | GETParams.splice( i, 1 ); 351 | i--; 352 | config.noglobals = true; 353 | } else if ( GETParams[i].search('=') > -1 ) { 354 | GETParams.splice( i, 1 ); 355 | i--; 356 | } 357 | } 358 | 359 | // restrict modules/tests by get parameters 360 | config.filters = GETParams; 361 | 362 | // Figure out if we're running the tests from a server or not 363 | QUnit.isLocal = !!(location.protocol === 'file:'); 364 | })(); 365 | 366 | // Expose the API as global variables, unless an 'exports' 367 | // object exists, in that case we assume we're in CommonJS 368 | if ( typeof exports === "undefined" || typeof require === "undefined" ) { 369 | extend(window, QUnit); 370 | window.QUnit = QUnit; 371 | } else { 372 | extend(exports, QUnit); 373 | exports.QUnit = QUnit; 374 | } 375 | 376 | // define these after exposing globals to keep them in these QUnit namespace only 377 | extend(QUnit, { 378 | config: config, 379 | 380 | // Initialize the configuration options 381 | init: function() { 382 | extend(config, { 383 | stats: { all: 0, bad: 0 }, 384 | moduleStats: { all: 0, bad: 0 }, 385 | started: +new Date, 386 | updateRate: 1000, 387 | blocking: false, 388 | autostart: true, 389 | autorun: false, 390 | assertions: [], 391 | filters: [], 392 | queue: [] 393 | }); 394 | 395 | var tests = id("qunit-tests"), 396 | banner = id("qunit-banner"), 397 | result = id("qunit-testresult"); 398 | 399 | if ( tests ) { 400 | tests.innerHTML = ""; 401 | } 402 | 403 | if ( banner ) { 404 | banner.className = ""; 405 | } 406 | 407 | if ( result ) { 408 | result.parentNode.removeChild( result ); 409 | } 410 | }, 411 | 412 | /** 413 | * Resets the test setup. Useful for tests that modify the DOM. 414 | */ 415 | reset: function() { 416 | if ( window.jQuery ) { 417 | jQuery("#main, #qunit-fixture").html( config.fixture ); 418 | } 419 | }, 420 | 421 | /** 422 | * Trigger an event on an element. 423 | * 424 | * @example triggerEvent( document.body, "click" ); 425 | * 426 | * @param DOMElement elem 427 | * @param String type 428 | */ 429 | triggerEvent: function( elem, type, event ) { 430 | if ( document.createEvent ) { 431 | event = document.createEvent("MouseEvents"); 432 | event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView, 433 | 0, 0, 0, 0, 0, false, false, false, false, 0, null); 434 | elem.dispatchEvent( event ); 435 | 436 | } else if ( elem.fireEvent ) { 437 | elem.fireEvent("on"+type); 438 | } 439 | }, 440 | 441 | // Safe object type checking 442 | is: function( type, obj ) { 443 | return QUnit.objectType( obj ) == type; 444 | }, 445 | 446 | objectType: function( obj ) { 447 | if (typeof obj === "undefined") { 448 | return "undefined"; 449 | 450 | // consider: typeof null === object 451 | } 452 | if (obj === null) { 453 | return "null"; 454 | } 455 | 456 | var type = Object.prototype.toString.call( obj ) 457 | .match(/^\[object\s(.*)\]$/)[1] || ''; 458 | 459 | switch (type) { 460 | case 'Number': 461 | if (isNaN(obj)) { 462 | return "nan"; 463 | } else { 464 | return "number"; 465 | } 466 | case 'String': 467 | case 'Boolean': 468 | case 'Array': 469 | case 'Date': 470 | case 'RegExp': 471 | case 'Function': 472 | return type.toLowerCase(); 473 | } 474 | if (typeof obj === "object") { 475 | return "object"; 476 | } 477 | return undefined; 478 | }, 479 | 480 | // Logging callbacks 481 | begin: function() {}, 482 | done: function(failures, total) {}, 483 | log: function(result, message) {}, 484 | testStart: function(name, testEnvironment) {}, 485 | testDone: function(name, failures, total) {}, 486 | moduleStart: function(name, testEnvironment) {}, 487 | moduleDone: function(name, failures, total) {} 488 | }); 489 | 490 | if ( typeof document === "undefined" || document.readyState === "complete" ) { 491 | config.autorun = true; 492 | } 493 | 494 | addEvent(window, "load", function() { 495 | QUnit.begin(); 496 | 497 | // Initialize the config, saving the execution queue 498 | var oldconfig = extend({}, config); 499 | QUnit.init(); 500 | extend(config, oldconfig); 501 | 502 | config.blocking = false; 503 | 504 | var userAgent = id("qunit-userAgent"); 505 | if ( userAgent ) { 506 | userAgent.innerHTML = navigator.userAgent; 507 | } 508 | 509 | var toolbar = id("qunit-testrunner-toolbar"); 510 | if ( toolbar ) { 511 | toolbar.style.display = "none"; 512 | 513 | var filter = document.createElement("input"); 514 | filter.type = "checkbox"; 515 | filter.id = "qunit-filter-pass"; 516 | filter.disabled = true; 517 | addEvent( filter, "click", function() { 518 | var li = document.getElementsByTagName("li"); 519 | for ( var i = 0; i < li.length; i++ ) { 520 | if ( li[i].className.indexOf("pass") > -1 ) { 521 | li[i].style.display = filter.checked ? "none" : ""; 522 | } 523 | } 524 | }); 525 | toolbar.appendChild( filter ); 526 | 527 | var label = document.createElement("label"); 528 | label.setAttribute("for", "qunit-filter-pass"); 529 | label.innerHTML = "Hide passed tests"; 530 | toolbar.appendChild( label ); 531 | 532 | var missing = document.createElement("input"); 533 | missing.type = "checkbox"; 534 | missing.id = "qunit-filter-missing"; 535 | missing.disabled = true; 536 | addEvent( missing, "click", function() { 537 | var li = document.getElementsByTagName("li"); 538 | for ( var i = 0; i < li.length; i++ ) { 539 | if ( li[i].className.indexOf("fail") > -1 && li[i].innerHTML.indexOf('missing test - untested code is broken code') > - 1 ) { 540 | li[i].parentNode.parentNode.style.display = missing.checked ? "none" : "block"; 541 | } 542 | } 543 | }); 544 | toolbar.appendChild( missing ); 545 | 546 | label = document.createElement("label"); 547 | label.setAttribute("for", "qunit-filter-missing"); 548 | label.innerHTML = "Hide missing tests (untested code is broken code)"; 549 | toolbar.appendChild( label ); 550 | } 551 | 552 | var main = id('main') || id('qunit-fixture'); 553 | if ( main ) { 554 | config.fixture = main.innerHTML; 555 | } 556 | 557 | if (config.autostart) { 558 | QUnit.start(); 559 | } 560 | }); 561 | 562 | function done() { 563 | if ( config.doneTimer && window.clearTimeout ) { 564 | window.clearTimeout( config.doneTimer ); 565 | config.doneTimer = null; 566 | } 567 | 568 | if ( config.queue.length ) { 569 | config.doneTimer = window.setTimeout(function(){ 570 | if ( !config.queue.length ) { 571 | done(); 572 | } else { 573 | synchronize( done ); 574 | } 575 | }, 13); 576 | 577 | return; 578 | } 579 | 580 | config.autorun = true; 581 | 582 | // Log the last module results 583 | if ( config.currentModule ) { 584 | QUnit.moduleDone( config.currentModule, config.moduleStats.bad, config.moduleStats.all ); 585 | } 586 | 587 | var banner = id("qunit-banner"), 588 | tests = id("qunit-tests"), 589 | html = ['Tests completed in ', 590 | +new Date - config.started, ' milliseconds.
    ', 591 | '', config.stats.all - config.stats.bad, ' tests of ', config.stats.all, ' passed, ', config.stats.bad,' failed.'].join(''); 592 | 593 | if ( banner ) { 594 | banner.className = (config.stats.bad ? "qunit-fail" : "qunit-pass"); 595 | } 596 | 597 | if ( tests ) { 598 | var result = id("qunit-testresult"); 599 | 600 | if ( !result ) { 601 | result = document.createElement("p"); 602 | result.id = "qunit-testresult"; 603 | result.className = "result"; 604 | tests.parentNode.insertBefore( result, tests.nextSibling ); 605 | } 606 | 607 | result.innerHTML = html; 608 | } 609 | 610 | QUnit.done( config.stats.bad, config.stats.all ); 611 | } 612 | 613 | function validTest( name ) { 614 | var i = config.filters.length, 615 | run = false; 616 | 617 | if ( !i ) { 618 | return true; 619 | } 620 | 621 | while ( i-- ) { 622 | var filter = config.filters[i], 623 | not = filter.charAt(0) == '!'; 624 | 625 | if ( not ) { 626 | filter = filter.slice(1); 627 | } 628 | 629 | if ( name.indexOf(filter) !== -1 ) { 630 | return !not; 631 | } 632 | 633 | if ( not ) { 634 | run = true; 635 | } 636 | } 637 | 638 | return run; 639 | } 640 | 641 | function escapeHtml(s) { 642 | s = s === null ? "" : s + ""; 643 | return s.replace(/[\&"<>\\]/g, function(s) { 644 | switch(s) { 645 | case "&": return "&"; 646 | case "\\": return "\\\\"; 647 | case '"': return '\"'; 648 | case "<": return "<"; 649 | case ">": return ">"; 650 | default: return s; 651 | } 652 | }); 653 | } 654 | 655 | function push(result, actual, expected, message) { 656 | message = escapeHtml(message) || (result ? "okay" : "failed"); 657 | message = '' + message + ""; 658 | expected = escapeHtml(QUnit.jsDump.parse(expected)); 659 | actual = escapeHtml(QUnit.jsDump.parse(actual)); 660 | var output = message + ', expected: ' + expected + ''; 661 | if (actual != expected) { 662 | output += ' result: ' + actual + ', diff: ' + QUnit.diff(expected, actual); 663 | } 664 | 665 | // can't use ok, as that would double-escape messages 666 | QUnit.log(result, output); 667 | config.assertions.push({ 668 | result: !!result, 669 | message: output 670 | }); 671 | } 672 | 673 | function synchronize( callback ) { 674 | config.queue.push( callback ); 675 | 676 | if ( config.autorun && !config.blocking ) { 677 | process(); 678 | } 679 | } 680 | 681 | function process() { 682 | var start = (new Date()).getTime(); 683 | 684 | while ( config.queue.length && !config.blocking ) { 685 | if ( config.updateRate <= 0 || (((new Date()).getTime() - start) < config.updateRate) ) { 686 | config.queue.shift()(); 687 | 688 | } else { 689 | setTimeout( process, 13 ); 690 | break; 691 | } 692 | } 693 | } 694 | 695 | function saveGlobal() { 696 | config.pollution = []; 697 | 698 | if ( config.noglobals ) { 699 | for ( var key in window ) { 700 | config.pollution.push( key ); 701 | } 702 | } 703 | } 704 | 705 | function checkPollution( name ) { 706 | var old = config.pollution; 707 | saveGlobal(); 708 | 709 | var newGlobals = diff( old, config.pollution ); 710 | if ( newGlobals.length > 0 ) { 711 | ok( false, "Introduced global variable(s): " + newGlobals.join(", ") ); 712 | config.expected++; 713 | } 714 | 715 | var deletedGlobals = diff( config.pollution, old ); 716 | if ( deletedGlobals.length > 0 ) { 717 | ok( false, "Deleted global variable(s): " + deletedGlobals.join(", ") ); 718 | config.expected++; 719 | } 720 | } 721 | 722 | // returns a new Array with the elements that are in a but not in b 723 | function diff( a, b ) { 724 | var result = a.slice(); 725 | for ( var i = 0; i < result.length; i++ ) { 726 | for ( var j = 0; j < b.length; j++ ) { 727 | if ( result[i] === b[j] ) { 728 | result.splice(i, 1); 729 | i--; 730 | break; 731 | } 732 | } 733 | } 734 | return result; 735 | } 736 | 737 | function fail(message, exception, callback) { 738 | if ( typeof console !== "undefined" && console.error && console.warn ) { 739 | console.error(message); 740 | console.error(exception); 741 | console.warn(callback.toString()); 742 | 743 | } else if ( window.opera && opera.postError ) { 744 | opera.postError(message, exception, callback.toString); 745 | } 746 | } 747 | 748 | function extend(a, b) { 749 | for ( var prop in b ) { 750 | a[prop] = b[prop]; 751 | } 752 | 753 | return a; 754 | } 755 | 756 | function addEvent(elem, type, fn) { 757 | if ( elem.addEventListener ) { 758 | elem.addEventListener( type, fn, false ); 759 | } else if ( elem.attachEvent ) { 760 | elem.attachEvent( "on" + type, fn ); 761 | } else { 762 | fn(); 763 | } 764 | } 765 | 766 | function id(name) { 767 | return !!(typeof document !== "undefined" && document && document.getElementById) && 768 | document.getElementById( name ); 769 | } 770 | 771 | // Test for equality any JavaScript type. 772 | // Discussions and reference: http://philrathe.com/articles/equiv 773 | // Test suites: http://philrathe.com/tests/equiv 774 | // Author: Philippe Rathé 775 | QUnit.equiv = function () { 776 | 777 | var innerEquiv; // the real equiv function 778 | var callers = []; // stack to decide between skip/abort functions 779 | var parents = []; // stack to avoiding loops from circular referencing 780 | 781 | // Call the o related callback with the given arguments. 782 | function bindCallbacks(o, callbacks, args) { 783 | var prop = QUnit.objectType(o); 784 | if (prop) { 785 | if (QUnit.objectType(callbacks[prop]) === "function") { 786 | return callbacks[prop].apply(callbacks, args); 787 | } else { 788 | return callbacks[prop]; // or undefined 789 | } 790 | } 791 | } 792 | 793 | var callbacks = function () { 794 | 795 | // for string, boolean, number and null 796 | function useStrictEquality(b, a) { 797 | if (b instanceof a.constructor || a instanceof b.constructor) { 798 | // to catch short annotaion VS 'new' annotation of a declaration 799 | // e.g. var i = 1; 800 | // var j = new Number(1); 801 | return a == b; 802 | } else { 803 | return a === b; 804 | } 805 | } 806 | 807 | return { 808 | "string": useStrictEquality, 809 | "boolean": useStrictEquality, 810 | "number": useStrictEquality, 811 | "null": useStrictEquality, 812 | "undefined": useStrictEquality, 813 | 814 | "nan": function (b) { 815 | return isNaN(b); 816 | }, 817 | 818 | "date": function (b, a) { 819 | return QUnit.objectType(b) === "date" && a.valueOf() === b.valueOf(); 820 | }, 821 | 822 | "regexp": function (b, a) { 823 | return QUnit.objectType(b) === "regexp" && 824 | a.source === b.source && // the regex itself 825 | a.global === b.global && // and its modifers (gmi) ... 826 | a.ignoreCase === b.ignoreCase && 827 | a.multiline === b.multiline; 828 | }, 829 | 830 | // - skip when the property is a method of an instance (OOP) 831 | // - abort otherwise, 832 | // initial === would have catch identical references anyway 833 | "function": function () { 834 | var caller = callers[callers.length - 1]; 835 | return caller !== Object && 836 | typeof caller !== "undefined"; 837 | }, 838 | 839 | "array": function (b, a) { 840 | var i, j, loop; 841 | var len; 842 | 843 | // b could be an object literal here 844 | if ( ! (QUnit.objectType(b) === "array")) { 845 | return false; 846 | } 847 | 848 | len = a.length; 849 | if (len !== b.length) { // safe and faster 850 | return false; 851 | } 852 | 853 | //track reference to avoid circular references 854 | parents.push(a); 855 | for (i = 0; i < len; i++) { 856 | loop = false; 857 | for(j=0;j= 0) { 1002 | type = "array"; 1003 | } else { 1004 | type = typeof obj; 1005 | } 1006 | return type; 1007 | }, 1008 | separator:function() { 1009 | return this.multiline ? this.HTML ? '
    ' : '\n' : this.HTML ? ' ' : ' '; 1010 | }, 1011 | indent:function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing 1012 | if ( !this.multiline ) 1013 | return ''; 1014 | var chr = this.indentChar; 1015 | if ( this.HTML ) 1016 | chr = chr.replace(/\t/g,' ').replace(/ /g,' '); 1017 | return Array( this._depth_ + (extra||0) ).join(chr); 1018 | }, 1019 | up:function( a ) { 1020 | this._depth_ += a || 1; 1021 | }, 1022 | down:function( a ) { 1023 | this._depth_ -= a || 1; 1024 | }, 1025 | setParser:function( name, parser ) { 1026 | this.parsers[name] = parser; 1027 | }, 1028 | // The next 3 are exposed so you can use them 1029 | quote:quote, 1030 | literal:literal, 1031 | join:join, 1032 | // 1033 | _depth_: 1, 1034 | // This is the list of parsers, to modify them, use jsDump.setParser 1035 | parsers:{ 1036 | window: '[Window]', 1037 | document: '[Document]', 1038 | error:'[ERROR]', //when no parser is found, shouldn't happen 1039 | unknown: '[Unknown]', 1040 | 'null':'null', 1041 | undefined:'undefined', 1042 | 'function':function( fn ) { 1043 | var ret = 'function', 1044 | name = 'name' in fn ? fn.name : (reName.exec(fn)||[])[1];//functions never have name in IE 1045 | if ( name ) 1046 | ret += ' ' + name; 1047 | ret += '('; 1048 | 1049 | ret = [ ret, this.parse( fn, 'functionArgs' ), '){'].join(''); 1050 | return join( ret, this.parse(fn,'functionCode'), '}' ); 1051 | }, 1052 | array: array, 1053 | nodelist: array, 1054 | arguments: array, 1055 | object:function( map ) { 1056 | var ret = [ ]; 1057 | this.up(); 1058 | for ( var key in map ) 1059 | ret.push( this.parse(key,'key') + ': ' + this.parse(map[key]) ); 1060 | this.down(); 1061 | return join( '{', ret, '}' ); 1062 | }, 1063 | node:function( node ) { 1064 | var open = this.HTML ? '<' : '<', 1065 | close = this.HTML ? '>' : '>'; 1066 | 1067 | var tag = node.nodeName.toLowerCase(), 1068 | ret = open + tag; 1069 | 1070 | for ( var a in this.DOMAttrs ) { 1071 | var val = node[this.DOMAttrs[a]]; 1072 | if ( val ) 1073 | ret += ' ' + a + '=' + this.parse( val, 'attribute' ); 1074 | } 1075 | return ret + close + open + '/' + tag + close; 1076 | }, 1077 | functionArgs:function( fn ) {//function calls it internally, it's the arguments part of the function 1078 | var l = fn.length; 1079 | if ( !l ) return ''; 1080 | 1081 | var args = Array(l); 1082 | while ( l-- ) 1083 | args[l] = String.fromCharCode(97+l);//97 is 'a' 1084 | return ' ' + args.join(', ') + ' '; 1085 | }, 1086 | key:quote, //object calls it internally, the key part of an item in a map 1087 | functionCode:'[code]', //function calls it internally, it's the content of the function 1088 | attribute:quote, //node calls it internally, it's an html attribute value 1089 | string:quote, 1090 | date:quote, 1091 | regexp:literal, //regex 1092 | number:literal, 1093 | 'boolean':literal 1094 | }, 1095 | DOMAttrs:{//attributes to dump from nodes, name=>realName 1096 | id:'id', 1097 | name:'name', 1098 | 'class':'className' 1099 | }, 1100 | HTML:false,//if true, entities are escaped ( <, >, \t, space and \n ) 1101 | indentChar:' ',//indentation unit 1102 | multiline:false //if true, items in a collection, are separated by a \n, else just a space. 1103 | }; 1104 | 1105 | return jsDump; 1106 | })(); 1107 | 1108 | // from Sizzle.js 1109 | function getText( elems ) { 1110 | var ret = "", elem; 1111 | 1112 | for ( var i = 0; elems[i]; i++ ) { 1113 | elem = elems[i]; 1114 | 1115 | // Get the text from text nodes and CDATA nodes 1116 | if ( elem.nodeType === 3 || elem.nodeType === 4 ) { 1117 | ret += elem.nodeValue; 1118 | 1119 | // Traverse everything else, except comment nodes 1120 | } else if ( elem.nodeType !== 8 ) { 1121 | ret += getText( elem.childNodes ); 1122 | } 1123 | } 1124 | 1125 | return ret; 1126 | }; 1127 | 1128 | /* 1129 | * Javascript Diff Algorithm 1130 | * By John Resig (http://ejohn.org/) 1131 | * Modified by Chu Alan "sprite" 1132 | * 1133 | * Released under the MIT license. 1134 | * 1135 | * More Info: 1136 | * http://ejohn.org/projects/javascript-diff-algorithm/ 1137 | * 1138 | * Usage: QUnit.diff(expected, actual) 1139 | * 1140 | * QUnit.diff("the quick brown fox jumped over", "the quick fox jumps over") == "the quick brown fox jumped jumps over" 1141 | */ 1142 | QUnit.diff = (function() { 1143 | function diff(o, n){ 1144 | var ns = new Object(); 1145 | var os = new Object(); 1146 | 1147 | for (var i = 0; i < n.length; i++) { 1148 | if (ns[n[i]] == null) 1149 | ns[n[i]] = { 1150 | rows: new Array(), 1151 | o: null 1152 | }; 1153 | ns[n[i]].rows.push(i); 1154 | } 1155 | 1156 | for (var i = 0; i < o.length; i++) { 1157 | if (os[o[i]] == null) 1158 | os[o[i]] = { 1159 | rows: new Array(), 1160 | n: null 1161 | }; 1162 | os[o[i]].rows.push(i); 1163 | } 1164 | 1165 | for (var i in ns) { 1166 | if (ns[i].rows.length == 1 && typeof(os[i]) != "undefined" && os[i].rows.length == 1) { 1167 | n[ns[i].rows[0]] = { 1168 | text: n[ns[i].rows[0]], 1169 | row: os[i].rows[0] 1170 | }; 1171 | o[os[i].rows[0]] = { 1172 | text: o[os[i].rows[0]], 1173 | row: ns[i].rows[0] 1174 | }; 1175 | } 1176 | } 1177 | 1178 | for (var i = 0; i < n.length - 1; i++) { 1179 | if (n[i].text != null && n[i + 1].text == null && n[i].row + 1 < o.length && o[n[i].row + 1].text == null && 1180 | n[i + 1] == o[n[i].row + 1]) { 1181 | n[i + 1] = { 1182 | text: n[i + 1], 1183 | row: n[i].row + 1 1184 | }; 1185 | o[n[i].row + 1] = { 1186 | text: o[n[i].row + 1], 1187 | row: i + 1 1188 | }; 1189 | } 1190 | } 1191 | 1192 | for (var i = n.length - 1; i > 0; i--) { 1193 | if (n[i].text != null && n[i - 1].text == null && n[i].row > 0 && o[n[i].row - 1].text == null && 1194 | n[i - 1] == o[n[i].row - 1]) { 1195 | n[i - 1] = { 1196 | text: n[i - 1], 1197 | row: n[i].row - 1 1198 | }; 1199 | o[n[i].row - 1] = { 1200 | text: o[n[i].row - 1], 1201 | row: i - 1 1202 | }; 1203 | } 1204 | } 1205 | 1206 | return { 1207 | o: o, 1208 | n: n 1209 | }; 1210 | } 1211 | 1212 | return function(o, n){ 1213 | o = o.replace(/\s+$/, ''); 1214 | n = n.replace(/\s+$/, ''); 1215 | var out = diff(o == "" ? [] : o.split(/\s+/), n == "" ? [] : n.split(/\s+/)); 1216 | 1217 | var str = ""; 1218 | 1219 | var oSpace = o.match(/\s+/g); 1220 | if (oSpace == null) { 1221 | oSpace = [" "]; 1222 | } 1223 | else { 1224 | oSpace.push(" "); 1225 | } 1226 | var nSpace = n.match(/\s+/g); 1227 | if (nSpace == null) { 1228 | nSpace = [" "]; 1229 | } 1230 | else { 1231 | nSpace.push(" "); 1232 | } 1233 | 1234 | if (out.n.length == 0) { 1235 | for (var i = 0; i < out.o.length; i++) { 1236 | str += '' + out.o[i] + oSpace[i] + ""; 1237 | } 1238 | } 1239 | else { 1240 | if (out.n[0].text == null) { 1241 | for (n = 0; n < out.o.length && out.o[n].text == null; n++) { 1242 | str += '' + out.o[n] + oSpace[n] + ""; 1243 | } 1244 | } 1245 | 1246 | for (var i = 0; i < out.n.length; i++) { 1247 | if (out.n[i].text == null) { 1248 | str += '' + out.n[i] + nSpace[i] + ""; 1249 | } 1250 | else { 1251 | var pre = ""; 1252 | 1253 | for (n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++) { 1254 | pre += '' + out.o[n] + oSpace[n] + ""; 1255 | } 1256 | str += " " + out.n[i].text + nSpace[i] + pre; 1257 | } 1258 | } 1259 | } 1260 | 1261 | return str; 1262 | } 1263 | })(); 1264 | 1265 | })(this); 1266 | -------------------------------------------------------------------------------- /htdocs-mobile-boilerplate/_test/tests.js: -------------------------------------------------------------------------------- 1 | // documentation on writing tests here: http://docs.jquery.com/QUnit 2 | // example tests: https://github.com/jquery/qunit/blob/master/test/same.js 3 | 4 | // below are some general tests but feel free to delete them. 5 | 6 | module("example tests"); 7 | test('test1',function(){ 8 | expect(1); 9 | equals(true, true); 10 | }); 11 | -------------------------------------------------------------------------------- /htdocs-mobile-boilerplate/common/css/style.css: -------------------------------------------------------------------------------- 1 | /** 2 | * HTML5 ✰ Boilerplate 3 | * 4 | * style.css contains a reset, font normalization and some base styles. 5 | * 6 | * Credit is left where credit is due. 7 | * Much inspiration was taken from these projects: 8 | * - yui.yahooapis.com/2.8.1/build/base/base.css 9 | * - camendesign.com/design/ 10 | * - praegnanz.de/weblog/htmlcssjs-kickstart 11 | */ 12 | 13 | 14 | /** 15 | * html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline) 16 | * v1.6.1 2010-09-17 | Authors: Eric Meyer & Richard Clark 17 | * html5doctor.com/html-5-reset-stylesheet/ 18 | */ 19 | 20 | html, body, div, span, object, iframe, 21 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 22 | abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, 23 | small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, 24 | fieldset, form, label, legend, 25 | table, caption, tbody, tfoot, thead, tr, th, td, 26 | article, aside, canvas, details, figcaption, figure, 27 | footer, header, hgroup, menu, nav, section, summary, 28 | time, mark, audio, video { 29 | margin: 0; 30 | padding: 0; 31 | border: 0; 32 | font-size: 100%; 33 | font: inherit; 34 | vertical-align: baseline; 35 | } 36 | 37 | article, aside, details, figcaption, figure, 38 | footer, header, hgroup, menu, nav, section { 39 | display: block; 40 | } 41 | 42 | blockquote, q { quotes: none; } 43 | 44 | blockquote:before, blockquote:after, 45 | q:before, q:after { content: ""; content: none; } 46 | 47 | ins { background-color: #ff9; color: #000; text-decoration: none; } 48 | 49 | mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; } 50 | 51 | del { text-decoration: line-through; } 52 | 53 | abbr[title], dfn[title] { border-bottom: 1px dotted; cursor: help; } 54 | 55 | table { border-collapse: collapse; border-spacing: 0; } 56 | 57 | hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; } 58 | 59 | input, select { vertical-align: middle; } 60 | 61 | 62 | 63 | /** 64 | * Font normalization inspired by YUI Library's fonts.css: developer.yahoo.com/yui/ 65 | */ 66 | 67 | 68 | body { font:13px/1.231 sans-serif; *font-size:small; } /* Hack retained to preserve specificity */ 69 | select, input, textarea, button { font:99% sans-serif; } 70 | 71 | /* Normalize monospace sizing: 72 | en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome */ 73 | pre, code, kbd, samp { font-family: monospace, sans-serif; } 74 | 75 | 76 | /** 77 | * Minimal base styles. 78 | */ 79 | 80 | /* Prevent mobile zooming while remain desktop zooming: github.com/shichuan/mobile-html5-boilerplate/issues/closed#issue/14 */ 81 | html { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } 82 | 83 | /* Accessible focus treatment: people.opera.com/patrickl/experiments/keyboard/test */ 84 | a:hover, a:active { outline: none; } 85 | 86 | ul, ol { margin-left: 2em; } 87 | ol { list-style-type: decimal; } 88 | 89 | /* Remove margins for navigation lists */ 90 | nav ul, nav li { margin: 0; list-style:none; list-style-image: none; } 91 | 92 | small { font-size: 85%; } 93 | strong, th { font-weight: bold; } 94 | 95 | td { vertical-align: top; } 96 | 97 | /* Set sub, sup without affecting line-height: gist.github.com/413930 */ 98 | sub, sup { font-size: 75%; line-height: 0; position: relative; } 99 | sup { top: -0.5em; } 100 | sub { bottom: -0.25em; } 101 | 102 | pre { 103 | /* www.pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap/ */ 104 | white-space: pre; white-space: pre-wrap; word-wrap: break-word; 105 | padding: 15px; 106 | } 107 | 108 | textarea { overflow: auto; } /* www.sitepoint.com/blogs/2010/08/20/ie-remove-textarea-scrollbars/ */ 109 | 110 | .iem7 legend { margin-left: -7px; } 111 | 112 | /* Align checkboxes, radios, text inputs with their label by: Thierry Koblentz tjkdesign.com/ez-css/css/base.css */ 113 | input[type="radio"] { vertical-align: text-bottom; } 114 | input[type="checkbox"] { vertical-align: bottom; } 115 | .iem7 input[type="checkbox"] { vertical-align: baseline; } 116 | 117 | /* Hand cursor on clickable input elements */ 118 | label, input[type="button"], input[type="submit"], input[type="image"], button { cursor: pointer; } 119 | 120 | /* Webkit browsers add a 2px margin outside the chrome of form elements */ 121 | button, input, select, textarea { margin: 0; } 122 | 123 | /* Colors for form validity */ 124 | input:valid, textarea:valid { } 125 | input:invalid, textarea:invalid { 126 | border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red; 127 | } 128 | .no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; } 129 | 130 | 131 | /* These selection declarations have to be separate 132 | No text-shadow: twitter.com/miketaylr/status/12228805301 133 | Also: hot pink! */ 134 | ::-moz-selection{ background: #FF5E99; color:#fff; text-shadow: none; } 135 | ::selection { background:#FF5E99; color:#fff; text-shadow: none; } 136 | 137 | /* j.mp/webkit-tap-highlight-color */ 138 | a:link { -webkit-tap-highlight-color: #FF5E99; } 139 | 140 | /* Make buttons play nice in IE: 141 | www.viget.com/inspire/styling-the-button-element-in-internet-explorer/ */ 142 | button { width: auto; overflow: visible; } 143 | 144 | /* Bicubic resizing for non-native sized IMG: 145 | code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ */ 146 | .iem7 img { -ms-interpolation-mode: bicubic; } 147 | 148 | 149 | /** 150 | * You might tweak these.. 151 | */ 152 | 153 | body, select, input, textarea { 154 | /* #444 looks better than black: twitter.com/H_FJ/statuses/11800719859 */ 155 | color: #444; 156 | /* Set your base font here, to apply evenly */ 157 | /* font-family: Georgia, serif; */ 158 | } 159 | 160 | /* Headers (h1, h2, etc) have no default font-size or margin; define those yourself */ 161 | h1, h2, h3, h4, h5, h6 { font-weight: bold; } 162 | 163 | a, a:active, a:visited { color: #607890; } 164 | a:hover { color: #036; } 165 | 166 | 167 | /* 168 | * Helper classes 169 | */ 170 | 171 | /* prevent callout */ 172 | .nocallout {-webkit-touch-callout: none;} 173 | 174 | /* Text overflow with ellipsis */ 175 | .ellipsis { 176 | text-overflow: ellipsis; 177 | overflow: hidden; 178 | white-space: nowrap; 179 | } 180 | 181 | /* A hack for HTML5 contenteditable attribute on mobile */ 182 | textarea.contenteditable {-webkit-appearance: none;} 183 | 184 | /* A workaround for S60 3.x and 5.0 devices which do not animated gif images if they have been set as display: none */ 185 | .gifhidden {position: absolute; left: -100%;} 186 | 187 | /* For image replacement */ 188 | .ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; } 189 | 190 | /* Hide for both screenreaders and browsers: 191 | css-discuss.incutio.com/wiki/Screenreader_Visibility */ 192 | .hidden { display: none; visibility: hidden; } 193 | 194 | /* Hide only visually, but have it available for screenreaders: by Jon Neal. 195 | www.webaim.org/techniques/css/invisiblecontent/ & j.mp/visuallyhidden */ 196 | .visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } 197 | /* Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: drupal.org/node/897638 */ 198 | .visuallyhidden.focusable:active, 199 | .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; } 200 | 201 | /* Hide visually and from screenreaders, but maintain layout */ 202 | .invisible { visibility: hidden; } 203 | 204 | /* The Magnificent Clearfix: Updated to prevent margin-collapsing on child elements. 205 | j.mp/bestclearfix */ 206 | .clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; overflow: hidden; } 207 | .clearfix:after { clear: both; } 208 | /* Fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin-padding-bottom-of-page */ 209 | .clearfix { zoom: 1; } 210 | 211 | 212 | /* Primary Styles for mobile 213 | Author: 214 | */ 215 | 216 | /* .mod-allにてfont-sizeやline-heightの調整などを行う */ 217 | .mod-all{ 218 | font-size:1.2em; 219 | line-height:1.5; 220 | } 221 | /** 222 | * 大きいコメント 223 | */ 224 | 225 | /* 小さいけど2行~なコメント 226 | 小さいけど2行~なコメント */ 227 | 228 | /* 小さいコメント */ 229 | 230 | 231 | /* 232 | ここに色々書く 233 | */ 234 | 235 | 236 | 237 | 238 | /* 239 | * Media queries for responsive design https://github.com/shichuan/mobile-html5-boilerplate/wiki/The-Style 240 | */ 241 | 242 | 243 | /* Styles for desktop and large screen ----------- */ 244 | 245 | /*styles for 800px and up!*/ 246 | @media only screen and (min-width: 800px) { 247 | /* Styles */ 248 | }/*/mediaquery*/ 249 | 250 | 251 | /* iPhone 4, Opera Mobile 11 and other high pixel ratio devices ----------- */ 252 | @media 253 | only screen and (-webkit-min-device-pixel-ratio: 1.5), 254 | only screen and (-o-min-device-pixel-ratio: 3/2), 255 | only screen and (min-device-pixel-ratio: 1.5) { 256 | /* Styles */ 257 | } 258 | -------------------------------------------------------------------------------- /htdocs-mobile-boilerplate/common/img/_dummy/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-boilerplate/common/img/_dummy/1.png -------------------------------------------------------------------------------- /htdocs-mobile-boilerplate/common/img/_dummy/grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-boilerplate/common/img/_dummy/grid.png -------------------------------------------------------------------------------- /htdocs-mobile-boilerplate/common/img/arrows/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-boilerplate/common/img/arrows/.gitignore -------------------------------------------------------------------------------- /htdocs-mobile-boilerplate/common/img/buttons/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-boilerplate/common/img/buttons/.gitignore -------------------------------------------------------------------------------- /htdocs-mobile-boilerplate/common/img/icons/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-boilerplate/common/img/icons/.gitignore -------------------------------------------------------------------------------- /htdocs-mobile-boilerplate/common/img/misc/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-boilerplate/common/img/misc/.gitignore -------------------------------------------------------------------------------- /htdocs-mobile-boilerplate/common/js/common.js: -------------------------------------------------------------------------------- 1 | (function(){ // start encapsulation 2 | 3 | // paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/ 4 | window.log = function(){ 5 | log.history = log.history || []; // store logs to an array for reference 6 | log.history.push(arguments); 7 | if(this.console) { 8 | arguments.callee = arguments.callee.caller; 9 | console.log( Array.prototype.slice.call(arguments) ); 10 | } 11 | }; 12 | 13 | // make it safe to use console.log always 14 | (function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();)b[a]=b[a]||c})(window.console=window.console||{}); 15 | 16 | Modernizr.load([ 17 | // load jQuery 18 | { 19 | load: 'https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.js', 20 | callback: function (url, result, key) { 21 | if (!window.jQuery) { 22 | Modernizr.load('/common/js/libs/jquery-1.5.2.min.js'); 23 | } 24 | } 25 | }, 26 | // load other scripts 27 | { 28 | load: [ 29 | '/common/js/libs/mbp.js', 30 | '/common/js/mylibs/example1.js', 31 | '/common/js/mylibs/example2.js', 32 | '/common/js/mylibs/example3.js' 33 | ], 34 | complete: commonDOMContentLoaded 35 | } 36 | ]); 37 | 38 | function commonDOMContentLoaded(){ 39 | 40 | // iOS scale bug fix 41 | MBP.scaleFix(); 42 | 43 | /* === write all common $(document).ready here === */ 44 | jQuery(function($, undefined){ 45 | var $b = $('body'), w = window; 46 | $b.append( 47 | w.example1Loaded ? '

    example1.js loaded!

    ' : '', 48 | w.example2Loaded ? '

    example2.js loaded!

    ' : '', 49 | w.example3Loaded ? '

    example3.js loaded!

    ' : '' 50 | ); 51 | }); 52 | 53 | } // end of commonDOMContentLoaded 54 | 55 | })(); // end encapsulation 56 | -------------------------------------------------------------------------------- /htdocs-mobile-boilerplate/common/js/libs/mbp.js: -------------------------------------------------------------------------------- 1 | /* 2 | * MBP - Mobile boilerplate helper functions 3 | */ 4 | (function(document){ 5 | 6 | window.MBP = window.MBP || {}; 7 | 8 | // Fix for iPhone viewport scale bug 9 | // http://www.blog.highub.com/mobile-2/a-fix-for-iphone-viewport-scale-bug/ 10 | 11 | MBP.viewportmeta = document.querySelector && document.querySelector('meta[name="viewport"]'); 12 | MBP.ua = navigator.userAgent; 13 | 14 | MBP.scaleFix = function () { 15 | if (MBP.viewportmeta && /iPhone|iPad/.test(MBP.ua) && !/Opera Mini/.test(MBP.ua)) { 16 | MBP.viewportmeta.content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0"; 17 | document.addEventListener("gesturestart", MBP.gestureStart, false); 18 | } 19 | }; 20 | MBP.gestureStart = function () { 21 | MBP.viewportmeta.content = "width=device-width, minimum-scale=0.25, maximum-scale=1.6"; 22 | }; 23 | 24 | 25 | // Hide URL Bar for iOS 26 | // http://remysharp.com/2010/08/05/doing-it-right-skipping-the-iphone-url-bar/ 27 | 28 | MBP.hideUrlBar = function () { 29 | /iPhone/.test(MBP.ua) && !pageYOffset && !location.hash && setTimeout(function () { 30 | window.scrollTo(0, 1); 31 | }, 1000); 32 | }; 33 | 34 | 35 | // Fast Buttons - read wiki below before using 36 | // https://github.com/shichuan/mobile-html5-boilerplate/wiki/JavaScript-Helper 37 | 38 | MBP.fastButton = function (element, handler) { 39 | this.element = element; 40 | this.handler = handler; 41 | if (element.addEventListener) { 42 | element.addEventListener('touchstart', this, false); 43 | element.addEventListener('click', this, false); 44 | } 45 | }; 46 | 47 | MBP.fastButton.prototype.handleEvent = function(event) { 48 | switch (event.type) { 49 | case 'touchstart': this.onTouchStart(event); break; 50 | case 'touchmove': this.onTouchMove(event); break; 51 | case 'touchend': this.onClick(event); break; 52 | case 'click': this.onClick(event); break; 53 | } 54 | }; 55 | 56 | MBP.fastButton.prototype.onTouchStart = function(event) { 57 | event.stopPropagation(); 58 | this.element.addEventListener('touchend', this, false); 59 | document.body.addEventListener('touchmove', this, false); 60 | this.startX = event.touches[0].clientX; 61 | this.startY = event.touches[0].clientY; 62 | this.element.style.backgroundColor = "rgba(0,0,0,.7)"; 63 | }; 64 | 65 | MBP.fastButton.prototype.onTouchMove = function(event) { 66 | if(Math.abs(event.touches[0].clientX - this.startX) > 10 || Math.abs(event.touches[0].clientY - this.startY) > 10) { 67 | this.reset(); 68 | } 69 | }; 70 | 71 | MBP.fastButton.prototype.onClick = function(event) { 72 | event.stopPropagation(); 73 | this.reset(); 74 | this.handler(event); 75 | if(event.type == 'touchend') { 76 | MBP.preventGhostClick(this.startX, this.startY); 77 | } 78 | this.element.style.backgroundColor = ""; 79 | }; 80 | 81 | MBP.fastButton.prototype.reset = function() { 82 | this.element.removeEventListener('touchend', this, false); 83 | document.body.removeEventListener('touchmove', this, false); 84 | this.element.style.backgroundColor = ""; 85 | }; 86 | 87 | MBP.preventGhostClick = function (x, y) { 88 | MBP.coords.push(x, y); 89 | window.setTimeout(function (){ 90 | MBP.coords.splice(0, 2); 91 | }, 2500); 92 | }; 93 | 94 | MBP.ghostClickHandler = function (event) { 95 | for(var i = 0, len = MBP.coords.length; i < len; i += 2) { 96 | var x = MBP.coords[i]; 97 | var y = MBP.coords[i + 1]; 98 | if(Math.abs(event.clientX - x) < 25 && Math.abs(event.clientY - y) < 25) { 99 | event.stopPropagation(); 100 | event.preventDefault(); 101 | } 102 | } 103 | }; 104 | 105 | if (document.addEventListener) { 106 | document.addEventListener('click', MBP.ghostClickHandler, true); 107 | } 108 | 109 | MBP.coords = []; 110 | 111 | 112 | // iOS Startup Image 113 | // https://github.com/shichuan/mobile-html5-boilerplate/issues#issue/2 114 | 115 | MBP.splash = function () { 116 | var filename = navigator.platform === 'iPad' ? 'h/' : 'l/'; 117 | document.write('' ); 118 | }; 119 | 120 | 121 | // Autogrow 122 | // http://googlecode.blogspot.com/2009/07/gmail-for-mobile-html5-series.html 123 | 124 | MBP.autogrow = function (element, lh) { 125 | 126 | function handler(e){ 127 | var newHeight = this.scrollHeight, 128 | currentHeight = this.clientHeight; 129 | if (newHeight > currentHeight) { 130 | this.style.height = newHeight + 3 * textLineHeight + "px"; 131 | } 132 | } 133 | 134 | var setLineHeight = (lh) ? lh : 12, 135 | textLineHeight = element.currentStyle ? element.currentStyle.lineHeight : 136 | getComputedStyle(element, null).lineHeight; 137 | 138 | textLineHeight = (textLineHeight.indexOf("px") == -1) ? setLineHeight : 139 | parseInt(textLineHeight, 10); 140 | 141 | element.style.overflow = "hidden"; 142 | element.addEventListener ? element.addEventListener('keyup', handler, false) : 143 | element.attachEvent('onkeyup', handler); 144 | }; 145 | 146 | })(document); 147 | 148 | -------------------------------------------------------------------------------- /htdocs-mobile-boilerplate/common/js/libs/modernizr-custom.js: -------------------------------------------------------------------------------- 1 | /* Modernizr custom build of 1.7: backgroundsize | csstransforms | csstransforms3d | csstransitions | iepp */ 2 | /* Modernizr.load enabled */ 3 | window.Modernizr=function(a,b,c){function G(){}function F(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1),d=(a+" "+p.join(c+" ")+c).split(" ");return!!E(d,b)}function E(a,b){for(var d in a)if(k[a[d]]!==c&&(!b||b(a[d],j)))return!0}function D(a,b){return(""+a).indexOf(b)!==-1}function C(a,b){return typeof a===b}function B(a,b){return A(o.join(a+";")+(b||""))}function A(a){k.cssText=a}var d="1.7",e={},f=!0,g=b.documentElement,h=b.head||b.getElementsByTagName("head")[0],i="modernizr",j=b.createElement(i),k=j.style,l=b.createElement("input"),m=":)",n=Object.prototype.toString,o=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),p="Webkit Moz O ms Khtml".split(" "),q={svg:"http://www.w3.org/2000/svg"},r={},s={},t={},u=[],v,w=function(a){var c=b.createElement("style"),d=b.createElement("div"),e;c.textContent=a+"{#modernizr{height:3px}}",h.appendChild(c),d.id="modernizr",g.appendChild(d),e=d.offsetHeight===3,c.parentNode.removeChild(c),d.parentNode.removeChild(d);return!!e},x=function(){function d(d,e){e=e||b.createElement(a[d]||"div");var f=(d="on"+d)in e;f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=C(e[d],"function"),C(e[d],c)||(e[d]=c),e.removeAttribute(d))),e=null;return f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),y=({}).hasOwnProperty,z;C(y,c)||C(y.call,c)?z=function(a,b){return b in a&&C(a.constructor.prototype[b],c)}:z=function(a,b){return y.call(a,b)},r.backgroundsize=function(){return F("backgroundSize")},r.csstransforms=function(){return!!E(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])},r.csstransforms3d=function(){var a=!!E(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);a&&"webkitPerspective"in g.style&&(a=w("@media ("+o.join("transform-3d),(")+"modernizr)"));return a},r.csstransitions=function(){return F("transitionProperty")};for(var H in r)z(r,H)&&(v=H.toLowerCase(),e[v]=r[H](),u.push((e[v]?"":"no-")+v));e.input||G(),e.crosswindowmessaging=e.postmessage,e.historymanagement=e.history,e.addTest=function(a,b){a=a.toLowerCase();if(!e[a]){b=!!b(),g.className+=" "+(b?"":"no-")+a,e[a]=b;return e}},A(""),j=l=null,f&&a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="";return a.childNodes.length!==1}()&&function(a,b){function p(a,b){var c=-1,d=a.length,e,f=[];while(++c 2 | 3 | 4 | 5 | 6 | 7 | 8 | PAGETITLE | SITETITLE 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
    33 | 34 |

    pxg mobile html boilerplate

    35 |

    hogehogehoge

    36 | 37 |
    38 | -------------------------------------------------------------------------------- /htdocs-mobile-boilerplate/robots.txt: -------------------------------------------------------------------------------- 1 | # www.robotstxt.org/ 2 | # www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 3 | 4 | User-agent: * 5 | 6 | -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-demoSite/.gitignore -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/_template/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-demoSite/_template/.gitignore -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/_template/modules.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | PAGETITLE | SITETITLE 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
    21 | 22 |
    23 |

    pxg html boilerplate

    24 |
    25 | 26 |
    mod-bread
    27 | 28 |

    29 | home > pagetitle 30 |

    31 | 32 |
    mod-mainvisual
    33 | 34 |
    35 | 36 |
    mod-h
    37 | 38 |

    見出し見出し

    39 | 40 |
    mod-h
    41 | 42 |

    見出し見出し

    43 | 44 |
    mod-p
    45 | 46 |

    彼は背後にひそかな足音を聞いた。それはあまり良い意味を示すものではない。誰がこんな夜更けに、しかもこんな街灯のお粗末な港街の狭い小道で彼をつけて来るというのだ。人生の航路を捻じ曲げ、その獲物と共に立ち去ろうとしている、その丁度今。

    47 | 48 |
    mod-ul
    49 | 50 | 55 | 56 |
    mod-margin
    57 | 58 |
    59 | 60 |
    mod-img
    61 | 62 |
    63 | 64 |
    mod-contact
    65 | 66 |
    67 |

    お問い合わせ

    68 |
    69 |

    Webサイト開発のフロントエンドを担当します。Webサイト開発のフロントエンドを担当します。Webサイト開発のフロントエンドを担当します。

    70 | 71 |
    72 | 73 |
    mod-ul
    74 | 75 | 76 | 77 |
    mod-footer
    78 | 79 |
    80 |

    (c) hogehoge

    81 |
    82 | 83 |
    84 | -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/_test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | QUnit Tests 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

    QUnit Test Suite

    15 |

    16 |
    17 |

    18 |
      19 |
      test markup
      20 | 21 | 22 | -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/_test/qunit/qunit.css: -------------------------------------------------------------------------------- 1 | /** Font Family and Sizes */ 2 | 3 | #qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult { 4 | font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial; 5 | } 6 | 7 | #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; } 8 | #qunit-tests { font-size: smaller; } 9 | 10 | 11 | /** Resets */ 12 | 13 | #qunit-tests, #qunit-tests li ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult { 14 | margin: 0; 15 | padding: 0; 16 | } 17 | 18 | 19 | /** Header */ 20 | 21 | #qunit-header { 22 | padding: 0.5em 0 0.5em 1em; 23 | 24 | color: #fff; 25 | text-shadow: rgba(0, 0, 0, 0.5) 4px 4px 1px; 26 | background-color: #0d3349; 27 | 28 | border-radius: 15px 15px 0 0; 29 | -moz-border-radius: 15px 15px 0 0; 30 | -webkit-border-top-right-radius: 15px; 31 | -webkit-border-top-left-radius: 15px; 32 | } 33 | 34 | #qunit-banner { 35 | height: 5px; 36 | } 37 | 38 | #qunit-testrunner-toolbar { 39 | padding: 0em 0 0.5em 2em; 40 | } 41 | 42 | #qunit-userAgent { 43 | padding: 0.5em 0 0.5em 2.5em; 44 | background-color: #2b81af; 45 | color: #fff; 46 | text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px; 47 | } 48 | 49 | 50 | /** Tests: Pass/Fail */ 51 | 52 | #qunit-tests { 53 | list-style-position: inside; 54 | } 55 | 56 | #qunit-tests li { 57 | padding: 0.4em 0.5em 0.4em 2.5em; 58 | border-bottom: 1px solid #fff; 59 | list-style-position: inside; 60 | } 61 | 62 | #qunit-tests li strong { 63 | cursor: pointer; 64 | } 65 | 66 | #qunit-tests li ol { 67 | margin-top: 0.5em; 68 | padding: 0.5em; 69 | 70 | background-color: #fff; 71 | 72 | border-radius: 15px; 73 | -moz-border-radius: 15px; 74 | -webkit-border-radius: 15px; 75 | 76 | box-shadow: inset 0px 2px 13px #999; 77 | -moz-box-shadow: inset 0px 2px 13px #999; 78 | -webkit-box-shadow: inset 0px 2px 13px #999; 79 | } 80 | 81 | #qunit-tests li li { 82 | margin: 0.5em; 83 | padding: 0.4em 0.5em 0.4em 0.5em; 84 | background-color: #fff; 85 | border-bottom: none; 86 | list-style-position: inside; 87 | } 88 | 89 | /*** Passing Styles */ 90 | 91 | #qunit-tests li li.pass { 92 | color: #5E740B; 93 | background-color: #fff; 94 | border-left: 26px solid #C6E746; 95 | } 96 | 97 | #qunit-tests li.pass { color: #528CE0; background-color: #D2E0E6; } 98 | #qunit-tests li.pass span.test-name { color: #366097; } 99 | 100 | #qunit-tests li li.pass span.test-actual, 101 | #qunit-tests li li.pass span.test-expected { color: #999999; } 102 | 103 | strong b.pass { color: #5E740B; } 104 | 105 | #qunit-banner.qunit-pass { background-color: #C6E746; } 106 | 107 | /*** Failing Styles */ 108 | 109 | #qunit-tests li li.fail { 110 | color: #710909; 111 | background-color: #fff; 112 | border-left: 26px solid #EE5757; 113 | } 114 | 115 | #qunit-tests li.fail { color: #000000; background-color: #EE5757; } 116 | #qunit-tests li.fail span.test-name, 117 | #qunit-tests li.fail span.module-name { color: #000000; } 118 | 119 | #qunit-tests li li.fail span.test-actual { color: #EE5757; } 120 | #qunit-tests li li.fail span.test-expected { color: green; } 121 | 122 | strong b.fail { color: #710909; } 123 | 124 | #qunit-banner.qunit-fail, 125 | #qunit-testrunner-toolbar { background-color: #EE5757; } 126 | 127 | 128 | /** Footer */ 129 | 130 | #qunit-testresult { 131 | padding: 0.5em 0.5em 0.5em 2.5em; 132 | 133 | color: #2b81af; 134 | background-color: #D2E0E6; 135 | 136 | border-radius: 0 0 15px 15px; 137 | -moz-border-radius: 0 0 15px 15px; 138 | -webkit-border-bottom-right-radius: 15px; 139 | -webkit-border-bottom-left-radius: 15px; 140 | } 141 | 142 | /** Fixture */ 143 | 144 | #qunit-fixture { 145 | position: absolute; 146 | top: -10000px; 147 | left: -10000px; 148 | } 149 | -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/_test/qunit/qunit.js: -------------------------------------------------------------------------------- 1 | /* 2 | * QUnit - A JavaScript Unit Testing Framework 3 | * 4 | * http://docs.jquery.com/QUnit 5 | * 6 | * Copyright (c) 2009 John Resig, Jörn Zaefferer 7 | * Dual licensed under the MIT (MIT-LICENSE.txt) 8 | * and GPL (GPL-LICENSE.txt) licenses. 9 | */ 10 | 11 | (function(window) { 12 | 13 | var QUnit = { 14 | 15 | // call on start of module test to prepend name to all tests 16 | module: function(name, testEnvironment) { 17 | config.currentModule = name; 18 | 19 | synchronize(function() { 20 | if ( config.currentModule ) { 21 | QUnit.moduleDone( config.currentModule, config.moduleStats.bad, config.moduleStats.all ); 22 | } 23 | 24 | config.currentModule = name; 25 | config.moduleTestEnvironment = testEnvironment; 26 | config.moduleStats = { all: 0, bad: 0 }; 27 | 28 | QUnit.moduleStart( name, testEnvironment ); 29 | }); 30 | }, 31 | 32 | asyncTest: function(testName, expected, callback) { 33 | if ( arguments.length === 2 ) { 34 | callback = expected; 35 | expected = 0; 36 | } 37 | 38 | QUnit.test(testName, expected, callback, true); 39 | }, 40 | 41 | test: function(testName, expected, callback, async) { 42 | var name = '' + testName + '', testEnvironment, testEnvironmentArg; 43 | 44 | if ( arguments.length === 2 ) { 45 | callback = expected; 46 | expected = null; 47 | } 48 | // is 2nd argument a testEnvironment? 49 | if ( expected && typeof expected === 'object') { 50 | testEnvironmentArg = expected; 51 | expected = null; 52 | } 53 | 54 | if ( config.currentModule ) { 55 | name = '' + config.currentModule + ": " + name; 56 | } 57 | 58 | if ( !validTest(config.currentModule + ": " + testName) ) { 59 | return; 60 | } 61 | 62 | synchronize(function() { 63 | 64 | testEnvironment = extend({ 65 | setup: function() {}, 66 | teardown: function() {} 67 | }, config.moduleTestEnvironment); 68 | if (testEnvironmentArg) { 69 | extend(testEnvironment,testEnvironmentArg); 70 | } 71 | 72 | QUnit.testStart( testName, testEnvironment ); 73 | 74 | // allow utility functions to access the current test environment 75 | QUnit.current_testEnvironment = testEnvironment; 76 | 77 | config.assertions = []; 78 | config.expected = expected; 79 | 80 | var tests = id("qunit-tests"); 81 | if (tests) { 82 | var b = document.createElement("strong"); 83 | b.innerHTML = "Running " + name; 84 | var li = document.createElement("li"); 85 | li.appendChild( b ); 86 | li.id = "current-test-output"; 87 | tests.appendChild( li ) 88 | } 89 | 90 | try { 91 | if ( !config.pollution ) { 92 | saveGlobal(); 93 | } 94 | 95 | testEnvironment.setup.call(testEnvironment); 96 | } catch(e) { 97 | QUnit.ok( false, "Setup failed on " + name + ": " + e.message ); 98 | } 99 | }); 100 | 101 | synchronize(function() { 102 | if ( async ) { 103 | QUnit.stop(); 104 | } 105 | 106 | try { 107 | callback.call(testEnvironment); 108 | } catch(e) { 109 | fail("Test " + name + " died, exception and test follows", e, callback); 110 | QUnit.ok( false, "Died on test #" + (config.assertions.length + 1) + ": " + e.message ); 111 | // else next test will carry the responsibility 112 | saveGlobal(); 113 | 114 | // Restart the tests if they're blocking 115 | if ( config.blocking ) { 116 | start(); 117 | } 118 | } 119 | }); 120 | 121 | synchronize(function() { 122 | try { 123 | checkPollution(); 124 | testEnvironment.teardown.call(testEnvironment); 125 | } catch(e) { 126 | QUnit.ok( false, "Teardown failed on " + name + ": " + e.message ); 127 | } 128 | }); 129 | 130 | synchronize(function() { 131 | try { 132 | QUnit.reset(); 133 | } catch(e) { 134 | fail("reset() failed, following Test " + name + ", exception and reset fn follows", e, reset); 135 | } 136 | 137 | if ( config.expected && config.expected != config.assertions.length ) { 138 | QUnit.ok( false, "Expected " + config.expected + " assertions, but " + config.assertions.length + " were run" ); 139 | } 140 | 141 | var good = 0, bad = 0, 142 | tests = id("qunit-tests"); 143 | 144 | config.stats.all += config.assertions.length; 145 | config.moduleStats.all += config.assertions.length; 146 | 147 | if ( tests ) { 148 | var ol = document.createElement("ol"); 149 | 150 | for ( var i = 0; i < config.assertions.length; i++ ) { 151 | var assertion = config.assertions[i]; 152 | 153 | var li = document.createElement("li"); 154 | li.className = assertion.result ? "pass" : "fail"; 155 | li.innerHTML = assertion.message || "(no message)"; 156 | ol.appendChild( li ); 157 | 158 | if ( assertion.result ) { 159 | good++; 160 | } else { 161 | bad++; 162 | config.stats.bad++; 163 | config.moduleStats.bad++; 164 | } 165 | } 166 | if (bad == 0) { 167 | ol.style.display = "none"; 168 | } 169 | 170 | var b = document.createElement("strong"); 171 | b.innerHTML = name + " (" + bad + ", " + good + ", " + config.assertions.length + ")"; 172 | 173 | addEvent(b, "click", function() { 174 | var next = b.nextSibling, display = next.style.display; 175 | next.style.display = display === "none" ? "block" : "none"; 176 | }); 177 | 178 | addEvent(b, "dblclick", function(e) { 179 | var target = e && e.target ? e.target : window.event.srcElement; 180 | if ( target.nodeName.toLowerCase() == "span" || target.nodeName.toLowerCase() == "b" ) { 181 | target = target.parentNode; 182 | } 183 | if ( window.location && target.nodeName.toLowerCase() === "strong" ) { 184 | window.location.search = "?" + encodeURIComponent(getText([target]).replace(/\(.+\)$/, "").replace(/(^\s*|\s*$)/g, "")); 185 | } 186 | }); 187 | 188 | var li = id("current-test-output"); 189 | li.id = ""; 190 | li.className = bad ? "fail" : "pass"; 191 | li.removeChild( li.firstChild ); 192 | li.appendChild( b ); 193 | li.appendChild( ol ); 194 | 195 | if ( bad ) { 196 | var toolbar = id("qunit-testrunner-toolbar"); 197 | if ( toolbar ) { 198 | toolbar.style.display = "block"; 199 | id("qunit-filter-pass").disabled = null; 200 | id("qunit-filter-missing").disabled = null; 201 | } 202 | } 203 | 204 | } else { 205 | for ( var i = 0; i < config.assertions.length; i++ ) { 206 | if ( !config.assertions[i].result ) { 207 | bad++; 208 | config.stats.bad++; 209 | config.moduleStats.bad++; 210 | } 211 | } 212 | } 213 | 214 | QUnit.testDone( testName, bad, config.assertions.length ); 215 | 216 | if ( !window.setTimeout && !config.queue.length ) { 217 | done(); 218 | } 219 | }); 220 | 221 | if ( window.setTimeout && !config.doneTimer ) { 222 | config.doneTimer = window.setTimeout(function(){ 223 | if ( !config.queue.length ) { 224 | done(); 225 | } else { 226 | synchronize( done ); 227 | } 228 | }, 13); 229 | } 230 | }, 231 | 232 | /** 233 | * Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through. 234 | */ 235 | expect: function(asserts) { 236 | config.expected = asserts; 237 | }, 238 | 239 | /** 240 | * Asserts true. 241 | * @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" ); 242 | */ 243 | ok: function(a, msg) { 244 | msg = escapeHtml(msg); 245 | QUnit.log(a, msg); 246 | 247 | config.assertions.push({ 248 | result: !!a, 249 | message: msg 250 | }); 251 | }, 252 | 253 | /** 254 | * Checks that the first two arguments are equal, with an optional message. 255 | * Prints out both actual and expected values. 256 | * 257 | * Prefered to ok( actual == expected, message ) 258 | * 259 | * @example equal( format("Received {0} bytes.", 2), "Received 2 bytes." ); 260 | * 261 | * @param Object actual 262 | * @param Object expected 263 | * @param String message (optional) 264 | */ 265 | equal: function(actual, expected, message) { 266 | push(expected == actual, actual, expected, message); 267 | }, 268 | 269 | notEqual: function(actual, expected, message) { 270 | push(expected != actual, actual, expected, message); 271 | }, 272 | 273 | deepEqual: function(actual, expected, message) { 274 | push(QUnit.equiv(actual, expected), actual, expected, message); 275 | }, 276 | 277 | notDeepEqual: function(actual, expected, message) { 278 | push(!QUnit.equiv(actual, expected), actual, expected, message); 279 | }, 280 | 281 | strictEqual: function(actual, expected, message) { 282 | push(expected === actual, actual, expected, message); 283 | }, 284 | 285 | notStrictEqual: function(actual, expected, message) { 286 | push(expected !== actual, actual, expected, message); 287 | }, 288 | 289 | raises: function(fn, message) { 290 | try { 291 | fn(); 292 | ok( false, message ); 293 | } 294 | catch (e) { 295 | ok( true, message ); 296 | } 297 | }, 298 | 299 | start: function() { 300 | // A slight delay, to avoid any current callbacks 301 | if ( window.setTimeout ) { 302 | window.setTimeout(function() { 303 | if ( config.timeout ) { 304 | clearTimeout(config.timeout); 305 | } 306 | 307 | config.blocking = false; 308 | process(); 309 | }, 13); 310 | } else { 311 | config.blocking = false; 312 | process(); 313 | } 314 | }, 315 | 316 | stop: function(timeout) { 317 | config.blocking = true; 318 | 319 | if ( timeout && window.setTimeout ) { 320 | config.timeout = window.setTimeout(function() { 321 | QUnit.ok( false, "Test timed out" ); 322 | QUnit.start(); 323 | }, timeout); 324 | } 325 | } 326 | 327 | }; 328 | 329 | // Backwards compatibility, deprecated 330 | QUnit.equals = QUnit.equal; 331 | QUnit.same = QUnit.deepEqual; 332 | 333 | // Maintain internal state 334 | var config = { 335 | // The queue of tests to run 336 | queue: [], 337 | 338 | // block until document ready 339 | blocking: true 340 | }; 341 | 342 | // Load paramaters 343 | (function() { 344 | var location = window.location || { search: "", protocol: "file:" }, 345 | GETParams = location.search.slice(1).split('&'); 346 | 347 | for ( var i = 0; i < GETParams.length; i++ ) { 348 | GETParams[i] = decodeURIComponent( GETParams[i] ); 349 | if ( GETParams[i] === "noglobals" ) { 350 | GETParams.splice( i, 1 ); 351 | i--; 352 | config.noglobals = true; 353 | } else if ( GETParams[i].search('=') > -1 ) { 354 | GETParams.splice( i, 1 ); 355 | i--; 356 | } 357 | } 358 | 359 | // restrict modules/tests by get parameters 360 | config.filters = GETParams; 361 | 362 | // Figure out if we're running the tests from a server or not 363 | QUnit.isLocal = !!(location.protocol === 'file:'); 364 | })(); 365 | 366 | // Expose the API as global variables, unless an 'exports' 367 | // object exists, in that case we assume we're in CommonJS 368 | if ( typeof exports === "undefined" || typeof require === "undefined" ) { 369 | extend(window, QUnit); 370 | window.QUnit = QUnit; 371 | } else { 372 | extend(exports, QUnit); 373 | exports.QUnit = QUnit; 374 | } 375 | 376 | // define these after exposing globals to keep them in these QUnit namespace only 377 | extend(QUnit, { 378 | config: config, 379 | 380 | // Initialize the configuration options 381 | init: function() { 382 | extend(config, { 383 | stats: { all: 0, bad: 0 }, 384 | moduleStats: { all: 0, bad: 0 }, 385 | started: +new Date, 386 | updateRate: 1000, 387 | blocking: false, 388 | autostart: true, 389 | autorun: false, 390 | assertions: [], 391 | filters: [], 392 | queue: [] 393 | }); 394 | 395 | var tests = id("qunit-tests"), 396 | banner = id("qunit-banner"), 397 | result = id("qunit-testresult"); 398 | 399 | if ( tests ) { 400 | tests.innerHTML = ""; 401 | } 402 | 403 | if ( banner ) { 404 | banner.className = ""; 405 | } 406 | 407 | if ( result ) { 408 | result.parentNode.removeChild( result ); 409 | } 410 | }, 411 | 412 | /** 413 | * Resets the test setup. Useful for tests that modify the DOM. 414 | */ 415 | reset: function() { 416 | if ( window.jQuery ) { 417 | jQuery("#main, #qunit-fixture").html( config.fixture ); 418 | } 419 | }, 420 | 421 | /** 422 | * Trigger an event on an element. 423 | * 424 | * @example triggerEvent( document.body, "click" ); 425 | * 426 | * @param DOMElement elem 427 | * @param String type 428 | */ 429 | triggerEvent: function( elem, type, event ) { 430 | if ( document.createEvent ) { 431 | event = document.createEvent("MouseEvents"); 432 | event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView, 433 | 0, 0, 0, 0, 0, false, false, false, false, 0, null); 434 | elem.dispatchEvent( event ); 435 | 436 | } else if ( elem.fireEvent ) { 437 | elem.fireEvent("on"+type); 438 | } 439 | }, 440 | 441 | // Safe object type checking 442 | is: function( type, obj ) { 443 | return QUnit.objectType( obj ) == type; 444 | }, 445 | 446 | objectType: function( obj ) { 447 | if (typeof obj === "undefined") { 448 | return "undefined"; 449 | 450 | // consider: typeof null === object 451 | } 452 | if (obj === null) { 453 | return "null"; 454 | } 455 | 456 | var type = Object.prototype.toString.call( obj ) 457 | .match(/^\[object\s(.*)\]$/)[1] || ''; 458 | 459 | switch (type) { 460 | case 'Number': 461 | if (isNaN(obj)) { 462 | return "nan"; 463 | } else { 464 | return "number"; 465 | } 466 | case 'String': 467 | case 'Boolean': 468 | case 'Array': 469 | case 'Date': 470 | case 'RegExp': 471 | case 'Function': 472 | return type.toLowerCase(); 473 | } 474 | if (typeof obj === "object") { 475 | return "object"; 476 | } 477 | return undefined; 478 | }, 479 | 480 | // Logging callbacks 481 | begin: function() {}, 482 | done: function(failures, total) {}, 483 | log: function(result, message) {}, 484 | testStart: function(name, testEnvironment) {}, 485 | testDone: function(name, failures, total) {}, 486 | moduleStart: function(name, testEnvironment) {}, 487 | moduleDone: function(name, failures, total) {} 488 | }); 489 | 490 | if ( typeof document === "undefined" || document.readyState === "complete" ) { 491 | config.autorun = true; 492 | } 493 | 494 | addEvent(window, "load", function() { 495 | QUnit.begin(); 496 | 497 | // Initialize the config, saving the execution queue 498 | var oldconfig = extend({}, config); 499 | QUnit.init(); 500 | extend(config, oldconfig); 501 | 502 | config.blocking = false; 503 | 504 | var userAgent = id("qunit-userAgent"); 505 | if ( userAgent ) { 506 | userAgent.innerHTML = navigator.userAgent; 507 | } 508 | 509 | var toolbar = id("qunit-testrunner-toolbar"); 510 | if ( toolbar ) { 511 | toolbar.style.display = "none"; 512 | 513 | var filter = document.createElement("input"); 514 | filter.type = "checkbox"; 515 | filter.id = "qunit-filter-pass"; 516 | filter.disabled = true; 517 | addEvent( filter, "click", function() { 518 | var li = document.getElementsByTagName("li"); 519 | for ( var i = 0; i < li.length; i++ ) { 520 | if ( li[i].className.indexOf("pass") > -1 ) { 521 | li[i].style.display = filter.checked ? "none" : ""; 522 | } 523 | } 524 | }); 525 | toolbar.appendChild( filter ); 526 | 527 | var label = document.createElement("label"); 528 | label.setAttribute("for", "qunit-filter-pass"); 529 | label.innerHTML = "Hide passed tests"; 530 | toolbar.appendChild( label ); 531 | 532 | var missing = document.createElement("input"); 533 | missing.type = "checkbox"; 534 | missing.id = "qunit-filter-missing"; 535 | missing.disabled = true; 536 | addEvent( missing, "click", function() { 537 | var li = document.getElementsByTagName("li"); 538 | for ( var i = 0; i < li.length; i++ ) { 539 | if ( li[i].className.indexOf("fail") > -1 && li[i].innerHTML.indexOf('missing test - untested code is broken code') > - 1 ) { 540 | li[i].parentNode.parentNode.style.display = missing.checked ? "none" : "block"; 541 | } 542 | } 543 | }); 544 | toolbar.appendChild( missing ); 545 | 546 | label = document.createElement("label"); 547 | label.setAttribute("for", "qunit-filter-missing"); 548 | label.innerHTML = "Hide missing tests (untested code is broken code)"; 549 | toolbar.appendChild( label ); 550 | } 551 | 552 | var main = id('main') || id('qunit-fixture'); 553 | if ( main ) { 554 | config.fixture = main.innerHTML; 555 | } 556 | 557 | if (config.autostart) { 558 | QUnit.start(); 559 | } 560 | }); 561 | 562 | function done() { 563 | if ( config.doneTimer && window.clearTimeout ) { 564 | window.clearTimeout( config.doneTimer ); 565 | config.doneTimer = null; 566 | } 567 | 568 | if ( config.queue.length ) { 569 | config.doneTimer = window.setTimeout(function(){ 570 | if ( !config.queue.length ) { 571 | done(); 572 | } else { 573 | synchronize( done ); 574 | } 575 | }, 13); 576 | 577 | return; 578 | } 579 | 580 | config.autorun = true; 581 | 582 | // Log the last module results 583 | if ( config.currentModule ) { 584 | QUnit.moduleDone( config.currentModule, config.moduleStats.bad, config.moduleStats.all ); 585 | } 586 | 587 | var banner = id("qunit-banner"), 588 | tests = id("qunit-tests"), 589 | html = ['Tests completed in ', 590 | +new Date - config.started, ' milliseconds.
      ', 591 | '', config.stats.all - config.stats.bad, ' tests of ', config.stats.all, ' passed, ', config.stats.bad,' failed.'].join(''); 592 | 593 | if ( banner ) { 594 | banner.className = (config.stats.bad ? "qunit-fail" : "qunit-pass"); 595 | } 596 | 597 | if ( tests ) { 598 | var result = id("qunit-testresult"); 599 | 600 | if ( !result ) { 601 | result = document.createElement("p"); 602 | result.id = "qunit-testresult"; 603 | result.className = "result"; 604 | tests.parentNode.insertBefore( result, tests.nextSibling ); 605 | } 606 | 607 | result.innerHTML = html; 608 | } 609 | 610 | QUnit.done( config.stats.bad, config.stats.all ); 611 | } 612 | 613 | function validTest( name ) { 614 | var i = config.filters.length, 615 | run = false; 616 | 617 | if ( !i ) { 618 | return true; 619 | } 620 | 621 | while ( i-- ) { 622 | var filter = config.filters[i], 623 | not = filter.charAt(0) == '!'; 624 | 625 | if ( not ) { 626 | filter = filter.slice(1); 627 | } 628 | 629 | if ( name.indexOf(filter) !== -1 ) { 630 | return !not; 631 | } 632 | 633 | if ( not ) { 634 | run = true; 635 | } 636 | } 637 | 638 | return run; 639 | } 640 | 641 | function escapeHtml(s) { 642 | s = s === null ? "" : s + ""; 643 | return s.replace(/[\&"<>\\]/g, function(s) { 644 | switch(s) { 645 | case "&": return "&"; 646 | case "\\": return "\\\\"; 647 | case '"': return '\"'; 648 | case "<": return "<"; 649 | case ">": return ">"; 650 | default: return s; 651 | } 652 | }); 653 | } 654 | 655 | function push(result, actual, expected, message) { 656 | message = escapeHtml(message) || (result ? "okay" : "failed"); 657 | message = '' + message + ""; 658 | expected = escapeHtml(QUnit.jsDump.parse(expected)); 659 | actual = escapeHtml(QUnit.jsDump.parse(actual)); 660 | var output = message + ', expected: ' + expected + ''; 661 | if (actual != expected) { 662 | output += ' result: ' + actual + ', diff: ' + QUnit.diff(expected, actual); 663 | } 664 | 665 | // can't use ok, as that would double-escape messages 666 | QUnit.log(result, output); 667 | config.assertions.push({ 668 | result: !!result, 669 | message: output 670 | }); 671 | } 672 | 673 | function synchronize( callback ) { 674 | config.queue.push( callback ); 675 | 676 | if ( config.autorun && !config.blocking ) { 677 | process(); 678 | } 679 | } 680 | 681 | function process() { 682 | var start = (new Date()).getTime(); 683 | 684 | while ( config.queue.length && !config.blocking ) { 685 | if ( config.updateRate <= 0 || (((new Date()).getTime() - start) < config.updateRate) ) { 686 | config.queue.shift()(); 687 | 688 | } else { 689 | setTimeout( process, 13 ); 690 | break; 691 | } 692 | } 693 | } 694 | 695 | function saveGlobal() { 696 | config.pollution = []; 697 | 698 | if ( config.noglobals ) { 699 | for ( var key in window ) { 700 | config.pollution.push( key ); 701 | } 702 | } 703 | } 704 | 705 | function checkPollution( name ) { 706 | var old = config.pollution; 707 | saveGlobal(); 708 | 709 | var newGlobals = diff( old, config.pollution ); 710 | if ( newGlobals.length > 0 ) { 711 | ok( false, "Introduced global variable(s): " + newGlobals.join(", ") ); 712 | config.expected++; 713 | } 714 | 715 | var deletedGlobals = diff( config.pollution, old ); 716 | if ( deletedGlobals.length > 0 ) { 717 | ok( false, "Deleted global variable(s): " + deletedGlobals.join(", ") ); 718 | config.expected++; 719 | } 720 | } 721 | 722 | // returns a new Array with the elements that are in a but not in b 723 | function diff( a, b ) { 724 | var result = a.slice(); 725 | for ( var i = 0; i < result.length; i++ ) { 726 | for ( var j = 0; j < b.length; j++ ) { 727 | if ( result[i] === b[j] ) { 728 | result.splice(i, 1); 729 | i--; 730 | break; 731 | } 732 | } 733 | } 734 | return result; 735 | } 736 | 737 | function fail(message, exception, callback) { 738 | if ( typeof console !== "undefined" && console.error && console.warn ) { 739 | console.error(message); 740 | console.error(exception); 741 | console.warn(callback.toString()); 742 | 743 | } else if ( window.opera && opera.postError ) { 744 | opera.postError(message, exception, callback.toString); 745 | } 746 | } 747 | 748 | function extend(a, b) { 749 | for ( var prop in b ) { 750 | a[prop] = b[prop]; 751 | } 752 | 753 | return a; 754 | } 755 | 756 | function addEvent(elem, type, fn) { 757 | if ( elem.addEventListener ) { 758 | elem.addEventListener( type, fn, false ); 759 | } else if ( elem.attachEvent ) { 760 | elem.attachEvent( "on" + type, fn ); 761 | } else { 762 | fn(); 763 | } 764 | } 765 | 766 | function id(name) { 767 | return !!(typeof document !== "undefined" && document && document.getElementById) && 768 | document.getElementById( name ); 769 | } 770 | 771 | // Test for equality any JavaScript type. 772 | // Discussions and reference: http://philrathe.com/articles/equiv 773 | // Test suites: http://philrathe.com/tests/equiv 774 | // Author: Philippe Rathé 775 | QUnit.equiv = function () { 776 | 777 | var innerEquiv; // the real equiv function 778 | var callers = []; // stack to decide between skip/abort functions 779 | var parents = []; // stack to avoiding loops from circular referencing 780 | 781 | // Call the o related callback with the given arguments. 782 | function bindCallbacks(o, callbacks, args) { 783 | var prop = QUnit.objectType(o); 784 | if (prop) { 785 | if (QUnit.objectType(callbacks[prop]) === "function") { 786 | return callbacks[prop].apply(callbacks, args); 787 | } else { 788 | return callbacks[prop]; // or undefined 789 | } 790 | } 791 | } 792 | 793 | var callbacks = function () { 794 | 795 | // for string, boolean, number and null 796 | function useStrictEquality(b, a) { 797 | if (b instanceof a.constructor || a instanceof b.constructor) { 798 | // to catch short annotaion VS 'new' annotation of a declaration 799 | // e.g. var i = 1; 800 | // var j = new Number(1); 801 | return a == b; 802 | } else { 803 | return a === b; 804 | } 805 | } 806 | 807 | return { 808 | "string": useStrictEquality, 809 | "boolean": useStrictEquality, 810 | "number": useStrictEquality, 811 | "null": useStrictEquality, 812 | "undefined": useStrictEquality, 813 | 814 | "nan": function (b) { 815 | return isNaN(b); 816 | }, 817 | 818 | "date": function (b, a) { 819 | return QUnit.objectType(b) === "date" && a.valueOf() === b.valueOf(); 820 | }, 821 | 822 | "regexp": function (b, a) { 823 | return QUnit.objectType(b) === "regexp" && 824 | a.source === b.source && // the regex itself 825 | a.global === b.global && // and its modifers (gmi) ... 826 | a.ignoreCase === b.ignoreCase && 827 | a.multiline === b.multiline; 828 | }, 829 | 830 | // - skip when the property is a method of an instance (OOP) 831 | // - abort otherwise, 832 | // initial === would have catch identical references anyway 833 | "function": function () { 834 | var caller = callers[callers.length - 1]; 835 | return caller !== Object && 836 | typeof caller !== "undefined"; 837 | }, 838 | 839 | "array": function (b, a) { 840 | var i, j, loop; 841 | var len; 842 | 843 | // b could be an object literal here 844 | if ( ! (QUnit.objectType(b) === "array")) { 845 | return false; 846 | } 847 | 848 | len = a.length; 849 | if (len !== b.length) { // safe and faster 850 | return false; 851 | } 852 | 853 | //track reference to avoid circular references 854 | parents.push(a); 855 | for (i = 0; i < len; i++) { 856 | loop = false; 857 | for(j=0;j= 0) { 1002 | type = "array"; 1003 | } else { 1004 | type = typeof obj; 1005 | } 1006 | return type; 1007 | }, 1008 | separator:function() { 1009 | return this.multiline ? this.HTML ? '
      ' : '\n' : this.HTML ? ' ' : ' '; 1010 | }, 1011 | indent:function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing 1012 | if ( !this.multiline ) 1013 | return ''; 1014 | var chr = this.indentChar; 1015 | if ( this.HTML ) 1016 | chr = chr.replace(/\t/g,' ').replace(/ /g,' '); 1017 | return Array( this._depth_ + (extra||0) ).join(chr); 1018 | }, 1019 | up:function( a ) { 1020 | this._depth_ += a || 1; 1021 | }, 1022 | down:function( a ) { 1023 | this._depth_ -= a || 1; 1024 | }, 1025 | setParser:function( name, parser ) { 1026 | this.parsers[name] = parser; 1027 | }, 1028 | // The next 3 are exposed so you can use them 1029 | quote:quote, 1030 | literal:literal, 1031 | join:join, 1032 | // 1033 | _depth_: 1, 1034 | // This is the list of parsers, to modify them, use jsDump.setParser 1035 | parsers:{ 1036 | window: '[Window]', 1037 | document: '[Document]', 1038 | error:'[ERROR]', //when no parser is found, shouldn't happen 1039 | unknown: '[Unknown]', 1040 | 'null':'null', 1041 | undefined:'undefined', 1042 | 'function':function( fn ) { 1043 | var ret = 'function', 1044 | name = 'name' in fn ? fn.name : (reName.exec(fn)||[])[1];//functions never have name in IE 1045 | if ( name ) 1046 | ret += ' ' + name; 1047 | ret += '('; 1048 | 1049 | ret = [ ret, this.parse( fn, 'functionArgs' ), '){'].join(''); 1050 | return join( ret, this.parse(fn,'functionCode'), '}' ); 1051 | }, 1052 | array: array, 1053 | nodelist: array, 1054 | arguments: array, 1055 | object:function( map ) { 1056 | var ret = [ ]; 1057 | this.up(); 1058 | for ( var key in map ) 1059 | ret.push( this.parse(key,'key') + ': ' + this.parse(map[key]) ); 1060 | this.down(); 1061 | return join( '{', ret, '}' ); 1062 | }, 1063 | node:function( node ) { 1064 | var open = this.HTML ? '<' : '<', 1065 | close = this.HTML ? '>' : '>'; 1066 | 1067 | var tag = node.nodeName.toLowerCase(), 1068 | ret = open + tag; 1069 | 1070 | for ( var a in this.DOMAttrs ) { 1071 | var val = node[this.DOMAttrs[a]]; 1072 | if ( val ) 1073 | ret += ' ' + a + '=' + this.parse( val, 'attribute' ); 1074 | } 1075 | return ret + close + open + '/' + tag + close; 1076 | }, 1077 | functionArgs:function( fn ) {//function calls it internally, it's the arguments part of the function 1078 | var l = fn.length; 1079 | if ( !l ) return ''; 1080 | 1081 | var args = Array(l); 1082 | while ( l-- ) 1083 | args[l] = String.fromCharCode(97+l);//97 is 'a' 1084 | return ' ' + args.join(', ') + ' '; 1085 | }, 1086 | key:quote, //object calls it internally, the key part of an item in a map 1087 | functionCode:'[code]', //function calls it internally, it's the content of the function 1088 | attribute:quote, //node calls it internally, it's an html attribute value 1089 | string:quote, 1090 | date:quote, 1091 | regexp:literal, //regex 1092 | number:literal, 1093 | 'boolean':literal 1094 | }, 1095 | DOMAttrs:{//attributes to dump from nodes, name=>realName 1096 | id:'id', 1097 | name:'name', 1098 | 'class':'className' 1099 | }, 1100 | HTML:false,//if true, entities are escaped ( <, >, \t, space and \n ) 1101 | indentChar:' ',//indentation unit 1102 | multiline:false //if true, items in a collection, are separated by a \n, else just a space. 1103 | }; 1104 | 1105 | return jsDump; 1106 | })(); 1107 | 1108 | // from Sizzle.js 1109 | function getText( elems ) { 1110 | var ret = "", elem; 1111 | 1112 | for ( var i = 0; elems[i]; i++ ) { 1113 | elem = elems[i]; 1114 | 1115 | // Get the text from text nodes and CDATA nodes 1116 | if ( elem.nodeType === 3 || elem.nodeType === 4 ) { 1117 | ret += elem.nodeValue; 1118 | 1119 | // Traverse everything else, except comment nodes 1120 | } else if ( elem.nodeType !== 8 ) { 1121 | ret += getText( elem.childNodes ); 1122 | } 1123 | } 1124 | 1125 | return ret; 1126 | }; 1127 | 1128 | /* 1129 | * Javascript Diff Algorithm 1130 | * By John Resig (http://ejohn.org/) 1131 | * Modified by Chu Alan "sprite" 1132 | * 1133 | * Released under the MIT license. 1134 | * 1135 | * More Info: 1136 | * http://ejohn.org/projects/javascript-diff-algorithm/ 1137 | * 1138 | * Usage: QUnit.diff(expected, actual) 1139 | * 1140 | * QUnit.diff("the quick brown fox jumped over", "the quick fox jumps over") == "the quick brown fox jumped jumps over" 1141 | */ 1142 | QUnit.diff = (function() { 1143 | function diff(o, n){ 1144 | var ns = new Object(); 1145 | var os = new Object(); 1146 | 1147 | for (var i = 0; i < n.length; i++) { 1148 | if (ns[n[i]] == null) 1149 | ns[n[i]] = { 1150 | rows: new Array(), 1151 | o: null 1152 | }; 1153 | ns[n[i]].rows.push(i); 1154 | } 1155 | 1156 | for (var i = 0; i < o.length; i++) { 1157 | if (os[o[i]] == null) 1158 | os[o[i]] = { 1159 | rows: new Array(), 1160 | n: null 1161 | }; 1162 | os[o[i]].rows.push(i); 1163 | } 1164 | 1165 | for (var i in ns) { 1166 | if (ns[i].rows.length == 1 && typeof(os[i]) != "undefined" && os[i].rows.length == 1) { 1167 | n[ns[i].rows[0]] = { 1168 | text: n[ns[i].rows[0]], 1169 | row: os[i].rows[0] 1170 | }; 1171 | o[os[i].rows[0]] = { 1172 | text: o[os[i].rows[0]], 1173 | row: ns[i].rows[0] 1174 | }; 1175 | } 1176 | } 1177 | 1178 | for (var i = 0; i < n.length - 1; i++) { 1179 | if (n[i].text != null && n[i + 1].text == null && n[i].row + 1 < o.length && o[n[i].row + 1].text == null && 1180 | n[i + 1] == o[n[i].row + 1]) { 1181 | n[i + 1] = { 1182 | text: n[i + 1], 1183 | row: n[i].row + 1 1184 | }; 1185 | o[n[i].row + 1] = { 1186 | text: o[n[i].row + 1], 1187 | row: i + 1 1188 | }; 1189 | } 1190 | } 1191 | 1192 | for (var i = n.length - 1; i > 0; i--) { 1193 | if (n[i].text != null && n[i - 1].text == null && n[i].row > 0 && o[n[i].row - 1].text == null && 1194 | n[i - 1] == o[n[i].row - 1]) { 1195 | n[i - 1] = { 1196 | text: n[i - 1], 1197 | row: n[i].row - 1 1198 | }; 1199 | o[n[i].row - 1] = { 1200 | text: o[n[i].row - 1], 1201 | row: i - 1 1202 | }; 1203 | } 1204 | } 1205 | 1206 | return { 1207 | o: o, 1208 | n: n 1209 | }; 1210 | } 1211 | 1212 | return function(o, n){ 1213 | o = o.replace(/\s+$/, ''); 1214 | n = n.replace(/\s+$/, ''); 1215 | var out = diff(o == "" ? [] : o.split(/\s+/), n == "" ? [] : n.split(/\s+/)); 1216 | 1217 | var str = ""; 1218 | 1219 | var oSpace = o.match(/\s+/g); 1220 | if (oSpace == null) { 1221 | oSpace = [" "]; 1222 | } 1223 | else { 1224 | oSpace.push(" "); 1225 | } 1226 | var nSpace = n.match(/\s+/g); 1227 | if (nSpace == null) { 1228 | nSpace = [" "]; 1229 | } 1230 | else { 1231 | nSpace.push(" "); 1232 | } 1233 | 1234 | if (out.n.length == 0) { 1235 | for (var i = 0; i < out.o.length; i++) { 1236 | str += '' + out.o[i] + oSpace[i] + ""; 1237 | } 1238 | } 1239 | else { 1240 | if (out.n[0].text == null) { 1241 | for (n = 0; n < out.o.length && out.o[n].text == null; n++) { 1242 | str += '' + out.o[n] + oSpace[n] + ""; 1243 | } 1244 | } 1245 | 1246 | for (var i = 0; i < out.n.length; i++) { 1247 | if (out.n[i].text == null) { 1248 | str += '' + out.n[i] + nSpace[i] + ""; 1249 | } 1250 | else { 1251 | var pre = ""; 1252 | 1253 | for (n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++) { 1254 | pre += '' + out.o[n] + oSpace[n] + ""; 1255 | } 1256 | str += " " + out.n[i].text + nSpace[i] + pre; 1257 | } 1258 | } 1259 | } 1260 | 1261 | return str; 1262 | } 1263 | })(); 1264 | 1265 | })(this); 1266 | -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/_test/tests.js: -------------------------------------------------------------------------------- 1 | // documentation on writing tests here: http://docs.jquery.com/QUnit 2 | // example tests: https://github.com/jquery/qunit/blob/master/test/same.js 3 | 4 | // below are some general tests but feel free to delete them. 5 | 6 | module("example tests"); 7 | test('test1',function(){ 8 | expect(1); 9 | equals(true, true); 10 | }); 11 | -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/common/css/style.css: -------------------------------------------------------------------------------- 1 | /** 2 | * HTML5 ✰ Boilerplate 3 | * 4 | * style.css contains a reset, font normalization and some base styles. 5 | * 6 | * Credit is left where credit is due. 7 | * Much inspiration was taken from these projects: 8 | * - yui.yahooapis.com/2.8.1/build/base/base.css 9 | * - camendesign.com/design/ 10 | * - praegnanz.de/weblog/htmlcssjs-kickstart 11 | */ 12 | 13 | 14 | /** 15 | * html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline) 16 | * v1.6.1 2010-09-17 | Authors: Eric Meyer & Richard Clark 17 | * html5doctor.com/html-5-reset-stylesheet/ 18 | */ 19 | 20 | html, body, div, span, object, iframe, 21 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 22 | abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, 23 | small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, 24 | fieldset, form, label, legend, 25 | table, caption, tbody, tfoot, thead, tr, th, td, 26 | article, aside, canvas, details, figcaption, figure, 27 | footer, header, hgroup, menu, nav, section, summary, 28 | time, mark, audio, video { 29 | margin: 0; 30 | padding: 0; 31 | border: 0; 32 | font-size: 100%; 33 | font: inherit; 34 | vertical-align: baseline; 35 | } 36 | 37 | article, aside, details, figcaption, figure, 38 | footer, header, hgroup, menu, nav, section { 39 | display: block; 40 | } 41 | 42 | blockquote, q { quotes: none; } 43 | 44 | blockquote:before, blockquote:after, 45 | q:before, q:after { content: ""; content: none; } 46 | 47 | ins { background-color: #ff9; color: #000; text-decoration: none; } 48 | 49 | mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; } 50 | 51 | del { text-decoration: line-through; } 52 | 53 | abbr[title], dfn[title] { border-bottom: 1px dotted; cursor: help; } 54 | 55 | table { border-collapse: collapse; border-spacing: 0; } 56 | 57 | hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; } 58 | 59 | input, select { vertical-align: middle; } 60 | 61 | 62 | 63 | /** 64 | * Font normalization inspired by YUI Library's fonts.css: developer.yahoo.com/yui/ 65 | */ 66 | 67 | 68 | body { font:13px/1.231 sans-serif; *font-size:small; } /* Hack retained to preserve specificity */ 69 | select, input, textarea, button { font:99% sans-serif; } 70 | 71 | /* Normalize monospace sizing: 72 | en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome */ 73 | pre, code, kbd, samp { font-family: monospace, sans-serif; } 74 | 75 | 76 | /** 77 | * Minimal base styles. 78 | */ 79 | 80 | /* Prevent mobile zooming while remain desktop zooming: github.com/shichuan/mobile-html5-boilerplate/issues/closed#issue/14 */ 81 | html { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } 82 | 83 | /* Accessible focus treatment: people.opera.com/patrickl/experiments/keyboard/test */ 84 | a:hover, a:active { outline: none; } 85 | 86 | ul, ol { margin-left: 2em; } 87 | ol { list-style-type: decimal; } 88 | 89 | /* Remove margins for navigation lists */ 90 | nav ul, nav li { margin: 0; list-style:none; list-style-image: none; } 91 | 92 | small { font-size: 85%; } 93 | strong, th { font-weight: bold; } 94 | 95 | td { vertical-align: top; } 96 | 97 | /* Set sub, sup without affecting line-height: gist.github.com/413930 */ 98 | sub, sup { font-size: 75%; line-height: 0; position: relative; } 99 | sup { top: -0.5em; } 100 | sub { bottom: -0.25em; } 101 | 102 | pre { 103 | /* www.pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap/ */ 104 | white-space: pre; white-space: pre-wrap; word-wrap: break-word; 105 | padding: 15px; 106 | } 107 | 108 | textarea { overflow: auto; } /* www.sitepoint.com/blogs/2010/08/20/ie-remove-textarea-scrollbars/ */ 109 | 110 | .iem7 legend { margin-left: -7px; } 111 | 112 | /* Align checkboxes, radios, text inputs with their label by: Thierry Koblentz tjkdesign.com/ez-css/css/base.css */ 113 | input[type="radio"] { vertical-align: text-bottom; } 114 | input[type="checkbox"] { vertical-align: bottom; } 115 | .iem7 input[type="checkbox"] { vertical-align: baseline; } 116 | 117 | /* Hand cursor on clickable input elements */ 118 | label, input[type="button"], input[type="submit"], input[type="image"], button { cursor: pointer; } 119 | 120 | /* Webkit browsers add a 2px margin outside the chrome of form elements */ 121 | button, input, select, textarea { margin: 0; } 122 | 123 | /* Colors for form validity */ 124 | input:valid, textarea:valid { } 125 | input:invalid, textarea:invalid { 126 | border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red; 127 | } 128 | .no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; } 129 | 130 | 131 | /* These selection declarations have to be separate 132 | No text-shadow: twitter.com/miketaylr/status/12228805301 133 | Also: hot pink! */ 134 | ::-moz-selection{ background: #FF5E99; color:#fff; text-shadow: none; } 135 | ::selection { background:#FF5E99; color:#fff; text-shadow: none; } 136 | 137 | /* j.mp/webkit-tap-highlight-color */ 138 | a:link { -webkit-tap-highlight-color: #FF5E99; } 139 | 140 | /* Make buttons play nice in IE: 141 | www.viget.com/inspire/styling-the-button-element-in-internet-explorer/ */ 142 | button { width: auto; overflow: visible; } 143 | 144 | /* Bicubic resizing for non-native sized IMG: 145 | code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ */ 146 | .iem7 img { -ms-interpolation-mode: bicubic; } 147 | 148 | 149 | /** 150 | * You might tweak these.. 151 | */ 152 | 153 | body, select, input, textarea { 154 | /* #444 looks better than black: twitter.com/H_FJ/statuses/11800719859 */ 155 | color: #444; 156 | /* Set your base font here, to apply evenly */ 157 | /* font-family: Georgia, serif; */ 158 | } 159 | 160 | /* Headers (h1, h2, etc) have no default font-size or margin; define those yourself */ 161 | h1, h2, h3, h4, h5, h6 { font-weight: bold; } 162 | 163 | a, a:active, a:visited { color: #607890; } 164 | a:hover { color: #036; } 165 | 166 | 167 | /* 168 | * Helper classes 169 | */ 170 | 171 | /* prevent callout */ 172 | .nocallout {-webkit-touch-callout: none;} 173 | 174 | /* Text overflow with ellipsis */ 175 | .ellipsis { 176 | text-overflow: ellipsis; 177 | overflow: hidden; 178 | white-space: nowrap; 179 | } 180 | 181 | /* A hack for HTML5 contenteditable attribute on mobile */ 182 | textarea.contenteditable {-webkit-appearance: none;} 183 | 184 | /* A workaround for S60 3.x and 5.0 devices which do not animated gif images if they have been set as display: none */ 185 | .gifhidden {position: absolute; left: -100%;} 186 | 187 | /* For image replacement */ 188 | .ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; } 189 | 190 | /* Hide for both screenreaders and browsers: 191 | css-discuss.incutio.com/wiki/Screenreader_Visibility */ 192 | .hidden { display: none; visibility: hidden; } 193 | 194 | /* Hide only visually, but have it available for screenreaders: by Jon Neal. 195 | www.webaim.org/techniques/css/invisiblecontent/ & j.mp/visuallyhidden */ 196 | .visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } 197 | /* Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: drupal.org/node/897638 */ 198 | .visuallyhidden.focusable:active, 199 | .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; } 200 | 201 | /* Hide visually and from screenreaders, but maintain layout */ 202 | .invisible { visibility: hidden; } 203 | 204 | /* The Magnificent Clearfix: Updated to prevent margin-collapsing on child elements. 205 | j.mp/bestclearfix */ 206 | .clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; overflow: hidden; } 207 | .clearfix:after { clear: both; } 208 | /* Fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin-padding-bottom-of-page */ 209 | .clearfix { zoom: 1; } 210 | 211 | 212 | /** 213 | * Primary Styles for mobile 214 | * Author: Takeshi Takatsudo (takazudo[at]gmail.com) 215 | */ 216 | 217 | /** 218 | * global things 219 | */ 220 | .mod-all{ 221 | font-size:1.1em; 222 | line-height:1.5; 223 | padding:10px 10px 0; 224 | } 225 | /** 226 | * .mod-header 227 | */ 228 | .mod-header{ 229 | color:#fff; 230 | background:#444; 231 | margin:-10px -10px 0; 232 | padding:10px; 233 | font-size:1.6em; 234 | } 235 | 236 | /** 237 | * .mod-bread 238 | */ 239 | .mod-bread{ 240 | padding:.5em 10px .5em; 241 | margin:0 -10px 0; 242 | border-bottom:1px solid #444; 243 | } 244 | 245 | /** 246 | * .mod-margin 247 | */ 248 | .mod-margin{ 249 | height:.75em; 250 | overflow:hidden; 251 | } 252 | 253 | /** 254 | * .mod-mainvisual 255 | */ 256 | .mod-mainvisual{ 257 | height:293px; 258 | margin:0 -10px 10px; 259 | background:url(/common/img/mod-mainvisual/peco.jpg) no-repeat 50% 50%; 260 | position:relative; 261 | overflow:hidden; 262 | min-width:320px; 263 | } 264 | .mod-mainvisual div{ 265 | position:absolute; 266 | left:50%; 267 | top:0; 268 | height:100%; 269 | width:1px; 270 | } 271 | .mod-mainvisual img{ 272 | position:absolute; 273 | width:480px; 274 | height:100%; 275 | left:-240px; 276 | top:0; 277 | } 278 | 279 | 280 | /** 281 | * .mod-h 282 | */ 283 | .mod-h{ 284 | border-left:8px solid #444; 285 | padding:2px 0 0 10px; 286 | margin:0 0 .5em; 287 | } 288 | 289 | /** 290 | * .mod-h2 291 | */ 292 | .mod-h2{ 293 | padding:0 0 .5em; 294 | } 295 | 296 | /** 297 | * .mod-p 298 | */ 299 | .mod-p{ 300 | padding:0 0 .75em; 301 | } 302 | 303 | /** 304 | * .mod-ul 305 | */ 306 | .mod-ul{ 307 | padding:0 0 .5em; 308 | } 309 | .mod-ul li{ 310 | padding:0 0 .25em; 311 | } 312 | 313 | /** 314 | * .mod-img 315 | */ 316 | .mod-img{ 317 | text-align:center; 318 | padding:0 0 .75em; 319 | } 320 | .mod-img img{ 321 | vertical-align:baseline; 322 | } 323 | 324 | /** 325 | * .mod-contact 326 | */ 327 | .mod-contact{ 328 | padding:15px; 329 | overflow:hidden; /* clear float */ 330 | margin:0 0 .75em; 331 | border:1px solid #444; 332 | -o-border-radius: 5px; 333 | -ms-border-radius: 5px; 334 | -moz-border-radius: 5px; 335 | -webkit-border-radius: 5px; 336 | border-radius: 5px; 337 | } 338 | .mod-contact img{ 339 | vertical-align:top; /* kill img space */ 340 | } 341 | .mod-contact .h{ 342 | padding:0 0 .5em; 343 | } 344 | .mod-contact .img{ 345 | float:right; 346 | padding:0 0 10px 10px; 347 | } 348 | .mod-contact .p{ 349 | overflow:hidden; 350 | padding:0 0 8px; 351 | } 352 | .mod-contact .nav{ 353 | clear:both; 354 | } 355 | 356 | /** 357 | * .mod-goup 358 | */ 359 | .mod-goup{ 360 | text-align:right; 361 | padding:.5em 0 .5em; 362 | } 363 | 364 | /** 365 | * .mod-footer 366 | */ 367 | .mod-footer{ 368 | background:#666; 369 | margin:0 -10px; 370 | padding:.5em 10px .5em; 371 | color:#fff; 372 | } 373 | 374 | 375 | /** 376 | * debug utils 377 | */ 378 | .debug-note{ 379 | background:orange; 380 | color:#000; 381 | font-weight:bold; 382 | letter-spacing:1px; 383 | padding:0 10px; 384 | } 385 | 386 | 387 | /* 388 | * Media queries for responsive design https://github.com/shichuan/mobile-html5-boilerplate/wiki/The-Style 389 | */ 390 | 391 | 392 | /* Styles for desktop and large screen ----------- */ 393 | 394 | /*styles for 800px and up!*/ 395 | @media only screen and (min-width: 800px) { 396 | /* Styles */ 397 | }/*/mediaquery*/ 398 | 399 | 400 | /* iPhone 4, Opera Mobile 11 and other high pixel ratio devices ----------- */ 401 | @media 402 | only screen and (-webkit-min-device-pixel-ratio: 1.5), 403 | only screen and (-o-min-device-pixel-ratio: 3/2), 404 | only screen and (min-device-pixel-ratio: 1.5) { 405 | /* Styles */ 406 | } 407 | -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/common/img/_dummy/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-demoSite/common/img/_dummy/1.png -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/common/img/_dummy/grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-demoSite/common/img/_dummy/grid.png -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/common/img/arrows/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-demoSite/common/img/arrows/.gitignore -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/common/img/buttons/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-demoSite/common/img/buttons/.gitignore -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/common/img/icons/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-demoSite/common/img/icons/.gitignore -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/common/img/misc/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-demoSite/common/img/misc/.gitignore -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/common/img/mod-mainvisual/peco.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-demoSite/common/img/mod-mainvisual/peco.jpg -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/common/js/common.js: -------------------------------------------------------------------------------- 1 | (function(){ // start encapsulation 2 | 3 | // paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/ 4 | window.log = function(){ 5 | log.history = log.history || []; // store logs to an array for reference 6 | log.history.push(arguments); 7 | if(this.console) { 8 | arguments.callee = arguments.callee.caller; 9 | console.log( Array.prototype.slice.call(arguments) ); 10 | } 11 | }; 12 | 13 | // make it safe to use console.log always 14 | (function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();)b[a]=b[a]||c})(window.console=window.console||{}); 15 | 16 | Modernizr.load([ 17 | // load jQuery 18 | { 19 | load: 'https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.js', 20 | callback: function (url, result, key) { 21 | if (!window.jQuery) { 22 | Modernizr.load('/common/js/libs/jquery-1.5.2.min.js'); 23 | } 24 | } 25 | }, 26 | // load other scripts 27 | { 28 | load: [ 29 | '/common/js/libs/mbp.js', 30 | '/common/js/mylibs/jquery.tinyscroller.js' 31 | ], 32 | complete: commonDOMContentLoaded 33 | } 34 | ]); 35 | 36 | function commonDOMContentLoaded(){ 37 | 38 | // iOS scale bug fix 39 | MBP.scaleFix(); 40 | 41 | /* === write all common $(document).ready here === */ 42 | jQuery(function($, undefined){ 43 | 44 | // my smooth scroller 45 | $('a[href^=#]').tinyscrollable(); 46 | 47 | }); 48 | 49 | } // end of commonDOMContentLoaded 50 | 51 | })(); // end encapsulation 52 | -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/common/js/libs/mbp.js: -------------------------------------------------------------------------------- 1 | /* 2 | * MBP - Mobile boilerplate helper functions 3 | */ 4 | (function(document){ 5 | 6 | window.MBP = window.MBP || {}; 7 | 8 | // Fix for iPhone viewport scale bug 9 | // http://www.blog.highub.com/mobile-2/a-fix-for-iphone-viewport-scale-bug/ 10 | 11 | MBP.viewportmeta = document.querySelector && document.querySelector('meta[name="viewport"]'); 12 | MBP.ua = navigator.userAgent; 13 | 14 | MBP.scaleFix = function () { 15 | if (MBP.viewportmeta && /iPhone|iPad/.test(MBP.ua) && !/Opera Mini/.test(MBP.ua)) { 16 | MBP.viewportmeta.content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0"; 17 | document.addEventListener("gesturestart", MBP.gestureStart, false); 18 | } 19 | }; 20 | MBP.gestureStart = function () { 21 | MBP.viewportmeta.content = "width=device-width, minimum-scale=0.25, maximum-scale=1.6"; 22 | }; 23 | 24 | 25 | // Hide URL Bar for iOS 26 | // http://remysharp.com/2010/08/05/doing-it-right-skipping-the-iphone-url-bar/ 27 | 28 | MBP.hideUrlBar = function () { 29 | /iPhone/.test(MBP.ua) && !pageYOffset && !location.hash && setTimeout(function () { 30 | window.scrollTo(0, 1); 31 | }, 1000); 32 | }; 33 | 34 | 35 | // Fast Buttons - read wiki below before using 36 | // https://github.com/shichuan/mobile-html5-boilerplate/wiki/JavaScript-Helper 37 | 38 | MBP.fastButton = function (element, handler) { 39 | this.element = element; 40 | this.handler = handler; 41 | if (element.addEventListener) { 42 | element.addEventListener('touchstart', this, false); 43 | element.addEventListener('click', this, false); 44 | } 45 | }; 46 | 47 | MBP.fastButton.prototype.handleEvent = function(event) { 48 | switch (event.type) { 49 | case 'touchstart': this.onTouchStart(event); break; 50 | case 'touchmove': this.onTouchMove(event); break; 51 | case 'touchend': this.onClick(event); break; 52 | case 'click': this.onClick(event); break; 53 | } 54 | }; 55 | 56 | MBP.fastButton.prototype.onTouchStart = function(event) { 57 | event.stopPropagation(); 58 | this.element.addEventListener('touchend', this, false); 59 | document.body.addEventListener('touchmove', this, false); 60 | this.startX = event.touches[0].clientX; 61 | this.startY = event.touches[0].clientY; 62 | this.element.style.backgroundColor = "rgba(0,0,0,.7)"; 63 | }; 64 | 65 | MBP.fastButton.prototype.onTouchMove = function(event) { 66 | if(Math.abs(event.touches[0].clientX - this.startX) > 10 || Math.abs(event.touches[0].clientY - this.startY) > 10) { 67 | this.reset(); 68 | } 69 | }; 70 | 71 | MBP.fastButton.prototype.onClick = function(event) { 72 | event.stopPropagation(); 73 | this.reset(); 74 | this.handler(event); 75 | if(event.type == 'touchend') { 76 | MBP.preventGhostClick(this.startX, this.startY); 77 | } 78 | this.element.style.backgroundColor = ""; 79 | }; 80 | 81 | MBP.fastButton.prototype.reset = function() { 82 | this.element.removeEventListener('touchend', this, false); 83 | document.body.removeEventListener('touchmove', this, false); 84 | this.element.style.backgroundColor = ""; 85 | }; 86 | 87 | MBP.preventGhostClick = function (x, y) { 88 | MBP.coords.push(x, y); 89 | window.setTimeout(function (){ 90 | MBP.coords.splice(0, 2); 91 | }, 2500); 92 | }; 93 | 94 | MBP.ghostClickHandler = function (event) { 95 | for(var i = 0, len = MBP.coords.length; i < len; i += 2) { 96 | var x = MBP.coords[i]; 97 | var y = MBP.coords[i + 1]; 98 | if(Math.abs(event.clientX - x) < 25 && Math.abs(event.clientY - y) < 25) { 99 | event.stopPropagation(); 100 | event.preventDefault(); 101 | } 102 | } 103 | }; 104 | 105 | if (document.addEventListener) { 106 | document.addEventListener('click', MBP.ghostClickHandler, true); 107 | } 108 | 109 | MBP.coords = []; 110 | 111 | 112 | // iOS Startup Image 113 | // https://github.com/shichuan/mobile-html5-boilerplate/issues#issue/2 114 | 115 | MBP.splash = function () { 116 | var filename = navigator.platform === 'iPad' ? 'h/' : 'l/'; 117 | document.write('' ); 118 | }; 119 | 120 | 121 | // Autogrow 122 | // http://googlecode.blogspot.com/2009/07/gmail-for-mobile-html5-series.html 123 | 124 | MBP.autogrow = function (element, lh) { 125 | 126 | function handler(e){ 127 | var newHeight = this.scrollHeight, 128 | currentHeight = this.clientHeight; 129 | if (newHeight > currentHeight) { 130 | this.style.height = newHeight + 3 * textLineHeight + "px"; 131 | } 132 | } 133 | 134 | var setLineHeight = (lh) ? lh : 12, 135 | textLineHeight = element.currentStyle ? element.currentStyle.lineHeight : 136 | getComputedStyle(element, null).lineHeight; 137 | 138 | textLineHeight = (textLineHeight.indexOf("px") == -1) ? setLineHeight : 139 | parseInt(textLineHeight, 10); 140 | 141 | element.style.overflow = "hidden"; 142 | element.addEventListener ? element.addEventListener('keyup', handler, false) : 143 | element.attachEvent('onkeyup', handler); 144 | }; 145 | 146 | })(document); 147 | 148 | -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/common/js/libs/modernizr-custom.js: -------------------------------------------------------------------------------- 1 | /* Modernizr custom build of 1.7: backgroundsize | csstransforms | csstransforms3d | csstransitions | iepp */ 2 | /* Modernizr.load enabled */ 3 | window.Modernizr=function(a,b,c){function G(){}function F(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1),d=(a+" "+p.join(c+" ")+c).split(" ");return!!E(d,b)}function E(a,b){for(var d in a)if(k[a[d]]!==c&&(!b||b(a[d],j)))return!0}function D(a,b){return(""+a).indexOf(b)!==-1}function C(a,b){return typeof a===b}function B(a,b){return A(o.join(a+";")+(b||""))}function A(a){k.cssText=a}var d="1.7",e={},f=!0,g=b.documentElement,h=b.head||b.getElementsByTagName("head")[0],i="modernizr",j=b.createElement(i),k=j.style,l=b.createElement("input"),m=":)",n=Object.prototype.toString,o=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),p="Webkit Moz O ms Khtml".split(" "),q={svg:"http://www.w3.org/2000/svg"},r={},s={},t={},u=[],v,w=function(a){var c=b.createElement("style"),d=b.createElement("div"),e;c.textContent=a+"{#modernizr{height:3px}}",h.appendChild(c),d.id="modernizr",g.appendChild(d),e=d.offsetHeight===3,c.parentNode.removeChild(c),d.parentNode.removeChild(d);return!!e},x=function(){function d(d,e){e=e||b.createElement(a[d]||"div");var f=(d="on"+d)in e;f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=C(e[d],"function"),C(e[d],c)||(e[d]=c),e.removeAttribute(d))),e=null;return f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),y=({}).hasOwnProperty,z;C(y,c)||C(y.call,c)?z=function(a,b){return b in a&&C(a.constructor.prototype[b],c)}:z=function(a,b){return y.call(a,b)},r.backgroundsize=function(){return F("backgroundSize")},r.csstransforms=function(){return!!E(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])},r.csstransforms3d=function(){var a=!!E(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);a&&"webkitPerspective"in g.style&&(a=w("@media ("+o.join("transform-3d),(")+"modernizr)"));return a},r.csstransitions=function(){return F("transitionProperty")};for(var H in r)z(r,H)&&(v=H.toLowerCase(),e[v]=r[H](),u.push((e[v]?"":"no-")+v));e.input||G(),e.crosswindowmessaging=e.postmessage,e.historymanagement=e.history,e.addTest=function(a,b){a=a.toLowerCase();if(!e[a]){b=!!b(),g.className+=" "+(b?"":"no-")+a,e[a]=b;return e}},A(""),j=l=null,f&&a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="";return a.childNodes.length!==1}()&&function(a,b){function p(a,b){var c=-1,d=a.length,e,f=[];while(++c top) { 96 | endDistance = Math.round( ($doc.height() - (top + $win.height())) /o.slowdownRate); 97 | endDistance = Math.min(Math.round((self._endY-top)/ o.slowdownRate), endDistance); 98 | offset = Math.max(2, Math.min(endDistance, o.maxStep)); 99 | } else { 100 | offset = - Math.min(Math.abs(Math.round((self._endY-top)/ o.slowdownRate)), o.maxStep); 101 | } 102 | window.scrollTo(0, top + offset); 103 | if(self._cancelNext){ 104 | self._cancelNext = false; 105 | self._scrollEndHandler(); 106 | }else if(Math.abs(top - self._endY) <= 1 || scrollTop() == top){ 107 | window.scrollTo(0, self._endY); 108 | self._scrollEndHandler(); 109 | }else{ 110 | setTimeout( $.proxy(self._stepToNext, self), o.speed ); 111 | } 112 | },self.options.stepInterval); 113 | return this; 114 | }, 115 | _start: function(){ 116 | var o = this._currentScrollOptions; 117 | if($.isFunction(o.scrollstart)){ 118 | o.scrollstart(); 119 | } 120 | if($.isFunction(o.everyscrollstart)){ 121 | o.everyscrollstart(); 122 | } 123 | this._stepToNext(); 124 | return this; 125 | }, 126 | stop: function(callback){ 127 | var o = this._currentScrollOptions; 128 | if(this._whileScrolling){ 129 | this._cancelNext = true; 130 | this._cancelCallback = callback; 131 | }else if($.isFunction(callback)){ 132 | callback(); 133 | } 134 | return this; 135 | }, 136 | scrollTo: function(endY, callback){ // endY:number 137 | var o = { 138 | endY: endY 139 | }; 140 | if($.isFunction(callback)){ 141 | o.scrollend = callback; 142 | } 143 | this.scroll(o); 144 | return this; 145 | }, 146 | scroll: function(options){ 147 | var self = this; 148 | this.stop(function(){ 149 | var o = self._currentScrollOptions = $.extend({}, self.options, options); 150 | if($.type(o.endY)==='number'){ 151 | self._endY = o.endY; 152 | self._start(); 153 | }else{ 154 | var $end = $(o.endpointElement); 155 | if($end.size()){ 156 | self._endY = yOf($end[0]); 157 | self._start(); 158 | } 159 | } 160 | }); 161 | return this; 162 | }, 163 | setOptions: function(options){ 164 | $.extend(this.options, options); 165 | return this; 166 | }, 167 | liveEventify: function(selector){ 168 | selector = selector || 'a[href^=#]:not([href^=#!)'; 169 | var self = this; 170 | $(selector).live('click', function(e){ 171 | if(!self.isValidAnchor(this)){ 172 | return; 173 | } 174 | e.preventDefault(); 175 | $(this).invokeTinyscroll(); 176 | }); 177 | }, 178 | isValidAnchor: function(element){ 179 | var $el = $(element); 180 | if(!$el.is('[href]')){ 181 | return false; 182 | } 183 | var hash = $el.attr('href'); 184 | if(!/^#.+$/.test(hash)){ 185 | return false; 186 | } 187 | var $target = $(hash); 188 | if(!$target.size()){ 189 | return false; 190 | } 191 | return true; 192 | } 193 | 194 | }; 195 | 196 | // create instance 197 | $.tinyscroller = new $.Tinyscroller(); 198 | 199 | 200 | /** 201 | * $.fn.invokeTinyscroll 202 | * invoke scroll 203 | */ 204 | $.fn.invokeTinyscroll = function(options){ 205 | 206 | return this.each(function(){ 207 | 208 | if(!$.tinyscroller.isValidAnchor(this)){ 209 | return; 210 | } 211 | 212 | var $el = $(this); 213 | var hash = $el.attr('href'); 214 | var target = $(hash)[0]; 215 | 216 | var o = $.extend({}, options, { 217 | hash: hash, 218 | endpointElement: target 219 | }); 220 | 221 | // invoke 222 | $.tinyscroller.scroll(o); 223 | 224 | }); 225 | 226 | }; 227 | 228 | /** 229 | * $.fn.tinyscrollable 230 | * catch click for anchors 231 | */ 232 | $.fn.tinyscrollable = function(options){ 233 | 234 | return this.each(function(){ 235 | 236 | var $el = $(this); 237 | 238 | if(!$el.is('a')){ 239 | return; 240 | } 241 | 242 | // put flag to avoid double bind 243 | if($el.data('tinyscrollable.attached')){ 244 | return; 245 | }else{ 246 | $el.data('tinyscrollable.attached', true) 247 | } 248 | 249 | // bind 250 | $el.bind('click', function(e){ 251 | if(!$.tinyscroller.isValidAnchor(this)){ 252 | return; 253 | } 254 | e.preventDefault(); 255 | $el.invokeTinyscroll(options); 256 | }); 257 | 258 | }); 259 | 260 | }; 261 | 262 | 263 | })(jQuery); // end $=jQuery encapsulation 264 | -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-demoSite/favicon.ico -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/img/h/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-demoSite/img/h/apple-touch-icon.png -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/img/h/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-demoSite/img/h/splash.png -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/img/l/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-demoSite/img/l/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/img/l/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-demoSite/img/l/apple-touch-icon.png -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/img/l/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-demoSite/img/l/splash.png -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/img/m/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pxgrid/pxg-html-boilerplate/c73636d794c6a87e5bcb1a886781122c53fc8106/htdocs-mobile-demoSite/img/m/apple-touch-icon.png -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | PAGETITLE | SITETITLE 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
      21 | 22 |
      23 |

      pxg html boilerplate

      24 |
      25 | 26 |

      27 | home > pagetitle 28 |

      29 | 30 |
      31 | 32 |

      見出し見出し

      33 |

      彼は背後にひそかな足音を聞いた。それはあまり良い意味を示すものではない。誰がこんな夜更けに、しかもこんな街灯のお粗末な港街の狭い小道で彼をつけて来るというのだ。人生の航路を捻じ曲げ、その獲物と共に立ち去ろうとしている、その丁度今。

      34 | 39 | 40 |
      41 |

      見出し見出し

      42 |

      彼は背後にひそかな足音を聞いた。それはあまり良い意味を示すものではない。誰がこんな夜更けに、しかもこんな街灯のお粗末な港街の狭い小道で彼をつけて来るというのだ。人生の航路を捻じ曲げ、その獲物と共に立ち去ろうとしている、その丁度今。

      43 |
      44 |

      彼は背後にひそかな足音を聞いた。それはあまり良い意味を示すものではない。誰がこんな夜更けに、しかもこんな街灯のお粗末な港街の狭い小道で彼をつけて来るというのだ。人生の航路を捻じ曲げ、その獲物と共に立ち去ろうとしている、その丁度今。

      45 | 46 |
      47 |

      見出し見出し

      48 |

      彼は背後にひそかな足音を聞いた。それはあまり良い意味を示すものではない。誰がこんな夜更けに、しかもこんな街灯のお粗末な港街の狭い小道で彼をつけて来るというのだ。人生の航路を捻じ曲げ、その獲物と共に立ち去ろうとしている、その丁度今。

      49 |

      彼は背後にひそかな足音を聞いた。それはあまり良い意味を示すものではない。誰がこんな夜更けに、しかもこんな街灯のお粗末な港街の狭い小道で彼をつけて来るというのだ。人生の航路を捻じ曲げ、その獲物と共に立ち去ろうとしている、その丁度今。

      50 | 51 |
      52 |

      見出し見出し

      53 |

      彼は背後にひそかな足音を聞いた。それはあまり良い意味を示すものではない。誰がこんな夜更けに、しかもこんな街灯のお粗末な港街の狭い小道で彼をつけて来るというのだ。人生の航路を捻じ曲げ、その獲物と共に立ち去ろうとしている、その丁度今。

      54 |

      彼は背後にひそかな足音を聞いた。それはあまり良い意味を示すものではない。誰がこんな夜更けに、しかもこんな街灯のお粗末な港街の狭い小道で彼をつけて来るというのだ。人生の航路を捻じ曲げ、その獲物と共に立ち去ろうとしている、その丁度今。

      55 | 56 |
      57 | 58 |
      59 |

      お問い合わせ

      60 |
      61 |

      Webサイト開発のフロントエンドを担当します。Webサイト開発のフロントエンドを担当します。Webサイト開発のフロントエンドを担当します。

      62 | 63 |
      64 | 65 | 66 | 67 | 70 | 71 |
      72 | -------------------------------------------------------------------------------- /htdocs-mobile-demoSite/robots.txt: -------------------------------------------------------------------------------- 1 | # www.robotstxt.org/ 2 | # www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 3 | 4 | User-agent: * 5 | 6 | --------------------------------------------------------------------------------