prettydocs_rails 1.1.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +57 -0
  3. data/README.md +91 -0
  4. data/Rakefile +34 -0
  5. data/app/assets/javascripts/prettydocs.js +6 -0
  6. data/app/assets/stylesheets/prettydocs.scss +6 -0
  7. data/lib/prettydocs_rails.rb +24 -0
  8. data/lib/prettydocs_rails/engine.rb +10 -0
  9. data/lib/prettydocs_rails/version.rb +3 -0
  10. data/vendor/assets/images/demo/appkit-account-billing-thumb.jpg +0 -0
  11. data/vendor/assets/images/demo/appkit-account-billing.jpg +0 -0
  12. data/vendor/assets/images/demo/appkit-account-drive-thumb.jpg +0 -0
  13. data/vendor/assets/images/demo/appkit-account-drive.jpg +0 -0
  14. data/vendor/assets/images/demo/appkit-account-messages-thumb.jpg +0 -0
  15. data/vendor/assets/images/demo/appkit-account-messages.jpg +0 -0
  16. data/vendor/assets/images/demo/appkit-account-profile-thumb.jpg +0 -0
  17. data/vendor/assets/images/demo/appkit-account-profile.jpg +0 -0
  18. data/vendor/assets/images/demo/appkit-account-reminders-thumb.jpg +0 -0
  19. data/vendor/assets/images/demo/appkit-account-reminders.jpg +0 -0
  20. data/vendor/assets/images/demo/appkit-account-settings-thumb.jpg +0 -0
  21. data/vendor/assets/images/demo/appkit-account-settings.jpg +0 -0
  22. data/vendor/assets/images/demo/appkit-activities-thumb.jpg +0 -0
  23. data/vendor/assets/images/demo/appkit-activities.jpg +0 -0
  24. data/vendor/assets/images/demo/appkit-chart-chartjs-thumb.jpg +0 -0
  25. data/vendor/assets/images/demo/appkit-chart-chartjs.jpg +0 -0
  26. data/vendor/assets/images/demo/appkit-chart-flot-thumb.jpg +0 -0
  27. data/vendor/assets/images/demo/appkit-chart-flot.jpg +0 -0
  28. data/vendor/assets/images/demo/appkit-chart-inline-thumb.jpg +0 -0
  29. data/vendor/assets/images/demo/appkit-chart-inline.jpg +0 -0
  30. data/vendor/assets/images/demo/appkit-chart-morris-thumb.jpg +0 -0
  31. data/vendor/assets/images/demo/appkit-chart-morris.jpg +0 -0
  32. data/vendor/assets/images/demo/appkit-dashboard-1-thumb.jpg +0 -0
  33. data/vendor/assets/images/demo/appkit-dashboard-1.jpg +0 -0
  34. data/vendor/assets/images/demo/appkit-dashboard-2-thumb.jpg +0 -0
  35. data/vendor/assets/images/demo/appkit-dashboard-2.jpg +0 -0
  36. data/vendor/assets/images/demo/appkit-dashboard-3-thumb.jpg +0 -0
  37. data/vendor/assets/images/demo/appkit-dashboard-3.jpg +0 -0
  38. data/vendor/assets/images/demo/appkit-dashboard-4-thumb.jpg +0 -0
  39. data/vendor/assets/images/demo/appkit-dashboard-4.jpg +0 -0
  40. data/vendor/assets/images/demo/appkit-discussion-thumb.jpg +0 -0
  41. data/vendor/assets/images/demo/appkit-discussion.jpg +0 -0
  42. data/vendor/assets/images/demo/appkit-discussions-thumb.jpg +0 -0
  43. data/vendor/assets/images/demo/appkit-discussions.jpg +0 -0
  44. data/vendor/assets/images/demo/appkit-inbox-thumb.jpg +0 -0
  45. data/vendor/assets/images/demo/appkit-inbox.jpg +0 -0
  46. data/vendor/assets/images/demo/appkit-member-thumb.jpg +0 -0
  47. data/vendor/assets/images/demo/appkit-member.jpg +0 -0
  48. data/vendor/assets/images/demo/appkit-members-thumb.jpg +0 -0
  49. data/vendor/assets/images/demo/appkit-members.jpg +0 -0
  50. data/vendor/assets/images/demo/appkit-pricing-thumb.jpg +0 -0
  51. data/vendor/assets/images/demo/appkit-pricing.jpg +0 -0
  52. data/vendor/assets/images/demo/appkit-project-thumb.jpg +0 -0
  53. data/vendor/assets/images/demo/appkit-project.jpg +0 -0
  54. data/vendor/assets/images/demo/appkit-projects-thumb.jpg +0 -0
  55. data/vendor/assets/images/demo/appkit-projects.jpg +0 -0
  56. data/vendor/assets/images/demo/appkit-tickets-thumb.jpg +0 -0
  57. data/vendor/assets/images/demo/appkit-tickets.jpg +0 -0
  58. data/vendor/assets/images/demo/appkit-timeline-thumb.jpg +0 -0
  59. data/vendor/assets/images/demo/appkit-timeline.jpg +0 -0
  60. data/vendor/assets/images/demo/appkit-widgets-thumb.jpg +0 -0
  61. data/vendor/assets/images/demo/appkit-widgets.jpg +0 -0
  62. data/vendor/assets/images/demo/author-profile.png +0 -0
  63. data/vendor/assets/images/demo/elegant-icon-font.jpg +0 -0
  64. data/vendor/assets/images/demo/fontawesome-icons.png +0 -0
  65. data/vendor/assets/images/demo/theme-atom.png +0 -0
  66. data/vendor/assets/images/demo/theme-college-green.png +0 -0
  67. data/vendor/assets/images/demo/theme-decibel.png +0 -0
  68. data/vendor/assets/images/demo/theme-delta.png +0 -0
  69. data/vendor/assets/images/demo/theme-devaid.png +0 -0
  70. data/vendor/assets/images/demo/theme-developer.png +0 -0
  71. data/vendor/assets/images/demo/theme-devstudio.png +0 -0
  72. data/vendor/assets/images/demo/theme-epicure.png +0 -0
  73. data/vendor/assets/images/demo/theme-matrimony.png +0 -0
  74. data/vendor/assets/images/demo/theme-onboard.png +0 -0
  75. data/vendor/assets/images/demo/theme-tempo.png +0 -0
  76. data/vendor/assets/images/demo/theme-trades.png +0 -0
  77. data/vendor/assets/images/demo/theme-velocity.png +0 -0
  78. data/vendor/assets/images/empty.gif +0 -0
  79. data/vendor/assets/javascripts/ekko-lightbox.js +602 -0
  80. data/vendor/assets/javascripts/jquery-match-height/CHANGELOG.md +24 -0
  81. data/vendor/assets/javascripts/jquery-match-height/LICENSE +21 -0
  82. data/vendor/assets/javascripts/jquery-match-height/README.md +170 -0
  83. data/vendor/assets/javascripts/jquery-match-height/bower.json +26 -0
  84. data/vendor/assets/javascripts/jquery-match-height/jquery.matchHeight-min.js +10 -0
  85. data/vendor/assets/javascripts/jquery-match-height/jquery.matchHeight.js +298 -0
  86. data/vendor/assets/javascripts/jquery-match-height/matchHeight.jquery.json +32 -0
  87. data/vendor/assets/javascripts/jquery-match-height/test.css +265 -0
  88. data/vendor/assets/javascripts/jquery-match-height/test.html +288 -0
  89. data/vendor/assets/javascripts/jquery-match-height/test.js +33 -0
  90. data/vendor/assets/javascripts/jquery-scrollTo/CHANGELOG +178 -0
  91. data/vendor/assets/javascripts/jquery-scrollTo/LICENSE +22 -0
  92. data/vendor/assets/javascripts/jquery-scrollTo/README.md +151 -0
  93. data/vendor/assets/javascripts/jquery-scrollTo/bower.json +28 -0
  94. data/vendor/assets/javascripts/jquery-scrollTo/composer.json +32 -0
  95. data/vendor/assets/javascripts/jquery-scrollTo/demo/css/style.css +150 -0
  96. data/vendor/assets/javascripts/jquery-scrollTo/demo/css/style.old.css +69 -0
  97. data/vendor/assets/javascripts/jquery-scrollTo/demo/index.html +252 -0
  98. data/vendor/assets/javascripts/jquery-scrollTo/demo/index.old.html +128 -0
  99. data/vendor/assets/javascripts/jquery-scrollTo/jquery.scrollTo.js +210 -0
  100. data/vendor/assets/javascripts/jquery-scrollTo/jquery.scrollTo.min.js +7 -0
  101. data/vendor/assets/javascripts/jquery-scrollTo/package.json +20 -0
  102. data/vendor/assets/javascripts/jquery-scrollTo/tests/ElemMaxY-compat.html +21 -0
  103. data/vendor/assets/javascripts/jquery-scrollTo/tests/ElemMaxY-quirks.html +20 -0
  104. data/vendor/assets/javascripts/jquery-scrollTo/tests/WinMaxY-compat.html +19 -0
  105. data/vendor/assets/javascripts/jquery-scrollTo/tests/WinMaxY-quirks.html +18 -0
  106. data/vendor/assets/javascripts/jquery-scrollTo/tests/WinMaxY-to-iframe-compat.html +20 -0
  107. data/vendor/assets/javascripts/jquery-scrollTo/tests/WinMaxY-to-iframe-quirks.html +19 -0
  108. data/vendor/assets/javascripts/jquery-scrollTo/tests/WinMaxY-with-iframe-compat.html +11 -0
  109. data/vendor/assets/javascripts/jquery-scrollTo/tests/WinMaxY-with-iframe-quirks.html +10 -0
  110. data/vendor/assets/javascripts/jquery-scrollTo/tests/index.html +24 -0
  111. data/vendor/assets/javascripts/jquery-scrollTo/tests/test.js +21 -0
  112. data/vendor/assets/javascripts/main.js +47 -0
  113. data/vendor/assets/javascripts/prism.js +18 -0
  114. data/vendor/assets/stylesheets/ekko-lightbox.scss +2 -0
  115. data/vendor/assets/stylesheets/prism.scss +163 -0
  116. data/vendor/assets/stylesheets/styles.scss +1267 -0
  117. metadata +267 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1a5472ec352a97dbe8f978f5834507da4c296b64
4
+ data.tar.gz: 6732dca5fd4682f8b688f91ac7e914b33228fd48
5
+ SHA512:
6
+ metadata.gz: 655a6127e89feadaa87da3bb3dc1507aee1bbcb22647f7e62c1163909b0b30c3b283447b8eb621ce96f5896aaa2c38b9d7452cf7153304340307528817174173
7
+ data.tar.gz: b2a67eb00e6d05d7772ef739fe84706109b5f6c67e53e57096c5d20b9f86b9088b36b39b15dd75beada24feb7ce4d90a4e587df3e9e46c7a096b64ee69123f42
data/LICENSE ADDED
@@ -0,0 +1,57 @@
1
+ Copyright 2016 NewsDesk Ninja, Inc.
2
+
3
+ Source: https://creativecommons.org/licenses/by/3.0/legalcode
4
+
5
+ THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
6
+
7
+ BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
8
+
9
+ 1. Definitions
10
+
11
+ "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License.
12
+ "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License.
13
+ "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership.
14
+ "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License.
15
+ "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast.
16
+ "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work.
17
+ "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.
18
+ "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images.
19
+ "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium.
20
+ 2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws.
21
+
22
+ 3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:
23
+
24
+ to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections;
25
+ to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified.";
26
+ to Distribute and Publicly Perform the Work including as incorporated in Collections; and,
27
+ to Distribute and Publicly Perform Adaptations.
28
+ For the avoidance of doubt:
29
+
30
+ Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License;
31
+ Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and,
32
+ Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License.
33
+ The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved.
34
+
35
+ 4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:
36
+
37
+ You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(b), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(b), as requested.
38
+ If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Section 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4 (b) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties.
39
+ Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise.
40
+ 5. Representations, Warranties and Disclaimer
41
+
42
+ UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
43
+
44
+ 6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
45
+
46
+ 7. Termination
47
+
48
+ This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
49
+ Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.
50
+ 8. Miscellaneous
51
+
52
+ Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
53
+ Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.
54
+ If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
55
+ No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
56
+ This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.
57
+ The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law.
data/README.md ADDED
@@ -0,0 +1,91 @@
1
+ # PrettyDocs Rails
2
+ A rails plugin for the PrettyDocs Bootstrap theme.
3
+
4
+ ## Dependencies
5
+
6
+ This is has been tested on the following:
7
+
8
+ * Ruby 2.3.3
9
+ * Rails 5.0.0.1
10
+
11
+ Other dependencies:
12
+
13
+ * [Bootstrap Sass](https://github.com/twbs/bootstrap-sass)
14
+ * [Font-Awesome Rails](https://github.com/bokmann/font-awesome-rails)
15
+ * NOT INCLUDED: Elegant Icon Font is not currently included.
16
+
17
+ ## Installation
18
+ Add this line to your application's Gemfile:
19
+
20
+ ```ruby
21
+ # PrettyDocs Rails
22
+ gem 'prettydocs_rails'
23
+ ```
24
+
25
+ ## Usage
26
+ How to use this plugin.
27
+
28
+ ### Sass
29
+
30
+ Change your `application.css` to `application.scss`.
31
+
32
+ ```console
33
+ $ mv app/assets/stylesheets/application.css app/assets/stylesheets/application.scss
34
+ ```
35
+
36
+ Then, remove all the `*= require_self` and `*= require_tree .` statements from the sass file. Instead, use `@import` to import Sass files.
37
+
38
+ Do not use `*= require` in Sass or your other stylesheets will not be [able to access][antirequire] the Bootstrap mixins or variables.
39
+
40
+ Using [SCSS](http://sass-lang.com/documentation/file.SASS_REFERENCE.html), add this to your
41
+ `application.scss` file:
42
+
43
+ ```scss
44
+ @import "prettydocs";
45
+ ```
46
+
47
+ ### JavaScript
48
+
49
+ Add the following line to your `application.js` file:
50
+
51
+ ```js
52
+ //= require prettydocs
53
+ ```
54
+
55
+ ### Demo
56
+
57
+ A live demo of PrettyDocs is available at [http://themes.3rdwavemedia.com/demo/prettydocs/index.html](http://themes.3rdwavemedia.com/demo/prettydocs/index.html). To view example pages, download the original files.
58
+
59
+ ## Contributing
60
+ * [Michael Price](http://twitter.com/michaeljprice)
61
+
62
+ ## Features
63
+ * Fully Responsive
64
+ * HTML5 + CSS3
65
+ * Built on Bootstrap 3
66
+ * 6 Colour Schemes
67
+ * 600+ FontAwesome icons
68
+ * LESS files included
69
+ * Compatible with all modern browsers
70
+
71
+ ## PrettyDocs Credits
72
+ * [Xiaoying Riley](https://twitter.com/3rdwave_themes)
73
+ * [3rd Wave Media](http://themes.3rdwavemedia.com/demo/prettydocs/license.html)
74
+ * [Bootstrap](http://getbootstrap.com/)
75
+ * [FontAwesome](http://fortawesome.github.io/Font-Awesome/)
76
+ * [Elegant icon font](http://www.elegantthemes.com/blog/resources/elegant-icon-font)
77
+ * [Google Fonts](http://www.google.com/webfonts)
78
+ * [jQuery](http://jquery.com/)
79
+ * [Prism](http://prismjs.com/index.html)
80
+ * [Bootstrap Lightbox](http://ashleydw.github.io/lightbox/)
81
+ * [jQuery ScrollTo](http://flesler.blogspot.co.uk/2007/10/jqueryscrollto.html)
82
+ * [jQuery Match Height](http://brm.io/jquery-match-height/)
83
+
84
+ ## License
85
+ PrettyDocs is made by UX designer [Xiaoying Riley](https://twitter.com/3rdwave_themes) for developers and is 100% FREE under the Creative Commons Attribution 3.0 License (CC BY 3.0).
86
+
87
+ PrettyDocs on [Github](https://github.com/xriley/PrettyDocs-Theme).
88
+
89
+ The gem is available as open source under the terms of the [Creative Commons Attribution 3.0 License (CC BY 3.0)](http://creativecommons.org/licenses/by/3.0/).
90
+
91
+ Copyright 2016 NewsDesk Ninja, Inc.
data/Rakefile ADDED
@@ -0,0 +1,34 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'PrettydocsRails'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.md')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+
18
+
19
+
20
+
21
+
22
+ require 'bundler/gem_tasks'
23
+
24
+ require 'rake/testtask'
25
+
26
+ Rake::TestTask.new(:test) do |t|
27
+ t.libs << 'lib'
28
+ t.libs << 'test'
29
+ t.pattern = 'test/**/*_test.rb'
30
+ t.verbose = false
31
+ end
32
+
33
+
34
+ task default: :test
@@ -0,0 +1,6 @@
1
+ //= require bootstrap-sprockets
2
+ //= require jquery-match-height/jquery.matchHeight
3
+ //= require jquery-scrollTo/jquery.scrollTo
4
+ //= require main
5
+ //= require prism
6
+ //= require ekko-lightbox
@@ -0,0 +1,6 @@
1
+ @import "bootstrap-sprockets";
2
+ @import "bootstrap";
3
+ @import "font-awesome";
4
+ @import "styles";
5
+ @import "prism";
6
+ @import "ekko-lightbox";
@@ -0,0 +1,24 @@
1
+ require 'bootstrap-sass'
2
+ require 'font-awesome-rails'
3
+ require 'prettydocs_rails/engine'
4
+ require 'prettydocs_rails/version'
5
+
6
+ module PrettydocsRails
7
+ class << self
8
+
9
+ def load!
10
+ configure_sass
11
+ end
12
+
13
+ def stylesheets_path
14
+ File.join assets_path, 'stylesheets'
15
+ end
16
+
17
+ private
18
+ def configure_sass
19
+ require 'sass'
20
+
21
+ Bootstrap::Sass.load_paths << stylesheets_path
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,10 @@
1
+ module PrettydocsRails
2
+ class Engine < ::Rails::Engine
3
+ initializer 'prettydocs_rails.assets.precompile' do |app|
4
+ %w(stylesheets javascripts fonts images).each do |sub|
5
+ app.config.assets.paths << root.join('assets', sub).to_s
6
+ app.config.assets.paths << root.join('vendor', 'assets', sub).to_s
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,3 @@
1
+ module PrettydocsRails
2
+ VERSION = '1.1.16'
3
+ end
Binary file
@@ -0,0 +1,602 @@
1
+ /*!
2
+ * Lightbox for Bootstrap by @ashleydw
3
+ * https://github.com/ashleydw/lightbox
4
+ *
5
+ * License: https://github.com/ashleydw/lightbox/blob/master/LICENSE
6
+ */
7
+ +function ($) {
8
+
9
+ 'use strict';
10
+
11
+ var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
12
+
13
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
14
+
15
+ var Lightbox = (function ($) {
16
+
17
+ var NAME = 'ekkoLightbox';
18
+ var JQUERY_NO_CONFLICT = $.fn[NAME];
19
+
20
+ var Default = {
21
+ title: '',
22
+ footer: '',
23
+ showArrows: true, //display the left / right arrows or not
24
+ type: null, //force the lightbox into image / youtube mode. if null, or not image|youtube|vimeo; detect it
25
+ alwaysShowClose: false, //always show the close button, even if there is no title
26
+ loadingMessage: '<div class="ekko-lightbox-loader"><div><div></div><div></div></div></div>', // http://tobiasahlin.com/spinkit/
27
+ leftArrow: '<span>&#10094;</span>',
28
+ rightArrow: '<span>&#10095;</span>',
29
+ strings: {
30
+ close: 'Close',
31
+ fail: 'Failed to load image:',
32
+ type: 'Could not detect remote target type. Force the type using data-type'
33
+ },
34
+ doc: document, // if in an iframe can specify top.document
35
+ onShow: function onShow() {},
36
+ onShown: function onShown() {},
37
+ onHide: function onHide() {},
38
+ onHidden: function onHidden() {},
39
+ onNavigate: function onNavigate() {},
40
+ onContentLoaded: function onContentLoaded() {}
41
+ };
42
+
43
+ var Lightbox = (function () {
44
+ _createClass(Lightbox, null, [{
45
+ key: 'Default',
46
+
47
+ /**
48
+
49
+ Class properties:
50
+
51
+ _$element: null -> the <a> element currently being displayed
52
+ _$modal: The bootstrap modal generated
53
+ _$modalDialog: The .modal-dialog
54
+ _$modalContent: The .modal-content
55
+ _$modalBody: The .modal-body
56
+ _$modalHeader: The .modal-header
57
+ _$modalFooter: The .modal-footer
58
+ _$lightboxContainerOne: Container of the first lightbox element
59
+ _$lightboxContainerTwo: Container of the second lightbox element
60
+ _$lightboxBody: First element in the container
61
+ _$modalArrows: The overlayed arrows container
62
+ _$galleryItems: Other <a>'s available for this gallery
63
+ _galleryName: Name of the current data('gallery') showing
64
+ _galleryIndex: The current index of the _$galleryItems being shown
65
+ _config: {} the options for the modal
66
+ _modalId: unique id for the current lightbox
67
+ _padding / _border: CSS properties for the modal container; these are used to calculate the available space for the content
68
+ */
69
+
70
+ get: function get() {
71
+ return Default;
72
+ }
73
+ }]);
74
+
75
+ function Lightbox($element, config) {
76
+ var _this = this;
77
+
78
+ _classCallCheck(this, Lightbox);
79
+
80
+ this._config = $.extend({}, Default, config);
81
+ this._$modalArrows = null;
82
+ this._galleryIndex = 0;
83
+ this._galleryName = null;
84
+ this._padding = null;
85
+ this._border = null;
86
+ this._titleIsShown = false;
87
+ this._footerIsShown = false;
88
+ this._wantedWidth = 0;
89
+ this._wantedHeight = 0;
90
+ this._modalId = 'ekkoLightbox-' + Math.floor(Math.random() * 1000 + 1);
91
+ this._$element = $element instanceof jQuery ? $element : $($element);
92
+
93
+ var header = '<div class="modal-header"' + (this._config.title || this._config.alwaysShowClose ? '' : ' style="display:none"') + '><button type="button" class="close" data-dismiss="modal" aria-label="' + this._config.strings.close + '"><span aria-hidden="true">&times;</span></button><h4 class="modal-title">' + (this._config.title || "&nbsp;") + '</h4></div>';
94
+ var footer = '<div class="modal-footer"' + (this._config.footer ? '' : ' style="display:none"') + '>' + (this._config.footer || "&nbsp;") + '</div>';
95
+ var body = '<div class="modal-body"><div class="ekko-lightbox-container"><div class="ekko-lightbox-item fade in"></div><div class="ekko-lightbox-item fade"></div></div></div>';
96
+ var dialog = '<div class="modal-dialog" role="document"><div class="modal-content">' + header + body + footer + '</div></div>';
97
+ $(this._config.doc.body).append('<div id="' + this._modalId + '" class="ekko-lightbox modal fade" tabindex="-1" tabindex="-1" role="dialog" aria-hidden="true">' + dialog + '</div>');
98
+
99
+ this._$modal = $('#' + this._modalId, this._config.doc);
100
+ this._$modalDialog = this._$modal.find('.modal-dialog').first();
101
+ this._$modalContent = this._$modal.find('.modal-content').first();
102
+ this._$modalBody = this._$modal.find('.modal-body').first();
103
+ this._$modalHeader = this._$modal.find('.modal-header').first();
104
+ this._$modalFooter = this._$modal.find('.modal-footer').first();
105
+
106
+ this._$lightboxContainer = this._$modalBody.find('.ekko-lightbox-container').first();
107
+ this._$lightboxBodyOne = this._$lightboxContainer.find('> div:first-child').first();
108
+ this._$lightboxBodyTwo = this._$lightboxContainer.find('> div:last-child').first();
109
+
110
+ this._border = this._calculateBorders();
111
+ this._padding = this._calculatePadding();
112
+
113
+ this._galleryName = this._$element.data('gallery');
114
+ if (this._galleryName) {
115
+ this._$galleryItems = $(document.body).find('*[data-gallery="' + this._galleryName + '"]');
116
+ this._galleryIndex = this._$galleryItems.index(this._$element);
117
+ $(document).on('keydown.ekkoLightbox', this._navigationalBinder.bind(this));
118
+
119
+ // add the directional arrows to the modal
120
+ if (this._config.showArrows && this._$galleryItems.length > 1) {
121
+ this._$lightboxContainer.append('<div class="ekko-lightbox-nav-overlay"><a href="#">' + this._config.leftArrow + '</a><a href="#">' + this._config.rightArrow + '</a></div>');
122
+ this._$modalArrows = this._$lightboxContainer.find('div.ekko-lightbox-nav-overlay').first();
123
+ this._$lightboxContainer.on('click', 'a:first-child', function (event) {
124
+ event.preventDefault();
125
+ return _this.navigateLeft();
126
+ });
127
+ this._$lightboxContainer.on('click', 'a:last-child', function (event) {
128
+ event.preventDefault();
129
+ return _this.navigateRight();
130
+ });
131
+ }
132
+ }
133
+
134
+ this._$modal.on('show.bs.modal', this._config.onShow.bind(this)).on('shown.bs.modal', function () {
135
+ _this._toggleLoading(true);
136
+ _this._handle();
137
+ return _this._config.onShown.call(_this);
138
+ }).on('hide.bs.modal', this._config.onHide.bind(this)).on('hidden.bs.modal', function () {
139
+ if (_this._galleryName) {
140
+ $(document).off('keydown.ekkoLightbox');
141
+ $(window).off('resize.ekkoLightbox');
142
+ }
143
+ _this._$modal.remove();
144
+ return _this._config.onHidden.call(_this);
145
+ }).modal(this._config);
146
+
147
+ $(window).on('resize.ekkoLightbox', function () {
148
+ _this._resize(_this._wantedWidth, _this._wantedHeight);
149
+ });
150
+ }
151
+
152
+ _createClass(Lightbox, [{
153
+ key: 'element',
154
+ value: function element() {
155
+ return this._$element;
156
+ }
157
+ }, {
158
+ key: 'modal',
159
+ value: function modal() {
160
+ return this._$modal;
161
+ }
162
+ }, {
163
+ key: 'navigateTo',
164
+ value: function navigateTo(index) {
165
+
166
+ if (index < 0 || index > this._$galleryItems.length - 1) return this;
167
+
168
+ this._galleryIndex = index;
169
+
170
+ this._$element = $(this._$galleryItems.get(this._galleryIndex));
171
+ this._handle();
172
+ }
173
+ }, {
174
+ key: 'navigateLeft',
175
+ value: function navigateLeft() {
176
+
177
+ if (this._$galleryItems.length === 1) return;
178
+
179
+ if (this._galleryIndex === 0) this._galleryIndex = this._$galleryItems.length - 1;else //circular
180
+ this._galleryIndex--;
181
+
182
+ this._config.onNavigate.call(this, 'left', this._galleryIndex);
183
+ return this.navigateTo(this._galleryIndex);
184
+ }
185
+ }, {
186
+ key: 'navigateRight',
187
+ value: function navigateRight() {
188
+
189
+ if (this._$galleryItems.length === 1) return;
190
+
191
+ if (this._galleryIndex === this._$galleryItems.length - 1) this._galleryIndex = 0;else //circular
192
+ this._galleryIndex++;
193
+
194
+ this._config.onNavigate.call(this, 'right', this._galleryIndex);
195
+ return this.navigateTo(this._galleryIndex);
196
+ }
197
+ }, {
198
+ key: 'close',
199
+ value: function close() {
200
+ return this._$modal.modal('hide');
201
+ }
202
+
203
+ // helper private methods
204
+ }, {
205
+ key: '_navigationalBinder',
206
+ value: function _navigationalBinder(event) {
207
+ event = event || window.event;
208
+ if (event.keyCode === 39) return this.navigateRight();
209
+ if (event.keyCode === 37) return this.navigateLeft();
210
+ }
211
+
212
+ // type detection private methods
213
+ }, {
214
+ key: '_detectRemoteType',
215
+ value: function _detectRemoteType(src, type) {
216
+
217
+ type = type || false;
218
+
219
+ if (!type && this._isImage(src)) type = 'image';
220
+ if (!type && this._getYoutubeId(src)) type = 'youtube';
221
+ if (!type && this._getVimeoId(src)) type = 'vimeo';
222
+ if (!type && this._getInstagramId(src)) type = 'instagram';
223
+
224
+ if (!type || ['image', 'youtube', 'vimeo', 'instagram', 'video', 'url'].indexOf(type) < 0) type = 'url';
225
+
226
+ return type;
227
+ }
228
+ }, {
229
+ key: '_isImage',
230
+ value: function _isImage(string) {
231
+ return string && string.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i);
232
+ }
233
+ }, {
234
+ key: '_containerToUse',
235
+ value: function _containerToUse() {
236
+ var _this2 = this;
237
+
238
+ // if currently showing an image, fade it out and remove
239
+ var $toUse = this._$lightboxBodyTwo;
240
+ var $current = this._$lightboxBodyOne;
241
+
242
+ if (this._$lightboxBodyTwo.hasClass('in')) {
243
+ $toUse = this._$lightboxBodyOne;
244
+ $current = this._$lightboxBodyTwo;
245
+ }
246
+
247
+ $current.removeClass('in');
248
+ setTimeout(function () {
249
+ if (!_this2._$lightboxBodyTwo.hasClass('in')) _this2._$lightboxBodyTwo.empty();
250
+ if (!_this2._$lightboxBodyOne.hasClass('in')) _this2._$lightboxBodyOne.empty();
251
+ }, 500);
252
+
253
+ $toUse.addClass('in');
254
+ return $toUse;
255
+ }
256
+ }, {
257
+ key: '_handle',
258
+ value: function _handle() {
259
+
260
+ var $toUse = this._containerToUse();
261
+ this._updateTitleAndFooter();
262
+
263
+ var currentRemote = this._$element.attr('data-remote') || this._$element.attr('href');
264
+ var currentType = this._detectRemoteType(currentRemote, this._$element.attr('data-type') || false);
265
+
266
+ if (['image', 'youtube', 'vimeo', 'instagram', 'video', 'url'].indexOf(currentType) < 0) return this._error(this._config.strings.type);
267
+
268
+ switch (currentType) {
269
+ case 'image':
270
+ this._preloadImage(currentRemote, $toUse);
271
+ this._preloadImageByIndex(this._galleryIndex, 3);
272
+ break;
273
+ case 'youtube':
274
+ this._showYoutubeVideo(currentRemote, $toUse);
275
+ break;
276
+ case 'vimeo':
277
+ this._showVimeoVideo(this._getVimeoId(currentRemote), $toUse);
278
+ break;
279
+ case 'instagram':
280
+ this._showInstagramVideo(this._getInstagramId(currentRemote), $toUse);
281
+ break;
282
+ case 'video':
283
+ this._showHtml5Video(currentRemote, $toUse);
284
+ break;
285
+ default:
286
+ // url
287
+ this._loadRemoteContent(currentRemote, $toUse);
288
+ break;
289
+ }
290
+
291
+ return this;
292
+ }
293
+ }, {
294
+ key: '_getYoutubeId',
295
+ value: function _getYoutubeId(string) {
296
+ if (!string) return false;
297
+ var matches = string.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);
298
+ return matches && matches[2].length === 11 ? matches[2] : false;
299
+ }
300
+ }, {
301
+ key: '_getVimeoId',
302
+ value: function _getVimeoId(string) {
303
+ return string && string.indexOf('vimeo') > 0 ? string : false;
304
+ }
305
+ }, {
306
+ key: '_getInstagramId',
307
+ value: function _getInstagramId(string) {
308
+ return string && string.indexOf('instagram') > 0 ? string : false;
309
+ }
310
+
311
+ // layout private methods
312
+ }, {
313
+ key: '_toggleLoading',
314
+ value: function _toggleLoading(show) {
315
+ show = show || false;
316
+ if (show) {
317
+ this._$modalDialog.css('display', 'none');
318
+ this._$modal.removeClass('in');
319
+ $('.modal-backdrop').append(this._config.loadingMessage);
320
+ } else {
321
+ this._$modalDialog.css('display', 'block');
322
+ this._$modal.addClass('in');
323
+ $('.modal-backdrop').find('.ekko-lightbox-loader').remove();
324
+ }
325
+ return this;
326
+ }
327
+ }, {
328
+ key: '_calculateBorders',
329
+ value: function _calculateBorders() {
330
+ return {
331
+ top: this._totalCssByAttribute('border-top-width'),
332
+ right: this._totalCssByAttribute('border-right-width'),
333
+ bottom: this._totalCssByAttribute('border-bottom-width'),
334
+ left: this._totalCssByAttribute('border-left-width')
335
+ };
336
+ }
337
+ }, {
338
+ key: '_calculatePadding',
339
+ value: function _calculatePadding() {
340
+ return {
341
+ top: this._totalCssByAttribute('padding-top'),
342
+ right: this._totalCssByAttribute('padding-right'),
343
+ bottom: this._totalCssByAttribute('padding-bottom'),
344
+ left: this._totalCssByAttribute('padding-left')
345
+ };
346
+ }
347
+ }, {
348
+ key: '_totalCssByAttribute',
349
+ value: function _totalCssByAttribute(attribute) {
350
+ return parseInt(this._$modalDialog.css(attribute), 10) + parseInt(this._$modalContent.css(attribute), 10) + parseInt(this._$modalBody.css(attribute), 10);
351
+ }
352
+ }, {
353
+ key: '_updateTitleAndFooter',
354
+ value: function _updateTitleAndFooter() {
355
+ var title = this._$element.data('title') || "";
356
+ var caption = this._$element.data('footer') || "";
357
+
358
+ this._titleIsShown = false;
359
+ if (title || this._config.alwaysShowClose) {
360
+ this._titleIsShown = true;
361
+ this._$modalHeader.css('display', '').find('.modal-title').html(title || "&nbsp;");
362
+ } else this._$modalHeader.css('display', 'none');
363
+
364
+ this._footerIsShown = false;
365
+ if (caption) {
366
+ this._footerIsShown = true;
367
+ this._$modalFooter.css('display', '').html(caption);
368
+ } else this._$modalFooter.css('display', 'none');
369
+
370
+ return this;
371
+ }
372
+ }, {
373
+ key: '_showYoutubeVideo',
374
+ value: function _showYoutubeVideo(remote, $containerForElement) {
375
+ var id = this._getYoutubeId(remote);
376
+ var query = remote.indexOf('&') > 0 ? remote.substr(remote.indexOf('&')) : '';
377
+ var width = this._$element.data('width') || 560;
378
+ var height = this._$element.data('height') || width / (560 / 315);
379
+ return this._showVideoIframe('//www.youtube.com/embed/' + id + '?badge=0&autoplay=1&html5=1' + query, width, height, $containerForElement);
380
+ }
381
+ }, {
382
+ key: '_showVimeoVideo',
383
+ value: function _showVimeoVideo(id, $containerForElement) {
384
+ var width = 500;
385
+ var height = this._$element.data('height') || width / (560 / 315);
386
+ return this._showVideoIframe(id + '?autoplay=1', width, height, $containerForElement);
387
+ }
388
+ }, {
389
+ key: '_showInstagramVideo',
390
+ value: function _showInstagramVideo(id, $containerForElement) {
391
+ // instagram load their content into iframe's so this can be put straight into the element
392
+ var width = this._$element.data('width') || 612;
393
+ var height = width + 80;
394
+ id = id.substr(-1) !== '/' ? id + '/' : id; // ensure id has trailing slash
395
+ $containerForElement.html('<iframe width="' + width + '" height="' + height + '" src="' + id + 'embed/" frameborder="0" allowfullscreen></iframe>');
396
+ this._resize(width, height);
397
+ this._config.onContentLoaded.call(this);
398
+ if (this._$modalArrows) //hide the arrows when showing video
399
+ this._$modalArrows.css('display', 'none');
400
+ this._toggleLoading(false);
401
+ return this;
402
+ }
403
+ }, {
404
+ key: '_showVideoIframe',
405
+ value: function _showVideoIframe(url, width, height, $containerForElement) {
406
+ // should be used for videos only. for remote content use loadRemoteContent (data-type=url)
407
+ height = height || width; // default to square
408
+ $containerForElement.html('<div class="embed-responsive embed-responsive-16by9"><iframe width="' + width + '" height="' + height + '" src="' + url + '" frameborder="0" allowfullscreen class="embed-responsive-item"></iframe></div>');
409
+ this._resize(width, height);
410
+ this._config.onContentLoaded.call(this);
411
+ if (this._$modalArrows) this._$modalArrows.css('display', 'none'); //hide the arrows when showing video
412
+ this._toggleLoading(false);
413
+ return this;
414
+ }
415
+ }, {
416
+ key: '_showHtml5Video',
417
+ value: function _showHtml5Video(url, $containerForElement) {
418
+ // should be used for videos only. for remote content use loadRemoteContent (data-type=url)
419
+ var width = this._$element.data('width') || 560;
420
+ var height = this._$element.data('height') || width / (560 / 315);
421
+ $containerForElement.html('<div class="embed-responsive embed-responsive-16by9"><video width="' + width + '" height="' + height + '" src="' + url + '" preload="auto" autoplay controls class="embed-responsive-item"></video></div>');
422
+ this._resize(width, height);
423
+ this._config.onContentLoaded.call(this);
424
+ if (this._$modalArrows) this._$modalArrows.css('display', 'none'); //hide the arrows when showing video
425
+ this._toggleLoading(false);
426
+ return this;
427
+ }
428
+ }, {
429
+ key: '_loadRemoteContent',
430
+ value: function _loadRemoteContent(url, $containerForElement) {
431
+ var _this3 = this;
432
+
433
+ var width = this._$element.data('width') || 560;
434
+ var height = this._$element.data('height') || 560;
435
+
436
+ var disableExternalCheck = this._$element.data('disableExternalCheck') || false;
437
+ this._toggleLoading(false);
438
+
439
+ // external urls are loading into an iframe
440
+ // local ajax can be loaded into the container itself
441
+ if (!disableExternalCheck && !this._isExternal(url)) {
442
+ $containerForElement.load(url, $.proxy(function () {
443
+ return _this3._$element.trigger('loaded.bs.modal');l;
444
+ }));
445
+ } else {
446
+ $containerForElement.html('<iframe src="' + url + '" frameborder="0" allowfullscreen></iframe>');
447
+ this._config.onContentLoaded.call(this);
448
+ }
449
+
450
+ if (this._$modalArrows) //hide the arrows when remote content
451
+ this._$modalArrows.css('display', 'none');
452
+
453
+ this._resize(width, height);
454
+ return this;
455
+ }
456
+ }, {
457
+ key: '_isExternal',
458
+ value: function _isExternal(url) {
459
+ var match = url.match(/^([^:\/?#]+:)?(?:\/\/([^\/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/);
460
+ if (typeof match[1] === "string" && match[1].length > 0 && match[1].toLowerCase() !== location.protocol) return true;
461
+
462
+ if (typeof match[2] === "string" && match[2].length > 0 && match[2].replace(new RegExp(':(' + ({
463
+ "http:": 80,
464
+ "https:": 443
465
+ })[location.protocol] + ')?$'), "") !== location.host) return true;
466
+
467
+ return false;
468
+ }
469
+ }, {
470
+ key: '_error',
471
+ value: function _error(message) {
472
+ console.error(message);
473
+ this._containerToUse().html(message);
474
+ this._resize(300, 300);
475
+ return this;
476
+ }
477
+ }, {
478
+ key: '_preloadImageByIndex',
479
+ value: function _preloadImageByIndex(startIndex, numberOfTimes) {
480
+
481
+ if (!this._$galleryItems) return;
482
+
483
+ var next = $(this._$galleryItems.get(startIndex), false);
484
+ if (typeof next == 'undefined') return;
485
+
486
+ var src = next.attr('data-remote') || next.attr('href');
487
+ if (next.attr('data-type') === 'image' || this._isImage(src)) this._preloadImage(src, false);
488
+
489
+ if (numberOfTimes > 0) return this._preloadImageByIndex(startIndex + 1, numberOfTimes - 1);
490
+ }
491
+ }, {
492
+ key: '_preloadImage',
493
+ value: function _preloadImage(src, $containerForImage) {
494
+ var _this4 = this;
495
+
496
+ $containerForImage = $containerForImage || false;
497
+
498
+ var img = new Image();
499
+ if ($containerForImage) {
500
+ (function () {
501
+
502
+ // if loading takes > 200ms show a loader
503
+ var loadingTimeout = setTimeout(function () {
504
+ $containerForImage.append(_this4._config.loadingMessage);
505
+ }, 200);
506
+
507
+ img.onload = function () {
508
+ if (loadingTimeout) clearTimeout(loadingTimeout);
509
+ loadingTimeout = null;
510
+ var image = $('<img />');
511
+ image.attr('src', img.src);
512
+ image.addClass('img-fluid');
513
+ $containerForImage.html(image);
514
+ if (_this4._$modalArrows) _this4._$modalArrows.css('display', ''); // remove display to default to css property
515
+
516
+ _this4._resize(img.width, img.height);
517
+ _this4._toggleLoading(false);
518
+ return _this4._config.onContentLoaded.call(_this4);
519
+ };
520
+ img.onerror = function () {
521
+ _this4._toggleLoading(false);
522
+ return _this4._error(_this4._config.strings.fail + (' ' + src));
523
+ };
524
+ })();
525
+ }
526
+
527
+ img.src = src;
528
+ return img;
529
+ }
530
+ }, {
531
+ key: '_resize',
532
+ value: function _resize(width, height) {
533
+
534
+ height = height || width;
535
+ this._wantedWidth = width;
536
+ this._wantedHeight = height;
537
+
538
+ // if width > the available space, scale down the expected width and height
539
+ var widthBorderAndPadding = this._padding.left + this._padding.right + this._border.left + this._border.right;
540
+ var maxWidth = Math.min(width + widthBorderAndPadding, this._config.doc.body.clientWidth);
541
+ if (width + widthBorderAndPadding > maxWidth) {
542
+ height = (maxWidth - widthBorderAndPadding) / width * height;
543
+ width = maxWidth;
544
+ } else width = width + widthBorderAndPadding;
545
+
546
+ var headerHeight = 0,
547
+ footerHeight = 0;
548
+
549
+ // as the resize is performed the modal is show, the calculate might fail
550
+ // if so, default to the default sizes
551
+ if (this._footerIsShown) footerHeight = this._$modalFooter.outerHeight(true) || 55;
552
+
553
+ if (this._titleIsShown) headerHeight = this._$modalHeader.outerHeight(true) || 67;
554
+
555
+ var borderPadding = this._padding.top + this._padding.bottom + this._border.bottom + this._border.top;
556
+
557
+ //calculated each time as resizing the window can cause them to change due to Bootstraps fluid margins
558
+ var margins = parseFloat(this._$modalDialog.css('margin-top')) + parseFloat(this._$modalDialog.css('margin-bottom'));
559
+
560
+ var maxHeight = Math.min(height, $(window).height() - borderPadding - margins - headerHeight - footerHeight);
561
+ if (height > maxHeight) {
562
+ // if height > the available height, scale down the width
563
+ var factor = Math.min(maxHeight / height, 1);
564
+ width = Math.ceil(factor * width);
565
+ }
566
+
567
+ this._$lightboxContainer.css('height', maxHeight);
568
+ this._$modalDialog.css('width', 'auto').css('maxWidth', width);
569
+
570
+ this._$modal.modal('_handleUpdate');
571
+ return this;
572
+ }
573
+ }], [{
574
+ key: '_jQueryInterface',
575
+ value: function _jQueryInterface(config) {
576
+ var _this5 = this;
577
+
578
+ config = config || {};
579
+ return this.each(function () {
580
+ var $this = $(_this5);
581
+ var _config = $.extend({}, Lightbox.Default, $this.data(), typeof config === 'object' && config);
582
+
583
+ new Lightbox(_this5, _config);
584
+ });
585
+ }
586
+ }]);
587
+
588
+ return Lightbox;
589
+ })();
590
+
591
+ $.fn[NAME] = Lightbox._jQueryInterface;
592
+ $.fn[NAME].Constructor = Lightbox;
593
+ $.fn[NAME].noConflict = function () {
594
+ $.fn[NAME] = JQUERY_NO_CONFLICT;
595
+ return Lightbox._jQueryInterface;
596
+ };
597
+
598
+ return Lightbox;
599
+ })(jQuery);
600
+ //# sourceMappingURL=ekko-lightbox.js.map
601
+
602
+ }(jQuery);