mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-16 18:04:45 +08:00
* Introduce file system abstraction and an S3 implementation * Support arbitrary absolute paths and delegate resolution to file system * Remove accidental notebook file * Apply suggestions from code review Co-authored-by: José Valim <jose.valim@dashbit.co> * Apply review comments * Add missing path assertions * Apply review comments * Fix test saving notebook in project root Co-authored-by: José Valim <jose.valim@dashbit.co>
28 lines
722 B
Elixir
28 lines
722 B
Elixir
defmodule LivebookWeb.PageHelpers do
|
|
use Phoenix.Component
|
|
|
|
import LivebookWeb.Helpers
|
|
|
|
alias LivebookWeb.Router.Helpers, as: Routes
|
|
|
|
@doc """
|
|
Renders page title.
|
|
|
|
## Examples
|
|
|
|
<.user_avatar user={@user} class="h-20 w-20" text_class="text-3xl" />
|
|
"""
|
|
def title(assigns) do
|
|
~H"""
|
|
<div class="relative">
|
|
<%= live_patch to: Routes.home_path(@socket, :page),
|
|
class: "hidden md:block absolute top-[50%] left-[-12px] transform -translate-y-1/2 -translate-x-full" do %>
|
|
<.remix_icon icon="arrow-left-line" class="text-2xl align-middle" />
|
|
<% end %>
|
|
<h1 class="text-3xl text-gray-800 font-semibold">
|
|
<%= @text %>
|
|
</h1>
|
|
</div>
|
|
"""
|
|
end
|
|
end
|