Skip to content

Commit 7ae4ee9

Browse files
committed
mix format #139 (comment)
1 parent 6fad765 commit 7ae4ee9

File tree

4 files changed

+33
-33
lines changed

4 files changed

+33
-33
lines changed

lib/app_web/components/core_components.ex

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ defmodule AppWeb.CoreComponents do
7878
</button>
7979
</div>
8080
<div id={"#{@id}-content"}>
81-
<%= render_slot(@inner_block) %>
81+
{render_slot(@inner_block)}
8282
</div>
8383
</.focus_wrap>
8484
</div>
@@ -123,9 +123,9 @@ defmodule AppWeb.CoreComponents do
123123
<p :if={@title} class="flex items-center gap-1.5 text-sm font-semibold leading-6">
124124
<.icon :if={@kind == :info} name="hero-information-circle-mini" class="h-4 w-4" />
125125
<.icon :if={@kind == :error} name="hero-exclamation-circle-mini" class="h-4 w-4" />
126-
<%= @title %>
126+
{@title}
127127
</p>
128-
<p class="mt-2 text-sm leading-5"><%= msg %></p>
128+
<p class="mt-2 text-sm leading-5">{msg}</p>
129129
<button type="button" class="group absolute top-1 right-1 p-2" aria-label="close">
130130
<.icon name="hero-x-mark-solid" class="h-5 w-5 opacity-40 group-hover:opacity-70" />
131131
</button>
@@ -201,9 +201,9 @@ defmodule AppWeb.CoreComponents do
201201
~H"""
202202
<.form :let={f} for={@for} as={@as} {@rest}>
203203
<div class="mt-10 space-y-8 bg-white">
204-
<%= render_slot(@inner_block, f) %>
204+
{render_slot(@inner_block, f)}
205205
<div :for={action <- @actions} class="mt-2 flex items-center justify-between gap-6">
206-
<%= render_slot(action, f) %>
206+
{render_slot(action, f)}
207207
</div>
208208
</div>
209209
</.form>
@@ -235,7 +235,7 @@ defmodule AppWeb.CoreComponents do
235235
]}
236236
{@rest}
237237
>
238-
<%= render_slot(@inner_block) %>
238+
{render_slot(@inner_block)}
239239
</button>
240240
"""
241241
end
@@ -318,36 +318,36 @@ defmodule AppWeb.CoreComponents do
318318
class="rounded border-zinc-300 text-zinc-900 focus:ring-0"
319319
{@rest}
320320
/>
321-
<%= @label %>
321+
{@label}
322322
</label>
323-
<.error :for={msg <- @errors}><%= msg %></.error>
323+
<.error :for={msg <- @errors}>{msg}</.error>
324324
</div>
325325
"""
326326
end
327327

328328
def input(%{type: "select"} = assigns) do
329329
~H"""
330330
<div phx-feedback-for={@name}>
331-
<.label for={@id}><%= @label %></.label>
331+
<.label for={@id}>{@label}</.label>
332332
<select
333333
id={@id}
334334
name={@name}
335335
class="mt-2 block w-full rounded-md border border-gray-300 bg-white shadow-sm focus:border-zinc-400 focus:ring-0 sm:text-sm"
336336
multiple={@multiple}
337337
{@rest}
338338
>
339-
<option :if={@prompt} value=""><%= @prompt %></option>
340-
<%= Phoenix.HTML.Form.options_for_select(@options, @value) %>
339+
<option :if={@prompt} value="">{@prompt}</option>
340+
{Phoenix.HTML.Form.options_for_select(@options, @value)}
341341
</select>
342-
<.error :for={msg <- @errors}><%= msg %></.error>
342+
<.error :for={msg <- @errors}>{msg}</.error>
343343
</div>
344344
"""
345345
end
346346

347347
def input(%{type: "textarea"} = assigns) do
348348
~H"""
349349
<div phx-feedback-for={@name}>
350-
<.label for={@id}><%= @label %></.label>
350+
<.label for={@id}>{@label}</.label>
351351
<textarea
352352
id={@id}
353353
name={@name}
@@ -359,7 +359,7 @@ defmodule AppWeb.CoreComponents do
359359
]}
360360
{@rest}
361361
><%= Phoenix.HTML.Form.normalize_value("textarea", @value) %></textarea>
362-
<.error :for={msg <- @errors}><%= msg %></.error>
362+
<.error :for={msg <- @errors}>{msg}</.error>
363363
</div>
364364
"""
365365
end
@@ -368,7 +368,7 @@ defmodule AppWeb.CoreComponents do
368368
def input(assigns) do
369369
~H"""
370370
<div phx-feedback-for={@name}>
371-
<.label for={@id}><%= @label %></.label>
371+
<.label for={@id}>{@label}</.label>
372372
<input
373373
type={@type}
374374
name={@name}
@@ -382,7 +382,7 @@ defmodule AppWeb.CoreComponents do
382382
]}
383383
{@rest}
384384
/>
385-
<.error :for={msg <- @errors}><%= msg %></.error>
385+
<.error :for={msg <- @errors}>{msg}</.error>
386386
</div>
387387
"""
388388
end
@@ -396,7 +396,7 @@ defmodule AppWeb.CoreComponents do
396396
def label(assigns) do
397397
~H"""
398398
<label for={@for} class="block text-sm font-semibold leading-6 text-zinc-800">
399-
<%= render_slot(@inner_block) %>
399+
{render_slot(@inner_block)}
400400
</label>
401401
"""
402402
end
@@ -410,7 +410,7 @@ defmodule AppWeb.CoreComponents do
410410
~H"""
411411
<p class="mt-3 flex gap-3 text-sm leading-6 text-rose-600 phx-no-feedback:hidden">
412412
<.icon name="hero-exclamation-circle-mini" class="mt-0.5 h-5 w-5 flex-none" />
413-
<%= render_slot(@inner_block) %>
413+
{render_slot(@inner_block)}
414414
</p>
415415
"""
416416
end
@@ -429,13 +429,13 @@ defmodule AppWeb.CoreComponents do
429429
<header class={[@actions != [] && "flex items-center justify-between gap-6", @class]}>
430430
<div>
431431
<h1 class="text-lg font-semibold leading-8 text-zinc-800">
432-
<%= render_slot(@inner_block) %>
432+
{render_slot(@inner_block)}
433433
</h1>
434434
<p :if={@subtitle != []} class="mt-2 text-sm leading-6 text-zinc-600">
435-
<%= render_slot(@subtitle) %>
435+
{render_slot(@subtitle)}
436436
</p>
437437
</div>
438-
<div class="flex-none"><%= render_slot(@actions) %></div>
438+
<div class="flex-none">{render_slot(@actions)}</div>
439439
</header>
440440
"""
441441
end
@@ -476,7 +476,7 @@ defmodule AppWeb.CoreComponents do
476476
<table class="w-[40rem] mt-11 sm:w-full">
477477
<thead class="text-sm text-left leading-6 text-zinc-500">
478478
<tr>
479-
<th :for={col <- @col} class="p-0 pb-4 pr-6 font-normal"><%= col[:label] %></th>
479+
<th :for={col <- @col} class="p-0 pb-4 pr-6 font-normal">{col[:label]}</th>
480480
<th :if={@action != []} class="relative p-0 pb-4">
481481
<span class="sr-only">Actions</span>
482482
</th>
@@ -496,7 +496,7 @@ defmodule AppWeb.CoreComponents do
496496
<div class="block py-4 pr-6">
497497
<span class="absolute -inset-y-px right-0 -left-4 group-hover:bg-zinc-50 sm:rounded-l-xl" />
498498
<span class={["relative", i == 0 && "font-semibold text-zinc-900"]}>
499-
<%= render_slot(col, @row_item.(row)) %>
499+
{render_slot(col, @row_item.(row))}
500500
</span>
501501
</div>
502502
</td>
@@ -507,7 +507,7 @@ defmodule AppWeb.CoreComponents do
507507
:for={action <- @action}
508508
class="relative ml-4 font-semibold leading-6 text-zinc-900 hover:text-zinc-700"
509509
>
510-
<%= render_slot(action, @row_item.(row)) %>
510+
{render_slot(action, @row_item.(row))}
511511
</span>
512512
</div>
513513
</td>
@@ -537,8 +537,8 @@ defmodule AppWeb.CoreComponents do
537537
<div class="mt-14">
538538
<dl class="-my-4 divide-y divide-zinc-100">
539539
<div :for={item <- @item} class="flex gap-4 py-4 text-sm leading-6 sm:gap-8">
540-
<dt class="w-1/4 flex-none text-zinc-500"><%= item.title %></dt>
541-
<dd class="text-zinc-700"><%= render_slot(item) %></dd>
540+
<dt class="w-1/4 flex-none text-zinc-500">{item.title}</dt>
541+
<dd class="text-zinc-700">{render_slot(item)}</dd>
542542
</div>
543543
</dl>
544544
</div>
@@ -563,7 +563,7 @@ defmodule AppWeb.CoreComponents do
563563
class="text-sm font-semibold leading-6 text-zinc-900 hover:text-zinc-700"
564564
>
565565
<.icon name="hero-arrow-left-solid" class="h-3 w-3" />
566-
<%= render_slot(@inner_block) %>
566+
{render_slot(@inner_block)}
567567
</.link>
568568
</div>
569569
"""

lib/app_web/components/layouts/app.html.heex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<img src={~p"/images/logo.svg"} width="36" />
66
</a>
77
<p class="bg-brand/5 text-brand rounded-full px-2 font-medium leading-6">
8-
v<%= Application.spec(:phoenix, :vsn) %>
8+
v{Application.spec(:phoenix, :vsn)}
99
</p>
1010
</div>
1111
<div class="flex items-center gap-4 font-semibold leading-6 text-zinc-900">
@@ -27,6 +27,6 @@
2727
<main class="px-4 py-20 sm:px-6 lg:px-8">
2828
<div class="mx-auto max-w-2xl">
2929
<.flash_group flash={@flash} />
30-
<%= @inner_content %>
30+
{@inner_content}
3131
</div>
3232
</main>

lib/app_web/components/layouts/root.html.heex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1" />
66
<meta name="csrf-token" content={get_csrf_token()} />
77
<.live_title suffix=" · Phoenix Framework">
8-
<%= assigns[:page_title] || "App" %>
8+
{assigns[:page_title] || "App"}
99
</.live_title>
1010
<link phx-track-static rel="stylesheet" href={~p"/assets/app.css"} />
1111
<script defer phx-track-static type="text/javascript" src={~p"/assets/app.js"}>
1212
</script>
1313
</head>
1414
<body class="bg-white antialiased">
15-
<%= @inner_content %>
15+
{@inner_content}
1616
</body>
1717
</html>

lib/app_web/controllers/github_auth_html/welcome.html.heex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
</script>
33
<section class="flex flex-col items-center justify-center px-6 py-8 mx-auto md:h-screen lg:py-0">
44
<h1 class="text-4xl text-center font-bold leading-tight tracking-tight text-gray-900 md:text-2xl">
5-
Welcome <%= @profile.name %>!
5+
Welcome {@profile.name}!
66
<img
77
class="float-right h-8 w-8 rounded-full"
88
alt="avatar image"
@@ -11,5 +11,5 @@
1111
/>
1212
</h1>
1313
<p>You are <strong>signed in</strong> with your <strong>GitHub Account</strong> <br />
14-
<strong style="color:teal;"><%= @profile.email %></strong></p>
14+
<strong style="color:teal;">{@profile.email}</strong></p>
1515
</section>

0 commit comments

Comments
 (0)