Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/hex/ex_aws_s3-2.5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
JannikStreek authored Dec 17, 2024
2 parents b0aa71b + 0e57636 commit ab9cc98
Show file tree
Hide file tree
Showing 19 changed files with 137 additions and 137 deletions.
66 changes: 33 additions & 33 deletions lib/mindwendel_web/components/core_components.ex
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ defmodule MindwendelWeb.CoreComponents do
phx-key="escape"
>
<div class="modal-header">
<h5 class="modal-title"><%= @title %></h5>
<h5 class="modal-title">{@title}</h5>
<button
phx-click={JS.exec("data-cancel", to: "##{@id}")}
type="button"
Expand All @@ -72,7 +72,7 @@ defmodule MindwendelWeb.CoreComponents do
/>
</div>
<div id={"#{@id}-content"} class="modal-body">
<%= render_slot(@inner_block) %>
{render_slot(@inner_block)}
</div>
</.focus_wrap>
</div>
Expand Down Expand Up @@ -120,9 +120,9 @@ defmodule MindwendelWeb.CoreComponents do
<p :if={@title} class="flex items-center gap-1.5 text-sm font-semibold leading-6">
<.icon :if={@kind == :info} name="hero-information-circle-mini" class="h-4 w-4" />
<.icon :if={@kind == :error} name="hero-exclamation-circle-mini" class="h-4 w-4" />
<%= @title %>
{@title}
</p>
<p class="mt-2 text-sm leading-5"><%= msg %></p>
<p class="mt-2 text-sm leading-5">{msg}</p>
<button type="button" class="group absolute top-1 right-1 p-2" aria-label={gettext("close")}>
<.icon name="hero-x-mark-solid" class="h-5 w-5 opacity-40 group-hover:opacity-70" />
</button>
Expand Down Expand Up @@ -153,7 +153,7 @@ defmodule MindwendelWeb.CoreComponents do
phx-connected={hide("#client-error")}
hidden
>
<%= gettext("Attempting to reconnect") %>
{gettext("Attempting to reconnect")}
<.icon name="hero-arrow-path" class="ml-1 h-3 w-3 animate-spin" />
</.flash>
Expand All @@ -165,7 +165,7 @@ defmodule MindwendelWeb.CoreComponents do
phx-connected={hide("#server-error")}
hidden
>
<%= gettext("Hang in there while we get back on track") %>
{gettext("Hang in there while we get back on track")}
<.icon name="hero-arrow-path" class="ml-1 h-3 w-3 animate-spin" />
</.flash>
</div>
Expand Down Expand Up @@ -198,9 +198,9 @@ defmodule MindwendelWeb.CoreComponents do
def simple_form(assigns) do
~H"""
<.form :let={f} for={@for} as={@as} {@rest}>
<%= render_slot(@inner_block, f) %>
{render_slot(@inner_block, f)}
<div :for={action <- @actions} class="mt-2">
<%= render_slot(action, f) %>
{render_slot(action, f)}
</div>
</.form>
"""
Expand Down Expand Up @@ -231,7 +231,7 @@ defmodule MindwendelWeb.CoreComponents do
]}
{@rest}
>
<%= render_slot(@inner_block) %>
{render_slot(@inner_block)}
</button>
"""
end
Expand Down Expand Up @@ -329,22 +329,22 @@ defmodule MindwendelWeb.CoreComponents do
class="form-check-input"
{@rest}
/>
<%= @label %>
{@label}
</label>
<.error :for={msg <- @errors}><%= msg %></.error>
<.error :for={msg <- @errors}>{msg}</.error>
</div>
"""
end

def input(%{type: "select"} = assigns) do
~H"""
<div class="form-group">
<.label for={@id}><%= @label %></.label>
<.label for={@id}>{@label}</.label>
<select id={@id} name={@name} class="form-control" , multiple={@multiple} {@rest}>
<option :if={@prompt} value=""><%= @prompt %></option>
<%= Phoenix.HTML.Form.options_for_select(@options, @value) %>
<option :if={@prompt} value="">{@prompt}</option>
{Phoenix.HTML.Form.options_for_select(@options, @value)}
</select>
<.error :for={msg <- @errors}><%= msg %></.error>
<.error :for={msg <- @errors}>{msg}</.error>
</div>
"""
end
Expand Down Expand Up @@ -378,7 +378,7 @@ defmodule MindwendelWeb.CoreComponents do
def input(%{type: "textarea"} = assigns) do
~H"""
<div class="form-group">
<.label for={@id}><%= @label %></.label>
<.label for={@id}>{@label}</.label>
<textarea
id={@id}
name={@name}
Expand All @@ -388,7 +388,7 @@ defmodule MindwendelWeb.CoreComponents do
]}
{@rest}
><%= Phoenix.HTML.Form.normalize_value("textarea", @value) %></textarea>
<.error :for={msg <- @errors}><%= msg %></.error>
<.error :for={msg <- @errors}>{msg}</.error>
</div>
"""
end
Expand All @@ -413,7 +413,7 @@ defmodule MindwendelWeb.CoreComponents do
def input(assigns) do
~H"""
<div class="form-group">
<.label for={@id}><%= @label %></.label>
<.label for={@id}>{@label}</.label>
<input
type={@type}
name={@name}
Expand All @@ -425,7 +425,7 @@ defmodule MindwendelWeb.CoreComponents do
]}
{@rest}
/>
<.error :for={msg <- @errors}><%= msg %></.error>
<.error :for={msg <- @errors}>{msg}</.error>
</div>
"""
end
Expand All @@ -444,7 +444,7 @@ defmodule MindwendelWeb.CoreComponents do
def label(assigns) do
~H"""
<label for={@for}>
<%= render_slot(@inner_block) %>
{render_slot(@inner_block)}
</label>
"""
end
Expand All @@ -457,7 +457,7 @@ defmodule MindwendelWeb.CoreComponents do
def error(assigns) do
~H"""
<div class="invalid-feedback">
<%= render_slot(@inner_block) %>
{render_slot(@inner_block)}
</div>
"""
end
Expand All @@ -476,13 +476,13 @@ defmodule MindwendelWeb.CoreComponents do
<header class={[@actions != [] && "flex items-center justify-between gap-6", @class]}>
<div>
<h1 class="text-lg font-semibold leading-8 text-zinc-800">
<%= render_slot(@inner_block) %>
{render_slot(@inner_block)}
</h1>
<p :if={@subtitle != []} class="mt-2 text-sm leading-6 text-zinc-600">
<%= render_slot(@subtitle) %>
{render_slot(@subtitle)}
</p>
</div>
<div class="flex-none"><%= render_slot(@actions) %></div>
<div class="flex-none">{render_slot(@actions)}</div>
</header>
"""
end
Expand Down Expand Up @@ -523,9 +523,9 @@ defmodule MindwendelWeb.CoreComponents do
<table class="w-[40rem] mt-11 sm:w-full">
<thead class="text-sm text-left leading-6 text-zinc-500">
<tr>
<th :for={col <- @col} class="p-0 pb-4 pr-6 font-normal"><%= col[:label] %></th>
<th :for={col <- @col} class="p-0 pb-4 pr-6 font-normal">{col[:label]}</th>
<th :if={@action != []} class="relative p-0 pb-4">
<span class="sr-only"><%= gettext("Actions") %></span>
<span class="sr-only">{gettext("Actions")}</span>
</th>
</tr>
</thead>
Expand All @@ -543,7 +543,7 @@ defmodule MindwendelWeb.CoreComponents do
<div class="block py-4 pr-6">
<span class="absolute -inset-y-px right-0 -left-4 group-hover:bg-zinc-50 sm:rounded-l-xl" />
<span class={["relative", i == 0 && "font-semibold text-zinc-900"]}>
<%= render_slot(col, @row_item.(row)) %>
{render_slot(col, @row_item.(row))}
</span>
</div>
</td>
Expand All @@ -554,7 +554,7 @@ defmodule MindwendelWeb.CoreComponents do
:for={action <- @action}
class="relative ml-4 font-semibold leading-6 text-zinc-900 hover:text-zinc-700"
>
<%= render_slot(action, @row_item.(row)) %>
{render_slot(action, @row_item.(row))}
</span>
</div>
</td>
Expand Down Expand Up @@ -584,8 +584,8 @@ defmodule MindwendelWeb.CoreComponents do
<div class="mt-14">
<dl class="-my-4 divide-y divide-zinc-100">
<div :for={item <- @item} class="flex gap-4 py-4 text-sm leading-6 sm:gap-8">
<dt class="w-1/4 flex-none text-zinc-500"><%= item.title %></dt>
<dd class="text-zinc-700"><%= render_slot(item) %></dd>
<dt class="w-1/4 flex-none text-zinc-500">{item.title}</dt>
<dd class="text-zinc-700">{render_slot(item)}</dd>
</div>
</dl>
</div>
Expand All @@ -607,7 +607,7 @@ defmodule MindwendelWeb.CoreComponents do
<div class="mt-16">
<.link navigate={@navigate}>
<i class="bi bi-arrow-left"></i>
<%= render_slot(@inner_block) %>
{render_slot(@inner_block)}
</.link>
</div>
"""
Expand Down Expand Up @@ -731,7 +731,7 @@ defmodule MindwendelWeb.CoreComponents do
@lane_count > 3 && "col-12 col-md-3",
@class
]}>
<%= render_slot(@inner_block) %>
{render_slot(@inner_block)}
</div>
"""
end
Expand Down Expand Up @@ -768,7 +768,7 @@ defmodule MindwendelWeb.CoreComponents do
phx-value-id={@label_id}
{@rest}
>
<%= render_slot(@inner_block) %>
{render_slot(@inner_block)}
</button>
</div>
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%= for idea <- @ideas do %>
<%= idea.body %><br />
<%= gettext("By") %> <%= Gettext.gettext(MindwendelWeb.Gettext, idea.username) %>, <%= Likes.count_likes_for_idea(
{idea.body}<br />
{gettext("By")} {Gettext.gettext(MindwendelWeb.Gettext, idea.username)}, {Likes.count_likes_for_idea(
idea
) %> likes <br /><br />
)} likes <br /><br />
<% end %>
26 changes: 13 additions & 13 deletions lib/mindwendel_web/controllers/static_page_html/home.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

<main class="container">
<h1>
<%= gettext("Create a challenge.") %><br />
<%= gettext("Ready?") %><br />
<%= gettext("Brainstorm") %><br />
{gettext("Create a challenge.")}<br />
{gettext("Ready?")}<br />
{gettext("Brainstorm")}<br />
</h1>

<div class="row">
Expand All @@ -29,40 +29,40 @@
required
/>
<.button type="submit" class="btn btn-primary fw-bold">
<%= gettext("Create!") %>
{gettext("Create!")}
</.button>
</div>
</.simple_form>
<small class="text-light">
<%= gettext("Brainstormings will be deleted after %{days} days.",
{gettext("Brainstormings will be deleted after %{days} days.",
days:
Application.fetch_env!(:mindwendel, :options)[
:feature_brainstorming_removal_after_days
]
) %>
)}
</small>
</div>
</div>

<%= if @current_user && !Enum.empty?(@current_user.brainstormings) do %>
<div class="row mt-5">
<div class="col-md-12 col-lg-12 mt-2">
<h3><%= gettext("Your latest brainstormings") %></h3>
<h3>{gettext("Your latest brainstormings")}</h3>
<%= for brainstorming <- list_brainstormings_for(@current_user) do %>
<h5>
<.link href={~p"/brainstormings/#{brainstorming.id}"}>
<%= brainstorming.name %>
{brainstorming.name}
</.link>
<span class="badge rounded-pill bg-light text-dark">
<%= Timex.format!(brainstorming.inserted_at, "{relative}", :relative) %>
{Timex.format!(brainstorming.inserted_at, "{relative}", :relative)}
</span>
</h5>
<% end %>
<p>
<%= gettext(
{gettext(
"Attention: Brainstormings will be deleted %{available_until} after last access!",
available_until: brainstormings_available_until()
) %>
)}
</p>
</div>
</div>
Expand All @@ -72,8 +72,8 @@
<span class="me-2">Made with ❤️ in the 🇪🇺</span>
<%= if Mindwendel.FeatureFlag.enabled?(:feature_privacy_imprint_enabled) do %>
<br class="d-md-none" />
<.link href={~p"/legal"}><%= gettext("Legal Disclosure") %></.link>
| <.link href={~p"/privacy"}><%= gettext("Privacy") %></.link>
<.link href={~p"/legal"}>{gettext("Legal Disclosure")}</.link>
| <.link href={~p"/privacy"}>{gettext("Privacy")}</.link>
<% end %>
</footer>
</div>
Loading

0 comments on commit ab9cc98

Please sign in to comment.