philomena/lib/philomena_web/templates/image/index.html.slime

47 lines
1.7 KiB
Text
Raw Permalink Normal View History

2019-11-30 03:33:15 +01:00
elixir:
header = assigns[:header] || ""
params = assigns[:params] || assigns[:scope] || []
scope = assigns[:scope] || []
2019-12-05 22:57:59 +01:00
tags = assigns[:tags] || []
route = assigns[:route] || fn p -> ~p"/images?#{p}" end
image_url = fn image -> ~p"/images/#{image}?#{scope}" end
sorted_url = fn image, hit -> ~p"/images/#{image}?#{Keyword.put(scope, :sort, hit["sort"])}" end
2019-11-30 03:33:15 +01:00
pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @images, route: route, params: params
info = render PhilomenaWeb.PaginationView, "_pagination_info.html", page: @images
2019-10-09 01:19:57 +02:00
2019-08-18 18:17:05 +02:00
.block#imagelist-container
2020-12-11 17:53:40 +01:00
section.block__header.page__header.flex
span.block__header__title.page__title.hide-mobile
2019-10-09 01:19:57 +02:00
=> header
2019-12-16 23:11:16 +01:00
2020-12-11 17:53:40 +01:00
.page__pagination = pagination
2019-10-09 01:19:57 +02:00
.flex__right.page__info
2019-12-26 23:43:32 +01:00
= random_button @conn, params
= hidden_toggle @conn, route, params
= deleted_toggle @conn, route, params
2019-12-16 23:11:16 +01:00
= quick_tag @conn
2019-12-05 22:57:59 +01:00
= info_row @conn, tags
2019-08-18 18:17:05 +02:00
.block__content.js-resizable-media-container
= for record <- @images do
= case record do
- {image, hit} ->
= render PhilomenaWeb.ImageView, "_image_box.html", image: image, link: sorted_url.(image, hit), size: assigns[:size] || :thumb, conn: @conn
- image ->
= render PhilomenaWeb.ImageView, "_image_box.html", image: image, link: image_url.(image), size: assigns[:size] || :thumb, conn: @conn
2019-10-09 01:19:57 +02:00
2020-12-11 17:53:40 +01:00
.block__header.block__header--light.page__header.flex
.page__pagination = pagination
2019-10-09 01:19:57 +02:00
2020-12-11 17:53:40 +01:00
span.block__header__title.page__info
2019-10-09 01:19:57 +02:00
= info
2020-12-11 17:53:40 +01:00
.flex__right.page__options
2019-10-09 01:19:57 +02:00
a href="/settings/edit" title="Display Settings"
i.fa.fa-cog
span.hide-mobile.hide-limited-desktop<>
2019-12-12 16:54:41 +01:00
' Display Settings