mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-10-08 20:46:16 +08:00
Fix import button disappear in small screens (#1643)
This commit is contained in:
parent
81ab8082ec
commit
18735928c9
2 changed files with 16 additions and 9 deletions
|
@ -43,10 +43,15 @@ defmodule LivebookWeb.HomeLive do
|
||||||
saved_hubs={@saved_hubs}
|
saved_hubs={@saved_hubs}
|
||||||
>
|
>
|
||||||
<:topbar_action>
|
<:topbar_action>
|
||||||
<a aria-label="new-notebook" class="flex items-center cursor-pointer" phx-click="new">
|
<div class="flex space-x-2">
|
||||||
<.remix_icon icon="add-line" />
|
<%= live_patch("Import",
|
||||||
<span class="pl-2">New notebook</span>
|
to: Routes.home_path(@socket, :import, "url"),
|
||||||
</a>
|
class: "button-base button-outlined-gray whitespace-nowrap"
|
||||||
|
) %>
|
||||||
|
<button class="button-base button-blue" phx-click="new">
|
||||||
|
New notebook
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</:topbar_action>
|
</:topbar_action>
|
||||||
<.update_notification version={@new_version} instructions_url={@update_instructions_url} />
|
<.update_notification version={@new_version} instructions_url={@update_instructions_url} />
|
||||||
<.memory_notification memory={@memory} app_service_url={@app_service_url} />
|
<.memory_notification memory={@memory} app_service_url={@app_service_url} />
|
||||||
|
|
|
@ -40,12 +40,14 @@ defmodule LivebookWeb.LayoutHelpers do
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-gray-400 hover:text-gray-600 focus:text-gray-600">
|
<div>
|
||||||
<%= if @topbar_action == [] do %>
|
<%= if @topbar_action == [] do %>
|
||||||
|
<div class="text-gray-400 hover:text-gray-600 focus:text-gray-600">
|
||||||
<%= live_redirect to: Routes.home_path(@socket, :page), class: "flex items-center", aria: [label: "go to home"] do %>
|
<%= live_redirect to: Routes.home_path(@socket, :page), class: "flex items-center", aria: [label: "go to home"] do %>
|
||||||
<.remix_icon icon="home-6-line" />
|
<.remix_icon icon="home-6-line" />
|
||||||
<span class="pl-2">Home</span>
|
<span class="pl-2">Home</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= render_slot(@topbar_action) %>
|
<%= render_slot(@topbar_action) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Add table
Reference in a new issue