Files
fizzy/app/views/buckets/new.html.erb
T
2025-03-29 17:22:51 +01:00

26 lines
1.1 KiB
Plaintext

<% @page_title = "Create a new bucket" %>
<% content_for :header do %>
<nav>
<%= link_to root_path, class: "btn flex-item-justify-start", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %>
<%= icon_tag "arrow-left" %>
<span class="for-screen-reader">Go back</span>
<% end %>
</nav>
<% end %>
<div class="panel shadow center" style="--panel-size: 55ch; view-transition-name: new-bucket">
<%= form_with model: @bucket, class: "flex flex-column gap txt-large", data: { controller: "form" } do |form| %>
<h2 class="txt-x-large">Create a new collection</h2>
<label class="flex align-center gap">
<%= form.text_field :name, required: true, class: "input full-width", autofocus: true, placeholder: "Give it a name…", data: { action: "keydown.esc@document->form#cancel" } %>
</label>
<button type="submit" id="log_in" class="btn btn--reversed center">
<%= icon_tag "check" %>
<span class="for-screen-reader">Save</span>
</button>
<%= link_to "Cancel and go back", root_path, data: { form_target: "cancel", turbo_frame: "_top" }, hidden: true %>
<% end %>
</div>