fix templates

This commit is contained in:
byte[] 2019-12-08 10:14:19 -05:00
parent f8aa0a68df
commit ecd0a91025
4 changed files with 10 additions and 7 deletions

View file

@ -30,11 +30,11 @@
= for topic <- @topics do
= render PhilomenaWeb.ActivityView, "_topic_strip.html", topic: topic, conn: @conn
.block.hide-mobile
a.block__header--single-item.center href="/lists/recent_comments"
a.block__header--single-item.center href="/comments"
' Recent Comments
= for comment <- @comments do
= render PhilomenaWeb.ActivityView, "_comment_strip.html", comment: comment, conn: @conn
a.block__header--single-item.center href="/search?q=first_seen_at.gt:3 days ago&sf=comments&sd=desc"
a.block__header--single-item.center href="/search?q=first_seen_at.gt:3 days ago&sf=comment_count&sd=desc"
' Most Commented-on Images
.column-layout__main

View file

@ -14,13 +14,10 @@ nav#burger
a href="/filters"
i.fa.fa-fw.fa-filter<>
' Filters
a href="/lists"
i.fa.fa-fw.fa-list<>
' Rankings
a href="/galleries"
i.fa.fa-fw.fa-image<>
' Galleries
a href="/lists/recent_comments"
a href="/comments"
i.fa.fa-fw.fa-comments<>
' Comments
a href="/commissions"

View file

@ -56,7 +56,7 @@
.toggle-box-container
.toggle-box-container__content
= for tag <- @tag.implied_by_tags do
= map_join @tag.implied_by_tags, ", ", fn tag ->
=> link tag.name, to: Routes.tag_path(@conn, :show, tag)
br

View file

@ -65,6 +65,12 @@ defmodule PhilomenaWeb.AppView do
Canada.Can.can?(conn.assigns.current_user, action, model)
end
def map_join(enumerable, joiner, map_fn) do
enumerable
|> Enum.map(map_fn)
|> Enum.intersperse(joiner)
end
def number_with_delimiter(nil), do: "0"
def number_with_delimiter(number) do
number