Skip to content

Commit 990a4f6

Browse files
authored
Run mix format (#17)
2 parents 4b31fed + 3926c21 commit 990a4f6

File tree

8 files changed

+47
-37
lines changed

8 files changed

+47
-37
lines changed

lib/bloom/components/avatar.ex

+2-6
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,8 @@ defmodule Bloom.Components.Avatar do
4949
"https://api.dicebear.com/8.x/#{assigns[:style]}/svg?seed=#{assigns[:name]}"
5050

5151
~H"""
52-
<div class={["flex items-center w-12 h-12", @class]} {@rest}>
53-
<img
54-
src={image}
55-
alt={"#{@name} avatar"}
56-
class="rounded-lg"
57-
/>
52+
<div class={["flex h-12 w-12 items-center", @class]} {@rest}>
53+
<img src={image} alt={"#{@name} avatar"} class="rounded-lg" />
5854
</div>
5955
"""
6056
end

lib/bloom/components/bento_grid.ex

+10-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ defmodule Bloom.Components.BentoGrid do
1414

1515
def bento_grid(assigns) do
1616
~H"""
17-
<div class={["flex flex-col md:grid w-full md:auto-rows-[16rem] !grid-cols-1 md:grid-cols-3 gap-4", @class]}>
17+
<div class={[
18+
"!grid-cols-1 flex w-full flex-col gap-4 md:auto-rows-[16rem] md:grid md:grid-cols-3",
19+
@class
20+
]}>
1821
<%= render_slot(@inner_block) %>
1922
</div>
2023
"""
@@ -37,20 +40,22 @@ defmodule Bloom.Components.BentoGrid do
3740
def bento_card(assigns) do
3841
~H"""
3942
<div class={[
40-
"group relative row-span-#{@row_end - @row_start} col-span-#{@col_end - @col_start} row-start-#{@row_start} row-end-#{@row_end} col-start--#{@col_start} col-end-#{@col_end} flex flex-col justify-between overflow-hidden rounded-xl bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)]
41-
transform-gpu dark:bg-zinc-900 dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset]",
43+
"row-span-#{@row_end - @row_start} col-span-#{@col_end - @col_start} row-start-#{@row_start} row-end-#{@row_end} col-start--#{@col_start} col-end-#{@col_end} group relative flex transform-gpu flex-col justify-between overflow-hidden rounded-xl bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)] dark:bg-zinc-900 dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset]",
4244
@class
4345
]}>
4446
<div><%= render_slot(@background) %></div>
4547
<div class="pointer-events-none z-10 flex transform-gpu flex-col gap-1 p-6 transition-all duration-300 group-hover:-translate-y-10">
46-
<span class={["h-12 w-12 origin-left transform-gpu text-neutral-700 transition-all duration-300 ease-in-out group-hover:scale-75", @icon]} />
48+
<span class={[
49+
"h-12 w-12 origin-left transform-gpu text-neutral-700 transition-all duration-300 ease-in-out group-hover:scale-75",
50+
@icon
51+
]} />
4752
<h3 class="text-xl font-semibold text-neutral-700 dark:text-neutral-300"><%= @name %></h3>
4853
<p class="max-w-lg text-neutral-400"><%= @description %></p>
4954
</div>
5055
<div class="absolute bottom-0 flex w-full translate-y-10 transform-gpu flex-row items-center p-4 opacity-0 transition-all duration-300 group-hover:translate-y-0 group-hover:opacity-100">
5156
<%= render_slot(@inner_block) %>
5257
</div>
53-
<div class="pointer-events-none absolute inset-0 transform-gpu transition-all duration-300 group-hover:bg-black/[.03] group-hover:dark:bg-neutral-800/10">
58+
<div class="pointer-events-none absolute inset-0 transform-gpu transition-all duration-300 group-hover:bg-black/[.03] dark:group-hover:bg-neutral-800/10">
5459
</div>
5560
</div>
5661
"""

lib/bloom/components/card.ex

+9-6
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ defmodule Bloom.Components.Card do
1515

1616
def card(assigns) do
1717
~H"""
18-
<figure class={[
19-
"relative w-64 cursor-pointer overflow-hidden rounded-xl border transition-all p-4",
20-
"border-gray-200 bg-neutral-50-50 hover:bg-neutral-100 text-zinc-500",
21-
"dark:border-gray-50 dark:bg-gray-50 dark:hover:bg-gray-50",
22-
@class
23-
]} {@rest}>
18+
<figure
19+
class={[
20+
"relative w-64 cursor-pointer overflow-hidden rounded-xl border p-4 transition-all",
21+
"bg-neutral-50-50 border-gray-200 text-zinc-500 hover:bg-neutral-100",
22+
"dark:border-gray-50 dark:bg-gray-50 dark:hover:bg-gray-50",
23+
@class
24+
]}
25+
{@rest}
26+
>
2427
<div class="flex flex-row items-center gap-2">
2528
<img :if={assigns[:image]} class="rounded-full" width="32" height="32" alt="" src={@image} />
2629
<div class="flex flex-col">

lib/bloom/components/code_snippet.ex

+6-7
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,15 @@ defmodule Bloom.Components.CodeSnippet do
2020
~H"""
2121
<div
2222
class={[
23-
"w-fit min-w-[18rem] rounded-xl bg-#{@background_color} py-5 text-#{@text_color}",
23+
"bg-#{@background_color} text-#{@text_color} min-w-[18rem] w-fit rounded-xl py-5",
2424
@parent_class
25-
]} {@rest}>
26-
<div class="mb-4 block h-3 w-3 rounded-full opacity-30 shadow-[1.4em_0,2.8em_0,4.2em_0]"></div>
25+
]}
26+
{@rest}
27+
>
28+
<div class="shadow-[1.4em_0,2.8em_0,4.2em_0] mb-4 block h-3 w-3 rounded-full opacity-30"></div>
2729
<pre
2830
before={@delimiter}
29-
class={[
30-
"whitespace-normal px-8 mt-6 before:opacity-50 before:content-[attr(before)]",
31-
@class
32-
]}
31+
class={["mt-6 whitespace-normal px-8 before:content-[attr(before)] before:opacity-50", @class]}
3332
>
3433
<%= render_slot(@inner_block) %>
3534
</pre>

lib/bloom/components/glow_button.ex

+8-7
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,15 @@ defmodule Bloom.Components.GlowButton do
3535

3636
def glow_button(assigns) do
3737
~H"""
38-
<div class={["w-fit relative", @parent_class]} {@rest}>
39-
<div class={"group-hover:opacity-100 animate-tilt transition duration-1000 group-hover:duration-200 absolute blur-lg opacity-75 -inset-0.5 group-hover:-inset-1 bg-gradient-to-r from-#{@from_color} to-#{@to_color} rounded-lg"}></div>
40-
<button class={["relative px-7 py-4 bg-black rounded-lg leading-none", @class]}>
41-
<span class={"text-#{@text_color} font-medium group-hover:text-#{@from_color} transition-all duration-200"}>
42-
<%= render_slot(@inner_block) %>
43-
</span>
44-
</button>
38+
<div class={["relative w-fit", @parent_class]} {@rest}>
39+
<div class={"from-#{@from_color} to-#{@to_color} animate-tilt absolute -inset-0.5 rounded-lg bg-gradient-to-r opacity-75 blur-lg transition duration-1000 group-hover:-inset-1 group-hover:opacity-100 group-hover:duration-200"}>
4540
</div>
41+
<button class={["relative rounded-lg bg-black px-7 py-4 leading-none", @class]}>
42+
<span class={"text-#{@text_color} font-medium transition-all duration-200 group-hover:text-#{@from_color}"}>
43+
<%= render_slot(@inner_block) %>
44+
</span>
45+
</button>
46+
</div>
4647
"""
4748
end
4849
end

lib/bloom/components/gradient_text.ex

+7-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ defmodule Bloom.Components.GradientText do
1515

1616
def gradient_text(assigns) do
1717
~H"""
18-
<span class={["bg-gradient-to-r bg-clip-text text-transparent from-#{@from_color} to-#{@to_color}", @class]} {@rest}>
18+
<span
19+
class={[
20+
"from-#{@from_color} to-#{@to_color} bg-gradient-to-r bg-clip-text text-transparent",
21+
@class
22+
]}
23+
{@rest}
24+
>
1925
<%= render_slot(@inner_block) %>
2026
</span>
2127
"""

lib/bloom/components/hero.ex

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ defmodule Bloom.Components.Hero do
1313
def hero(assigns) do
1414
~H"""
1515
<div class={["container mx-auto px-4 py-8", @class]}>
16-
<div class="text-8xl text-center font-bold text-pretty">
16+
<div class="text-pretty text-center text-8xl font-bold">
1717
<h1><%= render_slot(@inner_block) %></h1>
1818
</div>
19-
<div class="mt-6 text-center text-2xl flex justify-center font-medium text-pretty">
19+
<div class="text-pretty mt-6 flex justify-center text-center text-2xl font-medium">
2020
<%= render_slot(@subtitle) %>
2121
</div>
22-
<div class="mt-14 flex justify-center flex-row gap-4 items-center">
22+
<div class="mt-14 flex flex-row items-center justify-center gap-4">
2323
<%= render_slot(@actions) %>
2424
</div>
2525
</div>

lib/bloom/components/marquee.ex

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ defmodule Bloom.Components.Marquee do
5757
<div
5858
class={[
5959
"flex shrink-0 justify-around [gap:var(--gap)]",
60-
@vertical && "flex-col animate-marquee-vertical",
61-
!@vertical && "flex-row animate-marquee",
60+
@vertical && "animate-marquee-vertical flex-col",
61+
!@vertical && "animate-marquee flex-row",
6262
@pause_on_hover && "group-hover:[animation-play-state:paused]"
6363
]}
6464
style={@reverse && "animation-direction: reverse;"}

0 commit comments

Comments
 (0)