Added images to calendar

This commit is contained in:
Eduard Urbach 2017-12-03 18:52:34 +01:00
parent 96b1e2d6d2
commit e1277fa734
2 changed files with 8 additions and 0 deletions

View File

@ -8,6 +8,8 @@ component Calendar(days []*utils.CalendarDay, user *arn.User)
.calendar-entries .calendar-entries
each entry in day.Entries each entry in day.Entries
div(data-mountable-type=day.Name, class=entry.Class) div(data-mountable-type=day.Name, class=entry.Class)
a.ajax(href=entry.Anime.Link())
img.calendar-entry-image.lazy(data-src=entry.Anime.Image("large"), data-webp="true", alt=entry.Anime.Title.ByUser(user))
a.ajax(href=entry.Anime.Link()) a.ajax(href=entry.Anime.Link())
.calendar-entry-title= entry.Anime.Title.ByUser(user) .calendar-entry-title= entry.Anime.Title.ByUser(user)
.calendar-entry-info .calendar-entry-info

View File

@ -23,6 +23,11 @@
margin-bottom 0.5rem margin-bottom 0.5rem
overflow hidden overflow hidden
.calendar-entry-image
width 100%
height 4rem
object-fit cover
.calendar-entry-personal .calendar-entry-personal
border 2px solid main-color border 2px solid main-color
@ -34,6 +39,7 @@
.calendar-entry-title .calendar-entry-title
clip-long-text clip-long-text
margin-top 0.4rem
.calendar-entry-time .calendar-entry-time
opacity 0.85 opacity 0.85