├── CHANGELOG ├── Gruntfile.js ├── LICENSE ├── Makefile ├── Procfile ├── README.md ├── bower.json ├── build ├── mobify.js └── mobify.min.js ├── circle.yml ├── examples ├── assets │ ├── css │ │ └── stylesheet.css │ ├── images │ │ ├── alternate_art.png │ │ ├── extralarge.jpg │ │ ├── forest.jpg │ │ ├── grumpycat.jpg │ │ ├── kitten.jpg │ │ ├── large.jpg │ │ ├── leaves-big.jpg │ │ ├── leaves-small.jpg │ │ ├── medium.jpg │ │ ├── mountains.jpg │ │ ├── office-big.jpg │ │ ├── office-small.jpg │ │ ├── responsive-obama-mobile.png │ │ ├── responsive-obama.jpg │ │ └── small.jpg │ └── js │ │ ├── large.js │ │ └── small.js ├── capturing-basictemplating │ └── index.html ├── capturing-grumpycat │ ├── index.html │ ├── large.html │ ├── main.js │ └── performance-test.html ├── capturing-mediaquery │ ├── index.html │ ├── main.js │ └── performance-test.html ├── capturing-picturepolyfill │ ├── index.html │ └── main.js ├── cssOptimize │ └── index.html ├── jazzcat │ ├── index.html │ └── performance-test.html ├── resizeImages-handle-service-failure │ ├── index.html │ └── onerrortests.html ├── resizeImages-img-element │ └── index.html ├── resizeImages-no-capturing │ └── index.html ├── resizeImages-picture-element │ └── index.html └── unblockify │ └── index.html ├── mobify-custom.js.example ├── mobifyjs ├── package.json ├── performance ├── combined.html ├── fixtures │ ├── jazzcatJSONResponse.html │ ├── jazzcatJSResponse.html │ ├── jazzcatRequest.json │ └── jazzcatRunner.html ├── jazzcat.html ├── resources │ ├── canvasjs.min.js │ ├── combined-6.js │ ├── images │ │ └── ajax-loader.gif │ ├── jquery-1.10.1.js │ ├── jquery.js │ ├── samplescripts │ │ ├── jquery.1.10.js │ │ ├── jquery.alertify.js │ │ ├── jquery.dropdown.js │ │ ├── jquery.icheck.min.js │ │ ├── jquery.swipebox.min.js │ │ ├── jquery.toolbar.js │ │ ├── jquery.typeahead.min.js │ │ ├── modernizr.min.js │ │ ├── scooch.min.js │ │ └── underscore.js │ └── underscore.js └── separate.html ├── server.js ├── src ├── config.js ├── external │ └── picturefill.js ├── mobify-library.js └── unblockify.js ├── tag ├── bootstrap.html ├── supportedBrowser.js ├── v7.exposed.min.js ├── v7.js └── v7.min.js ├── tests ├── fixtures │ ├── anchor-test.html │ ├── blank-example.html │ ├── meta.html │ ├── mobify-library-example.html │ ├── plaintext-above-head-example.html │ ├── plaintext-comment-example.html │ ├── plaintext-display-none-body.html │ ├── plaintext-example.html │ ├── plaintext-malformed-markup-example.html │ ├── plaintext-no-end-head-example.html │ ├── plaintext-restore-example.html │ ├── plaintext-sibling-forms.html │ ├── position-fixed.html │ ├── split.html │ ├── tag.html │ ├── tag │ │ ├── always-run.html │ │ ├── desktop.html │ │ ├── desktop.js │ │ ├── disabled.html │ │ ├── dont-load.js │ │ ├── failed-load-tag.html │ │ ├── mobile.js │ │ ├── no-run.html │ │ ├── onerror.html │ │ ├── postload.html │ │ ├── preload.html │ │ ├── preview.html │ │ ├── preview.js │ │ ├── project1-0.html │ │ ├── project1-0 │ │ │ ├── README.md │ │ │ ├── bld │ │ │ │ ├── mobify.js │ │ │ │ └── style.css │ │ │ ├── project.json │ │ │ └── src │ │ │ │ ├── mobify.konf │ │ │ │ ├── style.css │ │ │ │ └── tmpl │ │ │ │ ├── _footer.tmpl │ │ │ │ ├── _header.tmpl │ │ │ │ ├── base.tmpl │ │ │ │ └── home.tmpl │ │ ├── project1-1.html │ │ ├── project1-1 │ │ │ ├── README.md │ │ │ ├── bld │ │ │ │ └── mobify.js │ │ │ ├── mobify.js │ │ │ ├── project.json │ │ │ └── src │ │ │ │ ├── mobify.konf │ │ │ │ └── tmpl │ │ │ │ ├── _footer.tmpl │ │ │ │ ├── _header.tmpl │ │ │ │ ├── base.tmpl │ │ │ │ └── home.tmpl │ │ ├── project2-0.html │ │ ├── single-mode.html │ │ ├── skip-preview.html │ │ └── useragent.html │ └── unblock-example.html ├── index.html ├── resources │ ├── bigscript.js │ ├── jquery-1.7.1.js │ ├── qunit-1.10.0.css │ ├── qunit-1.10.0.js │ ├── require.js │ ├── smallscript.js │ └── zepto.min.js ├── supportedBrowser-tests.js ├── tag-integration-tests.js ├── tag-old-browser.html ├── tag-tests.js ├── unblockify-tests.js └── utils │ ├── compare-html.js │ └── proxyassert.js └── www ├── Gemfile ├── _config.yml ├── _includes ├── nav-docs.md ├── nav-docsv2.md ├── nav-examples.html ├── nav-examplesv2.html ├── nav.html ├── navv2.html └── paid_warning.html ├── _layouts ├── base.html ├── basev1.html ├── basev2.html ├── doc.html ├── docv2.html ├── example.html ├── examplev2.html ├── page-community.html ├── page-communityv2.html ├── page-license.html └── page.html ├── _plugins └── active.rb ├── cla.md ├── community.md ├── docs ├── appendix.md ├── cloud-getting-started.md ├── getting-started.md ├── glossary.md ├── handling-javascript.md ├── image-resizing.md ├── index.md ├── jazzcat.md ├── konf-reference.md ├── matching-to-urls.md ├── mobifyjs-in-production.md ├── responsive.md ├── template-reference.md ├── understanding-konf.md └── understanding-templates.md ├── examples └── index.md ├── index.html ├── license.md ├── static ├── css │ ├── bootstrap-responsive.css │ ├── bootstrap-responsive.min.css │ ├── bootstrap.css │ ├── bootstrap.min.css │ ├── font-awesome-ie7.css │ ├── font-awesome.css │ ├── syntax.css │ └── ui-dev.css ├── font │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ └── fontawesome-webfont.woff ├── img │ ├── body-bg.min.png │ ├── code-example.min.png │ ├── code-example.png │ ├── desktop.min.png │ ├── desktop@2x.min.png │ ├── dom.min.png │ ├── dom@2x.min.png │ ├── favicon.ico │ ├── getting-started-error.png │ ├── getting-started-link.png │ ├── glyphicons-halflings-white.png │ ├── glyphicons-halflings.png │ ├── illustration-content.min.png │ ├── illustration-content.png │ ├── illustration-content@2x.min.png │ ├── illustration-content@2x.png │ ├── illustration-dom.min.png │ ├── illustration-dom.png │ ├── illustration-dom@2x.min.png │ ├── illustration-dom@2x.png │ ├── illustration-modules-accordion.min.png │ ├── illustration-modules-accordion@2x.min.png │ ├── illustration-modules-carousel.min.png │ ├── illustration-modules-carousel@2x.min.png │ ├── illustration-modules-comingsoon.min.png │ ├── illustration-modules-comingsoon@2x.min.png │ ├── illustration-modules-zoomable.min.png │ ├── illustration-modules-zoomable@2x.min.png │ ├── illustration-responsive.min.png │ ├── illustration-responsive.png │ ├── illustration-responsive@2x.min.png │ ├── illustration-responsive@2x.png │ ├── init.min.png │ ├── init.png │ ├── logos.min.png │ ├── logos.png │ ├── logos@2x.min.png │ ├── logos@2x.png │ ├── phone.min.png │ ├── phone@2x.min.png │ ├── sprites.min.png │ ├── sprites.png │ ├── sprites@2x.min.png │ ├── sprites@2x.png │ ├── tablet.min.png │ └── tablet@2x.min.png ├── js │ ├── bootstrap-dropdown.js │ ├── highlight │ │ ├── LICENSE │ │ ├── README.md │ │ ├── README.ru.md │ │ ├── classref.txt │ │ ├── highlight.pack.js │ │ └── styles │ │ │ ├── arta.css │ │ │ ├── ascetic.css │ │ │ ├── brown_paper.css │ │ │ ├── brown_papersq.png │ │ │ ├── dark.css │ │ │ ├── default.css │ │ │ ├── far.css │ │ │ ├── github.css │ │ │ ├── googlecode.css │ │ │ ├── idea.css │ │ │ ├── ir_black.css │ │ │ ├── magula.css │ │ │ ├── monokai.css │ │ │ ├── pojoaque.css │ │ │ ├── pojoaque.jpg │ │ │ ├── school_book.css │ │ │ ├── school_book.png │ │ │ ├── solarized_dark.css │ │ │ ├── solarized_light.css │ │ │ ├── sunburst.css │ │ │ ├── vs.css │ │ │ ├── xcode.css │ │ │ └── zenburn.css │ └── jquery.min.js └── modules │ ├── accordion │ ├── accordion-style.css │ ├── accordion.css │ └── accordion.js │ ├── carousel │ ├── carousel-style.css │ ├── carousel.css │ └── carousel.js │ └── zoomable │ └── zoomable.js └── v2 ├── community.md ├── docs ├── capturing.md ├── image-resizer.md └── index.md └── examples └── index.md /CHANGELOG: -------------------------------------------------------------------------------- 1 | 2.0.16 2 | - Updates resource disabling in capturing to disable `srcset` attributes on 3 | `` and `` elements. 4 | - Updates dependency on imageresize-client to better support modern 5 | `` element markup. 6 | - Update to latest capturing fix that targets scroll jank bug fix on 7 | iOS8 and greater. 8 | 2.0.15 9 | - The previous iOS 8.0 scroll fix was causing some incompatibilities with 10 | certain websites. Introduces a new scroll fix that should work in all 11 | circumstances. 12 | - Also fixes an iOS 8.0 issue where if there are two sibling forms in the 13 | original document, one of the forms ends up as a child form in the 14 | captured document. 15 | 2.0.14 16 | - Added patch to fix scrolling jank on iOS 8.0. 17 | - Bumped the version of grunt-saucelabs and fixed tests to support the new 18 | version. 19 | - Fixed tests on Android 2.3. 20 | 2.0.13 21 | - Update image resizer to 1.0.2, which contains changes to default 22 | cache time (from 2 months down to 8 hours). 23 | - Don't patch anchor links on Firefox 29 and above. 24 | 2.0.12 25 | - `Capture.prototype.restore` uses self.all() instead of capturedDoc. 26 | 2.0.11 27 | - Updates `Capture.prototype.restore` to restore the captured doc. 28 | 2.0.10 29 | - Brings in utils, jazzcat, and imageresize as dependancies using Bower. 30 | 2.0.9 31 | - Fix for putting Mobify tag above head tag. 32 | 2.0.8 33 | - Change AMD definitions to UMD in all libs. 34 | 2.0.7 35 | - Allow specifying quality parameter without it defaulting the format 36 | to JPG. 37 | - Added a flag that allows you to turn resizing to auto/on/off. 38 | 2.0.6 39 | - Fixed issue where we were not passing in the prefix when 40 | using `render` with an HTML string, causing assets to not get enabled. 41 | 2.0.5 42 | - Add API for fixing Anchor Tags on Firefox when using Capturing. 43 | 2.0.4 44 | - Fixes iOS 4.3 / Safari 4 issue with placing Mobify tag above . 45 | 2.0.3 46 | - Adds a fix to ensure that meta tags do not get created and inserted 47 | into the for older Safari browsers. 48 | 2.0.2 49 | - Fixes iOS 4.3 / Safari 4 issue with document.head being undefined. 50 | 2.0.1 51 | - Changes getImageURL to grab default options if options object is not 52 | passed to it. 53 | 2.0.0 54 | - First stable release of 2.0 API! 55 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) Mobify R&D Inc. 2 | http://www.mobify.com/ 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | install: 2 | #git submodule update --init 3 | npm uninstall -g grunt 4 | npm install -g grunt-cli bower 5 | npm install 6 | bower install 7 | 8 | test: install 9 | grunt test 10 | 11 | all: 12 | install 13 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: node server.js 2 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mobifyjs", 3 | "version": "2.0.16", 4 | "main": "build/mobify.min.js", 5 | "dependencies": { 6 | "capturejs": "1.0.4", 7 | "mobifyjs-utils": "1.0.0", 8 | "jazzcat-client": "1.0.0", 9 | "imageresize-client": "1.0.4", 10 | "css-optimize": "1.0.0" 11 | }, 12 | "devDependencies": { 13 | 14 | }, 15 | "ignore": [ 16 | "node_modules", 17 | "tests", 18 | "performance", 19 | "examples", 20 | "www" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /circle.yml: -------------------------------------------------------------------------------- 1 | test: 2 | pre: 3 | - make install 4 | override: 5 | - make test 6 | -------------------------------------------------------------------------------- /examples/assets/css/stylesheet.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: 'Helvetica Neue', sans-serif; 3 | background: rgb(4, 111, 126); 4 | color: #d5ecf2; 5 | text-shadow: rgba(0,0,0,0.15) 0 2px 0; 6 | font-weight: 200; 7 | } 8 | 9 | a { 10 | color: #c07247; 11 | } 12 | 13 | img { 14 | padding-top: 20px; 15 | } 16 | 17 | .example .img { 18 | width: 35%; 19 | display: inline-block; 20 | box-sizing: border-box; 21 | } 22 | -------------------------------------------------------------------------------- /examples/assets/images/alternate_art.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/examples/assets/images/alternate_art.png -------------------------------------------------------------------------------- /examples/assets/images/extralarge.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/examples/assets/images/extralarge.jpg -------------------------------------------------------------------------------- /examples/assets/images/forest.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/examples/assets/images/forest.jpg -------------------------------------------------------------------------------- /examples/assets/images/grumpycat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/examples/assets/images/grumpycat.jpg -------------------------------------------------------------------------------- /examples/assets/images/kitten.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/examples/assets/images/kitten.jpg -------------------------------------------------------------------------------- /examples/assets/images/large.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/examples/assets/images/large.jpg -------------------------------------------------------------------------------- /examples/assets/images/leaves-big.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/examples/assets/images/leaves-big.jpg -------------------------------------------------------------------------------- /examples/assets/images/leaves-small.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/examples/assets/images/leaves-small.jpg -------------------------------------------------------------------------------- /examples/assets/images/medium.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/examples/assets/images/medium.jpg -------------------------------------------------------------------------------- /examples/assets/images/mountains.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/examples/assets/images/mountains.jpg -------------------------------------------------------------------------------- /examples/assets/images/office-big.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/examples/assets/images/office-big.jpg -------------------------------------------------------------------------------- /examples/assets/images/office-small.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/examples/assets/images/office-small.jpg -------------------------------------------------------------------------------- /examples/assets/images/responsive-obama-mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/examples/assets/images/responsive-obama-mobile.png -------------------------------------------------------------------------------- /examples/assets/images/responsive-obama.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/examples/assets/images/responsive-obama.jpg -------------------------------------------------------------------------------- /examples/assets/images/small.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/examples/assets/images/small.jpg -------------------------------------------------------------------------------- /examples/assets/js/large.js: -------------------------------------------------------------------------------- 1 | window.onload = function(){ 2 | 3 | alert("Big images downloaded! \n\nThis alert is executing from a script loaded from a media query specifying min-width 480px! \n\nRefresh again with a small width to see different script and images load."); 4 | 5 | } 6 | -------------------------------------------------------------------------------- /examples/assets/js/small.js: -------------------------------------------------------------------------------- 1 | window.onload = function(){ 2 | 3 | alert("Small images downloaded! \n\nThis alert is executing from a script loaded from a media query specifying max-width 480px! \n\nRefresh again with a larger width to see different script and images load."); 4 | 5 | } 6 | -------------------------------------------------------------------------------- /examples/capturing-grumpycat/main.js: -------------------------------------------------------------------------------- 1 | // Main executable can now be found inline inside of the index.html file 2 | // of this example! -------------------------------------------------------------------------------- /examples/capturing-grumpycat/performance-test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Performance tests of example headtag-capture example 4 | 5 | 6 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /examples/capturing-mediaquery/main.js: -------------------------------------------------------------------------------- 1 | // Main executable can now be found inline inside of the index.html file 2 | // of this example! -------------------------------------------------------------------------------- /examples/capturing-mediaquery/performance-test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Performance tests of example headtag-capture example 4 | 5 | 6 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /examples/capturing-picturepolyfill/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 26 | 27 | 28 | 29 | Mobify.js Picturefill example 30 | 31 | 32 |

Credit to scottjehl for his picturefill example

33 |

This example has been forked and replicated using capturing to avoid the need for a <noscript> tag (view source to see for yourself).

34 |

Open up the network tab of your web inspector to see that the img element does not have it's asset downloaded.

35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /examples/capturing-picturepolyfill/main.js: -------------------------------------------------------------------------------- 1 | // Main executable can now be found inline inside of the index.html file 2 | // of this example! -------------------------------------------------------------------------------- /examples/cssOptimize/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CSS Optimizer Example 6 | 31 | 32 | 33 | 34 | 35 | 36 |

Styled!

37 | 38 |

What an amazing example page. Watch out, my stylesheet will be loaded from elsewhere!

39 | 40 | 41 | -------------------------------------------------------------------------------- /examples/jazzcat/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Mobify.js Jazzcat example 5 | 29 | 30 | 31 | 36 | 37 | 38 | 39 | 40 | 41 |

Open your web inspector to see the changes made by Jazzcat

42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /examples/jazzcat/performance-test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Performance tests of example headtag-capture example 4 | 5 | 6 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /examples/resizeImages-handle-service-failure/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Image Resizing Service Uh-Oh Tester 6 | 34 | 35 | 36 | 37 | 40 | 41 | 42 |

Images!

43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /examples/resizeImages-handle-service-failure/onerrortests.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | img element onerror behaviour classifier 6 | 7 | 8 | 17 | 23 |
24 | 25 | http://garbage.domain.name.gfgrgrfgf/foo.jpg 26 |
27 | 28 |
29 | 30 | /imagetests/textmime 31 |
32 | 33 |
34 | 35 | /imagetests/emptyresponse 36 |
37 |
38 | 39 | /imagetests/wrongmime 40 |
41 |
42 | 43 | /imagetests/partialimage100b 44 |
45 |
46 | 47 | /imagetests/partialimage1k 48 |
49 |
50 | 51 | /imagetests/abortedimage 52 |
53 |
54 | 55 | /imagetests/notFound 56 |
57 |
58 | 59 | /imagetests/serverError 60 |
61 |
62 | 63 | /imagetests/fakejpeg 64 |
65 | 66 | -------------------------------------------------------------------------------- /examples/resizeImages-img-element/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Image Resizer with IMG elements 5 | 25 | 26 | 27 | 28 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /examples/unblockify/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 26 | 27 | 28 | 33 | Mobify.js unblockify example 34 | 35 | 36 | 37 | 38 | 39 | 40 |

Scripts are now at the bottom of body!

41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /mobify-custom.js.example: -------------------------------------------------------------------------------- 1 | var Mobify = require('./src/mobify-library'); 2 | 3 | var capturing = window.Mobify && window.Mobify.capturing || false; 4 | if (capturing) { 5 | // Grab reference to a newly created document 6 | Mobify.Capture.initCapture(function(capture){ 7 | // optimize scripts 8 | var capturedDoc = capture.capturedDoc; 9 | //var scripts = capturedDoc.querySelectorAll('script'); 10 | //Mobify.Jazzcat.optimizeScripts(scripts); 11 | // optimize images 12 | var images = capturedDoc.querySelectorAll('img, picture'); 13 | Mobify.ResizeImages.resize(images); 14 | 15 | capture.renderCapturedDoc(); 16 | }); 17 | } else { 18 | 19 | } 20 | -------------------------------------------------------------------------------- /mobifyjs: -------------------------------------------------------------------------------- 1 | . -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mobifyjs", 3 | "version": "2.0.16", 4 | "description": "Mobify.js is an open source library for improving responsive sites by providing responsive images, JS/CSS optimization, Adaptive Templating and more.", 5 | "author": "Mobify ", 6 | "devDependencies": { 7 | "express": "3.3.1", 8 | "grunt": "~0.4.0", 9 | "grunt-aws-s3": "^0.14.0", 10 | "grunt-browserify": "~1.3.1", 11 | "grunt-contrib-connect": "~0.1.0", 12 | "grunt-contrib-qunit": "~0.2.0", 13 | "grunt-contrib-uglify": "~0.2.0", 14 | "grunt-contrib-watch": "~0.2.x", 15 | "grunt-express": "~0.3.6", 16 | "grunt-jekyll": "~0.3.6", 17 | "grunt-release": "~0.6.0", 18 | "grunt-requirejs": "~0.4.0", 19 | "grunt-s3": "0.2.0-alpha.2", 20 | "grunt-saucelabs": "8.3.2", 21 | "hbs": "~2.3.0", 22 | "request": "~2.44.0" 23 | }, 24 | "engine": ">= 0.10.1", 25 | "repository": { 26 | "type": "git", 27 | "url": "git@github.com:mobify/mobifyjs.git" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /performance/combined.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 23 | Combined scripts 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /performance/fixtures/jazzcatJSONResponse.html: -------------------------------------------------------------------------------- 1 | Jazzcat.load([ 2 | {{#each scripts}} 3 | {"url":"{{{url}}}","status":"ready","statusCode":200,"headers":{"server":"GitHub.com","date":"Fri, 28 Jun 2013 20:21:47 GMT","content-type":"application/x-javascript","connection":"keep-alive","content-length":"13450","last-modified":"Wed, 10 Apr 2013 20:47:06 GMT","expires":"Fri, 28 Jun 2012 20:31:47 GMT","cache-control":"max-age=0","vary":"Accept-Encoding","accept-ranges":"bytes"},"body":{{&data}},"text":true}, 4 | {{/each}} 5 | ]); -------------------------------------------------------------------------------- /performance/fixtures/jazzcatJSResponse.html: -------------------------------------------------------------------------------- 1 | {{#each scripts}} 2 | 3 | 4 | {{&this}} 5 | 6 | 7 | 8 | {{/each}} 9 | -------------------------------------------------------------------------------- /performance/fixtures/jazzcatRequest.json: -------------------------------------------------------------------------------- 1 | /* JSONP response for: http://underscorejs.org/underscore-min.js */ 2 | Jazzcat.combo.load([ 3 | {{#each scripts}} 4 | {"url":"{{{url}}}","status":"ready","statusCode":200,"headers":{"server":"GitHub.com","date":"Fri, 28 Jun 2013 20:21:47 GMT","content-type":"application/x-javascript","connection":"keep-alive","content-length":"13450","last-modified":"Wed, 10 Apr 2013 20:47:06 GMT","expires":"Fri, 28 Jun 2013 20:31:47 GMT","cache-control":"max-age=600","vary":"Accept-Encoding","accept-ranges":"bytes"},"body":"{{data}}","text":true}, 5 | {{/each}} 6 | ]); -------------------------------------------------------------------------------- /performance/fixtures/jazzcatRunner.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{> bootstrap}} 5 | 27 | Performance Runner for Jazzcat 28 | 29 | 30 | {{#each scripts}} 31 | 32 | {{/each}} 33 | 34 | -------------------------------------------------------------------------------- /performance/resources/images/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/performance/resources/images/ajax-loader.gif -------------------------------------------------------------------------------- /performance/resources/samplescripts/jquery.icheck.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * iCheck v0.9.1 jQuery plugin, http://git.io/uhUPMA 3 | */ 4 | (function(f){function C(a,c,d){var b=a[0],e=/er/.test(d)?k:/bl/.test(d)?u:j;active=d==E?{checked:b[j],disabled:b[u],indeterminate:"true"==a.attr(k)||"false"==a.attr(v)}:b[e];if(/^(ch|di|in)/.test(d)&&!active)p(a,e);else if(/^(un|en|de)/.test(d)&&active)w(a,e);else if(d==E)for(var e in active)active[e]?p(a,e,!0):w(a,e,!0);else if(!c||"toggle"==d){if(!c)a[r]("ifClicked");active?b[l]!==x&&w(a,e):p(a,e)}}function p(a,c,d){var b=a[0],e=a.parent(),g=c==j,H=c==k,m=H?v:g?I:"enabled",r=h(b,m+y(b[l])),L=h(b, 5 | c+y(b[l]));if(!0!==b[c]){if(!d&&c==j&&b[l]==x&&b.name){var p=a.closest("form"),s='input[name="'+b.name+'"]',s=p.length?p.find(s):f(s);s.each(function(){this!==b&&f.data(this,n)&&w(f(this),c)})}H?(b[c]=!0,b[j]&&w(a,j,"force")):(d||(b[c]=!0),g&&b[k]&&w(a,k,!1));J(a,g,c,d)}b[u]&&h(b,z,!0)&&e.find("."+F).css(z,"default");e[t](L||h(b,c));e[A](r||h(b,m)||"")}function w(a,c,d){var b=a[0],e=a.parent(),g=c==j,f=c==k,m=f?v:g?I:"enabled",n=h(b,m+y(b[l])),p=h(b,c+y(b[l]));if(!1!==b[c]){if(f||!d||"force"==d)b[c]= 6 | !1;J(a,g,m,d)}!b[u]&&h(b,z,!0)&&e.find("."+F).css(z,"pointer");e[A](p||h(b,c)||"");e[t](n||h(b,m))}function K(a,c){if(f.data(a,n)){var d=f(a);d.parent().html(d.attr("style",f.data(a,n).s||"")[r](c||""));d.off(".i").unwrap();f(D+'[for="'+a.id+'"]').add(d.closest(D)).off(".i")}}function h(a,c,d){if(f.data(a,n))return f.data(a,n).o[c+(d?"":"Class")]}function y(a){return a.charAt(0).toUpperCase()+a.slice(1)}function J(a,c,d,b){if(!b){if(c)a[r]("ifToggled");a[r]("ifChanged")[r]("if"+y(d))}}var n="iCheck", 7 | F=n+"-helper",x="radio",j="checked",I="un"+j,u="disabled",v="determinate",k="in"+v,E="update",l="type",t="addClass",A="removeClass",r="trigger",D="label",z="cursor",G=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini/i.test(navigator.userAgent);f.fn[n]=function(a,c){var d=":checkbox, :"+x,b=f(),e=function(a){a.each(function(){var a=f(this);b=a.is(d)?b.add(a):b.add(a.find(d))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(a))return a=a.toLowerCase(), 8 | e(this),b.each(function(){"destroy"==a?K(this,"ifDestroyed"):C(f(this),!0,a);f.isFunction(c)&&c()});if("object"==typeof a||!a){var g=f.extend({checkedClass:j,disabledClass:u,indeterminateClass:k,labelHover:!0},a),h=g.handle,m=g.hoverClass||"hover",y=g.focusClass||"focus",v=g.activeClass||"active",z=!!g.labelHover,s=g.labelHoverClass||"hover",B=(""+g.increaseArea).replace("%","")|0;if("checkbox"==h||h==x)d=":"+h;-50>B&&(B=-50);e(this);return b.each(function(){K(this);var a=f(this),b=this,c=b.id,d= 9 | -B+"%",e=100+2*B+"%",e={position:"absolute",top:d,left:d,display:"block",width:e,height:e,margin:0,padding:0,background:"#fff",border:0,opacity:0},d=G?{position:"absolute",visibility:"hidden"}:B?e:{position:"absolute",opacity:0},h="checkbox"==b[l]?g.checkboxClass||"icheckbox":g.radioClass||"i"+x,k=f(D+'[for="'+c+'"]').add(a.closest(D)),q=a.wrap('
')[r]("ifCreated").parent().append(g.insert),e=f('').css(e).appendTo(q);a.data(n,{o:g,s:a.attr("style")}).css(d); 10 | g.inheritClass&&q[t](b.className);g.inheritID&&c&&q.attr("id",n+"-"+c);"static"==q.css("position")&&q.css("position","relative");C(a,!0,E);if(k.length)k.on("click.i mouseenter.i mouseleave.i touchbegin.i touchend.i",function(c){var d=c[l],e=f(this);if(!b[u])if("click"==d?C(a,!1,!0):z&&(/ve|nd/.test(d)?(q[A](m),e[A](s)):(q[t](m),e[t](s))),G)c.stopPropagation();else return!1});a.on("click.i focus.i blur.i keyup.i keydown.i keypress.i",function(c){var d=c[l];c=c.keyCode;if("click"==d)return!1;if("keydown"== 11 | d&&32==c)return b[l]==x&&b[j]||(b[j]?w(a,j):p(a,j)),!1;if("keyup"==d&&b[l]==x)!b[j]&&p(a,j);else if(/us|ur/.test(d))q["blur"==d?A:t](y)});e.on("click mousedown mouseup mouseover mouseout touchbegin.i touchend.i",function(d){var c=d[l],e=/wn|up/.test(c)?v:m;if(!b[u]){if("click"==c)C(a,!1,!0);else{if(/wn|er|in/.test(c))q[t](e);else q[A](e+" "+v);if(k.length&&z&&e==m)k[/ut|nd/.test(c)?A:t](s)}if(G)d.stopPropagation();else return!1}})})}return this}})(jQuery); -------------------------------------------------------------------------------- /performance/separate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | Seperate scripts 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/config.js: -------------------------------------------------------------------------------- 1 | require.config({ 2 | "wrap": true, 3 | "baseUrl": ".", 4 | "keepBuildDir": true, 5 | "paths": { 6 | "mobifyjs": ".", 7 | "mobifyjs/utils": "../bower_components/mobifyjs-utils/utils", 8 | "mobifyjs/jazzcat": "../bower_components/jazzcat-client/jazzcat", 9 | "mobifyjs/resizeImages": "../bower_components/imageresize-client/resizeImages" 10 | }, 11 | }); 12 | -------------------------------------------------------------------------------- /src/mobify-library.js: -------------------------------------------------------------------------------- 1 | (function (root, factory) { 2 | if (typeof require === 'function' && typeof define === 'function' && 3 | define.amd) { 4 | // AMD. Register as an anonymous module. 5 | require(["mobifyjs/utils", "mobifyjs/capture", "mobifyjs/resizeImages", 6 | "mobifyjs/jazzcat", "mobifyjs/unblockify", 7 | "mobifyjs/cssOptimize", "mobifyjs/external/picturefill"], 8 | factory, 9 | undefined, true); 10 | // relPath, forceSync 11 | } else if (typeof exports === 'object') { 12 | // Node. Does not work with strict CommonJS, but 13 | // only CommonJS-like environments that support module.exports, 14 | // like Node. 15 | var Utils = require('../bower_components/mobifyjs-utils/utils'); 16 | var Capture = require('../bower_components/capturejs/src/capture'); 17 | var ResizeImages = require('../bower_components/imageresize-client/resizeImages'); 18 | var Jazzcat = require('../bower_components/jazzcat-client/jazzcat'); 19 | var CssOptimize = require('../bower_components/css-optimize/src/cssOptimize'); 20 | var Unblockify = require('./unblockify'); 21 | require('./external/picturefill'); 22 | 23 | module.exports = factory(Utils, Capture, ResizeImages, Jazzcat, 24 | Unblockify, CssOptimize); 25 | } 26 | }(this, function(Utils, Capture, ResizeImages, Jazzcat, Unblockify, CssOptimize) { 27 | var Mobify = window.Mobify = window.Mobify || {}; 28 | Mobify.Utils = Utils; 29 | Mobify.Capture = Capture; 30 | Mobify.ResizeImages = ResizeImages; 31 | Mobify.Jazzcat = Jazzcat; 32 | Mobify.CssOptimize = CssOptimize; 33 | Mobify.Unblockify = Unblockify; 34 | Mobify.api = "2.0"; // v6 tag backwards compatibility change 35 | return Mobify; 36 | 37 | })); 38 | -------------------------------------------------------------------------------- /src/unblockify.js: -------------------------------------------------------------------------------- 1 | (function (root, factory) { 2 | if (typeof define === 'function' && define.amd) { 3 | // AMD. Register as an anonymous module. 4 | define(['mobifyjs/utils', 'mobifyjs/capture'], factory); 5 | } else if (typeof exports === 'object') { 6 | // Node. Does not work with strict CommonJS, but 7 | // only CommonJS-like environments that support module.exports, 8 | // like Node. 9 | var Utils = require('../bower_components/mobifyjs-utils/utils.js'); 10 | var Capture = require('../bower_components/capturejs/src/capture.js'); 11 | module.exports = factory(Utils, Capture); 12 | } else { 13 | // Browser globals (root is window) 14 | root.Unblockify = factory(root.Utils, root.Capture); 15 | } 16 | }(this, function (Utils, Capture) { 17 | 18 | var Unblockify = {} 19 | 20 | // Moves all scripts to the end of body by overriding insertMobifyScripts 21 | Unblockify.moveScripts = function(scripts, doc) { 22 | // Remove elements from the document 23 | Utils.removeElements(scripts, doc); 24 | 25 | for (var i=0,ii=scripts.length; i 2 | (function(window, document, detector, mobifyjsUrl, main) { 3 | 4 | // Start Mobify object with initial timestamp when loaded. 5 | window.Mobify = {points: [+new Date]}; 6 | 7 | // if mobify=(1|0) override is set in hash or cookie, force mobify on/off. 8 | var override = /((; )|#|&|^)mobify=(\d)/.exec(location.hash + '; ' + document.cookie); 9 | if (override && override[3]) { 10 | // if mobify=0, do not run mobify. 11 | if (!+override[3]) return; 12 | } 13 | // else do not run mobify if Mobify object exists, or detector fails. 14 | else if (!detector()) { 15 | return; 16 | } 17 | 18 | function attachScriptBeforeMobifyTag(script, id, classNames, src) { 19 | var mobifyTagScript = document.getElementsByTagName('script')[0]; 20 | script.src = src; 21 | script.id = id; 22 | script.setAttribute("class", classNames); 23 | mobifyTagScript.parentNode.insertBefore(script, mobifyTagScript); 24 | } 25 | 26 | document.write(''); 27 | 28 | // On next tick, load library and main executable 29 | setTimeout(function() { 30 | var Mobify = window.Mobify = window.Mobify || {}; 31 | Mobify.capturing = true; 32 | var mobifyjsScript = document.createElement('script'); 33 | var scriptClasses = "mobify"; 34 | var errorHandler = function() { 35 | var now = new Date(); 36 | // Set now to 5 minutes ahead 37 | now.setTime(now.getTime() + 300000); 38 | document.cookie = 'mobify=0' + 39 | '; expires=' + now.toGMTString() + 40 | '; path=/'; 41 | // Reload the page (location.reload has problems in FF) 42 | window.location = window.location.href; 43 | }; 44 | mobifyjsScript.onload = function(){ 45 | if (main) { 46 | // if main is a path to a main file 47 | if (typeof main === 'string') { 48 | var mainScript = document.createElement('script'); 49 | mainScript.onerror = errorHandler; 50 | attachScriptBeforeMobifyTag(mainScript, "main-executable", scriptClasses, mainUrl); 51 | } else { 52 | // Set main on Mobify object to be used later for re-insertion 53 | window.Mobify.mainExecutable = main.toString(); 54 | main(); 55 | } 56 | } 57 | }; 58 | mobifyjsScript.onerror = errorHandler; 59 | attachScriptBeforeMobifyTag(mobifyjsScript, "mobify-js", scriptClasses, mobifyjsUrl); 60 | 61 | }); 62 | 63 | })( window, document, 64 | // detector function 65 | function (){ 66 | // We're enabled for: 67 | // - WebKit based browsers 68 | // - IE 10+ 69 | // - FireFox 4+ 70 | // - Opera 11+ 71 | // - 3DS 72 | match = /webkit|(firefox)[\/\s](\d+)|(opera)[\s\S]*version[\/\s](\d+)|(trident)[\/\s](\d+)/i.exec(navigator.userAgent); 73 | 74 | if (!match) { 75 | return false; 76 | } 77 | // match[1] == Firefox 78 | if (match[1] && +match[2] < 4) { 79 | return false; 80 | } 81 | // match[3] == Opera 82 | if (match[3] && +match[4] < 11) { 83 | return false; 84 | } 85 | // match[5] == IE 86 | if (match[5] && +match[6] < 6) { 87 | return false; 88 | } 89 | 90 | return true; 91 | }, 92 | 93 | {{#mobifyfull}} 94 | // Combine both library and main into one 95 | '{{this}}' 96 | {{/mobifyfull}} 97 | {{^mobifyfull}} 98 | // path to mobify.js: /mobifyjs/build/mobify.js', 99 | '{{library}}', 100 | // main function 101 | {{&main}} 102 | {{/mobifyfull}} 103 | ); 104 | </script> 105 | -------------------------------------------------------------------------------- /tag/supportedBrowser.js: -------------------------------------------------------------------------------- 1 | /** 2 | supportedBrowser will return whether or not we are on a device 3 | 4 | @private 5 | @param {string} ua User agent to test 6 | @type {bool} 7 | */ 8 | var supportedBrowser = function(ua) { 9 | // We're enabled for: 10 | // - WebKit based browsers 11 | // - IE 10+ 12 | // - FireFox 4+ 13 | // - Opera 11+ 14 | var match = /webkit|(firefox)[\/\s](\d+)|(opera)[\s\S]*version[\/\s](\d+)|(trident)[\/\s](\d+)/i.exec(ua); 15 | if (!match) { 16 | return false; 17 | } 18 | // match[1] == Firefox 19 | if (match[1] && +match[2] < 4) { 20 | return false; 21 | } 22 | // match[3] == Opera 23 | if (match[3] && +match[4] < 11) { 24 | return false; 25 | } 26 | // match[5] == IE 27 | if (match[5] && +match[6] < 6) { 28 | return false; 29 | } 30 | 31 | return true; 32 | }; 33 | window['supportedBrowser'] = supportedBrowser; -------------------------------------------------------------------------------- /tag/v7.exposed.min.js: -------------------------------------------------------------------------------- 1 | (function(e,f){function m(a){if(a.mode){var b=g("mobify-mode");b&&a[b]||(b=a.mode(d.ua));return a[b]}return a}function n(){function a(a){e.addEventListener(a,function(){d[a]=+new Date},!1)}e.addEventListener&&(a("DOMContentLoaded"),a("load"))}function p(){var a=new Date;a.setTime(a.getTime()+3E5);f.cookie="mobify-path=; expires="+a.toGMTString()+"; path=/";e.location.reload()}function q(){k({src:"https://preview.mobify.com/v7/"})}function r(){return"true"==g("mobify-path")||/mobify-path=true/.test(e.location.hash)} 2 | function s(){return""===g("mobify-path")}function g(a){if(a=f.cookie.match(RegExp("(^|; )"+a+"((=([^;]*))|(; |$))")))return a[4]||""}function l(a){f.write('<plaintext style="display:none">');setTimeout(function(){h.capturing=!0;a()},0)}function k(a,b){var c=f.getElementsByTagName("script")[0],d=f.createElement("script"),e;for(e in a)d[e]=a[e];b&&d.setAttribute("class",b);c.parentNode.insertBefore(d,c)}var h=e.Mobify={},d=h.Tag={},c={};d.Private=c;h.points=[+new Date];h.tagVersion=[7,0];d.ua=e.navigator.userAgent; 3 | c.previewUrl="https://preview.mobify.com/v7/";c.loadScript=k;c.startCapture=l;c.getCookie=g;c.isDisabled=s;c.isPreview=r;c.loadPreview=q;c.disableTag=p;c.collectTiming=n;d.getOptions=m;d.init=function(a){d.options=a;if(!s())if(n(),!a.skipPreview&&r())l(q);else{var b=m(a);if(b){var c=function(){b.post&&b.post()};a=function(){b.pre&&b.pre();k({id:"mobify-js",src:b.url,onerror:p,onload:c},"mobify")};!1===b.capture?a():l(a)}}}})(window,document); 4 | -------------------------------------------------------------------------------- /tag/v7.min.js: -------------------------------------------------------------------------------- 1 | (function(e,f){function h(a){if(a.mode){var b=g("mobify-mode");b&&a[b]||(b=a.mode(c.ua));return a[b]}return a}function m(){function a(a){e.addEventListener(a,function(){c[a]=+new Date},!1)}e.addEventListener&&(a("DOMContentLoaded"),a("load"))}function n(){if(!f.visibilityState||!f.hidden){var a=new Date;a.setTime(a.getTime()+3E5);f.cookie="mobify-path=; expires="+a.toGMTString()+"; path=/";e.location.reload()}}function p(){k({src:"https://preview.mobify.com/v7/"})}function g(a){if(a=f.cookie.match(new RegExp("(^|; )"+ 2 | a+"((=([^;]*))|(; |$))")))return a[4]||""}function l(a){f.write('<plaintext style="display:none">');setTimeout(function(){d.capturing=!0;a()},0)}function k(a,b){var e=f.getElementsByTagName("script")[0],c=f.createElement("script"),d;for(d in a)c[d]=a[d];b&&c.setAttribute("class",b);e.parentNode.insertBefore(c,e)}var d=e.Mobify={},c=d.Tag={};d.points=[+new Date];d.tagVersion=[7,0];c.ua=e.navigator.userAgent;c.getOptions=h;c.init=function(a){c.options=a;if(""!==g("mobify-path"))if(m(),a.skipPreview|| 3 | "true"!=g("mobify-path")&&!/mobify-path=true/.test(e.location.hash)){var b=h(a);if(b){var d=function(){b.post&&b.post()};a=function(){b.pre&&b.pre();k({id:"mobify-js",src:b.url,onerror:n,onload:d},"mobify")};!1===b.capture?a():l(a)}}else l(p)}})(window,document); 4 | -------------------------------------------------------------------------------- /tests/fixtures/blank-example.html: -------------------------------------------------------------------------------- 1 | <html><head></head><body><h1>Blank</h1></body></html> 2 | -------------------------------------------------------------------------------- /tests/fixtures/meta.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 | <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> 3 | <head> 4 | <script>!function(a,b,c,d,e){function g(a,c,d,e){var f=b.getElementsByTagName("script")[0];e.src?a.src=e.src:e.innerHTML&&(a.innerHTML=e.innerHTML),a.id=c,a.setAttribute("class",d),f.parentNode.insertBefore(a,f)}a.Mobify={points:[+new Date]};var f=/((; )|#|&|^)mobify=(\d)/.exec(location.hash+"; "+b.cookie);if(f&&f[3]){if(!+f[3])return}else if(!c())return;b.write('<plaintext style="display:none">'),setTimeout(function(){var c=a.Mobify=a.Mobify||{};c.capturing=!0;var f=b.createElement("script"),h=function(){var c=new Date;c.setTime(c.getTime()+18e5),b.cookie="mobify=0; expires="+c.toGMTString()+"; path=/",a.location=a.location.href};f.onload=function(){if(e){var a=b.createElement("script");if(a.onerror=h,"string"==typeof e)g(a,"main-executable","mobify",{src:e});else{var c="var main = "+e.toString()+"; main();";g(a,"main-executable","mobify",{innerHTML:c})}}},f.onerror=h,g(f,"mobify-js","mobify",{src:d})})}(window,document,function(){a=/webkit|(firefox)[\/\s](\d+)|(opera)[\s\S]*version[\/\s](\d+)|(trident)[\/\s](\d+)|3ds/i.exec(navigator.userAgent);return!a||a[1]&&4>+a[2]||a[3]&&11>+a[4]||a[5]&&6>+a[6]?!1:!0}, 5 | 6 | // path to mobify.js 7 | "/mobifyjs/build/mobify.js", 8 | 9 | // calls to APIs go here (or path to a main.js) 10 | function() { 11 | var capturing = window.Mobify && window.Mobify.capturing || false; 12 | if (capturing) { 13 | // Grab reference to a newly created document 14 | Mobify.Capture.init(function(capture){ 15 | var capturedDoc = capture.capturedDoc; 16 | // Render source DOM to document 17 | capture.renderCapturedDoc(); 18 | }); 19 | } else { 20 | parent.postMessage("finished", "*"); 21 | } 22 | });</script> 23 | <!-- END MOBIFY TAG --> 24 | </head> 25 | <body> 26 | <noscript> 27 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 28 | </noscript> 29 | 30 | </body> 31 | </html> -------------------------------------------------------------------------------- /tests/fixtures/mobify-library-example.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 | <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> 3 | <head> 4 | <script>!function(a,b,c,d,e){function g(a,c,d,e){var f=b.getElementsByTagName("script")[0];e.src?a.src=e.src:e.innerHTML&&(a.innerHTML=e.innerHTML),a.id=c,a.setAttribute("class",d),f.parentNode.insertBefore(a,f)}a.Mobify={points:[+new Date]};var f=/((; )|#|&|^)mobify=(\d)/.exec(location.hash+"; "+b.cookie);if(f&&f[3]){if(!+f[3])return}else if(!c())return;b.write('<plaintext style="display:none">'),setTimeout(function(){var c=a.Mobify=a.Mobify||{};c.capturing=!0;var f=b.createElement("script"),h=function(){var c=new Date;c.setTime(c.getTime()+18e5),b.cookie="mobify=0; expires="+c.toGMTString()+"; path=/",a.location=a.location.href};f.onload=function(){if(e){var a=b.createElement("script");if(a.onerror=h,"string"==typeof e)g(a,"main-executable","mobify",{src:e});else{var c="var main = "+e.toString()+"; main();";g(a,"main-executable","mobify",{innerHTML:c})}}},f.onerror=h,g(f,"mobify-js","mobify",{src:d})})}(window,document,function(){a=/webkit|(firefox)[\/\s](\d+)|(opera)[\s\S]*version[\/\s](\d+)|(trident)[\/\s](\d+)|3ds/i.exec(navigator.userAgent);return!a||a[1]&&4>+a[2]||a[3]&&11>+a[4]||a[5]&&6>+a[6]?!1:!0}, 5 | 6 | // path to mobify.js 7 | "/mobifyjs/build/mobify.js", 8 | 9 | // calls to APIs go here (or path to a main.js) 10 | function() { 11 | var capturing = window.Mobify && window.Mobify.capturing || false; 12 | if (capturing) { 13 | // Grab reference to a newly created document 14 | Mobify.Capture.init(function(capture){ 15 | var capturedDoc = capture.capturedDoc; 16 | // Render source DOM to document 17 | capture.renderCapturedDoc(); 18 | }); 19 | } else { 20 | parent.postMessage("finished", "*"); 21 | } 22 | });</script> 23 | <!-- END MOBIFY TAG --> 24 | </head> 25 | <body> 26 | </body> 27 | </html> -------------------------------------------------------------------------------- /tests/fixtures/plaintext-above-head-example.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html class="testclass"> 3 | <script> 4 | // Simulate mobify 5 | document.write("<plaintext style=\"display:none\">"); 6 | </script> 7 | <!-- test comment --> 8 | <head foo="bar"> 9 | 10 | <link rel="stylesheet" href="/path/to/stylesheet.css"> 11 | </head> 12 | <body bar="baz"> 13 | <!-- comment with <head> --> 14 | <p>Plaintext example page!</p> 15 | <script src="/path/to/script.js"></script> 16 | </body> 17 | </html> 18 | 19 | -------------------------------------------------------------------------------- /tests/fixtures/plaintext-comment-example.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html class="testclass"> 3 | <script> 4 | // Simulate mobify 5 | document.write("<plaintext style=\"display:none\">"); 6 | </script> 7 | <head foo="bar"> 8 | 9 | <link rel="stylesheet" href="/path/to/stylesheet.css"> 10 | </head> 11 | <!-- <body class="bad"> --> 12 | <body bar="baz"> 13 | <p>Plaintext example page!</p> 14 | <script src="/path/to/script.js"></script> 15 | </body> 16 | </html> 17 | -------------------------------------------------------------------------------- /tests/fixtures/plaintext-display-none-body.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html class="testclass"> 3 | <head foo="bar"> 4 | <script> 5 | // Simulate mobify 6 | document.write("<plaintext style=\"display:none\">"); 7 | </script> 8 | <link rel="stylesheet" href="/path/to/stylesheet.css"> 9 | </head> 10 | <body bar="baz" style="display: none"> 11 | <!-- comment with <head> --> 12 | <p>Plaintext example page!</p> 13 | <script src="/path/to/script.js"></script> 14 | </body> 15 | </html> 16 | 17 | -------------------------------------------------------------------------------- /tests/fixtures/plaintext-example.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html class="testclass"> 3 | <head foo="bar"> 4 | <script> 5 | // Simulate mobify 6 | document.write("<plaintext style=\"display:none\">"); 7 | </script> 8 | <link rel="stylesheet" href="/path/to/stylesheet.css"> 9 | </head> 10 | <body bar="baz"> 11 | <!-- comment with <head> --> 12 | <p>Plaintext example page!</p> 13 | <script src="/path/to/script.js"></script> 14 | </body> 15 | </html> 16 | 17 | -------------------------------------------------------------------------------- /tests/fixtures/plaintext-malformed-markup-example.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html class="testclass"> 3 | <script> 4 | // Simulate mobify 5 | document.write("<plaintext style=\"display:none\">"); 6 | </script> 7 | <head foo="bar>" bar='>baz'> 8 | 9 | <link rel="stylesheet" href="/path/to/stylesheet.css"> 10 | </head> 11 | <body foo="bar>" bar='>baz'> 12 | <!-- comment with <head> --> 13 | <p>Plaintext example page!</p> 14 | <script src="/path/to/script.js"></script> 15 | </body> 16 | </html> 17 | 18 | -------------------------------------------------------------------------------- /tests/fixtures/plaintext-no-end-head-example.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html class="testclass"> 3 | <head foo="bar"> 4 | <script> 5 | // Simulate mobify 6 | document.write("<plaintext style=\"display:none\">"); 7 | </script> 8 | <link rel="stylesheet" href="/path/to/stylesheet.css"> 9 | <body bar="baz"> 10 | <!-- comment with <head> --> 11 | <p>Plaintext example page!</p> 12 | <script src="/path/to/script.js"></script> 13 | </body> 14 | </html> 15 | 16 | -------------------------------------------------------------------------------- /tests/fixtures/plaintext-restore-example.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html class="testclass"> 3 | <head foo="bar"> 4 | <script> 5 | // Simulate mobify 6 | document.write("<plaintext style=\"display:none\">"); 7 | </script> 8 | </head> 9 | <body bar="baz"> 10 | <!-- comment with <head> --> 11 | <p>Plaintext example page!</p> 12 | <script src="/path/to/script.js"></script> 13 | </body> 14 | </html> 15 | 16 | -------------------------------------------------------------------------------- /tests/fixtures/plaintext-sibling-forms.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html> 3 | <head> 4 | <script> 5 | // Simulate mobify 6 | document.write("<plaintext style=\"display:none\">"); 7 | </script> 8 | </head> 9 | <body> 10 | <form></form> 11 | <form></form> 12 | </body> 13 | </html> -------------------------------------------------------------------------------- /tests/fixtures/split.html: -------------------------------------------------------------------------------- 1 | <!doctype html> 2 | <html> 3 | <head> 4 | <script> 5 | /** 6 | * Wow, a crazy test that supports both standalone and iframe'd loading! 7 | */ 8 | (function() { 9 | var restore = function(Capture) { 10 | Capture.init(function(capture) { 11 | capture.restore(); 12 | }, document); 13 | }; 14 | 15 | // Standalone 16 | if (window == parent) { 17 | var script = document.createElement("script"); 18 | script.src = "/build/mobify.js"; 19 | script.onload = function() { 20 | restore(Mobify.Capture); 21 | }; 22 | var s = document.getElementsByTagName("script")[0]; 23 | s.parentNode.insertBefore(script, s); 24 | 25 | // Iframed 26 | } else { 27 | parent.require(["capture"], function(Capture) { 28 | restore(Capture); 29 | }); 30 | } 31 | })(); 32 | </script> 33 | <plaintext> 34 | </head> 35 | <body> 36 | <p>If things worked, you should "Complete!" below:</p> 37 | <!-- SPLIT --> 38 | <h1 id="complete">Complete!</h1>h1> 39 | <script>parent.postMessage("complete", "*");</script> 40 | </body> 41 | </html> -------------------------------------------------------------------------------- /tests/fixtures/tag.html: -------------------------------------------------------------------------------- 1 | <!doctype html> 2 | <html> 3 | <head> 4 | <!-- Mobify Tag External --> 5 | <script src="/tag/v7.js"></script> 6 | <script>Mobify.Tag.init({url: "/tests/fixtures/tag/mobify.js"});</script> 7 | </head> 8 | <body> 9 | <h1>Mobify tag Tests</h1> 10 | 11 | <div id="content">Content</div> 12 | 13 | <script>parent.postMessage("error", "*");</script> 14 | </body> 15 | </html> -------------------------------------------------------------------------------- /tests/fixtures/tag/always-run.html: -------------------------------------------------------------------------------- 1 | <!doctype html> 2 | <html> 3 | <head> 4 | <script src="/tests/utils/proxyassert.js"></script> 5 | <!-- Mobify Tag External --> 6 | <script src="/tag/v7.js"></script> 7 | <script> 8 | Mobify.Tag.init({ 9 | mode: function() { return 'mobile' }, 10 | mobile: { 11 | capture: true, 12 | url: "/tests/fixtures/tag/mobile.js" 13 | } 14 | });</script> 15 | </head> 16 | <body> 17 | <h1>Mobify tag Tests</h1> 18 | 19 | <div id="content">Content</div> 20 | 21 | <script>Assert.ok(false, "Capturing failed");</script> 22 | </body> 23 | </html> -------------------------------------------------------------------------------- /tests/fixtures/tag/desktop.html: -------------------------------------------------------------------------------- 1 | <!doctype html> 2 | <html> 3 | <head> 4 | <script src="/tests/utils/proxyassert.js"></script> 5 | <!-- Mobify Tag External --> 6 | <script src="/tag/v7.js"></script> 7 | <script>Mobify.Tag.init({ 8 | mode: function() { return 'desktop' }, 9 | mobile: { 10 | capture: true, 11 | url: "/tests/fixtures/tag/mobile.js" 12 | }, 13 | desktop: { 14 | capture: false, 15 | url: "/tests/fixtures/tag/desktop.js" 16 | } 17 | });</script> 18 | </head> 19 | <body> 20 | <h1>Mobify tag Tests</h1> 21 | 22 | <div id="content">Content</div> 23 | </body> 24 | </html> -------------------------------------------------------------------------------- /tests/fixtures/tag/desktop.js: -------------------------------------------------------------------------------- 1 | window.mobifyJSLoaded = true; 2 | window.mobifyjsFileName = "/tests/fixtures/tag/desktop.js"; 3 | 4 | Assert.ok(true, "desktop.js was loaded."); 5 | Assert.ready(); -------------------------------------------------------------------------------- /tests/fixtures/tag/disabled.html: -------------------------------------------------------------------------------- 1 | <!doctype html> 2 | <html> 3 | <head> 4 | <script src="/tests/utils/proxyassert.js"></script> 5 | <!-- Mobify Tag External --> 6 | <script src="/tag/v7.js"></script> 7 | <script> 8 | Mobify.Tag.init({ 9 | mode: function() { return 'mobile' }, 10 | mobile: { 11 | capture: true, 12 | url: "/tests/fixtures/tag/mobile.js" 13 | } 14 | });</script> 15 | </head> 16 | <body> 17 | <h1>Mobify tag Tests</h1> 18 | 19 | <div id="content">Content</div> 20 | 21 | <script>Assert.ok(true, "Capturing did not run."); Assert.ready();</script> 22 | </body> 23 | </html> -------------------------------------------------------------------------------- /tests/fixtures/tag/dont-load.js: -------------------------------------------------------------------------------- 1 | window.mobifyJSLoaded = true; 2 | window.mobifyjsFileName = "/tests/fixtures/tag/dont-load.js"; 3 | 4 | Assert.ok(false, "dont-load.js was loaded."); 5 | Assert.ready(); -------------------------------------------------------------------------------- /tests/fixtures/tag/failed-load-tag.html: -------------------------------------------------------------------------------- 1 | <!doctype html> 2 | <html> 3 | <head> 4 | <script src="/tests/utils/proxyassert.js"></script> 5 | <!-- Mobify Tag External --> 6 | <script src="/tag/v7.js"></script> 7 | <script>Mobify.Tag.init({ 8 | mode: function() { return 'failed' }, 9 | failed: { 10 | capture: true, 11 | url: "/tests/fixtures/tag/should-not-exist.js" 12 | } 13 | });</script> 14 | </head> 15 | <body> 16 | <h1>Mobify tag Tests</h1> 17 | 18 | <div id="content">Content</div> 19 | 20 | <script> 21 | Assert.ok(true, "Should Fail to load and get here."); 22 | Assert.ready(); 23 | </script> 24 | </body> 25 | </html> -------------------------------------------------------------------------------- /tests/fixtures/tag/mobile.js: -------------------------------------------------------------------------------- 1 | window.mobifyJSLoaded = true; 2 | window.mobifyjsFileName = "/tests/fixtures/tag/mobile.js"; 3 | 4 | Assert.ok(true, "mobile.js was loaded."); 5 | Assert.ready(); -------------------------------------------------------------------------------- /tests/fixtures/tag/no-run.html: -------------------------------------------------------------------------------- 1 | <!doctype html> 2 | <html> 3 | <head> 4 | <script src="/tests/utils/proxyassert.js"></script> 5 | <!-- Mobify Tag External --> 6 | <script src="/tag/v7.js"></script> 7 | </head> 8 | <body> 9 | <h1>Mobify tag Tests</h1> 10 | 11 | <div id="content">Content</div> 12 | 13 | <script>Assert.ready()</script> 14 | </body> 15 | </html> -------------------------------------------------------------------------------- /tests/fixtures/tag/onerror.html: -------------------------------------------------------------------------------- 1 | <!doctype html> 2 | <html> 3 | <head> 4 | <script src="/tests/utils/proxyassert.js"></script> 5 | <!-- Mobify Tag External --> 6 | <script src="/tag/v7.js"></script> 7 | <script>Mobify.Tag.init({ 8 | url: "/path/to/fake/mobify.js" 9 | });</script> 10 | </head> 11 | <body> 12 | <h1>Mobify tag Tests</h1> 13 | 14 | <div id="content">Content</div> 15 | 16 | <script>Assert.ready()</script> 17 | </body> 18 | </html> -------------------------------------------------------------------------------- /tests/fixtures/tag/postload.html: -------------------------------------------------------------------------------- 1 | <!doctype html> 2 | <html> 3 | <head> 4 | <script src="/tests/utils/proxyassert.js"></script> 5 | 6 | <script> 7 | Assert.holdReady(); 8 | window.postloadCallback = function() { 9 | Assert.equal(window.mobifyJSLoaded, true, "postloadCallback should be fired after mobile.js has loaded."); 10 | Assert.releaseReady(); 11 | }; 12 | </script> 13 | 14 | <!-- Mobify Tag External --> 15 | <script src="/tag/v7.js"></script> 16 | <script>Mobify.Tag.init({ 17 | mode: function() { 18 | return 'mobile'; 19 | }, 20 | mobile: { 21 | capture: true, 22 | url: "/tests/fixtures/tag/mobile.js", 23 | post: window.postloadCallback 24 | } 25 | });</script> 26 | </head> 27 | <body> 28 | <h1>Mobify tag Tests</h1> 29 | 30 | <div id="content">Content</div> 31 | 32 | <script>Assert.ok(false, "Capturing failed");</script> 33 | </body> 34 | </html> -------------------------------------------------------------------------------- /tests/fixtures/tag/preload.html: -------------------------------------------------------------------------------- 1 | <!doctype html> 2 | <html> 3 | <head> 4 | <script src="/tests/utils/proxyassert.js"></script> 5 | 6 | <script> 7 | window.preloadCallback = function() { 8 | Assert.notEqual(window.mobifyJSLoaded, true, "preloadCallback should be fired before mobile.js has loaded."); 9 | }; 10 | </script> 11 | 12 | <!-- Mobify Tag External --> 13 | <script src="/tag/v7.js"></script> 14 | <script>Mobify.Tag.init({ 15 | mode: function() { 16 | return 'mobile'; 17 | }, 18 | mobile: { 19 | capture: true, 20 | url: "/tests/fixtures/tag/mobile.js", 21 | pre: window.preloadCallback 22 | } 23 | });</script> 24 | </head> 25 | <body> 26 | <h1>Mobify tag Tests</h1> 27 | 28 | <div id="content">Content</div> 29 | 30 | <script>Assert.ok(false, "Capturing failed");</script> 31 | </body> 32 | </html> -------------------------------------------------------------------------------- /tests/fixtures/tag/preview.html: -------------------------------------------------------------------------------- 1 | <!doctype html> 2 | <html> 3 | <head> 4 | <script src="/tests/utils/proxyassert.js"></script> 5 | <!-- Mobify Tag External --> 6 | <script src="/tag/v7.js"></script> 7 | 8 | <script>Mobify.Tag.init({ 9 | mode: function() { return 'mobile' }, 10 | mobile: { 11 | capture: true, 12 | url: "/tests/fixtures/tag/mobile.js" 13 | } 14 | });</script> 15 | <body> 16 | <h1>Mobify tag Tests</h1> 17 | 18 | <div id="content">Content</div> 19 | 20 | <script> 21 | Assert.ok(false, "Capturing failed."); 22 | </script> 23 | </body> 24 | </html> -------------------------------------------------------------------------------- /tests/fixtures/tag/preview.js: -------------------------------------------------------------------------------- 1 | window.mobifyJSLoaded = true; 2 | window.mobifyjsFileName = "/tests/fixtures/tag/preview.js"; 3 | 4 | Assert.ok(true, "preview.js Loaded"); 5 | Assert.ready(); -------------------------------------------------------------------------------- /tests/fixtures/tag/project1-0.html: -------------------------------------------------------------------------------- 1 | <!doctype html> 2 | <html> 3 | <head> 4 | <script src="/tests/utils/proxyassert.js"></script> 5 | <!-- Mobify Tag External --> 6 | <script src="/tag/v7.js"></script> 7 | <script> 8 | Mobify.Tag.init({ 9 | mode: function() { return 'mobile' }, 10 | mobile: { 11 | capture: true, 12 | url: "/tests/fixtures/tag/project1-0/bld/mobify.js" 13 | } 14 | });</script> 15 | <title>Title of Page</title> 16 | </head> 17 | <body> 18 | <h1>Mobify tag Tests</h1> 19 | 20 | <div id="content">Content</div> 21 | 22 | <p>First Paragraph</p> 23 | 24 | <script>Assert.ok(false, "Capturing failed");</script> 25 | </body> 26 | </html> -------------------------------------------------------------------------------- /tests/fixtures/tag/project1-0/README.md: -------------------------------------------------------------------------------- 1 | Scaffold 2 | ---------------------- 3 | 4 | <project>/ 5 | src/ 6 | tmpl/ 7 | (templates) 8 | mobify.konf 9 | project.json 10 | style.css 11 | README.md 12 | -------------------------------------------------------------------------------- /tests/fixtures/tag/project1-0/bld/style.css: -------------------------------------------------------------------------------- 1 | html{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{font:400 1em "Helvetica Neue",sans-serif;color:#15191A;background:#eaecec;text-align:center;margin:0;padding:10px 40px;width:240px}h1{font-size:1.6em}h2{font-size:1em;font-weight:400}.extract{font-weight:700;padding:10px;margin:20px;background:#fff;border:solid 1px #d7dcdd;border-radius:3px;box-shadow:0 2px 4px #d7dcdd} -------------------------------------------------------------------------------- /tests/fixtures/tag/project1-0/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "project1-0", 3 | "api": "1.0", 4 | "source_directory": "src", 5 | "build_directory": "bld", 6 | "plugins": [], 7 | "exclude": [ 8 | "*.tmpl" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /tests/fixtures/tag/project1-0/src/mobify.konf: -------------------------------------------------------------------------------- 1 | {>"/base/lib/base_konf.konf"/} 2 | {<data} { 3 | // Important: Change nothing above this point 4 | // ------------------------------------- 5 | 6 | // Extract title for use in _header.tmpl 7 | 'header': { 8 | 'title': function() { 9 | debugger; 10 | return $('title').text(); 11 | } 12 | }, 13 | 14 | // Extract page content, which is different depending on the page being rendered 15 | 'content': function(context) { 16 | return context.choose( 17 | { 18 | 'templateName': 'home' 19 | , '!firstp': function() { 20 | return $('p').first().text() || "Could not find the first paragraph text in your page"; 21 | } 22 | } 23 | /* // An example of another template object. Uncomment this block and change 24 | // your selectors to be unique to the DOM for the template you want to use 25 | ,{ 26 | 'templateName': 'about' 27 | , '!phonenumber': function() { 28 | return $('.selector_for_phone_number'); 29 | } 30 | , '!blurb': function() { 31 | return $('.selector_for_blurb'); 32 | } 33 | }*/ 34 | ) 35 | }, 36 | 37 | // Remove all desktop site scripts (optional) 38 | 'script': function() { 39 | return $('script').remove(); 40 | }, 41 | 42 | // Remove all desktop site stylesheets (optional) 43 | 'stylesheet': function() { 44 | return $('link[rel="stylesheet"]').remove(); 45 | }, 46 | 47 | // ------------------------------------- 48 | // Important: Change nothing after this point unless you know what you are doing :) 49 | 'OUTPUTHTML': function(context) { 50 | var templateName = context.data('content.templateName'); 51 | if (templateName) { 52 | return context.tmpl(templateName); 53 | } 54 | } 55 | 56 | } {/data} 57 | -------------------------------------------------------------------------------- /tests/fixtures/tag/project1-0/src/style.css: -------------------------------------------------------------------------------- 1 | html { 2 | -webkit-text-size-adjust: 100%; 3 | -ms-text-size-adjust: 100%; 4 | } 5 | body { 6 | font: normal 1em "Helvetica Neue", sans-serif; 7 | color: #15191A; 8 | background: #eaecec; 9 | text-align: center; 10 | margin: 0; 11 | padding: 10px 40px; 12 | width: 240px; 13 | } 14 | h1 { 15 | font-size: 1.6em; 16 | } 17 | h2 { 18 | font-size: 1em; 19 | font-weight: normal; 20 | } 21 | .extract { 22 | font-weight: bold; 23 | padding: 10px; 24 | margin: 20px; 25 | background: #fff; 26 | border: solid 1px #d7dcdd; 27 | border-radius: 3px; 28 | box-shadow: 0 2px 4px #d7dcdd; 29 | } 30 | -------------------------------------------------------------------------------- /tests/fixtures/tag/project1-0/src/tmpl/_footer.tmpl: -------------------------------------------------------------------------------- 1 | {! This is a footer file, which gets included inside of base.tmpl, so that every template which includes base 2 | will also include this footer. !} 3 | 4 | -------------------------------------------------------------------------------- /tests/fixtures/tag/project1-0/src/tmpl/_header.tmpl: -------------------------------------------------------------------------------- 1 | {! This is a header file, which gets included inside of base.tmpl, so that every template which includes base 2 | will also include this header. !} 3 | <header> 4 | <div class="title"> 5 | <h1>Welcome to your first Mobify.js Mobile Page</h1> 6 | <h2>As an initial example of content selection, we've selected the title of your site and placed it in _header.tmpl:</h2> 7 | <p class="extract"> 8 | {header.title} 9 | </p> 10 | </div> 11 | </header> 12 | -------------------------------------------------------------------------------- /tests/fixtures/tag/project1-0/src/tmpl/home.tmpl: -------------------------------------------------------------------------------- 1 | {>base/} 2 | 3 | {<content} 4 | <h2>We've also extracted the first paragraph from your site and placed it in home.tmpl:</h2> 5 | <p class="extract"> 6 | {content.firstp} 7 | </p> 8 | 9 | <script src="/tests/utils/proxyassert.js"></script> 10 | <script> 11 | Assert.ok(true, "Site was transformed"); 12 | Assert.ready(); 13 | </script> 14 | {/content} 15 | -------------------------------------------------------------------------------- /tests/fixtures/tag/project1-1.html: -------------------------------------------------------------------------------- 1 | <!doctype html> 2 | <html> 3 | <head> 4 | <script src="/tests/utils/proxyassert.js"></script> 5 | <!-- Mobify Tag External --> 6 | <script src="/tag/v7.js"></script> 7 | <script> 8 | Mobify.Tag.init({ 9 | mode: function() { return 'mobile' }, 10 | mobile: { 11 | capture: true, 12 | url: "/tests/fixtures/tag/project1-1/bld/mobify.js" 13 | } 14 | });</script> 15 | 16 | <title>Title of Page</title> 17 | </head> 18 | <body> 19 | <h1>Mobify tag Tests</h1> 20 | 21 | <div id="content">Content</div> 22 | 23 | <p>First Paragraph</p> 24 | 25 | <script>Assert.ok(false, "Capturing failed");</script> 26 | </body> 27 | </html> -------------------------------------------------------------------------------- /tests/fixtures/tag/project1-1/README.md: -------------------------------------------------------------------------------- 1 | Scaffold 2 | ---------------------- 3 | 4 | <project>/ 5 | src/ 6 | tmpl/ 7 | (templates) 8 | mobify.konf 9 | project.json 10 | style.css 11 | README.md 12 | -------------------------------------------------------------------------------- /tests/fixtures/tag/project1-1/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "project1-1", 3 | "api": "1.1", 4 | "source_directory": "src", 5 | "build_directory": "bld", 6 | "plugins": [], 7 | "exclude": [ 8 | "*.tmpl" 9 | ] 10 | } -------------------------------------------------------------------------------- /tests/fixtures/tag/project1-1/src/mobify.konf: -------------------------------------------------------------------------------- 1 | {>"/base/lib/base_konf.konf"/} 2 | {<konf} { 3 | // Important: Change nothing above this point 4 | // ------------------------------------- 5 | 6 | // Extract title for use in _header.tmpl 7 | 'header': { 8 | 'title': function() { 9 | return $('title').text(); 10 | } 11 | }, 12 | 13 | // Extract page content, which is different depending on the page being rendered 14 | 'content': function(context) { 15 | return context.choose( 16 | { 17 | 'templateName': 'home' 18 | , '!firstp': function() { 19 | return $('p').first().text() || "Could not find the first paragraph text in your page"; 20 | } 21 | } 22 | /* // An example of another template object. Uncomment this block and change 23 | // your selectors to be unique to the DOM for the template you want to use 24 | ,{ 25 | 'templateName': 'about' 26 | , '!phonenumber': function() { 27 | return $('.selector_for_phone_number'); 28 | } 29 | , '!blurb': function() { 30 | return $('.selector_for_blurb'); 31 | } 32 | }*/ 33 | ) 34 | }, 35 | 36 | // Remove all desktop site scripts (optional) 37 | 'script': function() { 38 | return $('script').remove(); 39 | }, 40 | 41 | // Remove all desktop site stylesheets (optional) 42 | 'stylesheet': function() { 43 | return $('link[rel="stylesheet"]').remove(); 44 | }, 45 | 46 | // ------------------------------------- 47 | // Important: Change nothing after this point unless you know what you are doing :) 48 | 'OUTPUTHTML': function(context) { 49 | var templateName = context.data('content.templateName'); 50 | if (templateName) { 51 | return context.tmpl(templateName); 52 | } 53 | } 54 | 55 | } {/konf} 56 | -------------------------------------------------------------------------------- /tests/fixtures/tag/project1-1/src/tmpl/_footer.tmpl: -------------------------------------------------------------------------------- 1 | {! This is a footer file, which gets included inside of base.tmpl, so that every template which includes base 2 | will also include this footer. !} 3 | 4 | -------------------------------------------------------------------------------- /tests/fixtures/tag/project1-1/src/tmpl/_header.tmpl: -------------------------------------------------------------------------------- 1 | {! This is a header file, which gets included inside of base.tmpl, so that every template which includes base 2 | will also include this header. !} 3 | <header> 4 | <div class="title"> 5 | <h1>Welcome to your first Mobify.js Mobile Page</h1> 6 | <h2>As an initial example of content selection, we've selected the title of your site and placed it in _header.tmpl:</h2> 7 | <p class="extract"> 8 | {header.title} 9 | </p> 10 | </div> 11 | </header> 12 | -------------------------------------------------------------------------------- /tests/fixtures/tag/project1-1/src/tmpl/home.tmpl: -------------------------------------------------------------------------------- 1 | {>base/} 2 | 3 | {<content} 4 | <h2>We've also extracted the first paragraph from your site and placed it in home.tmpl:</h2> 5 | <p class="extract"> 6 | {content.firstp} 7 | </p> 8 | 9 | <script src="/tests/utils/proxyassert.js"></script> 10 | <script> 11 | Assert.ok(true, "Site was transformed"); 12 | Assert.ready(); 13 | </script> 14 | {/content} 15 | -------------------------------------------------------------------------------- /tests/fixtures/tag/project2-0.html: -------------------------------------------------------------------------------- 1 | <!doctype html> 2 | <html> 3 | <head> 4 | <script src="/tests/utils/proxyassert.js"></script> 5 | <!-- Mobify Tag External --> 6 | <script src="/tag/v7.js"></script> 7 | <script> 8 | Mobify.Tag.init({ 9 | mode: function() { return 'mobile' }, 10 | mobile: { 11 | capture: true, 12 | url: "/build/mobify.js", 13 | post: function() { 14 | var capturing = window.Mobify && window.Mobify.capturing || false; 15 | if (capturing) { 16 | // Grab reference to a newly created document 17 | Mobify.Capture.initCapture(function(capture){ 18 | var capturedDoc = capture.capturedDoc; 19 | 20 | var script = capturedDoc.querySelector('.assert'); 21 | 22 | // Replace test failures with successess! 23 | script.innerHTML = script.innerHTML.replace("false", "true"); 24 | 25 | capture.renderCapturedDoc(); 26 | }); 27 | } else { 28 | window.elseClauseHit = true; 29 | } 30 | } 31 | } 32 | });</script> 33 | 34 | <title>Title of Page</title> 35 | </head> 36 | <body> 37 | <h1>Mobify tag Tests</h1> 38 | 39 | <div id="content">Content</div> 40 | 41 | <script class="assert">Assert.ok(false, "This assertion should be changed to true."); Assert.ready();</script> 42 | </body> 43 | </html> -------------------------------------------------------------------------------- /tests/fixtures/tag/single-mode.html: -------------------------------------------------------------------------------- 1 | <!doctype html> 2 | <html> 3 | <head> 4 | <script src="/tests/utils/proxyassert.js"></script> 5 | <!-- Mobify Tag External --> 6 | <script src="/tag/v7.js"></script> 7 | <script>Mobify.Tag.ua = "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7";</script> 8 | <script>Mobify.Tag.init({ 9 | url: "/tests/fixtures/tag/mobile.js" 10 | });</script> 11 | </head> 12 | <body> 13 | <h1>Mobify tag Tests</h1> 14 | 15 | <div id="content">Content</div> 16 | 17 | <script>Assert.ok(false, "Capturing failed");</script> 18 | </body> 19 | </html> -------------------------------------------------------------------------------- /tests/fixtures/tag/skip-preview.html: -------------------------------------------------------------------------------- 1 | <!doctype html> 2 | <html> 3 | <head> 4 | <script src="/tests/utils/proxyassert.js"></script> 5 | <!-- Mobify Tag External --> 6 | <script src="/tag/v7.js"></script> 7 | <script> 8 | Mobify.Tag.previewUrl = "/tests/fixtures/tag/preview.js"; 9 | </script> 10 | 11 | <script>Mobify.Tag.init({ 12 | skipPreview: true, 13 | mode: function() { return 'mobile' }, 14 | mobile: { 15 | capture: true, 16 | url: "/tests/fixtures/tag/mobile.js" 17 | } 18 | });</script> 19 | <body> 20 | <h1>Mobify tag Tests</h1> 21 | 22 | <div id="content">Content</div> 23 | 24 | <script> 25 | Assert.ok(false, "Capturing failed."); 26 | </script> 27 | </body> 28 | </html> -------------------------------------------------------------------------------- /tests/fixtures/tag/useragent.html: -------------------------------------------------------------------------------- 1 | <!doctype html> 2 | <html> 3 | <head> 4 | <script src="/tests/utils/proxyassert.js"></script> 5 | <!-- Mobify Tag External --> 6 | <script src="/tag/v7.js"></script> 7 | <script>Mobify.Tag.ua = "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7";</script> 8 | <script>Mobify.Tag.init({ 9 | mode: function(userAgent) { 10 | if (/ip(hone|ad|od)/i.test(userAgent)) { 11 | return 'mobile'; 12 | } 13 | return 'desktop'; 14 | }, 15 | mobile: { 16 | capture: true, 17 | url: "/tests/fixtures/tag/mobile.js" 18 | }, 19 | desktop: { 20 | capture: false, 21 | url: "/tests/fixtures/tag/desktop.js" 22 | } 23 | });</script> 24 | </head> 25 | <body> 26 | <h1>Mobify tag Tests</h1> 27 | 28 | <div id="content">Content</div> 29 | </body> 30 | </html> -------------------------------------------------------------------------------- /tests/fixtures/unblock-example.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html class="testclass"> 3 | <head> 4 | <script> 5 | // Simulate mobify 6 | document.write("<plaintext style=\"display:none\">"); 7 | </script> 8 | <script src="/path/to/script1.js" do-not-move></script> 9 | <script src="/path/to/script2.js"></script> 10 | <script src="/path/to/script3.js"></script> 11 | </head> 12 | <body> 13 | <p>Unblock fixture page!</p> 14 | </body> 15 | </html> 16 | 17 | -------------------------------------------------------------------------------- /tests/index.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html class="foo"> 3 | <head> 4 | <meta charset="utf-8"> 5 | <title>mobify.js tests</title> 6 | <link rel="stylesheet" href="/tests/resources/qunit-1.10.0.css"> 7 | <script src="/tests/resources/qunit-1.10.0.js"></script> 8 | <script src="/tests/resources/require.js"></script> 9 | <script src="/tests/resources/jquery-1.7.1.js"></script> 10 | <script src="/tests/utils/compare-html.js"></script> 11 | 12 | <meta name="viewport" content="width=device-width, user-scalable=no"> 13 | </head> 14 | <body> 15 | 16 | <div id="qunit"></div> 17 | <div id="qunit-fixture"> 18 | 19 | <textarea id="disable-test-fixture"> 20 | <html> 21 | <head> 22 | <link href="/path/to/stylesheet.css"> 23 | <style media="query"></style> 24 | </head> 25 | <body> 26 | <img src="/path/to/image.png"></img> 27 | <iframe src="/path/to/page.html"></iframe> 28 | </body> 29 | </html> 30 | </textarea> 31 | 32 | <textarea id="enable-test-fixture"> 33 | <html> 34 | <head> 35 | <link x-href="/path/to/stylesheet.css"> 36 | <style x-media="query"></style> 37 | </head> 38 | <body> 39 | <img x-src="/path/to/image.png"></img> 40 | <iframe x-src="/path/to/page.html"></iframe> 41 | </body> 42 | </html> 43 | </textarea> 44 | 45 | <div id="foo-element" foo="bar"></div> 46 | 47 | <div id="foo-element" foo="bar"></div> 48 | 49 | <div id="disabled-stylesheet-link"> 50 | <link rel="stylesheet" x-href="/foo.css"> 51 | </div> 52 | </div> 53 | 54 | <script> 55 | // http://api.qunitjs.com/QUnit.config/ 56 | QUnit.config.autostart = false; 57 | QUnit.config.testTimeout = 30 * 1000; 58 | 59 | var removeNewlines = function(str) { 60 | return str.replace(/(\r\n|\n|\r)/gm,''); 61 | }; 62 | 63 | var log = []; 64 | var testName; 65 | 66 | QUnit.done(function (test_results) { 67 | var tests = []; 68 | for(var i = 0, len = log.length; i < len; i++) { 69 | var details = log[i]; 70 | tests.push({ 71 | name: details.name, 72 | result: details.result, 73 | expected: details.expected, 74 | actual: details.actual, 75 | source: details.source 76 | }); 77 | } 78 | test_results.tests = tests; 79 | 80 | window.global_test_results = test_results; 81 | }); 82 | QUnit.testStart(function(testDetails){ 83 | QUnit.log(function(details){ 84 | if (!details.result) { 85 | details.name = testDetails.name; 86 | log.push(details); 87 | } 88 | }); 89 | }); 90 | 91 | require.config({ 92 | "baseUrl": "../src", 93 | "paths": { 94 | "mobifyjs": "../src", 95 | "mobifyjs/utils": "../bower_components/mobifyjs-utils/utils", 96 | "mobifyjs/capture": "../bower_components/capturejs/src/capture", 97 | "patchAnchorLinks": "../bower_components/capturejs/src/patchAnchorLinks" 98 | } 99 | }); 100 | 101 | </script> 102 | <script src="unblockify-tests.js"></script> 103 | 104 | <script src="/tag/supportedBrowser.js"></script> 105 | <script src="supportedBrowser-tests.js"></script> 106 | <script src="tag-tests.js"></script> 107 | </body> 108 | </html> 109 | -------------------------------------------------------------------------------- /tests/resources/smallscript.js: -------------------------------------------------------------------------------- 1 | verify.push(4); 2 | -------------------------------------------------------------------------------- /tests/supportedBrowser-tests.js: -------------------------------------------------------------------------------- 1 | module("SupportedBrowser"); 2 | 3 | test("Ensure Supported Browser function works", function() { 4 | var ua = "Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko"; 5 | equal(window.supportedBrowser(ua), true, "Correctly detects browser support for IE11"); 6 | 7 | var ua = "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)"; 8 | equal(window.supportedBrowser(ua), true, "Correctly detects browser support for IE10"); 9 | 10 | var ua = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 7.1; Trident/5.0)"; 11 | equal(window.supportedBrowser(ua), false, "Correctly detects browser support for IE9"); 12 | 13 | var ua = "Mozilla/45.0 (compatible; MSIE 6.0; Windows NT 5.1)"; 14 | equal(window.supportedBrowser(ua), false, "Correctly detects browser support for IE6"); 15 | 16 | // Firefox browsers 17 | var ua = "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100915 Gentoo Firefox/3.6.9"; 18 | equal(window.supportedBrowser(ua), false, "Correctly detects browser support for FF3.6"); 19 | 20 | var ua = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:25.0) Gecko/20100101 Firefox/25.0"; 21 | equal(window.supportedBrowser(ua), true, "Correctly detects browser support for FF25"); 22 | 23 | var ua = "Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9.1.3) Gecko/20091020 Ubuntu/10.04 (lucid) Firefox/4.0.1"; 24 | equal(window.supportedBrowser(ua), true, "Correctly detects browser support for Firefox 4.0.1"); 25 | 26 | var ua = "Mozilla/6.0 (Windows NT 6.2; WOW64; rv:16.0.1) Gecko/20121011 Firefox/16.0.1"; 27 | equal(window.supportedBrowser(ua), true, "Correctly detects browser support for Firefox 16.0.1"); 28 | 29 | // iOS browsers 30 | var ua = "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7"; 31 | equal(window.supportedBrowser(ua), true, "Correctly detects browser support for iPhone"); 32 | 33 | // Chrome browsers 34 | var ua = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.15 (KHTML, like Gecko) Chrome/24.0.1295.0 Safari/537.15"; 35 | equal(window.supportedBrowser(ua), true, "Correctly detects browser support for Chrome 24"); 36 | 37 | // Opera browsers 38 | var ua = "Opera/12.80 (Windows NT 5.1; U; en) Presto/2.10.289 Version/12.02"; 39 | equal(window.supportedBrowser(ua), true, "Correctly detects browser support for Opera 12"); 40 | 41 | var ua = "Opera/9.80 (X11; Linux x86_64; U; Ubuntu/10.10 (maverick); pl) Presto/2.7.62 Version/11.01"; 42 | equal(window.supportedBrowser(ua), true, "Correctly detects browser support for Opera 11"); 43 | 44 | var ua = "Opera/9.80 (Windows NT 6.1; U; pl) Presto/2.6.31 Version/10.70"; 45 | equal(window.supportedBrowser(ua), false, "Correctly detects browser support for Opera 10"); 46 | }); -------------------------------------------------------------------------------- /tests/tag-old-browser.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html class="foo"> 3 | <head> 4 | <meta charset="utf-8"> 5 | <title>Mobify.js Tag Tests for Old Browsers</title> 6 | <link rel="stylesheet" href="/tests/resources/qunit-1.10.0.css"> 7 | <script src="/tests/resources/qunit-1.10.0.js"></script> 8 | <script src="/tests/resources/jquery-1.7.1.js"></script> 9 | 10 | <meta name="viewport" content="width=device-width, user-scalable=no"> 11 | </head> 12 | <body> 13 | 14 | <div id="qunit"></div> 15 | 16 | <div id="qunit-fixture"> 17 | </div> 18 | 19 | 20 | <script src="/tag/v7.exposed.min.js"></script> 21 | 22 | <script> 23 | var Assert = window.Assert = {} 24 | Assert._waitingCb = null; 25 | Assert.ok = ok; 26 | Assert.ready = function() { 27 | Assert._waitingCb(); 28 | } 29 | 30 | asyncTest("Ensures tag at least loads", function() { 31 | Assert._waitingCb = function() { 32 | equal(window.mobifyjsFileName, "/tests/fixtures/tag/desktop.js", "Correct file loaded."); 33 | 34 | start(); 35 | }; 36 | 37 | ok(Mobify.Tag.init, "Mobify.Tag.init should exist."); 38 | 39 | Mobify.Tag.init({ 40 | mode: function() {return 'desktop'}, 41 | desktop: { 42 | capture: false, 43 | url: "/tests/fixtures/tag/desktop.js" 44 | } 45 | }); 46 | }); 47 | 48 | asyncTest("Ensures single-mode does not blow up", function() { 49 | expect(1); 50 | 51 | Assert._waitingCb = function() { 52 | start(); 53 | }; 54 | 55 | // This should always load 56 | Mobify.Tag.init({ 57 | capture: false, 58 | url: "/tests/fixtures/tag/desktop.js" 59 | }); 60 | }); 61 | </script> 62 | 63 | </body> 64 | </html> 65 | -------------------------------------------------------------------------------- /tests/unblockify-tests.js: -------------------------------------------------------------------------------- 1 | require(["mobifyjs/utils", "mobifyjs/capture", "mobifyjs/unblockify"], function(Utils, Capture, Unblockify) { 2 | window.Unblockify = Unblockify; 3 | QUnit.start(); 4 | 5 | module("Unblockify"); 6 | asyncTest("moveScripts", function(){ 7 | var iframe = $("<iframe>", { 8 | id: "unblock-test", 9 | src: "/tests/fixtures/unblock-example.html" 10 | }); 11 | 12 | var iframeLoaded = false; 13 | iframe.load(function(){ 14 | var doc = this.contentDocument; 15 | 16 | // Remove the webdriver attribute set when running tests on selenium (done through SauceLabs on various browsers (FF14 on OSX)) 17 | var htmlEl = doc.getElementsByTagName("html")[0].removeAttribute("webdriver"); 18 | 19 | var capture = Capture.init(function(capture){ 20 | var capturedDoc = capture.capturedDoc; 21 | 22 | var scripts = Array.prototype.slice.call(capturedDoc.querySelectorAll("script")).filter(function(script){ 23 | if (script.hasAttribute("do-not-move")){ 24 | return false; 25 | } 26 | return true; 27 | }); 28 | Unblockify.moveScripts(scripts, capturedDoc); 29 | 30 | if (iframeLoaded == false) { 31 | iframeLoaded = true; 32 | var expectedHtml = "<html class=\"testclass\"><head> \ 33 | <script type=\"text/mobify-script\" x-src=\"/path/to/script1.js\" do-not-move=\"\"><\/script> </head><body> <p>Unblock fixture page!</p><script type=\"text/mobify-script\" x-src=\"/path/to/script2.js\"><\/script><script type=\"text/mobify-script\" x-src=\"/path/to/script3.js\"><\/script></body></html>"; 34 | equal(removeNewlines(Utils.outerHTML(capturedDoc.documentElement)), expectedHtml, "Scripts moved to bottom, filtered-out script left in place"); 35 | start(); 36 | } 37 | }, doc); 38 | }); 39 | 40 | $("#qunit-fixture").append(iframe); 41 | }); 42 | 43 | }); 44 | -------------------------------------------------------------------------------- /tests/utils/proxyassert.js: -------------------------------------------------------------------------------- 1 | window.Assert = (function() { 2 | var sendMessage = function(method, args) { 3 | var message = { 4 | "assert": true, 5 | "method": method, 6 | "args": [].slice.call(args) 7 | }; 8 | 9 | parent.postMessage("json:" + JSON.stringify(message), "*"); 10 | }; 11 | 12 | var exports = {}; 13 | 14 | var ready = false; 15 | var readyHold = 0; 16 | var callReady = false; 17 | 18 | exports.ready = function() { 19 | callReady = true; 20 | 21 | if (!ready && readyHold === 0) { 22 | parent.postMessage("ready", "*"); 23 | ready = true; 24 | } 25 | }; 26 | 27 | exports.holdReady = function() { 28 | readyHold++; 29 | }; 30 | 31 | exports.releaseReady = function() { 32 | readyHold--; 33 | 34 | if (callReady) { exports.ready() }; 35 | }; 36 | 37 | var methods = [ 38 | 'deepEqual', 39 | 'equal', 40 | 'notDeepEqual', 41 | 'notEqual', 42 | 'notStrictEqual', 43 | 'ok', 44 | 'strictEqual', 45 | 'start' 46 | ] 47 | 48 | for (var i=0, _len=methods.length; i<_len; i++) { 49 | var method = methods[i]; 50 | 51 | exports[method] = (function(method) { 52 | return function() { 53 | sendMessage(method, arguments); 54 | }; 55 | })(method); 56 | } 57 | 58 | return exports; 59 | })(); -------------------------------------------------------------------------------- /www/Gemfile: -------------------------------------------------------------------------------- 1 | source "http://rubygems.org" 2 | gem "jekyll" 3 | gem "kramdown" 4 | -------------------------------------------------------------------------------- /www/_config.yml: -------------------------------------------------------------------------------- 1 | permalink: pretty 2 | markdown: kramdown 3 | 4 | kramdown: 5 | use_coderay: true 6 | entity_output: symbolic 7 | 8 | baseurl: /mobifyjs -------------------------------------------------------------------------------- /www/_includes/nav-docsv2.md: -------------------------------------------------------------------------------- 1 | # v2 Documentation Index 2 | 3 | - [Quick start]({{ site.baseurl }}/v2/docs/) 4 | - [Capturing API]({{ site.baseurl }}/v2/docs/capturing) 5 | - [`Capture.init()`]({{ site.baseurl }}/v2/docs/capturing/#captureinitcallback-document-prefixx-) 6 | - [`getCapturedDoc()`]({{ site.baseurl }}/v2/docs/capturing/#getcaptureddoc) 7 | - [`capturing` variable]({{ site.baseurl }}/v2/docs/capturing/#capturing-variable) 8 | - [`enabledHTMLString()`]({{ site.baseurl }}/v2/docs/capturing/#enabledhtmlstring) 9 | - [`render(htmlString)`]({{ site.baseurl }}/v2/docs/capturing/#renderhtmlstring) 10 | - [`renderCapturedDoc()`]({{ site.baseurl }}/v2/docs/capturing/#rendercaptureddoc) 11 | - [`restore()`]({{ site.baseurl }}/v2/docs/capturing/#restore) 12 | - [`patchAnchorLinks()`]({{ site.baseurl }}/v2/docs/capturing/#patchanchorlinks) 13 | - [Browser Support]({{ site.baseurl }}/v2/docs/capturing/#browser-support) 14 | - [Image API]({{ site.baseurl }}/v2/docs/image-resizer) 15 | - [`resize`]({{ site.baseurl }}/v2/docs/image-resizer/#resizeimagesresizeimgelements-options) 16 | - [`getImageURL`]({{ site.baseurl }}/v2/docs/image-resizer/#resizeimagesgetimageurlurl-options) 17 | - [`processOptions`]({{ site.baseurl }}/v2/docs/image-resizer/#resizeimagesprocessoptions) 18 | - [WebP]({{ site.baseurl }}/v2/docs/image-resizer/#webp) 19 | - [Simplified Picture Element]({{ site.baseurl }}/v2/docs/image-resizer/#simplified-picture-element) 20 | - [ir0.mobify.com]({{ site.baseurl }}/v2/docs/image-resizer/#ir0mobifycom) 21 | - [Browser Support]({{ site.baseurl }}/v2/docs/image-resizer/#browser-support) 22 | -------------------------------------------------------------------------------- /www/_includes/nav-examples.html: -------------------------------------------------------------------------------- 1 | <div class="nav-examples"> 2 | <div class="demostore"> 3 | <h3><a href="{{ site.baseurl }}/examples/#demostore">Demo Site</a></h3> 4 | </div> 5 | <!-- 6 | <div class="demoblog"> 7 | <a href="/examples/demoblog/"><h3>Demo Blog</h3></a> 8 | <p>Description</p> 9 | </div> 10 | --> 11 | </div> -------------------------------------------------------------------------------- /www/_includes/nav-examplesv2.html: -------------------------------------------------------------------------------- 1 | 2 | <div class="nav-examples"> 3 | <div class="image-resizing-img-element"> 4 | <h3><a href="{{ site.baseurl }}/v2/examples/#image-resizing---img">Image Resizing - IMG</a></h3> 5 | </div> 6 | <div class="image-resizing-picture-element"> 7 | <h3><a href="{{ site.baseurl }}/v2/examples/#image-resizing---picture">Image Resizing - PICTURE</a></h3> 8 | </div> 9 | <div class="picture-polyfill"> 10 | <h3><a href="{{ site.baseurl }}/v2/examples/#capturing---picture-polyfill">Picture Polyfill</a></h3> 11 | </div> 12 | <div class="grumpycat"> 13 | <h3><a href="{{ site.baseurl }}/v2/examples/#capturing---grumpy-cat">Capturing - Grumpy Cat</a></h3> 14 | </div> 15 | <div class="media-queries"> 16 | <h3><a href="{{ site.baseurl }}/v2/examples/#capturing---media-queries">Capturing - Media Queries</a></h3> 17 | </div> 18 | <div class="templating"> 19 | <h3><a href="{{ site.baseurl }}/v2/examples/#capturing---basic-templating">Capturing - Basic Templating</a></h3> 20 | </div> 21 | </div> 22 | 23 | -------------------------------------------------------------------------------- /www/_includes/nav.html: -------------------------------------------------------------------------------- 1 | <div class="nav-wrapper"> 2 | <ul class="nav"> 3 | <li class="nav-about"> 4 | {% active_links %} 5 | <a href="/mobifyjs/" class="rounded about">About</a> 6 | {% endactive_links %} 7 | </li> 8 | <li class="nav-docs"> 9 | {% active_links prefix %} 10 | <a href="/mobifyjs/docs/" class="rounded">Docs</a> 11 | </li> 12 | <li class="nav-examples"> 13 | <a href="/mobifyjs/examples/" class="rounded">Examples</a> 14 | </li> 15 | <li class="nav-community"> 16 | <a href="/mobifyjs/community/" class="rounded">Community</a> 17 | </li> 18 | <li class="dropdown nav-version"> 19 | <a class="dropdown-toggle" data-toggle="dropdown" href="#" class="rounded"> 20 | 1.1<b class="caret"></b> 21 | </a> 22 | <ul class="dropdown-menu"> 23 | <li><a href="/mobifyjs/v2/docs/">2.0</a></li> 24 | <li><a href="/mobifyjs/docs/">1.1</a></li> 25 | </ul> 26 | </li> 27 | <li class="nav-version-mobile"> 28 | <a class="rounded" href="/mobifyjs/v2/docs/">2.0</a> 29 | </li> 30 | <li> 31 | <a href="//twitter.com/mobifyjs" class="rounded"><i class="icon-twitter"></i></a> 32 | </li> 33 | </ul><!-- .nav --> 34 | {% endactive_links %} 35 | </div> 36 | -------------------------------------------------------------------------------- /www/_includes/navv2.html: -------------------------------------------------------------------------------- 1 | <div class="nav-wrapper"> 2 | <ul class="nav"> 3 | <li class="nav-about"> 4 | {% active_links %} 5 | <a href="/mobifyjs/" class="rounded about">About</a> 6 | {% endactive_links %} 7 | </li> 8 | <li class="nav-docs"> 9 | {% active_links prefix %} 10 | <a href="/mobifyjs/v2/docs/" class="rounded">Docs</a> 11 | </li> 12 | <li class="nav-examples"> 13 | <a href="/mobifyjs/v2/examples/" class="rounded">Examples</a> 14 | </li> 15 | <li class="nav-community"> 16 | <a href="/mobifyjs/v2/community/" class="rounded">Community</a> 17 | </li> 18 | <li class="dropdown nav-version"> 19 | <a class="dropdown-toggle rounded" data-toggle="dropdown" href="#"> 20 | 2.0<b class="caret"></b></a> 21 | <ul class="dropdown-menu"> 22 | <li><a href="/mobifyjs/v2/docs/">2.0</a></li> 23 | <li><a href="/mobifyjs/docs/">1.1</a></li> 24 | </ul> 25 | </li> 26 | <li class="nav-version-mobile"> 27 | <a class="rounded" href="/mobifyjs/docs/">1.1</a> 28 | </li> 29 | <li> 30 | <a href="//twitter.com/mobifyjs" 31 | class="rounded"><i class="icon-twitter"></i></a> 32 | </li> 33 | </ul><!-- .nav --> 34 | {% endactive_links %} 35 | </div> 36 | -------------------------------------------------------------------------------- /www/_includes/paid_warning.html: -------------------------------------------------------------------------------- 1 | <div class="alert alert-block"> 2 | <p>If you have purchased a Mobify platform subscription, please head over to 3 | <a href="https://cloud.mobify.com">cloud.mobify.com</a> 4 | to get your tag instead.</p> 5 | </div> 6 | -------------------------------------------------------------------------------- /www/_layouts/basev1.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: base 3 | --- 4 | 5 | 6 | <div class="navbar row-fluid"> 7 | <div class="navbar-inner"> 8 | <a class="brand" href="/mobifyjs/">Mobify.js</a> 9 | 10 | {% include nav.html %} 11 | 12 | <!-- Not Implemented 13 | <form class="navbar-search pull-right" action=""> 14 | <input type="text" class="search-query span2" placeholder="Search"> 15 | </form> 16 | --> 17 | 18 | </div><!-- .navbar-inner --> 19 | </div><!-- .navbar --> 20 | 21 | {{ content }} 22 | -------------------------------------------------------------------------------- /www/_layouts/basev2.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: base 3 | --- 4 | 5 | <div class="navbar row-fluid"> 6 | <div class="navbar-inner"> 7 | <a class="brand" href="/mobifyjs/">Mobify.js</a> 8 | {% include navv2.html %} 9 | </div><!-- .navbar-inner --> 10 | </div><!-- .navbar --> 11 | 12 | {{ content }} -------------------------------------------------------------------------------- /www/_layouts/doc.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: basev1 3 | bodyclass: docs 4 | --- 5 | 6 | 7 | <div class="row-fluid reversed-column"> 8 | <div class="span8"> 9 | {{ content }} 10 | </div> 11 | <div class="span4 sidebar-nav docs-nav rounded shaded"> 12 | {% active_links %}{% capture nav %}{% include nav-docs.md %}{% endcapture %}{{ nav | markdownify }}{% endactive_links %} 13 | </div> 14 | </div> 15 | -------------------------------------------------------------------------------- /www/_layouts/docv2.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: basev2 3 | bodyclass: docsv2 4 | --- 5 | 6 | 7 | <div class="row-fluid reversed-column"> 8 | <div class="span8"> 9 | <div class="alert alert-block"> 10 | <p>These docs are for the developer preview of Mobify.js 2.0.</p> 11 | <p>Looking for the 1.1 documentation? <a href="/mobifyjs/docs/">It's right here!</a></p> 12 | </div> 13 | 14 | {{ content }} 15 | </div> 16 | <div class="span4 sidebar-nav docs-nav rounded shaded"> 17 | {% active_links %}{% capture nav %}{% include nav-docsv2.md %}{% endcapture %}{{ nav | markdownify }}{% endactive_links %} 18 | </div> 19 | </div> 20 | -------------------------------------------------------------------------------- /www/_layouts/example.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: basev1 3 | bodyclass: examples 4 | --- 5 | 6 | <div class="row-fluid"> 7 | <div class="span12 reversed-column"> 8 | <div class="span8"> 9 | {{ content }} 10 | </div> 11 | 12 | <div class="span4 sidebar-nav examples-nav shaded rounded"> 13 | {% include nav-examples.html %} 14 | </div> 15 | </div> 16 | </div> 17 | -------------------------------------------------------------------------------- /www/_layouts/examplev2.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: basev2 3 | bodyclass: examples 4 | --- 5 | 6 | <div class="row-fluid"> 7 | <div class="span12 reversed-column"> 8 | <div class="span8"> 9 | {{ content }} 10 | </div> 11 | 12 | <div class="span4 sidebar-nav examples-nav shaded rounded"> 13 | {% include nav-examplesv2.html %} 14 | </div> 15 | </div> 16 | </div> 17 | -------------------------------------------------------------------------------- /www/_layouts/page-community.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: basev1 3 | bodyclass: page 4 | --- 5 | 6 | <div class="row-fluid"> 7 | <div class="span12"> 8 | <div class="lead-in rounded shaded"> 9 | <h1>Community</h1> 10 | <p>The Mobify.js project is open source and we actively encourage contributions in all forms: code, documentation, issues, suggestions, and criticism.</p> 11 | </div> 12 | <div class="row-fluid"> 13 | <div class="span4"> 14 | </div> 15 | <div class="span8"> 16 | {{ content }} 17 | </div> 18 | </div> 19 | </div> 20 | </div> 21 | -------------------------------------------------------------------------------- /www/_layouts/page-communityv2.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: basev2 3 | bodyclass: page 4 | --- 5 | 6 | <div class="row-fluid"> 7 | <div class="span12"> 8 | <div class="lead-in rounded shaded"> 9 | <h1>Community</h1> 10 | <p>The Mobify.js project is open source and we actively encourage contributions in all forms: code, documentation, issues, suggestions, and criticism.</p> 11 | </div> 12 | <div class="row-fluid"> 13 | <div class="span4"> 14 | </div> 15 | <div class="span8"> 16 | {{ content }} 17 | </div> 18 | </div> 19 | </div> 20 | </div> 21 | -------------------------------------------------------------------------------- /www/_layouts/page-license.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: base 3 | bodyclass: license 4 | --- 5 | 6 | <div class="row-fluid"> 7 | <div class="span12"> 8 | <div class="row-fluid"> 9 | <div class="span8"> 10 | {{ content }} 11 | </div> 12 | <div class="span4"> 13 | </div> 14 | </div> 15 | </div> 16 | </div> 17 | -------------------------------------------------------------------------------- /www/_layouts/page.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: base 3 | bodyclass: page 4 | --- 5 | 6 | <div class="row-fluid"> 7 | <div class="span12"> 8 | {{ content }} 9 | </div> 10 | </div> 11 | -------------------------------------------------------------------------------- /www/_plugins/active.rb: -------------------------------------------------------------------------------- 1 | module Jekyll 2 | 3 | class ActiveTag < Liquid::Block 4 | def initialize(tag_name, prefix, tokens) 5 | super 6 | @prefix = prefix.strip() != "" 7 | end 8 | 9 | def render(context) 10 | content = super 11 | rawUrl = context['page']['url'] 12 | baseUrl = context['site']['baseurl'] or "/" 13 | 14 | url = baseUrl + rawUrl.sub(/index.html$/, "") 15 | 16 | aTags = /<a\s+href="(.*?)">/ 17 | 18 | newContent = content.gsub /<a\s+href="([^"]*?)"(\s+class="([^"]*?)")?/xi do | match | 19 | linkUrl = $1 20 | classes = $3 21 | if (linkUrl == url) or (@prefix and (url.match /^#{linkUrl}/) != nil) 22 | "<a href=\"#{linkUrl}\" class=\"active #{classes or ''}\"" 23 | else 24 | match 25 | end 26 | end 27 | 28 | newContent 29 | end 30 | end 31 | 32 | end 33 | 34 | Liquid::Template.register_tag('active_links', Jekyll::ActiveTag) 35 | -------------------------------------------------------------------------------- /www/cla.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Mobify.js Contributor License Agreement 4 | description: 5 | Learn the terms and conditions under which you can contribute changes 6 | to Mobify.js open source project. 7 | --- 8 | 9 | # Contributor License Agreement ("Agreement") 10 | 11 | Thank you for your interest in the Mobify.js ("Mobify.js") open source 12 | project being administered by Mobify R&D Inc ("Mobify"). The form of 13 | license below is a document that clarifies the terms under which You, 14 | the person listed below, may contribute software, bug fixes, 15 | configuration changes, documentation, or any other materials that you 16 | send to us related to the Project (each a "Contribution") to the 17 | project. We appreciate your participation in our project, and your 18 | help in improving the project, so we want you to understand what will 19 | be done with the Contributions. This license is for your protection as 20 | well as the protection of Mobify and its licensees; it does not change 21 | your rights to use your own Contributions for any other 22 | purpose. Please read the following information about you and the 23 | Contributions and complete the form that follows. 24 | 25 | You and Mobify agree: 26 | 27 | 1. You grant us the ability to use the Contributions in any way. You 28 | hereby grant to Mobify, a non-exclusive, irrevocable, worldwide, 29 | royalty-free, sublicenseable, transferable license under all of Your 30 | relevant intellectual property rights (including copyright, patent, 31 | and any other rights), to use, copy, prepare derivative works of, 32 | distribute and publicly perform and display the Contributions on any 33 | licensing terms, including without limitation: (a) open source 34 | licenses like the GNU General Public License (GPL), the GNU Lesser 35 | General Public License (LGPL), the Common Public License, or the 36 | Berkeley Software Distribution license (BSD); and (b) binary, 37 | proprietary, or commercial licenses. Except for the licenses granted 38 | herein, You reserve all right, title, and interest in and to the 39 | Contribution. 40 | 41 | 2. You are able to grant us these rights. You represent 42 | that You are legally entitled to grant the above license. 43 | If Your employer has rights to intellectual property that 44 | You create, You represent that You have received permission 45 | to make the Contributions on behalf of that employer, or 46 | that Your employer has waived such rights for the 47 | Contributions. 48 | 49 | 3. The Contributions are your original work. You represent 50 | that the Contributions are Your original works of 51 | authorship, and to Your knowledge, no other person claims, 52 | or has the right to claim, any right in any invention or 53 | patent related to the Contributions. You also represent 54 | that You are not legally obligated, whether by entering into 55 | an agreement or otherwise, in any way that conflicts with 56 | the terms of this license. For example, if you have signed 57 | an agreement requiring you to assign the intellectual 58 | property rights in the Contributions to an employer or 59 | customer, that would conflict with the terms of this 60 | license. 61 | 62 | 4. We determine the code that is in our project. You 63 | understand that the decision to include the Contribution in 64 | any project or source repository is entirely that of Mobify, 65 | and this agreement does not guarantee that the Contributions 66 | will be included in any product. 67 | 68 | 5. No Implied Warranties. Mobify acknowledges that, except 69 | as explicitly described in this Agreement, the Contribution 70 | is provided on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR 71 | CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, 72 | INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR 73 | CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR 74 | FITNESS FOR A PARTICULAR PURPOSE. 75 | 76 | <iframe id="cla" src="https://docs.google.com/a/mobify.me/spreadsheet/embeddedform?formkey=dGo2V3UzWThUUXp6b0hod2F1VXFRR1E6MQ" width="100%" height="1058" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe> 77 | 78 | -------------------------------------------------------------------------------- /www/community.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page-community 3 | title: Mobify.js Community – Get Help, Report Bugs, &amp; Contribute 4 | description: 5 | Find out how to get support, report bugs or issues and contribute changes 6 | to Mobify.js open source project. Join a community of mobile website 7 | developers. 8 | --- 9 | 10 | ## Where to get help? 11 | 12 | Questions are best posted on [StackOverflow](http://stackoverflow.com/) under 13 | the tag **mobifyjs**. Our team is active on StackOverflow for mobify.js and 14 | other projects. 15 | 16 | If you have a problem with the [Mobify Cloud Platform](https://cloud.mobify.com/) 17 | or you wish to reach our Mobify Cloud support team you can reach us through our 18 | [support site](https://support.mobify.com/). 19 | {:.cloud} 20 | 21 | ## Where to report bugs? 22 | 23 | Bugs and feature requests should be submitted to our issue tracker on GitHub: 24 | 25 | - [Issues with Mobify.js](https://github.com/mobify/mobifyjs/issues) 26 | - [Issues with the Mobify Client](https://github.com/mobify/mobify-client/issues) 27 | 28 | If you're not sure which project to submit your issues to, submit to either and 29 | we will sort them out. 30 | 31 | ## How to Contribute 32 | 33 | The development of Mobify.js takes place on GitHub. We have two primary 34 | repositories dedicated to Mobify.js: the [Mobify.js library](https://github.com/mobify/mobifyjs) 35 | and the [Mobify Client](https://github.com/mobify/mobify-client), which is our development tool. 36 | 37 | Contributing changes is straightforward: 38 | 39 | 1. Fork the repository on Github 40 | 2. Push your changes to your fork 41 | 3. Open a Pull Request from your fork 42 | 4. Get feedback 43 | 5. Update code 44 | 6. Agree to the [contributors license agreement]({{ site.baseurl }}/cla/) 45 | 7. Get it merged back! 46 | -------------------------------------------------------------------------------- /www/docs/getting-started.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: doc 3 | title: Getting Started | Mobify.js Framework Documentation 4 | --- 5 | 6 | # Getting Started 7 | 8 | You've downloaded the Mobify Client, created a project scaffold *myproject*, 9 | and put the tag on the page you'd like to adapt. You've completed the "Quick 10 | Start" guide and now crave more. 11 | 12 | Open _myproject/src/mobify.konf_ in your text editor. The konf is a JavaScript 13 | file required by every Mobify.js project. It contains the DOM operations 14 | performed on the source DOM. The _mobify.konf_ generated by the scaffold selects 15 | the text content of the first `<p>` element and renders a template to 16 | display it. 17 | 18 | Let's change it to display to first `<a>` element on the page. Change the 19 | *content* key to the following: 20 | 21 | 'content': function(context) { 22 | return context.choose( 23 | { 24 | 'templateName': 'home' 25 | , '!link': function() { 26 | return $('a[href]').first(); 27 | } 28 | }) 29 | }, 30 | 31 | Now open _myproject/src/tmpl/home.tmpl_ and replace _content.firstp_ with 32 | _content.link_: 33 | 34 | <p class="extract"> 35 | {content.link} 36 | </p> 37 | 38 | Save your changes and refresh the page. You should see the first link from your 39 | adapted page: 40 | 41 | ![Yippy, we've got a link!](/mobifyjs/static/img/getting-started-link.png) 42 | 43 | Inside the konf, `$` is bound to [Zepto](http://zeptojs.com), which queries the 44 | source DOM. We've told the konf to select the first link and store it in the 45 | context under the key *content.link*. We then updated the varaible in the 46 | template to refer to this key in the konf. 47 | 48 | Now click on the link you just created. 49 | 50 | The same adaptation is being applied to this page! Let's change the konf to 51 | make different selections on this page and render a different template. 52 | 53 | The `context.choose` function can be used to make page specific selections. 54 | Here, we only render the _home_ template if the we're on the homepage: 55 | 56 | 'content': function(context) { 57 | return context.choose( 58 | { 59 | 'templateName': 'home' 60 | , '!link': function(context) { 61 | return $('a[href]').first(); 62 | } 63 | , '!routing': function() { 64 | return location.pathname == '/'; 65 | } 66 | }, { 67 | 'templateName': 'subpage' 68 | , '!headings': function() { 69 | return $('h1'); 70 | } 71 | }) 72 | }, 73 | 74 | Update your konf with the text above and refresh the page. 75 | 76 | Egads! It's a blank page. What's going on? Open the Webkit Inspector to see 77 | debugging information: 78 | 79 | ![Helpful debugging information is output to the console](/mobifyjs/static/img/getting-started-error.png) 80 | 81 | We told Mobify.js to use the *subpage* template for this page but didn't create 82 | a _src/tmpl/subpage.tmpl_. Let's make that now: 83 | 84 | {>base/} 85 | 86 | {<content} 87 | <h1>Template Name: {content.templateName}</h1> 88 | <ul> 89 | {#content.headings} 90 | <li>{.|innerHTML}</li> 91 | {/content.headings} 92 | </ul> 93 | {/content} 94 | 95 | The template we just created inherits for _base.tmpl_ and overrides the *body* 96 | block within it. If you open up the _base.tmpl_, you can see that you have full 97 | control over the HTML markup of the adapted page! 98 | 99 | ---- 100 | 101 | ## Where next? 102 | 103 | * [Understanding the Konf](../understanding-konf/) 104 | * [Understanding Templates](../understanding-templates/) 105 | -------------------------------------------------------------------------------- /www/docs/glossary.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: doc 3 | title: Glossary | Mobify.js Framework Documentation 4 | --- 5 | 6 | # Glossary 7 | 8 | Attribute 9 | 10 | : Additional data values which may be returned along with variables. 11 | Each attribute maps to a specific member key within the parent key 12 | in the konf. 13 | 14 | Context 15 | 16 | : A set of key-value pairs that is used to provide values for 17 | variables in templates. The Mobify.js konf produces a context, 18 | built from your selections, and renders a template with that 19 | context. 20 | [Learn more about context](../template-reference/#understanding-context). 21 | 22 | Keys 23 | 24 | : A name that uniquely references a selection you make within the konf 25 | file, also serves as a variable name within your templates. 26 | 27 | Konf 28 | 29 | : A JavaScript file that enables content selection and template 30 | rendering from a source DOM. 31 | 32 | [Jazzcat]({{ site.baseurl }}/docs/jazzcat/) 33 | 34 | : A Mobify Cloud feature that improves script loading performance. 35 | 36 | Rendered DOM 37 | 38 | : The mobile site's post-adaptation DOM, the output of Mobify.js. 39 | 40 | Selection 41 | 42 | : DOM elements or other data returned by functions defined in the konf 43 | file, provide the values of the variables in templates to produce 44 | the rendered DOM. 45 | 46 | Source DOM 47 | 48 | : The DOM built from your site's original HTML, without running 49 | JavaScript, ie. the DOM you'd see if you viewed source. 50 | 51 | Template 52 | 53 | : A text file that contains regular HTML markup and variables that are 54 | replaced when the template is rendered. 55 | 56 | Variable 57 | 58 | : Context mapped data provided to your template from the konf 59 | selections. Each variable maps to a key in the context. 60 | -------------------------------------------------------------------------------- /www/docs/image-resizing.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: doc 3 | title: Image Resizing | Mobify.js Framework Documentation 4 | --- 5 | 6 | The image resizing service is a [Mobify Cloud](https://cloud.mobify.com/) 7 | feature. You must be a Mobify Cloud user to use it with Mobify.js. 8 | 9 | <a href="//cloud.mobify.com/" class="btn btn-primary rounded">Try Mobify Cloud for Free</a> 10 | 11 | ---- 12 | 13 | # Image Resizing with Mobify.js 14 | 15 | Mobify provides an image resizing service to improve load and rendering 16 | time for image heavy pages. 17 | 18 | Imagine you are loading a page with a very large image on an iPhone: 19 | 20 | <img src="2000px_by_2000px.jpg" /> 21 | 22 | On most pages, there is no point in loading the image at such a high 23 | resolution as it will look similiar to a smaller image after it is 24 | scaled by the browser to fit its container. 25 | 26 | The resizing service can be used to scale images to an appropriate size 27 | for mobile devices, reducing their weight! 28 | 29 | <img src="//ir0.mobify.com/640/2000px_by_2000px.jpg" /> 30 | 31 | ---- 32 | 33 | ## Usage 34 | 35 | Mobify.js provides an API to format images for use with the image 36 | resizing service. Inside your konf, use `$` to select the images you 37 | would like to resize and then format them using `resizeImages`: 38 | 39 | 'img': function() { 40 | var $imgs = $('img').resizeImages(); 41 | return $imgs; 42 | } 43 | 44 | ---- 45 | 46 | ## Reference 47 | 48 | ### `$.fn.resizeImages` 49 | 50 | Searches the collection for image elements and modifies images to use 51 | the image resize service. 52 | 53 | Passing no arguments loads matched images through the Mobile Cloud: 54 | 55 | 'content': function() { 56 | var $content = $('content'); 57 | $content.resizeImages(); 58 | return $content; 59 | } 60 | 61 | Passing an integer as the first argument restricts the width of matched 62 | elements: 63 | 64 | 'thumbnails': function() { 65 | return $('img.preview_image').resizeImages(60); 66 | } 67 | 68 | Pass an object to further customize behaviour: 69 | 70 | 'profileImage': function() { 71 | var options = { 72 | maxWidth: 80 73 | , maxHeight: 80 74 | , format: 'jpg' 75 | , quality: 50 76 | }; 77 | return $('#profileImage').resizeImages(options); 78 | } 79 | 80 | Note that the quality parameter will only be honoured for JPEG images. 81 | 82 | ---- 83 | 84 | ## Styling 85 | 86 | Use CSS to style image elements by setting `max-width` to your desired 87 | width and `max-height` to auto. This way the image will be layed out 88 | correctly regardless of the pixel dimensions of the returned image. Be 89 | sure that your desired width is not greater than the original image 90 | dimensions. 91 | 92 | // Konf, desired image size is 200 CSS pixels wide. 93 | $('img').resizeImages(200) 94 | 95 | /* CSS */ 96 | img { 97 | max-width: 200px; 98 | height: auto; 99 | } 100 | 101 | <!-- Output --> 102 | <img src="http://ir0.mobify.com/200/http://www.mobify.com/wp-content/uploads/2011/12/home-mobile-transformation.png" /> 103 | 104 | ---- 105 | 106 | ## Notes 107 | 108 | - If the resized file is larger than than the original file, and no 109 | change format has been specified, the original image will be served. 110 | 111 | - All pixel sizing arguments should be given in CSS pixels. Scaling to 112 | device pixels is handled automatically. 113 | 114 | - Requests are automatically sharded across several domains to 115 | minimize blocking. 116 | 117 | - Resized GIFs will be output as 24-bit PNGs. 118 | 119 | - Images are cached indefinitely. -------------------------------------------------------------------------------- /www/docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: doc 3 | title: Mobify.js Framework Documentation 4 | description: 5 | Find all necessary documentation for Mobify.js, an open source web 6 | framework from Mobify that helps you adapt any website to support any device. 7 | --- 8 | 9 | # Quick Start 10 | 11 | Mobify.js is a JavaScript framework for adapting websites for tablet and mobile. 12 | 13 | 1. Install <a href="http://nodejs.org/">Node.js</a> if you don't have it already. 14 | 15 | 1. Download the [Mobify Client](https://github.com/mobify/mobify-client): 16 | 17 | sudo npm -g install mobify-client 18 | 19 | 1. Create a project scaffold and start the Mobify.js development server: 20 | 21 | mobify init myproject 22 | cd myproject 23 | mobify preview 24 | 25 | ## Install the Mobify.js Tag 26 | 27 | Insert the Mobify.js tag **immediately** after the opening _<head>_ tag on the 28 | website you want to adapt: 29 | 30 | {% include paid_warning.html %} 31 | 32 | <script> 33 | (function(window, document, mjs) { 34 | 35 | window.Mobify = {points: [+new Date], tagVersion: [1, 0]}; 36 | 37 | var isMobile = /ip(hone|od|ad)|android|blackberry.*applewebkit|bb1\d.*mobile/i.test(navigator.userAgent); 38 | var optedOut = /mobify-path=($|;)/.test(document.cookie); 39 | 40 | if (!isMobile || optedOut) { 41 | return; 42 | } 43 | 44 | document.write('<plaintext style="display:none">'); 45 | 46 | setTimeout(function() { 47 | var mobifyjs = document.createElement('script'); 48 | var script = document.getElementsByTagName('script')[0]; 49 | 50 | mobifyjs.src = mjs; 51 | script.parentNode.insertBefore(mobifyjs, script); 52 | }); 53 | 54 | })(this, document, 'http://127.0.0.1:8080/mobify.js'); 55 | </script> 56 | 57 | ## Preview your mobile site 58 | 59 | 1. Set your browser's User Agent to "iPhone": 60 | 61 | * In Chrome, open Webkit Inspector, click the gear in the bottom right, then 62 | the _"User agent"_ tab. Check _"Override User Agent"_ then select _"iPhone"_ 63 | from the dropdown. 64 | * In Safari click _"Develop"_ > _"User Agent"_ > _"iPhone"_ 65 | * In Firefox download the [User Agent Switcher](https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher/) extension. 66 | 67 | 1. Navigate to your page. If the demo gods are kind, you'll see this: 68 | 69 | <div class="illustration"> 70 | <img src="/mobifyjs/static/img/init.min.png"> 71 | </div> 72 | 73 | ## How it works: 74 | 75 | Mobify.js uses a technique called **client side adaptation** to remix HTML in 76 | the browser. The remixed content is interpreted by the browser as if the server 77 | had sent it in the first place! 78 | 79 | The **Mobify.js tag** bootstraps the adaptation and loads the **Mobify.js file**, 80 | which performs it. The tag activates in iOS, Android and BlackBerry browsers. 81 | By default, the Mobify.js file is loaded from the development server. 82 | 83 | The development server is part of the **Mobify Client**, a command line tool for 84 | building Mobify.js projects. It compiles the Mobify.js file dynamically per 85 | request. The file contains two parts, the **Mobify.js API** and site specific 86 | adaptations. 87 | 88 | Adaptations are expressed as a series of operations on the **source DOM**, the 89 | DOM constructed from the page's original HTML. HTML Elements can be selected, 90 | then rendered with a template. Finally, the rendered template is written to the 91 | browser. 92 | 93 | ## Where to next? 94 | 95 | * [See how to change the generated scaffold files in "Getting Started"](./getting-started/) 96 | * [Learn about how to adapt your site using DOM operations in "Understanding the Konf"](./understanding-konf/) 97 | * [See how templates can be used to control the adaptation in "Understanding Templates"](./understanding-templates/) 98 | * [Read tips for debugging Mobify.js in the Appendix](./appendix/) 99 | -------------------------------------------------------------------------------- /www/docs/jazzcat.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: doc 3 | title: Speedy Scripts with Jazzcat | Mobify.js Framework Documentation 4 | --- 5 | 6 | Jazzcat is a [Mobify Cloud](https://cloud.mobify.com/) feature. You 7 | must be a Mobify Cloud user to use it with Mobify.js. 8 | 9 | <a href="//cloud.mobify.com/" class="btn btn-primary rounded">Try Mobify Cloud for Free</a> 10 | 11 | ---- 12 | 13 | # Speedy Scripts with Jazzcat 14 | 15 | Jazzcat improves script loading performance by enabling single request 16 | loading of multiple JavaScript files. 17 | 18 | Imagine a page loads three JavaScript files, _a.js_, _b.js_ and _c.js_: 19 | 20 | <script src="a.js"></script> 21 | <script src="b.js"></script> 22 | <script src="c.js"></script> 23 | 24 | Jazzcat improves performance by loading all three files together in a 25 | single request: 26 | 27 | <script src="//jazzcat.mobify.com/a.js,b.js,c.js"></script> 28 | <script>Mobify.jazzcat.load("a.js");</script> 29 | <script>Mobify.jazzcat.load("b.js");</script> 30 | <script>Mobify.jazzcat.load("c.js");</script> 31 | 32 | ---- 33 | 34 | ## Usage 35 | 36 | Mobify.js provides an API to format scripts for use with Jazzcat. 37 | Inside your konf, use `$` to select the scripts that you would like to 38 | use with Jazzcat and then format them using `combineScripts`: 39 | 40 | 'scripts': function() { 41 | $scripts = $('script').combineScripts(); 42 | return $scripts; 43 | } 44 | 45 | Next write out the formatted scripts in a template. A good place is in 46 | your _base.tmpl_ just before the `</body>`: 47 | 48 | <html> 49 | <head>...</head> 50 | <body> 51 | ... 52 | {scripts} 53 | </body> 54 | </html> 55 | 56 | --- 57 | 58 | ## Reference 59 | 60 | ### `$.fn.combineScripts()` 61 | 62 | Searches the collection for script elements and and modifies the 63 | external scripts to use the Jazzcat service. Returns all found scripts 64 | in DOM order. -------------------------------------------------------------------------------- /www/docs/matching-to-urls.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: doc 3 | title: Matching Templates to URLs | Mobify.js Framework Documentation 4 | --- 5 | 6 | # Matching Templates to URLs 7 | 8 | Though you're encouraged to match templates in Mobify.js by locating unique DOM 9 | elements, you can also match templates against URLs. 10 | 11 | Mobify.js provides the `Mobify.urlmatch()` helper function to enable this. In 12 | your konf, you pass it a string containing a Mobify path matching pattern, or a 13 | regular expression, and it will return a function to be used to check whether 14 | the URL of the page matches that pattern or expression. 15 | 16 | For example, in your konf, in a call to the choose function, you could cause the 17 | about template to be selected like so: 18 | 19 | { 20 | 'templateName': 'about' 21 | , '!match': Mobify.urlmatch("/about/") 22 | , 'aboutus': function(context) { 23 | return $('#aboutus') 24 | } 25 | } 26 | 27 | <h2 id="path-expressions"> Mobify.urlmatch() Path Expressions </h2> 28 | 29 | Path expressions let you match templates to URL paths of pages on your site. 30 | 31 | ### Placeholder Matching 32 | 33 | For example, a blog article might have the path 34 | `/articles/2012/376562/15-ways-to-make-great-lists/`, but you could express the 35 | paths for all articles using the pattern `"/articles/*/*/*/"`, or only articles 36 | from 2012 with `"/articles/2012/*/*/"`. Here we see that `*` is used to mark a 37 | path component as a variable that is allowed to differ, but must be present. 38 | 39 | If our URL structure were different, and we used a category as the first 40 | component of the URL like `/science/articles/72633/` and 41 | `/politics/articles/95828`, but would like to match articles regardless of 42 | category, we could use the expression `"/*/articles/*/"` to match both of these. 43 | 44 | ### Wildcard Matching 45 | 46 | Other times, we would like to match all URLs prefixed with a common path, to do 47 | this we use wildcard matching. For example, in a blog, a post without titles 48 | would have a path such as `/post/29803152490` and a post with a title would have 49 | a path of `/post/29800908081/10-best-10-best-lists of all-time`. 50 | 51 | We can match both of these with the expression `"/post/*"`. Note the lack of a 52 | trailing slash in comparison to the placeholder match: ending the expression 53 | with `*` will cause any path components after the one specified to match. 54 | 55 | ### Examples 56 | 57 | 58 | | Path Expression | Matching Path Examples | 59 | |-----------------|------------------------| 60 | | `"/"` | `/` | 61 | | `"/*"` | Any path* | 62 | | `"/*/"` | `/foo`, `/bar/` | 63 | | `"/foo"` | `/foo`, `/foo/` | 64 | | `"/foo/*"` | `/foo/bar`, `/foo/baz/`, `/foo/bar/baz`| 65 | | `"/foo/bar"` | `/foo/bar`, `/foo/bar/`| 66 | | `"/*/bar"` | `/foo/bar/`, `/baz/bar` | 67 | | `"/foo/*/baz"` | `/foo/bar/baz`, `/foo/qux/baz` | 68 | | `"/foo/*/baz/*"`| `/foo/bar/baz/qux`, `/foo/qux/baz/quux/bar` | 69 | 70 | 71 | \* The expression `"/*"` is a special case of the wildcard expression, it will 72 | match any and every path, including `/`, other paths ending in the wildcard 73 | match require _at least_ one path component present in place of the `*`. 74 | 75 | ## Matching with Regular Expressions 76 | 77 | You can also pass in a JavaScript `RegExp` object, the returned function will 78 | call the `RegExp`'s `.test()` method against `window.location.pathname` and if 79 | it matches, return the expression, and otherwise return false. -------------------------------------------------------------------------------- /www/docs/mobifyjs-in-production.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: doc 3 | title: Mobify.js in Production | Mobify.js Framework Documentation 4 | --- 5 | 6 | # Mobify.js in Production 7 | 8 | You have created a mobile site using Mobify.js and you want to go live 9 | with it, or you want to run it on a testing/staging environment. 10 | Excellent! There are just a few steps to make that happen. 11 | 12 | 13 | ## Compiling Files 14 | 15 | In development, Mobify.js files are served dynamically by the 16 | Mobify Client development server. In production, we'd like to serve 17 | these files from a static webserver. 18 | 19 | Run the `mobify build` command from root project folder to compile the 20 | project for static serving: 21 | 22 | mobify build 23 | 24 | The compiled files are placed inside the _bld_ folder in the root 25 | of your project. Ensure that the build finishes correctly and that the 26 | mobify.js file and all other project assets are in the _bld_ folder then 27 | copy it to the appropriate location on your static webserver. 28 | 29 | 30 | ## Updating the Mobify.js tag 31 | 32 | By default, the Mobify.js tag is configured to load the mobify.js file from 33 | the development server at _http://127.0.0.1:8080/mobify.js_. Alter the path 34 | in the tag to point to the location of the mobify.js file on your static 35 | webserver: 36 | 37 | })(this, document, '/path/to/static/bld/mobify.js'); 38 | 39 | Typically you'll want to automate this process by including serverside 40 | logic to alter the location depending on your environment: 41 | 42 | MOBIFY_BUNDLE = '/path/to/static/bld/mobify.js' 43 | if ENVIRONMENT == 'dev': 44 | MOBIFY_BUNDLE = 'http://127.0.0.1:8080/mobify.js' 45 | 46 | And then use this variable in your templates: 47 | 48 | })(this, document, '<%= MOBIFY_BUNDLE %>'); 49 | 50 | ---- 51 | 52 | ## The Mobify Cloud 53 | 54 | Once you have a finely-tuned mobile site, let the experts behind Mobify.js help you take it further. 55 | 56 | The Mobify Cloud offers a distributed CDN, mobile workflow management, QA testing, automatic image resizing, and smart JavaScript optimization. 57 | 58 | <a href="//cloud.mobify.com/" class="btn btn-primary rounded">Try Mobify Cloud for Free</a> 59 | -------------------------------------------------------------------------------- /www/docs/responsive.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: doc 3 | title: Going Responsive | Mobify.js Framework Documentation 4 | --- 5 | 6 | # Going Responsive with Mobify.js 7 | 8 | Mobify.js allows you to adapt a page's markup for mobile devices. 9 | [Responsive Web Design](http://en.wikipedia.org/wiki/Responsive_Web_Design) 10 | is similarly powerful technique for adapting a page for mobile. 11 | 12 | We believe there's a time and a place for both. Responsive is great on 13 | content-forward websites where you have full control over the original 14 | markup. Mobify.js excels in situations where the original markup isn't 15 | well-suited for mobile or can't be modified. Mobify.js also offers more 16 | fine-grained control over UX and allows per-device performance 17 | optimization. 18 | 19 | But this doesn't need to be an either/or decision, you can use responsive 20 | + Mobify.js side by side and take advantage of the strengths of each. 21 | 22 | ## Combining Mobify.js with Responsive 23 | 24 | If you're Mobify.js, working with responsive is simple. In your mobile 25 | style sheet, add media queries as you normally would at your desired 26 | breakpoints: 27 | 28 | @media (max-width: 320px) { 29 | .selector { 30 | rule: value; 31 | } 32 | } 33 | @media (max-width: 480px) { 34 | .selector { 35 | rule: value; 36 | } 37 | } 38 | 39 | If you'd like to use Mobify.js to enhance an existing repsonsive site, 40 | you'll likely want to forego a full mobile site adaptation. Instead 41 | you can use the konf to cherry-pick more granular adaptations, and 42 | ignore Mobify.js templates completely. 43 | 44 | The first thing you'd do is configure your konf to pass through your 45 | site's original DOM instead of adapting it: 46 | 47 | 'OUTPUTHTML': function(context) { 48 | return context.data('$html').prop('outerHTML') 49 | } 50 | 51 | Then you would add single-element selectors on an as-needed basis: 52 | 53 | // remove an element on mobile devices 54 | $('.large-image').remove(); 55 | 56 | // add content to an element 57 | $('.sale-item').append("<b>on sale</b>"); 58 | 59 | // add a class for mobile 60 | $('.urgent').addClass("urgent-mobile"); 61 | 62 | // move an element to another place in the mobile DOM 63 | $("footer li a:nth-child(3)").insertAfter($("header nav a:nth-child(2)")); 64 | $("#poll").appendTo($(".sidebar")); 65 | 66 | 67 | So your final konf might look something like this: 68 | 69 | {>"/base/lib/base_konf.konf"/} 70 | {<data} { 71 | 72 | 'adaptation': function() { 73 | $('.large-image').remove(); 74 | $('.urgent').addClass("urgent-mobile"); 75 | } 76 | 77 | 'OUTPUTHTML': function(context) { 78 | return context.data('$html').prop('outerHTML') 79 | } 80 | 81 | } {/data} 82 | 83 | ## Cloud Enhancements 84 | 85 | The Mobify Cloud offers additional services that can enhance any 86 | responsive site: 87 | 88 | * **Image Resizing** -- Our image resizing service automatically 89 | scales and resizes images, then serves only the most appropriate 90 | one for a user's device. It also enables the use of high-density 91 | (Retina) inline `img` elements without the performance hit of 92 | double-loading. 93 | 94 | * **Combo** -- our JavaScript optimization service. Combo improves 95 | your site's JavaScript delivery for mobile and desktop alike. 96 | It combines HTTP requests for multiple scripts into a single request 97 | and caches the scripts client-side in HTML5 localStorage where 98 | available. 99 | 100 | The Mobify Cloud base plan is free, [give it a try it now](https://cloud.mobify.com/). 101 | -------------------------------------------------------------------------------- /www/examples/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: example 3 | title: Mobify.js Framework Examples 4 | description: 5 | Find examples of how Mobify.js can be used to adapt any website to support 6 | any device. 7 | 8 | --- 9 | 10 | # Examples 11 | 12 | We&#8217;re creating examples to help you get a feel for Mobify.js. Watch this space for more in the near future. 13 | 14 | All code is available on Github: [github.com/mobify/mobifyjs-demos](https://github.com/mobify/mobifyjs-demos) 15 | 16 | ---- 17 | 18 | ## Demo Site - [demostore.mobify.com](http://demostore.mobify.com) {#demostore} 19 | 20 | Uncle Merlin's Discount Potions is a Magento store that uses Mobify.js to 21 | provide an optimized view for mobile devices. 22 | 23 | ### Running the Code: 24 | 25 | * [Download the code from GitHub](https://github.com/mobify/mobifyjs-demos/zipball/master) 26 | 27 | * Unzip the code, navigate to the `demostore` directory and run development server: 28 | 29 | cd demostore 30 | mobify preview 31 | 32 | * Browse to [preview.mobify.com](https://preview.mobify.com/?url=http%3A%2F%2Fdemostore.mobify.com) 33 | to instruct the Mobify.js tag to load the Mobify.js 34 | file from your local computer. Click _"Authorize"_. 35 | 36 | * If the everything worked you should see the Demo Store mobile adaptation being 37 | served off your local computer! 38 | 39 | ### Changing the Code: 40 | 41 | With the development server running, you can make updates to the Demo Store 42 | project files with your text editor and then refresh the page to see your 43 | changes. Start with these files: 44 | 45 | * _src/mobify.konf_ contains the DOM operations to select and adapt the source 46 | DOM. It also contains logic for rendering the template to the browser. 47 | 48 | * _src/tmpl/home.tmpl_ is the template used to render the homepage. It inherits 49 | from _src/tmpl/base.tmpl_ which is the base template that provides the 50 | blocks for other templates to override. 51 | 52 | * _src/scss/pages/_home.scss_ contains the [SCSS](http://sass-lang.com/) used on the homepage. We used SCSS, but you are free to use LESS or regular CSS if you prefer. (You will need to [install Compass](http://compass-style.org/) to if you wish to recompile this stylesheet.) 53 | 54 | ---- 55 | 56 | ## Where to Next? 57 | 58 | If you want to understand more about how this stuff works, be sure to check out our 59 | [documentation](../docs/), and if you have any questions, head over 60 | to our [community](../community/) page. 61 | -------------------------------------------------------------------------------- /www/license.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page-license 3 | title: Mobify.js Open-Source Projects – License Agreement 4 | description: 5 | Learn the terms and conditions under which you use Mobify.js open source library 6 | --- 7 | 8 | # License 9 | 10 | The Mobify.js library is licensed under an [MIT license](https://github.com/mobify/mobifyjs/blob/v2.0/LICENSE). 11 | 12 | Some other dependencies, tools, and assets are used under their respective licenses. 13 | 14 | "Mobify" is a registered trademark of [Mobify R&D Inc](http://www.mobify.com/) (of Vancouver, BC, Canada) 15 | in the United States and in the European Union. It is used with permission for 16 | the official fork of Mobify.js. 17 | 18 | Other trademarks used are the property of their respective owners. 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /www/static/css/syntax.css: -------------------------------------------------------------------------------- 1 | .highlight .hll { background-color: #ffffcc } 2 | .highlight { background: #f0f0f0; } 3 | .highlight .c { color: #60a0b0; font-style: italic } /* Comment */ 4 | .highlight .k { color: #007020; font-weight: bold } /* Keyword */ 5 | .highlight .o { color: #666666 } /* Operator */ 6 | .highlight .cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */ 7 | .highlight .cp { color: #007020 } /* Comment.Preproc */ 8 | .highlight .c1 { color: #60a0b0; font-style: italic } /* Comment.Single */ 9 | .highlight .cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */ 10 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 11 | .highlight .ge { font-style: italic } /* Generic.Emph */ 12 | .highlight .gr { color: #FF0000 } /* Generic.Error */ 13 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 14 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 15 | .highlight .go { color: #808080 } /* Generic.Output */ 16 | .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ 17 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 18 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 19 | .highlight .gt { color: #0040D0 } /* Generic.Traceback */ 20 | .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ 21 | .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ 22 | .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ 23 | .highlight .kp { color: #007020 } /* Keyword.Pseudo */ 24 | .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ 25 | .highlight .kt { color: #902000 } /* Keyword.Type */ 26 | .highlight .m { color: #40a070 } /* Literal.Number */ 27 | .highlight .s { color: #4070a0 } /* Literal.String */ 28 | .highlight .na { color: #4070a0 } /* Name.Attribute */ 29 | .highlight .nb { color: #007020 } /* Name.Builtin */ 30 | .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ 31 | .highlight .no { color: #60add5 } /* Name.Constant */ 32 | .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ 33 | .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ 34 | .highlight .ne { color: #007020 } /* Name.Exception */ 35 | .highlight .nf { color: #06287e } /* Name.Function */ 36 | .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ 37 | .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ 38 | .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ 39 | .highlight .nv { color: #bb60d5 } /* Name.Variable */ 40 | .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ 41 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 42 | .highlight .mf { color: #40a070 } /* Literal.Number.Float */ 43 | .highlight .mh { color: #40a070 } /* Literal.Number.Hex */ 44 | .highlight .mi { color: #40a070 } /* Literal.Number.Integer */ 45 | .highlight .mo { color: #40a070 } /* Literal.Number.Oct */ 46 | .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ 47 | .highlight .sc { color: #4070a0 } /* Literal.String.Char */ 48 | .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ 49 | .highlight .s2 { color: #4070a0 } /* Literal.String.Double */ 50 | .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ 51 | .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ 52 | .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ 53 | .highlight .sx { color: #c65d09 } /* Literal.String.Other */ 54 | .highlight .sr { color: #235388 } /* Literal.String.Regex */ 55 | .highlight .s1 { color: #4070a0 } /* Literal.String.Single */ 56 | .highlight .ss { color: #517918 } /* Literal.String.Symbol */ 57 | .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ 58 | .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ 59 | .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ 60 | .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ 61 | .highlight .il { color: #40a070 } /* Literal.Number.Integer.Long */ 62 | -------------------------------------------------------------------------------- /www/static/font/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/font/fontawesome-webfont.eot -------------------------------------------------------------------------------- /www/static/font/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/font/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /www/static/font/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/font/fontawesome-webfont.woff -------------------------------------------------------------------------------- /www/static/img/body-bg.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/body-bg.min.png -------------------------------------------------------------------------------- /www/static/img/code-example.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/code-example.min.png -------------------------------------------------------------------------------- /www/static/img/code-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/code-example.png -------------------------------------------------------------------------------- /www/static/img/desktop.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/desktop.min.png -------------------------------------------------------------------------------- /www/static/img/desktop@2x.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/desktop@2x.min.png -------------------------------------------------------------------------------- /www/static/img/dom.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/dom.min.png -------------------------------------------------------------------------------- /www/static/img/dom@2x.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/dom@2x.min.png -------------------------------------------------------------------------------- /www/static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/favicon.ico -------------------------------------------------------------------------------- /www/static/img/getting-started-error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/getting-started-error.png -------------------------------------------------------------------------------- /www/static/img/getting-started-link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/getting-started-link.png -------------------------------------------------------------------------------- /www/static/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /www/static/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /www/static/img/illustration-content.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/illustration-content.min.png -------------------------------------------------------------------------------- /www/static/img/illustration-content.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/illustration-content.png -------------------------------------------------------------------------------- /www/static/img/illustration-content@2x.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/illustration-content@2x.min.png -------------------------------------------------------------------------------- /www/static/img/illustration-content@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/illustration-content@2x.png -------------------------------------------------------------------------------- /www/static/img/illustration-dom.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/illustration-dom.min.png -------------------------------------------------------------------------------- /www/static/img/illustration-dom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/illustration-dom.png -------------------------------------------------------------------------------- /www/static/img/illustration-dom@2x.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/illustration-dom@2x.min.png -------------------------------------------------------------------------------- /www/static/img/illustration-dom@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/illustration-dom@2x.png -------------------------------------------------------------------------------- /www/static/img/illustration-modules-accordion.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/illustration-modules-accordion.min.png -------------------------------------------------------------------------------- /www/static/img/illustration-modules-accordion@2x.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/illustration-modules-accordion@2x.min.png -------------------------------------------------------------------------------- /www/static/img/illustration-modules-carousel.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/illustration-modules-carousel.min.png -------------------------------------------------------------------------------- /www/static/img/illustration-modules-carousel@2x.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/illustration-modules-carousel@2x.min.png -------------------------------------------------------------------------------- /www/static/img/illustration-modules-comingsoon.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/illustration-modules-comingsoon.min.png -------------------------------------------------------------------------------- /www/static/img/illustration-modules-comingsoon@2x.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/illustration-modules-comingsoon@2x.min.png -------------------------------------------------------------------------------- /www/static/img/illustration-modules-zoomable.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/illustration-modules-zoomable.min.png -------------------------------------------------------------------------------- /www/static/img/illustration-modules-zoomable@2x.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/illustration-modules-zoomable@2x.min.png -------------------------------------------------------------------------------- /www/static/img/illustration-responsive.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/illustration-responsive.min.png -------------------------------------------------------------------------------- /www/static/img/illustration-responsive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/illustration-responsive.png -------------------------------------------------------------------------------- /www/static/img/illustration-responsive@2x.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/illustration-responsive@2x.min.png -------------------------------------------------------------------------------- /www/static/img/illustration-responsive@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/illustration-responsive@2x.png -------------------------------------------------------------------------------- /www/static/img/init.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/init.min.png -------------------------------------------------------------------------------- /www/static/img/init.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/init.png -------------------------------------------------------------------------------- /www/static/img/logos.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/logos.min.png -------------------------------------------------------------------------------- /www/static/img/logos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/logos.png -------------------------------------------------------------------------------- /www/static/img/logos@2x.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/logos@2x.min.png -------------------------------------------------------------------------------- /www/static/img/logos@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/logos@2x.png -------------------------------------------------------------------------------- /www/static/img/phone.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/phone.min.png -------------------------------------------------------------------------------- /www/static/img/phone@2x.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/phone@2x.min.png -------------------------------------------------------------------------------- /www/static/img/sprites.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/sprites.min.png -------------------------------------------------------------------------------- /www/static/img/sprites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/sprites.png -------------------------------------------------------------------------------- /www/static/img/sprites@2x.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/sprites@2x.min.png -------------------------------------------------------------------------------- /www/static/img/sprites@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/sprites@2x.png -------------------------------------------------------------------------------- /www/static/img/tablet.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/tablet.min.png -------------------------------------------------------------------------------- /www/static/img/tablet@2x.min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/img/tablet@2x.min.png -------------------------------------------------------------------------------- /www/static/js/highlight/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2006, Ivan Sagalaev 2 | All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of highlight.js nor the names of its contributors 12 | may be used to endorse or promote products derived from this software 13 | without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY 16 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /www/static/js/highlight/styles/arta.css: -------------------------------------------------------------------------------- 1 | /* 2 | Date: 17.V.2011 3 | Author: pumbur <pumbur@pumbur.net> 4 | */ 5 | 6 | pre code 7 | { 8 | display: block; padding: 0.5em; 9 | background: #222; 10 | } 11 | 12 | pre .profile .header *, 13 | pre .ini .title, 14 | pre .nginx .title 15 | { 16 | color: #fff; 17 | } 18 | 19 | pre .comment, 20 | pre .javadoc, 21 | pre .preprocessor, 22 | pre .preprocessor .title, 23 | pre .shebang, 24 | pre .profile .summary, 25 | pre .diff, 26 | pre .pi, 27 | pre .doctype, 28 | pre .tag, 29 | pre .template_comment, 30 | pre .css .rules, 31 | pre .tex .special 32 | { 33 | color: #444; 34 | } 35 | 36 | pre .string, 37 | pre .symbol, 38 | pre .diff .change, 39 | pre .regexp, 40 | pre .xml .attribute, 41 | pre .smalltalk .char, 42 | pre .xml .value, 43 | pre .ini .value 44 | { 45 | color: #ffcc33; 46 | } 47 | 48 | pre .number, 49 | pre .addition 50 | { 51 | color: #00cc66; 52 | } 53 | 54 | pre .built_in, 55 | pre .literal, 56 | pre .vhdl .typename, 57 | pre .go .constant, 58 | pre .go .typename, 59 | pre .ini .keyword, 60 | pre .lua .title, 61 | pre .perl .variable, 62 | pre .php .variable, 63 | pre .mel .variable, 64 | pre .django .variable, 65 | pre .css .funtion, 66 | pre .smalltalk .method, 67 | pre .hexcolor, 68 | pre .important, 69 | pre .flow, 70 | pre .inheritance, 71 | pre .parser3 .variable 72 | { 73 | color: #32AAEE; 74 | } 75 | 76 | pre .keyword, 77 | pre .tag .title, 78 | pre .css .tag, 79 | pre .css .class, 80 | pre .css .id, 81 | pre .css .pseudo, 82 | pre .css .attr_selector, 83 | pre .lisp .title, 84 | pre .winutils, 85 | pre .tex .command, 86 | pre .request, 87 | pre .status 88 | { 89 | color: #6644aa; 90 | } 91 | 92 | pre .title, 93 | pre .ruby .constant, 94 | pre .vala .constant, 95 | pre .parent, 96 | pre .deletion, 97 | pre .template_tag, 98 | pre .css .keyword, 99 | pre .objectivec .class .id, 100 | pre .smalltalk .class, 101 | pre .lisp .keyword, 102 | pre .apache .tag, 103 | pre .nginx .variable, 104 | pre .envvar, 105 | pre .bash .variable, 106 | pre .go .built_in, 107 | pre .vbscript .built_in, 108 | pre .lua .built_in, 109 | pre .rsl .built_in, 110 | pre .tail, 111 | pre .avrasm .label, 112 | pre .tex .formula, 113 | pre .tex .formula * 114 | { 115 | color: #bb1166; 116 | } 117 | 118 | pre .yardoctag, 119 | pre .phpdoc, 120 | pre .profile .header, 121 | pre .ini .title, 122 | pre .apache .tag, 123 | pre .parser3 .title 124 | { 125 | font-weight: bold; 126 | } 127 | 128 | pre .coffeescript .javascript, 129 | pre .xml .javascript, 130 | pre .xml .css, 131 | pre .xml .cdata 132 | { 133 | opacity: 0.6; 134 | } 135 | 136 | pre code, 137 | pre .javascript, 138 | pre .css, 139 | pre .xml, 140 | pre .subst, 141 | pre .diff .chunk, 142 | pre .css .value, 143 | pre .css .attribute, 144 | pre .lisp .string, 145 | pre .lisp .number, 146 | pre .tail .params, 147 | pre .container, 148 | pre .haskell *, 149 | pre .erlang *, 150 | pre .erlang_repl * 151 | { 152 | color: #aaa; 153 | } 154 | -------------------------------------------------------------------------------- /www/static/js/highlight/styles/ascetic.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org> 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: white; color: black; 10 | } 11 | 12 | pre .string, 13 | pre .tag .value, 14 | pre .filter .argument, 15 | pre .addition, 16 | pre .change, 17 | pre .apache .tag, 18 | pre .apache .cbracket, 19 | pre .nginx .built_in, 20 | pre .tex .formula { 21 | color: #888; 22 | } 23 | 24 | pre .comment, 25 | pre .template_comment, 26 | pre .shebang, 27 | pre .doctype, 28 | pre .pi, 29 | pre .javadoc, 30 | pre .deletion, 31 | pre .apache .sqbracket { 32 | color: #CCC; 33 | } 34 | 35 | pre .keyword, 36 | pre .tag .title, 37 | pre .ini .title, 38 | pre .lisp .title, 39 | pre .http .title, 40 | pre .nginx .title, 41 | pre .css .tag, 42 | pre .winutils, 43 | pre .flow, 44 | pre .apache .tag, 45 | pre .tex .command, 46 | pre .request, 47 | pre .status { 48 | font-weight: bold; 49 | } 50 | -------------------------------------------------------------------------------- /www/static/js/highlight/styles/brown_paper.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Brown Paper style from goldblog.com.ua (c) Zaripov Yura <yur4ik7@ukr.net> 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background:#b7a68e url(./brown_papersq.png); 10 | } 11 | 12 | pre .keyword, 13 | pre .literal, 14 | pre .change, 15 | pre .winutils, 16 | pre .flow, 17 | pre .lisp .title, 18 | pre .nginx .title, 19 | pre .tex .special, 20 | pre .request, 21 | pre .status { 22 | color:#005599; 23 | font-weight:bold; 24 | } 25 | 26 | pre code, 27 | pre .ruby .subst, 28 | pre .tag .keyword { 29 | color: #363C69; 30 | } 31 | 32 | pre .string, 33 | pre .title, 34 | pre .haskell .type, 35 | pre .tag .value, 36 | pre .css .rules .value, 37 | pre .preprocessor, 38 | pre .ruby .symbol, 39 | pre .ruby .symbol .string, 40 | pre .ruby .symbol .keyword, 41 | pre .ruby .symbol .keymethods, 42 | pre .ruby .instancevar, 43 | pre .ruby .class .parent, 44 | pre .built_in, 45 | pre .sql .aggregate, 46 | pre .django .template_tag, 47 | pre .django .variable, 48 | pre .smalltalk .class, 49 | pre .javadoc, 50 | pre .ruby .string, 51 | pre .django .filter .argument, 52 | pre .smalltalk .localvars, 53 | pre .smalltalk .array, 54 | pre .attr_selector, 55 | pre .pseudo, 56 | pre .addition, 57 | pre .stream, 58 | pre .envvar, 59 | pre .apache .tag, 60 | pre .apache .cbracket, 61 | pre .tex .number { 62 | color: #2C009F; 63 | } 64 | 65 | pre .comment, 66 | pre .java .annotation, 67 | pre .python .decorator, 68 | pre .template_comment, 69 | pre .pi, 70 | pre .doctype, 71 | pre .deletion, 72 | pre .shebang, 73 | pre .apache .sqbracket, 74 | pre .nginx .built_in, 75 | pre .tex .formula { 76 | color: #802022; 77 | } 78 | 79 | pre .keyword, 80 | pre .literal, 81 | pre .css .id, 82 | pre .phpdoc, 83 | pre .title, 84 | pre .haskell .type, 85 | pre .vbscript .built_in, 86 | pre .sql .aggregate, 87 | pre .rsl .built_in, 88 | pre .smalltalk .class, 89 | pre .diff .header, 90 | pre .chunk, 91 | pre .winutils, 92 | pre .bash .variable, 93 | pre .apache .tag, 94 | pre .tex .command { 95 | font-weight: bold; 96 | } 97 | 98 | pre .coffeescript .javascript, 99 | pre .xml .css, 100 | pre .xml .javascript, 101 | pre .xml .vbscript, 102 | pre .tex .formula { 103 | opacity: 0.8; 104 | } 105 | -------------------------------------------------------------------------------- /www/static/js/highlight/styles/brown_papersq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/js/highlight/styles/brown_papersq.png -------------------------------------------------------------------------------- /www/static/js/highlight/styles/dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Dark style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org> 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: #444; 10 | } 11 | 12 | pre .keyword, 13 | pre .literal, 14 | pre .change, 15 | pre .winutils, 16 | pre .flow, 17 | pre .lisp .title, 18 | pre .nginx .title, 19 | pre .tex .special { 20 | color: white; 21 | } 22 | 23 | pre code, 24 | pre .ruby .subst { 25 | color: #DDD; 26 | } 27 | 28 | pre .string, 29 | pre .title, 30 | pre .haskell .type, 31 | pre .ini .title, 32 | pre .tag .value, 33 | pre .css .rules .value, 34 | pre .preprocessor, 35 | pre .ruby .symbol, 36 | pre .ruby .symbol .string, 37 | pre .ruby .symbol .keyword, 38 | pre .ruby .symbol .keymethods, 39 | pre .ruby .instancevar, 40 | pre .ruby .class .parent, 41 | pre .built_in, 42 | pre .sql .aggregate, 43 | pre .django .template_tag, 44 | pre .django .variable, 45 | pre .smalltalk .class, 46 | pre .javadoc, 47 | pre .ruby .string, 48 | pre .django .filter .argument, 49 | pre .smalltalk .localvars, 50 | pre .smalltalk .array, 51 | pre .attr_selector, 52 | pre .pseudo, 53 | pre .addition, 54 | pre .stream, 55 | pre .envvar, 56 | pre .apache .tag, 57 | pre .apache .cbracket, 58 | pre .tex .command, 59 | pre .input_number { 60 | color: #D88; 61 | } 62 | 63 | pre .comment, 64 | pre .java .annotation, 65 | pre .python .decorator, 66 | pre .template_comment, 67 | pre .pi, 68 | pre .doctype, 69 | pre .deletion, 70 | pre .shebang, 71 | pre .apache .sqbracket, 72 | pre .tex .formula { 73 | color: #777; 74 | } 75 | 76 | pre .keyword, 77 | pre .literal, 78 | pre .title, 79 | pre .css .id, 80 | pre .phpdoc, 81 | pre .haskell .type, 82 | pre .vbscript .built_in, 83 | pre .sql .aggregate, 84 | pre .rsl .built_in, 85 | pre .smalltalk .class, 86 | pre .diff .header, 87 | pre .chunk, 88 | pre .winutils, 89 | pre .bash .variable, 90 | pre .apache .tag, 91 | pre .tex .special, 92 | pre .request, 93 | pre .status { 94 | font-weight: bold; 95 | } 96 | 97 | pre .coffeescript .javascript, 98 | pre .xml .css, 99 | pre .xml .javascript, 100 | pre .xml .vbscript, 101 | pre .tex .formula { 102 | opacity: 0.5; 103 | } 104 | -------------------------------------------------------------------------------- /www/static/js/highlight/styles/default.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org> 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: #F0F0F0; 10 | } 11 | 12 | pre code, 13 | pre .ruby .subst, 14 | pre .tag .title, 15 | pre .lisp .title, 16 | pre .nginx .title { 17 | color: black; 18 | } 19 | 20 | pre .string, 21 | pre .title, 22 | pre .constant, 23 | pre .parent, 24 | pre .tag .value, 25 | pre .rules .value, 26 | pre .rules .value .number, 27 | pre .preprocessor, 28 | pre .ruby .symbol, 29 | pre .ruby .symbol .string, 30 | pre .ruby .symbol .keyword, 31 | pre .ruby .symbol .keymethods, 32 | pre .instancevar, 33 | pre .aggregate, 34 | pre .template_tag, 35 | pre .django .variable, 36 | pre .smalltalk .class, 37 | pre .addition, 38 | pre .flow, 39 | pre .stream, 40 | pre .bash .variable, 41 | pre .apache .tag, 42 | pre .apache .cbracket, 43 | pre .tex .command, 44 | pre .tex .special, 45 | pre .erlang_repl .function_or_atom, 46 | pre .markdown .header { 47 | color: #800; 48 | } 49 | 50 | pre .comment, 51 | pre .annotation, 52 | pre .template_comment, 53 | pre .diff .header, 54 | pre .chunk, 55 | pre .markdown .blockquote { 56 | color: #888; 57 | } 58 | 59 | pre .number, 60 | pre .date, 61 | pre .regexp, 62 | pre .literal, 63 | pre .smalltalk .symbol, 64 | pre .smalltalk .char, 65 | pre .go .constant, 66 | pre .change, 67 | pre .markdown .bullet, 68 | pre .markdown .link_url { 69 | color: #080; 70 | } 71 | 72 | pre .label, 73 | pre .javadoc, 74 | pre .ruby .string, 75 | pre .decorator, 76 | pre .filter .argument, 77 | pre .localvars, 78 | pre .array, 79 | pre .attr_selector, 80 | pre .important, 81 | pre .pseudo, 82 | pre .pi, 83 | pre .doctype, 84 | pre .deletion, 85 | pre .envvar, 86 | pre .shebang, 87 | pre .apache .sqbracket, 88 | pre .nginx .built_in, 89 | pre .tex .formula, 90 | pre .erlang_repl .reserved, 91 | pre .input_number, 92 | pre .markdown .link_label, 93 | pre .vhdl .attribute { 94 | color: #88F 95 | } 96 | 97 | pre .keyword, 98 | pre .id, 99 | pre .phpdoc, 100 | pre .title, 101 | pre .built_in, 102 | pre .aggregate, 103 | pre .css .tag, 104 | pre .javadoctag, 105 | pre .phpdoc, 106 | pre .yardoctag, 107 | pre .smalltalk .class, 108 | pre .winutils, 109 | pre .bash .variable, 110 | pre .apache .tag, 111 | pre .go .typename, 112 | pre .tex .command, 113 | pre .markdown .strong, 114 | pre .request, 115 | pre .status { 116 | font-weight: bold; 117 | } 118 | 119 | pre .markdown .emphasis { 120 | font-style: italic; 121 | } 122 | 123 | pre .nginx .built_in { 124 | font-weight: normal; 125 | } 126 | 127 | pre .coffeescript .javascript, 128 | pre .xml .css, 129 | pre .xml .javascript, 130 | pre .xml .vbscript, 131 | pre .tex .formula { 132 | opacity: 0.5; 133 | } 134 | -------------------------------------------------------------------------------- /www/static/js/highlight/styles/far.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | FAR Style (c) MajestiC <majestic2k@gmail.com> 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: #000080; 10 | } 11 | 12 | pre code, 13 | .ruby .subst { 14 | color: #0FF; 15 | } 16 | 17 | pre .string, 18 | pre .ruby .string, 19 | pre .haskell .type, 20 | pre .tag .value, 21 | pre .css .rules .value, 22 | pre .css .rules .value .number, 23 | pre .preprocessor, 24 | pre .ruby .symbol, 25 | pre .ruby .symbol .string, 26 | pre .ruby .symbol .keyword, 27 | pre .ruby .symbol .keymethods, 28 | pre .built_in, 29 | pre .sql .aggregate, 30 | pre .django .template_tag, 31 | pre .django .variable, 32 | pre .smalltalk .class, 33 | pre .addition, 34 | pre .apache .tag, 35 | pre .apache .cbracket, 36 | pre .tex .command { 37 | color: #FF0; 38 | } 39 | 40 | pre .keyword, 41 | pre .css .id, 42 | pre .title, 43 | pre .haskell .type, 44 | pre .vbscript .built_in, 45 | pre .sql .aggregate, 46 | pre .rsl .built_in, 47 | pre .smalltalk .class, 48 | pre .xml .tag .title, 49 | pre .winutils, 50 | pre .flow, 51 | pre .change, 52 | pre .envvar, 53 | pre .bash .variable, 54 | pre .tex .special { 55 | color: #FFF; 56 | } 57 | 58 | pre .comment, 59 | pre .phpdoc, 60 | pre .javadoc, 61 | pre .java .annotation, 62 | pre .template_comment, 63 | pre .deletion, 64 | pre .apache .sqbracket, 65 | pre .tex .formula { 66 | color: #888; 67 | } 68 | 69 | pre .number, 70 | pre .date, 71 | pre .regexp, 72 | pre .literal, 73 | pre .smalltalk .symbol, 74 | pre .smalltalk .char { 75 | color: #0F0; 76 | } 77 | 78 | pre .python .decorator, 79 | pre .django .filter .argument, 80 | pre .smalltalk .localvars, 81 | pre .smalltalk .array, 82 | pre .attr_selector, 83 | pre .pseudo, 84 | pre .xml .pi, 85 | pre .diff .header, 86 | pre .chunk, 87 | pre .shebang, 88 | pre .nginx .built_in, 89 | pre .input_number { 90 | color: #008080; 91 | } 92 | 93 | pre .keyword, 94 | pre .css .id, 95 | pre .title, 96 | pre .haskell .type, 97 | pre .vbscript .built_in, 98 | pre .sql .aggregate, 99 | pre .rsl .built_in, 100 | pre .smalltalk .class, 101 | pre .winutils, 102 | pre .flow, 103 | pre .apache .tag, 104 | pre .nginx .built_in, 105 | pre .tex .command, 106 | pre .tex .special, 107 | pre .request, 108 | pre .status { 109 | font-weight: bold; 110 | } 111 | -------------------------------------------------------------------------------- /www/static/js/highlight/styles/github.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | github.com style (c) Vasily Polovnyov <vast@whiteants.net> 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | color: #000; 10 | background: #f8f8ff 11 | } 12 | 13 | pre .comment, 14 | pre .template_comment, 15 | pre .diff .header, 16 | pre .javadoc { 17 | color: #998; 18 | font-style: italic 19 | } 20 | 21 | pre .keyword, 22 | pre .css .rule .keyword, 23 | pre .winutils, 24 | pre .javascript .title, 25 | pre .lisp .title, 26 | pre .nginx .title, 27 | pre .subst, 28 | pre .request, 29 | pre .status { 30 | color: #000; 31 | font-weight: bold 32 | } 33 | 34 | pre .number, 35 | pre .hexcolor { 36 | color: #40a070 37 | } 38 | 39 | pre .string, 40 | pre .tag .value, 41 | pre .phpdoc, 42 | pre .tex .formula { 43 | color: #d14 44 | } 45 | 46 | pre .title, 47 | pre .id { 48 | color: #900; 49 | font-weight: bold 50 | } 51 | 52 | pre .javascript .title, 53 | pre .lisp .title, 54 | pre .subst { 55 | font-weight: normal 56 | } 57 | 58 | pre .class .title, 59 | pre .haskell .type, 60 | pre .vhdl .literal, 61 | pre .tex .command { 62 | color: #458; 63 | font-weight: bold 64 | } 65 | 66 | pre .tag, 67 | pre .tag .title, 68 | pre .rules .property, 69 | pre .django .tag .keyword { 70 | color: #000080; 71 | font-weight: normal 72 | } 73 | 74 | pre .attribute, 75 | pre .variable, 76 | pre .instancevar, 77 | pre .lisp .body { 78 | color: #008080 79 | } 80 | 81 | pre .regexp { 82 | color: #009926 83 | } 84 | 85 | pre .class { 86 | color: #458; 87 | font-weight: bold 88 | } 89 | 90 | pre .symbol, 91 | pre .ruby .symbol .string, 92 | pre .ruby .symbol .keyword, 93 | pre .ruby .symbol .keymethods, 94 | pre .lisp .keyword, 95 | pre .tex .special, 96 | pre .input_number { 97 | color: #990073 98 | } 99 | 100 | pre .builtin, 101 | pre .built_in, 102 | pre .lisp .title { 103 | color: #0086b3 104 | } 105 | 106 | pre .preprocessor, 107 | pre .pi, 108 | pre .doctype, 109 | pre .shebang, 110 | pre .cdata { 111 | color: #999; 112 | font-weight: bold 113 | } 114 | 115 | pre .deletion { 116 | background: #fdd 117 | } 118 | 119 | pre .addition { 120 | background: #dfd 121 | } 122 | 123 | pre .diff .change { 124 | background: #0086b3 125 | } 126 | 127 | pre .chunk { 128 | color: #aaa 129 | } 130 | 131 | pre .tex .formula { 132 | opacity: 0.5; 133 | } 134 | -------------------------------------------------------------------------------- /www/static/js/highlight/styles/googlecode.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Google Code style (c) Aahan Krish <geekpanth3r@gmail.com> 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: white; color: black; 10 | } 11 | 12 | pre .comment, 13 | pre .template_comment, 14 | pre .javadoc, 15 | pre .comment * { 16 | color: #800; 17 | } 18 | 19 | pre .keyword, 20 | pre .method, 21 | pre .list .title, 22 | pre .nginx .title, 23 | pre .tag .title, 24 | pre .setting .value, 25 | pre .winutils, 26 | pre .tex .command, 27 | pre .http .title, 28 | pre .request, 29 | pre .status { 30 | color: #008; 31 | } 32 | 33 | pre .envvar, 34 | pre .tex .special { 35 | color: #660; 36 | } 37 | 38 | pre .string, 39 | pre .tag .value, 40 | pre .cdata, 41 | pre .filter .argument, 42 | pre .attr_selector, 43 | pre .apache .cbracket, 44 | pre .date, 45 | pre .regexp { 46 | color: #080; 47 | } 48 | 49 | pre .sub .identifier, 50 | pre .pi, 51 | pre .tag, 52 | pre .tag .keyword, 53 | pre .decorator, 54 | pre .ini .title, 55 | pre .shebang, 56 | pre .input_number, 57 | pre .hexcolor, 58 | pre .rules .value, 59 | pre .css .value .number, 60 | pre .literal, 61 | pre .symbol, 62 | pre .ruby .symbol .string, 63 | pre .ruby .symbol .keyword, 64 | pre .ruby .symbol .keymethods, 65 | pre .number, 66 | pre .css .function { 67 | color: #066; 68 | } 69 | 70 | pre .class .title, 71 | pre .haskell .type, 72 | pre .smalltalk .class, 73 | pre .javadoctag, 74 | pre .yardoctag, 75 | pre .phpdoc, 76 | pre .typename, 77 | pre .tag .attribute, 78 | pre .doctype, 79 | pre .class .id, 80 | pre .built_in, 81 | pre .setting, 82 | pre .params, 83 | pre .variable { 84 | color: #606; 85 | } 86 | 87 | pre .css .tag, 88 | pre .rules .property, 89 | pre .pseudo, 90 | pre .subst { 91 | color: #000; 92 | } 93 | 94 | pre .css .class, pre .css .id { 95 | color: #9B703F; 96 | } 97 | 98 | pre .value .important { 99 | color: #ff7700; 100 | font-weight: bold; 101 | } 102 | 103 | pre .rules .keyword { 104 | color: #C5AF75; 105 | } 106 | 107 | pre .annotation, 108 | pre .apache .sqbracket, 109 | pre .nginx .built_in { 110 | color: #9B859D; 111 | } 112 | 113 | pre .preprocessor, 114 | pre .preprocessor * { 115 | color: #444; 116 | } 117 | 118 | pre .tex .formula { 119 | background-color: #EEE; 120 | font-style: italic; 121 | } 122 | 123 | pre .diff .header, 124 | pre .chunk { 125 | color: #808080; 126 | font-weight: bold; 127 | } 128 | 129 | pre .diff .change { 130 | background-color: #BCCFF9; 131 | } 132 | 133 | pre .addition { 134 | background-color: #BAEEBA; 135 | } 136 | 137 | pre .deletion { 138 | background-color: #FFC8BD; 139 | } 140 | 141 | pre .comment .yardoctag { 142 | font-weight: bold; 143 | } 144 | -------------------------------------------------------------------------------- /www/static/js/highlight/styles/idea.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Intellij Idea-like styling (c) Vasily Polovnyov <vast@whiteants.net> 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | color: #000; 10 | background: #fff; 11 | } 12 | 13 | pre .subst, 14 | pre .title { 15 | font-weight: normal; 16 | color: #000; 17 | } 18 | 19 | pre .comment, 20 | pre .template_comment, 21 | pre .javadoc, 22 | pre .diff .header { 23 | color: #808080; 24 | font-style: italic; 25 | } 26 | 27 | pre .annotation, 28 | pre .decorator, 29 | pre .preprocessor, 30 | pre .doctype, 31 | pre .pi, 32 | pre .chunk, 33 | pre .shebang, 34 | pre .apache .cbracket, 35 | pre .input_number, 36 | pre .http .title { 37 | color: #808000; 38 | } 39 | 40 | pre .tag, 41 | pre .pi { 42 | background: #efefef; 43 | } 44 | 45 | pre .tag .title, 46 | pre .id, 47 | pre .attr_selector, 48 | pre .pseudo, 49 | pre .literal, 50 | pre .keyword, 51 | pre .hexcolor, 52 | pre .css .function, 53 | pre .ini .title, 54 | pre .css .class, 55 | pre .list .title, 56 | pre .nginx .title, 57 | pre .tex .command, 58 | pre .request, 59 | pre .status { 60 | font-weight: bold; 61 | color: #000080; 62 | } 63 | 64 | pre .attribute, 65 | pre .rules .keyword, 66 | pre .number, 67 | pre .date, 68 | pre .regexp, 69 | pre .tex .special { 70 | font-weight: bold; 71 | color: #0000ff; 72 | } 73 | 74 | pre .number, 75 | pre .regexp { 76 | font-weight: normal; 77 | } 78 | 79 | pre .string, 80 | pre .value, 81 | pre .filter .argument, 82 | pre .css .function .params, 83 | pre .apache .tag { 84 | color: #008000; 85 | font-weight: bold; 86 | } 87 | 88 | pre .symbol, 89 | pre .ruby .symbol .string, 90 | pre .ruby .symbol .keyword, 91 | pre .ruby .symbol .keymethods, 92 | pre .char, 93 | pre .tex .formula { 94 | color: #000; 95 | background: #d0eded; 96 | font-style: italic; 97 | } 98 | 99 | pre .phpdoc, 100 | pre .yardoctag, 101 | pre .javadoctag { 102 | text-decoration: underline; 103 | } 104 | 105 | pre .variable, 106 | pre .envvar, 107 | pre .apache .sqbracket, 108 | pre .nginx .built_in { 109 | color: #660e7a; 110 | } 111 | 112 | pre .addition { 113 | background: #baeeba; 114 | } 115 | 116 | pre .deletion { 117 | background: #ffc8bd; 118 | } 119 | 120 | pre .diff .change { 121 | background: #bccff9; 122 | } 123 | -------------------------------------------------------------------------------- /www/static/js/highlight/styles/ir_black.css: -------------------------------------------------------------------------------- 1 | /* 2 | IR_Black style (c) Vasily Mikhailitchenko <vaskas@programica.ru> 3 | */ 4 | 5 | pre code { 6 | display: block; padding: 0.5em; 7 | background: #000; color: #f8f8f8; 8 | } 9 | 10 | pre .shebang, 11 | pre .comment, 12 | pre .template_comment, 13 | pre .javadoc { 14 | color: #7c7c7c; 15 | } 16 | 17 | pre .keyword, 18 | pre .tag, 19 | pre .tex .command, 20 | pre .request, 21 | pre .status { 22 | color: #96CBFE; 23 | } 24 | 25 | pre .sub .keyword, 26 | pre .method, 27 | pre .list .title, 28 | pre .nginx .title { 29 | color: #FFFFB6; 30 | } 31 | 32 | pre .string, 33 | pre .tag .value, 34 | pre .cdata, 35 | pre .filter .argument, 36 | pre .attr_selector, 37 | pre .apache .cbracket, 38 | pre .date { 39 | color: #A8FF60; 40 | } 41 | 42 | pre .subst { 43 | color: #DAEFA3; 44 | } 45 | 46 | pre .regexp { 47 | color: #E9C062; 48 | } 49 | 50 | pre .title, 51 | pre .sub .identifier, 52 | pre .pi, 53 | pre .decorator, 54 | pre .tex .special, 55 | pre .haskell .type, 56 | pre .constant, 57 | pre .smalltalk .class, 58 | pre .javadoctag, 59 | pre .yardoctag, 60 | pre .phpdoc, 61 | pre .nginx .built_in { 62 | color: #FFFFB6; 63 | } 64 | 65 | pre .symbol, 66 | pre .ruby .symbol .string, 67 | pre .ruby .symbol .keyword, 68 | pre .ruby .symbol .keymethods, 69 | pre .number, 70 | pre .variable, 71 | pre .vbscript, 72 | pre .literal { 73 | color: #C6C5FE; 74 | } 75 | 76 | pre .css .tag { 77 | color: #96CBFE; 78 | } 79 | 80 | pre .css .rules .property, 81 | pre .css .id { 82 | color: #FFFFB6; 83 | } 84 | 85 | pre .css .class { 86 | color: #FFF; 87 | } 88 | 89 | pre .hexcolor { 90 | color: #C6C5FE; 91 | } 92 | 93 | pre .number { 94 | color:#FF73FD; 95 | } 96 | 97 | pre .tex .formula { 98 | opacity: 0.7; 99 | } 100 | -------------------------------------------------------------------------------- /www/static/js/highlight/styles/magula.css: -------------------------------------------------------------------------------- 1 | /* 2 | Description: Magula style for highligh.js 3 | Author: Ruslan Keba <rukeba@gmail.com> 4 | Website: http://rukeba.com/ 5 | Version: 1.0 6 | Date: 2009-01-03 7 | Music: Aphex Twin / Xtal 8 | */ 9 | 10 | pre code { 11 | display: block; padding: 0.5em; 12 | background-color: #f4f4f4; 13 | } 14 | 15 | pre code, 16 | pre .ruby .subst, 17 | pre .lisp .title { 18 | color: black; 19 | } 20 | 21 | pre .string, 22 | pre .title, 23 | pre .parent, 24 | pre .tag .value, 25 | pre .rules .value, 26 | pre .rules .value .number, 27 | pre .preprocessor, 28 | pre .ruby .symbol, 29 | pre .ruby .symbol .string, 30 | pre .ruby .symbol .keyword, 31 | pre .ruby .symbol .keymethods, 32 | pre .instancevar, 33 | pre .aggregate, 34 | pre .template_tag, 35 | pre .django .variable, 36 | pre .smalltalk .class, 37 | pre .addition, 38 | pre .flow, 39 | pre .stream, 40 | pre .bash .variable, 41 | pre .apache .cbracket { 42 | color: #050; 43 | } 44 | 45 | pre .comment, 46 | pre .annotation, 47 | pre .template_comment, 48 | pre .diff .header, 49 | pre .chunk { 50 | color: #777; 51 | } 52 | 53 | pre .number, 54 | pre .date, 55 | pre .regexp, 56 | pre .literal, 57 | pre .smalltalk .symbol, 58 | pre .smalltalk .char, 59 | pre .change, 60 | pre .tex .special { 61 | color: #800; 62 | } 63 | 64 | pre .label, 65 | pre .javadoc, 66 | pre .ruby .string, 67 | pre .decorator, 68 | pre .filter .argument, 69 | pre .localvars, 70 | pre .array, 71 | pre .attr_selector, 72 | pre .pseudo, 73 | pre .pi, 74 | pre .doctype, 75 | pre .deletion, 76 | pre .envvar, 77 | pre .shebang, 78 | pre .apache .sqbracket, 79 | pre .nginx .built_in, 80 | pre .tex .formula, 81 | pre .input_number { 82 | color: #00e; 83 | } 84 | 85 | pre .keyword, 86 | pre .id, 87 | pre .phpdoc, 88 | pre .title, 89 | pre .built_in, 90 | pre .aggregate, 91 | pre .smalltalk .class, 92 | pre .winutils, 93 | pre .bash .variable, 94 | pre .apache .tag, 95 | pre .xml .tag, 96 | pre .tex .command, 97 | pre .request, 98 | pre .status { 99 | font-weight: bold; 100 | color: navy; 101 | } 102 | 103 | pre .nginx .built_in { 104 | font-weight: normal; 105 | } 106 | 107 | pre .coffeescript .javascript, 108 | pre .xml .css, 109 | pre .xml .javascript, 110 | pre .xml .vbscript, 111 | pre .tex .formula { 112 | opacity: 0.5; 113 | } 114 | 115 | /* --- */ 116 | pre .apache .tag { 117 | font-weight: bold; 118 | color: blue; 119 | } 120 | 121 | -------------------------------------------------------------------------------- /www/static/js/highlight/styles/monokai.css: -------------------------------------------------------------------------------- 1 | /* 2 | Monokai style - ported by Luigi Maselli - http://grigio.org 3 | */ 4 | 5 | pre code { 6 | display: block; padding: 0.5em; 7 | background: #272822; 8 | } 9 | 10 | pre .params .identifier .keymethods { 11 | color: #FD971F; 12 | } 13 | 14 | pre .tag, 15 | pre .tag .title, 16 | pre .keyword, 17 | pre .literal, 18 | pre .change, 19 | pre .winutils, 20 | pre .flow, 21 | pre .lisp .title, 22 | pre .nginx .title, 23 | pre .tex .special { 24 | color: #F92672; 25 | } 26 | 27 | pre code { 28 | color: #DDD; 29 | } 30 | 31 | pre code .constant { 32 | color: #66D9EF; 33 | } 34 | 35 | pre .class .title { 36 | color: white; 37 | } 38 | 39 | pre .attribute, 40 | pre .symbol, 41 | pre .value, 42 | pre .regexp { 43 | color: #BF79DB; 44 | } 45 | 46 | pre .tag .value, 47 | pre .string, 48 | pre .ruby .subst, 49 | pre .title, 50 | pre .haskell .type, 51 | pre .preprocessor, 52 | pre .ruby .instancevar, 53 | pre .ruby .class .parent, 54 | pre .built_in, 55 | pre .sql .aggregate, 56 | pre .django .template_tag, 57 | pre .django .variable, 58 | pre .smalltalk .class, 59 | pre .javadoc, 60 | pre .ruby .string, 61 | pre .django .filter .argument, 62 | pre .smalltalk .localvars, 63 | pre .smalltalk .array, 64 | pre .attr_selector, 65 | pre .pseudo, 66 | pre .addition, 67 | pre .stream, 68 | pre .envvar, 69 | pre .apache .tag, 70 | pre .apache .cbracket, 71 | pre .tex .command, 72 | pre .input_number { 73 | color: #A6E22E; 74 | } 75 | 76 | pre .comment, 77 | pre .java .annotation, 78 | pre .python .decorator, 79 | pre .template_comment, 80 | pre .pi, 81 | pre .doctype, 82 | pre .deletion, 83 | pre .shebang, 84 | pre .apache .sqbracket, 85 | pre .tex .formula { 86 | color: #75715E; 87 | } 88 | 89 | pre .keyword, 90 | pre .literal, 91 | pre .css .id, 92 | pre .phpdoc, 93 | pre .title, 94 | pre .haskell .type, 95 | pre .vbscript .built_in, 96 | pre .sql .aggregate, 97 | pre .rsl .built_in, 98 | pre .smalltalk .class, 99 | pre .diff .header, 100 | pre .chunk, 101 | pre .winutils, 102 | pre .bash .variable, 103 | pre .apache .tag, 104 | pre .tex .special, 105 | pre .request, 106 | pre .status { 107 | font-weight: bold; 108 | } 109 | 110 | pre .coffeescript .javascript, 111 | pre .xml .css, 112 | pre .xml .javascript, 113 | pre .xml .vbscript, 114 | pre .tex .formula { 115 | opacity: 0.5; 116 | } 117 | -------------------------------------------------------------------------------- /www/static/js/highlight/styles/pojoaque.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Pojoaque Style by Jason Tate 4 | http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html 5 | Based on Solarized Style from http://ethanschoonover.com/solarized 6 | 7 | */ 8 | 9 | pre code { 10 | display: block; padding: 0.5em; 11 | color: #DCCF8F; 12 | background: url(./pojoaque.jpg) repeat scroll left top #181914; 13 | } 14 | 15 | pre .comment, 16 | pre .template_comment, 17 | pre .diff .header, 18 | pre .doctype, 19 | pre .lisp .string, 20 | pre .javadoc { 21 | color: #586e75; 22 | font-style: italic; 23 | } 24 | 25 | pre .keyword, 26 | pre .css .rule .keyword, 27 | pre .winutils, 28 | pre .javascript .title, 29 | pre .method, 30 | pre .addition, 31 | pre .css .tag, 32 | pre .lisp .title, 33 | pre .nginx .title { 34 | color: #B64926; 35 | } 36 | 37 | pre .number, 38 | pre .command, 39 | pre .string, 40 | pre .tag .value, 41 | pre .phpdoc, 42 | pre .tex .formula, 43 | pre .regexp, 44 | pre .hexcolor { 45 | color: #468966; 46 | } 47 | 48 | pre .title, 49 | pre .localvars, 50 | pre .function .title, 51 | pre .chunk, 52 | pre .decorator, 53 | pre .builtin, 54 | pre .built_in, 55 | pre .lisp .title, 56 | pre .identifier, 57 | pre .title .keymethods, 58 | pre .id { 59 | color: #FFB03B; 60 | } 61 | 62 | pre .attribute, 63 | pre .variable, 64 | pre .instancevar, 65 | pre .lisp .body, 66 | pre .smalltalk .number, 67 | pre .constant, 68 | pre .class .title, 69 | pre .parent, 70 | pre .haskell .type { 71 | color: #b58900; 72 | } 73 | 74 | pre .css .attribute { 75 | color: #b89859; 76 | } 77 | 78 | pre .css .number,pre .css .hexcolor{ 79 | color: #DCCF8F; 80 | } 81 | 82 | pre .css .class { 83 | color: #d3a60c; 84 | } 85 | 86 | pre .preprocessor, 87 | pre .pi, 88 | pre .shebang, 89 | pre .symbol, 90 | pre .diff .change, 91 | pre .special, 92 | pre .keymethods, 93 | pre .attr_selector, 94 | pre .important, 95 | pre .subst, 96 | pre .cdata { 97 | color: #cb4b16; 98 | } 99 | 100 | pre .deletion { 101 | color: #dc322f; 102 | } 103 | 104 | pre .tex .formula { 105 | background: #073642; 106 | } 107 | -------------------------------------------------------------------------------- /www/static/js/highlight/styles/pojoaque.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/js/highlight/styles/pojoaque.jpg -------------------------------------------------------------------------------- /www/static/js/highlight/styles/school_book.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | School Book style from goldblog.com.ua (c) Zaripov Yura <yur4ik7@ukr.net> 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 15px 0.5em 0.5em 30px; 9 | font-size: 11px !important; 10 | line-height:16px !important; 11 | } 12 | 13 | pre{ 14 | background:#f6f6ae url(./school_book.png); 15 | border-top: solid 2px #d2e8b9; 16 | border-bottom: solid 1px #d2e8b9; 17 | } 18 | 19 | pre .keyword, 20 | pre .literal, 21 | pre .change, 22 | pre .winutils, 23 | pre .flow, 24 | pre .lisp .title, 25 | pre .nginx .title, 26 | pre .tex .special { 27 | color:#005599; 28 | font-weight:bold; 29 | } 30 | 31 | pre code, 32 | pre .ruby .subst, 33 | pre .tag .keyword { 34 | color: #3E5915; 35 | } 36 | 37 | pre .string, 38 | pre .title, 39 | pre .haskell .type, 40 | pre .tag .value, 41 | pre .css .rules .value, 42 | pre .preprocessor, 43 | pre .ruby .symbol, 44 | pre .ruby .symbol .string, 45 | pre .ruby .symbol .keyword, 46 | pre .ruby .symbol .keymethods, 47 | pre .ruby .instancevar, 48 | pre .ruby .class .parent, 49 | pre .built_in, 50 | pre .sql .aggregate, 51 | pre .django .template_tag, 52 | pre .django .variable, 53 | pre .smalltalk .class, 54 | pre .javadoc, 55 | pre .ruby .string, 56 | pre .django .filter .argument, 57 | pre .smalltalk .localvars, 58 | pre .smalltalk .array, 59 | pre .attr_selector, 60 | pre .pseudo, 61 | pre .addition, 62 | pre .stream, 63 | pre .envvar, 64 | pre .apache .tag, 65 | pre .apache .cbracket, 66 | pre .nginx .built_in, 67 | pre .tex .command { 68 | color: #2C009F; 69 | } 70 | 71 | pre .comment, 72 | pre .java .annotation, 73 | pre .python .decorator, 74 | pre .template_comment, 75 | pre .pi, 76 | pre .doctype, 77 | pre .deletion, 78 | pre .shebang, 79 | pre .apache .sqbracket { 80 | color: #E60415; 81 | } 82 | 83 | pre .keyword, 84 | pre .literal, 85 | pre .css .id, 86 | pre .phpdoc, 87 | pre .title, 88 | pre .haskell .type, 89 | pre .vbscript .built_in, 90 | pre .sql .aggregate, 91 | pre .rsl .built_in, 92 | pre .smalltalk .class, 93 | pre .xml .tag .title, 94 | pre .diff .header, 95 | pre .chunk, 96 | pre .winutils, 97 | pre .bash .variable, 98 | pre .apache .tag, 99 | pre .tex .command, 100 | pre .request, 101 | pre .status { 102 | font-weight: bold; 103 | } 104 | 105 | pre .coffeescript .javascript, 106 | pre .xml .css, 107 | pre .xml .javascript, 108 | pre .xml .vbscript, 109 | pre .tex .formula { 110 | opacity: 0.5; 111 | } 112 | -------------------------------------------------------------------------------- /www/static/js/highlight/styles/school_book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobify/mobifyjs/4a4ff8a37ea69491fc2345b3c465e01257ae0612/www/static/js/highlight/styles/school_book.png -------------------------------------------------------------------------------- /www/static/js/highlight/styles/solarized_dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com> 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: #002b36; color: #839496; 10 | } 11 | 12 | pre .comment, 13 | pre .template_comment, 14 | pre .diff .header, 15 | pre .doctype, 16 | pre .pi, 17 | pre .lisp .string, 18 | pre .javadoc { 19 | color: #586e75; 20 | font-style: italic; 21 | } 22 | 23 | pre .keyword, 24 | pre .winutils, 25 | pre .method, 26 | pre .addition, 27 | pre .css .tag, 28 | pre .request, 29 | pre .status, 30 | pre .nginx .title { 31 | color: #859900; 32 | } 33 | 34 | pre .number, 35 | pre .command, 36 | pre .string, 37 | pre .tag .value, 38 | pre .phpdoc, 39 | pre .tex .formula, 40 | pre .regexp, 41 | pre .hexcolor { 42 | color: #2aa198; 43 | } 44 | 45 | pre .title, 46 | pre .localvars, 47 | pre .chunk, 48 | pre .decorator, 49 | pre .builtin, 50 | pre .built_in, 51 | pre .identifier, 52 | pre .title .keymethods, 53 | pre .vhdl .literal, 54 | pre .id { 55 | color: #268bd2; 56 | } 57 | 58 | pre .attribute, 59 | pre .variable, 60 | pre .instancevar, 61 | pre .lisp .body, 62 | pre .smalltalk .number, 63 | pre .constant, 64 | pre .class .title, 65 | pre .parent, 66 | pre .haskell .type { 67 | color: #b58900; 68 | } 69 | 70 | pre .preprocessor, 71 | pre .preprocessor .keyword, 72 | pre .shebang, 73 | pre .symbol, 74 | pre .diff .change, 75 | pre .special, 76 | pre .keymethods, 77 | pre .attr_selector, 78 | pre .important, 79 | pre .subst, 80 | pre .cdata { 81 | color: #cb4b16; 82 | } 83 | 84 | pre .deletion { 85 | color: #dc322f; 86 | } 87 | 88 | pre .tex .formula { 89 | background: #073642; 90 | } 91 | -------------------------------------------------------------------------------- /www/static/js/highlight/styles/solarized_light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com> 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: #fdf6e3; color: #657b83; 10 | } 11 | 12 | pre .comment, 13 | pre .template_comment, 14 | pre .diff .header, 15 | pre .doctype, 16 | pre .pi, 17 | pre .lisp .string, 18 | pre .javadoc { 19 | color: #93a1a1; 20 | font-style: italic; 21 | } 22 | 23 | pre .keyword, 24 | pre .winutils, 25 | pre .method, 26 | pre .addition, 27 | pre .css .tag, 28 | pre .request, 29 | pre .status, 30 | pre .nginx .title { 31 | color: #859900; 32 | } 33 | 34 | pre .number, 35 | pre .command, 36 | pre .string, 37 | pre .tag .value, 38 | pre .phpdoc, 39 | pre .tex .formula, 40 | pre .regexp, 41 | pre .hexcolor { 42 | color: #2aa198; 43 | } 44 | 45 | pre .title, 46 | pre .localvars, 47 | pre .chunk, 48 | pre .decorator, 49 | pre .builtin, 50 | pre .built_in, 51 | pre .identifier, 52 | pre .title .keymethods, 53 | pre .vhdl .literal, 54 | pre .id { 55 | color: #268bd2; 56 | } 57 | 58 | pre .attribute, 59 | pre .variable, 60 | pre .instancevar, 61 | pre .lisp .body, 62 | pre .smalltalk .number, 63 | pre .constant, 64 | pre .class .title, 65 | pre .parent, 66 | pre .haskell .type { 67 | color: #b58900; 68 | } 69 | 70 | pre .preprocessor, 71 | pre .preprocessor .keyword, 72 | pre .shebang, 73 | pre .symbol, 74 | pre .diff .change, 75 | pre .special, 76 | pre .keymethods, 77 | pre .attr_selector, 78 | pre .important, 79 | pre .subst, 80 | pre .cdata { 81 | color: #cb4b16; 82 | } 83 | 84 | pre .deletion { 85 | color: #dc322f; 86 | } 87 | 88 | pre .tex .formula { 89 | background: #eee8d5; 90 | } 91 | -------------------------------------------------------------------------------- /www/static/js/highlight/styles/sunburst.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Sunburst-like style (c) Vasily Polovnyov <vast@whiteants.net> 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: #000; color: #f8f8f8; 10 | } 11 | 12 | pre .comment, 13 | pre .template_comment, 14 | pre .javadoc { 15 | color: #aeaeae; 16 | font-style: italic; 17 | } 18 | 19 | pre .keyword, 20 | pre .ruby .function .keyword, 21 | pre .request, 22 | pre .status, 23 | pre .nginx .title { 24 | color: #E28964; 25 | } 26 | 27 | pre .function .keyword, 28 | pre .sub .keyword, 29 | pre .method, 30 | pre .list .title { 31 | color: #99CF50; 32 | } 33 | 34 | pre .string, 35 | pre .tag .value, 36 | pre .cdata, 37 | pre .filter .argument, 38 | pre .attr_selector, 39 | pre .apache .cbracket, 40 | pre .date, 41 | pre .tex .command { 42 | color: #65B042; 43 | } 44 | 45 | pre .subst { 46 | color: #DAEFA3; 47 | } 48 | 49 | pre .regexp { 50 | color: #E9C062; 51 | } 52 | 53 | pre .title, 54 | pre .sub .identifier, 55 | pre .pi, 56 | pre .tag, 57 | pre .tag .keyword, 58 | pre .decorator, 59 | pre .shebang, 60 | pre .input_number { 61 | color: #89BDFF; 62 | } 63 | 64 | pre .class .title, 65 | pre .haskell .type, 66 | pre .smalltalk .class, 67 | pre .javadoctag, 68 | pre .yardoctag, 69 | pre .phpdoc { 70 | text-decoration: underline; 71 | } 72 | 73 | pre .symbol, 74 | pre .ruby .symbol .string, 75 | pre .ruby .symbol .keyword, 76 | pre .ruby .symbol .keymethods, 77 | pre .number { 78 | color: #3387CC; 79 | } 80 | 81 | pre .params, 82 | pre .variable { 83 | color: #3E87E3; 84 | } 85 | 86 | pre .css .tag, 87 | pre .rules .property, 88 | pre .pseudo, 89 | pre .tex .special { 90 | color: #CDA869; 91 | } 92 | 93 | pre .css .class { 94 | color: #9B703F; 95 | } 96 | 97 | pre .rules .keyword { 98 | color: #C5AF75; 99 | } 100 | 101 | pre .rules .value { 102 | color: #CF6A4C; 103 | } 104 | 105 | pre .css .id { 106 | color: #8B98AB; 107 | } 108 | 109 | pre .annotation, 110 | pre .apache .sqbracket, 111 | pre .nginx .built_in { 112 | color: #9B859D; 113 | } 114 | 115 | pre .preprocessor { 116 | color: #8996A8; 117 | } 118 | 119 | pre .hexcolor, 120 | pre .css .value .number { 121 | color: #DD7B3B; 122 | } 123 | 124 | pre .css .function { 125 | color: #DAD085; 126 | } 127 | 128 | pre .diff .header, 129 | pre .chunk, 130 | pre .tex .formula { 131 | background-color: #0E2231; 132 | color: #F8F8F8; 133 | font-style: italic; 134 | } 135 | 136 | pre .diff .change { 137 | background-color: #4A410D; 138 | color: #F8F8F8; 139 | } 140 | 141 | pre .addition { 142 | background-color: #253B22; 143 | color: #F8F8F8; 144 | } 145 | 146 | pre .deletion { 147 | background-color: #420E09; 148 | color: #F8F8F8; 149 | } 150 | -------------------------------------------------------------------------------- /www/static/js/highlight/styles/vs.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Visual Studio-like style based on original C# coloring by Jason Diamond <jason@diamond.name> 4 | 5 | */ 6 | pre code { 7 | display: block; padding: 0.5em; 8 | } 9 | 10 | pre .comment, 11 | pre .annotation, 12 | pre .template_comment, 13 | pre .diff .header, 14 | pre .chunk, 15 | pre .apache .cbracket { 16 | color: rgb(0, 128, 0); 17 | } 18 | 19 | pre .keyword, 20 | pre .id, 21 | pre .built_in, 22 | pre .smalltalk .class, 23 | pre .winutils, 24 | pre .bash .variable, 25 | pre .tex .command, 26 | pre .request, 27 | pre .status, 28 | pre .nginx .title { 29 | color: rgb(0, 0, 255); 30 | } 31 | 32 | pre .string, 33 | pre .title, 34 | pre .parent, 35 | pre .tag .value, 36 | pre .rules .value, 37 | pre .rules .value .number, 38 | pre .ruby .symbol, 39 | pre .ruby .symbol .string, 40 | pre .ruby .symbol .keyword, 41 | pre .ruby .symbol .keymethods, 42 | pre .instancevar, 43 | pre .aggregate, 44 | pre .template_tag, 45 | pre .django .variable, 46 | pre .addition, 47 | pre .flow, 48 | pre .stream, 49 | pre .apache .tag, 50 | pre .date, 51 | pre .tex .formula { 52 | color: rgb(163, 21, 21); 53 | } 54 | 55 | pre .ruby .string, 56 | pre .decorator, 57 | pre .filter .argument, 58 | pre .localvars, 59 | pre .array, 60 | pre .attr_selector, 61 | pre .pseudo, 62 | pre .pi, 63 | pre .doctype, 64 | pre .deletion, 65 | pre .envvar, 66 | pre .shebang, 67 | pre .preprocessor, 68 | pre .userType, 69 | pre .apache .sqbracket, 70 | pre .nginx .built_in, 71 | pre .tex .special, 72 | pre .input_number { 73 | color: rgb(43, 145, 175); 74 | } 75 | 76 | pre .phpdoc, 77 | pre .javadoc, 78 | pre .xmlDocTag { 79 | color: rgb(128, 128, 128); 80 | } 81 | 82 | pre .vhdl .typename { font-weight: bold; } 83 | pre .vhdl .string { color: #666666; } 84 | pre .vhdl .literal { color: rgb(163, 21, 21); } 85 | pre .vhdl .attribute { color: #00B0E8; } 86 | -------------------------------------------------------------------------------- /www/static/js/highlight/styles/xcode.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | XCode style (c) Angel Garcia <angelgarcia.mail@gmail.com> 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: #fff; color: black; 10 | } 11 | 12 | pre .comment, 13 | pre .template_comment, 14 | pre .javadoc, 15 | pre .comment * { 16 | color: rgb(0,106,0); 17 | } 18 | 19 | pre .keyword, 20 | pre .literal, 21 | pre .nginx .title { 22 | color: rgb(170,13,145); 23 | } 24 | pre .method, 25 | pre .list .title, 26 | pre .tag .title, 27 | pre .setting .value, 28 | pre .winutils, 29 | pre .tex .command, 30 | pre .http .title, 31 | pre .request, 32 | pre .status { 33 | color: #008; 34 | } 35 | 36 | pre .envvar, 37 | pre .tex .special { 38 | color: #660; 39 | } 40 | 41 | pre .string { 42 | color: rgb(196,26,22); 43 | } 44 | pre .tag .value, 45 | pre .cdata, 46 | pre .filter .argument, 47 | pre .attr_selector, 48 | pre .apache .cbracket, 49 | pre .date, 50 | pre .regexp { 51 | color: #080; 52 | } 53 | 54 | pre .sub .identifier, 55 | pre .pi, 56 | pre .tag, 57 | pre .tag .keyword, 58 | pre .decorator, 59 | pre .ini .title, 60 | pre .shebang, 61 | pre .input_number, 62 | pre .hexcolor, 63 | pre .rules .value, 64 | pre .css .value .number, 65 | pre .symbol, 66 | pre .ruby .symbol .string, 67 | pre .ruby .symbol .keyword, 68 | pre .ruby .symbol .keymethods, 69 | pre .number, 70 | pre .css .function { 71 | color: rgb(28,0,207); 72 | } 73 | 74 | pre .class .title, 75 | pre .haskell .type, 76 | pre .smalltalk .class, 77 | pre .javadoctag, 78 | pre .yardoctag, 79 | pre .phpdoc, 80 | pre .typename, 81 | pre .tag .attribute, 82 | pre .doctype, 83 | pre .class .id, 84 | pre .built_in, 85 | pre .setting, 86 | pre .params { 87 | color: rgb(92,38,153); 88 | } 89 | 90 | pre .variable { 91 | color: rgb(63,110,116); 92 | } 93 | pre .css .tag, 94 | pre .rules .property, 95 | pre .pseudo, 96 | pre .subst { 97 | color: #000; 98 | } 99 | 100 | pre .css .class, pre .css .id { 101 | color: #9B703F; 102 | } 103 | 104 | pre .value .important { 105 | color: #ff7700; 106 | font-weight: bold; 107 | } 108 | 109 | pre .rules .keyword { 110 | color: #C5AF75; 111 | } 112 | 113 | pre .annotation, 114 | pre .apache .sqbracket, 115 | pre .nginx .built_in { 116 | color: #9B859D; 117 | } 118 | 119 | pre .preprocessor, 120 | pre .preprocessor * { 121 | color: rgb(100,56,32); 122 | } 123 | 124 | pre .tex .formula { 125 | background-color: #EEE; 126 | font-style: italic; 127 | } 128 | 129 | pre .diff .header, 130 | pre .chunk { 131 | color: #808080; 132 | font-weight: bold; 133 | } 134 | 135 | pre .diff .change { 136 | background-color: #BCCFF9; 137 | } 138 | 139 | pre .addition { 140 | background-color: #BAEEBA; 141 | } 142 | 143 | pre .deletion { 144 | background-color: #FFC8BD; 145 | } 146 | 147 | pre .comment .yardoctag { 148 | font-weight: bold; 149 | } 150 | 151 | pre .method .id { 152 | color: #000; 153 | } 154 | -------------------------------------------------------------------------------- /www/static/js/highlight/styles/zenburn.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Zenburn style from voldmar.ru (c) Vladimir Epifanov <voldmar@voldmar.ru> 4 | based on dark.css by Ivan Sagalaev 5 | 6 | */ 7 | 8 | pre code { 9 | display: block; padding: 0.5em; 10 | background: #3F3F3F; 11 | color: #DCDCDC; 12 | } 13 | 14 | pre .keyword, 15 | pre .tag, 16 | pre .css .class, 17 | pre .css .id, 18 | pre .lisp .title, 19 | pre .nginx .title, 20 | pre .request, 21 | pre .status { 22 | color: #E3CEAB; 23 | } 24 | 25 | pre .django .template_tag, 26 | pre .django .variable, 27 | pre .django .filter .argument { 28 | color: #DCDCDC; 29 | } 30 | 31 | pre .number, 32 | pre .date { 33 | color: #8CD0D3; 34 | } 35 | 36 | pre .dos .envvar, 37 | pre .dos .stream, 38 | pre .variable, 39 | pre .apache .sqbracket { 40 | color: #EFDCBC; 41 | } 42 | 43 | pre .dos .flow, 44 | pre .diff .change, 45 | pre .python .exception, 46 | pre .python .built_in, 47 | pre .literal, 48 | pre .tex .special { 49 | color: #EFEFAF; 50 | } 51 | 52 | pre .diff .chunk, 53 | pre .ruby .subst { 54 | color: #8F8F8F; 55 | } 56 | 57 | pre .dos .keyword, 58 | pre .python .decorator, 59 | pre .title, 60 | pre .haskell .type, 61 | pre .diff .header, 62 | pre .ruby .class .parent, 63 | pre .apache .tag, 64 | pre .nginx .built_in, 65 | pre .tex .command, 66 | pre .input_number { 67 | color: #efef8f; 68 | } 69 | 70 | pre .dos .winutils, 71 | pre .ruby .symbol, 72 | pre .ruby .symbol .string, 73 | pre .ruby .symbol .keyword, 74 | pre .ruby .symbol .keymethods, 75 | pre .ruby .string, 76 | pre .ruby .instancevar { 77 | color: #DCA3A3; 78 | } 79 | 80 | pre .diff .deletion, 81 | pre .string, 82 | pre .tag .value, 83 | pre .preprocessor, 84 | pre .built_in, 85 | pre .sql .aggregate, 86 | pre .javadoc, 87 | pre .smalltalk .class, 88 | pre .smalltalk .localvars, 89 | pre .smalltalk .array, 90 | pre .css .rules .value, 91 | pre .attr_selector, 92 | pre .pseudo, 93 | pre .apache .cbracket, 94 | pre .tex .formula { 95 | color: #CC9393; 96 | } 97 | 98 | pre .shebang, 99 | pre .diff .addition, 100 | pre .comment, 101 | pre .java .annotation, 102 | pre .template_comment, 103 | pre .pi, 104 | pre .doctype { 105 | color: #7F9F7F; 106 | } 107 | 108 | pre .coffeescript .javascript, 109 | pre .xml .css, 110 | pre .xml .javascript, 111 | pre .xml .vbscript, 112 | pre .tex .formula { 113 | opacity: 0.5; 114 | } 115 | 116 | -------------------------------------------------------------------------------- /www/static/modules/accordion/accordion.css: -------------------------------------------------------------------------------- 1 | .m-accordion { 2 | list-style: none; 3 | } 4 | .m-accordion li { 5 | list-style: none; 6 | margin: 0; 7 | } 8 | .m-accordion .m-content { 9 | -webkit-transition: max-height 0.5s ease; 10 | -moz-transition: max-height 0.5s ease; 11 | -o-transition: max-height 0.5s ease; 12 | transition: max-height 0.5s ease; 13 | overflow: hidden; 14 | max-height: 0; 15 | } 16 | .m-accordion .m-active .m-content { 17 | max-height: 10000px; /* IE hack */ 18 | } 19 | 20 | .m-accordion .m-header { 21 | z-index: 1; 22 | position: relative; 23 | margin-top: -1px; 24 | pointer-events: cursor; /* For iOS */ 25 | } 26 | 27 | .m-accordion h3 { 28 | margin: 0; 29 | } 30 | 31 | .m-accordion .m-header > a { 32 | pointer-events: none; 33 | } 34 | -------------------------------------------------------------------------------- /www/v2/community.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page-communityv2 3 | title: Mobify.js Community 4 | --- 5 | 6 | ## Where to get help? 7 | 8 | Questions are best posted on [StackOverflow](http://stackoverflow.com/) under 9 | the tag **mobifyjs**. Our team is active on StackOverflow for mobify.js and 10 | other projects. 11 | 12 | If you have a problem with the [Mobify Cloud Platform](https://cloud.mobify.com/) 13 | or you wish to reach our Mobify Cloud support team you can reach us through our 14 | [support site](https://support.mobify.com/). 15 | {:.cloud} 16 | 17 | ## Where to report bugs? 18 | 19 | Bugs and feature requests should be submitted to our issue tracker on GitHub: 20 | 21 | - [Issues with Mobify.js](https://github.com/mobify/mobifyjs/issues) 22 | - [Issues with the Mobify Client](https://github.com/mobify/mobify-client/issues) 23 | 24 | If you're not sure which project to submit your issues to, submit to either and 25 | we will sort them out. 26 | 27 | ## How to Contribute 28 | 29 | The development of Mobify.js takes place on GitHub. We have two primary 30 | repositories dedicated to Mobify.js: the [Mobify.js library](https://github.com/mobify/mobifyjs) 31 | and the [Mobify Client](https://github.com/mobify/mobify-client), which is our 32 | development tool. 33 | 34 | Contributing changes is straightforward: 35 | 36 | 1. Fork the repository on Github 37 | 2. Push your changes to your fork 38 | 3. Open a Pull Request from your fork 39 | 4. Get feedback 40 | 5. Update code 41 | 6. Agree to the [contributors license agreement]({{ site.baseurl }}/cla/) 42 | 7. Get it merged back! 43 | --------------------------------------------------------------------------------