Skip to content

Commit

Permalink
Merge pull request #1882 from MushroomObserver/nimmo-carousel-heading
Browse files Browse the repository at this point in the history
Move image carousel "Images" heading/controls to the top of the carousel
  • Loading branch information
nimmolo committed Feb 6, 2024
2 parents b4343fb + 86bd6e5 commit 7ff0d43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/mo/_carousel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
}

.carousel-heading {
border-top: 1px solid $panel-inner-border;
// border-top: 1px solid $panel-inner-border;
border-bottom: 1px solid $panel-inner-border;
background-color: $panel-default-heading-bg;
}
Expand Down
4 changes: 2 additions & 2 deletions app/helpers/carousel_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ def carousel_html(**args)
def carousel_basic_html(**args)
tag.div(class: "carousel slide", id: args[:html_id],
data: { ride: "false", interval: "false" }) do
concat(carousel_heading(args[:title], args[:links])) if args[:thumbnails]
concat(tag.div(class: "carousel-inner bg-light", role: "listbox") do
args[:images].each do |image|
concat(carousel_item(image, **args))
end
concat(carousel_controls(args[:html_id])) if args[:images].length > 1
end)
concat(carousel_heading(args[:title], args[:links])) if args[:thumbnails]
concat(carousel_thumbnails(**args)) if args[:thumbnails]
end
end
Expand Down Expand Up @@ -116,7 +116,7 @@ def carousel_heading(title, links = "")
end

def carousel_thumbnails(**args)
tag.ol(class: "carousel-indicators bg-light mt-2 mb-0") do
tag.ol(class: "carousel-indicators panel-footer py-2 px-0 mb-0") do
args[:images].each_with_index do |image, index|
active = image == args[:top_img] ? "active" : ""

Expand Down

0 comments on commit 7ff0d43

Please sign in to comment.