jekyll-theme-mozg 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.md +21 -0
- data/README.md +104 -0
- data/_includes/mode_switcher.html +5 -0
- data/_includes/post_list.html +51 -0
- data/_includes/post_list_item.html +26 -0
- data/_includes/site-categories.html +7 -0
- data/_includes/site-tags.html +7 -0
- data/_includes/snippet-disqus.html +25 -0
- data/_includes/snippet-facebook-like-button.html +8 -0
- data/_includes/snippet-facebook-page-plugin.html +15 -0
- data/_includes/snippet-facebook-send-button.html +5 -0
- data/_includes/snippet-facebook-setup-SDK.html +9 -0
- data/_includes/snippet-github.html +1 -0
- data/_includes/snippet-google-ads.html +9 -0
- data/_includes/snippet-google-analytics.html +12 -0
- data/_includes/snippet-google-custom-search.html +15 -0
- data/_includes/snippet-google-hangout-button.html +7 -0
- data/_includes/snippet-google-map.html +1 -0
- data/_includes/snippet-google-plus-button.html +7 -0
- data/_includes/snippet-google-setup-SDK.html +6 -0
- data/_includes/snippet-google-tag-manager.html +24 -0
- data/_includes/snippet-jekyll-search.html +17 -0
- data/_includes/snippet-linkedin-share.html +5 -0
- data/_includes/snippet-pagseguro-button-comprar.html +7 -0
- data/_includes/snippet-pagseguro-button-doar.html +8 -0
- data/_includes/snippet-post-date.html +19 -0
- data/_includes/snippet-sidebar-menu.html +75 -0
- data/_includes/snippet-social-plugins.html +27 -0
- data/_includes/snippet-top-menu-1.html +56 -0
- data/_includes/snippet-top-menu-2.html +27 -0
- data/_includes/snippet-twitter-follow-button.html +2 -0
- data/_includes/snippet-twitter-setup-SDK.html +20 -0
- data/_includes/snippet-twitter-tweet-button.html +2 -0
- data/_includes/snippet-twitter.html +19 -0
- data/_includes/tags_footer.html +19 -0
- data/_includes/tags_head.html +53 -0
- data/_layouts/compress.html +10 -0
- data/_layouts/default.html +203 -0
- data/_layouts/page.html +40 -0
- data/_layouts/post.html +24 -0
- data/_sass/jekyll-theme-mozg.scss +6 -0
- data/_sass/jekyll-theme-primer.scss +8 -0
- data/_sass/rouge.scss +209 -0
- data/assets/css/bootstrap.css +2 -0
- data/assets/css/bootstrap/Gruntfile.js +511 -0
- data/assets/css/bootstrap/LICENSE +21 -0
- data/assets/css/bootstrap/dist/css/bootstrap-theme.css +587 -0
- data/assets/css/bootstrap/dist/css/bootstrap-theme.css.map +1 -0
- data/assets/css/bootstrap/dist/css/bootstrap-theme.min.css +6 -0
- data/assets/css/bootstrap/dist/css/bootstrap-theme.min.css.map +1 -0
- data/assets/css/bootstrap/dist/css/bootstrap.css +6757 -0
- data/assets/css/bootstrap/dist/css/bootstrap.css.map +1 -0
- data/assets/css/bootstrap/dist/css/bootstrap.min.css +6 -0
- data/assets/css/bootstrap/dist/css/bootstrap.min.css.map +1 -0
- data/assets/css/bootstrap/dist/fonts/glyphicons-halflings-regular.eot +0 -0
- data/assets/css/bootstrap/dist/fonts/glyphicons-halflings-regular.svg +288 -0
- data/assets/css/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/assets/css/bootstrap/dist/fonts/glyphicons-halflings-regular.woff +0 -0
- data/assets/css/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/assets/css/bootstrap/dist/js/bootstrap.js +2377 -0
- data/assets/css/bootstrap/dist/js/bootstrap.min.js +7 -0
- data/assets/css/bootstrap/dist/js/npm.js +13 -0
- data/assets/css/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
- data/assets/css/bootstrap/fonts/glyphicons-halflings-regular.svg +288 -0
- data/assets/css/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/assets/css/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
- data/assets/css/bootstrap/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/assets/css/bootstrap/grunt/.jshintrc +7 -0
- data/assets/css/bootstrap/grunt/bs-commonjs-generator.js +30 -0
- data/assets/css/bootstrap/grunt/bs-glyphicons-data-generator.js +42 -0
- data/assets/css/bootstrap/grunt/bs-lessdoc-parser.js +237 -0
- data/assets/css/bootstrap/grunt/bs-raw-files-generator.js +44 -0
- data/assets/css/bootstrap/grunt/change-version.js +109 -0
- data/assets/css/bootstrap/grunt/configBridge.json +46 -0
- data/assets/css/bootstrap/grunt/npm-shrinkwrap.json +2679 -0
- data/assets/css/bootstrap/grunt/sauce_browsers.yml +82 -0
- data/assets/css/bootstrap/js/affix.js +162 -0
- data/assets/css/bootstrap/js/alert.js +94 -0
- data/assets/css/bootstrap/js/button.js +125 -0
- data/assets/css/bootstrap/js/carousel.js +237 -0
- data/assets/css/bootstrap/js/collapse.js +212 -0
- data/assets/css/bootstrap/js/dropdown.js +165 -0
- data/assets/css/bootstrap/js/modal.js +339 -0
- data/assets/css/bootstrap/js/popover.js +108 -0
- data/assets/css/bootstrap/js/scrollspy.js +172 -0
- data/assets/css/bootstrap/js/tab.js +155 -0
- data/assets/css/bootstrap/js/tooltip.js +520 -0
- data/assets/css/bootstrap/js/transition.js +59 -0
- data/assets/css/bootstrap/less/alerts.less +73 -0
- data/assets/css/bootstrap/less/badges.less +66 -0
- data/assets/css/bootstrap/less/bootstrap.less +56 -0
- data/assets/css/bootstrap/less/breadcrumbs.less +26 -0
- data/assets/css/bootstrap/less/button-groups.less +244 -0
- data/assets/css/bootstrap/less/buttons.less +166 -0
- data/assets/css/bootstrap/less/carousel.less +270 -0
- data/assets/css/bootstrap/less/close.less +34 -0
- data/assets/css/bootstrap/less/code.less +69 -0
- data/assets/css/bootstrap/less/component-animations.less +33 -0
- data/assets/css/bootstrap/less/dropdowns.less +216 -0
- data/assets/css/bootstrap/less/forms.less +613 -0
- data/assets/css/bootstrap/less/glyphicons.less +305 -0
- data/assets/css/bootstrap/less/grid.less +84 -0
- data/assets/css/bootstrap/less/input-groups.less +171 -0
- data/assets/css/bootstrap/less/jumbotron.less +54 -0
- data/assets/css/bootstrap/less/labels.less +64 -0
- data/assets/css/bootstrap/less/list-group.less +130 -0
- data/assets/css/bootstrap/less/media.less +66 -0
- data/assets/css/bootstrap/less/mixins.less +40 -0
- data/assets/css/bootstrap/less/mixins/alerts.less +14 -0
- data/assets/css/bootstrap/less/mixins/background-variant.less +9 -0
- data/assets/css/bootstrap/less/mixins/border-radius.less +18 -0
- data/assets/css/bootstrap/less/mixins/buttons.less +65 -0
- data/assets/css/bootstrap/less/mixins/center-block.less +7 -0
- data/assets/css/bootstrap/less/mixins/clearfix.less +22 -0
- data/assets/css/bootstrap/less/mixins/forms.less +85 -0
- data/assets/css/bootstrap/less/mixins/gradients.less +59 -0
- data/assets/css/bootstrap/less/mixins/grid-framework.less +91 -0
- data/assets/css/bootstrap/less/mixins/grid.less +122 -0
- data/assets/css/bootstrap/less/mixins/hide-text.less +21 -0
- data/assets/css/bootstrap/less/mixins/image.less +33 -0
- data/assets/css/bootstrap/less/mixins/labels.less +12 -0
- data/assets/css/bootstrap/less/mixins/list-group.less +30 -0
- data/assets/css/bootstrap/less/mixins/nav-divider.less +10 -0
- data/assets/css/bootstrap/less/mixins/nav-vertical-align.less +9 -0
- data/assets/css/bootstrap/less/mixins/opacity.less +8 -0
- data/assets/css/bootstrap/less/mixins/pagination.less +24 -0
- data/assets/css/bootstrap/less/mixins/panels.less +24 -0
- data/assets/css/bootstrap/less/mixins/progress-bar.less +10 -0
- data/assets/css/bootstrap/less/mixins/reset-filter.less +8 -0
- data/assets/css/bootstrap/less/mixins/reset-text.less +18 -0
- data/assets/css/bootstrap/less/mixins/resize.less +6 -0
- data/assets/css/bootstrap/less/mixins/responsive-visibility.less +15 -0
- data/assets/css/bootstrap/less/mixins/size.less +10 -0
- data/assets/css/bootstrap/less/mixins/tab-focus.less +9 -0
- data/assets/css/bootstrap/less/mixins/table-row.less +28 -0
- data/assets/css/bootstrap/less/mixins/text-emphasis.less +9 -0
- data/assets/css/bootstrap/less/mixins/text-overflow.less +8 -0
- data/assets/css/bootstrap/less/mixins/vendor-prefixes.less +227 -0
- data/assets/css/bootstrap/less/modals.less +150 -0
- data/assets/css/bootstrap/less/navbar.less +660 -0
- data/assets/css/bootstrap/less/navs.less +242 -0
- data/assets/css/bootstrap/less/normalize.less +424 -0
- data/assets/css/bootstrap/less/pager.less +54 -0
- data/assets/css/bootstrap/less/pagination.less +89 -0
- data/assets/css/bootstrap/less/panels.less +271 -0
- data/assets/css/bootstrap/less/popovers.less +131 -0
- data/assets/css/bootstrap/less/print.less +101 -0
- data/assets/css/bootstrap/less/progress-bars.less +87 -0
- data/assets/css/bootstrap/less/responsive-embed.less +35 -0
- data/assets/css/bootstrap/less/responsive-utilities.less +194 -0
- data/assets/css/bootstrap/less/scaffolding.less +161 -0
- data/assets/css/bootstrap/less/tables.less +234 -0
- data/assets/css/bootstrap/less/theme.less +291 -0
- data/assets/css/bootstrap/less/thumbnails.less +36 -0
- data/assets/css/bootstrap/less/tooltip.less +101 -0
- data/assets/css/bootstrap/less/type.less +302 -0
- data/assets/css/bootstrap/less/utilities.less +55 -0
- data/assets/css/bootstrap/less/variables.less +869 -0
- data/assets/css/bootstrap/less/wells.less +29 -0
- data/assets/css/bootstrap/package.json +144 -0
- data/assets/css/style.scss +4 -0
- data/assets/css/theme.css +7791 -0
- data/assets/fonts/fakt/Fakt-Blond.woff2 +0 -0
- data/assets/fonts/fakt/Fakt-BlondItalic.woff2 +0 -0
- data/assets/fonts/fakt/Fakt-SemiBold.woff2 +0 -0
- data/assets/fonts/theme-website.woff +0 -0
- data/assets/images/backgrounds/mascote-cerebrum-3d.png +0 -0
- data/assets/images/logos/logo.svg +37 -0
- data/assets/images/logos/logo_32_32.png +0 -0
- data/assets/images/logos/theme-logo-green.png +0 -0
- data/assets/images/logos/theme-logo-white.png +0 -0
- data/assets/images/rocket.png +0 -0
- data/assets/javascript/anchor-js/.eslintrc +77 -0
- data/assets/javascript/anchor-js/.gitattributes +2 -0
- data/assets/javascript/anchor-js/.npmignore +4 -0
- data/assets/javascript/anchor-js/.travis.yml +6 -0
- data/assets/javascript/anchor-js/anchor.js +335 -0
- data/assets/javascript/anchor-js/anchor.min.js +6 -0
- data/assets/javascript/anchor-js/banner.js +17 -0
- data/assets/javascript/anchor-js/docs/anchor.js +335 -0
- data/assets/javascript/anchor-js/docs/favicon.ico +0 -0
- data/assets/javascript/anchor-js/docs/fonts/anchorjs-extras.eot +0 -0
- data/assets/javascript/anchor-js/docs/fonts/anchorjs-extras.svg +11 -0
- data/assets/javascript/anchor-js/docs/fonts/anchorjs-extras.ttf +0 -0
- data/assets/javascript/anchor-js/docs/fonts/anchorjs-extras.woff +0 -0
- data/assets/javascript/anchor-js/docs/fonts/fonts.css +24 -0
- data/assets/javascript/anchor-js/docs/grunticon/grunticon.loader.js +3 -0
- data/assets/javascript/anchor-js/docs/grunticon/icons.data.png.css +5 -0
- data/assets/javascript/anchor-js/docs/grunticon/icons.data.svg.css +5 -0
- data/assets/javascript/anchor-js/docs/grunticon/icons.fallback.css +5 -0
- data/assets/javascript/anchor-js/docs/grunticon/png/grunticon-link.png +0 -0
- data/assets/javascript/anchor-js/docs/img/anchoring-links.png +0 -0
- data/assets/javascript/anchor-js/docs/img/anchorjs_logo.png +0 -0
- data/assets/javascript/anchor-js/docs/img/anchorlinks2.png +0 -0
- data/assets/javascript/anchor-js/docs/img/gh-link.svg +9 -0
- data/assets/javascript/anchor-js/docs/img/gh_link.svg +9 -0
- data/assets/javascript/anchor-js/docs/img/hyperlink.svg +9 -0
- data/assets/javascript/anchor-js/docs/img/link.svg +6 -0
- data/assets/javascript/anchor-js/docs/img/mini-logo.png +0 -0
- data/assets/javascript/anchor-js/docs/img/primer-md.png +0 -0
- data/assets/javascript/anchor-js/docs/scripts.js +12 -0
- data/assets/javascript/anchor-js/docs/styles.css +494 -0
- data/assets/javascript/jquery-lazy/LICENSE +375 -0
- data/assets/javascript/jquery-lazy/bower.json +48 -0
- data/assets/javascript/jquery-lazy/gulpfile.js +150 -0
- data/assets/javascript/jquery-lazy/jquery.lazy.js +870 -0
- data/assets/javascript/jquery-lazy/jquery.lazy.min.js +2 -0
- data/assets/javascript/jquery-lazy/jquery.lazy.plugins.js +580 -0
- data/assets/javascript/jquery-lazy/jquery.lazy.plugins.min.js +2 -0
- data/assets/javascript/jquery-lazy/package.json +125 -0
- data/assets/javascript/jquery-lazy/plugins/jquery.lazy.ajax.js +73 -0
- data/assets/javascript/jquery-lazy/plugins/jquery.lazy.ajax.min.js +2 -0
- data/assets/javascript/jquery-lazy/plugins/jquery.lazy.av.js +115 -0
- data/assets/javascript/jquery-lazy/plugins/jquery.lazy.av.min.js +2 -0
- data/assets/javascript/jquery-lazy/plugins/jquery.lazy.iframe.js +81 -0
- data/assets/javascript/jquery-lazy/plugins/jquery.lazy.iframe.min.js +2 -0
- data/assets/javascript/jquery-lazy/plugins/jquery.lazy.noop.js +30 -0
- data/assets/javascript/jquery-lazy/plugins/jquery.lazy.noop.min.js +2 -0
- data/assets/javascript/jquery-lazy/plugins/jquery.lazy.picture.js +187 -0
- data/assets/javascript/jquery-lazy/plugins/jquery.lazy.picture.min.js +2 -0
- data/assets/javascript/jquery-lazy/plugins/jquery.lazy.script.js +27 -0
- data/assets/javascript/jquery-lazy/plugins/jquery.lazy.script.min.js +2 -0
- data/assets/javascript/jquery-lazy/plugins/jquery.lazy.vimeo.js +30 -0
- data/assets/javascript/jquery-lazy/plugins/jquery.lazy.vimeo.min.js +2 -0
- data/assets/javascript/jquery-lazy/plugins/jquery.lazy.youtube.js +30 -0
- data/assets/javascript/jquery-lazy/plugins/jquery.lazy.youtube.min.js +2 -0
- data/assets/javascript/jquery/AUTHORS.txt +301 -0
- data/assets/javascript/jquery/LICENSE.txt +36 -0
- data/assets/javascript/jquery/bower.json +14 -0
- data/assets/javascript/jquery/dist/core.js +476 -0
- data/assets/javascript/jquery/dist/jquery.js +10253 -0
- data/assets/javascript/jquery/dist/jquery.min.js +4 -0
- data/assets/javascript/jquery/dist/jquery.min.map +1 -0
- data/assets/javascript/jquery/dist/jquery.slim.js +8160 -0
- data/assets/javascript/jquery/dist/jquery.slim.min.js +4 -0
- data/assets/javascript/jquery/dist/jquery.slim.min.map +1 -0
- data/assets/javascript/jquery/external/sizzle/LICENSE.txt +36 -0
- data/assets/javascript/jquery/external/sizzle/dist/sizzle.js +2272 -0
- data/assets/javascript/jquery/external/sizzle/dist/sizzle.min.js +3 -0
- data/assets/javascript/jquery/external/sizzle/dist/sizzle.min.map +1 -0
- data/assets/javascript/jquery/package.json +162 -0
- data/assets/javascript/jquery/src/.eslintrc.json +5 -0
- data/assets/javascript/jquery/src/ajax.js +855 -0
- data/assets/javascript/jquery/src/ajax/jsonp.js +102 -0
- data/assets/javascript/jquery/src/ajax/load.js +76 -0
- data/assets/javascript/jquery/src/ajax/parseXML.js +30 -0
- data/assets/javascript/jquery/src/ajax/script.js +77 -0
- data/assets/javascript/jquery/src/ajax/var/location.js +5 -0
- data/assets/javascript/jquery/src/ajax/var/nonce.js +7 -0
- data/assets/javascript/jquery/src/ajax/var/rquery.js +5 -0
- data/assets/javascript/jquery/src/ajax/xhr.js +169 -0
- data/assets/javascript/jquery/src/attributes.js +13 -0
- data/assets/javascript/jquery/src/attributes/attr.js +141 -0
- data/assets/javascript/jquery/src/attributes/classes.js +174 -0
- data/assets/javascript/jquery/src/attributes/prop.js +143 -0
- data/assets/javascript/jquery/src/attributes/support.js +33 -0
- data/assets/javascript/jquery/src/attributes/val.js +190 -0
- data/assets/javascript/jquery/src/callbacks.js +234 -0
- data/assets/javascript/jquery/src/core.js +476 -0
- data/assets/javascript/jquery/src/core/DOMEval.js +16 -0
- data/assets/javascript/jquery/src/core/access.js +70 -0
- data/assets/javascript/jquery/src/core/init.js +128 -0
- data/assets/javascript/jquery/src/core/nodeName.js +13 -0
- data/assets/javascript/jquery/src/core/parseHTML.js +65 -0
- data/assets/javascript/jquery/src/core/ready-no-deferred.js +96 -0
- data/assets/javascript/jquery/src/core/ready.js +86 -0
- data/assets/javascript/jquery/src/core/readyException.js +13 -0
- data/assets/javascript/jquery/src/core/stripAndCollapse.js +14 -0
- data/assets/javascript/jquery/src/core/support.js +20 -0
- data/assets/javascript/jquery/src/core/var/rsingleTag.js +6 -0
- data/assets/javascript/jquery/src/css.js +438 -0
- data/assets/javascript/jquery/src/css/addGetHookIf.js +26 -0
- data/assets/javascript/jquery/src/css/adjustCSS.js +71 -0
- data/assets/javascript/jquery/src/css/curCSS.js +65 -0
- data/assets/javascript/jquery/src/css/hiddenVisibleSelectors.js +15 -0
- data/assets/javascript/jquery/src/css/showHide.js +105 -0
- data/assets/javascript/jquery/src/css/support.js +89 -0
- data/assets/javascript/jquery/src/css/var/cssExpand.js +5 -0
- data/assets/javascript/jquery/src/css/var/getStyles.js +17 -0
- data/assets/javascript/jquery/src/css/var/isHiddenWithinTree.js +34 -0
- data/assets/javascript/jquery/src/css/var/rmargin.js +5 -0
- data/assets/javascript/jquery/src/css/var/rnumnonpx.js +7 -0
- data/assets/javascript/jquery/src/css/var/swap.js +26 -0
- data/assets/javascript/jquery/src/data.js +179 -0
- data/assets/javascript/jquery/src/data/Data.js +161 -0
- data/assets/javascript/jquery/src/data/var/acceptData.js +19 -0
- data/assets/javascript/jquery/src/data/var/dataPriv.js +7 -0
- data/assets/javascript/jquery/src/data/var/dataUser.js +7 -0
- data/assets/javascript/jquery/src/deferred.js +391 -0
- data/assets/javascript/jquery/src/deferred/exceptionHook.js +21 -0
- data/assets/javascript/jquery/src/deprecated.js +40 -0
- data/assets/javascript/jquery/src/dimensions.js +56 -0
- data/assets/javascript/jquery/src/effects.js +699 -0
- data/assets/javascript/jquery/src/effects/Tween.js +123 -0
- data/assets/javascript/jquery/src/effects/animatedSelector.js +15 -0
- data/assets/javascript/jquery/src/event.js +746 -0
- data/assets/javascript/jquery/src/event/ajax.js +22 -0
- data/assets/javascript/jquery/src/event/alias.js +29 -0
- data/assets/javascript/jquery/src/event/focusin.js +55 -0
- data/assets/javascript/jquery/src/event/support.js +11 -0
- data/assets/javascript/jquery/src/event/trigger.js +185 -0
- data/assets/javascript/jquery/src/exports/amd.js +26 -0
- data/assets/javascript/jquery/src/exports/global.js +34 -0
- data/assets/javascript/jquery/src/jquery.js +41 -0
- data/assets/javascript/jquery/src/manipulation.js +488 -0
- data/assets/javascript/jquery/src/manipulation/_evalUrl.js +23 -0
- data/assets/javascript/jquery/src/manipulation/buildFragment.js +104 -0
- data/assets/javascript/jquery/src/manipulation/getAll.js +32 -0
- data/assets/javascript/jquery/src/manipulation/setGlobalEval.js +22 -0
- data/assets/javascript/jquery/src/manipulation/support.js +35 -0
- data/assets/javascript/jquery/src/manipulation/var/rcheckableType.js +5 -0
- data/assets/javascript/jquery/src/manipulation/var/rscriptType.js +5 -0
- data/assets/javascript/jquery/src/manipulation/var/rtagName.js +5 -0
- data/assets/javascript/jquery/src/manipulation/wrapMap.js +29 -0
- data/assets/javascript/jquery/src/offset.js +229 -0
- data/assets/javascript/jquery/src/queue.js +145 -0
- data/assets/javascript/jquery/src/queue/delay.js +24 -0
- data/assets/javascript/jquery/src/selector-native.js +237 -0
- data/assets/javascript/jquery/src/selector-sizzle.js +19 -0
- data/assets/javascript/jquery/src/selector.js +3 -0
- data/assets/javascript/jquery/src/serialize.js +130 -0
- data/assets/javascript/jquery/src/traversing.js +191 -0
- data/assets/javascript/jquery/src/traversing/findFilter.js +106 -0
- data/assets/javascript/jquery/src/traversing/var/dir.js +22 -0
- data/assets/javascript/jquery/src/traversing/var/rneedsContext.js +8 -0
- data/assets/javascript/jquery/src/traversing/var/siblings.js +17 -0
- data/assets/javascript/jquery/src/var/ObjectFunctionString.js +7 -0
- data/assets/javascript/jquery/src/var/arr.js +5 -0
- data/assets/javascript/jquery/src/var/class2type.js +6 -0
- data/assets/javascript/jquery/src/var/concat.js +7 -0
- data/assets/javascript/jquery/src/var/document.js +5 -0
- data/assets/javascript/jquery/src/var/documentElement.js +7 -0
- data/assets/javascript/jquery/src/var/fnToString.js +7 -0
- data/assets/javascript/jquery/src/var/getProto.js +5 -0
- data/assets/javascript/jquery/src/var/hasOwn.js +7 -0
- data/assets/javascript/jquery/src/var/indexOf.js +7 -0
- data/assets/javascript/jquery/src/var/pnum.js +5 -0
- data/assets/javascript/jquery/src/var/push.js +7 -0
- data/assets/javascript/jquery/src/var/rcssNum.js +9 -0
- data/assets/javascript/jquery/src/var/rnothtmlwhite.js +8 -0
- data/assets/javascript/jquery/src/var/slice.js +7 -0
- data/assets/javascript/jquery/src/var/support.js +6 -0
- data/assets/javascript/jquery/src/var/toString.js +7 -0
- data/assets/javascript/jquery/src/wrap.js +77 -0
- data/assets/javascript/velocity-animate/package.json +104 -0
- data/assets/javascript/velocity-animate/velocity.js +4768 -0
- data/assets/javascript/velocity-animate/velocity.min.js +4 -0
- data/assets/javascript/velocity-animate/velocity.ui.js +804 -0
- data/assets/javascript/velocity-animate/velocity.ui.min.js +1 -0
- data/assets/js/0-bootstrap.min.js +7 -0
- data/assets/js/0-jquery.ba-postmessage.min.js +20 -0
- data/assets/js/0-jquery.lazy.min.js +2 -0
- data/assets/js/0-velocity.js +4 -0
- data/assets/js/application.js +103 -0
- data/assets/js/internal/listAndPagi.js +38 -0
- data/assets/js/internal/pagination.js +11 -0
- data/assets/js/internal/search.js +65 -0
- data/assets/js/internal/utils.js +128 -0
- data/assets/js/jquery.js +5 -0
- data/assets/js/web/libs/lunr.js/0.6.0/lunr.min.js +7 -0
- metadata +461 -0
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
3
|
+
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" id="svg2" sodipodi:version="0.32" inkscape:version="0.46dev+devel" width="1235.4683" height="1175.0001" version="1.0" sodipodi:docbase="C:\Documents and Settings\xy\Bureau" sodipodi:docname="URSS-Russian_aviation_red_star.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape">
|
4
|
+
<metadata id="metadata7">
|
5
|
+
<rdf:RDF>
|
6
|
+
<cc:Work rdf:about="">
|
7
|
+
<dc:format>image/svg+xml</dc:format>
|
8
|
+
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
9
|
+
</cc:Work>
|
10
|
+
</rdf:RDF>
|
11
|
+
</metadata>
|
12
|
+
<defs id="defs5"/>
|
13
|
+
<sodipodi:namedview inkscape:window-height="1003" inkscape:window-width="1280" inkscape:pageshadow="2" inkscape:pageopacity="0.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="0.14375" inkscape:cx="181.6379" inkscape:cy="-271.72947" inkscape:window-x="-4" inkscape:window-y="-4" inkscape:current-layer="svg2" width="1919.04px" height="1825.46px" showgrid="false" inkscape:showpageshadow="false"/>
|
14
|
+
<g id="g3081" transform="translate(312.94273,-1556.2872)">
|
15
|
+
<g id="g3069" transform="matrix(0.3817807,-1.1750001,1.1750001,0.3817807,-3375.7097,1097.1531)">
|
16
|
+
<path style="fill:#de0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" d="M 376.15009,3535.8536 L -432.86689,2948.0683 L 59.809394,3120.6084 L 376.15009,3535.8536 z" id="path3071" sodipodi:nodetypes="cccc"/>
|
17
|
+
<path sodipodi:nodetypes="cccc" id="path3073" d="M 567.13309,2948.0683 L -432.86689,2948.0683 L 59.754594,3133.7311 L 567.13309,2948.0683 z" style="fill:#de0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"/>
|
18
|
+
<path sodipodi:nodetypes="cccc" id="path3075" d="M -241.88386,3535.8536 L 567.13309,2948.0683 L 58.470094,3089.8646 L -241.88386,3535.8536 z" style="fill:#de0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"/>
|
19
|
+
<path style="fill:#de0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" d="M 376.15009,3535.8536 L 67.133094,2584.7971 L 15.036094,3128.8134 L 376.15009,3535.8536 z" id="path3077" sodipodi:nodetypes="cccc"/>
|
20
|
+
<path sodipodi:nodetypes="cccc" id="path3079" d="M -241.88389,3535.8536 L 67.133094,2584.7971 L 99.554094,3123.8944 L -241.88389,3535.8536 z" style="fill:#de0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"/>
|
21
|
+
</g>
|
22
|
+
<g style="fill:#ffffff" id="g3057" transform="matrix(0.3525378,-1.0849999,1.0849999,0.3525378,-3093.7984,1182.0754)">
|
23
|
+
<path style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" d="M 376.15009,3535.8536 L -432.86689,2948.0683 L 59.809394,3120.6084 L 376.15009,3535.8536 z" id="path3059" sodipodi:nodetypes="cccc"/>
|
24
|
+
<path sodipodi:nodetypes="cccc" id="path3061" d="M 567.13309,2948.0683 L -432.86689,2948.0683 L 59.754594,3133.7311 L 567.13309,2948.0683 z" style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"/>
|
25
|
+
<path sodipodi:nodetypes="cccc" id="path3063" d="M -241.88386,3535.8536 L 567.13309,2948.0683 L 58.470094,3089.8646 L -241.88386,3535.8536 z" style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"/>
|
26
|
+
<path style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" d="M 376.15009,3535.8536 L 67.133094,2584.7971 L 15.036094,3128.8134 L 376.15009,3535.8536 z" id="path3065" sodipodi:nodetypes="cccc"/>
|
27
|
+
<path sodipodi:nodetypes="cccc" id="path3067" d="M -241.88389,3535.8536 L 67.133094,2584.7971 L 99.554094,3123.8944 L -241.88389,3535.8536 z" style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"/>
|
28
|
+
</g>
|
29
|
+
<g transform="matrix(0.2761818,-0.85,0.85,0.2761818,-2357.6985,1403.8155)" id="g3050">
|
30
|
+
<path sodipodi:nodetypes="cccc" id="path3036" d="M 376.15009,3535.8536 L -432.86689,2948.0683 L 59.809394,3120.6084 L 376.15009,3535.8536 z" style="fill:#de0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"/>
|
31
|
+
<path style="fill:#de0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" d="M 567.13309,2948.0683 L -432.86689,2948.0683 L 59.754594,3133.7311 L 567.13309,2948.0683 z" id="path3038" sodipodi:nodetypes="cccc"/>
|
32
|
+
<path style="fill:#de0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" d="M -241.88386,3535.8536 L 567.13309,2948.0683 L 58.470094,3089.8646 L -241.88386,3535.8536 z" id="path3040" sodipodi:nodetypes="cccc"/>
|
33
|
+
<path sodipodi:nodetypes="cccc" id="path3042" d="M 376.15009,3535.8536 L 67.133094,2584.7971 L 15.036094,3128.8134 L 376.15009,3535.8536 z" style="fill:#de0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"/>
|
34
|
+
<path style="fill:#de0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" d="M -241.88389,3535.8536 L 67.133094,2584.7971 L 99.554094,3123.8944 L -241.88389,3535.8536 z" id="path3044" sodipodi:nodetypes="cccc"/>
|
35
|
+
</g>
|
36
|
+
</g>
|
37
|
+
</svg>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,77 @@
|
|
1
|
+
{
|
2
|
+
"env": {
|
3
|
+
"browser": true
|
4
|
+
},
|
5
|
+
|
6
|
+
"rules": {
|
7
|
+
"array-bracket-spacing": [2, "never"],
|
8
|
+
"block-scoped-var": 2,
|
9
|
+
"brace-style": [2, "1tbs"],
|
10
|
+
"camelcase": 2,
|
11
|
+
"comma-spacing": [2, {"before": false, "after": true}],
|
12
|
+
"comma-style": [2, "last"],
|
13
|
+
"computed-property-spacing": [2, "never"],
|
14
|
+
"consistent-this": [2, "that"],
|
15
|
+
"curly": 2,
|
16
|
+
"eol-last": 2,
|
17
|
+
"eqeqeq": 2,
|
18
|
+
"guard-for-in": 2,
|
19
|
+
"handle-callback-err": 2,
|
20
|
+
"indent": [2, 2, {"VariableDeclarator": 2}],
|
21
|
+
"key-spacing": [2, {"beforeColon": false, "afterColon": true}],
|
22
|
+
"keyword-spacing": 2,
|
23
|
+
"no-caller": 2,
|
24
|
+
"new-cap": 2,
|
25
|
+
"new-parens": 2,
|
26
|
+
"no-array-constructor": 2,
|
27
|
+
"no-bitwise": 2,
|
28
|
+
"no-constant-condition": 2,
|
29
|
+
"no-else-return": 2,
|
30
|
+
"no-empty": 2,
|
31
|
+
"no-eq-null": 2,
|
32
|
+
"no-extra-parens": 0,
|
33
|
+
"no-extra-semi": 2,
|
34
|
+
"no-undef": 2,
|
35
|
+
"no-floating-decimal": 2,
|
36
|
+
"no-invalid-regexp": 2,
|
37
|
+
"no-irregular-whitespace": 2,
|
38
|
+
"no-lonely-if": 2,
|
39
|
+
"no-mixed-requires": 2,
|
40
|
+
"no-mixed-spaces-and-tabs": 2,
|
41
|
+
"no-multiple-empty-lines": 2,
|
42
|
+
"no-multi-spaces": 0,
|
43
|
+
"no-negated-in-lhs": 2,
|
44
|
+
"no-new-object": 2,
|
45
|
+
"no-path-concat": 2,
|
46
|
+
"no-process-env": 2,
|
47
|
+
"no-regex-spaces": 2,
|
48
|
+
"no-self-compare": 2,
|
49
|
+
"no-sequences": 2,
|
50
|
+
"no-spaced-func": 2,
|
51
|
+
"no-trailing-spaces": 2,
|
52
|
+
"no-underscore-dangle": 0,
|
53
|
+
"no-unused-vars": 0, // we should find a way to only exclude addAnchors and enable this
|
54
|
+
"no-use-before-define": [2, "nofunc"],
|
55
|
+
"no-void": 2,
|
56
|
+
"object-curly-spacing": [2, "always"],
|
57
|
+
"operator-assignment": [2, "always"],
|
58
|
+
"quotes": [2, "single"],
|
59
|
+
"quote-props": [2, "as-needed"],
|
60
|
+
"radix": 2,
|
61
|
+
"semi": [2, "always"],
|
62
|
+
"semi-spacing": 2,
|
63
|
+
"space-before-blocks": [2, "always"],
|
64
|
+
"spaced-comment": [2, "always"],
|
65
|
+
"space-in-parens": [2, "never"],
|
66
|
+
"space-unary-ops": [2, {"words": true, "nonwords": false}],
|
67
|
+
"strict": [2, "function"],
|
68
|
+
"valid-jsdoc": [2, {"requireReturn": false}],
|
69
|
+
"valid-typeof": 2,
|
70
|
+
"wrap-iife": [2, "outside"],
|
71
|
+
"yoda": [2, "never"]
|
72
|
+
},
|
73
|
+
|
74
|
+
"globals": {
|
75
|
+
"DocumentTouch": true,
|
76
|
+
}
|
77
|
+
}
|
@@ -0,0 +1,335 @@
|
|
1
|
+
/* eslint-env amd, node */
|
2
|
+
|
3
|
+
// https://github.com/umdjs/umd/blob/master/templates/returnExports.js
|
4
|
+
(function (root, factory) {
|
5
|
+
'use strict';
|
6
|
+
|
7
|
+
if (typeof define === 'function' && define.amd) {
|
8
|
+
// AMD. Register as an anonymous module.
|
9
|
+
define([], factory);
|
10
|
+
} else if (typeof module === 'object' && module.exports) {
|
11
|
+
// Node. Does not work with strict CommonJS, but
|
12
|
+
// only CommonJS-like environments that support module.exports,
|
13
|
+
// like Node.
|
14
|
+
module.exports = factory();
|
15
|
+
} else {
|
16
|
+
// Browser globals (root is window)
|
17
|
+
root.AnchorJS = factory();
|
18
|
+
root.anchors = new root.AnchorJS();
|
19
|
+
}
|
20
|
+
}(this, function () {
|
21
|
+
'use strict';
|
22
|
+
|
23
|
+
function AnchorJS(options) {
|
24
|
+
this.options = options || {};
|
25
|
+
this.elements = [];
|
26
|
+
|
27
|
+
/**
|
28
|
+
* Assigns options to the internal options object, and provides defaults.
|
29
|
+
* @param {Object} opts - Options object
|
30
|
+
*/
|
31
|
+
function _applyRemainingDefaultOptions(opts) {
|
32
|
+
opts.icon = opts.hasOwnProperty('icon') ? opts.icon : '\ue9cb'; // Accepts characters (and also URLs?), like '#', '¶', '❡', or '§'.
|
33
|
+
opts.visible = opts.hasOwnProperty('visible') ? opts.visible : 'hover'; // Also accepts 'always' & 'touch'
|
34
|
+
opts.placement = opts.hasOwnProperty('placement') ? opts.placement : 'right'; // Also accepts 'left'
|
35
|
+
opts.ariaLabel = opts.hasOwnProperty('ariaLabel') ? opts.ariaLabel : 'Anchor'; // Accepts any text.
|
36
|
+
opts.class = opts.hasOwnProperty('class') ? opts.class : ''; // Accepts any class name.
|
37
|
+
// Using Math.floor here will ensure the value is Number-cast and an integer.
|
38
|
+
opts.truncate = opts.hasOwnProperty('truncate') ? Math.floor(opts.truncate) : 64; // Accepts any value that can be typecast to a number.
|
39
|
+
}
|
40
|
+
|
41
|
+
_applyRemainingDefaultOptions(this.options);
|
42
|
+
|
43
|
+
/**
|
44
|
+
* Checks to see if this device supports touch. Uses criteria pulled from Modernizr:
|
45
|
+
* https://github.com/Modernizr/Modernizr/blob/da22eb27631fc4957f67607fe6042e85c0a84656/feature-detects/touchevents.js#L40
|
46
|
+
* @return {Boolean} - true if the current device supports touch.
|
47
|
+
*/
|
48
|
+
this.isTouchDevice = function() {
|
49
|
+
return !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch);
|
50
|
+
};
|
51
|
+
|
52
|
+
/**
|
53
|
+
* Add anchor links to page elements.
|
54
|
+
* @param {String|Array|Nodelist} selector - A CSS selector for targeting the elements you wish to add anchor links
|
55
|
+
* to. Also accepts an array or nodeList containing the relavant elements.
|
56
|
+
* @return {this} - The AnchorJS object
|
57
|
+
*/
|
58
|
+
this.add = function(selector) {
|
59
|
+
var elements,
|
60
|
+
elsWithIds,
|
61
|
+
idList,
|
62
|
+
elementID,
|
63
|
+
i,
|
64
|
+
index,
|
65
|
+
count,
|
66
|
+
tidyText,
|
67
|
+
newTidyText,
|
68
|
+
readableID,
|
69
|
+
anchor,
|
70
|
+
visibleOptionToUse,
|
71
|
+
indexesToDrop = [];
|
72
|
+
|
73
|
+
// We reapply options here because somebody may have overwritten the default options object when setting options.
|
74
|
+
// For example, this overwrites all options but visible:
|
75
|
+
//
|
76
|
+
// anchors.options = { visible: 'always'; }
|
77
|
+
_applyRemainingDefaultOptions(this.options);
|
78
|
+
|
79
|
+
visibleOptionToUse = this.options.visible;
|
80
|
+
if (visibleOptionToUse === 'touch') {
|
81
|
+
visibleOptionToUse = this.isTouchDevice() ? 'always' : 'hover';
|
82
|
+
}
|
83
|
+
|
84
|
+
// Provide a sensible default selector, if none is given.
|
85
|
+
if (!selector) {
|
86
|
+
selector = 'h2, h3, h4, h5, h6';
|
87
|
+
}
|
88
|
+
|
89
|
+
elements = _getElements(selector);
|
90
|
+
|
91
|
+
if (elements.length === 0) {
|
92
|
+
return this;
|
93
|
+
}
|
94
|
+
|
95
|
+
_addBaselineStyles();
|
96
|
+
|
97
|
+
// We produce a list of existing IDs so we don't generate a duplicate.
|
98
|
+
elsWithIds = document.querySelectorAll('[id]');
|
99
|
+
idList = [].map.call(elsWithIds, function assign(el) {
|
100
|
+
return el.id;
|
101
|
+
});
|
102
|
+
|
103
|
+
for (i = 0; i < elements.length; i++) {
|
104
|
+
if (this.hasAnchorJSLink(elements[i])) {
|
105
|
+
indexesToDrop.push(i);
|
106
|
+
continue;
|
107
|
+
}
|
108
|
+
|
109
|
+
if (elements[i].hasAttribute('id')) {
|
110
|
+
elementID = elements[i].getAttribute('id');
|
111
|
+
} else if (elements[i].hasAttribute('data-anchor-id')) {
|
112
|
+
elementID = elements[i].getAttribute('data-anchor-id');
|
113
|
+
} else {
|
114
|
+
tidyText = this.urlify(elements[i].textContent);
|
115
|
+
|
116
|
+
// Compare our generated ID to existing IDs (and increment it if needed)
|
117
|
+
// before we add it to the page.
|
118
|
+
newTidyText = tidyText;
|
119
|
+
count = 0;
|
120
|
+
do {
|
121
|
+
if (index !== undefined) {
|
122
|
+
newTidyText = tidyText + '-' + count;
|
123
|
+
}
|
124
|
+
|
125
|
+
index = idList.indexOf(newTidyText);
|
126
|
+
count += 1;
|
127
|
+
} while (index !== -1);
|
128
|
+
index = undefined;
|
129
|
+
idList.push(newTidyText);
|
130
|
+
|
131
|
+
elements[i].setAttribute('id', newTidyText);
|
132
|
+
elementID = newTidyText;
|
133
|
+
}
|
134
|
+
|
135
|
+
readableID = elementID.replace(/-/g, ' ');
|
136
|
+
|
137
|
+
// The following code builds the following DOM structure in a more effiecient (albeit opaque) way.
|
138
|
+
// '<a class="anchorjs-link ' + this.options.class + '" href="#' + elementID + '" aria-label="Anchor" data-anchorjs-icon="' + this.options.icon + '"></a>';
|
139
|
+
anchor = document.createElement('a');
|
140
|
+
anchor.className = 'anchorjs-link ' + this.options.class;
|
141
|
+
anchor.href = '#' + elementID;
|
142
|
+
anchor.setAttribute('aria-label', this.options.ariaLabel);
|
143
|
+
anchor.setAttribute('data-anchorjs-icon', this.options.icon);
|
144
|
+
|
145
|
+
if (visibleOptionToUse === 'always') {
|
146
|
+
anchor.style.opacity = '1';
|
147
|
+
}
|
148
|
+
|
149
|
+
if (this.options.icon === '\ue9cb') {
|
150
|
+
anchor.style.font = '1em/1 anchorjs-icons';
|
151
|
+
|
152
|
+
// We set lineHeight = 1 here because the `anchorjs-icons` font family could otherwise affect the
|
153
|
+
// height of the heading. This isn't the case for icons with `placement: left`, so we restore
|
154
|
+
// line-height: inherit in that case, ensuring they remain positioned correctly. For more info,
|
155
|
+
// see https://github.com/bryanbraun/anchorjs/issues/39.
|
156
|
+
if (this.options.placement === 'left') {
|
157
|
+
anchor.style.lineHeight = 'inherit';
|
158
|
+
}
|
159
|
+
}
|
160
|
+
|
161
|
+
if (this.options.placement === 'left') {
|
162
|
+
anchor.style.position = 'absolute';
|
163
|
+
anchor.style.marginLeft = '-1em';
|
164
|
+
anchor.style.paddingRight = '0.5em';
|
165
|
+
elements[i].insertBefore(anchor, elements[i].firstChild);
|
166
|
+
} else { // if the option provided is `right` (or anything else).
|
167
|
+
anchor.style.paddingLeft = '0.375em';
|
168
|
+
elements[i].appendChild(anchor);
|
169
|
+
}
|
170
|
+
}
|
171
|
+
|
172
|
+
for (i = 0; i < indexesToDrop.length; i++) {
|
173
|
+
elements.splice(indexesToDrop[i] - i, 1);
|
174
|
+
}
|
175
|
+
this.elements = this.elements.concat(elements);
|
176
|
+
|
177
|
+
return this;
|
178
|
+
};
|
179
|
+
|
180
|
+
/**
|
181
|
+
* Removes all anchorjs-links from elements targed by the selector.
|
182
|
+
* @param {String|Array|Nodelist} selector - A CSS selector string targeting elements with anchor links,
|
183
|
+
* OR a nodeList / array containing the DOM elements.
|
184
|
+
* @return {this} - The AnchorJS object
|
185
|
+
*/
|
186
|
+
this.remove = function(selector) {
|
187
|
+
var index,
|
188
|
+
domAnchor,
|
189
|
+
elements = _getElements(selector);
|
190
|
+
|
191
|
+
for (var i = 0; i < elements.length; i++) {
|
192
|
+
domAnchor = elements[i].querySelector('.anchorjs-link');
|
193
|
+
if (domAnchor) {
|
194
|
+
// Drop the element from our main list, if it's in there.
|
195
|
+
index = this.elements.indexOf(elements[i]);
|
196
|
+
if (index !== -1) {
|
197
|
+
this.elements.splice(index, 1);
|
198
|
+
}
|
199
|
+
// Remove the anchor from the DOM.
|
200
|
+
elements[i].removeChild(domAnchor);
|
201
|
+
}
|
202
|
+
}
|
203
|
+
return this;
|
204
|
+
};
|
205
|
+
|
206
|
+
/**
|
207
|
+
* Removes all anchorjs links. Mostly used for tests.
|
208
|
+
*/
|
209
|
+
this.removeAll = function() {
|
210
|
+
this.remove(this.elements);
|
211
|
+
};
|
212
|
+
|
213
|
+
/**
|
214
|
+
* Urlify - Refine text so it makes a good ID.
|
215
|
+
*
|
216
|
+
* To do this, we remove apostrophes, replace nonsafe characters with hyphens,
|
217
|
+
* remove extra hyphens, truncate, trim hyphens, and make lowercase.
|
218
|
+
*
|
219
|
+
* @param {String} text - Any text. Usually pulled from the webpage element we are linking to.
|
220
|
+
* @return {String} - hyphen-delimited text for use in IDs and URLs.
|
221
|
+
*/
|
222
|
+
this.urlify = function(text) {
|
223
|
+
// Regex for finding the nonsafe URL characters (many need escaping): & +$,:;=?@"#{}|^~[`%!'<>]./()*\
|
224
|
+
var nonsafeChars = /[& +$,:;=?@"#{}|^~[`%!'<>\]\.\/\(\)\*\\]/g,
|
225
|
+
urlText;
|
226
|
+
|
227
|
+
// The reason we include this _applyRemainingDefaultOptions is so urlify can be called independently,
|
228
|
+
// even after setting options. This can be useful for tests or other applications.
|
229
|
+
if (!this.options.truncate) {
|
230
|
+
_applyRemainingDefaultOptions(this.options);
|
231
|
+
}
|
232
|
+
|
233
|
+
// Note: we trim hyphens after truncating because truncating can cause dangling hyphens.
|
234
|
+
// Example string: // " ⚡⚡ Don't forget: URL fragments should be i18n-friendly, hyphenated, short, and clean."
|
235
|
+
urlText = text.trim() // "⚡⚡ Don't forget: URL fragments should be i18n-friendly, hyphenated, short, and clean."
|
236
|
+
.replace(/\'/gi, '') // "⚡⚡ Dont forget: URL fragments should be i18n-friendly, hyphenated, short, and clean."
|
237
|
+
.replace(nonsafeChars, '-') // "⚡⚡-Dont-forget--URL-fragments-should-be-i18n-friendly--hyphenated--short--and-clean-"
|
238
|
+
.replace(/-{2,}/g, '-') // "⚡⚡-Dont-forget-URL-fragments-should-be-i18n-friendly-hyphenated-short-and-clean-"
|
239
|
+
.substring(0, this.options.truncate) // "⚡⚡-Dont-forget-URL-fragments-should-be-i18n-friendly-hyphenated-"
|
240
|
+
.replace(/^-+|-+$/gm, '') // "⚡⚡-Dont-forget-URL-fragments-should-be-i18n-friendly-hyphenated"
|
241
|
+
.toLowerCase(); // "⚡⚡-dont-forget-url-fragments-should-be-i18n-friendly-hyphenated"
|
242
|
+
|
243
|
+
return urlText;
|
244
|
+
};
|
245
|
+
|
246
|
+
/**
|
247
|
+
* Determines if this element already has an AnchorJS link on it.
|
248
|
+
* Uses this technique: http://stackoverflow.com/a/5898748/1154642
|
249
|
+
* @param {HTMLElemnt} el - a DOM node
|
250
|
+
* @return {Boolean} true/false
|
251
|
+
*/
|
252
|
+
this.hasAnchorJSLink = function(el) {
|
253
|
+
var hasLeftAnchor = el.firstChild && ((' ' + el.firstChild.className + ' ').indexOf(' anchorjs-link ') > -1),
|
254
|
+
hasRightAnchor = el.lastChild && ((' ' + el.lastChild.className + ' ').indexOf(' anchorjs-link ') > -1);
|
255
|
+
|
256
|
+
return hasLeftAnchor || hasRightAnchor || false;
|
257
|
+
};
|
258
|
+
|
259
|
+
/**
|
260
|
+
* Turns a selector, nodeList, or array of elements into an array of elements (so we can use array methods).
|
261
|
+
* It also throws errors on any other inputs. Used to handle inputs to .add and .remove.
|
262
|
+
* @param {String|Array|Nodelist} input - A CSS selector string targeting elements with anchor links,
|
263
|
+
* OR a nodeList / array containing the DOM elements.
|
264
|
+
* @return {Array} - An array containing the elements we want.
|
265
|
+
*/
|
266
|
+
function _getElements(input) {
|
267
|
+
var elements;
|
268
|
+
if (typeof input === 'string' || input instanceof String) {
|
269
|
+
// See https://davidwalsh.name/nodelist-array for the technique transforming nodeList -> Array.
|
270
|
+
elements = [].slice.call(document.querySelectorAll(input));
|
271
|
+
// I checked the 'input instanceof NodeList' test in IE9 and modern browsers and it worked for me.
|
272
|
+
} else if (Array.isArray(input) || input instanceof NodeList) {
|
273
|
+
elements = [].slice.call(input);
|
274
|
+
} else {
|
275
|
+
throw new Error('The selector provided to AnchorJS was invalid.');
|
276
|
+
}
|
277
|
+
return elements;
|
278
|
+
}
|
279
|
+
|
280
|
+
/**
|
281
|
+
* _addBaselineStyles
|
282
|
+
* Adds baseline styles to the page, used by all AnchorJS links irregardless of configuration.
|
283
|
+
*/
|
284
|
+
function _addBaselineStyles() {
|
285
|
+
// We don't want to add global baseline styles if they've been added before.
|
286
|
+
if (document.head.querySelector('style.anchorjs') !== null) {
|
287
|
+
return;
|
288
|
+
}
|
289
|
+
|
290
|
+
var style = document.createElement('style'),
|
291
|
+
linkRule =
|
292
|
+
' .anchorjs-link {' +
|
293
|
+
' opacity: 0;' +
|
294
|
+
' text-decoration: none;' +
|
295
|
+
' -webkit-font-smoothing: antialiased;' +
|
296
|
+
' -moz-osx-font-smoothing: grayscale;' +
|
297
|
+
' }',
|
298
|
+
hoverRule =
|
299
|
+
' *:hover > .anchorjs-link,' +
|
300
|
+
' .anchorjs-link:focus {' +
|
301
|
+
' opacity: 1;' +
|
302
|
+
' }',
|
303
|
+
anchorjsLinkFontFace =
|
304
|
+
' @font-face {' +
|
305
|
+
' font-family: "anchorjs-icons";' + // Icon from icomoon; 10px wide & 10px tall; 2 empty below & 4 above
|
306
|
+
' src: url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype");' +
|
307
|
+
' }',
|
308
|
+
pseudoElContent =
|
309
|
+
' [data-anchorjs-icon]::after {' +
|
310
|
+
' content: attr(data-anchorjs-icon);' +
|
311
|
+
' }',
|
312
|
+
firstStyleEl;
|
313
|
+
|
314
|
+
style.className = 'anchorjs';
|
315
|
+
style.appendChild(document.createTextNode('')); // Necessary for Webkit.
|
316
|
+
|
317
|
+
// We place it in the head with the other style tags, if possible, so as to
|
318
|
+
// not look out of place. We insert before the others so these styles can be
|
319
|
+
// overridden if necessary.
|
320
|
+
firstStyleEl = document.head.querySelector('[rel="stylesheet"], style');
|
321
|
+
if (firstStyleEl === undefined) {
|
322
|
+
document.head.appendChild(style);
|
323
|
+
} else {
|
324
|
+
document.head.insertBefore(style, firstStyleEl);
|
325
|
+
}
|
326
|
+
|
327
|
+
style.sheet.insertRule(linkRule, style.sheet.cssRules.length);
|
328
|
+
style.sheet.insertRule(hoverRule, style.sheet.cssRules.length);
|
329
|
+
style.sheet.insertRule(pseudoElContent, style.sheet.cssRules.length);
|
330
|
+
style.sheet.insertRule(anchorjsLinkFontFace, style.sheet.cssRules.length);
|
331
|
+
}
|
332
|
+
}
|
333
|
+
|
334
|
+
return AnchorJS;
|
335
|
+
}));
|