├── .gitignore ├── .travis.yml ├── CONTRIBUTING.md ├── History.md ├── Makefile ├── Notes.md ├── Readme.md ├── Reference.md ├── bower.json ├── examples ├── big-button.html ├── examples.md ├── github.html ├── index.html ├── patterns.html └── patterns.md ├── flatdoc.js ├── index.html ├── legacy.js ├── package.json ├── reference.html ├── support ├── Notes.md ├── blur.jpg ├── dox2md.js ├── legacy-header.js ├── preview.jpg ├── theme.css ├── theme.js └── vendor │ ├── Makefile │ ├── html5shiv.js │ ├── jquery.fillsize.js │ ├── jquery.js │ ├── jquery.smartquotes.js │ └── respond.js ├── templates ├── blank.html └── template.html ├── test ├── env_test.js ├── fixtures │ └── context.html ├── flatdoc_test.js ├── ids_test.js ├── mocha.opts ├── quotes_test.js ├── setup.js ├── slugify_test.js ├── syntax_html_test.js ├── syntax_js_test.js └── transform_test.js ├── theme-white ├── script.js ├── style.css └── style.styl └── v ├── 0.8.0 ├── flatdoc.js ├── legacy.js ├── templates │ ├── blank.html │ ├── template.html │ └── templates │ │ ├── blank.html │ │ └── template.html └── theme-white │ ├── script.js │ └── style.css ├── 0.8.1 ├── flatdoc.js ├── legacy.js ├── templates │ ├── blank.html │ ├── template.html │ └── templates │ │ ├── blank.html │ │ └── template.html └── theme-white │ ├── script.js │ └── style.css ├── 0.8.2 ├── flatdoc.js ├── legacy.js ├── templates │ ├── blank.html │ └── template.html └── theme-white │ ├── script.js │ └── style.css ├── 0.8.3 ├── flatdoc.js ├── legacy.js ├── templates │ ├── blank.html │ └── template.html └── theme-white │ ├── script.js │ └── style.css ├── 0.8.4 ├── flatdoc.js ├── legacy.js ├── templates │ ├── blank.html │ └── template.html └── theme-white │ ├── script.js │ └── style.css ├── 0.8.5 ├── flatdoc.js ├── legacy.js ├── templates │ ├── blank.html │ └── template.html └── theme-white │ ├── script.js │ └── style.css ├── 0.8.6 ├── flatdoc.js ├── legacy.js ├── templates │ ├── blank.html │ └── template.html └── theme-white │ ├── script.js │ └── style.css ├── 0.8 ├── flatdoc.js ├── legacy.js ├── templates │ ├── blank.html │ ├── template.html │ └── templates │ │ ├── blank.html │ │ └── template.html └── theme-white │ ├── script.js │ └── style.css ├── 0.9.0 ├── flatdoc.js ├── legacy.js ├── templates │ ├── blank.html │ └── template.html └── theme-white │ ├── script.js │ └── style.css └── 0.9 ├── flatdoc.js ├── legacy.js ├── templates ├── blank.html └── template.html └── theme-white ├── script.js └── style.css /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: ["iojs"] 3 | branches: 4 | only: ["gh-pages"] 5 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Contributing guidelines 2 | ======================= 3 | 4 | In general: 5 | 6 | * Read [Notes.md] for developer notes. 7 | * Be familiar with [pull request etiquette]. 8 | 9 | For submitting .js updates: 10 | 11 | * When submitting new features, add tests. 12 | * When submitting fixes, try to add a test for the failing case. 13 | 14 | For submitting .css updates: 15 | 16 | * Be sure to make your changes to the stylus (.styl) files. 17 | 18 | [pull request etiquette]: http://google.com/search?q=pull+request+etiquette 19 | -------------------------------------------------------------------------------- /History.md: -------------------------------------------------------------------------------- 1 | ## v0.9.0 - November 9, 2014 2 | 3 | * Changed prescribed URLs to use [https://cdn.rawgit.com](http://rawgit.com), supporting HTTPS. (#27) 4 | * Support multiple markdown files in `Flatdoc.file`. (#15, #45, @gjong) 5 | * Fix readme example to be workable. (#7) 6 | * Deprecate `src/`, making PR's a bit easier to manage. 7 | * Fix navbar offset with images. (#31, #44, @UziTech) 8 | 9 | ## v0.8.7 - unreleased 10 | 11 | * Publish to Bower. 12 | * Fix issue where linking to a location hash doesn't scroll the document down. (#21, #35, @malthe) 13 | 14 | ## v0.8.6 - June 24, 2014 15 | 16 | * Hotfix: fix JS syntax highlighting. (#37) 17 | * Internal: add more unit tests. 18 | 19 | ## v0.8.5 - June 24, 2014 20 | 21 | Please use v0.8.6 instead. 22 | 23 | * Fix a minor issue where navigation would break. (#36, @malthe) 24 | * Add support for external highlighters. (#37, @malthe) 25 | * theme-white: Remove the *jQuery.fillsize* plugin. 26 | * theme-white: Simplify the JS file. 27 | 28 | ## v0.8.4 - June 22, 2014 29 | 30 | * Use `jQuery.fn.addBack()` instead of `andSelf()`. (#24, @jonschlinkert) 31 | * Fix JS error in older versions of IE. (#30, @vijayakumarrg) 32 | * Fix sticky sidebar glitches when resizing. (#14, @grmlin) 33 | 34 | ## v0.8.3 - June 21, 2014 35 | 36 | * Fix issue with `h3` headings following `h1`s. (#34, @malthe) 37 | * Fix issues with multiple headings that have the same text. (#33, #32, @malthe) 38 | * Fix issue with HTTPS errors concerning Google Fonts. (#27, #29) 39 | 40 | ## v0.8.2 - June 16, 2014 41 | 42 | * Fix HTML keyword highlighting when tags don't have attributes. (#28, @oderwat) 43 | * Fix `slugify()` raising an error when the given text is not a string. 44 | 45 | ## v0.8.1 - April 25, 2014 46 | 47 | * Add support for tables. (#22, #5, @huangyq23) 48 | * Add bitbucket support. (#16, @palday) 49 | 50 | ## v0.8.0 51 | 52 | Initial release. 53 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | UGLIFY := ./node_modules/.bin/uglifyjs --comments "/^!/" 2 | STYLUS := ./node_modules/.bin/stylus -U -u nib 3 | DOX := ./node_modules/.bin/dox 4 | 5 | all: \ 6 | legacy.js \ 7 | theme-white/style.css \ 8 | theme-white/script.js \ 9 | Reference.md 10 | 11 | watch: 12 | while true; do make all | grep -v "Nothing"; sleep 1; done 13 | 14 | # Legacy shims for IE 15 | legacy.js: \ 16 | support/legacy-header.js \ 17 | support/vendor/html5shiv.js \ 18 | support/vendor/respond.js 19 | cat $^ > $@ 20 | 21 | %.css: %.styl 22 | (echo "/*\n\nPlease don't edit this file directly.\nInstead, edit the stylus (.styl) files and compile it to CSS on your machine.\n\n*/" ; $(STYLUS) < $<) > $@ 23 | 24 | Reference.md: flatdoc.js 25 | $(DOX) -r < $< | node support/dox2md.js --default-level 3 > $@ 26 | 27 | # $ make v/0.1.0 28 | # Makes a distribution. 29 | # 30 | v/%: all 31 | mkdir -p $@ 32 | $(UGLIFY) < flatdoc.js > $@/flatdoc.js 33 | $(UGLIFY) < legacy.js > $@/legacy.js 34 | cp -R templates $@/templates 35 | mkdir -p $@/theme-white 36 | cp theme-white/style.css $@/theme-white 37 | cp theme-white/script.js $@/theme-white 38 | 39 | .PHONY: watch 40 | -------------------------------------------------------------------------------- /Notes.md: -------------------------------------------------------------------------------- 1 | Developer notes 2 | =============== 3 | 4 | ### Distributions 5 | 6 | There are 4 official ways to point to flatdoc releases. That is: 7 | 8 | # via cdnjs: 9 | https://cdn.rawgit.com/rstacruz/flatdoc/v0.8.6/flatdoc.js 10 | 11 | # Specific versions 12 | # (built using `make v/0.8.1`) 13 | http://rstacruz.github.io/flatdoc/v/0.8.6/* 14 | 15 | # Latest from the 0.8 series. 16 | # Updated every time there's a 0.8 release. 17 | # (built using `make v/0.8`) 18 | http://rstacruz.github.io/flatdoc/v/0.8/* 19 | 20 | # Latest 21 | # (built using `make`) 22 | http://rstacruz.github.io/flatdoc/* 23 | 24 | ...just replace `*` with `flatdoc.js` (or any of the other support files). 25 | 26 | ### GNU make 27 | 28 | This project uses GNU make (`Makefile`) to manage the builds. 29 | 30 | * `make` - builds the latest version 31 | * `make v/0.x.x` - builds a given version distribution 32 | * `make watch` - keep rebuilding as needed (useful for development) 33 | 34 | ### Notes on structure 35 | 36 | * `flatdoc.js` is the main script. 37 | * Distributions are stored in `/v/{version}/*`. 38 | * CSS files are compiled from Stylus sources. 39 | 40 | ### Updating files 41 | 42 | # build files 43 | make 44 | 45 | # ensure it works, and install build tools 46 | npm install 47 | npm test 48 | 49 | # update prescribed versions 50 | perl -p -i -e "s/v\d+\.\d+\.\d+/v0.9.0/g" templates/*.html Readme.md 51 | bump package.json 52 | git diff 53 | 54 | # build files 55 | make 56 | make v/0.9 57 | make v/0.9.0 58 | 59 | # add release date 60 | vim History.md 61 | git release v0.8.3 62 | npm publish 63 | -------------------------------------------------------------------------------- /Reference.md: -------------------------------------------------------------------------------- 1 | Flatdoc 2 | ======= 3 | 4 | Basic Flatdoc module. 5 | 6 | The main entry point is `Flatdoc.run()`, which invokes the [Runner]. 7 | 8 | ```js 9 | Flatdoc.run({ 10 | fetcher: Flatdoc.github('rstacruz/backbone-patterns'); 11 | }); 12 | ``` 13 | 14 | These fetcher functions are available: 15 | 16 | ```js 17 | Flatdoc.github('owner/repo') 18 | Flatdoc.github('owner/repo', 'API.md') 19 | Flatdoc.github('owner/repo', 'API.md', 'branch') 20 | Flatdoc.bitbucket('owner/repo') 21 | Flatdoc.bitbucket('owner/repo', 'API.md') 22 | Flatdoc.bitbucket('owner/repo', 'API.md', 'branch') 23 | Flatdoc.file('http://path/to/url') 24 | Flatdoc.file([ 'http://path/to/url', ... ]) 25 | ``` 26 | 27 | 28 | 29 | ### Flatdoc.run() 30 | 31 | Creates a runner. 32 | See [Flatdoc]. 33 | 34 | ### Flatdoc.file() 35 | 36 | File fetcher function. 37 | 38 | Fetches a given `url` via AJAX. 39 | See [Runner#run()] for a description of fetcher functions. 40 | 41 | ### Flatdoc.github() 42 | 43 | Github fetcher. 44 | Fetches from repo `repo` (in format 'user/repo'). 45 | 46 | If the parameter `filepath` is supplied, it fetches the contents of that 47 | given file in the repo's default branch. To fetch the contents of 48 | `filepath` from a different branch, the parameter `ref` should be 49 | supplied with the target branch name. 50 | 51 | See [Runner#run()] for a description of fetcher functions. 52 | 53 | See: http://developer.github.com/v3/repos/contents/ 54 | 55 | ### Flatdoc.bitbucket() 56 | 57 | Bitbucket fetcher. 58 | Fetches from repo `repo` (in format 'user/repo'). 59 | 60 | If the parameter `filepath` is supplied, it fetches the contents of that 61 | given file in the repo. 62 | 63 | See [Runner#run()] for a description of fetcher functions. 64 | 65 | See: https://confluence.atlassian.com/display/BITBUCKET/src+Resources#srcResources-GETrawcontentofanindividualfile 66 | See: http://ben.onfabrik.com/posts/embed-bitbucket-source-code-on-your-website 67 | Bitbucket appears to have stricter restrictions on 68 | Access-Control-Allow-Origin, and so the method here is a bit 69 | more complicated than for Github 70 | 71 | If you don't pass a branch name, then 'default' for Hg repos is assumed 72 | For git, you should pass 'master'. In both cases, you should also be able 73 | to pass in a revision number here -- in Mercurial, this also includes 74 | things like 'tip' or the repo-local integer revision number 75 | Default to Mercurial because Git users historically tend to use GitHub 76 | 77 | Parser 78 | ------ 79 | 80 | Parser module. 81 | Parses a given Markdown document and returns a JSON object with data 82 | on the Markdown document. 83 | 84 | ```js 85 | var data = Flatdoc.parser.parse('markdown source here'); 86 | console.log(data); 87 | 88 | data == { 89 | title: 'My Project', 90 | content: '

This project is a...', 91 | menu: {...} 92 | } 93 | ``` 94 | 95 | 96 | 97 | ### Parser.parse() 98 | 99 | Parses a given Markdown document. 100 | See `Parser` for more info. 101 | 102 | Transformer 103 | ----------- 104 | 105 | Transformer module. 106 | This takes care of any HTML mangling needed. The main entry point is 107 | `.mangle()` which applies all transformations needed. 108 | 109 | ```js 110 | var $content = $("

Hello there, this is a docu..."); 111 | Flatdoc.transformer.mangle($content); 112 | ``` 113 | 114 | If you would like to change any of the transformations, decorate any of 115 | the functions in `Flatdoc.transformer`. 116 | 117 | ### Transformer.mangle() 118 | 119 | Takes a given HTML `$content` and improves the markup of it by executing 120 | the transformations. 121 | 122 | > See: [Transformer](#transformer) 123 | 124 | ### Transformer.addIDs() 125 | 126 | Adds IDs to headings. 127 | 128 | ### Transformer.getMenu() 129 | 130 | Returns menu data for a given HTML. 131 | 132 | ```js 133 | menu = Flatdoc.transformer.getMenu($content); 134 | menu == { 135 | level: 0, 136 | items: [{ 137 | section: "Getting started", 138 | level: 1, 139 | items: [...]}, ...]} 140 | ``` 141 | 142 | 143 | 144 | ### Transformer.buttonize() 145 | 146 | Changes "button >" text to buttons. 147 | 148 | ### Transformer.smartquotes() 149 | 150 | Applies smart quotes to a given element. 151 | It leaves `code` and `pre` blocks alone. 152 | 153 | Highlighters 154 | ------------ 155 | 156 | Syntax highlighters. 157 | 158 | You may add or change more highlighters via the `Flatdoc.highlighters` 159 | object. 160 | 161 | ```js 162 | Flatdoc.highlighters.js = function(code) { 163 | }; 164 | ``` 165 | 166 | Each of these functions 167 | 168 | ### Highlighters.js 169 | 170 | JavaScript syntax highlighter. 171 | 172 | Thanks @visionmedia! 173 | 174 | MenuView 175 | -------- 176 | 177 | Menu view. Renders menus 178 | 179 | Runner 180 | ------ 181 | 182 | A runner module that fetches via a `fetcher` function. 183 | 184 | ```js 185 | var runner = new Flatdoc.runner({ 186 | fetcher: Flatdoc.url('readme.txt') 187 | }); 188 | runner.run(); 189 | ``` 190 | 191 | The following options are available: 192 | 193 | - `fetcher` - a function that takes a callback as an argument and 194 | executes that callback when data is returned. 195 | 196 | See: [Flatdoc.run()] 197 | 198 | ### Runner#highlight() 199 | 200 | Syntax highlighting. 201 | 202 | You may define a custom highlight function such as `highlight` from 203 | the highlight.js library. 204 | 205 | ```js 206 | Flatdoc.run({ 207 | highlight: function (code, value) { 208 | return hljs.highlight(lang, code).value; 209 | }, 210 | ... 211 | }); 212 | ``` 213 | 214 | 215 | 216 | ### Runner#run() 217 | 218 | Loads the Markdown document (via the fetcher), parses it, and applies it 219 | to the elements. 220 | 221 | ### Runner#applyData() 222 | 223 | Applies given doc data `data` to elements in object `elements`. 224 | 225 | 226 | [Flatdoc]: #flatdoc 227 | [Flatdoc.run()]: #flatdoc-run 228 | [Flatdoc.file()]: #flatdoc-file 229 | [Flatdoc.github()]: #flatdoc-github 230 | [Flatdoc.bitbucket()]: #flatdoc-bitbucket 231 | [Parser]: #parser 232 | [Parser.parse()]: #parser-parse 233 | [Transformer]: #transformer 234 | [Transformer.mangle()]: #transformer-mangle 235 | [Transformer.addIDs()]: #transformer-addids 236 | [Transformer.getMenu()]: #transformer-getmenu 237 | [Transformer.buttonize()]: #transformer-buttonize 238 | [Transformer.smartquotes()]: #transformer-smartquotes 239 | [Highlighters]: #highlighters 240 | [Highlighters.js]: #highlighters-js 241 | [MenuView]: #menuview 242 | [Runner]: #runner 243 | [Runner#highlight()]: #runner-highlight 244 | [Runner#run()]: #runner-run 245 | [Runner#applyData()]: #runner-applydata 246 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flatdoc", 3 | "main": [ 4 | "flatdoc.js", 5 | "legacy.js", 6 | "theme-white/script.js", 7 | "theme-white/style.css" 8 | ], 9 | "homepage": "https://github.com/rstacruz/flatdoc", 10 | "authors": [ 11 | "Rico Sta. Cruz " 12 | ], 13 | "description": "Fetch Markdown files and render them as full pages.", 14 | "moduleType": [ 15 | "globals" 16 | ], 17 | "keywords": [ 18 | "documentation", 19 | "markdown" 20 | ], 21 | "license": "MIT", 22 | "ignore": [ 23 | "**/.*", 24 | "node_modules", 25 | "bower_components", 26 | "test", 27 | "tests" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /examples/big-button.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Examples 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 26 | 28 | 29 | 30 | 31 |

32 |
33 |

34 |
35 |
36 | 37 |
38 | 44 |
45 |
46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /examples/examples.md: -------------------------------------------------------------------------------- 1 | Flatdoc examples 2 | ================ 3 | 4 | ### Large sidebar button 5 | [View example >](examples/big-button.html) 6 | 7 | ``` html 8 |
9 | View in GitHub 10 |
11 | ``` 12 | 13 | ### Backbone Patterns 14 | [View example >](examples/patterns.html) 15 | 16 | Random table 17 | ============== 18 | header|header|header 19 | ------|------|------ 20 | cell |cell |cell 21 | cell |cell |cell 22 | cell |cell |cell 23 | cell |cell |cell 24 | cell |cell |cell 25 | cell |cell |cell 26 | Pointless text 27 | ============== 28 | 29 | Elephant tonic 30 | -------------- 31 | 32 | A bill accounts her postcard at trees. Conduct one's claw's elephant. Loathe my 33 | forest. Though, a page pulls his grin below bodies. Cat rules seed at fiber. 34 | "Advise their tonic's touch," she nicked. "Craft our sauce!" the applesauce's 35 | chicken used. 36 | 37 | Swiftly, a home cares one's pitch off ices. A coffee tips one's fingernail after 38 | plastics. Truly, who? Sadly, an outline understands her tonic over colors. 39 | Indeed, a home recalls her acuse among solutions. Yes! A phone recalls the 40 | vision below wires. 41 | 42 | ``` js 43 | Flatdoc.run({ 44 | fetcher: Flatdoc.file('support/examples.md') 45 | }); 46 | ``` 47 | 48 | ### Tofu outline 49 | 50 | But what moded her tofu's outline? But who copied their liquid's period? Egads! 51 | List his sense. Trade our pond. Firmly, a cinnamon defines her elephant above 52 | muses. Unmanly, a towel gives his gravy over shots. Call one's funk's might. 53 | 54 | > "Design my cap," the aquarium's grin snipped. Nicely, chain reigns science 55 | until tonic. Egads! Heart spins coffee behind support. 56 | 57 | ### Valley applesauce 58 | 59 | Store replaces sense beneath valley. Yes! Applesauce kills sheet until number. 60 | Sense my dilemma. A worm refers to their rod throughout lists. His balance 61 | abstracted one's grin greatly, which must be ambient. But who moded the 62 | section's powder? 63 | 64 | ### The talking aquarium 65 | 66 | "Design my cap," the aquarium's grin snipped. Nicely, chain reigns science until 67 | tonic. Egads! Heart spins coffee behind support. One's state bound their page 68 | badly, which must be thin. Egads! "List one's cap's bean!" his vision made. 69 | 70 | # More sample text 71 | 72 | Their employee's forest bound his seed's dog fully. "Time the home," our 73 | liquid's fingernail folded. A spinach considers her rain before ices. Threat 74 | lives surface below teddy bear. Display one's worm. Worry her tonic's balance. 75 | Head rules work above coffee. 76 | 77 | * Pail hides forest toward phone. 78 | * "Time her number," she easily loved. 79 | * Who copied their plastic's ice? 80 | * "Teach our grin's valley," it softly abstracted. 81 | * Divide their pail. 82 | 83 | The surface analyzed our cola's might, very low. 84 | 85 | "Display our lucky charm's number," he abstracted. But who bound her flake's 86 | state? Oh no! But what fixed one's spinach's bill? Her gin nicked one's sense 87 | mainly. Sanely, a postcard remembers his bean between mothers. Never! "Command 88 | her pond's powder," she analyzed. 89 | 90 | [Move it to baskets >]( #hello ) 91 | 92 | Mail breaking 93 | ------------- 94 | 95 | Break her mail. Salad trades hour at smile. But what analyzed his salad's sight? 96 | Paper spins boss beside aquarium. Softly, a gravy deepens one's phone within 97 | values. His paper defined her shotglass mainly, clearly. Strain his sheet. 98 | 99 | ### Vodka head 100 | 101 | Alas! But before that, why? The rain fined his page's touch profusely, which 102 | must be definite. Craft our vodka's head. Yes! "Show my smile," one's head 103 | nicked. Jerkily, section reigns plastic under might. Pitch lives sauce unto 104 | shotglass. 105 | 106 | "Break my store's towel!" the vision fixed. But what made our head's funk? Madly 107 | refined, when? But what created the postcard? Egads! Again, finger expects work 108 | until bill. Indeed, a rod mixes our science since values. Egads! Mash my tofu. 109 | 110 | But what shifted one's boss? Crown divides work below elephant. 111 | -------------------------------------------------------------------------------- /examples/github.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Flatdoc 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 26 | 28 | 29 | 30 | 31 |
32 | 38 |
39 |
40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /examples/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Examples 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 26 | 28 | 29 | 30 | 31 |
32 |
33 |

34 |
35 |
36 | 37 |
38 | 41 |
42 |
43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /examples/patterns.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Bankbone Patterns 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 29 | 31 | 32 | 33 | 34 |
35 | Backbone Patterns 36 |
37 | 38 |
39 |
40 |

41 | 45 |
46 |
47 | 49 |
50 |
51 | 52 |
53 | 59 |
60 |
61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Flatdoc 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
42 |
43 |
44 |

Documentation is easy.

45 |

Flatdoc is the fastest way to create a site for your open source project.

46 |
Flatdoc
47 |
48 |
49 |
50 | 51 |
52 |
53 |

Flatdoc

54 | 59 |
60 |
61 | 62 | 63 |
64 |
65 | 66 |
67 | 82 |
83 |
84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flatdoc", 3 | "description": "Fetch Markdown files and render them as full pages.", 4 | "keywords": ["documentation", "markdown"], 5 | "author": "Rico Sta. Cruz ", 6 | "version": "0.9.0", 7 | "repository": { 8 | "type": "git", 9 | "url": "https://github.com/rstacruz/flatdoc.git" 10 | }, 11 | "scripts": { 12 | "test": "mocha" 13 | }, 14 | "main": "flatdoc.js", 15 | "devDependencies": { 16 | "mocha": "1.10.0", 17 | "chai": "1.6.0", 18 | "jsdom": "*", 19 | "uglify-js": "2.3.6", 20 | "stylus": "0.46.3", 21 | "nib": "0.9.1", 22 | "commander": "1.1.1", 23 | "dox": "0.4.3" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /reference.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Flatdoc 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 26 | 27 | 28 | 29 |
30 |
31 |

Flatdoc

32 | 37 |
38 |
39 | 40 | 41 |
42 |
43 | 44 |
45 | 48 |
49 |
50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /support/Notes.md: -------------------------------------------------------------------------------- 1 | Development notes 2 | ================= 3 | 4 | ### One-time setup 5 | You probably want to install the toolchain: 6 | 7 | $ npm install 8 | 9 | ### Auto-generate files 10 | This will (re-) build auto-generated files (stylus, etc). 11 | 12 | $ make 13 | $ make -B # Recompiles things 14 | 15 | ### Update vendor files 16 | This will download files. 17 | 18 | $ cd support/vendor/; make *.js 19 | 20 | ### Make a release 21 | This will concat/compress things into a build in `/v/0.8.0`. 22 | 23 | $ make v/0.8.0 24 | 25 | To do 26 | ----- 27 | 28 | - Sectioning 29 | -------------------------------------------------------------------------------- /support/blur.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rstacruz/flatdoc/d07df9dbf475f5f289dc59528eee8fd068a50840/support/blur.jpg -------------------------------------------------------------------------------- /support/dox2md.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var util = require('util'); 3 | var cli = require('commander'); 4 | 5 | cli 6 | .option('--private', 'Show privates') 7 | .option('--source', 'Show sources') 8 | .option('--debug', 'Print debug JSON') 9 | .option('--module-level [n]', 'Heading level for modules [2]', 2) 10 | .option('--default-level [n]', 'Heading level for everything [3]', 3) 11 | .option('--lang ', 'Sets highlight block language [js]', 'js') 12 | .on('--help', function() { 13 | console.log(' Basic use:'); 14 | console.log(''); 15 | console.log(' $ dox -r < file.js | dox2md > out'); 16 | process.exit(0); 17 | }); 18 | cli.parse(process.argv); 19 | 20 | readStdin(function(json) { 21 | var blocks = JSON.parse(json); 22 | var lines = []; 23 | 24 | blocks = removeBlocks(blocks, function(b) { return !b.ignore; }); 25 | 26 | if (!cli['private']) 27 | blocks = removeBlocks(blocks, function(b) { return !b.isPrivate; }); 28 | 29 | // Definitions 30 | blocks.forEach(function(block, i) { 31 | if (!block.ctx) return; 32 | lines.push(markdownify(block, i, cli)); 33 | }); 34 | 35 | // Jump links 36 | lines.push(""); 37 | blocks.forEach(function(block, i) { 38 | if (!block.ctx) return; 39 | var name = namify(block.ctx); 40 | lines.push('[' + name + ']: #' + slugify(name)); 41 | }); 42 | 43 | if (cli.debug) 44 | process.stderr.write(util.inspect(blocks, false, Infinity, true)); 45 | 46 | console.log(lines.join("\n")); 47 | }); 48 | 49 | function markdownify(block, i, options) { 50 | var lines = []; 51 | var name = namify(block.ctx); 52 | var level; 53 | 54 | // Heading 55 | if (i === 0) { level = 1; } 56 | else if (isModule(name)) { level = options.moduleLevel; } 57 | else { level = options.defaultLevel; } 58 | lines.push(heading(name, level)); 59 | lines.push(fixMarkdown(block.description.full, options.lang)); 60 | lines.push(""); 61 | 62 | // Sources 63 | if (options.source) { 64 | lines.push("> Source:", "", codeBlock(block.code, options.lang)); 65 | } 66 | 67 | return lines.join("\n"); 68 | } 69 | 70 | function fixMarkdown(buf, lang) { 71 | var code = buf.match(/^( {4}[^\n]+\n*)+/gm) || []; 72 | 73 | code.forEach(function(block){ 74 | var code = block.replace(/^ {4}/gm, ''); 75 | buf = buf.replace(block, codeBlock(code, lang)); 76 | }); 77 | 78 | return buf; 79 | } 80 | 81 | function codeBlock(code, lang) { 82 | return '```'+lang+'\n' + code.trimRight() + '\n```\n\n'; 83 | } 84 | 85 | // Returns the name for a given context. 86 | function namify(ctx) { 87 | return ctx.string 88 | .replace('.prototype.', '#'); 89 | } 90 | 91 | // Checks if a given name is a module. 92 | function isModule(name) { 93 | return !! name.match(/^[A-Za-z][A-Za-z0-9_]*$/); 94 | } 95 | 96 | function heading(str, level) { 97 | if (level === 1) return str + "\n" + times("=", str.length) + "\n"; 98 | if (level === 2) return str + "\n" + times("-", str.length) + "\n"; 99 | return times('#', level) + ' ' + str + "\n"; 100 | } 101 | 102 | function times(str, n) { 103 | var re = ''; 104 | for (var i=0; i .in { 20 | display: table-cell; 21 | vertical-align: middle; } 22 | 23 | .title-card .headline { 24 | vertical-align: middle; 25 | display: inline-block; 26 | -webkit-box-sizing: border-box; 27 | box-sizing: border-box; 28 | 29 | /* text-shadow: 0 0 4px rgba(0, 0, 0, 0.5); */ 30 | 31 | padding-left: 40px; 32 | padding-right: 40px; 33 | max-width: 800px; 34 | line-height: 1.7; } 35 | 36 | .title-card h1 { 37 | font-family: 'Open Sans', sans-serif; 38 | font-size: 3.3em; 39 | font-weight: 300; 40 | line-height: 1.1; 41 | margin-bottom: 0.5em; 42 | color: #fff; } 43 | 44 | .title-card p { 45 | font-family: montserrat, sans-serif; 46 | color: #b8eaea; 47 | font-weight: bold; 48 | font-size: 1.3em; } 49 | 50 | .title-card h5 { 51 | margin-top: 150px; 52 | 53 | font-family: montserrat, sans-serif; 54 | font-weight: bold; 55 | color: #fff; 56 | text-transform: uppercase; 57 | letter-spacing: 2px; 58 | font-size: 1.8em; } 59 | 60 | .title-card h5 span { 61 | display: inline-block; 62 | padding: 5px 20px; 63 | border: solid 3px #fff; } 64 | 65 | @media (max-width: 768px) /* Tablet */ { 66 | .title-card h5 { 67 | margin-top: 100px; } 68 | } 69 | 70 | @media (max-width: 480px) /* Mobile */ { 71 | .title-card { 72 | padding: 50px 0; } 73 | .title-card .headline { 74 | padding-left: 10px; 75 | padding-right: 10px; 76 | min-height: none; } 77 | .title-card h1 { 78 | font-size: 2.2em; } 79 | .title-card p { 80 | font-size: 1.1em; } 81 | .title-card h5 { 82 | margin-top: 40px; 83 | font-size: 0.9em; } 84 | } 85 | -------------------------------------------------------------------------------- /support/theme.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 3 | $(document).on('flatdoc:ready', function() { 4 | $("#misc, #basic").remove(); 5 | 6 | $("pre > code").each(function() { 7 | var $code = $(this); 8 | var m = $code.text().match(/Toggle"); 11 | $q.find('a').click(function() { 12 | var klass = $(this).attr('href').substr(1); 13 | $('body').toggleClass(klass); 14 | if (klass === 'big-h3') $.anchorjump('#theme-options'); 15 | if (klass === 'large-brief') $.anchorjump('#flatdoc'); 16 | 17 | }); 18 | $code.after($q); 19 | } 20 | }); 21 | }); 22 | 23 | })(jQuery); 24 | -------------------------------------------------------------------------------- /support/vendor/Makefile: -------------------------------------------------------------------------------- 1 | html5shiv.js: 2 | wget "https://raw.github.com/aFarkas/html5shiv/master/dist/html5shiv.js" -q -O $@ 3 | 4 | marked.js: 5 | wget "https://github.com/chjj/marked/raw/master/lib/marked.js" -q -O $@ 6 | 7 | respond.js: 8 | wget "https://github.com/scottjehl/Respond/raw/master/respond.src.js" -q -O $@ 9 | 10 | jquery.js: 11 | wget "http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" -q -O $@ 12 | 13 | jquery.scrollagent.js: 14 | wget "https://github.com/rstacruz/jquery-stuff/raw/master/scrollagent/jquery.scrollagent.js" -q -O $@ 15 | 16 | jquery.anchorjump.js: 17 | wget "https://github.com/rstacruz/jquery-stuff/raw/master/anchorjump/jquery.anchorjump.js" -q -O $@ 18 | 19 | jquery.fillsize.js: 20 | wget "https://github.com/rstacruz/jquery-stuff/raw/master/fillsize/jquery.fillsize.js" -q -O $@ 21 | 22 | base64.js: 23 | wget "https://raw.github.com/dankogai/js-base64/master/base64.js" -q -O $@ 24 | -------------------------------------------------------------------------------- /support/vendor/html5shiv.js: -------------------------------------------------------------------------------- 1 | /* 2 | HTML5 Shiv v3.6.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | (function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); 5 | a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; 6 | c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| 7 | "undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment(); 8 | for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d img"); 7 | // 8 | // This binds a listener on window resizing to automatically scale down the 9 | // child (`> img` in this example) just so that enough of it will be visible in 10 | // the viewport of the container. 11 | // 12 | // This assumes that the container has `position: relative` (or any 'position', 13 | // really), and `overflow: hidden`. 14 | 15 | (function($) { 16 | $.fn.fillsize = function(selector) { 17 | var $parent = this; 18 | var $img; 19 | 20 | function resize() { 21 | if (!$img) $img = $parent.find(selector); 22 | 23 | $img.each(function() { 24 | if (!this.complete) return; 25 | var $img = $(this); 26 | 27 | var parent = { height: $parent.innerHeight(), width: $parent.innerWidth() }; 28 | var imageRatio = $img.width() / $img.height(); 29 | var containerRatio = parent.width / parent.height; 30 | 31 | var css = { 32 | position: 'absolute', 33 | left: 0, top: 0, right: 'auto', bottom: 'auto' 34 | }; 35 | 36 | // If image is wider than the container 37 | if (imageRatio > containerRatio) { 38 | css.left = Math.round((parent.width - imageRatio * parent.height) / 2) + 'px'; 39 | css.width = 'auto'; 40 | css.height = '100%'; 41 | } 42 | 43 | // If the container is wider than the image 44 | else { 45 | css.top = Math.round((parent.height - (parent.width / $img.width() * $img.height())) / 2) + 'px'; 46 | css.height = 'auto'; 47 | css.width = '100%'; 48 | } 49 | 50 | $img.css(css); 51 | }); 52 | } 53 | 54 | // Make it happen on window resize. 55 | $(window).resize(resize); 56 | 57 | // Allow manual invocation by doing `.trigger('fillsize')` on the container. 58 | $(document).on('fillsize', $parent.selector, resize); 59 | 60 | // Resize on first load (or immediately if called after). 61 | $(function() { 62 | // If the child is an image, fill it up when image's real dimensions are 63 | // first determined. Needs to be .bind() because the load event will 64 | // bubble up. 65 | $(selector, $parent).bind('load', function() { 66 | setTimeout(resize, 25); 67 | }); 68 | 69 | resize(); 70 | }); 71 | 72 | return this; 73 | }; 74 | })(jQuery); 75 | -------------------------------------------------------------------------------- /support/vendor/jquery.smartquotes.js: -------------------------------------------------------------------------------- 1 | /*! Smartquotes (c) 2012, Rico Sta. Cruz. MIT License. 2 | * http://github.com/rstacruz/jquery-stuff/tree/master/smartquotes */ 3 | 4 | // Translates plain ASCII punctuation characters into typographic punctuation 5 | // HTML entities. Inspired by Smartypants. 6 | // 7 | // $(function() { 8 | // $("body").smartquotes(); 9 | // }); 10 | // 11 | (function($) { 12 | // http://www.leancrew.com/all-this/2010/11/smart-quotes-in-javascript/ 13 | $.smartquotes = function(a) { 14 | a = a.replace(/(^|[-\u2014\s(\["])'/g, "$1\u2018"); // opening singles 15 | a = a.replace(/'/g, "\u2019"); // closing singles & apostrophes 16 | a = a.replace(/(^|[-\u2014/\[(\u2018\s])"/g, "$1\u201c"); // opening doubles 17 | a = a.replace(/"/g, "\u201d"); // closing doubles 18 | a = a.replace(/\.\.\./g, "\u2026"); // ellipses 19 | a = a.replace(/--/g, "\u2014"); // em-dashes 20 | return a; 21 | }; 22 | 23 | // http://stackoverflow.com/questions/298750/how-do-i-select-text-nodes-with-jquery 24 | function getTextNodesIn(el) { 25 | return $(el).find(":not(iframe,pre,code)").andSelf().contents().filter(function() { 26 | return this.nodeType == 3; 27 | }); 28 | } 29 | 30 | $.fn.smartquotes = function(fn) { 31 | if (!fn) fn = $.smartquotes; 32 | 33 | var nodes = getTextNodesIn(this); 34 | for (var i in nodes) { 35 | if (nodes.hasOwnProperty(i)) { 36 | var node = nodes[i]; 37 | node.nodeValue = fn(node.nodeValue); 38 | } 39 | } 40 | }; 41 | })(jQuery); 42 | -------------------------------------------------------------------------------- /templates/blank.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /templates/template.html: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Your Project 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 42 | 43 | 44 | 45 |
46 |
47 |

Your Project

48 | 52 |
53 |
54 | 55 | 56 |
57 |
58 | 59 |
60 | 63 |
64 |
65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /test/env_test.js: -------------------------------------------------------------------------------- 1 | describe("jsdom", function() { 2 | beforeEach(require('./setup')); 3 | 4 | it("environment should work", function() { 5 | $('body').append('hello'); 6 | $('a#aaa').text().should.equal('hello'); 7 | }); 8 | }); 9 | 10 | -------------------------------------------------------------------------------- /test/fixtures/context.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /test/flatdoc_test.js: -------------------------------------------------------------------------------- 1 | describe("Flatdoc", function() { 2 | beforeEach(require('./setup')); 3 | 4 | it("Should be present", function() { 5 | assert.equal('object', typeof window.Flatdoc); 6 | }); 7 | 8 | describe("Simple", function() { 9 | beforeEach(function(done) { 10 | Flatdoc.run({ 11 | fetcher: function(callback) { 12 | callback(null, '# Hola\n\nHey there `world`'); 13 | done(); 14 | } 15 | }); 16 | }); 17 | 18 | it("Should have the right title", function() { 19 | $('#title').text().should.equal('Hola'); 20 | }); 21 | 22 | it("Should have a paragraph", function() { 23 | $('body').html().should.include('

Hey there world

'); 24 | }); 25 | 26 | it("Should have a menu", function() { 27 | $('#hola-link').length.should.equal(1); 28 | }); 29 | 30 | it("Should have a headline", function() { 31 | $('h1#hola').length.should.equal(1); 32 | $('h1#hola').text().should.equal('Hola'); 33 | }); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /test/ids_test.js: -------------------------------------------------------------------------------- 1 | describe("IDs", function() { 2 | beforeEach(require('./setup')); 3 | 4 | beforeEach(function(done) { 5 | Flatdoc.run({ 6 | fetcher: function(callback) { 7 | callback(null, '# a\n\n## b\n\n### c'); 8 | done(); 9 | } 10 | }); 11 | }); 12 | 13 | describe("Menu items", function() { 14 | it("Level 1", function() { 15 | expect($("#menu li#a-item")).have.length(1); 16 | expect($("#menu li#a-item").attr('class')).include('level-1'); 17 | }); 18 | 19 | it("Level 2", function() { 20 | expect($("#menu li#a-b-item")).have.length(1); 21 | expect($("#menu li#a-b-item").attr('class')).include('level-2'); 22 | }); 23 | 24 | it("Level 3", function() { 25 | expect($("#menu li#a-b-c-item")).have.length(1); 26 | expect($("#menu li#a-b-c-item").attr('class')).include('level-3'); 27 | }); 28 | 29 | it("Level 2 list", function() { 30 | expect($("#menu ul#a-list")).have.length(1); 31 | expect($("#menu ul#a-list").attr('class')).include('level-2'); 32 | }); 33 | 34 | it("Level 3 list", function() { 35 | expect($("#menu ul#a-b-list")).have.length(1); 36 | expect($("#menu ul#a-b-list").attr('class')).include('level-3'); 37 | }); 38 | }); 39 | 40 | describe("Headings", function() { 41 | it("Level 1", function() { 42 | expect($("#content h1#a")).have.length(1); 43 | }); 44 | 45 | it("Level 2", function() { 46 | expect($("#content h2#a-b")).have.length(1); 47 | }); 48 | 49 | it("Level 3", function() { 50 | expect($("#content h3#a-b-c")).have.length(1); 51 | }); 52 | }); 53 | }); 54 | -------------------------------------------------------------------------------- /test/mocha.opts: -------------------------------------------------------------------------------- 1 | -R spec 2 | -------------------------------------------------------------------------------- /test/quotes_test.js: -------------------------------------------------------------------------------- 1 | describe("Quotes", function() { 2 | beforeEach(require('./setup')); 3 | 4 | describe("One", function() { 5 | beforeEach(function(done) { 6 | Flatdoc.run({ 7 | fetcher: function(callback) { 8 | callback(null, '"Hello" said the ranger--indeed.'); 9 | done(); 10 | } 11 | }); 12 | }); 13 | 14 | it("Transform curly quotes", function() { 15 | expect($("body").html()).include("\u201cHello\u201d"); 16 | }); 17 | 18 | it("Transform em dashes", function() { 19 | expect($("body").html()).include("\u2014indeed"); 20 | }); 21 | }); 22 | 23 | describe("Two", function() { 24 | beforeEach(function(done) { 25 | Flatdoc.run({ 26 | fetcher: function(callback) { 27 | callback(null, '...That\'s all folks!'); 28 | done(); 29 | } 30 | }); 31 | }); 32 | 33 | it("Transform ellipses", function() { 34 | expect($("body").html()).include("\u2026"); 35 | }); 36 | 37 | it("Transform apostrophes", function() { 38 | expect($("body").html()).include("That\u2019s"); 39 | }); 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /test/setup.js: -------------------------------------------------------------------------------- 1 | process.stdout.write('Starting test environment'); 2 | 3 | global.getFile = function(filepath) { 4 | var path = require('path'); 5 | var fs = require('fs'); 6 | return fs.readFileSync(path.resolve(__dirname, '..', filepath)).toString(); 7 | }; 8 | 9 | global.chai = require('chai'); 10 | global.expect = chai.expect; 11 | global.assert = chai.assert; 12 | chai.should(); 13 | process.stdout.write('.'); 14 | 15 | var jsdom = require('jsdom'); 16 | process.stdout.write('. OK\n'); 17 | 18 | module.exports = function(done) { 19 | jsdom.env({ 20 | html: getFile('test/fixtures/context.html'), 21 | src: [ 22 | getFile('support/vendor/jquery.js'), 23 | getFile('flatdoc.js') 24 | ], 25 | done: function(errors, window) { 26 | global.window = window; 27 | global.$ = window.jQuery; 28 | global.Flatdoc = window.Flatdoc; 29 | done(errors); 30 | } 31 | }); 32 | }; 33 | -------------------------------------------------------------------------------- /test/slugify_test.js: -------------------------------------------------------------------------------- 1 | describe("Slugify", function () { 2 | beforeEach(require('./setup')); 3 | 4 | assert("hello", "hello"); 5 | assert("Hey", "hey"); 6 | assert("With Spaces", "with-spaces"); 7 | assert("with numbers (200)", "with-numbers-200"); 8 | assert("french raison d'être", "french-raison-detre"); 9 | assert("greek γιαούρτι", "greek-giaoyrti"); // actually giaourti? 10 | 11 | function assert(input, output) { 12 | it(input, function() { 13 | expect(Flatdoc.slugify(input)).eql(output); 14 | }); 15 | } 16 | }); 17 | -------------------------------------------------------------------------------- /test/syntax_html_test.js: -------------------------------------------------------------------------------- 1 | describe("Syntax highlight: HTML", function() { 2 | beforeEach(require('./setup')); 3 | 4 | beforeEach(function(done) { 5 | Flatdoc.run({ 6 | fetcher: function(callback) { 7 | callback(null, '# Hola\n\n```html\nhi```'); 8 | done(); 9 | } 10 | }); 11 | }); 12 | 13 | it("Add the correct language class", function() { 14 | expect($('pre>code').attr('class')).eql('lang-html'); 15 | }); 16 | 17 | it("Highlight strings", function() { 18 | expect($('pre').html()).include('"x"'); 19 | }); 20 | 21 | it("Highlight tags", function() { 22 | expect($('pre').html()).include('span'); 23 | }); 24 | 25 | it("Escape <", function() { 26 | expect($('pre').html()).include('<'); 27 | }); 28 | 29 | it("Escape >", function() { 30 | expect($('pre').html()).include('>'); 31 | }); 32 | 33 | it("Have the correct text", function() { 34 | expect($('pre').text()).eql('hi'); 35 | }); 36 | }); 37 | -------------------------------------------------------------------------------- /test/syntax_js_test.js: -------------------------------------------------------------------------------- 1 | describe("Syntax highlight: JS", function() { 2 | beforeEach(require('./setup')); 3 | 4 | beforeEach(function(done) { 5 | Flatdoc.run({ 6 | fetcher: function(callback) { 7 | callback(null, '# Hola\n\n```js\nfunction() { x }```'); 8 | done(); 9 | } 10 | }); 11 | }); 12 | 13 | it("Add the correct language class", function() { 14 | expect($('pre>code').attr('class')).eql('lang-js'); 15 | }); 16 | 17 | it("Highlight JS keywords", function() { 18 | expect($('pre').html()).include('function'); 19 | }); 20 | 21 | it("Have the correct text", function() { 22 | expect($('pre').text()).eql('function() { x }'); 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /test/transform_test.js: -------------------------------------------------------------------------------- 1 | describe("Flatdoc.transformer", function() { 2 | var trans; 3 | 4 | beforeEach(require('./setup')); 5 | beforeEach(function() { 6 | trans = Flatdoc.transformer; 7 | }); 8 | 9 | it(".addIDs()", function() { 10 | var $html = $("

Hello

One Two & Three

"); 11 | trans.addIDs($html); 12 | 13 | $html.find('h1').attr('id').should.equal('hello'); 14 | $html.find('h2').attr('id').should.equal('hello-one-two-three'); 15 | }); 16 | 17 | it(".buttonize()", function() { 18 | var $html = $("
Hello >"); 19 | trans.buttonize($html); 20 | 21 | assert($html.find('a').is('.button')); 22 | assert($html.find('a').is('.small')); 23 | }); 24 | }); 25 | 26 | -------------------------------------------------------------------------------- /theme-white/script.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | var $window = $(window); 3 | var $document = $(document); 4 | 5 | /* 6 | * Scrollspy. 7 | */ 8 | 9 | $document.on('flatdoc:ready', function() { 10 | $("h2, h3").scrollagent(function(cid, pid, currentElement, previousElement) { 11 | if (pid) { 12 | $("[href='#"+pid+"']").removeClass('active'); 13 | } 14 | if (cid) { 15 | $("[href='#"+cid+"']").addClass('active'); 16 | } 17 | }); 18 | }); 19 | 20 | /* 21 | * Anchor jump links. 22 | */ 23 | 24 | $document.on('flatdoc:ready', function() { 25 | $('.menu a').anchorjump(); 26 | }); 27 | 28 | /* 29 | * Title card. 30 | */ 31 | 32 | $(function() { 33 | var $card = $('.title-card'); 34 | if (!$card.length) return; 35 | 36 | var $header = $('.header'); 37 | var headerHeight = $header.length ? $header.outerHeight() : 0; 38 | 39 | $window 40 | .on('resize.title-card', function() { 41 | var windowWidth = $window.width(); 42 | 43 | if (windowWidth < 480) { 44 | $card.css('height', ''); 45 | } else { 46 | var height = $window.height(); 47 | $card.css('height', height - headerHeight); 48 | } 49 | }) 50 | .trigger('resize.title-card'); 51 | }); 52 | 53 | /* 54 | * Sidebar stick. 55 | */ 56 | 57 | $(function() { 58 | var $sidebar = $('.menubar'); 59 | var elTop; 60 | 61 | $window 62 | .on('resize.sidestick', function() { 63 | $sidebar.removeClass('fixed'); 64 | elTop = $sidebar.offset().top; 65 | $window.trigger('scroll.sidestick'); 66 | }) 67 | .on('scroll.sidestick', function() { 68 | var scrollY = $window.scrollTop(); 69 | $sidebar.toggleClass('fixed', (scrollY >= elTop)); 70 | }) 71 | .trigger('resize.sidestick'); 72 | }); 73 | 74 | })(jQuery); 75 | /*! jQuery.scrollagent (c) 2012, Rico Sta. Cruz. MIT License. 76 | * https://github.com/rstacruz/jquery-stuff/tree/master/scrollagent */ 77 | 78 | // Call $(...).scrollagent() with a callback function. 79 | // 80 | // The callback will be called everytime the focus changes. 81 | // 82 | // Example: 83 | // 84 | // $("h2").scrollagent(function(cid, pid, currentElement, previousElement) { 85 | // if (pid) { 86 | // $("[href='#"+pid+"']").removeClass('active'); 87 | // } 88 | // if (cid) { 89 | // $("[href='#"+cid+"']").addClass('active'); 90 | // } 91 | // }); 92 | 93 | (function($) { 94 | 95 | $.fn.scrollagent = function(options, callback) { 96 | // Account for $.scrollspy(function) 97 | if (typeof callback === 'undefined') { 98 | callback = options; 99 | options = {}; 100 | } 101 | 102 | var $sections = $(this); 103 | var $parent = options.parent || $(window); 104 | 105 | // Find the top offsets of each section 106 | var offsets = []; 107 | $sections.each(function(i) { 108 | var offset = $(this).attr('data-anchor-offset') ? 109 | parseInt($(this).attr('data-anchor-offset'), 10) : 110 | (options.offset || 0); 111 | 112 | offsets.push({ 113 | id: $(this).attr('id'), 114 | index: i, 115 | el: this, 116 | offset: offset 117 | }); 118 | }); 119 | 120 | // State 121 | var current = null; 122 | var height = null; 123 | var range = null; 124 | 125 | // Save the height. Do this only whenever the window is resized so we don't 126 | // recalculate often. 127 | $(window).on('resize', function() { 128 | height = $parent.height(); 129 | range = $(document).height(); 130 | }); 131 | 132 | // Find the current active section every scroll tick. 133 | $parent.on('scroll', function() { 134 | var y = $parent.scrollTop(); 135 | y += height * (0.3 + 0.7 * Math.pow(y/range, 2)); 136 | 137 | var latest = null; 138 | 139 | for (var i in offsets) { 140 | if (offsets.hasOwnProperty(i)) { 141 | var offset = offsets[i]; 142 | if ($(offset.el).offset().top + offset.offset < y) latest = offset; 143 | } 144 | } 145 | 146 | if (latest && (!current || (latest.index !== current.index))) { 147 | callback.call($sections, 148 | latest ? latest.id : null, 149 | current ? current.id : null, 150 | latest ? latest.el : null, 151 | current ? current.el : null); 152 | current = latest; 153 | } 154 | }); 155 | 156 | $(window).trigger('resize'); 157 | $parent.trigger('scroll'); 158 | 159 | return this; 160 | }; 161 | 162 | })(jQuery); 163 | /*! Anchorjump (c) 2012, Rico Sta. Cruz. MIT License. 164 | * http://github.com/rstacruz/jquery-stuff/tree/master/anchorjump */ 165 | 166 | // Makes anchor jumps happen with smooth scrolling. 167 | // 168 | // $("#menu a").anchorjump(); 169 | // $("#menu a").anchorjump({ offset: -30 }); 170 | // 171 | // // Via delegate: 172 | // $("#menu").anchorjump({ for: 'a', offset: -30 }); 173 | // 174 | // You may specify a parent. This makes it scroll down to the parent. 175 | // Great for tabbed views. 176 | // 177 | // $('#menu a').anchorjump({ parent: '.anchor' }); 178 | // 179 | // You can jump to a given area. 180 | // 181 | // $.anchorjump('#bank-deposit', options); 182 | 183 | (function($) { 184 | var defaults = { 185 | 'speed': 500, 186 | 'offset': 0, 187 | 'for': null, 188 | 'parent': null 189 | }; 190 | 191 | $.fn.anchorjump = function(options) { 192 | options = $.extend({}, defaults, options); 193 | 194 | if (options['for']) { 195 | this.on('click', options['for'], onClick); 196 | } else { 197 | this.on('click', onClick); 198 | } 199 | 200 | function onClick(e) { 201 | var $a = $(e.target).closest('a'); 202 | if (e.ctrlKey || e.metaKey || e.altKey || $a.attr('target')) return; 203 | 204 | e.preventDefault(); 205 | var href = $a.attr('href'); 206 | 207 | $.anchorjump(href, options); 208 | } 209 | }; 210 | 211 | // Jump to a given area. 212 | $.anchorjump = function(href, options) { 213 | options = $.extend({}, defaults, options); 214 | 215 | var top = 0; 216 | 217 | if (href != '#') { 218 | var $area = $(href); 219 | // Find the parent 220 | if (options.parent) { 221 | var $parent = $area.closest(options.parent); 222 | if ($parent.length) { $area = $parent; } 223 | } 224 | if (!$area.length) { return; } 225 | 226 | // Determine the pixel offset; use the default if not available 227 | var offset = 228 | $area.attr('data-anchor-offset') ? 229 | parseInt($area.attr('data-anchor-offset'), 10) : 230 | options.offset; 231 | 232 | top = Math.max(0, $area.offset().top + offset); 233 | } 234 | 235 | $('html, body').animate({ scrollTop: top }, options.speed); 236 | $('body').trigger('anchor', href); 237 | 238 | // Add the location hash via pushState. 239 | if (window.history.pushState) { 240 | window.history.pushState({ href: href }, "", href); 241 | } 242 | }; 243 | })(jQuery); 244 | -------------------------------------------------------------------------------- /v/0.8.0/legacy.js: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | Support JS for legacy browsers. 4 | Includes: 5 | 6 | HTML5 Shiv 7 | @afarkas @jdalton @jon_neal @rem 8 | MIT/GPL2 Licensed 9 | https://github.com/aFarkas/html5shiv 10 | 11 | matchMedia() polyfill 12 | (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license 13 | 14 | Respond.js 15 | min/max-width media query polyfill 16 | (c) Scott Jehl. MIT/GPLv2 Lic. 17 | http://j.mp/respondjs 18 | 19 | */ 20 | !function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x";c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;!function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}}();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d #mq-test-1 { width: 42px; }';docElem.insertBefore(fakeBody,refNode);bool=div.offsetWidth===42;docElem.removeChild(fakeBody);return{matches:bool,media:q}}}(document);/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ 23 | !function(win){"use strict";var respond={};win.respond=respond;respond.update=function(){};respond.mediaQueriesSupported=win.matchMedia&&win.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var doc=win.document,docElem=doc.documentElement,mediastyles=[],rules=[],appendedEls=[],parsedSheets={},resizeThrottle=30,head=doc.getElementsByTagName("head")[0]||docElem,base=doc.getElementsByTagName("base")[0],links=head.getElementsByTagName("link"),requestQueue=[],ripCSS=function(){for(var i=0;i-1,minw:thisq.match(/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:thisq.match(/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}applyMedia()},lastCall,resizeDefer,getEmValue=function(){var ret,div=doc.createElement("div"),body=doc.body,fakeUsed=false;div.style.cssText="position:absolute;font-size:1em;width:1em";if(!body){body=fakeUsed=doc.createElement("body");body.style.background="none"}body.appendChild(div);docElem.insertBefore(body,docElem.firstChild);ret=div.offsetWidth;if(fakeUsed){docElem.removeChild(body)}else{body.removeChild(div)}ret=eminpx=parseFloat(ret);return ret},eminpx,applyMedia=function(fromResize){var name="clientWidth",docElemProp=docElem[name],currWidth=doc.compatMode==="CSS1Compat"&&docElemProp||doc.body[name]||docElemProp,styleBlocks={},lastLink=links[links.length-1],now=(new Date).getTime();if(fromResize&&lastCall&&now-lastCall-1?eminpx||getEmValue():1)}if(!!max){max=parseFloat(max)*(max.indexOf(em)>-1?eminpx||getEmValue():1)}if(!thisstyle.hasquery||(!minnull||!maxnull)&&(minnull||currWidth>=min)&&(maxnull||currWidth<=max)){if(!styleBlocks[thisstyle.media]){styleBlocks[thisstyle.media]=[]}styleBlocks[thisstyle.media].push(rules[thisstyle.rules])}}}for(var j in appendedEls){if(appendedEls.hasOwnProperty(j)){if(appendedEls[j]&&appendedEls[j].parentNode===head){head.removeChild(appendedEls[j])}}}for(var k in styleBlocks){if(styleBlocks.hasOwnProperty(k)){var ss=doc.createElement("style"),css=styleBlocks[k].join("\n");ss.type="text/css";ss.media=k;head.insertBefore(ss,lastLink.nextSibling);if(ss.styleSheet){ss.styleSheet.cssText=css}else{ss.appendChild(doc.createTextNode(css))}appendedEls.push(ss)}}},ajax=function(url,callback){var req=xmlHttp();if(!req){return}req.open("GET",url,true);req.onreadystatechange=function(){if(req.readyState!==4||req.status!==200&&req.status!==304){return}callback(req.responseText)};if(req.readyState===4){return}req.send(null)},xmlHttp=function(){var xmlhttpmethod=false;try{xmlhttpmethod=new win.XMLHttpRequest}catch(e){xmlhttpmethod=new win.ActiveXObject("Microsoft.XMLHTTP")}return function(){return xmlhttpmethod}}();ripCSS();respond.update=ripCSS;function callMedia(){applyMedia(true)}if(win.addEventListener){win.addEventListener("resize",callMedia,false)}else if(win.attachEvent){win.attachEvent("onresize",callMedia)}}(this); -------------------------------------------------------------------------------- /v/0.8.0/templates/blank.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /v/0.8.0/templates/template.html: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Your Project 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 42 | 43 | 44 | 45 |
46 |
47 |

Your Project

48 | 52 |
53 |
54 | 55 | 56 |
57 |
58 | 59 |
60 | 63 |
64 |
65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /v/0.8.0/templates/templates/blank.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /v/0.8.0/templates/templates/template.html: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Your Project 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 42 | 43 | 44 | 45 |
46 |
47 |

Your Project

48 | 52 |
53 |
54 | 55 | 56 |
57 |
58 | 59 |
60 | 63 |
64 |
65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /v/0.8.1/legacy.js: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | Support JS for legacy browsers. 4 | Includes: 5 | 6 | HTML5 Shiv 7 | @afarkas @jdalton @jon_neal @rem 8 | MIT/GPL2 Licensed 9 | https://github.com/aFarkas/html5shiv 10 | 11 | matchMedia() polyfill 12 | (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license 13 | 14 | Respond.js 15 | min/max-width media query polyfill 16 | (c) Scott Jehl. MIT/GPLv2 Lic. 17 | http://j.mp/respondjs 18 | 19 | */ 20 | !function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x";c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;!function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}}();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d #mq-test-1 { width: 42px; }';docElem.insertBefore(fakeBody,refNode);bool=div.offsetWidth===42;docElem.removeChild(fakeBody);return{matches:bool,media:q}}}(document);/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ 23 | !function(win){"use strict";var respond={};win.respond=respond;respond.update=function(){};respond.mediaQueriesSupported=win.matchMedia&&win.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var doc=win.document,docElem=doc.documentElement,mediastyles=[],rules=[],appendedEls=[],parsedSheets={},resizeThrottle=30,head=doc.getElementsByTagName("head")[0]||docElem,base=doc.getElementsByTagName("base")[0],links=head.getElementsByTagName("link"),requestQueue=[],ripCSS=function(){for(var i=0;i-1,minw:thisq.match(/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:thisq.match(/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}applyMedia()},lastCall,resizeDefer,getEmValue=function(){var ret,div=doc.createElement("div"),body=doc.body,fakeUsed=false;div.style.cssText="position:absolute;font-size:1em;width:1em";if(!body){body=fakeUsed=doc.createElement("body");body.style.background="none"}body.appendChild(div);docElem.insertBefore(body,docElem.firstChild);ret=div.offsetWidth;if(fakeUsed){docElem.removeChild(body)}else{body.removeChild(div)}ret=eminpx=parseFloat(ret);return ret},eminpx,applyMedia=function(fromResize){var name="clientWidth",docElemProp=docElem[name],currWidth=doc.compatMode==="CSS1Compat"&&docElemProp||doc.body[name]||docElemProp,styleBlocks={},lastLink=links[links.length-1],now=(new Date).getTime();if(fromResize&&lastCall&&now-lastCall-1?eminpx||getEmValue():1)}if(!!max){max=parseFloat(max)*(max.indexOf(em)>-1?eminpx||getEmValue():1)}if(!thisstyle.hasquery||(!minnull||!maxnull)&&(minnull||currWidth>=min)&&(maxnull||currWidth<=max)){if(!styleBlocks[thisstyle.media]){styleBlocks[thisstyle.media]=[]}styleBlocks[thisstyle.media].push(rules[thisstyle.rules])}}}for(var j in appendedEls){if(appendedEls.hasOwnProperty(j)){if(appendedEls[j]&&appendedEls[j].parentNode===head){head.removeChild(appendedEls[j])}}}for(var k in styleBlocks){if(styleBlocks.hasOwnProperty(k)){var ss=doc.createElement("style"),css=styleBlocks[k].join("\n");ss.type="text/css";ss.media=k;head.insertBefore(ss,lastLink.nextSibling);if(ss.styleSheet){ss.styleSheet.cssText=css}else{ss.appendChild(doc.createTextNode(css))}appendedEls.push(ss)}}},ajax=function(url,callback){var req=xmlHttp();if(!req){return}req.open("GET",url,true);req.onreadystatechange=function(){if(req.readyState!==4||req.status!==200&&req.status!==304){return}callback(req.responseText)};if(req.readyState===4){return}req.send(null)},xmlHttp=function(){var xmlhttpmethod=false;try{xmlhttpmethod=new win.XMLHttpRequest}catch(e){xmlhttpmethod=new win.ActiveXObject("Microsoft.XMLHTTP")}return function(){return xmlhttpmethod}}();ripCSS();respond.update=ripCSS;function callMedia(){applyMedia(true)}if(win.addEventListener){win.addEventListener("resize",callMedia,false)}else if(win.attachEvent){win.attachEvent("onresize",callMedia)}}(this); -------------------------------------------------------------------------------- /v/0.8.1/templates/blank.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /v/0.8.1/templates/template.html: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Your Project 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 42 | 43 | 44 | 45 |
46 |
47 |

Your Project

48 | 52 |
53 |
54 | 55 | 56 |
57 |
58 | 59 |
60 | 63 |
64 |
65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /v/0.8.1/templates/templates/blank.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /v/0.8.1/templates/templates/template.html: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Your Project 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 42 | 43 | 44 | 45 |
46 |
47 |

Your Project

48 | 52 |
53 |
54 | 55 | 56 |
57 |
58 | 59 |
60 | 63 |
64 |
65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /v/0.8.2/legacy.js: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | Support JS for legacy browsers. 4 | Includes: 5 | 6 | HTML5 Shiv 7 | @afarkas @jdalton @jon_neal @rem 8 | MIT/GPL2 Licensed 9 | https://github.com/aFarkas/html5shiv 10 | 11 | matchMedia() polyfill 12 | (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license 13 | 14 | Respond.js 15 | min/max-width media query polyfill 16 | (c) Scott Jehl. MIT/GPLv2 Lic. 17 | http://j.mp/respondjs 18 | 19 | */ 20 | !function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x";c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;!function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}}();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d #mq-test-1 { width: 42px; }';docElem.insertBefore(fakeBody,refNode);bool=div.offsetWidth===42;docElem.removeChild(fakeBody);return{matches:bool,media:q}}}(document);/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ 23 | !function(win){"use strict";var respond={};win.respond=respond;respond.update=function(){};respond.mediaQueriesSupported=win.matchMedia&&win.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var doc=win.document,docElem=doc.documentElement,mediastyles=[],rules=[],appendedEls=[],parsedSheets={},resizeThrottle=30,head=doc.getElementsByTagName("head")[0]||docElem,base=doc.getElementsByTagName("base")[0],links=head.getElementsByTagName("link"),requestQueue=[],ripCSS=function(){for(var i=0;i-1,minw:thisq.match(/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:thisq.match(/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}applyMedia()},lastCall,resizeDefer,getEmValue=function(){var ret,div=doc.createElement("div"),body=doc.body,fakeUsed=false;div.style.cssText="position:absolute;font-size:1em;width:1em";if(!body){body=fakeUsed=doc.createElement("body");body.style.background="none"}body.appendChild(div);docElem.insertBefore(body,docElem.firstChild);ret=div.offsetWidth;if(fakeUsed){docElem.removeChild(body)}else{body.removeChild(div)}ret=eminpx=parseFloat(ret);return ret},eminpx,applyMedia=function(fromResize){var name="clientWidth",docElemProp=docElem[name],currWidth=doc.compatMode==="CSS1Compat"&&docElemProp||doc.body[name]||docElemProp,styleBlocks={},lastLink=links[links.length-1],now=(new Date).getTime();if(fromResize&&lastCall&&now-lastCall-1?eminpx||getEmValue():1)}if(!!max){max=parseFloat(max)*(max.indexOf(em)>-1?eminpx||getEmValue():1)}if(!thisstyle.hasquery||(!minnull||!maxnull)&&(minnull||currWidth>=min)&&(maxnull||currWidth<=max)){if(!styleBlocks[thisstyle.media]){styleBlocks[thisstyle.media]=[]}styleBlocks[thisstyle.media].push(rules[thisstyle.rules])}}}for(var j in appendedEls){if(appendedEls.hasOwnProperty(j)){if(appendedEls[j]&&appendedEls[j].parentNode===head){head.removeChild(appendedEls[j])}}}for(var k in styleBlocks){if(styleBlocks.hasOwnProperty(k)){var ss=doc.createElement("style"),css=styleBlocks[k].join("\n");ss.type="text/css";ss.media=k;head.insertBefore(ss,lastLink.nextSibling);if(ss.styleSheet){ss.styleSheet.cssText=css}else{ss.appendChild(doc.createTextNode(css))}appendedEls.push(ss)}}},ajax=function(url,callback){var req=xmlHttp();if(!req){return}req.open("GET",url,true);req.onreadystatechange=function(){if(req.readyState!==4||req.status!==200&&req.status!==304){return}callback(req.responseText)};if(req.readyState===4){return}req.send(null)},xmlHttp=function(){var xmlhttpmethod=false;try{xmlhttpmethod=new win.XMLHttpRequest}catch(e){xmlhttpmethod=new win.ActiveXObject("Microsoft.XMLHTTP")}return function(){return xmlhttpmethod}}();ripCSS();respond.update=ripCSS;function callMedia(){applyMedia(true)}if(win.addEventListener){win.addEventListener("resize",callMedia,false)}else if(win.attachEvent){win.attachEvent("onresize",callMedia)}}(this); -------------------------------------------------------------------------------- /v/0.8.2/templates/blank.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /v/0.8.2/templates/template.html: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Your Project 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 42 | 43 | 44 | 45 |
46 |
47 |

Your Project

48 | 52 |
53 |
54 | 55 | 56 |
57 |
58 | 59 |
60 | 63 |
64 |
65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /v/0.8.3/legacy.js: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | Support JS for legacy browsers. 4 | Includes: 5 | 6 | HTML5 Shiv 7 | @afarkas @jdalton @jon_neal @rem 8 | MIT/GPL2 Licensed 9 | https://github.com/aFarkas/html5shiv 10 | 11 | matchMedia() polyfill 12 | (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license 13 | 14 | Respond.js 15 | min/max-width media query polyfill 16 | (c) Scott Jehl. MIT/GPLv2 Lic. 17 | http://j.mp/respondjs 18 | 19 | */ 20 | !function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x";c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;!function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}}();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d #mq-test-1 { width: 42px; }';docElem.insertBefore(fakeBody,refNode);bool=div.offsetWidth===42;docElem.removeChild(fakeBody);return{matches:bool,media:q}}}(document);/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ 23 | !function(win){"use strict";var respond={};win.respond=respond;respond.update=function(){};respond.mediaQueriesSupported=win.matchMedia&&win.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var doc=win.document,docElem=doc.documentElement,mediastyles=[],rules=[],appendedEls=[],parsedSheets={},resizeThrottle=30,head=doc.getElementsByTagName("head")[0]||docElem,base=doc.getElementsByTagName("base")[0],links=head.getElementsByTagName("link"),requestQueue=[],ripCSS=function(){for(var i=0;i-1,minw:thisq.match(/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:thisq.match(/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}applyMedia()},lastCall,resizeDefer,getEmValue=function(){var ret,div=doc.createElement("div"),body=doc.body,fakeUsed=false;div.style.cssText="position:absolute;font-size:1em;width:1em";if(!body){body=fakeUsed=doc.createElement("body");body.style.background="none"}body.appendChild(div);docElem.insertBefore(body,docElem.firstChild);ret=div.offsetWidth;if(fakeUsed){docElem.removeChild(body)}else{body.removeChild(div)}ret=eminpx=parseFloat(ret);return ret},eminpx,applyMedia=function(fromResize){var name="clientWidth",docElemProp=docElem[name],currWidth=doc.compatMode==="CSS1Compat"&&docElemProp||doc.body[name]||docElemProp,styleBlocks={},lastLink=links[links.length-1],now=(new Date).getTime();if(fromResize&&lastCall&&now-lastCall-1?eminpx||getEmValue():1)}if(!!max){max=parseFloat(max)*(max.indexOf(em)>-1?eminpx||getEmValue():1)}if(!thisstyle.hasquery||(!minnull||!maxnull)&&(minnull||currWidth>=min)&&(maxnull||currWidth<=max)){if(!styleBlocks[thisstyle.media]){styleBlocks[thisstyle.media]=[]}styleBlocks[thisstyle.media].push(rules[thisstyle.rules])}}}for(var j in appendedEls){if(appendedEls.hasOwnProperty(j)){if(appendedEls[j]&&appendedEls[j].parentNode===head){head.removeChild(appendedEls[j])}}}for(var k in styleBlocks){if(styleBlocks.hasOwnProperty(k)){var ss=doc.createElement("style"),css=styleBlocks[k].join("\n");ss.type="text/css";ss.media=k;head.insertBefore(ss,lastLink.nextSibling);if(ss.styleSheet){ss.styleSheet.cssText=css}else{ss.appendChild(doc.createTextNode(css))}appendedEls.push(ss)}}},ajax=function(url,callback){var req=xmlHttp();if(!req){return}req.open("GET",url,true);req.onreadystatechange=function(){if(req.readyState!==4||req.status!==200&&req.status!==304){return}callback(req.responseText)};if(req.readyState===4){return}req.send(null)},xmlHttp=function(){var xmlhttpmethod=false;try{xmlhttpmethod=new win.XMLHttpRequest}catch(e){xmlhttpmethod=new win.ActiveXObject("Microsoft.XMLHTTP")}return function(){return xmlhttpmethod}}();ripCSS();respond.update=ripCSS;function callMedia(){applyMedia(true)}if(win.addEventListener){win.addEventListener("resize",callMedia,false)}else if(win.attachEvent){win.attachEvent("onresize",callMedia)}}(this); -------------------------------------------------------------------------------- /v/0.8.3/templates/blank.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /v/0.8.3/templates/template.html: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Your Project 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 42 | 43 | 44 | 45 |
46 |
47 |

Your Project

48 | 52 |
53 |
54 | 55 | 56 |
57 |
58 | 59 |
60 | 63 |
64 |
65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /v/0.8.4/legacy.js: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | Support JS for legacy browsers. 4 | Includes: 5 | 6 | HTML5 Shiv 7 | @afarkas @jdalton @jon_neal @rem 8 | MIT/GPL2 Licensed 9 | https://github.com/aFarkas/html5shiv 10 | 11 | matchMedia() polyfill 12 | (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license 13 | 14 | Respond.js 15 | min/max-width media query polyfill 16 | (c) Scott Jehl. MIT/GPLv2 Lic. 17 | http://j.mp/respondjs 18 | 19 | */ 20 | !function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x";c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;!function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}}();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d #mq-test-1 { width: 42px; }';docElem.insertBefore(fakeBody,refNode);bool=div.offsetWidth===42;docElem.removeChild(fakeBody);return{matches:bool,media:q}}}(document);/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ 23 | !function(win){"use strict";var respond={};win.respond=respond;respond.update=function(){};respond.mediaQueriesSupported=win.matchMedia&&win.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var doc=win.document,docElem=doc.documentElement,mediastyles=[],rules=[],appendedEls=[],parsedSheets={},resizeThrottle=30,head=doc.getElementsByTagName("head")[0]||docElem,base=doc.getElementsByTagName("base")[0],links=head.getElementsByTagName("link"),requestQueue=[],ripCSS=function(){for(var i=0;i-1,minw:thisq.match(/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:thisq.match(/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}applyMedia()},lastCall,resizeDefer,getEmValue=function(){var ret,div=doc.createElement("div"),body=doc.body,fakeUsed=false;div.style.cssText="position:absolute;font-size:1em;width:1em";if(!body){body=fakeUsed=doc.createElement("body");body.style.background="none"}body.appendChild(div);docElem.insertBefore(body,docElem.firstChild);ret=div.offsetWidth;if(fakeUsed){docElem.removeChild(body)}else{body.removeChild(div)}ret=eminpx=parseFloat(ret);return ret},eminpx,applyMedia=function(fromResize){var name="clientWidth",docElemProp=docElem[name],currWidth=doc.compatMode==="CSS1Compat"&&docElemProp||doc.body[name]||docElemProp,styleBlocks={},lastLink=links[links.length-1],now=(new Date).getTime();if(fromResize&&lastCall&&now-lastCall-1?eminpx||getEmValue():1)}if(!!max){max=parseFloat(max)*(max.indexOf(em)>-1?eminpx||getEmValue():1)}if(!thisstyle.hasquery||(!minnull||!maxnull)&&(minnull||currWidth>=min)&&(maxnull||currWidth<=max)){if(!styleBlocks[thisstyle.media]){styleBlocks[thisstyle.media]=[]}styleBlocks[thisstyle.media].push(rules[thisstyle.rules])}}}for(var j in appendedEls){if(appendedEls.hasOwnProperty(j)){if(appendedEls[j]&&appendedEls[j].parentNode===head){head.removeChild(appendedEls[j])}}}for(var k in styleBlocks){if(styleBlocks.hasOwnProperty(k)){var ss=doc.createElement("style"),css=styleBlocks[k].join("\n");ss.type="text/css";ss.media=k;head.insertBefore(ss,lastLink.nextSibling);if(ss.styleSheet){ss.styleSheet.cssText=css}else{ss.appendChild(doc.createTextNode(css))}appendedEls.push(ss)}}},ajax=function(url,callback){var req=xmlHttp();if(!req){return}req.open("GET",url,true);req.onreadystatechange=function(){if(req.readyState!==4||req.status!==200&&req.status!==304){return}callback(req.responseText)};if(req.readyState===4){return}req.send(null)},xmlHttp=function(){var xmlhttpmethod=false;try{xmlhttpmethod=new win.XMLHttpRequest}catch(e){xmlhttpmethod=new win.ActiveXObject("Microsoft.XMLHTTP")}return function(){return xmlhttpmethod}}();ripCSS();respond.update=ripCSS;function callMedia(){applyMedia(true)}if(win.addEventListener){win.addEventListener("resize",callMedia,false)}else if(win.attachEvent){win.attachEvent("onresize",callMedia)}}(this); -------------------------------------------------------------------------------- /v/0.8.4/templates/blank.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /v/0.8.4/templates/template.html: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Your Project 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 42 | 43 | 44 | 45 |
46 |
47 |

Your Project

48 | 52 |
53 |
54 | 55 | 56 |
57 |
58 | 59 |
60 | 63 |
64 |
65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /v/0.8.5/legacy.js: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | Support JS for legacy browsers. 4 | Includes: 5 | 6 | HTML5 Shiv 7 | @afarkas @jdalton @jon_neal @rem 8 | MIT/GPL2 Licensed 9 | https://github.com/aFarkas/html5shiv 10 | 11 | matchMedia() polyfill 12 | (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license 13 | 14 | Respond.js 15 | min/max-width media query polyfill 16 | (c) Scott Jehl. MIT/GPLv2 Lic. 17 | http://j.mp/respondjs 18 | 19 | */ 20 | !function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x";c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;!function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}}();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d #mq-test-1 { width: 42px; }';docElem.insertBefore(fakeBody,refNode);bool=div.offsetWidth===42;docElem.removeChild(fakeBody);return{matches:bool,media:q}}}(document);/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ 23 | !function(win){"use strict";var respond={};win.respond=respond;respond.update=function(){};respond.mediaQueriesSupported=win.matchMedia&&win.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var doc=win.document,docElem=doc.documentElement,mediastyles=[],rules=[],appendedEls=[],parsedSheets={},resizeThrottle=30,head=doc.getElementsByTagName("head")[0]||docElem,base=doc.getElementsByTagName("base")[0],links=head.getElementsByTagName("link"),requestQueue=[],ripCSS=function(){for(var i=0;i-1,minw:thisq.match(/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:thisq.match(/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}applyMedia()},lastCall,resizeDefer,getEmValue=function(){var ret,div=doc.createElement("div"),body=doc.body,fakeUsed=false;div.style.cssText="position:absolute;font-size:1em;width:1em";if(!body){body=fakeUsed=doc.createElement("body");body.style.background="none"}body.appendChild(div);docElem.insertBefore(body,docElem.firstChild);ret=div.offsetWidth;if(fakeUsed){docElem.removeChild(body)}else{body.removeChild(div)}ret=eminpx=parseFloat(ret);return ret},eminpx,applyMedia=function(fromResize){var name="clientWidth",docElemProp=docElem[name],currWidth=doc.compatMode==="CSS1Compat"&&docElemProp||doc.body[name]||docElemProp,styleBlocks={},lastLink=links[links.length-1],now=(new Date).getTime();if(fromResize&&lastCall&&now-lastCall-1?eminpx||getEmValue():1)}if(!!max){max=parseFloat(max)*(max.indexOf(em)>-1?eminpx||getEmValue():1)}if(!thisstyle.hasquery||(!minnull||!maxnull)&&(minnull||currWidth>=min)&&(maxnull||currWidth<=max)){if(!styleBlocks[thisstyle.media]){styleBlocks[thisstyle.media]=[]}styleBlocks[thisstyle.media].push(rules[thisstyle.rules])}}}for(var j in appendedEls){if(appendedEls.hasOwnProperty(j)){if(appendedEls[j]&&appendedEls[j].parentNode===head){head.removeChild(appendedEls[j])}}}for(var k in styleBlocks){if(styleBlocks.hasOwnProperty(k)){var ss=doc.createElement("style"),css=styleBlocks[k].join("\n");ss.type="text/css";ss.media=k;head.insertBefore(ss,lastLink.nextSibling);if(ss.styleSheet){ss.styleSheet.cssText=css}else{ss.appendChild(doc.createTextNode(css))}appendedEls.push(ss)}}},ajax=function(url,callback){var req=xmlHttp();if(!req){return}req.open("GET",url,true);req.onreadystatechange=function(){if(req.readyState!==4||req.status!==200&&req.status!==304){return}callback(req.responseText)};if(req.readyState===4){return}req.send(null)},xmlHttp=function(){var xmlhttpmethod=false;try{xmlhttpmethod=new win.XMLHttpRequest}catch(e){xmlhttpmethod=new win.ActiveXObject("Microsoft.XMLHTTP")}return function(){return xmlhttpmethod}}();ripCSS();respond.update=ripCSS;function callMedia(){applyMedia(true)}if(win.addEventListener){win.addEventListener("resize",callMedia,false)}else if(win.attachEvent){win.attachEvent("onresize",callMedia)}}(this); -------------------------------------------------------------------------------- /v/0.8.5/templates/blank.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /v/0.8.5/templates/template.html: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Your Project 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 42 | 43 | 44 | 45 |
46 |
47 |

Your Project

48 | 52 |
53 |
54 | 55 | 56 |
57 |
58 | 59 |
60 | 63 |
64 |
65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /v/0.8.5/theme-white/script.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | var $window = $(window); 3 | var $document = $(document); 4 | 5 | /* 6 | * Scrollspy. 7 | */ 8 | 9 | $document.on('flatdoc:ready', function() { 10 | $("h2, h3").scrollagent(function(cid, pid, currentElement, previousElement) { 11 | if (pid) { 12 | $("[href='#"+pid+"']").removeClass('active'); 13 | } 14 | if (cid) { 15 | $("[href='#"+cid+"']").addClass('active'); 16 | } 17 | }); 18 | }); 19 | 20 | /* 21 | * Anchor jump links. 22 | */ 23 | 24 | $document.on('flatdoc:ready', function() { 25 | $('.menu a').anchorjump(); 26 | }); 27 | 28 | /* 29 | * Title card. 30 | */ 31 | 32 | $(function() { 33 | var $card = $('.title-card'); 34 | if (!$card.length) return; 35 | 36 | var $header = $('.header'); 37 | var headerHeight = $header.length ? $header.outerHeight() : 0; 38 | 39 | $window 40 | .on('resize.title-card', function() { 41 | var windowWidth = $window.width(); 42 | 43 | if (windowWidth < 480) { 44 | $card.css('height', ''); 45 | } else { 46 | var height = $window.height(); 47 | $card.css('height', height - headerHeight); 48 | } 49 | }) 50 | .trigger('resize.title-card'); 51 | }); 52 | 53 | /* 54 | * Sidebar stick. 55 | */ 56 | 57 | $(function() { 58 | var $sidebar = $('.menubar'); 59 | var elTop; 60 | 61 | $window 62 | .on('resize.sidestick', function() { 63 | $sidebar.removeClass('fixed'); 64 | elTop = $sidebar.offset().top; 65 | $window.trigger('scroll.sidestick'); 66 | }) 67 | .on('scroll.sidestick', function() { 68 | var scrollY = $window.scrollTop(); 69 | $sidebar.toggleClass('fixed', (scrollY >= elTop)); 70 | }) 71 | .trigger('resize.sidestick'); 72 | }); 73 | 74 | })(jQuery); 75 | /*! jQuery.scrollagent (c) 2012, Rico Sta. Cruz. MIT License. 76 | * https://github.com/rstacruz/jquery-stuff/tree/master/scrollagent */ 77 | 78 | // Call $(...).scrollagent() with a callback function. 79 | // 80 | // The callback will be called everytime the focus changes. 81 | // 82 | // Example: 83 | // 84 | // $("h2").scrollagent(function(cid, pid, currentElement, previousElement) { 85 | // if (pid) { 86 | // $("[href='#"+pid+"']").removeClass('active'); 87 | // } 88 | // if (cid) { 89 | // $("[href='#"+cid+"']").addClass('active'); 90 | // } 91 | // }); 92 | 93 | (function($) { 94 | 95 | $.fn.scrollagent = function(options, callback) { 96 | // Account for $.scrollspy(function) 97 | if (typeof callback === 'undefined') { 98 | callback = options; 99 | options = {}; 100 | } 101 | 102 | var $sections = $(this); 103 | var $parent = options.parent || $(window); 104 | 105 | // Find the top offsets of each section 106 | var offsets = []; 107 | $sections.each(function(i) { 108 | var offset = $(this).attr('data-anchor-offset') ? 109 | parseInt($(this).attr('data-anchor-offset'), 10) : 110 | (options.offset || 0); 111 | 112 | offsets.push({ 113 | top: $(this).offset().top + offset, 114 | id: $(this).attr('id'), 115 | index: i, 116 | el: this 117 | }); 118 | }); 119 | 120 | // State 121 | var current = null; 122 | var height = null; 123 | var range = null; 124 | 125 | // Save the height. Do this only whenever the window is resized so we don't 126 | // recalculate often. 127 | $(window).on('resize', function() { 128 | height = $parent.height(); 129 | range = $(document).height(); 130 | }); 131 | 132 | // Find the current active section every scroll tick. 133 | $parent.on('scroll', function() { 134 | var y = $parent.scrollTop(); 135 | y += height * (0.3 + 0.7 * Math.pow(y/range, 2)); 136 | 137 | var latest = null; 138 | 139 | for (var i in offsets) { 140 | if (offsets.hasOwnProperty(i)) { 141 | var offset = offsets[i]; 142 | if (offset.top < y) latest = offset; 143 | } 144 | } 145 | 146 | if (latest && (!current || (latest.index !== current.index))) { 147 | callback.call($sections, 148 | latest ? latest.id : null, 149 | current ? current.id : null, 150 | latest ? latest.el : null, 151 | current ? current.el : null); 152 | current = latest; 153 | } 154 | }); 155 | 156 | $(window).trigger('resize'); 157 | $parent.trigger('scroll'); 158 | 159 | return this; 160 | }; 161 | 162 | })(jQuery); 163 | /*! Anchorjump (c) 2012, Rico Sta. Cruz. MIT License. 164 | * http://github.com/rstacruz/jquery-stuff/tree/master/anchorjump */ 165 | 166 | // Makes anchor jumps happen with smooth scrolling. 167 | // 168 | // $("#menu a").anchorjump(); 169 | // $("#menu a").anchorjump({ offset: -30 }); 170 | // 171 | // // Via delegate: 172 | // $("#menu").anchorjump({ for: 'a', offset: -30 }); 173 | // 174 | // You may specify a parent. This makes it scroll down to the parent. 175 | // Great for tabbed views. 176 | // 177 | // $('#menu a').anchorjump({ parent: '.anchor' }); 178 | // 179 | // You can jump to a given area. 180 | // 181 | // $.anchorjump('#bank-deposit', options); 182 | 183 | (function($) { 184 | var defaults = { 185 | 'speed': 500, 186 | 'offset': 0, 187 | 'for': null, 188 | 'parent': null 189 | }; 190 | 191 | $.fn.anchorjump = function(options) { 192 | options = $.extend({}, defaults, options); 193 | 194 | if (options['for']) { 195 | this.on('click', options['for'], onClick); 196 | } else { 197 | this.on('click', onClick); 198 | } 199 | 200 | function onClick(e) { 201 | var $a = $(e.target).closest('a'); 202 | if (e.ctrlKey || e.metaKey || e.altKey || $a.attr('target')) return; 203 | 204 | e.preventDefault(); 205 | var href = $a.attr('href'); 206 | 207 | $.anchorjump(href, options); 208 | } 209 | }; 210 | 211 | // Jump to a given area. 212 | $.anchorjump = function(href, options) { 213 | options = $.extend({}, defaults, options); 214 | 215 | var top = 0; 216 | 217 | if (href != '#') { 218 | var $area = $(href); 219 | // Find the parent 220 | if (options.parent) { 221 | var $parent = $area.closest(options.parent); 222 | if ($parent.length) { $area = $parent; } 223 | } 224 | if (!$area.length) { return; } 225 | 226 | // Determine the pixel offset; use the default if not available 227 | var offset = 228 | $area.attr('data-anchor-offset') ? 229 | parseInt($area.attr('data-anchor-offset'), 10) : 230 | options.offset; 231 | 232 | top = Math.max(0, $area.offset().top + offset); 233 | } 234 | 235 | $('html, body').animate({ scrollTop: top }, options.speed); 236 | $('body').trigger('anchor', href); 237 | 238 | // Add the location hash via pushState. 239 | if (window.history.pushState) { 240 | window.history.pushState({ href: href }, "", href); 241 | } 242 | }; 243 | })(jQuery); 244 | -------------------------------------------------------------------------------- /v/0.8.6/legacy.js: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | Support JS for legacy browsers. 4 | Includes: 5 | 6 | HTML5 Shiv 7 | @afarkas @jdalton @jon_neal @rem 8 | MIT/GPL2 Licensed 9 | https://github.com/aFarkas/html5shiv 10 | 11 | matchMedia() polyfill 12 | (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license 13 | 14 | Respond.js 15 | min/max-width media query polyfill 16 | (c) Scott Jehl. MIT/GPLv2 Lic. 17 | http://j.mp/respondjs 18 | 19 | */ 20 | !function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x";c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;!function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}}();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d #mq-test-1 { width: 42px; }';docElem.insertBefore(fakeBody,refNode);bool=div.offsetWidth===42;docElem.removeChild(fakeBody);return{matches:bool,media:q}}}(document);/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ 23 | !function(win){"use strict";var respond={};win.respond=respond;respond.update=function(){};respond.mediaQueriesSupported=win.matchMedia&&win.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var doc=win.document,docElem=doc.documentElement,mediastyles=[],rules=[],appendedEls=[],parsedSheets={},resizeThrottle=30,head=doc.getElementsByTagName("head")[0]||docElem,base=doc.getElementsByTagName("base")[0],links=head.getElementsByTagName("link"),requestQueue=[],ripCSS=function(){for(var i=0;i-1,minw:thisq.match(/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:thisq.match(/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}applyMedia()},lastCall,resizeDefer,getEmValue=function(){var ret,div=doc.createElement("div"),body=doc.body,fakeUsed=false;div.style.cssText="position:absolute;font-size:1em;width:1em";if(!body){body=fakeUsed=doc.createElement("body");body.style.background="none"}body.appendChild(div);docElem.insertBefore(body,docElem.firstChild);ret=div.offsetWidth;if(fakeUsed){docElem.removeChild(body)}else{body.removeChild(div)}ret=eminpx=parseFloat(ret);return ret},eminpx,applyMedia=function(fromResize){var name="clientWidth",docElemProp=docElem[name],currWidth=doc.compatMode==="CSS1Compat"&&docElemProp||doc.body[name]||docElemProp,styleBlocks={},lastLink=links[links.length-1],now=(new Date).getTime();if(fromResize&&lastCall&&now-lastCall-1?eminpx||getEmValue():1)}if(!!max){max=parseFloat(max)*(max.indexOf(em)>-1?eminpx||getEmValue():1)}if(!thisstyle.hasquery||(!minnull||!maxnull)&&(minnull||currWidth>=min)&&(maxnull||currWidth<=max)){if(!styleBlocks[thisstyle.media]){styleBlocks[thisstyle.media]=[]}styleBlocks[thisstyle.media].push(rules[thisstyle.rules])}}}for(var j in appendedEls){if(appendedEls.hasOwnProperty(j)){if(appendedEls[j]&&appendedEls[j].parentNode===head){head.removeChild(appendedEls[j])}}}for(var k in styleBlocks){if(styleBlocks.hasOwnProperty(k)){var ss=doc.createElement("style"),css=styleBlocks[k].join("\n");ss.type="text/css";ss.media=k;head.insertBefore(ss,lastLink.nextSibling);if(ss.styleSheet){ss.styleSheet.cssText=css}else{ss.appendChild(doc.createTextNode(css))}appendedEls.push(ss)}}},ajax=function(url,callback){var req=xmlHttp();if(!req){return}req.open("GET",url,true);req.onreadystatechange=function(){if(req.readyState!==4||req.status!==200&&req.status!==304){return}callback(req.responseText)};if(req.readyState===4){return}req.send(null)},xmlHttp=function(){var xmlhttpmethod=false;try{xmlhttpmethod=new win.XMLHttpRequest}catch(e){xmlhttpmethod=new win.ActiveXObject("Microsoft.XMLHTTP")}return function(){return xmlhttpmethod}}();ripCSS();respond.update=ripCSS;function callMedia(){applyMedia(true)}if(win.addEventListener){win.addEventListener("resize",callMedia,false)}else if(win.attachEvent){win.attachEvent("onresize",callMedia)}}(this); -------------------------------------------------------------------------------- /v/0.8.6/templates/blank.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /v/0.8.6/templates/template.html: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Your Project 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 42 | 43 | 44 | 45 |
46 |
47 |

Your Project

48 | 52 |
53 |
54 | 55 | 56 |
57 |
58 | 59 |
60 | 63 |
64 |
65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /v/0.8.6/theme-white/script.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | var $window = $(window); 3 | var $document = $(document); 4 | 5 | /* 6 | * Scrollspy. 7 | */ 8 | 9 | $document.on('flatdoc:ready', function() { 10 | $("h2, h3").scrollagent(function(cid, pid, currentElement, previousElement) { 11 | if (pid) { 12 | $("[href='#"+pid+"']").removeClass('active'); 13 | } 14 | if (cid) { 15 | $("[href='#"+cid+"']").addClass('active'); 16 | } 17 | }); 18 | }); 19 | 20 | /* 21 | * Anchor jump links. 22 | */ 23 | 24 | $document.on('flatdoc:ready', function() { 25 | $('.menu a').anchorjump(); 26 | }); 27 | 28 | /* 29 | * Title card. 30 | */ 31 | 32 | $(function() { 33 | var $card = $('.title-card'); 34 | if (!$card.length) return; 35 | 36 | var $header = $('.header'); 37 | var headerHeight = $header.length ? $header.outerHeight() : 0; 38 | 39 | $window 40 | .on('resize.title-card', function() { 41 | var windowWidth = $window.width(); 42 | 43 | if (windowWidth < 480) { 44 | $card.css('height', ''); 45 | } else { 46 | var height = $window.height(); 47 | $card.css('height', height - headerHeight); 48 | } 49 | }) 50 | .trigger('resize.title-card'); 51 | }); 52 | 53 | /* 54 | * Sidebar stick. 55 | */ 56 | 57 | $(function() { 58 | var $sidebar = $('.menubar'); 59 | var elTop; 60 | 61 | $window 62 | .on('resize.sidestick', function() { 63 | $sidebar.removeClass('fixed'); 64 | elTop = $sidebar.offset().top; 65 | $window.trigger('scroll.sidestick'); 66 | }) 67 | .on('scroll.sidestick', function() { 68 | var scrollY = $window.scrollTop(); 69 | $sidebar.toggleClass('fixed', (scrollY >= elTop)); 70 | }) 71 | .trigger('resize.sidestick'); 72 | }); 73 | 74 | })(jQuery); 75 | /*! jQuery.scrollagent (c) 2012, Rico Sta. Cruz. MIT License. 76 | * https://github.com/rstacruz/jquery-stuff/tree/master/scrollagent */ 77 | 78 | // Call $(...).scrollagent() with a callback function. 79 | // 80 | // The callback will be called everytime the focus changes. 81 | // 82 | // Example: 83 | // 84 | // $("h2").scrollagent(function(cid, pid, currentElement, previousElement) { 85 | // if (pid) { 86 | // $("[href='#"+pid+"']").removeClass('active'); 87 | // } 88 | // if (cid) { 89 | // $("[href='#"+cid+"']").addClass('active'); 90 | // } 91 | // }); 92 | 93 | (function($) { 94 | 95 | $.fn.scrollagent = function(options, callback) { 96 | // Account for $.scrollspy(function) 97 | if (typeof callback === 'undefined') { 98 | callback = options; 99 | options = {}; 100 | } 101 | 102 | var $sections = $(this); 103 | var $parent = options.parent || $(window); 104 | 105 | // Find the top offsets of each section 106 | var offsets = []; 107 | $sections.each(function(i) { 108 | var offset = $(this).attr('data-anchor-offset') ? 109 | parseInt($(this).attr('data-anchor-offset'), 10) : 110 | (options.offset || 0); 111 | 112 | offsets.push({ 113 | top: $(this).offset().top + offset, 114 | id: $(this).attr('id'), 115 | index: i, 116 | el: this 117 | }); 118 | }); 119 | 120 | // State 121 | var current = null; 122 | var height = null; 123 | var range = null; 124 | 125 | // Save the height. Do this only whenever the window is resized so we don't 126 | // recalculate often. 127 | $(window).on('resize', function() { 128 | height = $parent.height(); 129 | range = $(document).height(); 130 | }); 131 | 132 | // Find the current active section every scroll tick. 133 | $parent.on('scroll', function() { 134 | var y = $parent.scrollTop(); 135 | y += height * (0.3 + 0.7 * Math.pow(y/range, 2)); 136 | 137 | var latest = null; 138 | 139 | for (var i in offsets) { 140 | if (offsets.hasOwnProperty(i)) { 141 | var offset = offsets[i]; 142 | if (offset.top < y) latest = offset; 143 | } 144 | } 145 | 146 | if (latest && (!current || (latest.index !== current.index))) { 147 | callback.call($sections, 148 | latest ? latest.id : null, 149 | current ? current.id : null, 150 | latest ? latest.el : null, 151 | current ? current.el : null); 152 | current = latest; 153 | } 154 | }); 155 | 156 | $(window).trigger('resize'); 157 | $parent.trigger('scroll'); 158 | 159 | return this; 160 | }; 161 | 162 | })(jQuery); 163 | /*! Anchorjump (c) 2012, Rico Sta. Cruz. MIT License. 164 | * http://github.com/rstacruz/jquery-stuff/tree/master/anchorjump */ 165 | 166 | // Makes anchor jumps happen with smooth scrolling. 167 | // 168 | // $("#menu a").anchorjump(); 169 | // $("#menu a").anchorjump({ offset: -30 }); 170 | // 171 | // // Via delegate: 172 | // $("#menu").anchorjump({ for: 'a', offset: -30 }); 173 | // 174 | // You may specify a parent. This makes it scroll down to the parent. 175 | // Great for tabbed views. 176 | // 177 | // $('#menu a').anchorjump({ parent: '.anchor' }); 178 | // 179 | // You can jump to a given area. 180 | // 181 | // $.anchorjump('#bank-deposit', options); 182 | 183 | (function($) { 184 | var defaults = { 185 | 'speed': 500, 186 | 'offset': 0, 187 | 'for': null, 188 | 'parent': null 189 | }; 190 | 191 | $.fn.anchorjump = function(options) { 192 | options = $.extend({}, defaults, options); 193 | 194 | if (options['for']) { 195 | this.on('click', options['for'], onClick); 196 | } else { 197 | this.on('click', onClick); 198 | } 199 | 200 | function onClick(e) { 201 | var $a = $(e.target).closest('a'); 202 | if (e.ctrlKey || e.metaKey || e.altKey || $a.attr('target')) return; 203 | 204 | e.preventDefault(); 205 | var href = $a.attr('href'); 206 | 207 | $.anchorjump(href, options); 208 | } 209 | }; 210 | 211 | // Jump to a given area. 212 | $.anchorjump = function(href, options) { 213 | options = $.extend({}, defaults, options); 214 | 215 | var top = 0; 216 | 217 | if (href != '#') { 218 | var $area = $(href); 219 | // Find the parent 220 | if (options.parent) { 221 | var $parent = $area.closest(options.parent); 222 | if ($parent.length) { $area = $parent; } 223 | } 224 | if (!$area.length) { return; } 225 | 226 | // Determine the pixel offset; use the default if not available 227 | var offset = 228 | $area.attr('data-anchor-offset') ? 229 | parseInt($area.attr('data-anchor-offset'), 10) : 230 | options.offset; 231 | 232 | top = Math.max(0, $area.offset().top + offset); 233 | } 234 | 235 | $('html, body').animate({ scrollTop: top }, options.speed); 236 | $('body').trigger('anchor', href); 237 | 238 | // Add the location hash via pushState. 239 | if (window.history.pushState) { 240 | window.history.pushState({ href: href }, "", href); 241 | } 242 | }; 243 | })(jQuery); 244 | -------------------------------------------------------------------------------- /v/0.8/legacy.js: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | Support JS for legacy browsers. 4 | Includes: 5 | 6 | HTML5 Shiv 7 | @afarkas @jdalton @jon_neal @rem 8 | MIT/GPL2 Licensed 9 | https://github.com/aFarkas/html5shiv 10 | 11 | matchMedia() polyfill 12 | (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license 13 | 14 | Respond.js 15 | min/max-width media query polyfill 16 | (c) Scott Jehl. MIT/GPLv2 Lic. 17 | http://j.mp/respondjs 18 | 19 | */ 20 | !function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x";c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;!function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}}();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d #mq-test-1 { width: 42px; }';docElem.insertBefore(fakeBody,refNode);bool=div.offsetWidth===42;docElem.removeChild(fakeBody);return{matches:bool,media:q}}}(document);/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ 23 | !function(win){"use strict";var respond={};win.respond=respond;respond.update=function(){};respond.mediaQueriesSupported=win.matchMedia&&win.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var doc=win.document,docElem=doc.documentElement,mediastyles=[],rules=[],appendedEls=[],parsedSheets={},resizeThrottle=30,head=doc.getElementsByTagName("head")[0]||docElem,base=doc.getElementsByTagName("base")[0],links=head.getElementsByTagName("link"),requestQueue=[],ripCSS=function(){for(var i=0;i-1,minw:thisq.match(/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:thisq.match(/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}applyMedia()},lastCall,resizeDefer,getEmValue=function(){var ret,div=doc.createElement("div"),body=doc.body,fakeUsed=false;div.style.cssText="position:absolute;font-size:1em;width:1em";if(!body){body=fakeUsed=doc.createElement("body");body.style.background="none"}body.appendChild(div);docElem.insertBefore(body,docElem.firstChild);ret=div.offsetWidth;if(fakeUsed){docElem.removeChild(body)}else{body.removeChild(div)}ret=eminpx=parseFloat(ret);return ret},eminpx,applyMedia=function(fromResize){var name="clientWidth",docElemProp=docElem[name],currWidth=doc.compatMode==="CSS1Compat"&&docElemProp||doc.body[name]||docElemProp,styleBlocks={},lastLink=links[links.length-1],now=(new Date).getTime();if(fromResize&&lastCall&&now-lastCall-1?eminpx||getEmValue():1)}if(!!max){max=parseFloat(max)*(max.indexOf(em)>-1?eminpx||getEmValue():1)}if(!thisstyle.hasquery||(!minnull||!maxnull)&&(minnull||currWidth>=min)&&(maxnull||currWidth<=max)){if(!styleBlocks[thisstyle.media]){styleBlocks[thisstyle.media]=[]}styleBlocks[thisstyle.media].push(rules[thisstyle.rules])}}}for(var j in appendedEls){if(appendedEls.hasOwnProperty(j)){if(appendedEls[j]&&appendedEls[j].parentNode===head){head.removeChild(appendedEls[j])}}}for(var k in styleBlocks){if(styleBlocks.hasOwnProperty(k)){var ss=doc.createElement("style"),css=styleBlocks[k].join("\n");ss.type="text/css";ss.media=k;head.insertBefore(ss,lastLink.nextSibling);if(ss.styleSheet){ss.styleSheet.cssText=css}else{ss.appendChild(doc.createTextNode(css))}appendedEls.push(ss)}}},ajax=function(url,callback){var req=xmlHttp();if(!req){return}req.open("GET",url,true);req.onreadystatechange=function(){if(req.readyState!==4||req.status!==200&&req.status!==304){return}callback(req.responseText)};if(req.readyState===4){return}req.send(null)},xmlHttp=function(){var xmlhttpmethod=false;try{xmlhttpmethod=new win.XMLHttpRequest}catch(e){xmlhttpmethod=new win.ActiveXObject("Microsoft.XMLHTTP")}return function(){return xmlhttpmethod}}();ripCSS();respond.update=ripCSS;function callMedia(){applyMedia(true)}if(win.addEventListener){win.addEventListener("resize",callMedia,false)}else if(win.attachEvent){win.attachEvent("onresize",callMedia)}}(this); -------------------------------------------------------------------------------- /v/0.8/templates/blank.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /v/0.8/templates/template.html: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Your Project 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 42 | 43 | 44 | 45 |
46 |
47 |

Your Project

48 | 52 |
53 |
54 | 55 | 56 |
57 |
58 | 59 |
60 | 63 |
64 |
65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /v/0.8/templates/templates/blank.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /v/0.8/templates/templates/template.html: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Your Project 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 42 | 43 | 44 | 45 |
46 |
47 |

Your Project

48 | 52 |
53 |
54 | 55 | 56 |
57 |
58 | 59 |
60 | 63 |
64 |
65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /v/0.8/theme-white/script.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | var $window = $(window); 3 | var $document = $(document); 4 | 5 | /* 6 | * Scrollspy. 7 | */ 8 | 9 | $document.on('flatdoc:ready', function() { 10 | $("h2, h3").scrollagent(function(cid, pid, currentElement, previousElement) { 11 | if (pid) { 12 | $("[href='#"+pid+"']").removeClass('active'); 13 | } 14 | if (cid) { 15 | $("[href='#"+cid+"']").addClass('active'); 16 | } 17 | }); 18 | }); 19 | 20 | /* 21 | * Anchor jump links. 22 | */ 23 | 24 | $document.on('flatdoc:ready', function() { 25 | $('.menu a').anchorjump(); 26 | }); 27 | 28 | /* 29 | * Title card. 30 | */ 31 | 32 | $(function() { 33 | var $card = $('.title-card'); 34 | if (!$card.length) return; 35 | 36 | var $header = $('.header'); 37 | var headerHeight = $header.length ? $header.outerHeight() : 0; 38 | 39 | $window 40 | .on('resize.title-card', function() { 41 | var windowWidth = $window.width(); 42 | 43 | if (windowWidth < 480) { 44 | $card.css('height', ''); 45 | } else { 46 | var height = $window.height(); 47 | $card.css('height', height - headerHeight); 48 | } 49 | }) 50 | .trigger('resize.title-card'); 51 | }); 52 | 53 | /* 54 | * Sidebar stick. 55 | */ 56 | 57 | $(function() { 58 | var $sidebar = $('.menubar'); 59 | var elTop; 60 | 61 | $window 62 | .on('resize.sidestick', function() { 63 | $sidebar.removeClass('fixed'); 64 | elTop = $sidebar.offset().top; 65 | $window.trigger('scroll.sidestick'); 66 | }) 67 | .on('scroll.sidestick', function() { 68 | var scrollY = $window.scrollTop(); 69 | $sidebar.toggleClass('fixed', (scrollY >= elTop)); 70 | }) 71 | .trigger('resize.sidestick'); 72 | }); 73 | 74 | })(jQuery); 75 | /*! jQuery.scrollagent (c) 2012, Rico Sta. Cruz. MIT License. 76 | * https://github.com/rstacruz/jquery-stuff/tree/master/scrollagent */ 77 | 78 | // Call $(...).scrollagent() with a callback function. 79 | // 80 | // The callback will be called everytime the focus changes. 81 | // 82 | // Example: 83 | // 84 | // $("h2").scrollagent(function(cid, pid, currentElement, previousElement) { 85 | // if (pid) { 86 | // $("[href='#"+pid+"']").removeClass('active'); 87 | // } 88 | // if (cid) { 89 | // $("[href='#"+cid+"']").addClass('active'); 90 | // } 91 | // }); 92 | 93 | (function($) { 94 | 95 | $.fn.scrollagent = function(options, callback) { 96 | // Account for $.scrollspy(function) 97 | if (typeof callback === 'undefined') { 98 | callback = options; 99 | options = {}; 100 | } 101 | 102 | var $sections = $(this); 103 | var $parent = options.parent || $(window); 104 | 105 | // Find the top offsets of each section 106 | var offsets = []; 107 | $sections.each(function(i) { 108 | var offset = $(this).attr('data-anchor-offset') ? 109 | parseInt($(this).attr('data-anchor-offset'), 10) : 110 | (options.offset || 0); 111 | 112 | offsets.push({ 113 | top: $(this).offset().top + offset, 114 | id: $(this).attr('id'), 115 | index: i, 116 | el: this 117 | }); 118 | }); 119 | 120 | // State 121 | var current = null; 122 | var height = null; 123 | var range = null; 124 | 125 | // Save the height. Do this only whenever the window is resized so we don't 126 | // recalculate often. 127 | $(window).on('resize', function() { 128 | height = $parent.height(); 129 | range = $(document).height(); 130 | }); 131 | 132 | // Find the current active section every scroll tick. 133 | $parent.on('scroll', function() { 134 | var y = $parent.scrollTop(); 135 | y += height * (0.3 + 0.7 * Math.pow(y/range, 2)); 136 | 137 | var latest = null; 138 | 139 | for (var i in offsets) { 140 | if (offsets.hasOwnProperty(i)) { 141 | var offset = offsets[i]; 142 | if (offset.top < y) latest = offset; 143 | } 144 | } 145 | 146 | if (latest && (!current || (latest.index !== current.index))) { 147 | callback.call($sections, 148 | latest ? latest.id : null, 149 | current ? current.id : null, 150 | latest ? latest.el : null, 151 | current ? current.el : null); 152 | current = latest; 153 | } 154 | }); 155 | 156 | $(window).trigger('resize'); 157 | $parent.trigger('scroll'); 158 | 159 | return this; 160 | }; 161 | 162 | })(jQuery); 163 | /*! Anchorjump (c) 2012, Rico Sta. Cruz. MIT License. 164 | * http://github.com/rstacruz/jquery-stuff/tree/master/anchorjump */ 165 | 166 | // Makes anchor jumps happen with smooth scrolling. 167 | // 168 | // $("#menu a").anchorjump(); 169 | // $("#menu a").anchorjump({ offset: -30 }); 170 | // 171 | // // Via delegate: 172 | // $("#menu").anchorjump({ for: 'a', offset: -30 }); 173 | // 174 | // You may specify a parent. This makes it scroll down to the parent. 175 | // Great for tabbed views. 176 | // 177 | // $('#menu a').anchorjump({ parent: '.anchor' }); 178 | // 179 | // You can jump to a given area. 180 | // 181 | // $.anchorjump('#bank-deposit', options); 182 | 183 | (function($) { 184 | var defaults = { 185 | 'speed': 500, 186 | 'offset': 0, 187 | 'for': null, 188 | 'parent': null 189 | }; 190 | 191 | $.fn.anchorjump = function(options) { 192 | options = $.extend({}, defaults, options); 193 | 194 | if (options['for']) { 195 | this.on('click', options['for'], onClick); 196 | } else { 197 | this.on('click', onClick); 198 | } 199 | 200 | function onClick(e) { 201 | var $a = $(e.target).closest('a'); 202 | if (e.ctrlKey || e.metaKey || e.altKey || $a.attr('target')) return; 203 | 204 | e.preventDefault(); 205 | var href = $a.attr('href'); 206 | 207 | $.anchorjump(href, options); 208 | } 209 | }; 210 | 211 | // Jump to a given area. 212 | $.anchorjump = function(href, options) { 213 | options = $.extend({}, defaults, options); 214 | 215 | var top = 0; 216 | 217 | if (href != '#') { 218 | var $area = $(href); 219 | // Find the parent 220 | if (options.parent) { 221 | var $parent = $area.closest(options.parent); 222 | if ($parent.length) { $area = $parent; } 223 | } 224 | if (!$area.length) { return; } 225 | 226 | // Determine the pixel offset; use the default if not available 227 | var offset = 228 | $area.attr('data-anchor-offset') ? 229 | parseInt($area.attr('data-anchor-offset'), 10) : 230 | options.offset; 231 | 232 | top = Math.max(0, $area.offset().top + offset); 233 | } 234 | 235 | $('html, body').animate({ scrollTop: top }, options.speed); 236 | $('body').trigger('anchor', href); 237 | 238 | // Add the location hash via pushState. 239 | if (window.history.pushState) { 240 | window.history.pushState({ href: href }, "", href); 241 | } 242 | }; 243 | })(jQuery); 244 | -------------------------------------------------------------------------------- /v/0.9.0/legacy.js: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | Support JS for legacy browsers. 4 | Includes: 5 | 6 | HTML5 Shiv 7 | @afarkas @jdalton @jon_neal @rem 8 | MIT/GPL2 Licensed 9 | https://github.com/aFarkas/html5shiv 10 | 11 | matchMedia() polyfill 12 | (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license 13 | 14 | Respond.js 15 | min/max-width media query polyfill 16 | (c) Scott Jehl. MIT/GPLv2 Lic. 17 | http://j.mp/respondjs 18 | 19 | */ 20 | !function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x";c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;!function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}}();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d #mq-test-1 { width: 42px; }';docElem.insertBefore(fakeBody,refNode);bool=div.offsetWidth===42;docElem.removeChild(fakeBody);return{matches:bool,media:q}}}(document);/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ 23 | !function(win){"use strict";var respond={};win.respond=respond;respond.update=function(){};respond.mediaQueriesSupported=win.matchMedia&&win.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var doc=win.document,docElem=doc.documentElement,mediastyles=[],rules=[],appendedEls=[],parsedSheets={},resizeThrottle=30,head=doc.getElementsByTagName("head")[0]||docElem,base=doc.getElementsByTagName("base")[0],links=head.getElementsByTagName("link"),requestQueue=[],ripCSS=function(){for(var i=0;i-1,minw:thisq.match(/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:thisq.match(/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}applyMedia()},lastCall,resizeDefer,getEmValue=function(){var ret,div=doc.createElement("div"),body=doc.body,fakeUsed=false;div.style.cssText="position:absolute;font-size:1em;width:1em";if(!body){body=fakeUsed=doc.createElement("body");body.style.background="none"}body.appendChild(div);docElem.insertBefore(body,docElem.firstChild);ret=div.offsetWidth;if(fakeUsed){docElem.removeChild(body)}else{body.removeChild(div)}ret=eminpx=parseFloat(ret);return ret},eminpx,applyMedia=function(fromResize){var name="clientWidth",docElemProp=docElem[name],currWidth=doc.compatMode==="CSS1Compat"&&docElemProp||doc.body[name]||docElemProp,styleBlocks={},lastLink=links[links.length-1],now=(new Date).getTime();if(fromResize&&lastCall&&now-lastCall-1?eminpx||getEmValue():1)}if(!!max){max=parseFloat(max)*(max.indexOf(em)>-1?eminpx||getEmValue():1)}if(!thisstyle.hasquery||(!minnull||!maxnull)&&(minnull||currWidth>=min)&&(maxnull||currWidth<=max)){if(!styleBlocks[thisstyle.media]){styleBlocks[thisstyle.media]=[]}styleBlocks[thisstyle.media].push(rules[thisstyle.rules])}}}for(var j in appendedEls){if(appendedEls.hasOwnProperty(j)){if(appendedEls[j]&&appendedEls[j].parentNode===head){head.removeChild(appendedEls[j])}}}for(var k in styleBlocks){if(styleBlocks.hasOwnProperty(k)){var ss=doc.createElement("style"),css=styleBlocks[k].join("\n");ss.type="text/css";ss.media=k;head.insertBefore(ss,lastLink.nextSibling);if(ss.styleSheet){ss.styleSheet.cssText=css}else{ss.appendChild(doc.createTextNode(css))}appendedEls.push(ss)}}},ajax=function(url,callback){var req=xmlHttp();if(!req){return}req.open("GET",url,true);req.onreadystatechange=function(){if(req.readyState!==4||req.status!==200&&req.status!==304){return}callback(req.responseText)};if(req.readyState===4){return}req.send(null)},xmlHttp=function(){var xmlhttpmethod=false;try{xmlhttpmethod=new win.XMLHttpRequest}catch(e){xmlhttpmethod=new win.ActiveXObject("Microsoft.XMLHTTP")}return function(){return xmlhttpmethod}}();ripCSS();respond.update=ripCSS;function callMedia(){applyMedia(true)}if(win.addEventListener){win.addEventListener("resize",callMedia,false)}else if(win.attachEvent){win.attachEvent("onresize",callMedia)}}(this); -------------------------------------------------------------------------------- /v/0.9.0/templates/blank.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /v/0.9.0/templates/template.html: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Your Project 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 42 | 43 | 44 | 45 |
46 |
47 |

Your Project

48 | 52 |
53 |
54 | 55 | 56 |
57 |
58 | 59 |
60 | 63 |
64 |
65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /v/0.9.0/theme-white/script.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | var $window = $(window); 3 | var $document = $(document); 4 | 5 | /* 6 | * Scrollspy. 7 | */ 8 | 9 | $document.on('flatdoc:ready', function() { 10 | $("h2, h3").scrollagent(function(cid, pid, currentElement, previousElement) { 11 | if (pid) { 12 | $("[href='#"+pid+"']").removeClass('active'); 13 | } 14 | if (cid) { 15 | $("[href='#"+cid+"']").addClass('active'); 16 | } 17 | }); 18 | }); 19 | 20 | /* 21 | * Anchor jump links. 22 | */ 23 | 24 | $document.on('flatdoc:ready', function() { 25 | $('.menu a').anchorjump(); 26 | }); 27 | 28 | /* 29 | * Title card. 30 | */ 31 | 32 | $(function() { 33 | var $card = $('.title-card'); 34 | if (!$card.length) return; 35 | 36 | var $header = $('.header'); 37 | var headerHeight = $header.length ? $header.outerHeight() : 0; 38 | 39 | $window 40 | .on('resize.title-card', function() { 41 | var windowWidth = $window.width(); 42 | 43 | if (windowWidth < 480) { 44 | $card.css('height', ''); 45 | } else { 46 | var height = $window.height(); 47 | $card.css('height', height - headerHeight); 48 | } 49 | }) 50 | .trigger('resize.title-card'); 51 | }); 52 | 53 | /* 54 | * Sidebar stick. 55 | */ 56 | 57 | $(function() { 58 | var $sidebar = $('.menubar'); 59 | var elTop; 60 | 61 | $window 62 | .on('resize.sidestick', function() { 63 | $sidebar.removeClass('fixed'); 64 | elTop = $sidebar.offset().top; 65 | $window.trigger('scroll.sidestick'); 66 | }) 67 | .on('scroll.sidestick', function() { 68 | var scrollY = $window.scrollTop(); 69 | $sidebar.toggleClass('fixed', (scrollY >= elTop)); 70 | }) 71 | .trigger('resize.sidestick'); 72 | }); 73 | 74 | })(jQuery); 75 | /*! jQuery.scrollagent (c) 2012, Rico Sta. Cruz. MIT License. 76 | * https://github.com/rstacruz/jquery-stuff/tree/master/scrollagent */ 77 | 78 | // Call $(...).scrollagent() with a callback function. 79 | // 80 | // The callback will be called everytime the focus changes. 81 | // 82 | // Example: 83 | // 84 | // $("h2").scrollagent(function(cid, pid, currentElement, previousElement) { 85 | // if (pid) { 86 | // $("[href='#"+pid+"']").removeClass('active'); 87 | // } 88 | // if (cid) { 89 | // $("[href='#"+cid+"']").addClass('active'); 90 | // } 91 | // }); 92 | 93 | (function($) { 94 | 95 | $.fn.scrollagent = function(options, callback) { 96 | // Account for $.scrollspy(function) 97 | if (typeof callback === 'undefined') { 98 | callback = options; 99 | options = {}; 100 | } 101 | 102 | var $sections = $(this); 103 | var $parent = options.parent || $(window); 104 | 105 | // Find the top offsets of each section 106 | var offsets = []; 107 | $sections.each(function(i) { 108 | var offset = $(this).attr('data-anchor-offset') ? 109 | parseInt($(this).attr('data-anchor-offset'), 10) : 110 | (options.offset || 0); 111 | 112 | offsets.push({ 113 | id: $(this).attr('id'), 114 | index: i, 115 | el: this, 116 | offset: offset 117 | }); 118 | }); 119 | 120 | // State 121 | var current = null; 122 | var height = null; 123 | var range = null; 124 | 125 | // Save the height. Do this only whenever the window is resized so we don't 126 | // recalculate often. 127 | $(window).on('resize', function() { 128 | height = $parent.height(); 129 | range = $(document).height(); 130 | }); 131 | 132 | // Find the current active section every scroll tick. 133 | $parent.on('scroll', function() { 134 | var y = $parent.scrollTop(); 135 | y += height * (0.3 + 0.7 * Math.pow(y/range, 2)); 136 | 137 | var latest = null; 138 | 139 | for (var i in offsets) { 140 | if (offsets.hasOwnProperty(i)) { 141 | var offset = offsets[i]; 142 | if ($(offset.el).offset().top + offset.offset < y) latest = offset; 143 | } 144 | } 145 | 146 | if (latest && (!current || (latest.index !== current.index))) { 147 | callback.call($sections, 148 | latest ? latest.id : null, 149 | current ? current.id : null, 150 | latest ? latest.el : null, 151 | current ? current.el : null); 152 | current = latest; 153 | } 154 | }); 155 | 156 | $(window).trigger('resize'); 157 | $parent.trigger('scroll'); 158 | 159 | return this; 160 | }; 161 | 162 | })(jQuery); 163 | /*! Anchorjump (c) 2012, Rico Sta. Cruz. MIT License. 164 | * http://github.com/rstacruz/jquery-stuff/tree/master/anchorjump */ 165 | 166 | // Makes anchor jumps happen with smooth scrolling. 167 | // 168 | // $("#menu a").anchorjump(); 169 | // $("#menu a").anchorjump({ offset: -30 }); 170 | // 171 | // // Via delegate: 172 | // $("#menu").anchorjump({ for: 'a', offset: -30 }); 173 | // 174 | // You may specify a parent. This makes it scroll down to the parent. 175 | // Great for tabbed views. 176 | // 177 | // $('#menu a').anchorjump({ parent: '.anchor' }); 178 | // 179 | // You can jump to a given area. 180 | // 181 | // $.anchorjump('#bank-deposit', options); 182 | 183 | (function($) { 184 | var defaults = { 185 | 'speed': 500, 186 | 'offset': 0, 187 | 'for': null, 188 | 'parent': null 189 | }; 190 | 191 | $.fn.anchorjump = function(options) { 192 | options = $.extend({}, defaults, options); 193 | 194 | if (options['for']) { 195 | this.on('click', options['for'], onClick); 196 | } else { 197 | this.on('click', onClick); 198 | } 199 | 200 | function onClick(e) { 201 | var $a = $(e.target).closest('a'); 202 | if (e.ctrlKey || e.metaKey || e.altKey || $a.attr('target')) return; 203 | 204 | e.preventDefault(); 205 | var href = $a.attr('href'); 206 | 207 | $.anchorjump(href, options); 208 | } 209 | }; 210 | 211 | // Jump to a given area. 212 | $.anchorjump = function(href, options) { 213 | options = $.extend({}, defaults, options); 214 | 215 | var top = 0; 216 | 217 | if (href != '#') { 218 | var $area = $(href); 219 | // Find the parent 220 | if (options.parent) { 221 | var $parent = $area.closest(options.parent); 222 | if ($parent.length) { $area = $parent; } 223 | } 224 | if (!$area.length) { return; } 225 | 226 | // Determine the pixel offset; use the default if not available 227 | var offset = 228 | $area.attr('data-anchor-offset') ? 229 | parseInt($area.attr('data-anchor-offset'), 10) : 230 | options.offset; 231 | 232 | top = Math.max(0, $area.offset().top + offset); 233 | } 234 | 235 | $('html, body').animate({ scrollTop: top }, options.speed); 236 | $('body').trigger('anchor', href); 237 | 238 | // Add the location hash via pushState. 239 | if (window.history.pushState) { 240 | window.history.pushState({ href: href }, "", href); 241 | } 242 | }; 243 | })(jQuery); 244 | -------------------------------------------------------------------------------- /v/0.9/legacy.js: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | Support JS for legacy browsers. 4 | Includes: 5 | 6 | HTML5 Shiv 7 | @afarkas @jdalton @jon_neal @rem 8 | MIT/GPL2 Licensed 9 | https://github.com/aFarkas/html5shiv 10 | 11 | matchMedia() polyfill 12 | (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license 13 | 14 | Respond.js 15 | min/max-width media query polyfill 16 | (c) Scott Jehl. MIT/GPLv2 Lic. 17 | http://j.mp/respondjs 18 | 19 | */ 20 | !function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x";c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;!function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}}();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d #mq-test-1 { width: 42px; }';docElem.insertBefore(fakeBody,refNode);bool=div.offsetWidth===42;docElem.removeChild(fakeBody);return{matches:bool,media:q}}}(document);/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ 23 | !function(win){"use strict";var respond={};win.respond=respond;respond.update=function(){};respond.mediaQueriesSupported=win.matchMedia&&win.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var doc=win.document,docElem=doc.documentElement,mediastyles=[],rules=[],appendedEls=[],parsedSheets={},resizeThrottle=30,head=doc.getElementsByTagName("head")[0]||docElem,base=doc.getElementsByTagName("base")[0],links=head.getElementsByTagName("link"),requestQueue=[],ripCSS=function(){for(var i=0;i-1,minw:thisq.match(/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:thisq.match(/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}applyMedia()},lastCall,resizeDefer,getEmValue=function(){var ret,div=doc.createElement("div"),body=doc.body,fakeUsed=false;div.style.cssText="position:absolute;font-size:1em;width:1em";if(!body){body=fakeUsed=doc.createElement("body");body.style.background="none"}body.appendChild(div);docElem.insertBefore(body,docElem.firstChild);ret=div.offsetWidth;if(fakeUsed){docElem.removeChild(body)}else{body.removeChild(div)}ret=eminpx=parseFloat(ret);return ret},eminpx,applyMedia=function(fromResize){var name="clientWidth",docElemProp=docElem[name],currWidth=doc.compatMode==="CSS1Compat"&&docElemProp||doc.body[name]||docElemProp,styleBlocks={},lastLink=links[links.length-1],now=(new Date).getTime();if(fromResize&&lastCall&&now-lastCall-1?eminpx||getEmValue():1)}if(!!max){max=parseFloat(max)*(max.indexOf(em)>-1?eminpx||getEmValue():1)}if(!thisstyle.hasquery||(!minnull||!maxnull)&&(minnull||currWidth>=min)&&(maxnull||currWidth<=max)){if(!styleBlocks[thisstyle.media]){styleBlocks[thisstyle.media]=[]}styleBlocks[thisstyle.media].push(rules[thisstyle.rules])}}}for(var j in appendedEls){if(appendedEls.hasOwnProperty(j)){if(appendedEls[j]&&appendedEls[j].parentNode===head){head.removeChild(appendedEls[j])}}}for(var k in styleBlocks){if(styleBlocks.hasOwnProperty(k)){var ss=doc.createElement("style"),css=styleBlocks[k].join("\n");ss.type="text/css";ss.media=k;head.insertBefore(ss,lastLink.nextSibling);if(ss.styleSheet){ss.styleSheet.cssText=css}else{ss.appendChild(doc.createTextNode(css))}appendedEls.push(ss)}}},ajax=function(url,callback){var req=xmlHttp();if(!req){return}req.open("GET",url,true);req.onreadystatechange=function(){if(req.readyState!==4||req.status!==200&&req.status!==304){return}callback(req.responseText)};if(req.readyState===4){return}req.send(null)},xmlHttp=function(){var xmlhttpmethod=false;try{xmlhttpmethod=new win.XMLHttpRequest}catch(e){xmlhttpmethod=new win.ActiveXObject("Microsoft.XMLHTTP")}return function(){return xmlhttpmethod}}();ripCSS();respond.update=ripCSS;function callMedia(){applyMedia(true)}if(win.addEventListener){win.addEventListener("resize",callMedia,false)}else if(win.attachEvent){win.attachEvent("onresize",callMedia)}}(this); -------------------------------------------------------------------------------- /v/0.9/templates/blank.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /v/0.9/templates/template.html: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Your Project 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 42 | 43 | 44 | 45 |
46 |
47 |

Your Project

48 | 52 |
53 |
54 | 55 | 56 |
57 |
58 | 59 |
60 | 63 |
64 |
65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /v/0.9/theme-white/script.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | var $window = $(window); 3 | var $document = $(document); 4 | 5 | /* 6 | * Scrollspy. 7 | */ 8 | 9 | $document.on('flatdoc:ready', function() { 10 | $("h2, h3").scrollagent(function(cid, pid, currentElement, previousElement) { 11 | if (pid) { 12 | $("[href='#"+pid+"']").removeClass('active'); 13 | } 14 | if (cid) { 15 | $("[href='#"+cid+"']").addClass('active'); 16 | } 17 | }); 18 | }); 19 | 20 | /* 21 | * Anchor jump links. 22 | */ 23 | 24 | $document.on('flatdoc:ready', function() { 25 | $('.menu a').anchorjump(); 26 | }); 27 | 28 | /* 29 | * Title card. 30 | */ 31 | 32 | $(function() { 33 | var $card = $('.title-card'); 34 | if (!$card.length) return; 35 | 36 | var $header = $('.header'); 37 | var headerHeight = $header.length ? $header.outerHeight() : 0; 38 | 39 | $window 40 | .on('resize.title-card', function() { 41 | var windowWidth = $window.width(); 42 | 43 | if (windowWidth < 480) { 44 | $card.css('height', ''); 45 | } else { 46 | var height = $window.height(); 47 | $card.css('height', height - headerHeight); 48 | } 49 | }) 50 | .trigger('resize.title-card'); 51 | }); 52 | 53 | /* 54 | * Sidebar stick. 55 | */ 56 | 57 | $(function() { 58 | var $sidebar = $('.menubar'); 59 | var elTop; 60 | 61 | $window 62 | .on('resize.sidestick', function() { 63 | $sidebar.removeClass('fixed'); 64 | elTop = $sidebar.offset().top; 65 | $window.trigger('scroll.sidestick'); 66 | }) 67 | .on('scroll.sidestick', function() { 68 | var scrollY = $window.scrollTop(); 69 | $sidebar.toggleClass('fixed', (scrollY >= elTop)); 70 | }) 71 | .trigger('resize.sidestick'); 72 | }); 73 | 74 | })(jQuery); 75 | /*! jQuery.scrollagent (c) 2012, Rico Sta. Cruz. MIT License. 76 | * https://github.com/rstacruz/jquery-stuff/tree/master/scrollagent */ 77 | 78 | // Call $(...).scrollagent() with a callback function. 79 | // 80 | // The callback will be called everytime the focus changes. 81 | // 82 | // Example: 83 | // 84 | // $("h2").scrollagent(function(cid, pid, currentElement, previousElement) { 85 | // if (pid) { 86 | // $("[href='#"+pid+"']").removeClass('active'); 87 | // } 88 | // if (cid) { 89 | // $("[href='#"+cid+"']").addClass('active'); 90 | // } 91 | // }); 92 | 93 | (function($) { 94 | 95 | $.fn.scrollagent = function(options, callback) { 96 | // Account for $.scrollspy(function) 97 | if (typeof callback === 'undefined') { 98 | callback = options; 99 | options = {}; 100 | } 101 | 102 | var $sections = $(this); 103 | var $parent = options.parent || $(window); 104 | 105 | // Find the top offsets of each section 106 | var offsets = []; 107 | $sections.each(function(i) { 108 | var offset = $(this).attr('data-anchor-offset') ? 109 | parseInt($(this).attr('data-anchor-offset'), 10) : 110 | (options.offset || 0); 111 | 112 | offsets.push({ 113 | id: $(this).attr('id'), 114 | index: i, 115 | el: this, 116 | offset: offset 117 | }); 118 | }); 119 | 120 | // State 121 | var current = null; 122 | var height = null; 123 | var range = null; 124 | 125 | // Save the height. Do this only whenever the window is resized so we don't 126 | // recalculate often. 127 | $(window).on('resize', function() { 128 | height = $parent.height(); 129 | range = $(document).height(); 130 | }); 131 | 132 | // Find the current active section every scroll tick. 133 | $parent.on('scroll', function() { 134 | var y = $parent.scrollTop(); 135 | y += height * (0.3 + 0.7 * Math.pow(y/range, 2)); 136 | 137 | var latest = null; 138 | 139 | for (var i in offsets) { 140 | if (offsets.hasOwnProperty(i)) { 141 | var offset = offsets[i]; 142 | if ($(offset.el).offset().top + offset.offset < y) latest = offset; 143 | } 144 | } 145 | 146 | if (latest && (!current || (latest.index !== current.index))) { 147 | callback.call($sections, 148 | latest ? latest.id : null, 149 | current ? current.id : null, 150 | latest ? latest.el : null, 151 | current ? current.el : null); 152 | current = latest; 153 | } 154 | }); 155 | 156 | $(window).trigger('resize'); 157 | $parent.trigger('scroll'); 158 | 159 | return this; 160 | }; 161 | 162 | })(jQuery); 163 | /*! Anchorjump (c) 2012, Rico Sta. Cruz. MIT License. 164 | * http://github.com/rstacruz/jquery-stuff/tree/master/anchorjump */ 165 | 166 | // Makes anchor jumps happen with smooth scrolling. 167 | // 168 | // $("#menu a").anchorjump(); 169 | // $("#menu a").anchorjump({ offset: -30 }); 170 | // 171 | // // Via delegate: 172 | // $("#menu").anchorjump({ for: 'a', offset: -30 }); 173 | // 174 | // You may specify a parent. This makes it scroll down to the parent. 175 | // Great for tabbed views. 176 | // 177 | // $('#menu a').anchorjump({ parent: '.anchor' }); 178 | // 179 | // You can jump to a given area. 180 | // 181 | // $.anchorjump('#bank-deposit', options); 182 | 183 | (function($) { 184 | var defaults = { 185 | 'speed': 500, 186 | 'offset': 0, 187 | 'for': null, 188 | 'parent': null 189 | }; 190 | 191 | $.fn.anchorjump = function(options) { 192 | options = $.extend({}, defaults, options); 193 | 194 | if (options['for']) { 195 | this.on('click', options['for'], onClick); 196 | } else { 197 | this.on('click', onClick); 198 | } 199 | 200 | function onClick(e) { 201 | var $a = $(e.target).closest('a'); 202 | if (e.ctrlKey || e.metaKey || e.altKey || $a.attr('target')) return; 203 | 204 | e.preventDefault(); 205 | var href = $a.attr('href'); 206 | 207 | $.anchorjump(href, options); 208 | } 209 | }; 210 | 211 | // Jump to a given area. 212 | $.anchorjump = function(href, options) { 213 | options = $.extend({}, defaults, options); 214 | 215 | var top = 0; 216 | 217 | if (href != '#') { 218 | var $area = $(href); 219 | // Find the parent 220 | if (options.parent) { 221 | var $parent = $area.closest(options.parent); 222 | if ($parent.length) { $area = $parent; } 223 | } 224 | if (!$area.length) { return; } 225 | 226 | // Determine the pixel offset; use the default if not available 227 | var offset = 228 | $area.attr('data-anchor-offset') ? 229 | parseInt($area.attr('data-anchor-offset'), 10) : 230 | options.offset; 231 | 232 | top = Math.max(0, $area.offset().top + offset); 233 | } 234 | 235 | $('html, body').animate({ scrollTop: top }, options.speed); 236 | $('body').trigger('anchor', href); 237 | 238 | // Add the location hash via pushState. 239 | if (window.history.pushState) { 240 | window.history.pushState({ href: href }, "", href); 241 | } 242 | }; 243 | })(jQuery); 244 | --------------------------------------------------------------------------------