Saved: 2018-02-28 05:35
Torey Heinz
committed Feb 28, 2018
commit c0b6de3c05a31a0698241c6dfbefedd396203b2a
Showing 27
changed files with
3156 additions
and 180 deletions
app/views/pages/index.liquid
+183
-171
| @@ | @@ -8,188 +8,200 @@ is_layout: false |
| --- | |
| {% extends 'layouts/application' %} | |
| {% block 'main' %} | |
| - | <header> |
| + | <header> |
| <div class="content row column text-center"> | |
| <h1> | |
| Canvas Innovations | |
| </h1> | |
| <p>West Michigan's Premier Shop for All Your Canvas and Upholstery Needs.</p> | |
| <p class="cta"> | |
| - | <a href="#" class="button"><strong>Get a Free Estimate</strong></a> |
| + | <a href="#" class="button"><strong>Get a Free Estimate</strong></a> |
| </p> | |
| </div> | |
| - | </header> |
| - | <section class="services featured" > |
| + | </header> |
| + | <section class="services featured"> |
| <div class="row"> | |
| - | {% with_scope featured: true %} |
| - | {% for service in contents.services %} |
| - | <div class="columns medium-4"> |
| + | {% with_scope featured: true %} {% for service in contents.services %} |
| + | <div class="columns medium-4"> |
| <div class="card text-center"> | |
| - | <div class="card-divider"> |
| - | <p class="lead"><a href="{% path_to service %}">{{ service.title }}</a></p> |
| - | |
| - | </div> |
| - | <img src="{{ service.featured_image.url | resize: '600x450#' }}"> |
| - | <div class="card-section"> |
| - | {{ service.brief }} |
| - | </div> |
| + | <div class="card-divider"> |
| + | <p class="lead"><a href="{% path_to service %}">{{ service.title }}</a></p> |
| + | </div> |
| + | <img src="{{ service.featured_image.url | resize: '600x450#' }}"> |
| + | <div class="card-section"> |
| + | {{ service.brief }} |
| + | </div> |
| </div> | |
| - | </div> |
| - | {% endfor %} |
| - | {% endwith_scope %} |
| + | </div> |
| + | {% endfor %} {% endwith_scope %} |
| </div> | |
| - | </div> |
| - | |
| - | <section class="services" > |
| - | <div class="row small-up-2 medium-up-3 large-up-4" > |
| - | {% with_scope featured: nil %} |
| - | {% for service in contents.services %} |
| - | <div class="columns medium-4"> |
| - | <div class="card text-center"> |
| - | <div class="card-divider"> |
| - | <p class="lead"><a href="{% path_to service %}">{{ service.title }}</a></p> |
| - | |
| - | </div> |
| - | <img src="{{ service.featured_image.url | resize: '400x225#' }}"> |
| - | <div class="card-section"> |
| - | {{ service.brief }} |
| - | </div> |
| - | </div> |
| - | </div> |
| - | {% endfor %} |
| - | {% endwith_scope %} |
| </div> | |
| - | </section> |
| - | |
| - | <section class="estimate"> |
| - | <form class="webform-client-form MultiFile-intercepted" enctype="multipart/form-data" action="/request-estimate?service_url=https%3A//www.canvasinnovations.us/marine-services/upholstery&service_interest=Upholstery" method="post" id="webform-client-form-598" accept-charset="UTF-8"><div><div class="form-item webform-component webform-component-markup" id="webform-component-personal-information-title"> |
| - | <div class="row"> |
| - | <h3>Personal Information</h3> |
| - | <hr> |
| - | <div class="column medium-4"> |
| - | <label> |
| - | Name <small>(required)</small> |
| - | <input type="text" name="submitted[first_name]" value="" size="30" maxlength="128" class="form-text required"> |
| - | </label> |
| - | |
| - | <label> |
| - | Email <small> (required)</small> |
| - | <input class="email form-text form-email required" type="email" id="edit-submitted-email-address" name="submitted[email_address]" size="30"> |
| - | </label> |
| - | <label> |
| - | Phone <small> (required)</small> |
| - | <input type="text" id="edit-submitted-phone-number" name="submitted[phone_number]" value="" size="15" maxlength="128" class="form-text required"> |
| - | </label> |
| - | </div> |
| - | <div class="column medium-8"> |
| - | <label> |
| - | Instructions, Comments, or Questions |
| - | <div class="form-textarea-wrapper"><textarea style="height: 280px" id="edit-submitted-instructions-comments-or-questions" name="submitted[instructions_comments_or_questions]" class="form-textarea"></textarea></div> |
| - | </label> |
| + | <section class="services"> |
| + | <div class="row small-up-2 medium-up-3 large-up-4"> |
| + | {% with_scope featured: nil %} {% for service in contents.services %} |
| + | <div class="columns medium-4"> |
| + | <div class="card text-center"> |
| + | <div class="card-divider"> |
| + | <p class="lead"><a href="{% path_to service %}">{{ service.title }}</a></p> |
| + | </div> |
| + | <img src="{{ service.featured_image.url | resize: '400x225#' }}"> |
| + | <div class="card-section"> |
| + | {{ service.brief }} |
| + | </div> |
| + | </div> |
| + | </div> |
| + | {% endfor %} {% endwith_scope %} |
| </div> | |
| - | </div> |
| - | |
| - | <hr> |
| - | <h3>Vessel Information</h3> |
| - | <hr> |
| - | <label> |
| - | Make/Model |
| - | <input type="text" id="edit-submitted-make-model" name="submitted[make_model]" value="" size="30" maxlength="128" class="form-text"> |
| - | </label> |
| - | <div class="form-item webform-component webform-component-number" id="webform-component-size"> |
| - | <label> |
| - | Size <small> (required)</small> |
| - | <input type="number" id="edit-submitted-size" name="submitted[size]" step="0.5" class="form-text form-number required"> <span class="field-suffix">Ft</span> |
| - | </label> |
| - | </div> |
| - | <label> |
| - | City <small> (required)</small> |
| - | <input type="text" id="edit-submitted-vessel-city" name="submitted[vessel_city]" value="" size="30" maxlength="128" class="form-text required"> |
| - | </label> |
| - | <div class="form-item webform-component webform-component-select" id="webform-component-vessel-state"> |
| - | <label> |
| - | State <small> (required)</small> |
| - | <select id="edit-submitted-vessel-state" name="submitted[vessel_state]" class="form-select required"><option value="" selected="selected">- Select -</option><option value="IL">Illinois</option><option value="IN">Indiana</option><option value="MI">Michigan</option><option value="OH">Ohio</option></select> |
| - | </label> |
| - | </div> |
| - | <label> |
| - | Zip Code <small> (required)</small> |
| - | <input type="text" id="edit-submitted-vessel-zip" name="submitted[vessel_zip]" value="" size="5" maxlength="128" class="form-text required"> |
| - | </label> |
| - | <label> |
| - | Marina |
| - | <input type="text" id="edit-submitted-marina" name="submitted[marina]" value="" size="30" maxlength="128" class="form-text"> |
| - | </label> |
| - | <div class="form-item webform-component webform-component-checkboxes" id="webform-component-services-requested"> |
| - | <label> |
| - | Services Requested <small> (required)</small> |
| - | <div id="edit-submitted-services-requested" class="form-checkboxes"><div class="form-item form-type-checkbox form-item-submitted-services-requested-enclosures"> |
| - | </label> |
| - | <input type="checkbox" id="edit-submitted-services-requested-1" name="submitted[services_requested][enclosures]" value="enclosures" class="form-checkbox"> <label class="option" for="edit-submitted-services-requested-1">Enclosure </label> |
| - | |
| - | </div> |
| - | <div class="form-item form-type-checkbox form-item-submitted-services-requested-uphosltry"> |
| - | <input type="checkbox" id="edit-submitted-services-requested-2" name="submitted[services_requested][uphosltry]" value="uphosltry" class="form-checkbox"> <label class="option" for="edit-submitted-services-requested-2">Upholstry </label> |
| - | |
| - | </div> |
| - | <div class="form-item form-type-checkbox form-item-submitted-services-requested-tops"> |
| - | <input type="checkbox" id="edit-submitted-services-requested-3" name="submitted[services_requested][tops]" value="tops" class="form-checkbox"> <label class="option" for="edit-submitted-services-requested-3">Boat Tops </label> |
| - | |
| - | </div> |
| - | <div class="form-item form-type-checkbox form-item-submitted-services-requested-covers"> |
| - | <input type="checkbox" id="edit-submitted-services-requested-4" name="submitted[services_requested][covers]" value="covers" class="form-checkbox"> <label class="option" for="edit-submitted-services-requested-4">Covers </label> |
| - | |
| - | </div> |
| - | <div class="form-item form-type-checkbox form-item-submitted-services-requested-windows"> |
| - | <input type="checkbox" id="edit-submitted-services-requested-5" name="submitted[services_requested][windows]" value="windows" class="form-checkbox"> <label class="option" for="edit-submitted-services-requested-5">Bonded Windows </label> |
| - | |
| - | </div> |
| - | <div class="form-item form-type-checkbox form-item-submitted-services-requested-carpet"> |
| - | <input type="checkbox" id="edit-submitted-services-requested-6" name="submitted[services_requested][carpet]" value="carpet" class="form-checkbox"> <label class="option" for="edit-submitted-services-requested-6">Carpet </label> |
| - | |
| - | </div> |
| - | <div class="form-item form-type-checkbox form-item-submitted-services-requested-dodger"> |
| - | <input type="checkbox" id="edit-submitted-services-requested-7" name="submitted[services_requested][dodger]" value="dodger" class="form-checkbox"> <label class="option" for="edit-submitted-services-requested-7">Dodgers </label> |
| - | |
| - | </div> |
| - | <div class="form-item form-type-checkbox form-item-submitted-services-requested-headliners"> |
| - | <input type="checkbox" id="edit-submitted-services-requested-8" name="submitted[services_requested][headliners]" value="headliners" class="form-checkbox"> <label class="option" for="edit-submitted-services-requested-8">Headliners </label> |
| - | |
| - | </div> |
| - | <div class="form-item form-type-checkbox form-item-submitted-services-requested-repairs"> |
| - | <input type="checkbox" id="edit-submitted-services-requested-9" name="submitted[services_requested][repairs]" value="repairs" class="form-checkbox"> <label class="option" for="edit-submitted-services-requested-9">Repairs & Stitching </label> |
| - | |
| - | </div> |
| - | <div class="form-item form-type-checkbox form-item-submitted-services-requested-framebending"> |
| - | <input type="checkbox" id="edit-submitted-services-requested-10" name="submitted[services_requested][framebending]" value="framebending" class="form-checkbox"> <label class="option" for="edit-submitted-services-requested-10">Custom Frame Bending </label> |
| - | |
| - | </div> |
| - | <div class="form-item form-type-checkbox form-item-submitted-services-requested-misc"> |
| - | <input type="checkbox" id="edit-submitted-services-requested-11" name="submitted[services_requested][misc]" value="misc" class="form-checkbox"> <label class="option" for="edit-submitted-services-requested-11">Misc/NA </label> |
| - | |
| - | </div> |
| - | </div> |
| - | </div> |
| - | <div class="form-item webform-component webform-component-multifile" id="webform-component-vessel-images-multi"> |
| - | <div class="form-item form-type-file form-item-files-vessel-images-multi"> |
| - | <label> |
| - | Vessel Images |
| - | <div class="MultiFile-wrap" id="edit-vessel-images-multi_wrap"><input class="form-item multi MultiFile-identifier-vessel-images-multi form-file jquery-once-1-processed MultiFile-applied" type="file" id="edit-vessel-images-multi" name="files[vessel_images_multi][]" size="60" value=""><div class="MultiFile-list" id="edit-vessel-images-multi_wrap_list"></div></div> |
| - | </label> |
| - | <div class="description">Please upload any relevant images.</div> |
| - | </div> |
| - | <div class="outer"><div class="inner"></div></div><input type="hidden" name="submitted[vessel_images_multi][_fids]" value=""> |
| - | <input type="hidden" name="submitted[vessel_images_multi][_old_fids]"> |
| - | |
| - | </div> |
| - | <input type="hidden" name="details[sid]"> |
| - | <input type="hidden" name="details[page_num]" value="1"> |
| - | <input type="hidden" name="details[page_count]" value="1"> |
| - | <input type="hidden" name="details[finished]" value="0"> |
| - | <input type="hidden" name="form_build_id" value="form-XlJ0zOK1V4N95GlwBuj7VP0EwSksg8EYPRx8hgFY8Ko"> |
| - | <input type="hidden" name="form_id" value="webform_client_form_598"> |
| - | <div class="form-actions form-wrapper" id="edit-actions"><input class="btn btn-primary form-submit" type="submit" id="edit-submit" name="op" value="Submit"></div></div> |
| - | </form> |
| - | </section> |
| - | {% endblock %} |
| - | |
| + | </section> |
| + | <section class="estimate"> |
| + | <form class="webform-client-form MultiFile-intercepted" enctype="multipart/form-data" action="/request-estimate?service_url=https%3A//www.canvasinnovations.us/marine-services/upholstery&service_interest=Upholstery" method="post" id="webform-client-form-598" accept-charset="UTF-8"> |
| + | <div> |
| + | <div class="form-item webform-component webform-component-markup" id="webform-component-personal-information-title"> |
| + | <div class="row"> |
| + | <h3>Personal Information</h3> |
| + | <hr> |
| + | <div class="column medium-4"> |
| + | <label> |
| + | Name <small>(required)</small> |
| + | <input type="text" name="submitted[first_name]" value="" size="30" maxlength="128" class="form-text required"> |
| + | </label> |
| + | <label> |
| + | Email <small> (required)</small> |
| + | <input class="email form-text form-email required" type="email" id="edit-submitted-email-address" name="submitted[email_address]" size="30"> |
| + | </label> |
| + | <label> |
| + | Phone <small> (required)</small> |
| + | <input type="text" id="edit-submitted-phone-number" name="submitted[phone_number]" value="" size="15" maxlength="128" class="form-text required"> |
| + | </label> |
| + | </div> |
| + | <div class="column medium-8"> |
| + | <label> |
| + | Instructions, Comments, or Questions |
| + | <div class="form-textarea-wrapper"> |
| + | <textarea style="height: 280px" id="edit-submitted-instructions-comments-or-questions" name="submitted[instructions_comments_or_questions]" class="form-textarea"></textarea> |
| + | </div> |
| + | </label> |
| + | </div> |
| + | </div> |
| + | <hr> |
| + | <div class="row"> |
| + | <div class="column medium-8"> |
| + | <h3>Vessel Information</h3> |
| + | <hr> |
| + | <label> |
| + | Make/Model |
| + | <input type="text" id="edit-submitted-make-model" name="submitted[make_model]" value="" size="30" maxlength="128" class="form-text"> |
| + | </label> |
| + | <div class="form-item webform-component webform-component-number" id="webform-component-size"> |
| + | <label> |
| + | Size <small> (required)</small> |
| + | <input type="number" id="edit-submitted-size" name="submitted[size]" step="0.5" class="form-text form-number required"> <span class="field-suffix">Ft</span> |
| + | </label> |
| + | </div> |
| + | <label> |
| + | City <small> (required)</small> |
| + | <input type="text" id="edit-submitted-vessel-city" name="submitted[vessel_city]" value="" size="30" maxlength="128" class="form-text required"> |
| + | </label> |
| + | <div class="form-item webform-component webform-component-select" id="webform-component-vessel-state"> |
| + | <label> |
| + | State <small> (required)</small> |
| + | <select id="edit-submitted-vessel-state" name="submitted[vessel_state]" class="form-select required"> |
| + | <option value="" selected="selected">- Select -</option> |
| + | <option value="IL">Illinois</option> |
| + | <option value="IN">Indiana</option> |
| + | <option value="MI">Michigan</option> |
| + | <option value="OH">Ohio</option> |
| + | </select> |
| + | </label> |
| + | </div> |
| + | <label> |
| + | Zip Code <small> (required)</small> |
| + | <input type="text" id="edit-submitted-vessel-zip" name="submitted[vessel_zip]" value="" size="5" maxlength="128" class="form-text required"> |
| + | </label> |
| + | <label> |
| + | Marina |
| + | <input type="text" id="edit-submitted-marina" name="submitted[marina]" value="" size="30" maxlength="128" class="form-text"> |
| + | </label> |
| + | </div> |
| + | <div class="column medium-4"> |
| + | <label> |
| + | Services Requested <small> (required)</small> |
| + | <div id="edit-submitted-services-requested" class="form-checkboxes"> |
| + | <div class="form-item form-type-checkbox form-item-submitted-services-requested-enclosures"> |
| + | </label> |
| + | <input type="checkbox" id="edit-submitted-services-requested-1" name="submitted[services_requested][enclosures]" value="enclosures" class="form-checkbox"> |
| + | <label class="option" for="edit-submitted-services-requested-1">Enclosure </label> |
| + | </div> |
| + | <div class="form-item form-type-checkbox form-item-submitted-services-requested-uphosltry"> |
| + | <input type="checkbox" id="edit-submitted-services-requested-2" name="submitted[services_requested][uphosltry]" value="uphosltry" class="form-checkbox"> |
| + | <label class="option" for="edit-submitted-services-requested-2">Upholstry </label> |
| + | </div> |
| + | <div class="form-item form-type-checkbox form-item-submitted-services-requested-tops"> |
| + | <input type="checkbox" id="edit-submitted-services-requested-3" name="submitted[services_requested][tops]" value="tops" class="form-checkbox"> |
| + | <label class="option" for="edit-submitted-services-requested-3">Boat Tops </label> |
| + | </div> |
| + | <div class="form-item form-type-checkbox form-item-submitted-services-requested-covers"> |
| + | <input type="checkbox" id="edit-submitted-services-requested-4" name="submitted[services_requested][covers]" value="covers" class="form-checkbox"> |
| + | <label class="option" for="edit-submitted-services-requested-4">Covers </label> |
| + | </div> |
| + | <div class="form-item form-type-checkbox form-item-submitted-services-requested-windows"> |
| + | <input type="checkbox" id="edit-submitted-services-requested-5" name="submitted[services_requested][windows]" value="windows" class="form-checkbox"> |
| + | <label class="option" for="edit-submitted-services-requested-5">Bonded Windows </label> |
| + | </div> |
| + | <div class="form-item form-type-checkbox form-item-submitted-services-requested-carpet"> |
| + | <input type="checkbox" id="edit-submitted-services-requested-6" name="submitted[services_requested][carpet]" value="carpet" class="form-checkbox"> |
| + | <label class="option" for="edit-submitted-services-requested-6">Carpet </label> |
| + | </div> |
| + | <div class="form-item form-type-checkbox form-item-submitted-services-requested-dodger"> |
| + | <input type="checkbox" id="edit-submitted-services-requested-7" name="submitted[services_requested][dodger]" value="dodger" class="form-checkbox"> |
| + | <label class="option" for="edit-submitted-services-requested-7">Dodgers </label> |
| + | </div> |
| + | <div class="form-item form-type-checkbox form-item-submitted-services-requested-headliners"> |
| + | <input type="checkbox" id="edit-submitted-services-requested-8" name="submitted[services_requested][headliners]" value="headliners" class="form-checkbox"> |
| + | <label class="option" for="edit-submitted-services-requested-8">Headliners </label> |
| + | </div> |
| + | <div class="form-item form-type-checkbox form-item-submitted-services-requested-repairs"> |
| + | <input type="checkbox" id="edit-submitted-services-requested-9" name="submitted[services_requested][repairs]" value="repairs" class="form-checkbox"> |
| + | <label class="option" for="edit-submitted-services-requested-9">Repairs & Stitching </label> |
| + | </div> |
| + | <div class="form-item form-type-checkbox form-item-submitted-services-requested-framebending"> |
| + | <input type="checkbox" id="edit-submitted-services-requested-10" name="submitted[services_requested][framebending]" value="framebending" class="form-checkbox"> |
| + | <label class="option" for="edit-submitted-services-requested-10">Custom Frame Bending </label> |
| + | </div> |
| + | <div class="form-item form-type-checkbox form-item-submitted-services-requested-misc"> |
| + | <input type="checkbox" id="edit-submitted-services-requested-11" name="submitted[services_requested][misc]" value="misc" class="form-checkbox"> |
| + | <label class="option" for="edit-submitted-services-requested-11">Misc/NA </label> |
| + | </div> |
| + | <label> |
| + | Vessel Images |
| + | <div class="MultiFile-wrap" id="edit-vessel-images-multi_wrap"> |
| + | <input class="form-item multi MultiFile-identifier-vessel-images-multi form-file jquery-once-1-processed MultiFile-applied" type="file" id="edit-vessel-images-multi" name="files[vessel_images_multi][]" size="60" value=""> |
| + | <div class="MultiFile-list" id="edit-vessel-images-multi_wrap_list"></div> |
| + | </div> |
| + | </label> |
| + | <div class="description">Please upload any relevant images.</div> |
| + | </div> |
| + | </div> |
| + | <div class="form-item webform-component webform-component-multifile" id="webform-component-vessel-images-multi"> |
| + | <div class="form-item form-type-file form-item-files-vessel-images-multi"> |
| + | |
| + | </div> |
| + | <div class="outer"> |
| + | <div class="inner"></div> |
| + | </div> |
| + | <input type="hidden" name="submitted[vessel_images_multi][_fids]" value=""> |
| + | <input type="hidden" name="submitted[vessel_images_multi][_old_fids]"> |
| + | </div> |
| + | <input type="hidden" name="details[sid]"> |
| + | <input type="hidden" name="details[page_num]" value="1"> |
| + | <input type="hidden" name="details[page_count]" value="1"> |
| + | <input type="hidden" name="details[finished]" value="0"> |
| + | <input type="hidden" name="form_build_id" value="form-XlJ0zOK1V4N95GlwBuj7VP0EwSksg8EYPRx8hgFY8Ko"> |
| + | <input type="hidden" name="form_id" value="webform_client_form_598"> |
| + | <div class="form-actions form-wrapper" id="edit-actions"> |
| + | <input class="btn btn-primary form-submit" type="submit" id="edit-submit" name="op" value="Submit"> |
| + | </div> |
| + | </div> |
| + | </form> |
| + | </section> |
| + | {% endblock %} |
app/views/pages/layouts/application.liquid
+4
-4
| @@ | @@ -20,7 +20,8 @@ is_layout: true |
| gtag('js', new Date()); | |
| gtag('config', '###'); | |
| </script> | |
| - | |
| + | {% block head %} |
| + | {% endblock %} |
| </head> | |
| <body class="{{ page.slug }}"> | |
| <!-- Start Top Bar --> | |
| @@ | @@ -48,9 +49,8 @@ is_layout: true |
| </footer> | |
| </div> | |
| <script src="https://code.jquery.com/jquery-2.2.3.min.js" integrity="sha256-a23g1Nt4dtEYOj7bR+vTu7+T8VP13humZFBJNIYoEJo=" crossorigin="anonymous"></script> | |
| - | {{ 'vendor/jquery.sticky.js' | javascript_tag }} |
| - | {{ 'vendor/what-input.min.js' | javascript_tag }} |
| - | {{ 'vendor/foundation.min.js' | javascript_tag }} |
| {{ 'app.js' | javascript_tag }} | |
| + | {% block body_bottom %} |
| + | {% endblock %} |
| </body> | |
| </html> | |
app/views/pages/services/content_type_template.liquid
+31
-2
| @@ | @@ -3,6 +3,10 @@ title: Service Template Page |
| content_type: services | |
| --- | |
| {% extends 'layouts/application' %} | |
| + | {% block head %} |
| + | {{ 'blueimp/blueimp-gallery.css' | stylesheet_tag }} |
| + | {% endblock %} |
| + | |
| {% block main %} | |
| <header class="service" data-background-url="{{ service.featured_image.url | resize: '1200x400#' }}"> | |
| <div class="content row column text-center"> | |
| @@ | @@ -23,12 +27,37 @@ content_type: services |
| </p> | |
| </div> | |
| </div> | |
| - | <div class="row column callout medium-up-5"> |
| + | <div id="links" class="row column callout medium-up-5"> |
| {% for image in service.images %} | |
| <div class="column column-block"> | |
| - | <img class="" src="{{ image.file.url }}"> |
| + | <a href="{{ image.file.url }}"> |
| + | <img class="" src="{{ image.file.url }}"> |
| + | </a> |
| </div> | |
| {% endfor %} | |
| </div> | |
| {% endblock %} | |
| + | {% block body_bottom %} |
| + | <div id="blueimp-gallery" class="blueimp-gallery"> |
| + | <div class="slides"></div> |
| + | <h3 class="title"></h3> |
| + | <a class="prev">‹</a> |
| + | <a class="next">›</a> |
| + | <a class="close">×</a> |
| + | <a class="play-pause"></a> |
| + | <ol class="indicator"></ol> |
| + | </div> |
| + | {{ 'blueimp/blueimp-gallery.js' | javascript_tag }} |
| + | <script> |
| + | document.getElementById('links').onclick = function (event) { |
| + | event = event || window.event; |
| + | var target = event.target || event.srcElement, |
| + | link = target.src ? target.parentNode : target, |
| + | options = {index: link, event: event}, |
| + | links = this.getElementsByTagName('a'); |
| + | blueimp.Gallery(links, options); |
| + | }; |
| + | </script> |
| + | {% endblock %} |
| + | |
public/javascripts/app.js
+4
-0
| @@ | @@ -1,3 +1,7 @@ |
| + | //= require vendor/jquery.sticky |
| + | //= require vendor/what-input |
| + | //= require vendor/foundation |
| + | |
| $(document).foundation(); | |
| // $(".top-bar").sticky({zIndex:10}); | |
public/javascripts/blueimp/blueimp-gallery-fullscreen.js
+84
-0
| @@ | @@ -0,0 +1,84 @@ |
| + | /* |
| + | * blueimp Gallery Fullscreen JS |
| + | * https://github.com/blueimp/Gallery |
| + | * |
| + | * Copyright 2013, Sebastian Tschan |
| + | * https://blueimp.net |
| + | * |
| + | * Licensed under the MIT license: |
| + | * https://opensource.org/licenses/MIT |
| + | */ |
| + | |
| + | /* global define, window, document */ |
| + | |
| + | ;(function (factory) { |
| + | 'use strict' |
| + | if (typeof define === 'function' && define.amd) { |
| + | // Register as an anonymous AMD module: |
| + | define(['./blueimp-helper', './blueimp-gallery'], factory) |
| + | } else { |
| + | // Browser globals: |
| + | factory(window.blueimp.helper || window.jQuery, window.blueimp.Gallery) |
| + | } |
| + | })(function ($, Gallery) { |
| + | 'use strict' |
| + | |
| + | $.extend(Gallery.prototype.options, { |
| + | // Defines if the gallery should open in fullscreen mode: |
| + | fullScreen: false |
| + | }) |
| + | |
| + | var initialize = Gallery.prototype.initialize |
| + | var close = Gallery.prototype.close |
| + | |
| + | $.extend(Gallery.prototype, { |
| + | getFullScreenElement: function () { |
| + | return ( |
| + | document.fullscreenElement || |
| + | document.webkitFullscreenElement || |
| + | document.mozFullScreenElement || |
| + | document.msFullscreenElement |
| + | ) |
| + | }, |
| + | |
| + | requestFullScreen: function (element) { |
| + | if (element.requestFullscreen) { |
| + | element.requestFullscreen() |
| + | } else if (element.webkitRequestFullscreen) { |
| + | element.webkitRequestFullscreen() |
| + | } else if (element.mozRequestFullScreen) { |
| + | element.mozRequestFullScreen() |
| + | } else if (element.msRequestFullscreen) { |
| + | element.msRequestFullscreen() |
| + | } |
| + | }, |
| + | |
| + | exitFullScreen: function () { |
| + | if (document.exitFullscreen) { |
| + | document.exitFullscreen() |
| + | } else if (document.webkitCancelFullScreen) { |
| + | document.webkitCancelFullScreen() |
| + | } else if (document.mozCancelFullScreen) { |
| + | document.mozCancelFullScreen() |
| + | } else if (document.msExitFullscreen) { |
| + | document.msExitFullscreen() |
| + | } |
| + | }, |
| + | |
| + | initialize: function () { |
| + | initialize.call(this) |
| + | if (this.options.fullScreen && !this.getFullScreenElement()) { |
| + | this.requestFullScreen(this.container[0]) |
| + | } |
| + | }, |
| + | |
| + | close: function () { |
| + | if (this.getFullScreenElement() === this.container[0]) { |
| + | this.exitFullScreen() |
| + | } |
| + | close.call(this) |
| + | } |
| + | }) |
| + | |
| + | return Gallery |
| + | }) |
public/javascripts/blueimp/blueimp-gallery-indicator.js
+145
-0
| @@ | @@ -0,0 +1,145 @@ |
| + | /* |
| + | * blueimp Gallery Indicator JS |
| + | * https://github.com/blueimp/Gallery |
| + | * |
| + | * Copyright 2013, Sebastian Tschan |
| + | * https://blueimp.net |
| + | * |
| + | * Licensed under the MIT license: |
| + | * https://opensource.org/licenses/MIT |
| + | */ |
| + | |
| + | /* global define, window, document */ |
| + | |
| + | ;(function (factory) { |
| + | 'use strict' |
| + | if (typeof define === 'function' && define.amd) { |
| + | // Register as an anonymous AMD module: |
| + | define(['./blueimp-helper', './blueimp-gallery'], factory) |
| + | } else { |
| + | // Browser globals: |
| + | factory(window.blueimp.helper || window.jQuery, window.blueimp.Gallery) |
| + | } |
| + | })(function ($, Gallery) { |
| + | 'use strict' |
| + | |
| + | $.extend(Gallery.prototype.options, { |
| + | // The tag name, Id, element or querySelector of the indicator container: |
| + | indicatorContainer: 'ol', |
| + | // The class for the active indicator: |
| + | activeIndicatorClass: 'active', |
| + | // The list object property (or data attribute) with the thumbnail URL, |
| + | // used as alternative to a thumbnail child element: |
| + | thumbnailProperty: 'thumbnail', |
| + | // Defines if the gallery indicators should display a thumbnail: |
| + | thumbnailIndicators: true |
| + | }) |
| + | |
| + | var initSlides = Gallery.prototype.initSlides |
| + | var addSlide = Gallery.prototype.addSlide |
| + | var resetSlides = Gallery.prototype.resetSlides |
| + | var handleClick = Gallery.prototype.handleClick |
| + | var handleSlide = Gallery.prototype.handleSlide |
| + | var handleClose = Gallery.prototype.handleClose |
| + | |
| + | $.extend(Gallery.prototype, { |
| + | createIndicator: function (obj) { |
| + | var indicator = this.indicatorPrototype.cloneNode(false) |
| + | var title = this.getItemProperty(obj, this.options.titleProperty) |
| + | var thumbnailProperty = this.options.thumbnailProperty |
| + | var thumbnailUrl |
| + | var thumbnail |
| + | if (this.options.thumbnailIndicators) { |
| + | if (thumbnailProperty) { |
| + | thumbnailUrl = this.getItemProperty(obj, thumbnailProperty) |
| + | } |
| + | if (thumbnailUrl === undefined) { |
| + | thumbnail = obj.getElementsByTagName && $(obj).find('img')[0] |
| + | if (thumbnail) { |
| + | thumbnailUrl = thumbnail.src |
| + | } |
| + | } |
| + | if (thumbnailUrl) { |
| + | indicator.style.backgroundImage = 'url("' + thumbnailUrl + '")' |
| + | } |
| + | } |
| + | if (title) { |
| + | indicator.title = title |
| + | } |
| + | return indicator |
| + | }, |
| + | |
| + | addIndicator: function (index) { |
| + | if (this.indicatorContainer.length) { |
| + | var indicator = this.createIndicator(this.list[index]) |
| + | indicator.setAttribute('data-index', index) |
| + | this.indicatorContainer[0].appendChild(indicator) |
| + | this.indicators.push(indicator) |
| + | } |
| + | }, |
| + | |
| + | setActiveIndicator: function (index) { |
| + | if (this.indicators) { |
| + | if (this.activeIndicator) { |
| + | this.activeIndicator.removeClass(this.options.activeIndicatorClass) |
| + | } |
| + | this.activeIndicator = $(this.indicators[index]) |
| + | this.activeIndicator.addClass(this.options.activeIndicatorClass) |
| + | } |
| + | }, |
| + | |
| + | initSlides: function (reload) { |
| + | if (!reload) { |
| + | this.indicatorContainer = this.container.find( |
| + | this.options.indicatorContainer |
| + | ) |
| + | if (this.indicatorContainer.length) { |
| + | this.indicatorPrototype = document.createElement('li') |
| + | this.indicators = this.indicatorContainer[0].children |
| + | } |
| + | } |
| + | initSlides.call(this, reload) |
| + | }, |
| + | |
| + | addSlide: function (index) { |
| + | addSlide.call(this, index) |
| + | this.addIndicator(index) |
| + | }, |
| + | |
| + | resetSlides: function () { |
| + | resetSlides.call(this) |
| + | this.indicatorContainer.empty() |
| + | this.indicators = [] |
| + | }, |
| + | |
| + | handleClick: function (event) { |
| + | var target = event.target || event.srcElement |
| + | var parent = target.parentNode |
| + | if (parent === this.indicatorContainer[0]) { |
| + | // Click on indicator element |
| + | this.preventDefault(event) |
| + | this.slide(this.getNodeIndex(target)) |
| + | } else if (parent.parentNode === this.indicatorContainer[0]) { |
| + | // Click on indicator child element |
| + | this.preventDefault(event) |
| + | this.slide(this.getNodeIndex(parent)) |
| + | } else { |
| + | return handleClick.call(this, event) |
| + | } |
| + | }, |
| + | |
| + | handleSlide: function (index) { |
| + | handleSlide.call(this, index) |
| + | this.setActiveIndicator(index) |
| + | }, |
| + | |
| + | handleClose: function () { |
| + | if (this.activeIndicator) { |
| + | this.activeIndicator.removeClass(this.options.activeIndicatorClass) |
| + | } |
| + | handleClose.call(this) |
| + | } |
| + | }) |
| + | |
| + | return Gallery |
| + | }) |
public/javascripts/blueimp/blueimp-gallery-video.js
+166
-0
| @@ | @@ -0,0 +1,166 @@ |
| + | /* |
| + | * blueimp Gallery Video Factory JS |
| + | * https://github.com/blueimp/Gallery |
| + | * |
| + | * Copyright 2013, Sebastian Tschan |
| + | * https://blueimp.net |
| + | * |
| + | * Licensed under the MIT license: |
| + | * https://opensource.org/licenses/MIT |
| + | */ |
| + | |
| + | /* global define, window, document */ |
| + | |
| + | ;(function (factory) { |
| + | 'use strict' |
| + | if (typeof define === 'function' && define.amd) { |
| + | // Register as an anonymous AMD module: |
| + | define(['./blueimp-helper', './blueimp-gallery'], factory) |
| + | } else { |
| + | // Browser globals: |
| + | factory(window.blueimp.helper || window.jQuery, window.blueimp.Gallery) |
| + | } |
| + | })(function ($, Gallery) { |
| + | 'use strict' |
| + | |
| + | $.extend(Gallery.prototype.options, { |
| + | // The class for video content elements: |
| + | videoContentClass: 'video-content', |
| + | // The class for video when it is loading: |
| + | videoLoadingClass: 'video-loading', |
| + | // The class for video when it is playing: |
| + | videoPlayingClass: 'video-playing', |
| + | // The list object property (or data attribute) for the video poster URL: |
| + | videoPosterProperty: 'poster', |
| + | // The list object property (or data attribute) for the video sources array: |
| + | videoSourcesProperty: 'sources' |
| + | }) |
| + | |
| + | var handleSlide = Gallery.prototype.handleSlide |
| + | |
| + | $.extend(Gallery.prototype, { |
| + | handleSlide: function (index) { |
| + | handleSlide.call(this, index) |
| + | if (this.playingVideo) { |
| + | this.playingVideo.pause() |
| + | } |
| + | }, |
| + | |
| + | videoFactory: function (obj, callback, videoInterface) { |
| + | var that = this |
| + | var options = this.options |
| + | var videoContainerNode = this.elementPrototype.cloneNode(false) |
| + | var videoContainer = $(videoContainerNode) |
| + | var errorArgs = [ |
| + | { |
| + | type: 'error', |
| + | target: videoContainerNode |
| + | } |
| + | ] |
| + | var video = videoInterface || document.createElement('video') |
| + | var url = this.getItemProperty(obj, options.urlProperty) |
| + | var type = this.getItemProperty(obj, options.typeProperty) |
| + | var title = this.getItemProperty(obj, options.titleProperty) |
| + | var posterUrl = this.getItemProperty(obj, options.videoPosterProperty) |
| + | var posterImage |
| + | var sources = this.getItemProperty(obj, options.videoSourcesProperty) |
| + | var source |
| + | var playMediaControl |
| + | var isLoading |
| + | var hasControls |
| + | videoContainer.addClass(options.videoContentClass) |
| + | if (title) { |
| + | videoContainerNode.title = title |
| + | } |
| + | if (video.canPlayType) { |
| + | if (url && type && video.canPlayType(type)) { |
| + | video.src = url |
| + | } else if (sources) { |
| + | while (sources.length) { |
| + | source = sources.shift() |
| + | url = this.getItemProperty(source, options.urlProperty) |
| + | type = this.getItemProperty(source, options.typeProperty) |
| + | if (url && type && video.canPlayType(type)) { |
| + | video.src = url |
| + | break |
| + | } |
| + | } |
| + | } |
| + | } |
| + | if (posterUrl) { |
| + | video.poster = posterUrl |
| + | posterImage = this.imagePrototype.cloneNode(false) |
| + | $(posterImage).addClass(options.toggleClass) |
| + | posterImage.src = posterUrl |
| + | posterImage.draggable = false |
| + | videoContainerNode.appendChild(posterImage) |
| + | } |
| + | playMediaControl = document.createElement('a') |
| + | playMediaControl.setAttribute('target', '_blank') |
| + | if (!videoInterface) { |
| + | playMediaControl.setAttribute('download', title) |
| + | } |
| + | playMediaControl.href = url |
| + | if (video.src) { |
| + | video.controls = true |
| + | ;(videoInterface || $(video)) |
| + | .on('error', function () { |
| + | that.setTimeout(callback, errorArgs) |
| + | }) |
| + | .on('pause', function () { |
| + | if (video.seeking) return |
| + | isLoading = false |
| + | videoContainer |
| + | .removeClass(that.options.videoLoadingClass) |
| + | .removeClass(that.options.videoPlayingClass) |
| + | if (hasControls) { |
| + | that.container.addClass(that.options.controlsClass) |
| + | } |
| + | delete that.playingVideo |
| + | if (that.interval) { |
| + | that.play() |
| + | } |
| + | }) |
| + | .on('playing', function () { |
| + | isLoading = false |
| + | videoContainer |
| + | .removeClass(that.options.videoLoadingClass) |
| + | .addClass(that.options.videoPlayingClass) |
| + | if (that.container.hasClass(that.options.controlsClass)) { |
| + | hasControls = true |
| + | that.container.removeClass(that.options.controlsClass) |
| + | } else { |
| + | hasControls = false |
| + | } |
| + | }) |
| + | .on('play', function () { |
| + | window.clearTimeout(that.timeout) |
| + | isLoading = true |
| + | videoContainer.addClass(that.options.videoLoadingClass) |
| + | that.playingVideo = video |
| + | }) |
| + | $(playMediaControl).on('click', function (event) { |
| + | that.preventDefault(event) |
| + | if (isLoading) { |
| + | video.pause() |
| + | } else { |
| + | video.play() |
| + | } |
| + | }) |
| + | videoContainerNode.appendChild( |
| + | (videoInterface && videoInterface.element) || video |
| + | ) |
| + | } |
| + | videoContainerNode.appendChild(playMediaControl) |
| + | this.setTimeout(callback, [ |
| + | { |
| + | type: 'load', |
| + | target: videoContainerNode |
| + | } |
| + | ]) |
| + | return videoContainerNode |
| + | } |
| + | }) |
| + | |
| + | return Gallery |
| + | }) |
public/javascripts/blueimp/blueimp-gallery-vimeo.js
+210
-0
| @@ | @@ -0,0 +1,210 @@ |
| + | /* |
| + | * blueimp Gallery Vimeo Video Factory JS |
| + | * https://github.com/blueimp/Gallery |
| + | * |
| + | * Copyright 2013, Sebastian Tschan |
| + | * https://blueimp.net |
| + | * |
| + | * Licensed under the MIT license: |
| + | * https://opensource.org/licenses/MIT |
| + | */ |
| + | |
| + | /* global define, window, document, $f */ |
| + | |
| + | ;(function (factory) { |
| + | 'use strict' |
| + | if (typeof define === 'function' && define.amd) { |
| + | // Register as an anonymous AMD module: |
| + | define(['./blueimp-helper', './blueimp-gallery-video'], factory) |
| + | } else { |
| + | // Browser globals: |
| + | factory(window.blueimp.helper || window.jQuery, window.blueimp.Gallery) |
| + | } |
| + | })(function ($, Gallery) { |
| + | 'use strict' |
| + | |
| + | if (!window.postMessage) { |
| + | return Gallery |
| + | } |
| + | |
| + | $.extend(Gallery.prototype.options, { |
| + | // The list object property (or data attribute) with the Vimeo video id: |
| + | vimeoVideoIdProperty: 'vimeo', |
| + | // The URL for the Vimeo video player, can be extended with custom parameters: |
| + | // https://developer.vimeo.com/player/embedding |
| + | vimeoPlayerUrl: |
| + | '//player.vimeo.com/video/VIDEO_ID?api=1&player_id=PLAYER_ID', |
| + | // The prefix for the Vimeo video player ID: |
| + | vimeoPlayerIdPrefix: 'vimeo-player-', |
| + | // Require a click on the native Vimeo player for the initial playback: |
| + | vimeoClickToPlay: true |
| + | }) |
| + | |
| + | var textFactory = |
| + | Gallery.prototype.textFactory || Gallery.prototype.imageFactory |
| + | var VimeoPlayer = function (url, videoId, playerId, clickToPlay) { |
| + | this.url = url |
| + | this.videoId = videoId |
| + | this.playerId = playerId |
| + | this.clickToPlay = clickToPlay |
| + | this.element = document.createElement('div') |
| + | this.listeners = {} |
| + | } |
| + | var counter = 0 |
| + | |
| + | $.extend(VimeoPlayer.prototype, { |
| + | canPlayType: function () { |
| + | return true |
| + | }, |
| + | |
| + | on: function (type, func) { |
| + | this.listeners[type] = func |
| + | return this |
| + | }, |
| + | |
| + | loadAPI: function () { |
| + | var that = this |
| + | var apiUrl = '//f.vimeocdn.com/js/froogaloop2.min.js' |
| + | var scriptTags = document.getElementsByTagName('script') |
| + | var i = scriptTags.length |
| + | var scriptTag |
| + | var called |
| + | function callback () { |
| + | if (!called && that.playOnReady) { |
| + | that.play() |
| + | } |
| + | called = true |
| + | } |
| + | while (i) { |
| + | i -= 1 |
| + | if (scriptTags[i].src === apiUrl) { |
| + | scriptTag = scriptTags[i] |
| + | break |
| + | } |
| + | } |
| + | if (!scriptTag) { |
| + | scriptTag = document.createElement('script') |
| + | scriptTag.src = apiUrl |
| + | } |
| + | $(scriptTag).on('load', callback) |
| + | scriptTags[0].parentNode.insertBefore(scriptTag, scriptTags[0]) |
| + | // Fix for cached scripts on IE 8: |
| + | if (/loaded|complete/.test(scriptTag.readyState)) { |
| + | callback() |
| + | } |
| + | }, |
| + | |
| + | onReady: function () { |
| + | var that = this |
| + | this.ready = true |
| + | this.player.addEvent('play', function () { |
| + | that.hasPlayed = true |
| + | that.onPlaying() |
| + | }) |
| + | this.player.addEvent('pause', function () { |
| + | that.onPause() |
| + | }) |
| + | this.player.addEvent('finish', function () { |
| + | that.onPause() |
| + | }) |
| + | if (this.playOnReady) { |
| + | this.play() |
| + | } |
| + | }, |
| + | |
| + | onPlaying: function () { |
| + | if (this.playStatus < 2) { |
| + | this.listeners.playing() |
| + | this.playStatus = 2 |
| + | } |
| + | }, |
| + | |
| + | onPause: function () { |
| + | this.listeners.pause() |
| + | delete this.playStatus |
| + | }, |
| + | |
| + | insertIframe: function () { |
| + | var iframe = document.createElement('iframe') |
| + | iframe.src = this.url |
| + | .replace('VIDEO_ID', this.videoId) |
| + | .replace('PLAYER_ID', this.playerId) |
| + | iframe.id = this.playerId |
| + | this.element.parentNode.replaceChild(iframe, this.element) |
| + | this.element = iframe |
| + | }, |
| + | |
| + | play: function () { |
| + | var that = this |
| + | if (!this.playStatus) { |
| + | this.listeners.play() |
| + | this.playStatus = 1 |
| + | } |
| + | if (this.ready) { |
| + | if ( |
| + | !this.hasPlayed && |
| + | (this.clickToPlay || |
| + | (window.navigator && |
| + | /iP(hone|od|ad)/.test(window.navigator.platform))) |
| + | ) { |
| + | // Manually trigger the playing callback if clickToPlay |
| + | // is enabled and to workaround a limitation in iOS, |
| + | // which requires synchronous user interaction to start |
| + | // the video playback: |
| + | this.onPlaying() |
| + | } else { |
| + | this.player.api('play') |
| + | } |
| + | } else { |
| + | this.playOnReady = true |
| + | if (!window.$f) { |
| + | this.loadAPI() |
| + | } else if (!this.player) { |
| + | this.insertIframe() |
| + | this.player = $f(this.element) |
| + | this.player.addEvent('ready', function () { |
| + | that.onReady() |
| + | }) |
| + | } |
| + | } |
| + | }, |
| + | |
| + | pause: function () { |
| + | if (this.ready) { |
| + | this.player.api('pause') |
| + | } else if (this.playStatus) { |
| + | delete this.playOnReady |
| + | this.listeners.pause() |
| + | delete this.playStatus |
| + | } |
| + | } |
| + | }) |
| + | |
| + | $.extend(Gallery.prototype, { |
| + | VimeoPlayer: VimeoPlayer, |
| + | |
| + | textFactory: function (obj, callback) { |
| + | var options = this.options |
| + | var videoId = this.getItemProperty(obj, options.vimeoVideoIdProperty) |
| + | if (videoId) { |
| + | if (this.getItemProperty(obj, options.urlProperty) === undefined) { |
| + | obj[options.urlProperty] = '//vimeo.com/' + videoId |
| + | } |
| + | counter += 1 |
| + | return this.videoFactory( |
| + | obj, |
| + | callback, |
| + | new VimeoPlayer( |
| + | options.vimeoPlayerUrl, |
| + | videoId, |
| + | options.vimeoPlayerIdPrefix + counter, |
| + | options.vimeoClickToPlay |
| + | ) |
| + | ) |
| + | } |
| + | return textFactory.call(this, obj, callback) |
| + | } |
| + | }) |
| + | |
| + | return Gallery |
| + | }) |
public/javascripts/blueimp/blueimp-gallery-youtube.js
+223
-0
| @@ | @@ -0,0 +1,223 @@ |
| + | /* |
| + | * blueimp Gallery YouTube Video Factory JS |
| + | * https://github.com/blueimp/Gallery |
| + | * |
| + | * Copyright 2013, Sebastian Tschan |
| + | * https://blueimp.net |
| + | * |
| + | * Licensed under the MIT license: |
| + | * https://opensource.org/licenses/MIT |
| + | */ |
| + | |
| + | /* global define, window, document, YT */ |
| + | |
| + | ;(function (factory) { |
| + | 'use strict' |
| + | if (typeof define === 'function' && define.amd) { |
| + | // Register as an anonymous AMD module: |
| + | define(['./blueimp-helper', './blueimp-gallery-video'], factory) |
| + | } else { |
| + | // Browser globals: |
| + | factory(window.blueimp.helper || window.jQuery, window.blueimp.Gallery) |
| + | } |
| + | })(function ($, Gallery) { |
| + | 'use strict' |
| + | |
| + | if (!window.postMessage) { |
| + | return Gallery |
| + | } |
| + | |
| + | $.extend(Gallery.prototype.options, { |
| + | // The list object property (or data attribute) with the YouTube video id: |
| + | youTubeVideoIdProperty: 'youtube', |
| + | // Optional object with parameters passed to the YouTube video player: |
| + | // https://developers.google.com/youtube/player_parameters |
| + | youTubePlayerVars: { |
| + | wmode: 'transparent' |
| + | }, |
| + | // Require a click on the native YouTube player for the initial playback: |
| + | youTubeClickToPlay: true |
| + | }) |
| + | |
| + | var textFactory = |
| + | Gallery.prototype.textFactory || Gallery.prototype.imageFactory |
| + | var YouTubePlayer = function (videoId, playerVars, clickToPlay) { |
| + | this.videoId = videoId |
| + | this.playerVars = playerVars |
| + | this.clickToPlay = clickToPlay |
| + | this.element = document.createElement('div') |
| + | this.listeners = {} |
| + | } |
| + | |
| + | $.extend(YouTubePlayer.prototype, { |
| + | canPlayType: function () { |
| + | return true |
| + | }, |
| + | |
| + | on: function (type, func) { |
| + | this.listeners[type] = func |
| + | return this |
| + | }, |
| + | |
| + | loadAPI: function () { |
| + | var that = this |
| + | var onYouTubeIframeAPIReady = window.onYouTubeIframeAPIReady |
| + | var apiUrl = '//www.youtube.com/iframe_api' |
| + | var scriptTags = document.getElementsByTagName('script') |
| + | var i = scriptTags.length |
| + | var scriptTag |
| + | window.onYouTubeIframeAPIReady = function () { |
| + | if (onYouTubeIframeAPIReady) { |
| + | onYouTubeIframeAPIReady.apply(this) |
| + | } |
| + | if (that.playOnReady) { |
| + | that.play() |
| + | } |
| + | } |
| + | while (i) { |
| + | i -= 1 |
| + | if (scriptTags[i].src === apiUrl) { |
| + | return |
| + | } |
| + | } |
| + | scriptTag = document.createElement('script') |
| + | scriptTag.src = apiUrl |
| + | scriptTags[0].parentNode.insertBefore(scriptTag, scriptTags[0]) |
| + | }, |
| + | |
| + | onReady: function () { |
| + | this.ready = true |
| + | if (this.playOnReady) { |
| + | this.play() |
| + | } |
| + | }, |
| + | |
| + | onPlaying: function () { |
| + | if (this.playStatus < 2) { |
| + | this.listeners.playing() |
| + | this.playStatus = 2 |
| + | } |
| + | }, |
| + | |
| + | onPause: function () { |
| + | Gallery.prototype.setTimeout.call(this, this.checkSeek, null, 2000) |
| + | }, |
| + | |
| + | checkSeek: function () { |
| + | if ( |
| + | this.stateChange === YT.PlayerState.PAUSED || |
| + | this.stateChange === YT.PlayerState.ENDED |
| + | ) { |
| + | // check if current state change is actually paused |
| + | this.listeners.pause() |
| + | delete this.playStatus |
| + | } |
| + | }, |
| + | |
| + | onStateChange: function (event) { |
| + | switch (event.data) { |
| + | case YT.PlayerState.PLAYING: |
| + | this.hasPlayed = true |
| + | this.onPlaying() |
| + | break |
| + | case YT.PlayerState.PAUSED: |
| + | case YT.PlayerState.ENDED: |
| + | this.onPause() |
| + | break |
| + | } |
| + | // Save most recent state change to this.stateChange |
| + | this.stateChange = event.data |
| + | }, |
| + | |
| + | onError: function (event) { |
| + | this.listeners.error(event) |
| + | }, |
| + | |
| + | play: function () { |
| + | var that = this |
| + | if (!this.playStatus) { |
| + | this.listeners.play() |
| + | this.playStatus = 1 |
| + | } |
| + | if (this.ready) { |
| + | if ( |
| + | !this.hasPlayed && |
| + | (this.clickToPlay || |
| + | (window.navigator && |
| + | /iP(hone|od|ad)/.test(window.navigator.platform))) |
| + | ) { |
| + | // Manually trigger the playing callback if clickToPlay |
| + | // is enabled and to workaround a limitation in iOS, |
| + | // which requires synchronous user interaction to start |
| + | // the video playback: |
| + | this.onPlaying() |
| + | } else { |
| + | this.player.playVideo() |
| + | } |
| + | } else { |
| + | this.playOnReady = true |
| + | if (!(window.YT && YT.Player)) { |
| + | this.loadAPI() |
| + | } else if (!this.player) { |
| + | this.player = new YT.Player(this.element, { |
| + | videoId: this.videoId, |
| + | playerVars: this.playerVars, |
| + | events: { |
| + | onReady: function () { |
| + | that.onReady() |
| + | }, |
| + | onStateChange: function (event) { |
| + | that.onStateChange(event) |
| + | }, |
| + | onError: function (event) { |
| + | that.onError(event) |
| + | } |
| + | } |
| + | }) |
| + | } |
| + | } |
| + | }, |
| + | |
| + | pause: function () { |
| + | if (this.ready) { |
| + | this.player.pauseVideo() |
| + | } else if (this.playStatus) { |
| + | delete this.playOnReady |
| + | this.listeners.pause() |
| + | delete this.playStatus |
| + | } |
| + | } |
| + | }) |
| + | |
| + | $.extend(Gallery.prototype, { |
| + | YouTubePlayer: YouTubePlayer, |
| + | |
| + | textFactory: function (obj, callback) { |
| + | var options = this.options |
| + | var videoId = this.getItemProperty(obj, options.youTubeVideoIdProperty) |
| + | if (videoId) { |
| + | if (this.getItemProperty(obj, options.urlProperty) === undefined) { |
| + | obj[options.urlProperty] = '//www.youtube.com/watch?v=' + videoId |
| + | } |
| + | if ( |
| + | this.getItemProperty(obj, options.videoPosterProperty) === undefined |
| + | ) { |
| + | obj[options.videoPosterProperty] = |
| + | '//img.youtube.com/vi/' + videoId + '/maxresdefault.jpg' |
| + | } |
| + | return this.videoFactory( |
| + | obj, |
| + | callback, |
| + | new YouTubePlayer( |
| + | videoId, |
| + | options.youTubePlayerVars, |
| + | options.youTubeClickToPlay |
| + | ) |
| + | ) |
| + | } |
| + | return textFactory.call(this, obj, callback) |
| + | } |
| + | }) |
| + | |
| + | return Gallery |
| + | }) |
public/javascripts/blueimp/blueimp-gallery.js
+1408
-0
| @@ | @@ -0,0 +1,1408 @@ |
| + | /* |
| + | * blueimp Gallery JS |
| + | * https://github.com/blueimp/Gallery |
| + | * |
| + | * Copyright 2013, Sebastian Tschan |
| + | * https://blueimp.net |
| + | * |
| + | * Swipe implementation based on |
| + | * https://github.com/bradbirdsall/Swipe |
| + | * |
| + | * Licensed under the MIT license: |
| + | * https://opensource.org/licenses/MIT |
| + | */ |
| + | |
| + | /* global define, window, document, DocumentTouch */ |
| + | |
| + | ;(function (factory) { |
| + | 'use strict' |
| + | if (typeof define === 'function' && define.amd) { |
| + | // Register as an anonymous AMD module: |
| + | define(['./blueimp-helper'], factory) |
| + | } else { |
| + | // Browser globals: |
| + | window.blueimp = window.blueimp || {} |
| + | window.blueimp.Gallery = factory(window.blueimp.helper || window.jQuery) |
| + | } |
| + | })(function ($) { |
| + | 'use strict' |
| + | |
| + | function Gallery (list, options) { |
| + | if (document.body.style.maxHeight === undefined) { |
| + | // document.body.style.maxHeight is undefined on IE6 and lower |
| + | return null |
| + | } |
| + | if (!this || this.options !== Gallery.prototype.options) { |
| + | // Called as function instead of as constructor, |
| + | // so we simply return a new instance: |
| + | return new Gallery(list, options) |
| + | } |
| + | if (!list || !list.length) { |
| + | this.console.log( |
| + | 'blueimp Gallery: No or empty list provided as first argument.', |
| + | list |
| + | ) |
| + | return |
| + | } |
| + | this.list = list |
| + | this.num = list.length |
| + | this.initOptions(options) |
| + | this.initialize() |
| + | } |
| + | |
| + | $.extend(Gallery.prototype, { |
| + | options: { |
| + | // The Id, element or querySelector of the gallery widget: |
| + | container: '#blueimp-gallery', |
| + | // The tag name, Id, element or querySelector of the slides container: |
| + | slidesContainer: 'div', |
| + | // The tag name, Id, element or querySelector of the title element: |
| + | titleElement: 'h3', |
| + | // The class to add when the gallery is visible: |
| + | displayClass: 'blueimp-gallery-display', |
| + | // The class to add when the gallery controls are visible: |
| + | controlsClass: 'blueimp-gallery-controls', |
| + | // The class to add when the gallery only displays one element: |
| + | singleClass: 'blueimp-gallery-single', |
| + | // The class to add when the left edge has been reached: |
| + | leftEdgeClass: 'blueimp-gallery-left', |
| + | // The class to add when the right edge has been reached: |
| + | rightEdgeClass: 'blueimp-gallery-right', |
| + | // The class to add when the automatic slideshow is active: |
| + | playingClass: 'blueimp-gallery-playing', |
| + | // The class for all slides: |
| + | slideClass: 'slide', |
| + | // The slide class for loading elements: |
| + | slideLoadingClass: 'slide-loading', |
| + | // The slide class for elements that failed to load: |
| + | slideErrorClass: 'slide-error', |
| + | // The class for the content element loaded into each slide: |
| + | slideContentClass: 'slide-content', |
| + | // The class for the "toggle" control: |
| + | toggleClass: 'toggle', |
| + | // The class for the "prev" control: |
| + | prevClass: 'prev', |
| + | // The class for the "next" control: |
| + | nextClass: 'next', |
| + | // The class for the "close" control: |
| + | closeClass: 'close', |
| + | // The class for the "play-pause" toggle control: |
| + | playPauseClass: 'play-pause', |
| + | // The list object property (or data attribute) with the object type: |
| + | typeProperty: 'type', |
| + | // The list object property (or data attribute) with the object title: |
| + | titleProperty: 'title', |
| + | // The list object property (or data attribute) with the object URL: |
| + | urlProperty: 'href', |
| + | // The list object property (or data attribute) with the object srcset URL(s): |
| + | srcsetProperty: 'urlset', |
| + | // The gallery listens for transitionend events before triggering the |
| + | // opened and closed events, unless the following option is set to false: |
| + | displayTransition: true, |
| + | // Defines if the gallery slides are cleared from the gallery modal, |
| + | // or reused for the next gallery initialization: |
| + | clearSlides: true, |
| + | // Defines if images should be stretched to fill the available space, |
| + | // while maintaining their aspect ratio (will only be enabled for browsers |
| + | // supporting background-size="contain", which excludes IE < 9). |
| + | // Set to "cover", to make images cover all available space (requires |
| + | // support for background-size="cover", which excludes IE < 9): |
| + | stretchImages: false, |
| + | // Toggle the controls on pressing the Return key: |
| + | toggleControlsOnReturn: true, |
| + | // Toggle the controls on slide click: |
| + | toggleControlsOnSlideClick: true, |
| + | // Toggle the automatic slideshow interval on pressing the Space key: |
| + | toggleSlideshowOnSpace: true, |
| + | // Navigate the gallery by pressing left and right on the keyboard: |
| + | enableKeyboardNavigation: true, |
| + | // Close the gallery on pressing the Esc key: |
| + | closeOnEscape: true, |
| + | // Close the gallery when clicking on an empty slide area: |
| + | closeOnSlideClick: true, |
| + | // Close the gallery by swiping up or down: |
| + | closeOnSwipeUpOrDown: true, |
| + | // Emulate touch events on mouse-pointer devices such as desktop browsers: |
| + | emulateTouchEvents: true, |
| + | // Stop touch events from bubbling up to ancestor elements of the Gallery: |
| + | stopTouchEventsPropagation: false, |
| + | // Hide the page scrollbars: |
| + | hidePageScrollbars: true, |
| + | // Stops any touches on the container from scrolling the page: |
| + | disableScroll: true, |
| + | // Carousel mode (shortcut for carousel specific options): |
| + | carousel: false, |
| + | // Allow continuous navigation, moving from last to first |
| + | // and from first to last slide: |
| + | continuous: true, |
| + | // Remove elements outside of the preload range from the DOM: |
| + | unloadElements: true, |
| + | // Start with the automatic slideshow: |
| + | startSlideshow: false, |
| + | // Delay in milliseconds between slides for the automatic slideshow: |
| + | slideshowInterval: 5000, |
| + | // The starting index as integer. |
| + | // Can also be an object of the given list, |
| + | // or an equal object with the same url property: |
| + | index: 0, |
| + | // The number of elements to load around the current index: |
| + | preloadRange: 2, |
| + | // The transition speed between slide changes in milliseconds: |
| + | transitionSpeed: 400, |
| + | // The transition speed for automatic slide changes, set to an integer |
| + | // greater 0 to override the default transition speed: |
| + | slideshowTransitionSpeed: undefined, |
| + | // The event object for which the default action will be canceled |
| + | // on Gallery initialization (e.g. the click event to open the Gallery): |
| + | event: undefined, |
| + | // Callback function executed when the Gallery is initialized. |
| + | // Is called with the gallery instance as "this" object: |
| + | onopen: undefined, |
| + | // Callback function executed when the Gallery has been initialized |
| + | // and the initialization transition has been completed. |
| + | // Is called with the gallery instance as "this" object: |
| + | onopened: undefined, |
| + | // Callback function executed on slide change. |
| + | // Is called with the gallery instance as "this" object and the |
| + | // current index and slide as arguments: |
| + | onslide: undefined, |
| + | // Callback function executed after the slide change transition. |
| + | // Is called with the gallery instance as "this" object and the |
| + | // current index and slide as arguments: |
| + | onslideend: undefined, |
| + | // Callback function executed on slide content load. |
| + | // Is called with the gallery instance as "this" object and the |
| + | // slide index and slide element as arguments: |
| + | onslidecomplete: undefined, |
| + | // Callback function executed when the Gallery is about to be closed. |
| + | // Is called with the gallery instance as "this" object: |
| + | onclose: undefined, |
| + | // Callback function executed when the Gallery has been closed |
| + | // and the closing transition has been completed. |
| + | // Is called with the gallery instance as "this" object: |
| + | onclosed: undefined |
| + | }, |
| + | |
| + | carouselOptions: { |
| + | hidePageScrollbars: false, |
| + | toggleControlsOnReturn: false, |
| + | toggleSlideshowOnSpace: false, |
| + | enableKeyboardNavigation: false, |
| + | closeOnEscape: false, |
| + | closeOnSlideClick: false, |
| + | closeOnSwipeUpOrDown: false, |
| + | disableScroll: false, |
| + | startSlideshow: true |
| + | }, |
| + | |
| + | console: |
| + | window.console && typeof window.console.log === 'function' |
| + | ? window.console |
| + | : { log: function () {} }, |
| + | |
| + | // Detect touch, transition, transform and background-size support: |
| + | support: (function (element) { |
| + | var support = { |
| + | touch: |
| + | window.ontouchstart !== undefined || |
| + | (window.DocumentTouch && document instanceof DocumentTouch) |
| + | } |
| + | var transitions = { |
| + | webkitTransition: { |
| + | end: 'webkitTransitionEnd', |
| + | prefix: '-webkit-' |
| + | }, |
| + | MozTransition: { |
| + | end: 'transitionend', |
| + | prefix: '-moz-' |
| + | }, |
| + | OTransition: { |
| + | end: 'otransitionend', |
| + | prefix: '-o-' |
| + | }, |
| + | transition: { |
| + | end: 'transitionend', |
| + | prefix: '' |
| + | } |
| + | } |
| + | var prop |
| + | for (prop in transitions) { |
| + | if ( |
| + | transitions.hasOwnProperty(prop) && |
| + | element.style[prop] !== undefined |
| + | ) { |
| + | support.transition = transitions[prop] |
| + | support.transition.name = prop |
| + | break |
| + | } |
| + | } |
| + | function elementTests () { |
| + | var transition = support.transition |
| + | var prop |
| + | var translateZ |
| + | document.body.appendChild(element) |
| + | if (transition) { |
| + | prop = transition.name.slice(0, -9) + 'ransform' |
| + | if (element.style[prop] !== undefined) { |
| + | element.style[prop] = 'translateZ(0)' |
| + | translateZ = window |
| + | .getComputedStyle(element) |
| + | .getPropertyValue(transition.prefix + 'transform') |
| + | support.transform = { |
| + | prefix: transition.prefix, |
| + | name: prop, |
| + | translate: true, |
| + | translateZ: !!translateZ && translateZ !== 'none' |
| + | } |
| + | } |
| + | } |
| + | if (element.style.backgroundSize !== undefined) { |
| + | support.backgroundSize = {} |
| + | element.style.backgroundSize = 'contain' |
| + | support.backgroundSize.contain = |
| + | window |
| + | .getComputedStyle(element) |
| + | .getPropertyValue('background-size') === 'contain' |
| + | element.style.backgroundSize = 'cover' |
| + | support.backgroundSize.cover = |
| + | window |
| + | .getComputedStyle(element) |
| + | .getPropertyValue('background-size') === 'cover' |
| + | } |
| + | document.body.removeChild(element) |
| + | } |
| + | if (document.body) { |
| + | elementTests() |
| + | } else { |
| + | $(document).on('DOMContentLoaded', elementTests) |
| + | } |
| + | return support |
| + | // Test element, has to be standard HTML and must not be hidden |
| + | // for the CSS3 tests using window.getComputedStyle to be applicable: |
| + | })(document.createElement('div')), |
| + | |
| + | requestAnimationFrame: |
| + | window.requestAnimationFrame || |
| + | window.webkitRequestAnimationFrame || |
| + | window.mozRequestAnimationFrame, |
| + | |
| + | cancelAnimationFrame: |
| + | window.cancelAnimationFrame || |
| + | window.webkitCancelRequestAnimationFrame || |
| + | window.webkitCancelAnimationFrame || |
| + | window.mozCancelAnimationFrame, |
| + | |
| + | initialize: function () { |
| + | this.initStartIndex() |
| + | if (this.initWidget() === false) { |
| + | return false |
| + | } |
| + | this.initEventListeners() |
| + | // Load the slide at the given index: |
| + | this.onslide(this.index) |
| + | // Manually trigger the slideend event for the initial slide: |
| + | this.ontransitionend() |
| + | // Start the automatic slideshow if applicable: |
| + | if (this.options.startSlideshow) { |
| + | this.play() |
| + | } |
| + | }, |
| + | |
| + | slide: function (to, speed) { |
| + | window.clearTimeout(this.timeout) |
| + | var index = this.index |
| + | var direction |
| + | var naturalDirection |
| + | var diff |
| + | if (index === to || this.num === 1) { |
| + | return |
| + | } |
| + | if (!speed) { |
| + | speed = this.options.transitionSpeed |
| + | } |
| + | if (this.support.transform) { |
| + | if (!this.options.continuous) { |
| + | to = this.circle(to) |
| + | } |
| + | // 1: backward, -1: forward: |
| + | direction = Math.abs(index - to) / (index - to) |
| + | // Get the actual position of the slide: |
| + | if (this.options.continuous) { |
| + | naturalDirection = direction |
| + | direction = -this.positions[this.circle(to)] / this.slideWidth |
| + | // If going forward but to < index, use to = slides.length + to |
| + | // If going backward but to > index, use to = -slides.length + to |
| + | if (direction !== naturalDirection) { |
| + | to = -direction * this.num + to |
| + | } |
| + | } |
| + | diff = Math.abs(index - to) - 1 |
| + | // Move all the slides between index and to in the right direction: |
| + | while (diff) { |
| + | diff -= 1 |
| + | this.move( |
| + | this.circle((to > index ? to : index) - diff - 1), |
| + | this.slideWidth * direction, |
| + | 0 |
| + | ) |
| + | } |
| + | to = this.circle(to) |
| + | this.move(index, this.slideWidth * direction, speed) |
| + | this.move(to, 0, speed) |
| + | if (this.options.continuous) { |
| + | this.move( |
| + | this.circle(to - direction), |
| + | -(this.slideWidth * direction), |
| + | 0 |
| + | ) |
| + | } |
| + | } else { |
| + | to = this.circle(to) |
| + | this.animate(index * -this.slideWidth, to * -this.slideWidth, speed) |
| + | } |
| + | this.onslide(to) |
| + | }, |
| + | |
| + | getIndex: function () { |
| + | return this.index |
| + | }, |
| + | |
| + | getNumber: function () { |
| + | return this.num |
| + | }, |
| + | |
| + | prev: function () { |
| + | if (this.options.continuous || this.index) { |
| + | this.slide(this.index - 1) |
| + | } |
| + | }, |
| + | |
| + | next: function () { |
| + | if (this.options.continuous || this.index < this.num - 1) { |
| + | this.slide(this.index + 1) |
| + | } |
| + | }, |
| + | |
| + | play: function (time) { |
| + | var that = this |
| + | window.clearTimeout(this.timeout) |
| + | this.interval = time || this.options.slideshowInterval |
| + | if (this.elements[this.index] > 1) { |
| + | this.timeout = this.setTimeout( |
| + | (!this.requestAnimationFrame && this.slide) || |
| + | function (to, speed) { |
| + | that.animationFrameId = that.requestAnimationFrame.call( |
| + | window, |
| + | function () { |
| + | that.slide(to, speed) |
| + | } |
| + | ) |
| + | }, |
| + | [this.index + 1, this.options.slideshowTransitionSpeed], |
| + | this.interval |
| + | ) |
| + | } |
| + | this.container.addClass(this.options.playingClass) |
| + | }, |
| + | |
| + | pause: function () { |
| + | window.clearTimeout(this.timeout) |
| + | this.interval = null |
| + | if (this.cancelAnimationFrame) { |
| + | this.cancelAnimationFrame.call(window, this.animationFrameId) |
| + | this.animationFrameId = null |
| + | } |
| + | this.container.removeClass(this.options.playingClass) |
| + | }, |
| + | |
| + | add: function (list) { |
| + | var i |
| + | if (!list.concat) { |
| + | // Make a real array out of the list to add: |
| + | list = Array.prototype.slice.call(list) |
| + | } |
| + | if (!this.list.concat) { |
| + | // Make a real array out of the Gallery list: |
| + | this.list = Array.prototype.slice.call(this.list) |
| + | } |
| + | this.list = this.list.concat(list) |
| + | this.num = this.list.length |
| + | if (this.num > 2 && this.options.continuous === null) { |
| + | this.options.continuous = true |
| + | this.container.removeClass(this.options.leftEdgeClass) |
| + | } |
| + | this.container |
| + | .removeClass(this.options.rightEdgeClass) |
| + | .removeClass(this.options.singleClass) |
| + | for (i = this.num - list.length; i < this.num; i += 1) { |
| + | this.addSlide(i) |
| + | this.positionSlide(i) |
| + | } |
| + | this.positions.length = this.num |
| + | this.initSlides(true) |
| + | }, |
| + | |
| + | resetSlides: function () { |
| + | this.slidesContainer.empty() |
| + | this.unloadAllSlides() |
| + | this.slides = [] |
| + | }, |
| + | |
| + | handleClose: function () { |
| + | var options = this.options |
| + | this.destroyEventListeners() |
| + | // Cancel the slideshow: |
| + | this.pause() |
| + | this.container[0].style.display = 'none' |
| + | this.container |
| + | .removeClass(options.displayClass) |
| + | .removeClass(options.singleClass) |
| + | .removeClass(options.leftEdgeClass) |
| + | .removeClass(options.rightEdgeClass) |
| + | if (options.hidePageScrollbars) { |
| + | document.body.style.overflow = this.bodyOverflowStyle |
| + | } |
| + | if (this.options.clearSlides) { |
| + | this.resetSlides() |
| + | } |
| + | if (this.options.onclosed) { |
| + | this.options.onclosed.call(this) |
| + | } |
| + | }, |
| + | |
| + | close: function () { |
| + | var that = this |
| + | function closeHandler (event) { |
| + | if (event.target === that.container[0]) { |
| + | that.container.off(that.support.transition.end, closeHandler) |
| + | that.handleClose() |
| + | } |
| + | } |
| + | if (this.options.onclose) { |
| + | this.options.onclose.call(this) |
| + | } |
| + | if (this.support.transition && this.options.displayTransition) { |
| + | this.container.on(this.support.transition.end, closeHandler) |
| + | this.container.removeClass(this.options.displayClass) |
| + | } else { |
| + | this.handleClose() |
| + | } |
| + | }, |
| + | |
| + | circle: function (index) { |
| + | // Always return a number inside of the slides index range: |
| + | return (this.num + index % this.num) % this.num |
| + | }, |
| + | |
| + | move: function (index, dist, speed) { |
| + | this.translateX(index, dist, speed) |
| + | this.positions[index] = dist |
| + | }, |
| + | |
| + | translate: function (index, x, y, speed) { |
| + | var style = this.slides[index].style |
| + | var transition = this.support.transition |
| + | var transform = this.support.transform |
| + | style[transition.name + 'Duration'] = speed + 'ms' |
| + | style[transform.name] = |
| + | 'translate(' + |
| + | x + |
| + | 'px, ' + |
| + | y + |
| + | 'px)' + |
| + | (transform.translateZ ? ' translateZ(0)' : '') |
| + | }, |
| + | |
| + | translateX: function (index, x, speed) { |
| + | this.translate(index, x, 0, speed) |
| + | }, |
| + | |
| + | translateY: function (index, y, speed) { |
| + | this.translate(index, 0, y, speed) |
| + | }, |
| + | |
| + | animate: function (from, to, speed) { |
| + | if (!speed) { |
| + | this.slidesContainer[0].style.left = to + 'px' |
| + | return |
| + | } |
| + | var that = this |
| + | var start = new Date().getTime() |
| + | var timer = window.setInterval(function () { |
| + | var timeElap = new Date().getTime() - start |
| + | if (timeElap > speed) { |
| + | that.slidesContainer[0].style.left = to + 'px' |
| + | that.ontransitionend() |
| + | window.clearInterval(timer) |
| + | return |
| + | } |
| + | that.slidesContainer[0].style.left = |
| + | (to - from) * (Math.floor(timeElap / speed * 100) / 100) + from + 'px' |
| + | }, 4) |
| + | }, |
| + | |
| + | preventDefault: function (event) { |
| + | if (event.preventDefault) { |
| + | event.preventDefault() |
| + | } else { |
| + | event.returnValue = false |
| + | } |
| + | }, |
| + | |
| + | stopPropagation: function (event) { |
| + | if (event.stopPropagation) { |
| + | event.stopPropagation() |
| + | } else { |
| + | event.cancelBubble = true |
| + | } |
| + | }, |
| + | |
| + | onresize: function () { |
| + | this.initSlides(true) |
| + | }, |
| + | |
| + | onmousedown: function (event) { |
| + | // Trigger on clicks of the left mouse button only |
| + | // and exclude video elements: |
| + | if ( |
| + | event.which && |
| + | event.which === 1 && |
| + | event.target.nodeName !== 'VIDEO' |
| + | ) { |
| + | // Preventing the default mousedown action is required |
| + | // to make touch emulation work with Firefox: |
| + | event.preventDefault() |
| + | ;(event.originalEvent || event).touches = [ |
| + | { |
| + | pageX: event.pageX, |
| + | pageY: event.pageY |
| + | } |
| + | ] |
| + | this.ontouchstart(event) |
| + | } |
| + | }, |
| + | |
| + | onmousemove: function (event) { |
| + | if (this.touchStart) { |
| + | ;(event.originalEvent || event).touches = [ |
| + | { |
| + | pageX: event.pageX, |
| + | pageY: event.pageY |
| + | } |
| + | ] |
| + | this.ontouchmove(event) |
| + | } |
| + | }, |
| + | |
| + | onmouseup: function (event) { |
| + | if (this.touchStart) { |
| + | this.ontouchend(event) |
| + | delete this.touchStart |
| + | } |
| + | }, |
| + | |
| + | onmouseout: function (event) { |
| + | if (this.touchStart) { |
| + | var target = event.target |
| + | var related = event.relatedTarget |
| + | if (!related || (related !== target && !$.contains(target, related))) { |
| + | this.onmouseup(event) |
| + | } |
| + | } |
| + | }, |
| + | |
| + | ontouchstart: function (event) { |
| + | if (this.options.stopTouchEventsPropagation) { |
| + | this.stopPropagation(event) |
| + | } |
| + | // jQuery doesn't copy touch event properties by default, |
| + | // so we have to access the originalEvent object: |
| + | var touches = (event.originalEvent || event).touches[0] |
| + | this.touchStart = { |
| + | // Remember the initial touch coordinates: |
| + | x: touches.pageX, |
| + | y: touches.pageY, |
| + | // Store the time to determine touch duration: |
| + | time: Date.now() |
| + | } |
| + | // Helper variable to detect scroll movement: |
| + | this.isScrolling = undefined |
| + | // Reset delta values: |
| + | this.touchDelta = {} |
| + | }, |
| + | |
| + | ontouchmove: function (event) { |
| + | if (this.options.stopTouchEventsPropagation) { |
| + | this.stopPropagation(event) |
| + | } |
| + | // jQuery doesn't copy touch event properties by default, |
| + | // so we have to access the originalEvent object: |
| + | var touches = (event.originalEvent || event).touches[0] |
| + | var scale = (event.originalEvent || event).scale |
| + | var index = this.index |
| + | var touchDeltaX |
| + | var indices |
| + | // Ensure this is a one touch swipe and not, e.g. a pinch: |
| + | if (touches.length > 1 || (scale && scale !== 1)) { |
| + | return |
| + | } |
| + | if (this.options.disableScroll) { |
| + | event.preventDefault() |
| + | } |
| + | // Measure change in x and y coordinates: |
| + | this.touchDelta = { |
| + | x: touches.pageX - this.touchStart.x, |
| + | y: touches.pageY - this.touchStart.y |
| + | } |
| + | touchDeltaX = this.touchDelta.x |
| + | // Detect if this is a vertical scroll movement (run only once per touch): |
| + | if (this.isScrolling === undefined) { |
| + | this.isScrolling = |
| + | this.isScrolling || |
| + | Math.abs(touchDeltaX) < Math.abs(this.touchDelta.y) |
| + | } |
| + | if (!this.isScrolling) { |
| + | // Always prevent horizontal scroll: |
| + | event.preventDefault() |
| + | // Stop the slideshow: |
| + | window.clearTimeout(this.timeout) |
| + | if (this.options.continuous) { |
| + | indices = [this.circle(index + 1), index, this.circle(index - 1)] |
| + | } else { |
| + | // Increase resistance if first slide and sliding left |
| + | // or last slide and sliding right: |
| + | this.touchDelta.x = touchDeltaX = |
| + | touchDeltaX / |
| + | ((!index && touchDeltaX > 0) || |
| + | (index === this.num - 1 && touchDeltaX < 0) |
| + | ? Math.abs(touchDeltaX) / this.slideWidth + 1 |
| + | : 1) |
| + | indices = [index] |
| + | if (index) { |
| + | indices.push(index - 1) |
| + | } |
| + | if (index < this.num - 1) { |
| + | indices.unshift(index + 1) |
| + | } |
| + | } |
| + | while (indices.length) { |
| + | index = indices.pop() |
| + | this.translateX(index, touchDeltaX + this.positions[index], 0) |
| + | } |
| + | } else { |
| + | this.translateY(index, this.touchDelta.y + this.positions[index], 0) |
| + | } |
| + | }, |
| + | |
| + | ontouchend: function (event) { |
| + | if (this.options.stopTouchEventsPropagation) { |
| + | this.stopPropagation(event) |
| + | } |
| + | var index = this.index |
| + | var speed = this.options.transitionSpeed |
| + | var slideWidth = this.slideWidth |
| + | var isShortDuration = Number(Date.now() - this.touchStart.time) < 250 |
| + | // Determine if slide attempt triggers next/prev slide: |
| + | var isValidSlide = |
| + | (isShortDuration && Math.abs(this.touchDelta.x) > 20) || |
| + | Math.abs(this.touchDelta.x) > slideWidth / 2 |
| + | // Determine if slide attempt is past start or end: |
| + | var isPastBounds = |
| + | (!index && this.touchDelta.x > 0) || |
| + | (index === this.num - 1 && this.touchDelta.x < 0) |
| + | var isValidClose = |
| + | !isValidSlide && |
| + | this.options.closeOnSwipeUpOrDown && |
| + | ((isShortDuration && Math.abs(this.touchDelta.y) > 20) || |
| + | Math.abs(this.touchDelta.y) > this.slideHeight / 2) |
| + | var direction |
| + | var indexForward |
| + | var indexBackward |
| + | var distanceForward |
| + | var distanceBackward |
| + | if (this.options.continuous) { |
| + | isPastBounds = false |
| + | } |
| + | // Determine direction of swipe (true: right, false: left): |
| + | direction = this.touchDelta.x < 0 ? -1 : 1 |
| + | if (!this.isScrolling) { |
| + | if (isValidSlide && !isPastBounds) { |
| + | indexForward = index + direction |
| + | indexBackward = index - direction |
| + | distanceForward = slideWidth * direction |
| + | distanceBackward = -slideWidth * direction |
| + | if (this.options.continuous) { |
| + | this.move(this.circle(indexForward), distanceForward, 0) |
| + | this.move(this.circle(index - 2 * direction), distanceBackward, 0) |
| + | } else if (indexForward >= 0 && indexForward < this.num) { |
| + | this.move(indexForward, distanceForward, 0) |
| + | } |
| + | this.move(index, this.positions[index] + distanceForward, speed) |
| + | this.move( |
| + | this.circle(indexBackward), |
| + | this.positions[this.circle(indexBackward)] + distanceForward, |
| + | speed |
| + | ) |
| + | index = this.circle(indexBackward) |
| + | this.onslide(index) |
| + | } else { |
| + | // Move back into position |
| + | if (this.options.continuous) { |
| + | this.move(this.circle(index - 1), -slideWidth, speed) |
| + | this.move(index, 0, speed) |
| + | this.move(this.circle(index + 1), slideWidth, speed) |
| + | } else { |
| + | if (index) { |
| + | this.move(index - 1, -slideWidth, speed) |
| + | } |
| + | this.move(index, 0, speed) |
| + | if (index < this.num - 1) { |
| + | this.move(index + 1, slideWidth, speed) |
| + | } |
| + | } |
| + | } |
| + | } else { |
| + | if (isValidClose) { |
| + | this.close() |
| + | } else { |
| + | // Move back into position |
| + | this.translateY(index, 0, speed) |
| + | } |
| + | } |
| + | }, |
| + | |
| + | ontouchcancel: function (event) { |
| + | if (this.touchStart) { |
| + | this.ontouchend(event) |
| + | delete this.touchStart |
| + | } |
| + | }, |
| + | |
| + | ontransitionend: function (event) { |
| + | var slide = this.slides[this.index] |
| + | if (!event || slide === event.target) { |
| + | if (this.interval) { |
| + | this.play() |
| + | } |
| + | this.setTimeout(this.options.onslideend, [this.index, slide]) |
| + | } |
| + | }, |
| + | |
| + | oncomplete: function (event) { |
| + | var target = event.target || event.srcElement |
| + | var parent = target && target.parentNode |
| + | var index |
| + | if (!target || !parent) { |
| + | return |
| + | } |
| + | index = this.getNodeIndex(parent) |
| + | $(parent).removeClass(this.options.slideLoadingClass) |
| + | if (event.type === 'error') { |
| + | $(parent).addClass(this.options.slideErrorClass) |
| + | this.elements[index] = 3 // Fail |
| + | } else { |
| + | this.elements[index] = 2 // Done |
| + | } |
| + | // Fix for IE7's lack of support for percentage max-height: |
| + | if (target.clientHeight > this.container[0].clientHeight) { |
| + | target.style.maxHeight = this.container[0].clientHeight |
| + | } |
| + | if (this.interval && this.slides[this.index] === parent) { |
| + | this.play() |
| + | } |
| + | this.setTimeout(this.options.onslidecomplete, [index, parent]) |
| + | }, |
| + | |
| + | onload: function (event) { |
| + | this.oncomplete(event) |
| + | }, |
| + | |
| + | onerror: function (event) { |
| + | this.oncomplete(event) |
| + | }, |
| + | |
| + | onkeydown: function (event) { |
| + | switch (event.which || event.keyCode) { |
| + | case 13: // Return |
| + | if (this.options.toggleControlsOnReturn) { |
| + | this.preventDefault(event) |
| + | this.toggleControls() |
| + | } |
| + | break |
| + | case 27: // Esc |
| + | if (this.options.closeOnEscape) { |
| + | this.close() |
| + | // prevent Esc from closing other things |
| + | event.stopImmediatePropagation() |
| + | } |
| + | break |
| + | case 32: // Space |
| + | if (this.options.toggleSlideshowOnSpace) { |
| + | this.preventDefault(event) |
| + | this.toggleSlideshow() |
| + | } |
| + | break |
| + | case 37: // Left |
| + | if (this.options.enableKeyboardNavigation) { |
| + | this.preventDefault(event) |
| + | this.prev() |
| + | } |
| + | break |
| + | case 39: // Right |
| + | if (this.options.enableKeyboardNavigation) { |
| + | this.preventDefault(event) |
| + | this.next() |
| + | } |
| + | break |
| + | } |
| + | }, |
| + | |
| + | handleClick: function (event) { |
| + | var options = this.options |
| + | var target = event.target || event.srcElement |
| + | var parent = target.parentNode |
| + | function isTarget (className) { |
| + | return $(target).hasClass(className) || $(parent).hasClass(className) |
| + | } |
| + | if (isTarget(options.toggleClass)) { |
| + | // Click on "toggle" control |
| + | this.preventDefault(event) |
| + | this.toggleControls() |
| + | } else if (isTarget(options.prevClass)) { |
| + | // Click on "prev" control |
| + | this.preventDefault(event) |
| + | this.prev() |
| + | } else if (isTarget(options.nextClass)) { |
| + | // Click on "next" control |
| + | this.preventDefault(event) |
| + | this.next() |
| + | } else if (isTarget(options.closeClass)) { |
| + | // Click on "close" control |
| + | this.preventDefault(event) |
| + | this.close() |
| + | } else if (isTarget(options.playPauseClass)) { |
| + | // Click on "play-pause" control |
| + | this.preventDefault(event) |
| + | this.toggleSlideshow() |
| + | } else if (parent === this.slidesContainer[0]) { |
| + | // Click on slide background |
| + | if (options.closeOnSlideClick) { |
| + | this.preventDefault(event) |
| + | this.close() |
| + | } else if (options.toggleControlsOnSlideClick) { |
| + | this.preventDefault(event) |
| + | this.toggleControls() |
| + | } |
| + | } else if ( |
| + | parent.parentNode && |
| + | parent.parentNode === this.slidesContainer[0] |
| + | ) { |
| + | // Click on displayed element |
| + | if (options.toggleControlsOnSlideClick) { |
| + | this.preventDefault(event) |
| + | this.toggleControls() |
| + | } |
| + | } |
| + | }, |
| + | |
| + | onclick: function (event) { |
| + | if ( |
| + | this.options.emulateTouchEvents && |
| + | this.touchDelta && |
| + | (Math.abs(this.touchDelta.x) > 20 || Math.abs(this.touchDelta.y) > 20) |
| + | ) { |
| + | delete this.touchDelta |
| + | return |
| + | } |
| + | return this.handleClick(event) |
| + | }, |
| + | |
| + | updateEdgeClasses: function (index) { |
| + | if (!index) { |
| + | this.container.addClass(this.options.leftEdgeClass) |
| + | } else { |
| + | this.container.removeClass(this.options.leftEdgeClass) |
| + | } |
| + | if (index === this.num - 1) { |
| + | this.container.addClass(this.options.rightEdgeClass) |
| + | } else { |
| + | this.container.removeClass(this.options.rightEdgeClass) |
| + | } |
| + | }, |
| + | |
| + | handleSlide: function (index) { |
| + | if (!this.options.continuous) { |
| + | this.updateEdgeClasses(index) |
| + | } |
| + | this.loadElements(index) |
| + | if (this.options.unloadElements) { |
| + | this.unloadElements(index) |
| + | } |
| + | this.setTitle(index) |
| + | }, |
| + | |
| + | onslide: function (index) { |
| + | this.index = index |
| + | this.handleSlide(index) |
| + | this.setTimeout(this.options.onslide, [index, this.slides[index]]) |
| + | }, |
| + | |
| + | setTitle: function (index) { |
| + | var firstChild = this.slides[index].firstChild |
| + | var text = firstChild.title || firstChild.alt |
| + | var titleElement = this.titleElement |
| + | if (titleElement.length) { |
| + | this.titleElement.empty() |
| + | if (text) { |
| + | titleElement[0].appendChild(document.createTextNode(text)) |
| + | } |
| + | } |
| + | }, |
| + | |
| + | setTimeout: function (func, args, wait) { |
| + | var that = this |
| + | return ( |
| + | func && |
| + | window.setTimeout(function () { |
| + | func.apply(that, args || []) |
| + | }, wait || 0) |
| + | ) |
| + | }, |
| + | |
| + | imageFactory: function (obj, callback) { |
| + | var that = this |
| + | var img = this.imagePrototype.cloneNode(false) |
| + | var url = obj |
| + | var backgroundSize = this.options.stretchImages |
| + | var called |
| + | var element |
| + | var title |
| + | function callbackWrapper (event) { |
| + | if (!called) { |
| + | event = { |
| + | type: event.type, |
| + | target: element |
| + | } |
| + | if (!element.parentNode) { |
| + | // Fix for IE7 firing the load event for |
| + | // cached images before the element could |
| + | // be added to the DOM: |
| + | return that.setTimeout(callbackWrapper, [event]) |
| + | } |
| + | called = true |
| + | $(img).off('load error', callbackWrapper) |
| + | if (backgroundSize) { |
| + | if (event.type === 'load') { |
| + | element.style.background = 'url("' + url + '") center no-repeat' |
| + | element.style.backgroundSize = backgroundSize |
| + | } |
| + | } |
| + | callback(event) |
| + | } |
| + | } |
| + | if (typeof url !== 'string') { |
| + | url = this.getItemProperty(obj, this.options.urlProperty) |
| + | title = this.getItemProperty(obj, this.options.titleProperty) |
| + | } |
| + | if (backgroundSize === true) { |
| + | backgroundSize = 'contain' |
| + | } |
| + | backgroundSize = |
| + | this.support.backgroundSize && |
| + | this.support.backgroundSize[backgroundSize] && |
| + | backgroundSize |
| + | if (backgroundSize) { |
| + | element = this.elementPrototype.cloneNode(false) |
| + | } else { |
| + | element = img |
| + | img.draggable = false |
| + | } |
| + | if (title) { |
| + | element.title = title |
| + | } |
| + | $(img).on('load error', callbackWrapper) |
| + | img.src = url |
| + | return element |
| + | }, |
| + | |
| + | createElement: function (obj, callback) { |
| + | var type = obj && this.getItemProperty(obj, this.options.typeProperty) |
| + | var factory = |
| + | (type && this[type.split('/')[0] + 'Factory']) || this.imageFactory |
| + | var element = obj && factory.call(this, obj, callback) |
| + | var srcset = this.getItemProperty(obj, this.options.srcsetProperty) |
| + | if (!element) { |
| + | element = this.elementPrototype.cloneNode(false) |
| + | this.setTimeout(callback, [ |
| + | { |
| + | type: 'error', |
| + | target: element |
| + | } |
| + | ]) |
| + | } |
| + | if (srcset) { |
| + | element.setAttribute('srcset', srcset) |
| + | } |
| + | $(element).addClass(this.options.slideContentClass) |
| + | return element |
| + | }, |
| + | |
| + | loadElement: function (index) { |
| + | if (!this.elements[index]) { |
| + | if (this.slides[index].firstChild) { |
| + | this.elements[index] = $(this.slides[index]).hasClass( |
| + | this.options.slideErrorClass |
| + | ) |
| + | ? 3 |
| + | : 2 |
| + | } else { |
| + | this.elements[index] = 1 // Loading |
| + | $(this.slides[index]).addClass(this.options.slideLoadingClass) |
| + | this.slides[index].appendChild( |
| + | this.createElement(this.list[index], this.proxyListener) |
| + | ) |
| + | } |
| + | } |
| + | }, |
| + | |
| + | loadElements: function (index) { |
| + | var limit = Math.min(this.num, this.options.preloadRange * 2 + 1) |
| + | var j = index |
| + | var i |
| + | for (i = 0; i < limit; i += 1) { |
| + | // First load the current slide element (0), |
| + | // then the next one (+1), |
| + | // then the previous one (-2), |
| + | // then the next after next (+2), etc.: |
| + | j += i * (i % 2 === 0 ? -1 : 1) |
| + | // Connect the ends of the list to load slide elements for |
| + | // continuous navigation: |
| + | j = this.circle(j) |
| + | this.loadElement(j) |
| + | } |
| + | }, |
| + | |
| + | unloadElements: function (index) { |
| + | var i, diff |
| + | for (i in this.elements) { |
| + | if (this.elements.hasOwnProperty(i)) { |
| + | diff = Math.abs(index - i) |
| + | if ( |
| + | diff > this.options.preloadRange && |
| + | diff + this.options.preloadRange < this.num |
| + | ) { |
| + | this.unloadSlide(i) |
| + | delete this.elements[i] |
| + | } |
| + | } |
| + | } |
| + | }, |
| + | |
| + | addSlide: function (index) { |
| + | var slide = this.slidePrototype.cloneNode(false) |
| + | slide.setAttribute('data-index', index) |
| + | this.slidesContainer[0].appendChild(slide) |
| + | this.slides.push(slide) |
| + | }, |
| + | |
| + | positionSlide: function (index) { |
| + | var slide = this.slides[index] |
| + | slide.style.width = this.slideWidth + 'px' |
| + | if (this.support.transform) { |
| + | slide.style.left = index * -this.slideWidth + 'px' |
| + | this.move( |
| + | index, |
| + | this.index > index |
| + | ? -this.slideWidth |
| + | : this.index < index ? this.slideWidth : 0, |
| + | 0 |
| + | ) |
| + | } |
| + | }, |
| + | |
| + | initSlides: function (reload) { |
| + | var clearSlides, i |
| + | if (!reload) { |
| + | this.positions = [] |
| + | this.positions.length = this.num |
| + | this.elements = {} |
| + | this.imagePrototype = document.createElement('img') |
| + | this.elementPrototype = document.createElement('div') |
| + | this.slidePrototype = document.createElement('div') |
| + | $(this.slidePrototype).addClass(this.options.slideClass) |
| + | this.slides = this.slidesContainer[0].children |
| + | clearSlides = |
| + | this.options.clearSlides || this.slides.length !== this.num |
| + | } |
| + | this.slideWidth = this.container[0].offsetWidth |
| + | this.slideHeight = this.container[0].offsetHeight |
| + | this.slidesContainer[0].style.width = this.num * this.slideWidth + 'px' |
| + | if (clearSlides) { |
| + | this.resetSlides() |
| + | } |
| + | for (i = 0; i < this.num; i += 1) { |
| + | if (clearSlides) { |
| + | this.addSlide(i) |
| + | } |
| + | this.positionSlide(i) |
| + | } |
| + | // Reposition the slides before and after the given index: |
| + | if (this.options.continuous && this.support.transform) { |
| + | this.move(this.circle(this.index - 1), -this.slideWidth, 0) |
| + | this.move(this.circle(this.index + 1), this.slideWidth, 0) |
| + | } |
| + | if (!this.support.transform) { |
| + | this.slidesContainer[0].style.left = |
| + | this.index * -this.slideWidth + 'px' |
| + | } |
| + | }, |
| + | |
| + | unloadSlide: function (index) { |
| + | var slide, firstChild |
| + | slide = this.slides[index] |
| + | firstChild = slide.firstChild |
| + | if (firstChild !== null) { |
| + | slide.removeChild(firstChild) |
| + | } |
| + | }, |
| + | |
| + | unloadAllSlides: function () { |
| + | var i, len |
| + | for (i = 0, len = this.slides.length; i < len; i++) { |
| + | this.unloadSlide(i) |
| + | } |
| + | }, |
| + | |
| + | toggleControls: function () { |
| + | var controlsClass = this.options.controlsClass |
| + | if (this.container.hasClass(controlsClass)) { |
| + | this.container.removeClass(controlsClass) |
| + | } else { |
| + | this.container.addClass(controlsClass) |
| + | } |
| + | }, |
| + | |
| + | toggleSlideshow: function () { |
| + | if (!this.interval) { |
| + | this.play() |
| + | } else { |
| + | this.pause() |
| + | } |
| + | }, |
| + | |
| + | getNodeIndex: function (element) { |
| + | return parseInt(element.getAttribute('data-index'), 10) |
| + | }, |
| + | |
| + | getNestedProperty: function (obj, property) { |
| + | property.replace( |
| + | // Matches native JavaScript notation in a String, |
| + | // e.g. '["doubleQuoteProp"].dotProp[2]' |
| + | // eslint-disable-next-line no-useless-escape |
| + | /\[(?:'([^']+)'|"([^"]+)"|(\d+))\]|(?:(?:^|\.)([^\.\[]+))/g, |
| + | function (str, singleQuoteProp, doubleQuoteProp, arrayIndex, dotProp) { |
| + | var prop = |
| + | dotProp || |
| + | singleQuoteProp || |
| + | doubleQuoteProp || |
| + | (arrayIndex && parseInt(arrayIndex, 10)) |
| + | if (str && obj) { |
| + | obj = obj[prop] |
| + | } |
| + | } |
| + | ) |
| + | return obj |
| + | }, |
| + | |
| + | getDataProperty: function (obj, property) { |
| + | var key |
| + | var prop |
| + | if (obj.dataset) { |
| + | key = property.replace(/-([a-z])/g, function (_, b) { |
| + | return b.toUpperCase() |
| + | }) |
| + | prop = obj.dataset[key] |
| + | } else if (obj.getAttribute) { |
| + | prop = obj.getAttribute( |
| + | 'data-' + property.replace(/([A-Z])/g, '-$1').toLowerCase() |
| + | ) |
| + | } |
| + | if (typeof prop === 'string') { |
| + | // eslint-disable-next-line no-useless-escape |
| + | if ( |
| + | /^(true|false|null|-?\d+(\.\d+)?|\{[\s\S]*\}|\[[\s\S]*\])$/.test(prop) |
| + | ) { |
| + | try { |
| + | return $.parseJSON(prop) |
| + | } catch (ignore) {} |
| + | } |
| + | return prop |
| + | } |
| + | }, |
| + | |
| + | getItemProperty: function (obj, property) { |
| + | var prop = this.getDataProperty(obj, property) |
| + | if (prop === undefined) { |
| + | prop = obj[property] |
| + | } |
| + | if (prop === undefined) { |
| + | prop = this.getNestedProperty(obj, property) |
| + | } |
| + | return prop |
| + | }, |
| + | |
| + | initStartIndex: function () { |
| + | var index = this.options.index |
| + | var urlProperty = this.options.urlProperty |
| + | var i |
| + | // Check if the index is given as a list object: |
| + | if (index && typeof index !== 'number') { |
| + | for (i = 0; i < this.num; i += 1) { |
| + | if ( |
| + | this.list[i] === index || |
| + | this.getItemProperty(this.list[i], urlProperty) === |
| + | this.getItemProperty(index, urlProperty) |
| + | ) { |
| + | index = i |
| + | break |
| + | } |
| + | } |
| + | } |
| + | // Make sure the index is in the list range: |
| + | this.index = this.circle(parseInt(index, 10) || 0) |
| + | }, |
| + | |
| + | initEventListeners: function () { |
| + | var that = this |
| + | var slidesContainer = this.slidesContainer |
| + | function proxyListener (event) { |
| + | var type = |
| + | that.support.transition && that.support.transition.end === event.type |
| + | ? 'transitionend' |
| + | : event.type |
| + | that['on' + type](event) |
| + | } |
| + | $(window).on('resize', proxyListener) |
| + | $(document.body).on('keydown', proxyListener) |
| + | this.container.on('click', proxyListener) |
| + | if (this.support.touch) { |
| + | slidesContainer.on( |
| + | 'touchstart touchmove touchend touchcancel', |
| + | proxyListener |
| + | ) |
| + | } else if (this.options.emulateTouchEvents && this.support.transition) { |
| + | slidesContainer.on( |
| + | 'mousedown mousemove mouseup mouseout', |
| + | proxyListener |
| + | ) |
| + | } |
| + | if (this.support.transition) { |
| + | slidesContainer.on(this.support.transition.end, proxyListener) |
| + | } |
| + | this.proxyListener = proxyListener |
| + | }, |
| + | |
| + | destroyEventListeners: function () { |
| + | var slidesContainer = this.slidesContainer |
| + | var proxyListener = this.proxyListener |
| + | $(window).off('resize', proxyListener) |
| + | $(document.body).off('keydown', proxyListener) |
| + | this.container.off('click', proxyListener) |
| + | if (this.support.touch) { |
| + | slidesContainer.off( |
| + | 'touchstart touchmove touchend touchcancel', |
| + | proxyListener |
| + | ) |
| + | } else if (this.options.emulateTouchEvents && this.support.transition) { |
| + | slidesContainer.off( |
| + | 'mousedown mousemove mouseup mouseout', |
| + | proxyListener |
| + | ) |
| + | } |
| + | if (this.support.transition) { |
| + | slidesContainer.off(this.support.transition.end, proxyListener) |
| + | } |
| + | }, |
| + | |
| + | handleOpen: function () { |
| + | if (this.options.onopened) { |
| + | this.options.onopened.call(this) |
| + | } |
| + | }, |
| + | |
| + | initWidget: function () { |
| + | var that = this |
| + | function openHandler (event) { |
| + | if (event.target === that.container[0]) { |
| + | that.container.off(that.support.transition.end, openHandler) |
| + | that.handleOpen() |
| + | } |
| + | } |
| + | this.container = $(this.options.container) |
| + | if (!this.container.length) { |
| + | this.console.log( |
| + | 'blueimp Gallery: Widget container not found.', |
| + | this.options.container |
| + | ) |
| + | return false |
| + | } |
| + | this.slidesContainer = this.container |
| + | .find(this.options.slidesContainer) |
| + | .first() |
| + | if (!this.slidesContainer.length) { |
| + | this.console.log( |
| + | 'blueimp Gallery: Slides container not found.', |
| + | this.options.slidesContainer |
| + | ) |
| + | return false |
| + | } |
| + | this.titleElement = this.container.find(this.options.titleElement).first() |
| + | if (this.num === 1) { |
| + | this.container.addClass(this.options.singleClass) |
| + | } |
| + | if (this.options.onopen) { |
| + | this.options.onopen.call(this) |
| + | } |
| + | if (this.support.transition && this.options.displayTransition) { |
| + | this.container.on(this.support.transition.end, openHandler) |
| + | } else { |
| + | this.handleOpen() |
| + | } |
| + | if (this.options.hidePageScrollbars) { |
| + | // Hide the page scrollbars: |
| + | this.bodyOverflowStyle = document.body.style.overflow |
| + | document.body.style.overflow = 'hidden' |
| + | } |
| + | this.container[0].style.display = 'block' |
| + | this.initSlides() |
| + | this.container.addClass(this.options.displayClass) |
| + | }, |
| + | |
| + | initOptions: function (options) { |
| + | // Create a copy of the prototype options: |
| + | this.options = $.extend({}, this.options) |
| + | // Check if carousel mode is enabled: |
| + | if ( |
| + | (options && options.carousel) || |
| + | (this.options.carousel && (!options || options.carousel !== false)) |
| + | ) { |
| + | $.extend(this.options, this.carouselOptions) |
| + | } |
| + | // Override any given options: |
| + | $.extend(this.options, options) |
| + | if (this.num < 3) { |
| + | // 1 or 2 slides cannot be displayed continuous, |
| + | // remember the original option by setting to null instead of false: |
| + | this.options.continuous = this.options.continuous ? null : false |
| + | } |
| + | if (!this.support.transition) { |
| + | this.options.emulateTouchEvents = false |
| + | } |
| + | if (this.options.event) { |
| + | this.preventDefault(this.options.event) |
| + | } |
| + | } |
| + | }) |
| + | |
| + | return Gallery |
| + | }) |
public/javascripts/blueimp/blueimp-gallery.min.js
+2
-0
| @@ | @@ -0,0 +1,2 @@ |
| + | !function(){"use strict";function t(t,e){var i;for(i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function e(t){if(!this||this.find!==e.prototype.find)return new e(t);if(this.length=0,t)if("string"==typeof t&&(t=this.find(t)),t.nodeType||t===t.window)this.length=1,this[0]=t;else{var i=t.length;for(this.length=i;i;)this[i-=1]=t[i]}}e.extend=t,e.contains=function(t,e){do{if((e=e.parentNode)===t)return!0}while(e);return!1},e.parseJSON=function(t){return window.JSON&&JSON.parse(t)},t(e.prototype,{find:function(t){var i=this[0]||document;return"string"==typeof t&&(t=i.querySelectorAll?i.querySelectorAll(t):"#"===t.charAt(0)?i.getElementById(t.slice(1)):i.getElementsByTagName(t)),new e(t)},hasClass:function(t){return!!this[0]&&new RegExp("(^|\\s+)"+t+"(\\s+|$)").test(this[0].className)},addClass:function(t){for(var e,i=this.length;i;){if(i-=1,!(e=this[i]).className)return e.className=t,this;if(this.hasClass(t))return this;e.className+=" "+t}return this},removeClass:function(t){for(var e,i=new RegExp("(^|\\s+)"+t+"(\\s+|$)"),s=this.length;s;)(e=this[s-=1]).className=e.className.replace(i," ");return this},on:function(t,e){for(var i,s,n=t.split(/\s+/);n.length;)for(t=n.shift(),i=this.length;i;)(s=this[i-=1]).addEventListener?s.addEventListener(t,e,!1):s.attachEvent&&s.attachEvent("on"+t,e);return this},off:function(t,e){for(var i,s,n=t.split(/\s+/);n.length;)for(t=n.shift(),i=this.length;i;)(s=this[i-=1]).removeEventListener?s.removeEventListener(t,e,!1):s.detachEvent&&s.detachEvent("on"+t,e);return this},empty:function(){for(var t,e=this.length;e;)for(t=this[e-=1];t.hasChildNodes();)t.removeChild(t.lastChild);return this},first:function(){return new e(this[0])}}),"function"==typeof define&&define.amd?define(function(){return e}):(window.blueimp=window.blueimp||{},window.blueimp.helper=e)}(),function(t){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper"],t):(window.blueimp=window.blueimp||{},window.blueimp.Gallery=t(window.blueimp.helper||window.jQuery))}(function(t){"use strict";function e(t,i){return void 0===document.body.style.maxHeight?null:this&&this.options===e.prototype.options?void(t&&t.length?(this.list=t,this.num=t.length,this.initOptions(i),this.initialize()):this.console.log("blueimp Gallery: No or empty list provided as first argument.",t)):new e(t,i)}return t.extend(e.prototype,{options:{container:"#blueimp-gallery",slidesContainer:"div",titleElement:"h3",displayClass:"blueimp-gallery-display",controlsClass:"blueimp-gallery-controls",singleClass:"blueimp-gallery-single",leftEdgeClass:"blueimp-gallery-left",rightEdgeClass:"blueimp-gallery-right",playingClass:"blueimp-gallery-playing",slideClass:"slide",slideLoadingClass:"slide-loading",slideErrorClass:"slide-error",slideContentClass:"slide-content",toggleClass:"toggle",prevClass:"prev",nextClass:"next",closeClass:"close",playPauseClass:"play-pause",typeProperty:"type",titleProperty:"title",urlProperty:"href",srcsetProperty:"urlset",displayTransition:!0,clearSlides:!0,stretchImages:!1,toggleControlsOnReturn:!0,toggleControlsOnSlideClick:!0,toggleSlideshowOnSpace:!0,enableKeyboardNavigation:!0,closeOnEscape:!0,closeOnSlideClick:!0,closeOnSwipeUpOrDown:!0,emulateTouchEvents:!0,stopTouchEventsPropagation:!1,hidePageScrollbars:!0,disableScroll:!0,carousel:!1,continuous:!0,unloadElements:!0,startSlideshow:!1,slideshowInterval:5e3,index:0,preloadRange:2,transitionSpeed:400,slideshowTransitionSpeed:void 0,event:void 0,onopen:void 0,onopened:void 0,onslide:void 0,onslideend:void 0,onslidecomplete:void 0,onclose:void 0,onclosed:void 0},carouselOptions:{hidePageScrollbars:!1,toggleControlsOnReturn:!1,toggleSlideshowOnSpace:!1,enableKeyboardNavigation:!1,closeOnEscape:!1,closeOnSlideClick:!1,closeOnSwipeUpOrDown:!1,disableScroll:!1,startSlideshow:!0},console:window.console&&"function"==typeof window.console.log?window.console:{log:function(){}},support:function(e){function i(){var t,i,s=n.transition;document.body.appendChild(e),s&&(t=s.name.slice(0,-9)+"ransform",void 0!==e.style[t]&&(e.style[t]="translateZ(0)",i=window.getComputedStyle(e).getPropertyValue(s.prefix+"transform"),n.transform={prefix:s.prefix,name:t,translate:!0,translateZ:!!i&&"none"!==i})),void 0!==e.style.backgroundSize&&(n.backgroundSize={},e.style.backgroundSize="contain",n.backgroundSize.contain="contain"===window.getComputedStyle(e).getPropertyValue("background-size"),e.style.backgroundSize="cover",n.backgroundSize.cover="cover"===window.getComputedStyle(e).getPropertyValue("background-size")),document.body.removeChild(e)}var s,n={touch:void 0!==window.ontouchstart||window.DocumentTouch&&document instanceof DocumentTouch},o={webkitTransition:{end:"webkitTransitionEnd",prefix:"-webkit-"},MozTransition:{end:"transitionend",prefix:"-moz-"},OTransition:{end:"otransitionend",prefix:"-o-"},transition:{end:"transitionend",prefix:""}};for(s in o)if(o.hasOwnProperty(s)&&void 0!==e.style[s]){n.transition=o[s],n.transition.name=s;break}return document.body?i():t(document).on("DOMContentLoaded",i),n}(document.createElement("div")),requestAnimationFrame:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,cancelAnimationFrame:window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame,initialize:function(){if(this.initStartIndex(),!1===this.initWidget())return!1;this.initEventListeners(),this.onslide(this.index),this.ontransitionend(),this.options.startSlideshow&&this.play()},slide:function(t,e){window.clearTimeout(this.timeout);var i,s,n,o=this.index;if(o!==t&&1!==this.num){if(e||(e=this.options.transitionSpeed),this.support.transform){for(this.options.continuous||(t=this.circle(t)),i=Math.abs(o-t)/(o-t),this.options.continuous&&(s=i,(i=-this.positions[this.circle(t)]/this.slideWidth)!==s&&(t=-i*this.num+t)),n=Math.abs(o-t)-1;n;)n-=1,this.move(this.circle((t>o?t:o)-n-1),this.slideWidth*i,0);t=this.circle(t),this.move(o,this.slideWidth*i,e),this.move(t,0,e),this.options.continuous&&this.move(this.circle(t-i),-this.slideWidth*i,0)}else t=this.circle(t),this.animate(o*-this.slideWidth,t*-this.slideWidth,e);this.onslide(t)}},getIndex:function(){return this.index},getNumber:function(){return this.num},prev:function(){(this.options.continuous||this.index)&&this.slide(this.index-1)},next:function(){(this.options.continuous||this.index<this.num-1)&&this.slide(this.index+1)},play:function(t){var e=this;window.clearTimeout(this.timeout),this.interval=t||this.options.slideshowInterval,this.elements[this.index]>1&&(this.timeout=this.setTimeout(!this.requestAnimationFrame&&this.slide||function(t,i){e.animationFrameId=e.requestAnimationFrame.call(window,function(){e.slide(t,i)})},[this.index+1,this.options.slideshowTransitionSpeed],this.interval)),this.container.addClass(this.options.playingClass)},pause:function(){window.clearTimeout(this.timeout),this.interval=null,this.cancelAnimationFrame&&(this.cancelAnimationFrame.call(window,this.animationFrameId),this.animationFrameId=null),this.container.removeClass(this.options.playingClass)},add:function(t){var e;for(t.concat||(t=Array.prototype.slice.call(t)),this.list.concat||(this.list=Array.prototype.slice.call(this.list)),this.list=this.list.concat(t),this.num=this.list.length,this.num>2&&null===this.options.continuous&&(this.options.continuous=!0,this.container.removeClass(this.options.leftEdgeClass)),this.container.removeClass(this.options.rightEdgeClass).removeClass(this.options.singleClass),e=this.num-t.length;e<this.num;e+=1)this.addSlide(e),this.positionSlide(e);this.positions.length=this.num,this.initSlides(!0)},resetSlides:function(){this.slidesContainer.empty(),this.unloadAllSlides(),this.slides=[]},handleClose:function(){var t=this.options;this.destroyEventListeners(),this.pause(),this.container[0].style.display="none",this.container.removeClass(t.displayClass).removeClass(t.singleClass).removeClass(t.leftEdgeClass).removeClass(t.rightEdgeClass),t.hidePageScrollbars&&(document.body.style.overflow=this.bodyOverflowStyle),this.options.clearSlides&&this.resetSlides(),this.options.onclosed&&this.options.onclosed.call(this)},close:function(){function t(i){i.target===e.container[0]&&(e.container.off(e.support.transition.end,t),e.handleClose())}var e=this;this.options.onclose&&this.options.onclose.call(this),this.support.transition&&this.options.displayTransition?(this.container.on(this.support.transition.end,t),this.container.removeClass(this.options.displayClass)):this.handleClose()},circle:function(t){return(this.num+t%this.num)%this.num},move:function(t,e,i){this.translateX(t,e,i),this.positions[t]=e},translate:function(t,e,i,s){var n=this.slides[t].style,o=this.support.transition,a=this.support.transform;n[o.name+"Duration"]=s+"ms",n[a.name]="translate("+e+"px, "+i+"px)"+(a.translateZ?" translateZ(0)":"")},translateX:function(t,e,i){this.translate(t,e,0,i)},translateY:function(t,e,i){this.translate(t,0,e,i)},animate:function(t,e,i){if(i)var s=this,n=(new Date).getTime(),o=window.setInterval(function(){var a=(new Date).getTime()-n;if(a>i)return s.slidesContainer[0].style.left=e+"px",s.ontransitionend(),void window.clearInterval(o);s.slidesContainer[0].style.left=(e-t)*(Math.floor(a/i*100)/100)+t+"px"},4);else this.slidesContainer[0].style.left=e+"px"},preventDefault:function(t){t.preventDefault?t.preventDefault():t.returnValue=!1},stopPropagation:function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},onresize:function(){this.initSlides(!0)},onmousedown:function(t){t.which&&1===t.which&&"VIDEO"!==t.target.nodeName&&(t.preventDefault(),(t.originalEvent||t).touches=[{pageX:t.pageX,pageY:t.pageY}],this.ontouchstart(t))},onmousemove:function(t){this.touchStart&&((t.originalEvent||t).touches=[{pageX:t.pageX,pageY:t.pageY}],this.ontouchmove(t))},onmouseup:function(t){this.touchStart&&(this.ontouchend(t),delete this.touchStart)},onmouseout:function(e){if(this.touchStart){var i=e.target,s=e.relatedTarget;s&&(s===i||t.contains(i,s))||this.onmouseup(e)}},ontouchstart:function(t){this.options.stopTouchEventsPropagation&&this.stopPropagation(t);var e=(t.originalEvent||t).touches[0];this.touchStart={x:e.pageX,y:e.pageY,time:Date.now()},this.isScrolling=void 0,this.touchDelta={}},ontouchmove:function(t){this.options.stopTouchEventsPropagation&&this.stopPropagation(t);var e,i,s=(t.originalEvent||t).touches[0],n=(t.originalEvent||t).scale,o=this.index;if(!(s.length>1||n&&1!==n))if(this.options.disableScroll&&t.preventDefault(),this.touchDelta={x:s.pageX-this.touchStart.x,y:s.pageY-this.touchStart.y},e=this.touchDelta.x,void 0===this.isScrolling&&(this.isScrolling=this.isScrolling||Math.abs(e)<Math.abs(this.touchDelta.y)),this.isScrolling)this.translateY(o,this.touchDelta.y+this.positions[o],0);else for(t.preventDefault(),window.clearTimeout(this.timeout),this.options.continuous?i=[this.circle(o+1),o,this.circle(o-1)]:(this.touchDelta.x=e/=!o&&e>0||o===this.num-1&&e<0?Math.abs(e)/this.slideWidth+1:1,i=[o],o&&i.push(o-1),o<this.num-1&&i.unshift(o+1));i.length;)o=i.pop(),this.translateX(o,e+this.positions[o],0)},ontouchend:function(t){this.options.stopTouchEventsPropagation&&this.stopPropagation(t);var e,i,s,n,o,a=this.index,r=this.options.transitionSpeed,l=this.slideWidth,h=Number(Date.now()-this.touchStart.time)<250,d=h&&Math.abs(this.touchDelta.x)>20||Math.abs(this.touchDelta.x)>l/2,c=!a&&this.touchDelta.x>0||a===this.num-1&&this.touchDelta.x<0,u=!d&&this.options.closeOnSwipeUpOrDown&&(h&&Math.abs(this.touchDelta.y)>20||Math.abs(this.touchDelta.y)>this.slideHeight/2);this.options.continuous&&(c=!1),e=this.touchDelta.x<0?-1:1,this.isScrolling?u?this.close():this.translateY(a,0,r):d&&!c?(i=a+e,s=a-e,n=l*e,o=-l*e,this.options.continuous?(this.move(this.circle(i),n,0),this.move(this.circle(a-2*e),o,0)):i>=0&&i<this.num&&this.move(i,n,0),this.move(a,this.positions[a]+n,r),this.move(this.circle(s),this.positions[this.circle(s)]+n,r),a=this.circle(s),this.onslide(a)):this.options.continuous?(this.move(this.circle(a-1),-l,r),this.move(a,0,r),this.move(this.circle(a+1),l,r)):(a&&this.move(a-1,-l,r),this.move(a,0,r),a<this.num-1&&this.move(a+1,l,r))},ontouchcancel:function(t){this.touchStart&&(this.ontouchend(t),delete this.touchStart)},ontransitionend:function(t){var e=this.slides[this.index];t&&e!==t.target||(this.interval&&this.play(),this.setTimeout(this.options.onslideend,[this.index,e]))},oncomplete:function(e){var i,s=e.target||e.srcElement,n=s&&s.parentNode;s&&n&&(i=this.getNodeIndex(n),t(n).removeClass(this.options.slideLoadingClass),"error"===e.type?(t(n).addClass(this.options.slideErrorClass),this.elements[i]=3):this.elements[i]=2,s.clientHeight>this.container[0].clientHeight&&(s.style.maxHeight=this.container[0].clientHeight),this.interval&&this.slides[this.index]===n&&this.play(),this.setTimeout(this.options.onslidecomplete,[i,n]))},onload:function(t){this.oncomplete(t)},onerror:function(t){this.oncomplete(t)},onkeydown:function(t){switch(t.which||t.keyCode){case 13:this.options.toggleControlsOnReturn&&(this.preventDefault(t),this.toggleControls());break;case 27:this.options.closeOnEscape&&(this.close(),t.stopImmediatePropagation());break;case 32:this.options.toggleSlideshowOnSpace&&(this.preventDefault(t),this.toggleSlideshow());break;case 37:this.options.enableKeyboardNavigation&&(this.preventDefault(t),this.prev());break;case 39:this.options.enableKeyboardNavigation&&(this.preventDefault(t),this.next())}},handleClick:function(e){function i(e){return t(n).hasClass(e)||t(o).hasClass(e)}var s=this.options,n=e.target||e.srcElement,o=n.parentNode;i(s.toggleClass)?(this.preventDefault(e),this.toggleControls()):i(s.prevClass)?(this.preventDefault(e),this.prev()):i(s.nextClass)?(this.preventDefault(e),this.next()):i(s.closeClass)?(this.preventDefault(e),this.close()):i(s.playPauseClass)?(this.preventDefault(e),this.toggleSlideshow()):o===this.slidesContainer[0]?s.closeOnSlideClick?(this.preventDefault(e),this.close()):s.toggleControlsOnSlideClick&&(this.preventDefault(e),this.toggleControls()):o.parentNode&&o.parentNode===this.slidesContainer[0]&&s.toggleControlsOnSlideClick&&(this.preventDefault(e),this.toggleControls())},onclick:function(t){if(!(this.options.emulateTouchEvents&&this.touchDelta&&(Math.abs(this.touchDelta.x)>20||Math.abs(this.touchDelta.y)>20)))return this.handleClick(t);delete this.touchDelta},updateEdgeClasses:function(t){t?this.container.removeClass(this.options.leftEdgeClass):this.container.addClass(this.options.leftEdgeClass),t===this.num-1?this.container.addClass(this.options.rightEdgeClass):this.container.removeClass(this.options.rightEdgeClass)},handleSlide:function(t){this.options.continuous||this.updateEdgeClasses(t),this.loadElements(t),this.options.unloadElements&&this.unloadElements(t),this.setTitle(t)},onslide:function(t){this.index=t,this.handleSlide(t),this.setTimeout(this.options.onslide,[t,this.slides[t]])},setTitle:function(t){var e=this.slides[t].firstChild,i=e.title||e.alt,s=this.titleElement;s.length&&(this.titleElement.empty(),i&&s[0].appendChild(document.createTextNode(i)))},setTimeout:function(t,e,i){var s=this;return t&&window.setTimeout(function(){t.apply(s,e||[])},i||0)},imageFactory:function(e,i){function s(e){if(!n){if(e={type:e.type,target:o},!o.parentNode)return r.setTimeout(s,[e]);n=!0,t(l).off("load error",s),d&&"load"===e.type&&(o.style.background='url("'+h+'") center no-repeat',o.style.backgroundSize=d),i(e)}}var n,o,a,r=this,l=this.imagePrototype.cloneNode(!1),h=e,d=this.options.stretchImages;return"string"!=typeof h&&(h=this.getItemProperty(e,this.options.urlProperty),a=this.getItemProperty(e,this.options.titleProperty)),!0===d&&(d="contain"),(d=this.support.backgroundSize&&this.support.backgroundSize[d]&&d)?o=this.elementPrototype.cloneNode(!1):(o=l,l.draggable=!1),a&&(o.title=a),t(l).on("load error",s),l.src=h,o},createElement:function(e,i){var s=e&&this.getItemProperty(e,this.options.typeProperty),n=s&&this[s.split("/")[0]+"Factory"]||this.imageFactory,o=e&&n.call(this,e,i),a=this.getItemProperty(e,this.options.srcsetProperty);return o||(o=this.elementPrototype.cloneNode(!1),this.setTimeout(i,[{type:"error",target:o}])),a&&o.setAttribute("srcset",a),t(o).addClass(this.options.slideContentClass),o},loadElement:function(e){this.elements[e]||(this.slides[e].firstChild?this.elements[e]=t(this.slides[e]).hasClass(this.options.slideErrorClass)?3:2:(this.elements[e]=1,t(this.slides[e]).addClass(this.options.slideLoadingClass),this.slides[e].appendChild(this.createElement(this.list[e],this.proxyListener))))},loadElements:function(t){var e,i=Math.min(this.num,2*this.options.preloadRange+1),s=t;for(e=0;e<i;e+=1)s+=e*(e%2==0?-1:1),s=this.circle(s),this.loadElement(s)},unloadElements:function(t){var e,i;for(e in this.elements)this.elements.hasOwnProperty(e)&&(i=Math.abs(t-e))>this.options.preloadRange&&i+this.options.preloadRange<this.num&&(this.unloadSlide(e),delete this.elements[e])},addSlide:function(t){var e=this.slidePrototype.cloneNode(!1);e.setAttribute("data-index",t),this.slidesContainer[0].appendChild(e),this.slides.push(e)},positionSlide:function(t){var e=this.slides[t];e.style.width=this.slideWidth+"px",this.support.transform&&(e.style.left=t*-this.slideWidth+"px",this.move(t,this.index>t?-this.slideWidth:this.index<t?this.slideWidth:0,0))},initSlides:function(e){var i,s;for(e||(this.positions=[],this.positions.length=this.num,this.elements={},this.imagePrototype=document.createElement("img"),this.elementPrototype=document.createElement("div"),this.slidePrototype=document.createElement("div"),t(this.slidePrototype).addClass(this.options.slideClass),this.slides=this.slidesContainer[0].children,i=this.options.clearSlides||this.slides.length!==this.num),this.slideWidth=this.container[0].offsetWidth,this.slideHeight=this.container[0].offsetHeight,this.slidesContainer[0].style.width=this.num*this.slideWidth+"px",i&&this.resetSlides(),s=0;s<this.num;s+=1)i&&this.addSlide(s),this.positionSlide(s);this.options.continuous&&this.support.transform&&(this.move(this.circle(this.index-1),-this.slideWidth,0),this.move(this.circle(this.index+1),this.slideWidth,0)),this.support.transform||(this.slidesContainer[0].style.left=this.index*-this.slideWidth+"px")},unloadSlide:function(t){var e,i;null!==(i=(e=this.slides[t]).firstChild)&&e.removeChild(i)},unloadAllSlides:function(){var t,e;for(t=0,e=this.slides.length;t<e;t++)this.unloadSlide(t)},toggleControls:function(){var t=this.options.controlsClass;this.container.hasClass(t)?this.container.removeClass(t):this.container.addClass(t)},toggleSlideshow:function(){this.interval?this.pause():this.play()},getNodeIndex:function(t){return parseInt(t.getAttribute("data-index"),10)},getNestedProperty:function(t,e){return e.replace(/\[(?:'([^']+)'|"([^"]+)"|(\d+))\]|(?:(?:^|\.)([^\.\[]+))/g,function(e,i,s,n,o){var a=o||i||s||n&&parseInt(n,10);e&&t&&(t=t[a])}),t},getDataProperty:function(e,i){var s,n;if(e.dataset?(s=i.replace(/-([a-z])/g,function(t,e){return e.toUpperCase()}),n=e.dataset[s]):e.getAttribute&&(n=e.getAttribute("data-"+i.replace(/([A-Z])/g,"-$1").toLowerCase())),"string"==typeof n){if(/^(true|false|null|-?\d+(\.\d+)?|\{[\s\S]*\}|\[[\s\S]*\])$/.test(n))try{return t.parseJSON(n)}catch(t){}return n}},getItemProperty:function(t,e){var i=this.getDataProperty(t,e);return void 0===i&&(i=t[e]),void 0===i&&(i=this.getNestedProperty(t,e)),i},initStartIndex:function(){var t,e=this.options.index,i=this.options.urlProperty;if(e&&"number"!=typeof e)for(t=0;t<this.num;t+=1)if(this.list[t]===e||this.getItemProperty(this.list[t],i)===this.getItemProperty(e,i)){e=t;break}this.index=this.circle(parseInt(e,10)||0)},initEventListeners:function(){function e(t){var e=i.support.transition&&i.support.transition.end===t.type?"transitionend":t.type;i["on"+e](t)}var i=this,s=this.slidesContainer;t(window).on("resize",e),t(document.body).on("keydown",e),this.container.on("click",e),this.support.touch?s.on("touchstart touchmove touchend touchcancel",e):this.options.emulateTouchEvents&&this.support.transition&&s.on("mousedown mousemove mouseup mouseout",e),this.support.transition&&s.on(this.support.transition.end,e),this.proxyListener=e},destroyEventListeners:function(){var e=this.slidesContainer,i=this.proxyListener;t(window).off("resize",i),t(document.body).off("keydown",i),this.container.off("click",i),this.support.touch?e.off("touchstart touchmove touchend touchcancel",i):this.options.emulateTouchEvents&&this.support.transition&&e.off("mousedown mousemove mouseup mouseout",i),this.support.transition&&e.off(this.support.transition.end,i)},handleOpen:function(){this.options.onopened&&this.options.onopened.call(this)},initWidget:function(){function e(t){t.target===i.container[0]&&(i.container.off(i.support.transition.end,e),i.handleOpen())}var i=this;return this.container=t(this.options.container),this.container.length?(this.slidesContainer=this.container.find(this.options.slidesContainer).first(),this.slidesContainer.length?(this.titleElement=this.container.find(this.options.titleElement).first(),1===this.num&&this.container.addClass(this.options.singleClass),this.options.onopen&&this.options.onopen.call(this),this.support.transition&&this.options.displayTransition?this.container.on(this.support.transition.end,e):this.handleOpen(),this.options.hidePageScrollbars&&(this.bodyOverflowStyle=document.body.style.overflow,document.body.style.overflow="hidden"),this.container[0].style.display="block",this.initSlides(),void this.container.addClass(this.options.displayClass)):(this.console.log("blueimp Gallery: Slides container not found.",this.options.slidesContainer),!1)):(this.console.log("blueimp Gallery: Widget container not found.",this.options.container),!1)},initOptions:function(e){this.options=t.extend({},this.options),(e&&e.carousel||this.options.carousel&&(!e||!1!==e.carousel))&&t.extend(this.options,this.carouselOptions),t.extend(this.options,e),this.num<3&&(this.options.continuous=!!this.options.continuous&&null),this.support.transition||(this.options.emulateTouchEvents=!1),this.options.event&&this.preventDefault(this.options.event)}}),e}),function(t){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery"],t):t(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(t,e){"use strict";t.extend(e.prototype.options,{fullScreen:!1});var i=e.prototype.initialize,s=e.prototype.close;return t.extend(e.prototype,{getFullScreenElement:function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},requestFullScreen:function(t){t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen()},exitFullScreen:function(){document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()},initialize:function(){i.call(this),this.options.fullScreen&&!this.getFullScreenElement()&&this.requestFullScreen(this.container[0])},close:function(){this.getFullScreenElement()===this.container[0]&&this.exitFullScreen(),s.call(this)}}),e}),function(t){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery"],t):t(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(t,e){"use strict";t.extend(e.prototype.options,{indicatorContainer:"ol",activeIndicatorClass:"active",thumbnailProperty:"thumbnail",thumbnailIndicators:!0});var i=e.prototype.initSlides,s=e.prototype.addSlide,n=e.prototype.resetSlides,o=e.prototype.handleClick,a=e.prototype.handleSlide,r=e.prototype.handleClose;return t.extend(e.prototype,{createIndicator:function(e){var i,s,n=this.indicatorPrototype.cloneNode(!1),o=this.getItemProperty(e,this.options.titleProperty),a=this.options.thumbnailProperty;return this.options.thumbnailIndicators&&(a&&(i=this.getItemProperty(e,a)),void 0===i&&(s=e.getElementsByTagName&&t(e).find("img")[0])&&(i=s.src),i&&(n.style.backgroundImage='url("'+i+'")')),o&&(n.title=o),n},addIndicator:function(t){if(this.indicatorContainer.length){var e=this.createIndicator(this.list[t]);e.setAttribute("data-index",t),this.indicatorContainer[0].appendChild(e),this.indicators.push(e)}},setActiveIndicator:function(e){this.indicators&&(this.activeIndicator&&this.activeIndicator.removeClass(this.options.activeIndicatorClass),this.activeIndicator=t(this.indicators[e]),this.activeIndicator.addClass(this.options.activeIndicatorClass))},initSlides:function(t){t||(this.indicatorContainer=this.container.find(this.options.indicatorContainer),this.indicatorContainer.length&&(this.indicatorPrototype=document.createElement("li"),this.indicators=this.indicatorContainer[0].children)),i.call(this,t)},addSlide:function(t){s.call(this,t),this.addIndicator(t)},resetSlides:function(){n.call(this),this.indicatorContainer.empty(),this.indicators=[]},handleClick:function(t){var e=t.target||t.srcElement,i=e.parentNode;if(i===this.indicatorContainer[0])this.preventDefault(t),this.slide(this.getNodeIndex(e));else{if(i.parentNode!==this.indicatorContainer[0])return o.call(this,t);this.preventDefault(t),this.slide(this.getNodeIndex(i))}},handleSlide:function(t){a.call(this,t),this.setActiveIndicator(t)},handleClose:function(){this.activeIndicator&&this.activeIndicator.removeClass(this.options.activeIndicatorClass),r.call(this)}}),e}),function(t){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery"],t):t(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(t,e){"use strict";t.extend(e.prototype.options,{videoContentClass:"video-content",videoLoadingClass:"video-loading",videoPlayingClass:"video-playing",videoPosterProperty:"poster",videoSourcesProperty:"sources"});var i=e.prototype.handleSlide;return t.extend(e.prototype,{handleSlide:function(t){i.call(this,t),this.playingVideo&&this.playingVideo.pause()},videoFactory:function(e,i,s){var n,o,a,r,l,h=this,d=this.options,c=this.elementPrototype.cloneNode(!1),u=t(c),p=[{type:"error",target:c}],m=s||document.createElement("video"),y=this.getItemProperty(e,d.urlProperty),f=this.getItemProperty(e,d.typeProperty),g=this.getItemProperty(e,d.titleProperty),v=this.getItemProperty(e,d.videoPosterProperty),C=this.getItemProperty(e,d.videoSourcesProperty);if(u.addClass(d.videoContentClass),g&&(c.title=g),m.canPlayType)if(y&&f&&m.canPlayType(f))m.src=y;else if(C)for(;C.length;)if(o=C.shift(),y=this.getItemProperty(o,d.urlProperty),f=this.getItemProperty(o,d.typeProperty),y&&f&&m.canPlayType(f)){m.src=y;break}return v&&(m.poster=v,n=this.imagePrototype.cloneNode(!1),t(n).addClass(d.toggleClass),n.src=v,n.draggable=!1,c.appendChild(n)),(a=document.createElement("a")).setAttribute("target","_blank"),s||a.setAttribute("download",g),a.href=y,m.src&&(m.controls=!0,(s||t(m)).on("error",function(){h.setTimeout(i,p)}).on("pause",function(){m.seeking||(r=!1,u.removeClass(h.options.videoLoadingClass).removeClass(h.options.videoPlayingClass),l&&h.container.addClass(h.options.controlsClass),delete h.playingVideo,h.interval&&h.play())}).on("playing",function(){r=!1,u.removeClass(h.options.videoLoadingClass).addClass(h.options.videoPlayingClass),h.container.hasClass(h.options.controlsClass)?(l=!0,h.container.removeClass(h.options.controlsClass)):l=!1}).on("play",function(){window.clearTimeout(h.timeout),r=!0,u.addClass(h.options.videoLoadingClass),h.playingVideo=m}),t(a).on("click",function(t){h.preventDefault(t),r?m.pause():m.play()}),c.appendChild(s&&s.element||m)),c.appendChild(a),this.setTimeout(i,[{type:"load",target:c}]),c}}),e}),function(t){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery-video"],t):t(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(t,e){"use strict";if(!window.postMessage)return e;t.extend(e.prototype.options,{vimeoVideoIdProperty:"vimeo",vimeoPlayerUrl:"//player.vimeo.com/video/VIDEO_ID?api=1&player_id=PLAYER_ID",vimeoPlayerIdPrefix:"vimeo-player-",vimeoClickToPlay:!0});var i=e.prototype.textFactory||e.prototype.imageFactory,s=function(t,e,i,s){this.url=t,this.videoId=e,this.playerId=i,this.clickToPlay=s,this.element=document.createElement("div"),this.listeners={}},n=0;return t.extend(s.prototype,{canPlayType:function(){return!0},on:function(t,e){return this.listeners[t]=e,this},loadAPI:function(){function e(){!s&&n.playOnReady&&n.play(),s=!0}for(var i,s,n=this,o="//f.vimeocdn.com/js/froogaloop2.min.js",a=document.getElementsByTagName("script"),r=a.length;r;)if(r-=1,a[r].src===o){i=a[r];break}i||((i=document.createElement("script")).src=o),t(i).on("load",e),a[0].parentNode.insertBefore(i,a[0]),/loaded|complete/.test(i.readyState)&&e()},onReady:function(){var t=this;this.ready=!0,this.player.addEvent("play",function(){t.hasPlayed=!0,t.onPlaying()}),this.player.addEvent("pause",function(){t.onPause()}),this.player.addEvent("finish",function(){t.onPause()}),this.playOnReady&&this.play()},onPlaying:function(){this.playStatus<2&&(this.listeners.playing(),this.playStatus=2)},onPause:function(){this.listeners.pause(),delete this.playStatus},insertIframe:function(){var t=document.createElement("iframe");t.src=this.url.replace("VIDEO_ID",this.videoId).replace("PLAYER_ID",this.playerId),t.id=this.playerId,this.element.parentNode.replaceChild(t,this.element),this.element=t},play:function(){var t=this;this.playStatus||(this.listeners.play(),this.playStatus=1),this.ready?!this.hasPlayed&&(this.clickToPlay||window.navigator&&/iP(hone|od|ad)/.test(window.navigator.platform))?this.onPlaying():this.player.api("play"):(this.playOnReady=!0,window.$f?this.player||(this.insertIframe(),this.player=$f(this.element),this.player.addEvent("ready",function(){t.onReady()})):this.loadAPI())},pause:function(){this.ready?this.player.api("pause"):this.playStatus&&(delete this.playOnReady,this.listeners.pause(),delete this.playStatus)}}),t.extend(e.prototype,{VimeoPlayer:s,textFactory:function(t,e){var o=this.options,a=this.getItemProperty(t,o.vimeoVideoIdProperty);return a?(void 0===this.getItemProperty(t,o.urlProperty)&&(t[o.urlProperty]="//vimeo.com/"+a),n+=1,this.videoFactory(t,e,new s(o.vimeoPlayerUrl,a,o.vimeoPlayerIdPrefix+n,o.vimeoClickToPlay))):i.call(this,t,e)}}),e}),function(t){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery-video"],t):t(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(t,e){"use strict";if(!window.postMessage)return e;t.extend(e.prototype.options,{youTubeVideoIdProperty:"youtube",youTubePlayerVars:{wmode:"transparent"},youTubeClickToPlay:!0});var i=e.prototype.textFactory||e.prototype.imageFactory,s=function(t,e,i){this.videoId=t,this.playerVars=e,this.clickToPlay=i,this.element=document.createElement("div"),this.listeners={}};return t.extend(s.prototype,{canPlayType:function(){return!0},on:function(t,e){return this.listeners[t]=e,this},loadAPI:function(){var t,e=this,i=window.onYouTubeIframeAPIReady,s="//www.youtube.com/iframe_api",n=document.getElementsByTagName("script"),o=n.length;for(window.onYouTubeIframeAPIReady=function(){i&&i.apply(this),e.playOnReady&&e.play()};o;)if(o-=1,n[o].src===s)return;(t=document.createElement("script")).src=s,n[0].parentNode.insertBefore(t,n[0])},onReady:function(){this.ready=!0,this.playOnReady&&this.play()},onPlaying:function(){this.playStatus<2&&(this.listeners.playing(),this.playStatus=2)},onPause:function(){e.prototype.setTimeout.call(this,this.checkSeek,null,2e3)},checkSeek:function(){this.stateChange!==YT.PlayerState.PAUSED&&this.stateChange!==YT.PlayerState.ENDED||(this.listeners.pause(),delete this.playStatus)},onStateChange:function(t){switch(t.data){case YT.PlayerState.PLAYING:this.hasPlayed=!0,this.onPlaying();break;case YT.PlayerState.PAUSED:case YT.PlayerState.ENDED:this.onPause()}this.stateChange=t.data},onError:function(t){this.listeners.error(t)},play:function(){var t=this;this.playStatus||(this.listeners.play(),this.playStatus=1),this.ready?!this.hasPlayed&&(this.clickToPlay||window.navigator&&/iP(hone|od|ad)/.test(window.navigator.platform))?this.onPlaying():this.player.playVideo():(this.playOnReady=!0,window.YT&&YT.Player?this.player||(this.player=new YT.Player(this.element,{videoId:this.videoId,playerVars:this.playerVars,events:{onReady:function(){t.onReady()},onStateChange:function(e){t.onStateChange(e)},onError:function(e){t.onError(e)}}})):this.loadAPI())},pause:function(){this.ready?this.player.pauseVideo():this.playStatus&&(delete this.playOnReady,this.listeners.pause(),delete this.playStatus)}}),t.extend(e.prototype,{YouTubePlayer:s,textFactory:function(t,e){var n=this.options,o=this.getItemProperty(t,n.youTubeVideoIdProperty);return o?(void 0===this.getItemProperty(t,n.urlProperty)&&(t[n.urlProperty]="//www.youtube.com/watch?v="+o),void 0===this.getItemProperty(t,n.videoPosterProperty)&&(t[n.videoPosterProperty]="//img.youtube.com/vi/"+o+"/maxresdefault.jpg"),this.videoFactory(t,e,new s(o,n.youTubePlayerVars,n.youTubeClickToPlay))):i.call(this,t,e)}}),e}); |
| + | //# sourceMappingURL=blueimp-gallery.min.js.map |
| \ No newline at end of file | |
public/javascripts/blueimp/blueimp-gallery.min.js.map
+1
-0
| @@ | @@ -0,0 +1 @@ |
| + | {"version":3,"sources":["blueimp-helper.js","blueimp-gallery.js","blueimp-gallery-fullscreen.js","blueimp-gallery-indicator.js","blueimp-gallery-video.js","blueimp-gallery-vimeo.js","blueimp-gallery-youtube.js"],"names":["extend","obj1","obj2","prop","hasOwnProperty","Helper","query","this","find","prototype","length","nodeType","window","i","contains","container","element","parentNode","parseJSON","string","JSON","parse","document","querySelectorAll","charAt","getElementById","slice","getElementsByTagName","hasClass","className","RegExp","test","addClass","removeClass","regexp","replace","on","eventName","handler","eventNames","split","shift","addEventListener","attachEvent","off","removeEventListener","detachEvent","empty","hasChildNodes","removeChild","lastChild","first","define","amd","blueimp","helper","factory","Gallery","jQuery","$","list","options","undefined","body","style","maxHeight","num","initOptions","initialize","console","log","slidesContainer","titleElement","displayClass","controlsClass","singleClass","leftEdgeClass","rightEdgeClass","playingClass","slideClass","slideLoadingClass","slideErrorClass","slideContentClass","toggleClass","prevClass","nextClass","closeClass","playPauseClass","typeProperty","titleProperty","urlProperty","srcsetProperty","displayTransition","clearSlides","stretchImages","toggleControlsOnReturn","toggleControlsOnSlideClick","toggleSlideshowOnSpace","enableKeyboardNavigation","closeOnEscape","closeOnSlideClick","closeOnSwipeUpOrDown","emulateTouchEvents","stopTouchEventsPropagation","hidePageScrollbars","disableScroll","carousel","continuous","unloadElements","startSlideshow","slideshowInterval","index","preloadRange","transitionSpeed","slideshowTransitionSpeed","event","onopen","onopened","onslide","onslideend","onslidecomplete","onclose","onclosed","carouselOptions","support","elementTests","translateZ","transition","appendChild","name","getComputedStyle","getPropertyValue","prefix","transform","translate","backgroundSize","contain","cover","touch","ontouchstart","DocumentTouch","transitions","webkitTransition","end","MozTransition","OTransition","createElement","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","cancelAnimationFrame","webkitCancelRequestAnimationFrame","webkitCancelAnimationFrame","mozCancelAnimationFrame","initStartIndex","initWidget","initEventListeners","ontransitionend","play","slide","to","speed","clearTimeout","timeout","direction","naturalDirection","diff","circle","Math","abs","positions","slideWidth","move","animate","getIndex","getNumber","prev","next","time","that","interval","elements","setTimeout","animationFrameId","call","pause","add","concat","Array","addSlide","positionSlide","initSlides","resetSlides","unloadAllSlides","slides","handleClose","destroyEventListeners","display","overflow","bodyOverflowStyle","close","closeHandler","target","dist","translateX","x","y","translateY","from","start","Date","getTime","timer","setInterval","timeElap","left","clearInterval","floor","preventDefault","returnValue","stopPropagation","cancelBubble","onresize","onmousedown","which","nodeName","originalEvent","touches","pageX","pageY","onmousemove","touchStart","ontouchmove","onmouseup","ontouchend","onmouseout","related","relatedTarget","now","isScrolling","touchDelta","touchDeltaX","indices","scale","push","unshift","pop","indexForward","indexBackward","distanceForward","distanceBackward","isShortDuration","Number","isValidSlide","isPastBounds","isValidClose","slideHeight","ontouchcancel","oncomplete","srcElement","parent","getNodeIndex","type","clientHeight","onload","onerror","onkeydown","keyCode","toggleControls","stopImmediatePropagation","toggleSlideshow","handleClick","isTarget","onclick","updateEdgeClasses","handleSlide","loadElements","setTitle","firstChild","text","title","alt","createTextNode","func","args","wait","apply","imageFactory","obj","callback","callbackWrapper","called","img","background","url","imagePrototype","cloneNode","getItemProperty","elementPrototype","draggable","src","srcset","setAttribute","loadElement","proxyListener","limit","min","j","unloadSlide","slidePrototype","width","reload","children","offsetWidth","offsetHeight","len","parseInt","getAttribute","getNestedProperty","property","str","singleQuoteProp","doubleQuoteProp","arrayIndex","dotProp","getDataProperty","key","dataset","_","b","toUpperCase","toLowerCase","ignore","handleOpen","openHandler","fullScreen","getFullScreenElement","fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement","requestFullScreen","requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen","exitFullScreen","exitFullscreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen","indicatorContainer","activeIndicatorClass","thumbnailProperty","thumbnailIndicators","createIndicator","thumbnailUrl","thumbnail","indicator","indicatorPrototype","backgroundImage","addIndicator","indicators","setActiveIndicator","activeIndicator","videoContentClass","videoLoadingClass","videoPlayingClass","videoPosterProperty","videoSourcesProperty","playingVideo","videoFactory","videoInterface","posterImage","source","playMediaControl","isLoading","hasControls","videoContainerNode","videoContainer","errorArgs","video","posterUrl","sources","canPlayType","poster","href","controls","seeking","postMessage","vimeoVideoIdProperty","vimeoPlayerUrl","vimeoPlayerIdPrefix","vimeoClickToPlay","textFactory","VimeoPlayer","videoId","playerId","clickToPlay","listeners","counter","loadAPI","playOnReady","scriptTag","apiUrl","scriptTags","insertBefore","readyState","onReady","ready","player","addEvent","hasPlayed","onPlaying","onPause","playStatus","playing","insertIframe","iframe","id","replaceChild","navigator","platform","api","$f","youTubeVideoIdProperty","youTubePlayerVars","wmode","youTubeClickToPlay","YouTubePlayer","playerVars","onYouTubeIframeAPIReady","checkSeek","stateChange","YT","PlayerState","PAUSED","ENDED","onStateChange","data","PLAYING","onError","error","playVideo","Player","events","pauseVideo"],"mappings":"CAaC,WACC,aAEA,SAASA,EAAQC,EAAMC,GACrB,IAAIC,EACJ,IAAKA,KAAQD,EACPA,EAAKE,eAAeD,KACtBF,EAAKE,GAAQD,EAAKC,IAGtB,OAAOF,EAGT,SAASI,EAAQC,GACf,IAAKC,MAAQA,KAAKC,OAASH,EAAOI,UAAUD,KAG1C,OAAO,IAAIH,EAAOC,GAGpB,GADAC,KAAKG,OAAS,EACVJ,EAIF,GAHqB,iBAAVA,IACTA,EAAQC,KAAKC,KAAKF,IAEhBA,EAAMK,UAAYL,IAAUA,EAAMM,OAEpCL,KAAKG,OAAS,EACdH,KAAK,GAAKD,MACL,CAEL,IAAIO,EAAIP,EAAMI,OAEd,IADAH,KAAKG,OAASG,EACPA,GAELN,KADAM,GAAK,GACKP,EAAMO,IAMxBR,EAAOL,OAASA,EAEhBK,EAAOS,SAAW,SAAUC,EAAWC,GACrC,GAEE,IADAA,EAAUA,EAAQC,cACFF,EACd,OAAO,QAEFC,GACT,OAAO,GAG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U,OAEVrb,KAAKmZ,SACfnZ,KAAKmZ,OAAS,IAAIwB,GAAGU,OAAOrb,KAAKS,SAC/B4X,QAASrY,KAAKqY,QACdkC,WAAYva,KAAKua,WACjBe,QACErC,QAAS,WACPrO,EAAKqO,WAEP8B,cAAe,SAAUnU,GACvBgE,EAAKmQ,cAAcnU,IAErBsU,QAAS,SAAUtU,GACjBgE,EAAKsQ,QAAQtU,QAbnB5G,KAAK0Y,YAqBXxN,MAAO,WACDlL,KAAKkZ,MACPlZ,KAAKmZ,OAAOoC,aACHvb,KAAKwZ,oBACPxZ,KAAK2Y,YACZ3Y,KAAKwY,UAAUtN,eACRlL,KAAKwZ,eAKlBpW,EAAE3D,OAAOyD,EAAQhD,WACfoa,cAAeA,EAEfnC,YAAa,SAAU1G,EAAKC,GAC1B,IAAIpO,EAAUtD,KAAKsD,QACf+U,EAAUrY,KAAKkS,gBAAgBT,EAAKnO,EAAQ4W,wBAChD,OAAI7B,QACqD9U,IAAnDvD,KAAKkS,gBAAgBT,EAAKnO,EAAQ6B,eACpCsM,EAAInO,EAAQ6B,aAAe,6BAA+BkT,QAGC9U,IAA3DvD,KAAKkS,gBAAgBT,EAAKnO,EAAQmT,uBAElChF,EAAInO,EAAQmT,qBACV,wBAA0B4B,EAAU,sBAEjCrY,KAAK4W,aACVnF,EACAC,EACA,IAAI4I,EACFjC,EACA/U,EAAQ6W,kBACR7W,EAAQ+W,sBAIPlC,EAAYlN,KAAKjL,KAAMyR,EAAKC,MAIhCxO"} |
| \ No newline at end of file | |
public/javascripts/blueimp/blueimp-helper.js
+190
-0
| @@ | @@ -0,0 +1,190 @@ |
| + | /* |
| + | * blueimp helper JS |
| + | * https://github.com/blueimp/Gallery |
| + | * |
| + | * Copyright 2013, Sebastian Tschan |
| + | * https://blueimp.net |
| + | * |
| + | * Licensed under the MIT license: |
| + | * https://opensource.org/licenses/MIT |
| + | */ |
| + | |
| + | /* global define, window, document */ |
| + | |
| + | ;(function () { |
| + | 'use strict' |
| + | |
| + | function extend (obj1, obj2) { |
| + | var prop |
| + | for (prop in obj2) { |
| + | if (obj2.hasOwnProperty(prop)) { |
| + | obj1[prop] = obj2[prop] |
| + | } |
| + | } |
| + | return obj1 |
| + | } |
| + | |
| + | function Helper (query) { |
| + | if (!this || this.find !== Helper.prototype.find) { |
| + | // Called as function instead of as constructor, |
| + | // so we simply return a new instance: |
| + | return new Helper(query) |
| + | } |
| + | this.length = 0 |
| + | if (query) { |
| + | if (typeof query === 'string') { |
| + | query = this.find(query) |
| + | } |
| + | if (query.nodeType || query === query.window) { |
| + | // Single HTML element |
| + | this.length = 1 |
| + | this[0] = query |
| + | } else { |
| + | // HTML element collection |
| + | var i = query.length |
| + | this.length = i |
| + | while (i) { |
| + | i -= 1 |
| + | this[i] = query[i] |
| + | } |
| + | } |
| + | } |
| + | } |
| + | |
| + | Helper.extend = extend |
| + | |
| + | Helper.contains = function (container, element) { |
| + | do { |
| + | element = element.parentNode |
| + | if (element === container) { |
| + | return true |
| + | } |
| + | } while (element) |
| + | return false |
| + | } |
| + | |
| + | Helper.parseJSON = function (string) { |
| + | return window.JSON && JSON.parse(string) |
| + | } |
| + | |
| + | extend(Helper.prototype, { |
| + | find: function (query) { |
| + | var container = this[0] || document |
| + | if (typeof query === 'string') { |
| + | if (container.querySelectorAll) { |
| + | query = container.querySelectorAll(query) |
| + | } else if (query.charAt(0) === '#') { |
| + | query = container.getElementById(query.slice(1)) |
| + | } else { |
| + | query = container.getElementsByTagName(query) |
| + | } |
| + | } |
| + | return new Helper(query) |
| + | }, |
| + | |
| + | hasClass: function (className) { |
| + | if (!this[0]) { |
| + | return false |
| + | } |
| + | return new RegExp('(^|\\s+)' + className + '(\\s+|$)').test( |
| + | this[0].className |
| + | ) |
| + | }, |
| + | |
| + | addClass: function (className) { |
| + | var i = this.length |
| + | var element |
| + | while (i) { |
| + | i -= 1 |
| + | element = this[i] |
| + | if (!element.className) { |
| + | element.className = className |
| + | return this |
| + | } |
| + | if (this.hasClass(className)) { |
| + | return this |
| + | } |
| + | element.className += ' ' + className |
| + | } |
| + | return this |
| + | }, |
| + | |
| + | removeClass: function (className) { |
| + | var regexp = new RegExp('(^|\\s+)' + className + '(\\s+|$)') |
| + | var i = this.length |
| + | var element |
| + | while (i) { |
| + | i -= 1 |
| + | element = this[i] |
| + | element.className = element.className.replace(regexp, ' ') |
| + | } |
| + | return this |
| + | }, |
| + | |
| + | on: function (eventName, handler) { |
| + | var eventNames = eventName.split(/\s+/) |
| + | var i |
| + | var element |
| + | while (eventNames.length) { |
| + | eventName = eventNames.shift() |
| + | i = this.length |
| + | while (i) { |
| + | i -= 1 |
| + | element = this[i] |
| + | if (element.addEventListener) { |
| + | element.addEventListener(eventName, handler, false) |
| + | } else if (element.attachEvent) { |
| + | element.attachEvent('on' + eventName, handler) |
| + | } |
| + | } |
| + | } |
| + | return this |
| + | }, |
| + | |
| + | off: function (eventName, handler) { |
| + | var eventNames = eventName.split(/\s+/) |
| + | var i |
| + | var element |
| + | while (eventNames.length) { |
| + | eventName = eventNames.shift() |
| + | i = this.length |
| + | while (i) { |
| + | i -= 1 |
| + | element = this[i] |
| + | if (element.removeEventListener) { |
| + | element.removeEventListener(eventName, handler, false) |
| + | } else if (element.detachEvent) { |
| + | element.detachEvent('on' + eventName, handler) |
| + | } |
| + | } |
| + | } |
| + | return this |
| + | }, |
| + | |
| + | empty: function () { |
| + | var i = this.length |
| + | var element |
| + | while (i) { |
| + | i -= 1 |
| + | element = this[i] |
| + | while (element.hasChildNodes()) { |
| + | element.removeChild(element.lastChild) |
| + | } |
| + | } |
| + | return this |
| + | }, |
| + | |
| + | first: function () { |
| + | return new Helper(this[0]) |
| + | } |
| + | }) |
| + | |
| + | if (typeof define === 'function' && define.amd) { |
| + | define(function () { |
| + | return Helper |
| + | }) |
| + | } else { |
| + | window.blueimp = window.blueimp || {} |
| + | window.blueimp.helper = Helper |
| + | } |
| + | })() |
public/javascripts/blueimp/jquery.blueimp-gallery.js
+73
-0
| @@ | @@ -0,0 +1,73 @@ |
| + | /* |
| + | * blueimp Gallery jQuery plugin |
| + | * https://github.com/blueimp/Gallery |
| + | * |
| + | * Copyright 2013, Sebastian Tschan |
| + | * https://blueimp.net |
| + | * |
| + | * Licensed under the MIT license: |
| + | * https://opensource.org/licenses/MIT |
| + | */ |
| + | |
| + | /* global define, window, document */ |
| + | |
| + | ;(function (factory) { |
| + | 'use strict' |
| + | if (typeof define === 'function' && define.amd) { |
| + | define(['jquery', './blueimp-gallery'], factory) |
| + | } else { |
| + | factory(window.jQuery, window.blueimp.Gallery) |
| + | } |
| + | })(function ($, Gallery) { |
| + | 'use strict' |
| + | |
| + | // Global click handler to open links with data-gallery attribute |
| + | // in the Gallery lightbox: |
| + | $(document).on('click', '[data-gallery]', function (event) { |
| + | // Get the container id from the data-gallery attribute: |
| + | var id = $(this).data('gallery') |
| + | var widget = $(id) |
| + | var container = |
| + | (widget.length && widget) || $(Gallery.prototype.options.container) |
| + | var callbacks = { |
| + | onopen: function () { |
| + | container.data('gallery', this).trigger('open') |
| + | }, |
| + | onopened: function () { |
| + | container.trigger('opened') |
| + | }, |
| + | onslide: function () { |
| + | container.trigger('slide', arguments) |
| + | }, |
| + | onslideend: function () { |
| + | container.trigger('slideend', arguments) |
| + | }, |
| + | onslidecomplete: function () { |
| + | container.trigger('slidecomplete', arguments) |
| + | }, |
| + | onclose: function () { |
| + | container.trigger('close') |
| + | }, |
| + | onclosed: function () { |
| + | container.trigger('closed').removeData('gallery') |
| + | } |
| + | } |
| + | var options = $.extend( |
| + | // Retrieve custom options from data-attributes |
| + | // on the Gallery widget: |
| + | container.data(), |
| + | { |
| + | container: container[0], |
| + | index: this, |
| + | event: event |
| + | }, |
| + | callbacks |
| + | ) |
| + | // Select all links with the same data-gallery attribute: |
| + | var links = $('[data-gallery="' + id + '"]') |
| + | if (options.filter) { |
| + | links = links.filter(options.filter) |
| + | } |
| + | return new Gallery(links, options) |
| + | }) |
| + | }) |
public/javascripts/blueimp/jquery.blueimp-gallery.min.js
+2
-0
| @@ | @@ -0,0 +1,2 @@ |
| + | !function(t){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper"],t):(window.blueimp=window.blueimp||{},window.blueimp.Gallery=t(window.blueimp.helper||window.jQuery))}(function(t){"use strict";function e(t,i){return void 0===document.body.style.maxHeight?null:this&&this.options===e.prototype.options?void(t&&t.length?(this.list=t,this.num=t.length,this.initOptions(i),this.initialize()):this.console.log("blueimp Gallery: No or empty list provided as first argument.",t)):new e(t,i)}return t.extend(e.prototype,{options:{container:"#blueimp-gallery",slidesContainer:"div",titleElement:"h3",displayClass:"blueimp-gallery-display",controlsClass:"blueimp-gallery-controls",singleClass:"blueimp-gallery-single",leftEdgeClass:"blueimp-gallery-left",rightEdgeClass:"blueimp-gallery-right",playingClass:"blueimp-gallery-playing",slideClass:"slide",slideLoadingClass:"slide-loading",slideErrorClass:"slide-error",slideContentClass:"slide-content",toggleClass:"toggle",prevClass:"prev",nextClass:"next",closeClass:"close",playPauseClass:"play-pause",typeProperty:"type",titleProperty:"title",urlProperty:"href",srcsetProperty:"urlset",displayTransition:!0,clearSlides:!0,stretchImages:!1,toggleControlsOnReturn:!0,toggleControlsOnSlideClick:!0,toggleSlideshowOnSpace:!0,enableKeyboardNavigation:!0,closeOnEscape:!0,closeOnSlideClick:!0,closeOnSwipeUpOrDown:!0,emulateTouchEvents:!0,stopTouchEventsPropagation:!1,hidePageScrollbars:!0,disableScroll:!0,carousel:!1,continuous:!0,unloadElements:!0,startSlideshow:!1,slideshowInterval:5e3,index:0,preloadRange:2,transitionSpeed:400,slideshowTransitionSpeed:void 0,event:void 0,onopen:void 0,onopened:void 0,onslide:void 0,onslideend:void 0,onslidecomplete:void 0,onclose:void 0,onclosed:void 0},carouselOptions:{hidePageScrollbars:!1,toggleControlsOnReturn:!1,toggleSlideshowOnSpace:!1,enableKeyboardNavigation:!1,closeOnEscape:!1,closeOnSlideClick:!1,closeOnSwipeUpOrDown:!1,disableScroll:!1,startSlideshow:!0},console:window.console&&"function"==typeof window.console.log?window.console:{log:function(){}},support:function(e){function i(){var t,i,s=n.transition;document.body.appendChild(e),s&&(t=s.name.slice(0,-9)+"ransform",void 0!==e.style[t]&&(e.style[t]="translateZ(0)",i=window.getComputedStyle(e).getPropertyValue(s.prefix+"transform"),n.transform={prefix:s.prefix,name:t,translate:!0,translateZ:!!i&&"none"!==i})),void 0!==e.style.backgroundSize&&(n.backgroundSize={},e.style.backgroundSize="contain",n.backgroundSize.contain="contain"===window.getComputedStyle(e).getPropertyValue("background-size"),e.style.backgroundSize="cover",n.backgroundSize.cover="cover"===window.getComputedStyle(e).getPropertyValue("background-size")),document.body.removeChild(e)}var s,n={touch:void 0!==window.ontouchstart||window.DocumentTouch&&document instanceof DocumentTouch},o={webkitTransition:{end:"webkitTransitionEnd",prefix:"-webkit-"},MozTransition:{end:"transitionend",prefix:"-moz-"},OTransition:{end:"otransitionend",prefix:"-o-"},transition:{end:"transitionend",prefix:""}};for(s in o)if(o.hasOwnProperty(s)&&void 0!==e.style[s]){n.transition=o[s],n.transition.name=s;break}return document.body?i():t(document).on("DOMContentLoaded",i),n}(document.createElement("div")),requestAnimationFrame:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,cancelAnimationFrame:window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame,initialize:function(){if(this.initStartIndex(),!1===this.initWidget())return!1;this.initEventListeners(),this.onslide(this.index),this.ontransitionend(),this.options.startSlideshow&&this.play()},slide:function(t,e){window.clearTimeout(this.timeout);var i,s,n,o=this.index;if(o!==t&&1!==this.num){if(e||(e=this.options.transitionSpeed),this.support.transform){for(this.options.continuous||(t=this.circle(t)),i=Math.abs(o-t)/(o-t),this.options.continuous&&(s=i,(i=-this.positions[this.circle(t)]/this.slideWidth)!==s&&(t=-i*this.num+t)),n=Math.abs(o-t)-1;n;)n-=1,this.move(this.circle((t>o?t:o)-n-1),this.slideWidth*i,0);t=this.circle(t),this.move(o,this.slideWidth*i,e),this.move(t,0,e),this.options.continuous&&this.move(this.circle(t-i),-this.slideWidth*i,0)}else t=this.circle(t),this.animate(o*-this.slideWidth,t*-this.slideWidth,e);this.onslide(t)}},getIndex:function(){return this.index},getNumber:function(){return this.num},prev:function(){(this.options.continuous||this.index)&&this.slide(this.index-1)},next:function(){(this.options.continuous||this.index<this.num-1)&&this.slide(this.index+1)},play:function(t){var e=this;window.clearTimeout(this.timeout),this.interval=t||this.options.slideshowInterval,this.elements[this.index]>1&&(this.timeout=this.setTimeout(!this.requestAnimationFrame&&this.slide||function(t,i){e.animationFrameId=e.requestAnimationFrame.call(window,function(){e.slide(t,i)})},[this.index+1,this.options.slideshowTransitionSpeed],this.interval)),this.container.addClass(this.options.playingClass)},pause:function(){window.clearTimeout(this.timeout),this.interval=null,this.cancelAnimationFrame&&(this.cancelAnimationFrame.call(window,this.animationFrameId),this.animationFrameId=null),this.container.removeClass(this.options.playingClass)},add:function(t){var e;for(t.concat||(t=Array.prototype.slice.call(t)),this.list.concat||(this.list=Array.prototype.slice.call(this.list)),this.list=this.list.concat(t),this.num=this.list.length,this.num>2&&null===this.options.continuous&&(this.options.continuous=!0,this.container.removeClass(this.options.leftEdgeClass)),this.container.removeClass(this.options.rightEdgeClass).removeClass(this.options.singleClass),e=this.num-t.length;e<this.num;e+=1)this.addSlide(e),this.positionSlide(e);this.positions.length=this.num,this.initSlides(!0)},resetSlides:function(){this.slidesContainer.empty(),this.unloadAllSlides(),this.slides=[]},handleClose:function(){var t=this.options;this.destroyEventListeners(),this.pause(),this.container[0].style.display="none",this.container.removeClass(t.displayClass).removeClass(t.singleClass).removeClass(t.leftEdgeClass).removeClass(t.rightEdgeClass),t.hidePageScrollbars&&(document.body.style.overflow=this.bodyOverflowStyle),this.options.clearSlides&&this.resetSlides(),this.options.onclosed&&this.options.onclosed.call(this)},close:function(){function t(i){i.target===e.container[0]&&(e.container.off(e.support.transition.end,t),e.handleClose())}var e=this;this.options.onclose&&this.options.onclose.call(this),this.support.transition&&this.options.displayTransition?(this.container.on(this.support.transition.end,t),this.container.removeClass(this.options.displayClass)):this.handleClose()},circle:function(t){return(this.num+t%this.num)%this.num},move:function(t,e,i){this.translateX(t,e,i),this.positions[t]=e},translate:function(t,e,i,s){var n=this.slides[t].style,o=this.support.transition,a=this.support.transform;n[o.name+"Duration"]=s+"ms",n[a.name]="translate("+e+"px, "+i+"px)"+(a.translateZ?" translateZ(0)":"")},translateX:function(t,e,i){this.translate(t,e,0,i)},translateY:function(t,e,i){this.translate(t,0,e,i)},animate:function(t,e,i){if(i)var s=this,n=(new Date).getTime(),o=window.setInterval(function(){var a=(new Date).getTime()-n;if(a>i)return s.slidesContainer[0].style.left=e+"px",s.ontransitionend(),void window.clearInterval(o);s.slidesContainer[0].style.left=(e-t)*(Math.floor(a/i*100)/100)+t+"px"},4);else this.slidesContainer[0].style.left=e+"px"},preventDefault:function(t){t.preventDefault?t.preventDefault():t.returnValue=!1},stopPropagation:function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},onresize:function(){this.initSlides(!0)},onmousedown:function(t){t.which&&1===t.which&&"VIDEO"!==t.target.nodeName&&(t.preventDefault(),(t.originalEvent||t).touches=[{pageX:t.pageX,pageY:t.pageY}],this.ontouchstart(t))},onmousemove:function(t){this.touchStart&&((t.originalEvent||t).touches=[{pageX:t.pageX,pageY:t.pageY}],this.ontouchmove(t))},onmouseup:function(t){this.touchStart&&(this.ontouchend(t),delete this.touchStart)},onmouseout:function(e){if(this.touchStart){var i=e.target,s=e.relatedTarget;s&&(s===i||t.contains(i,s))||this.onmouseup(e)}},ontouchstart:function(t){this.options.stopTouchEventsPropagation&&this.stopPropagation(t);var e=(t.originalEvent||t).touches[0];this.touchStart={x:e.pageX,y:e.pageY,time:Date.now()},this.isScrolling=void 0,this.touchDelta={}},ontouchmove:function(t){this.options.stopTouchEventsPropagation&&this.stopPropagation(t);var e,i,s=(t.originalEvent||t).touches[0],n=(t.originalEvent||t).scale,o=this.index;if(!(s.length>1||n&&1!==n))if(this.options.disableScroll&&t.preventDefault(),this.touchDelta={x:s.pageX-this.touchStart.x,y:s.pageY-this.touchStart.y},e=this.touchDelta.x,void 0===this.isScrolling&&(this.isScrolling=this.isScrolling||Math.abs(e)<Math.abs(this.touchDelta.y)),this.isScrolling)this.translateY(o,this.touchDelta.y+this.positions[o],0);else for(t.preventDefault(),window.clearTimeout(this.timeout),this.options.continuous?i=[this.circle(o+1),o,this.circle(o-1)]:(this.touchDelta.x=e/=!o&&e>0||o===this.num-1&&e<0?Math.abs(e)/this.slideWidth+1:1,i=[o],o&&i.push(o-1),o<this.num-1&&i.unshift(o+1));i.length;)o=i.pop(),this.translateX(o,e+this.positions[o],0)},ontouchend:function(t){this.options.stopTouchEventsPropagation&&this.stopPropagation(t);var e,i,s,n,o,a=this.index,l=this.options.transitionSpeed,r=this.slideWidth,h=Number(Date.now()-this.touchStart.time)<250,d=h&&Math.abs(this.touchDelta.x)>20||Math.abs(this.touchDelta.x)>r/2,c=!a&&this.touchDelta.x>0||a===this.num-1&&this.touchDelta.x<0,u=!d&&this.options.closeOnSwipeUpOrDown&&(h&&Math.abs(this.touchDelta.y)>20||Math.abs(this.touchDelta.y)>this.slideHeight/2);this.options.continuous&&(c=!1),e=this.touchDelta.x<0?-1:1,this.isScrolling?u?this.close():this.translateY(a,0,l):d&&!c?(i=a+e,s=a-e,n=r*e,o=-r*e,this.options.continuous?(this.move(this.circle(i),n,0),this.move(this.circle(a-2*e),o,0)):i>=0&&i<this.num&&this.move(i,n,0),this.move(a,this.positions[a]+n,l),this.move(this.circle(s),this.positions[this.circle(s)]+n,l),a=this.circle(s),this.onslide(a)):this.options.continuous?(this.move(this.circle(a-1),-r,l),this.move(a,0,l),this.move(this.circle(a+1),r,l)):(a&&this.move(a-1,-r,l),this.move(a,0,l),a<this.num-1&&this.move(a+1,r,l))},ontouchcancel:function(t){this.touchStart&&(this.ontouchend(t),delete this.touchStart)},ontransitionend:function(t){var e=this.slides[this.index];t&&e!==t.target||(this.interval&&this.play(),this.setTimeout(this.options.onslideend,[this.index,e]))},oncomplete:function(e){var i,s=e.target||e.srcElement,n=s&&s.parentNode;s&&n&&(i=this.getNodeIndex(n),t(n).removeClass(this.options.slideLoadingClass),"error"===e.type?(t(n).addClass(this.options.slideErrorClass),this.elements[i]=3):this.elements[i]=2,s.clientHeight>this.container[0].clientHeight&&(s.style.maxHeight=this.container[0].clientHeight),this.interval&&this.slides[this.index]===n&&this.play(),this.setTimeout(this.options.onslidecomplete,[i,n]))},onload:function(t){this.oncomplete(t)},onerror:function(t){this.oncomplete(t)},onkeydown:function(t){switch(t.which||t.keyCode){case 13:this.options.toggleControlsOnReturn&&(this.preventDefault(t),this.toggleControls());break;case 27:this.options.closeOnEscape&&(this.close(),t.stopImmediatePropagation());break;case 32:this.options.toggleSlideshowOnSpace&&(this.preventDefault(t),this.toggleSlideshow());break;case 37:this.options.enableKeyboardNavigation&&(this.preventDefault(t),this.prev());break;case 39:this.options.enableKeyboardNavigation&&(this.preventDefault(t),this.next())}},handleClick:function(e){function i(e){return t(n).hasClass(e)||t(o).hasClass(e)}var s=this.options,n=e.target||e.srcElement,o=n.parentNode;i(s.toggleClass)?(this.preventDefault(e),this.toggleControls()):i(s.prevClass)?(this.preventDefault(e),this.prev()):i(s.nextClass)?(this.preventDefault(e),this.next()):i(s.closeClass)?(this.preventDefault(e),this.close()):i(s.playPauseClass)?(this.preventDefault(e),this.toggleSlideshow()):o===this.slidesContainer[0]?s.closeOnSlideClick?(this.preventDefault(e),this.close()):s.toggleControlsOnSlideClick&&(this.preventDefault(e),this.toggleControls()):o.parentNode&&o.parentNode===this.slidesContainer[0]&&s.toggleControlsOnSlideClick&&(this.preventDefault(e),this.toggleControls())},onclick:function(t){if(!(this.options.emulateTouchEvents&&this.touchDelta&&(Math.abs(this.touchDelta.x)>20||Math.abs(this.touchDelta.y)>20)))return this.handleClick(t);delete this.touchDelta},updateEdgeClasses:function(t){t?this.container.removeClass(this.options.leftEdgeClass):this.container.addClass(this.options.leftEdgeClass),t===this.num-1?this.container.addClass(this.options.rightEdgeClass):this.container.removeClass(this.options.rightEdgeClass)},handleSlide:function(t){this.options.continuous||this.updateEdgeClasses(t),this.loadElements(t),this.options.unloadElements&&this.unloadElements(t),this.setTitle(t)},onslide:function(t){this.index=t,this.handleSlide(t),this.setTimeout(this.options.onslide,[t,this.slides[t]])},setTitle:function(t){var e=this.slides[t].firstChild,i=e.title||e.alt,s=this.titleElement;s.length&&(this.titleElement.empty(),i&&s[0].appendChild(document.createTextNode(i)))},setTimeout:function(t,e,i){var s=this;return t&&window.setTimeout(function(){t.apply(s,e||[])},i||0)},imageFactory:function(e,i){function s(e){if(!n){if(e={type:e.type,target:o},!o.parentNode)return l.setTimeout(s,[e]);n=!0,t(r).off("load error",s),d&&"load"===e.type&&(o.style.background='url("'+h+'") center no-repeat',o.style.backgroundSize=d),i(e)}}var n,o,a,l=this,r=this.imagePrototype.cloneNode(!1),h=e,d=this.options.stretchImages;return"string"!=typeof h&&(h=this.getItemProperty(e,this.options.urlProperty),a=this.getItemProperty(e,this.options.titleProperty)),!0===d&&(d="contain"),(d=this.support.backgroundSize&&this.support.backgroundSize[d]&&d)?o=this.elementPrototype.cloneNode(!1):(o=r,r.draggable=!1),a&&(o.title=a),t(r).on("load error",s),r.src=h,o},createElement:function(e,i){var s=e&&this.getItemProperty(e,this.options.typeProperty),n=s&&this[s.split("/")[0]+"Factory"]||this.imageFactory,o=e&&n.call(this,e,i),a=this.getItemProperty(e,this.options.srcsetProperty);return o||(o=this.elementPrototype.cloneNode(!1),this.setTimeout(i,[{type:"error",target:o}])),a&&o.setAttribute("srcset",a),t(o).addClass(this.options.slideContentClass),o},loadElement:function(e){this.elements[e]||(this.slides[e].firstChild?this.elements[e]=t(this.slides[e]).hasClass(this.options.slideErrorClass)?3:2:(this.elements[e]=1,t(this.slides[e]).addClass(this.options.slideLoadingClass),this.slides[e].appendChild(this.createElement(this.list[e],this.proxyListener))))},loadElements:function(t){var e,i=Math.min(this.num,2*this.options.preloadRange+1),s=t;for(e=0;e<i;e+=1)s+=e*(e%2==0?-1:1),s=this.circle(s),this.loadElement(s)},unloadElements:function(t){var e,i;for(e in this.elements)this.elements.hasOwnProperty(e)&&(i=Math.abs(t-e))>this.options.preloadRange&&i+this.options.preloadRange<this.num&&(this.unloadSlide(e),delete this.elements[e])},addSlide:function(t){var e=this.slidePrototype.cloneNode(!1);e.setAttribute("data-index",t),this.slidesContainer[0].appendChild(e),this.slides.push(e)},positionSlide:function(t){var e=this.slides[t];e.style.width=this.slideWidth+"px",this.support.transform&&(e.style.left=t*-this.slideWidth+"px",this.move(t,this.index>t?-this.slideWidth:this.index<t?this.slideWidth:0,0))},initSlides:function(e){var i,s;for(e||(this.positions=[],this.positions.length=this.num,this.elements={},this.imagePrototype=document.createElement("img"),this.elementPrototype=document.createElement("div"),this.slidePrototype=document.createElement("div"),t(this.slidePrototype).addClass(this.options.slideClass),this.slides=this.slidesContainer[0].children,i=this.options.clearSlides||this.slides.length!==this.num),this.slideWidth=this.container[0].offsetWidth,this.slideHeight=this.container[0].offsetHeight,this.slidesContainer[0].style.width=this.num*this.slideWidth+"px",i&&this.resetSlides(),s=0;s<this.num;s+=1)i&&this.addSlide(s),this.positionSlide(s);this.options.continuous&&this.support.transform&&(this.move(this.circle(this.index-1),-this.slideWidth,0),this.move(this.circle(this.index+1),this.slideWidth,0)),this.support.transform||(this.slidesContainer[0].style.left=this.index*-this.slideWidth+"px")},unloadSlide:function(t){var e,i;null!==(i=(e=this.slides[t]).firstChild)&&e.removeChild(i)},unloadAllSlides:function(){var t,e;for(t=0,e=this.slides.length;t<e;t++)this.unloadSlide(t)},toggleControls:function(){var t=this.options.controlsClass;this.container.hasClass(t)?this.container.removeClass(t):this.container.addClass(t)},toggleSlideshow:function(){this.interval?this.pause():this.play()},getNodeIndex:function(t){return parseInt(t.getAttribute("data-index"),10)},getNestedProperty:function(t,e){return e.replace(/\[(?:'([^']+)'|"([^"]+)"|(\d+))\]|(?:(?:^|\.)([^\.\[]+))/g,function(e,i,s,n,o){var a=o||i||s||n&&parseInt(n,10);e&&t&&(t=t[a])}),t},getDataProperty:function(e,i){var s,n;if(e.dataset?(s=i.replace(/-([a-z])/g,function(t,e){return e.toUpperCase()}),n=e.dataset[s]):e.getAttribute&&(n=e.getAttribute("data-"+i.replace(/([A-Z])/g,"-$1").toLowerCase())),"string"==typeof n){if(/^(true|false|null|-?\d+(\.\d+)?|\{[\s\S]*\}|\[[\s\S]*\])$/.test(n))try{return t.parseJSON(n)}catch(t){}return n}},getItemProperty:function(t,e){var i=this.getDataProperty(t,e);return void 0===i&&(i=t[e]),void 0===i&&(i=this.getNestedProperty(t,e)),i},initStartIndex:function(){var t,e=this.options.index,i=this.options.urlProperty;if(e&&"number"!=typeof e)for(t=0;t<this.num;t+=1)if(this.list[t]===e||this.getItemProperty(this.list[t],i)===this.getItemProperty(e,i)){e=t;break}this.index=this.circle(parseInt(e,10)||0)},initEventListeners:function(){function e(t){var e=i.support.transition&&i.support.transition.end===t.type?"transitionend":t.type;i["on"+e](t)}var i=this,s=this.slidesContainer;t(window).on("resize",e),t(document.body).on("keydown",e),this.container.on("click",e),this.support.touch?s.on("touchstart touchmove touchend touchcancel",e):this.options.emulateTouchEvents&&this.support.transition&&s.on("mousedown mousemove mouseup mouseout",e),this.support.transition&&s.on(this.support.transition.end,e),this.proxyListener=e},destroyEventListeners:function(){var e=this.slidesContainer,i=this.proxyListener;t(window).off("resize",i),t(document.body).off("keydown",i),this.container.off("click",i),this.support.touch?e.off("touchstart touchmove touchend touchcancel",i):this.options.emulateTouchEvents&&this.support.transition&&e.off("mousedown mousemove mouseup mouseout",i),this.support.transition&&e.off(this.support.transition.end,i)},handleOpen:function(){this.options.onopened&&this.options.onopened.call(this)},initWidget:function(){function e(t){t.target===i.container[0]&&(i.container.off(i.support.transition.end,e),i.handleOpen())}var i=this;return this.container=t(this.options.container),this.container.length?(this.slidesContainer=this.container.find(this.options.slidesContainer).first(),this.slidesContainer.length?(this.titleElement=this.container.find(this.options.titleElement).first(),1===this.num&&this.container.addClass(this.options.singleClass),this.options.onopen&&this.options.onopen.call(this),this.support.transition&&this.options.displayTransition?this.container.on(this.support.transition.end,e):this.handleOpen(),this.options.hidePageScrollbars&&(this.bodyOverflowStyle=document.body.style.overflow,document.body.style.overflow="hidden"),this.container[0].style.display="block",this.initSlides(),void this.container.addClass(this.options.displayClass)):(this.console.log("blueimp Gallery: Slides container not found.",this.options.slidesContainer),!1)):(this.console.log("blueimp Gallery: Widget container not found.",this.options.container),!1)},initOptions:function(e){this.options=t.extend({},this.options),(e&&e.carousel||this.options.carousel&&(!e||!1!==e.carousel))&&t.extend(this.options,this.carouselOptions),t.extend(this.options,e),this.num<3&&(this.options.continuous=!!this.options.continuous&&null),this.support.transition||(this.options.emulateTouchEvents=!1),this.options.event&&this.preventDefault(this.options.event)}}),e}),function(t){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery"],t):t(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(t,e){"use strict";t.extend(e.prototype.options,{fullScreen:!1});var i=e.prototype.initialize,s=e.prototype.close;return t.extend(e.prototype,{getFullScreenElement:function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},requestFullScreen:function(t){t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen()},exitFullScreen:function(){document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()},initialize:function(){i.call(this),this.options.fullScreen&&!this.getFullScreenElement()&&this.requestFullScreen(this.container[0])},close:function(){this.getFullScreenElement()===this.container[0]&&this.exitFullScreen(),s.call(this)}}),e}),function(t){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery"],t):t(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(t,e){"use strict";t.extend(e.prototype.options,{indicatorContainer:"ol",activeIndicatorClass:"active",thumbnailProperty:"thumbnail",thumbnailIndicators:!0});var i=e.prototype.initSlides,s=e.prototype.addSlide,n=e.prototype.resetSlides,o=e.prototype.handleClick,a=e.prototype.handleSlide,l=e.prototype.handleClose;return t.extend(e.prototype,{createIndicator:function(e){var i,s,n=this.indicatorPrototype.cloneNode(!1),o=this.getItemProperty(e,this.options.titleProperty),a=this.options.thumbnailProperty;return this.options.thumbnailIndicators&&(a&&(i=this.getItemProperty(e,a)),void 0===i&&(s=e.getElementsByTagName&&t(e).find("img")[0])&&(i=s.src),i&&(n.style.backgroundImage='url("'+i+'")')),o&&(n.title=o),n},addIndicator:function(t){if(this.indicatorContainer.length){var e=this.createIndicator(this.list[t]);e.setAttribute("data-index",t),this.indicatorContainer[0].appendChild(e),this.indicators.push(e)}},setActiveIndicator:function(e){this.indicators&&(this.activeIndicator&&this.activeIndicator.removeClass(this.options.activeIndicatorClass),this.activeIndicator=t(this.indicators[e]),this.activeIndicator.addClass(this.options.activeIndicatorClass))},initSlides:function(t){t||(this.indicatorContainer=this.container.find(this.options.indicatorContainer),this.indicatorContainer.length&&(this.indicatorPrototype=document.createElement("li"),this.indicators=this.indicatorContainer[0].children)),i.call(this,t)},addSlide:function(t){s.call(this,t),this.addIndicator(t)},resetSlides:function(){n.call(this),this.indicatorContainer.empty(),this.indicators=[]},handleClick:function(t){var e=t.target||t.srcElement,i=e.parentNode;if(i===this.indicatorContainer[0])this.preventDefault(t),this.slide(this.getNodeIndex(e));else{if(i.parentNode!==this.indicatorContainer[0])return o.call(this,t);this.preventDefault(t),this.slide(this.getNodeIndex(i))}},handleSlide:function(t){a.call(this,t),this.setActiveIndicator(t)},handleClose:function(){this.activeIndicator&&this.activeIndicator.removeClass(this.options.activeIndicatorClass),l.call(this)}}),e}),function(t){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery"],t):t(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(t,e){"use strict";t.extend(e.prototype.options,{videoContentClass:"video-content",videoLoadingClass:"video-loading",videoPlayingClass:"video-playing",videoPosterProperty:"poster",videoSourcesProperty:"sources"});var i=e.prototype.handleSlide;return t.extend(e.prototype,{handleSlide:function(t){i.call(this,t),this.playingVideo&&this.playingVideo.pause()},videoFactory:function(e,i,s){var n,o,a,l,r,h=this,d=this.options,c=this.elementPrototype.cloneNode(!1),u=t(c),p=[{type:"error",target:c}],m=s||document.createElement("video"),y=this.getItemProperty(e,d.urlProperty),f=this.getItemProperty(e,d.typeProperty),g=this.getItemProperty(e,d.titleProperty),v=this.getItemProperty(e,d.videoPosterProperty),C=this.getItemProperty(e,d.videoSourcesProperty);if(u.addClass(d.videoContentClass),g&&(c.title=g),m.canPlayType)if(y&&f&&m.canPlayType(f))m.src=y;else if(C)for(;C.length;)if(o=C.shift(),y=this.getItemProperty(o,d.urlProperty),f=this.getItemProperty(o,d.typeProperty),y&&f&&m.canPlayType(f)){m.src=y;break}return v&&(m.poster=v,n=this.imagePrototype.cloneNode(!1),t(n).addClass(d.toggleClass),n.src=v,n.draggable=!1,c.appendChild(n)),(a=document.createElement("a")).setAttribute("target","_blank"),s||a.setAttribute("download",g),a.href=y,m.src&&(m.controls=!0,(s||t(m)).on("error",function(){h.setTimeout(i,p)}).on("pause",function(){m.seeking||(l=!1,u.removeClass(h.options.videoLoadingClass).removeClass(h.options.videoPlayingClass),r&&h.container.addClass(h.options.controlsClass),delete h.playingVideo,h.interval&&h.play())}).on("playing",function(){l=!1,u.removeClass(h.options.videoLoadingClass).addClass(h.options.videoPlayingClass),h.container.hasClass(h.options.controlsClass)?(r=!0,h.container.removeClass(h.options.controlsClass)):r=!1}).on("play",function(){window.clearTimeout(h.timeout),l=!0,u.addClass(h.options.videoLoadingClass),h.playingVideo=m}),t(a).on("click",function(t){h.preventDefault(t),l?m.pause():m.play()}),c.appendChild(s&&s.element||m)),c.appendChild(a),this.setTimeout(i,[{type:"load",target:c}]),c}}),e}),function(t){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery-video"],t):t(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(t,e){"use strict";if(!window.postMessage)return e;t.extend(e.prototype.options,{vimeoVideoIdProperty:"vimeo",vimeoPlayerUrl:"//player.vimeo.com/video/VIDEO_ID?api=1&player_id=PLAYER_ID",vimeoPlayerIdPrefix:"vimeo-player-",vimeoClickToPlay:!0});var i=e.prototype.textFactory||e.prototype.imageFactory,s=function(t,e,i,s){this.url=t,this.videoId=e,this.playerId=i,this.clickToPlay=s,this.element=document.createElement("div"),this.listeners={}},n=0;return t.extend(s.prototype,{canPlayType:function(){return!0},on:function(t,e){return this.listeners[t]=e,this},loadAPI:function(){function e(){!s&&n.playOnReady&&n.play(),s=!0}for(var i,s,n=this,o="//f.vimeocdn.com/js/froogaloop2.min.js",a=document.getElementsByTagName("script"),l=a.length;l;)if(l-=1,a[l].src===o){i=a[l];break}i||((i=document.createElement("script")).src=o),t(i).on("load",e),a[0].parentNode.insertBefore(i,a[0]),/loaded|complete/.test(i.readyState)&&e()},onReady:function(){var t=this;this.ready=!0,this.player.addEvent("play",function(){t.hasPlayed=!0,t.onPlaying()}),this.player.addEvent("pause",function(){t.onPause()}),this.player.addEvent("finish",function(){t.onPause()}),this.playOnReady&&this.play()},onPlaying:function(){this.playStatus<2&&(this.listeners.playing(),this.playStatus=2)},onPause:function(){this.listeners.pause(),delete this.playStatus},insertIframe:function(){var t=document.createElement("iframe");t.src=this.url.replace("VIDEO_ID",this.videoId).replace("PLAYER_ID",this.playerId),t.id=this.playerId,this.element.parentNode.replaceChild(t,this.element),this.element=t},play:function(){var t=this;this.playStatus||(this.listeners.play(),this.playStatus=1),this.ready?!this.hasPlayed&&(this.clickToPlay||window.navigator&&/iP(hone|od|ad)/.test(window.navigator.platform))?this.onPlaying():this.player.api("play"):(this.playOnReady=!0,window.$f?this.player||(this.insertIframe(),this.player=$f(this.element),this.player.addEvent("ready",function(){t.onReady()})):this.loadAPI())},pause:function(){this.ready?this.player.api("pause"):this.playStatus&&(delete this.playOnReady,this.listeners.pause(),delete this.playStatus)}}),t.extend(e.prototype,{VimeoPlayer:s,textFactory:function(t,e){var o=this.options,a=this.getItemProperty(t,o.vimeoVideoIdProperty);return a?(void 0===this.getItemProperty(t,o.urlProperty)&&(t[o.urlProperty]="//vimeo.com/"+a),n+=1,this.videoFactory(t,e,new s(o.vimeoPlayerUrl,a,o.vimeoPlayerIdPrefix+n,o.vimeoClickToPlay))):i.call(this,t,e)}}),e}),function(t){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery-video"],t):t(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(t,e){"use strict";if(!window.postMessage)return e;t.extend(e.prototype.options,{youTubeVideoIdProperty:"youtube",youTubePlayerVars:{wmode:"transparent"},youTubeClickToPlay:!0});var i=e.prototype.textFactory||e.prototype.imageFactory,s=function(t,e,i){this.videoId=t,this.playerVars=e,this.clickToPlay=i,this.element=document.createElement("div"),this.listeners={}};return t.extend(s.prototype,{canPlayType:function(){return!0},on:function(t,e){return this.listeners[t]=e,this},loadAPI:function(){var t,e=this,i=window.onYouTubeIframeAPIReady,s="//www.youtube.com/iframe_api",n=document.getElementsByTagName("script"),o=n.length;for(window.onYouTubeIframeAPIReady=function(){i&&i.apply(this),e.playOnReady&&e.play()};o;)if(o-=1,n[o].src===s)return;(t=document.createElement("script")).src=s,n[0].parentNode.insertBefore(t,n[0])},onReady:function(){this.ready=!0,this.playOnReady&&this.play()},onPlaying:function(){this.playStatus<2&&(this.listeners.playing(),this.playStatus=2)},onPause:function(){e.prototype.setTimeout.call(this,this.checkSeek,null,2e3)},checkSeek:function(){this.stateChange!==YT.PlayerState.PAUSED&&this.stateChange!==YT.PlayerState.ENDED||(this.listeners.pause(),delete this.playStatus)},onStateChange:function(t){switch(t.data){case YT.PlayerState.PLAYING:this.hasPlayed=!0,this.onPlaying();break;case YT.PlayerState.PAUSED:case YT.PlayerState.ENDED:this.onPause()}this.stateChange=t.data},onError:function(t){this.listeners.error(t)},play:function(){var t=this;this.playStatus||(this.listeners.play(),this.playStatus=1),this.ready?!this.hasPlayed&&(this.clickToPlay||window.navigator&&/iP(hone|od|ad)/.test(window.navigator.platform))?this.onPlaying():this.player.playVideo():(this.playOnReady=!0,window.YT&&YT.Player?this.player||(this.player=new YT.Player(this.element,{videoId:this.videoId,playerVars:this.playerVars,events:{onReady:function(){t.onReady()},onStateChange:function(e){t.onStateChange(e)},onError:function(e){t.onError(e)}}})):this.loadAPI())},pause:function(){this.ready?this.player.pauseVideo():this.playStatus&&(delete this.playOnReady,this.listeners.pause(),delete this.playStatus)}}),t.extend(e.prototype,{YouTubePlayer:s,textFactory:function(t,e){var n=this.options,o=this.getItemProperty(t,n.youTubeVideoIdProperty);return o?(void 0===this.getItemProperty(t,n.urlProperty)&&(t[n.urlProperty]="//www.youtube.com/watch?v="+o),void 0===this.getItemProperty(t,n.videoPosterProperty)&&(t[n.videoPosterProperty]="//img.youtube.com/vi/"+o+"/maxresdefault.jpg"),this.videoFactory(t,e,new s(o,n.youTubePlayerVars,n.youTubeClickToPlay))):i.call(this,t,e)}}),e}),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./blueimp-gallery"],t):t(window.jQuery,window.blueimp.Gallery)}(function(t,e){"use strict";t(document).on("click","[data-gallery]",function(i){var s=t(this).data("gallery"),n=t(s),o=n.length&&n||t(e.prototype.options.container),a={onopen:function(){o.data("gallery",this).trigger("open")},onopened:function(){o.trigger("opened")},onslide:function(){o.trigger("slide",arguments)},onslideend:function(){o.trigger("slideend",arguments)},onslidecomplete:function(){o.trigger("slidecomplete",arguments)},onclose:function(){o.trigger("close")},onclosed:function(){o.trigger("closed").removeData("gallery")}},l=t.extend(o.data(),{container:o[0],index:this,event:i},a),r=t('[data-gallery="'+s+'"]');return l.filter&&(r=r.filter(l.filter)),new e(r,l)})}); |
| + | //# sourceMappingURL=jquery.blueimp-gallery.min.js.map |
| \ No newline at end of file | |
public/javascripts/blueimp/jquery.blueimp-gallery.min.js.map
+1
-0
| @@ | @@ -0,0 +1 @@ |
| + | {"version":3,"sources":["blueimp-gallery.js","blueimp-gallery-fullscreen.js","blueimp-gallery-indicator.js","blueimp-gallery-video.js","blueimp-gallery-vimeo.js","blueimp-gallery-youtube.js","jquery.blueimp-gallery.js"],"names":["factory","define","amd","window","blueimp","Gallery","helper","jQuery","$","list","options","undefined","document","body","style","maxHeight","this","prototype","length","num","initOptions","initialize","console","log","extend","container","slidesContainer","titleElement","displayClass","controlsClass","singleClass","leftEdgeClass","rightEdgeClass","playingClass","slideClass","slideLoadingClass","slideErrorClass","slideContentClass","toggleClass","prevClass","nextClass","closeClass","playPauseClass","typeProperty","titleProperty","urlProperty","srcsetProperty","displayTransition","clearSlides","stretchImages","toggleControlsOnReturn","toggleControlsOnSlideClick","toggleSlideshowOnSpace","enableKeyboardNavigation","closeOnEscape","closeOnSlideClick","closeOnSwipeUpOrDown","emulateTouchEvents","stopTouchEventsPropagation","hidePageScrollbars","disableScroll","carousel","continuous","unloadElements","startSlideshow","slideshowInterval","index","preloadRange","transitionSpeed","slideshowTransitionSpeed","event","onopen","onopened","onslide","onslideend","onslidecomplete","onclose","onclosed","carouselOptions","support","element","elementTests","prop","translateZ","transition","appendChild","name","slice","getComputedStyle","getPropertyValue","prefix","transform","translate","backgroundSize","contain","cover","removeChild","touch","ontouchstart","DocumentTouch","transitions","webkitTransition","end","MozTransition","OTransition","hasOwnProperty","on","createElement","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","cancelAnimationFrame","webkitCancelRequestAnimationFrame","webkitCancelAnimationFrame","mozCancelAnimationFrame","initStartIndex","initWidget","initEventListeners","ontransitionend","play","slide","to","speed","clearTimeout","timeout","direction","naturalDirection","diff","circle","Math","abs","positions","slideWidth","move","animate","getIndex","getNumber","prev","next","time","that","interval","elements","setTimeout","animationFrameId","call","addClass","pause","removeClass","add","i","concat","Array","addSlide","positionSlide","initSlides","resetSlides","empty","unloadAllSlides","slides","handleClose","destroyEventListeners","display","overflow","bodyOverflowStyle","close","closeHandler","target","off","dist","translateX","x","y","translateY","from","start","Date","getTime","timer","setInterval","timeElap","left","clearInterval","floor","preventDefault","returnValue","stopPropagation","cancelBubble","onresize","onmousedown","which","nodeName","originalEvent","touches","pageX","pageY","onmousemove","touchStart","ontouchmove","onmouseup","ontouchend","onmouseout","related","relatedTarget","contains","now","isScrolling","touchDelta","touchDeltaX","indices","scale","push","unshift","pop","indexForward","indexBackward","distanceForward","distanceBackward","isShortDuration","Number","isValidSlide","isPastBounds","isValidClose","slideHeight","ontouchcancel","oncomplete","srcElement","parent","parentNode","getNodeIndex","type","clientHeight","onload","onerror","onkeydown","keyCode","toggleControls","stopImmediatePropagation","toggleSlideshow","handleClick","isTarget","className","hasClass","onclick","updateEdgeClasses","handleSlide","loadElements","setTitle","firstChild","text","title","alt","createTextNode","func","args","wait","apply","imageFactory","obj","callback","callbackWrapper","called","img","background","url","imagePrototype","cloneNode","getItemProperty","elementPrototype","draggable","src","split","srcset","setAttribute","loadElement","proxyListener","limit","min","j","unloadSlide","slidePrototype","width","reload","children","offsetWidth","offsetHeight","len","parseInt","getAttribute","getNestedProperty","property","replace","str","singleQuoteProp","doubleQuoteProp","arrayIndex","dotProp","getDataProperty","key","dataset","_","b","toUpperCase","toLowerCase","test","parseJSON","ignore","handleOpen","openHandler","find","first","fullScreen","getFullScreenElement","fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement","requestFullScreen","requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen","exitFullScreen","exitFullscreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen","indicatorContainer","activeIndicatorClass","thumbnailProperty","thumbnailIndicators","createIndicator","thumbnailUrl","thumbnail","indicator","indicatorPrototype","getElementsByTagName","backgroundImage","addIndicator","indicators","setActiveIndicator","activeIndicator","videoContentClass","videoLoadingClass","videoPlayingClass","videoPosterProperty","videoSourcesProperty","playingVideo","videoFactory","videoInterface","posterImage","source","playMediaControl","isLoading","hasControls","videoContainerNode","videoContainer","errorArgs","video","posterUrl","sources","canPlayType","shift","poster","href","controls","seeking","postMessage","vimeoVideoIdProperty","vimeoPlayerUrl","vimeoPlayerIdPrefix","vimeoClickToPlay","textFactory","VimeoPlayer","videoId","playerId","clickToPlay","listeners","counter","loadAPI","playOnReady","scriptTag","apiUrl","scriptTags","insertBefore","readyState","onReady","ready","player","addEvent","hasPlayed","onPlaying","onPause","playStatus","playing","insertIframe","iframe","id","replaceChild","navigator","platform","api","$f","youTubeVideoIdProperty","youTubePlayerVars","wmode","youTubeClickToPlay","YouTubePlayer","playerVars","onYouTubeIframeAPIReady","checkSeek","stateChange","YT","PlayerState","PAUSED","ENDED","onStateChange","data","PLAYING","onError","error","playVideo","Player","events","pauseVideo","widget","callbacks","trigger","arguments","removeData","links","filter"],"mappings":"CAgBC,SAAWA,GACV,aACsB,mBAAXC,QAAyBA,OAAOC,IAEzCD,QAAQ,oBAAqBD,IAG7BG,OAAOC,QAAUD,OAAOC,YACxBD,OAAOC,QAAQC,QAAUL,EAAQG,OAAOC,QAAQE,QAAUH,OAAOI,SARpE,CAUE,SAAUC,GACX,aAEA,SAASH,EAASI,EAAMC,GACtB,YAAsCC,IAAlCC,SAASC,KAAKC,MAAMC,UAEf,KAEJC,MAAQA,KAAKN,UAAYL,EAAQY,UAAUP,aAK3CD,GAASA,EAAKS,QAOnBF,KAAKP,KAAOA,EACZO,KAAKG,IAAMV,EAAKS,OAChBF,KAAKI,YAAYV,GACjBM,KAAKK,cATHL,KAAKM,QAAQC,IACX,gEACAd,IALK,IAAIJ,EAAQI,EAAMC,GAy1C7B,OA10CAF,EAAEgB,OAAOnB,EAAQY,WACfP,SAEEe,UAAW,mBAEXC,gBAA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ByC,MAAOlD,KACPsD,MAAOA,GAEToW,GAGEI,EAAQta,EAAE,kBAAoBqY,EAAK,MAIvC,OAHInY,EAAQqa,SACVD,EAAQA,EAAMC,OAAOra,EAAQqa,SAExB,IAAI1a,EAAQya,EAAOpa"} |
| \ No newline at end of file | |
public/stylesheets/app.scss
+3
-3
| @@ | @@ -100,8 +100,8 @@ header { |
| font-family: $header-font-family; | |
| } | |
| - | .content { |
| - | background-color: $light-gray; |
| - | } |
| + | // .content { |
| + | // background-color: $light-gray; |
| + | // } |
| @import "featured_services"; | |
public/stylesheets/blueimp/blueimp-gallery-indicator.css
+97
-0
| @@ | @@ -0,0 +1,97 @@ |
| + | @charset "UTF-8"; |
| + | /* |
| + | * blueimp Gallery Indicator CSS |
| + | * https://github.com/blueimp/Gallery |
| + | * |
| + | * Copyright 2013, Sebastian Tschan |
| + | * https://blueimp.net |
| + | * |
| + | * Licensed under the MIT license: |
| + | * https://opensource.org/licenses/MIT |
| + | */ |
| + | |
| + | .blueimp-gallery > .indicator { |
| + | position: absolute; |
| + | top: auto; |
| + | right: 15px; |
| + | bottom: 15px; |
| + | left: 15px; |
| + | margin: 0 40px; |
| + | padding: 0; |
| + | list-style: none; |
| + | text-align: center; |
| + | line-height: 10px; |
| + | display: none; |
| + | } |
| + | .blueimp-gallery > .indicator > li { |
| + | display: inline-block; |
| + | width: 9px; |
| + | height: 9px; |
| + | margin: 6px 3px 0 3px; |
| + | -webkit-box-sizing: content-box; |
| + | -moz-box-sizing: content-box; |
| + | box-sizing: content-box; |
| + | border: 1px solid transparent; |
| + | background: #ccc; |
| + | background: rgba(255, 255, 255, 0.25) center no-repeat; |
| + | border-radius: 5px; |
| + | box-shadow: 0 0 2px #000; |
| + | opacity: 0.5; |
| + | cursor: pointer; |
| + | } |
| + | .blueimp-gallery > .indicator > li:hover, |
| + | .blueimp-gallery > .indicator > .active { |
| + | background-color: #fff; |
| + | border-color: #fff; |
| + | opacity: 1; |
| + | } |
| + | |
| + | |
| + | .blueimp-gallery > .indicator > li:after { |
| + | opacity: 0; |
| + | display: block; |
| + | position: absolute; |
| + | content: ''; |
| + | top: -5em; |
| + | width: 75px; |
| + | height: 75px; |
| + | transition: transform 600ms ease-out, opacity 400ms ease-out; |
| + | transform: translateX(-50%) translateY(0) translateZ(0px); |
| + | pointer-events:none; |
| + | } |
| + | |
| + | .blueimp-gallery > .indicator > li:hover:after { |
| + | opacity: 1; |
| + | border-radius: 50%; |
| + | background: inherit; |
| + | transform: translateX(-50%) translateY(-5px) translateZ(0px); |
| + | } |
| + | |
| + | .blueimp-gallery > .indicator > .active:after { |
| + | display: none; |
| + | } |
| + | |
| + | .blueimp-gallery-controls > .indicator { |
| + | display: block; |
| + | /* Fix z-index issues (controls behind slide element) on Android: */ |
| + | -webkit-transform: translateZ(0); |
| + | -moz-transform: translateZ(0); |
| + | -ms-transform: translateZ(0); |
| + | -o-transform: translateZ(0); |
| + | transform: translateZ(0); |
| + | } |
| + | .blueimp-gallery-single > .indicator { |
| + | display: none; |
| + | } |
| + | .blueimp-gallery > .indicator { |
| + | -webkit-user-select: none; |
| + | -khtml-user-select: none; |
| + | -moz-user-select: none; |
| + | -ms-user-select: none; |
| + | user-select: none; |
| + | } |
| + | |
| + | /* IE7 fixes */ |
| + | *+html .blueimp-gallery > .indicator > li { |
| + | display: inline; |
| + | } |
public/stylesheets/blueimp/blueimp-gallery-video.css
+87
-0
| @@ | @@ -0,0 +1,87 @@ |
| + | @charset "UTF-8"; |
| + | /* |
| + | * blueimp Gallery Video Factory CSS |
| + | * https://github.com/blueimp/Gallery |
| + | * |
| + | * Copyright 2013, Sebastian Tschan |
| + | * https://blueimp.net |
| + | * |
| + | * Licensed under the MIT license: |
| + | * https://opensource.org/licenses/MIT |
| + | */ |
| + | |
| + | .blueimp-gallery > .slides > .slide > .video-content > img { |
| + | position: absolute; |
| + | top: 0; |
| + | right: 0; |
| + | bottom: 0; |
| + | left: 0; |
| + | margin: auto; |
| + | width: auto; |
| + | height: auto; |
| + | max-width: 100%; |
| + | max-height: 100%; |
| + | /* Prevent artifacts in Mozilla Firefox: */ |
| + | -moz-backface-visibility: hidden; |
| + | } |
| + | .blueimp-gallery > .slides > .slide > .video-content > video { |
| + | position: absolute; |
| + | top: 0; |
| + | left: 0; |
| + | width: 100%; |
| + | height: 100%; |
| + | } |
| + | .blueimp-gallery > .slides > .slide > .video-content > iframe { |
| + | position: absolute; |
| + | top: 100%; |
| + | left: 0; |
| + | width: 100%; |
| + | height: 100%; |
| + | border: none; |
| + | } |
| + | .blueimp-gallery > .slides > .slide > .video-playing > iframe { |
| + | top: 0; |
| + | } |
| + | .blueimp-gallery > .slides > .slide > .video-content > a { |
| + | position: absolute; |
| + | top: 50%; |
| + | right: 0; |
| + | left: 0; |
| + | margin: -64px auto 0; |
| + | width: 128px; |
| + | height: 128px; |
| + | background: url(../img/video-play.png) center no-repeat; |
| + | opacity: 0.8; |
| + | cursor: pointer; |
| + | } |
| + | .blueimp-gallery > .slides > .slide > .video-content > a:hover { |
| + | opacity: 1; |
| + | } |
| + | .blueimp-gallery > .slides > .slide > .video-playing > a, |
| + | .blueimp-gallery > .slides > .slide > .video-playing > img { |
| + | display: none; |
| + | } |
| + | .blueimp-gallery > .slides > .slide > .video-content > video { |
| + | display: none; |
| + | } |
| + | .blueimp-gallery > .slides > .slide > .video-playing > video { |
| + | display: block; |
| + | } |
| + | .blueimp-gallery > .slides > .slide > .video-loading > a { |
| + | background: url(../img/loading.gif) center no-repeat; |
| + | background-size: 64px 64px; |
| + | } |
| + | |
| + | /* Replace PNGs with SVGs for capable browsers (excluding IE<9) */ |
| + | body:last-child .blueimp-gallery > .slides > .slide > .video-content:not(.video-loading) > a { |
| + | background-image: url(../img/video-play.svg); |
| + | } |
| + | |
| + | /* IE7 fixes */ |
| + | *+html .blueimp-gallery > .slides > .slide > .video-content { |
| + | height: 100%; |
| + | } |
| + | *+html .blueimp-gallery > .slides > .slide > .video-content > a { |
| + | left: 50%; |
| + | margin-left: -64px; |
| + | } |
public/stylesheets/blueimp/blueimp-gallery.css
+226
-0
| @@ | @@ -0,0 +1,226 @@ |
| + | @charset "UTF-8"; |
| + | /* |
| + | * blueimp Gallery CSS |
| + | * https://github.com/blueimp/Gallery |
| + | * |
| + | * Copyright 2013, Sebastian Tschan |
| + | * https://blueimp.net |
| + | * |
| + | * Licensed under the MIT license: |
| + | * https://opensource.org/licenses/MIT |
| + | */ |
| + | |
| + | .blueimp-gallery, |
| + | .blueimp-gallery > .slides > .slide > .slide-content { |
| + | position: absolute; |
| + | top: 0; |
| + | right: 0; |
| + | bottom: 0; |
| + | left: 0; |
| + | /* Prevent artifacts in Mozilla Firefox: */ |
| + | -moz-backface-visibility: hidden; |
| + | } |
| + | .blueimp-gallery > .slides > .slide > .slide-content { |
| + | margin: auto; |
| + | width: auto; |
| + | height: auto; |
| + | max-width: 100%; |
| + | max-height: 100%; |
| + | opacity: 1; |
| + | } |
| + | .blueimp-gallery { |
| + | position: fixed; |
| + | z-index: 999999; |
| + | overflow: hidden; |
| + | background: #000; |
| + | background: rgba(0, 0, 0, 0.9); |
| + | opacity: 0; |
| + | display: none; |
| + | direction: ltr; |
| + | -ms-touch-action: none; |
| + | touch-action: none; |
| + | } |
| + | .blueimp-gallery-carousel { |
| + | position: relative; |
| + | z-index: auto; |
| + | margin: 1em auto; |
| + | /* Set the carousel width/height ratio to 16/9: */ |
| + | padding-bottom: 56.25%; |
| + | box-shadow: 0 0 10px #000; |
| + | -ms-touch-action: pan-y; |
| + | touch-action: pan-y; |
| + | } |
| + | .blueimp-gallery-display { |
| + | display: block; |
| + | opacity: 1; |
| + | } |
| + | .blueimp-gallery > .slides { |
| + | position: relative; |
| + | height: 100%; |
| + | overflow: hidden; |
| + | } |
| + | .blueimp-gallery-carousel > .slides { |
| + | position: absolute; |
| + | } |
| + | .blueimp-gallery > .slides > .slide { |
| + | position: relative; |
| + | float: left; |
| + | height: 100%; |
| + | text-align: center; |
| + | -webkit-transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1.000); |
| + | -moz-transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1.000); |
| + | -ms-transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1.000); |
| + | -o-transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1.000); |
| + | transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1.000); |
| + | } |
| + | .blueimp-gallery, |
| + | .blueimp-gallery > .slides > .slide > .slide-content { |
| + | -webkit-transition: opacity 0.2s linear; |
| + | -moz-transition: opacity 0.2s linear; |
| + | -ms-transition: opacity 0.2s linear; |
| + | -o-transition: opacity 0.2s linear; |
| + | transition: opacity 0.2s linear; |
| + | } |
| + | .blueimp-gallery > .slides > .slide-loading { |
| + | background: url(../img/loading.gif) center no-repeat; |
| + | background-size: 64px 64px; |
| + | } |
| + | .blueimp-gallery > .slides > .slide-loading > .slide-content { |
| + | opacity: 0; |
| + | } |
| + | .blueimp-gallery > .slides > .slide-error { |
| + | background: url(../img/error.png) center no-repeat; |
| + | } |
| + | .blueimp-gallery > .slides > .slide-error > .slide-content { |
| + | display: none; |
| + | } |
| + | .blueimp-gallery > .prev, |
| + | .blueimp-gallery > .next { |
| + | position: absolute; |
| + | top: 50%; |
| + | left: 15px; |
| + | width: 40px; |
| + | height: 40px; |
| + | margin-top: -23px; |
| + | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; |
| + | font-size: 60px; |
| + | font-weight: 100; |
| + | line-height: 30px; |
| + | color: #fff; |
| + | text-decoration: none; |
| + | text-shadow: 0 0 2px #000; |
| + | text-align: center; |
| + | background: #222; |
| + | background: rgba(0, 0, 0, 0.5); |
| + | -webkit-box-sizing: content-box; |
| + | -moz-box-sizing: content-box; |
| + | box-sizing: content-box; |
| + | border: 3px solid #fff; |
| + | -webkit-border-radius: 23px; |
| + | -moz-border-radius: 23px; |
| + | border-radius: 23px; |
| + | opacity: 0.5; |
| + | cursor: pointer; |
| + | display: none; |
| + | } |
| + | .blueimp-gallery > .next { |
| + | left: auto; |
| + | right: 15px; |
| + | } |
| + | .blueimp-gallery > .close, |
| + | .blueimp-gallery > .title { |
| + | position: absolute; |
| + | top: 15px; |
| + | left: 15px; |
| + | margin: 0 40px 0 0; |
| + | font-size: 20px; |
| + | line-height: 30px; |
| + | color: #fff; |
| + | text-shadow: 0 0 2px #000; |
| + | opacity: 0.8; |
| + | display: none; |
| + | } |
| + | .blueimp-gallery > .close { |
| + | padding: 15px; |
| + | right: 15px; |
| + | left: auto; |
| + | margin: -15px; |
| + | font-size: 30px; |
| + | text-decoration: none; |
| + | cursor: pointer; |
| + | } |
| + | .blueimp-gallery > .play-pause { |
| + | position: absolute; |
| + | right: 15px; |
| + | bottom: 15px; |
| + | width: 15px; |
| + | height: 15px; |
| + | background: url(../img/play-pause.png) 0 0 no-repeat; |
| + | cursor: pointer; |
| + | opacity: 0.5; |
| + | display: none; |
| + | } |
| + | .blueimp-gallery-playing > .play-pause { |
| + | background-position: -15px 0; |
| + | } |
| + | .blueimp-gallery > .prev:hover, |
| + | .blueimp-gallery > .next:hover, |
| + | .blueimp-gallery > .close:hover, |
| + | .blueimp-gallery > .title:hover, |
| + | .blueimp-gallery > .play-pause:hover { |
| + | color: #fff; |
| + | opacity: 1; |
| + | } |
| + | .blueimp-gallery-controls > .prev, |
| + | .blueimp-gallery-controls > .next, |
| + | .blueimp-gallery-controls > .close, |
| + | .blueimp-gallery-controls > .title, |
| + | .blueimp-gallery-controls > .play-pause { |
| + | display: block; |
| + | /* Fix z-index issues (controls behind slide element) on Android: */ |
| + | -webkit-transform: translateZ(0); |
| + | -moz-transform: translateZ(0); |
| + | -ms-transform: translateZ(0); |
| + | -o-transform: translateZ(0); |
| + | transform: translateZ(0); |
| + | } |
| + | .blueimp-gallery-single > .prev, |
| + | .blueimp-gallery-left > .prev, |
| + | .blueimp-gallery-single > .next, |
| + | .blueimp-gallery-right > .next, |
| + | .blueimp-gallery-single > .play-pause { |
| + | display: none; |
| + | } |
| + | .blueimp-gallery > .slides > .slide > .slide-content, |
| + | .blueimp-gallery > .prev, |
| + | .blueimp-gallery > .next, |
| + | .blueimp-gallery > .close, |
| + | .blueimp-gallery > .play-pause { |
| + | -webkit-user-select: none; |
| + | -khtml-user-select: none; |
| + | -moz-user-select: none; |
| + | -ms-user-select: none; |
| + | user-select: none; |
| + | } |
| + | |
| + | /* Replace PNGs with SVGs for capable browsers (excluding IE<9) */ |
| + | body:last-child .blueimp-gallery > .slides > .slide-error { |
| + | background-image: url(../img/error.svg); |
| + | } |
| + | body:last-child .blueimp-gallery > .play-pause { |
| + | width: 20px; |
| + | height: 20px; |
| + | background-size: 40px 20px; |
| + | background-image: url(../img/play-pause.svg); |
| + | } |
| + | body:last-child .blueimp-gallery-playing > .play-pause { |
| + | background-position: -20px 0; |
| + | } |
| + | |
| + | /* IE7 fixes */ |
| + | *+html .blueimp-gallery > .slides > .slide { |
| + | min-height: 300px; |
| + | } |
| + | *+html .blueimp-gallery > .slides > .slide > .slide-content { |
| + | position: relative; |
| + | } |
public/stylesheets/blueimp/img/error.png
+0
-0
public/stylesheets/blueimp/img/error.svg
+5
-0
| @@ | @@ -0,0 +1,5 @@ |
| + | <?xml version="1.0" encoding="UTF-8"?> |
| + | <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="64" height="64"> |
| + | <circle cx="32" cy="32" r="25" stroke="red" stroke-width="7" fill="black" fill-opacity="0.2"/> |
| + | <rect x="28" y="7" width="8" height="50" fill="red" transform="rotate(45, 32, 32)"/> |
| + | </svg> |
public/stylesheets/blueimp/img/loading.gif
+0
-0
public/stylesheets/blueimp/img/play-pause.png
+0
-0
public/stylesheets/blueimp/img/play-pause.svg
+6
-0
| @@ | @@ -0,0 +1,6 @@ |
| + | <?xml version="1.0" encoding="UTF-8"?> |
| + | <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="30" height="15"> |
| + | <polygon points="2,1 2,14 13,7" stroke="black" stroke-width="1" fill="white"/> |
| + | <rect x="17" y="2" width="4" height="11" stroke="black" stroke-width="1" fill="white"/> |
| + | <rect x="24" y="2" width="4" height="11" stroke="black" stroke-width="1" fill="white"/> |
| + | </svg> |
public/stylesheets/blueimp/img/video-play.png
+0
-0
public/stylesheets/blueimp/img/video-play.svg
+5
-0
| @@ | @@ -0,0 +1,5 @@ |
| + | <?xml version="1.0" encoding="UTF-8"?> |
| + | <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="64" height="64"> |
| + | <circle cx="32" cy="32" r="25" stroke="white" stroke-width="7" fill="black" fill-opacity="0.2"/> |
| + | <polygon points="26,22 26,42 43,32" fill="white"/> |
| + | </svg> |