mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 14:57: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
|
= for slice <- Enum.chunk_every(@data, 10) do
|
||||||
div
|
div
|
||||||
= for map <- slice do
|
= for map <- slice do
|
||||||
- [{header, tag_name}] = Enum.to_list(map)
|
- [header, tag_name] = Enum.to_list(map)
|
||||||
|
|
||||||
= header
|
= header
|
||||||
' .
|
' .
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
= for {heading, maps} <- @data do
|
= for [heading, maps] <- @data do
|
||||||
div
|
div
|
||||||
strong = heading
|
strong = heading
|
||||||
br
|
br
|
||||||
|
|
||||||
= for {name, alias_name} <- maps do
|
= for [name, alias_name] <- maps do
|
||||||
=> name
|
=> name
|
||||||
' -
|
' -
|
||||||
= tag_link @tags[alias_name], alias_name
|
= tag_link @tags[alias_name], alias_name
|
||||||
|
|
|
@ -115,14 +115,15 @@ defmodule PhilomenaWeb.TagView do
|
||||||
end
|
end
|
||||||
|
|
||||||
defp names_in_tab("season", data) do
|
defp names_in_tab("season", data) do
|
||||||
data
|
Enum.map(data, fn [_number, name] -> name end)
|
||||||
|> Enum.flat_map(&Map.values/1)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
defp names_in_tab("shorthand", data) do
|
defp names_in_tab("shorthand", data) do
|
||||||
data
|
data
|
||||||
|> Map.values()
|
|> Enum.map(fn [_title, tags] -> tags end)
|
||||||
|> Enum.flat_map(&Map.values/1)
|
|> IO.inspect(label: "after map")
|
||||||
|
|> Enum.flat_map(&Enum.map(&1, fn [_shorthand, tag] -> tag end))
|
||||||
|
|> IO.inspect(label: "after flatmap")
|
||||||
end
|
end
|
||||||
|
|
||||||
defp names_in_tab(_mode, _data), do: []
|
defp names_in_tab(_mode, _data), do: []
|
||||||
|
|
Loading…
Reference in a new issue