From 40e5c8dc8202945f0d2b6c17a457c6e2fb123032 Mon Sep 17 00:00:00 2001 From: nwittstruck Date: Wed, 10 Apr 2024 15:25:41 +0200 Subject: [PATCH] design: improve mobile layout #284 --- .../live/brainstorming_live/show.html.heex | 63 +++++++++---------- 1 file changed, 30 insertions(+), 33 deletions(-) diff --git a/lib/mindwendel_web/live/brainstorming_live/show.html.heex b/lib/mindwendel_web/live/brainstorming_live/show.html.heex index 08d887ea..43c51707 100644 --- a/lib/mindwendel_web/live/brainstorming_live/show.html.heex +++ b/lib/mindwendel_web/live/brainstorming_live/show.html.heex @@ -20,41 +20,38 @@

<%= @brainstorming.name %>

-
-
- <%= live_patch(gettext("New Idea"), - to: Routes.brainstorming_show_path(@socket, :new_idea, @brainstorming), - class: "btn btn-primary m-1", - title: gettext("New idea page (Hotkey: i)") - ) %> - <%= link to: "#", class: "btn btn-primary m-1", phx_click: "sort_by_likes", phx_value_id: @brainstorming.id, title: gettext("Sort by likes") do %> - <%= gettext("Sort by likes") %> - <% end %> - <%= link to: "#", class: "btn btn-primary m-1", phx_click: "sort_by_label", phx_value_id: @brainstorming.id, title: gettext("Sort by label") do %> - <%= gettext("Sort by label") %> - <% end %> -
-
- <%= live_patch to: Routes.brainstorming_show_path(@socket, :share, @brainstorming), class: "btn btn-secondary m-1", title: gettext("Share") do %> - <%= gettext("Share") %> - <% end %> +
+
+ <%= live_patch(gettext("New Idea"), + to: Routes.brainstorming_show_path(@socket, :new_idea, @brainstorming), + class: "btn btn-primary m-1 d-none d-md-block", + title: gettext("New idea page (Hotkey: i)") + ) %> + <%= link to: "#", class: "btn btn-primary m-1", phx_click: "sort_by_likes", phx_value_id: @brainstorming.id, title: gettext("Sort by likes") do %> + <%= gettext("Likes") %> + <% end %> + <%= link to: "#", class: "btn btn-primary m-1", phx_click: "sort_by_label", phx_value_id: @brainstorming.id, title: gettext("Sort by label") do %> + <%= gettext("Label") %> + <% end %> + + <%= live_patch to: Routes.brainstorming_show_path(@socket, :share, @brainstorming), class: "btn btn-secondary m-1", title: gettext("Share") do %> + + <% end %> - <%= if @brainstorming.option_show_link_to_settings do %> - <%= link to: Routes.admin_brainstorming_edit_path(@socket, :edit, @brainstorming.admin_url_id), class: "btn btn-secondary m-1" do %> - - <% end %> - <% end %> + <%= if @brainstorming.option_show_link_to_settings do %> + <%= link to: Routes.admin_brainstorming_edit_path(@socket, :edit, @brainstorming.admin_url_id), class: "btn btn-secondary m-1" do %> + + <% end %> + <% end %> -
- <%= brainstorming_available_until(@brainstorming) %> -
-
+
+ <%= brainstorming_available_until(@brainstorming) %>