Skip to content

Instantly share code, notes, and snippets.

@cfc1020
Last active May 13, 2020 09:34
Show Gist options
  • Save cfc1020/ab77915cc3faca03597b to your computer and use it in GitHub Desktop.
Save cfc1020/ab77915cc3faca03597b to your computer and use it in GitHub Desktop.
_gallery.html.haml
#galleryModal.modal.fade{"aria-hidden" => "true", "aria-labelledby" => "myModalLabel", role: "dialog", tabindex: "-1"}
.modal-dialog
.modal-content
.modal-header
%button.close{"aria-label" => "Close", "data-dismiss" => "modal", type: "button"}
%span{"aria-hidden" => "true"} ×
%h4#galleryModalLabel.modal-title Modal title
.modal-body
#galleries.carousel.slide{"data-ride" => "carousel"}
.carousel-inner{role: "listbox"}
.item.active
= image_tag 'large-photo.png'
- 1.upto(50) do |i|
.item
= image_tag 'large-photo.png'
%a.left.carousel-control{"data-slide" => "prev", href: "#galleries", role: "button"}
%span.glyphicon.glyphicon-chevron-left{"aria-hidden" => "true"}
%span.sr-only Previous
%a.right.carousel-control{"data-slide" => "next", href: "#galleries", role: "button"}
%span.glyphicon.glyphicon-chevron-right{"aria-hidden" => "true"}
%span.sr-only Next
%ol.carousel-indicators
%li.active{"data-slide-to" => "0", "data-target" => "#galleries"}= image_tag 'small-photo.png'
- 1.upto(50) do |i|
%li{"data-slide-to" => i.to_s, "data-target" => "#galleries"}= image_tag 'small-photo.png'
.modal-footer
%button.btn.btn-default{"data-dismiss" => "modal", type: "button"} Close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment