Refactor auction views

master
E. Almqvist 3 years ago
parent 1f2461ef5a
commit 0e8b4b61a2
  1. 8
      src/views/auction/view.slim
  2. 33
      src/views/stylesheets/style.sass

@ -1,14 +1,16 @@
.content-container#auction-view-container
#auction-view #auction-view
- if auction.images.length >= 1 - if auction.images.length >= 1
.slideshow-container .slideshow-container
- auction.images.each do |image| - auction.images.each do |image|
.slide-container .slide-container
img src="#{image.url}"
.numbertext .numbertext
a.prev onclick="nextSlide(-1)" = "<"
| #{image.image_order+1}/#{auction.images.length} | #{image.image_order+1}/#{auction.images.length}
a.next onclick="nextSlide(1)" = ">"
img src="#{image.url}"
.next-container
a.prev onclick="nextSlide(-1)" = "<"
a.next onclick="nextSlide(1)" = ">"
.slideshow-button-container .slideshow-button-container
- auction.images.each do |image| - auction.images.each do |image|

@ -445,10 +445,13 @@ ul.list-container
display: flex display: flex
flex-direction: column flex-direction: column
#auction-view-container
margin-top: 1rem
justify-content: unset
#auction-view #auction-view
display: grid display: grid
grid-template-columns: 1fr 2fr grid-template-columns: 1fr 1fr
grid-template-rows: 1fr 1fr grid-template-rows: 1fr 1fr
grid-template-areas: "im in" "de in" grid-template-areas: "im in" "de in"
@ -460,38 +463,40 @@ ul.list-container
.slideshow-container .slideshow-container
grid-area: im grid-area: im
width: 40rem
margin: auto margin: auto
.slide-container .slide-container
padding: 1rem padding: 1rem
padding-top: 0
.numbertext .numbertext
text-align: center text-align: center
img img
margin: 0 auto margin: 0 auto
width: 100%
height: 500px height: 500px
width: auto
max-width: 500px
object-fit: cover object-fit: cover
border: 4px solid $shadow_clr
.next-container
display: flex
align-items: center
justify-content: center
.prev, .next .prev, .next
cursor: pointer cursor: pointer
position: absolute position: relative
top: 50%
width: auto width: auto
padding: 1px 16px padding: 1px 16px
margin-top: -22px margin: 0 2rem
margin-top: -55px
color: $fg_clr color: $fg_clr
font-weight: bold font-weight: bold
font-size: 18px font-size: 1.2rem
transition: 0.6s ease transition: 0.6s ease
border-radius: 0 3px 3px 0
user-select: none user-select: none
border-radius: $border_radius
.next
right: 0
border-radius: 3px 0 0 3px
.prev:hover, .next:hover .prev:hover, .next:hover
background-color: #0022 color: $bg_clr
background-color: #0002
// Animation keyframes // Animation keyframes
@keyframes fade-in @keyframes fade-in

Loading…
Cancel
Save