-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIndexLink.fusion
33 lines (32 loc) · 1.46 KB
/
IndexLink.fusion
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
prototype(Garagist.Mautic:Backend.Block.IndexLink) < prototype(Neos.Fusion:Component) {
count = null
title = null
class = 'text-sm'
show = ${this.count ? null : 'showPagesWithoutEmails'}
renderer = afx`
<div
x-show={props.show}
x-transition={!!props.show}
style={props.show ? "display:none" : null}
class={Tailwind.merge(props.class, "relative rounded bg-neos-gray-medium shadow-sm flex items-center hover:bg-neos-gray-darker focus-within:bg-neos-gray-darker")}
>
<div class={Tailwind.merge(props.count ? "bg-green-800" : "bg-red-800", "leading-none flex-shrink-0 h-16 w-16 rounded-l flex flex-col items-center justify-center")}>
<span class="text-lg">{props.count}</span>
<span class="text-xs">
{Translation.translate('emails.count', null, [], 'Module', 'Garagist.Mautic', props.count)}
</span>
</div>
<div class="flex-1 min-w-0 px-3">
<Neos.Fusion:Link.Action
class="focus:outline-none font-medium text-slate-200"
href.action="node"
href.controller="Backend"
href.arguments.node={props.node}
>
<span class="absolute inset-0" aria-hidden="true"></span>
{props.title}
</Neos.Fusion:Link.Action>
</div>
</div>
`
}