mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 05:37:59 +01:00
unscrew quick tags (fixes philomena-dev/philomena#51)
This commit is contained in:
parent
d96b45f32e
commit
49547108a3
4 changed files with 292 additions and 705 deletions
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,7 @@
|
|||
= for slice <- Enum.chunk_every(@data, 10) do
|
||||
div
|
||||
= for map <- slice do
|
||||
- [{header, tag_name}] = Enum.to_list(map)
|
||||
- [header, tag_name] = Enum.to_list(map)
|
||||
|
||||
= header
|
||||
' .
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
= for {heading, maps} <- @data do
|
||||
= for [heading, maps] <- @data do
|
||||
div
|
||||
strong = heading
|
||||
br
|
||||
|
||||
= for {name, alias_name} <- maps do
|
||||
= for [name, alias_name] <- maps do
|
||||
=> name
|
||||
' -
|
||||
= tag_link @tags[alias_name], alias_name
|
||||
|
|
|
@ -115,14 +115,15 @@ defmodule PhilomenaWeb.TagView do
|
|||
end
|
||||
|
||||
defp names_in_tab("season", data) do
|
||||
data
|
||||
|> Enum.flat_map(&Map.values/1)
|
||||
Enum.map(data, fn [_number, name] -> name end)
|
||||
end
|
||||
|
||||
defp names_in_tab("shorthand", data) do
|
||||
data
|
||||
|> Map.values()
|
||||
|> Enum.flat_map(&Map.values/1)
|
||||
|> Enum.map(fn [_title, tags] -> tags end)
|
||||
|> IO.inspect(label: "after map")
|
||||
|> Enum.flat_map(&Enum.map(&1, fn [_shorthand, tag] -> tag end))
|
||||
|> IO.inspect(label: "after flatmap")
|
||||
end
|
||||
|
||||
defp names_in_tab(_mode, _data), do: []
|
||||
|
|
Loading…
Reference in a new issue