forked from hiway/freedive
Add filters
This commit is contained in:
parent
a05f289b5e
commit
09213f5294
2 changed files with 8 additions and 6 deletions
|
@ -3,11 +3,9 @@ defmodule FreediveWeb.ServiceLive do
|
||||||
|
|
||||||
def render(assigns) do
|
def render(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
<.block class="px-2 py-4">
|
|
||||||
<.page name="Services" filters={@filters}>
|
<.page name="Services" filters={@filters}>
|
||||||
<FreediveWeb.ServiceLive.Item.items_block items={@items} />
|
<FreediveWeb.ServiceLive.Item.items_block items={@items} />
|
||||||
</.page>
|
</.page>
|
||||||
</.block>
|
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -78,7 +76,7 @@ defmodule FreediveWeb.ServiceLive.Item do
|
||||||
import Liliform.Icon
|
import Liliform.Icon
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
Returns a list of items.
|
Returns items as panel-blocks.
|
||||||
"""
|
"""
|
||||||
attr :items, :list, default: [], doc: "items"
|
attr :items, :list, default: [], doc: "items"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
defmodule Liliform.Page do
|
defmodule Liliform.Page do
|
||||||
use Liliform.Component
|
use Liliform.Component
|
||||||
|
import Liliform.Block
|
||||||
import Liliform.Icon
|
import Liliform.Icon
|
||||||
import Liliform.Panel
|
import Liliform.Panel
|
||||||
import Liliform.Control
|
import Liliform.Control
|
||||||
|
@ -21,6 +22,8 @@ defmodule Liliform.Page do
|
||||||
|> set_bulma_classes()
|
|> set_bulma_classes()
|
||||||
|
|
||||||
~H"""
|
~H"""
|
||||||
|
<.block class="px-2 py-4">
|
||||||
|
|
||||||
<.panel class={@class} {@rest} is-info>
|
<.panel class={@class} {@rest} is-info>
|
||||||
<.panel_heading>
|
<.panel_heading>
|
||||||
<%= @name %>
|
<%= @name %>
|
||||||
|
@ -66,6 +69,7 @@ defmodule Liliform.Page do
|
||||||
</.panel_block>
|
</.panel_block>
|
||||||
<%= render_slot(@inner_block) %>
|
<%= render_slot(@inner_block) %>
|
||||||
</.panel>
|
</.panel>
|
||||||
|
</.block>
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue