Skip to content

Commit

Permalink
release page, section header
Browse files Browse the repository at this point in the history
  • Loading branch information
michelson committed Nov 9, 2024
1 parent 8f268c3 commit 9ca681e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
13 changes: 10 additions & 3 deletions app/views/albums/templates/_base.erb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
<section class="container- mx-auto- px-8- mt-12- border-t-4 border-gray-300 ">
<div class="grid grid-cols-1 md:grid-cols-2 gap-8-">
<!-- Left: Image -->
<div class="relative border-r-4 border-gray-300">
<!-- <div class="relative border-r-4 border-gray-300">
<div class="bodyPlane p-4">
<div class="mockup sm:w-[600px] sm:h-[600px]">
Expand All @@ -135,12 +135,19 @@
<% end %>
</div>
<div class="cover">
<!-- no -->
</div>
</div>
</div>
</div>
-->

<% @release.release_sections.filter{|o| o.tag == "header" }.each do |section| %>
<%= render "albums/templates/base/slide", items: section.release_section_images do |section_image| %>
<%= image_tag section_image.image %>
<% end %>
<% end %>


<!-- Right: Text and Squares Layout -->
Expand Down Expand Up @@ -211,7 +218,7 @@


<!-- Section 01: -->
<% @release.release_sections.order(:position).each do |section| %>
<% @release.release_sections.order(:position).filter{|o| o.tag != "header" }.each do |section| %>
<%= render "albums/templates/base/section_#{section.tag.present? ? section.tag : 'left'}", section: section %>
<% end %>

Expand Down
1 change: 1 addition & 0 deletions app/views/albums/templates/base/_section_header.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hellosso
6 changes: 3 additions & 3 deletions app/views/albums/templates/base/_slide.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="theme-zinc w-full" style="--radius: 0.5rem;">
<div class="preview flex min-h-[350px] w-full justify-center p-10 items-center">
<div class="preview flex min-h-[350px] w-full justify-center items-center">
<div class="relative w-full max-w-xs-" role="region" aria-roledescription="carousel"
data-controller="slide"
data-slide-auto-play-value="true"
Expand All @@ -20,7 +20,7 @@
<% end %>
</div>
</div>
<button type="button" class="inline-flex items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-subtle border-input bg-background hover:bg-accent hover:text-accent-foreground absolute h-8 w-8 rounded-full -left-12 top-1/2 -translate-y-1/2"
<button type="button" class="z-50 inline-flex items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-subtle border-input bg-background hover:bg-accent hover:text-accent-foreground absolute h-8 w-8 rounded-full left-[0.5em] top-1/2 -translate-y-1/2"
data-slide-target="previousButton"
data-action="click->slide#previous">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-left h-4 w-4">
Expand All @@ -29,7 +29,7 @@
</svg>
<span class="sr-only">Previous slide</span>
</button>
<button type="button" class="inline-flex items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-subtle border-input bg-background hover:bg-accent hover:text-accent-foreground absolute h-8 w-8 rounded-full -right-12 top-1/2 -translate-y-1/2"
<button type="button" class="z-50 inline-flex items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-subtle border-input bg-background hover:bg-accent hover:text-accent-foreground absolute h-8 w-8 rounded-full right-[1em] top-1/2 -translate-y-1/2"
data-slide-target="nextButton"
data-action="click->slide#next">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right h-4 w-4">
Expand Down

0 comments on commit 9ca681e

Please sign in to comment.