feature/share-libs
erb 55 lines 2.02 KB
Raw
1 <% content_for :meta_head do %>
2 <title><%= @meta_title %></title>
3 <meta name="description" content="<%= @meta_description %>">
4 <meta property="og:title" content="<%= @meta_title %>" />
5 <meta property="og:description" content="<%= @meta_description %>" />
6 <meta property="og:url" content="<%= @meta_url %>" />
7 <% end %>
8 <main>
9 <div class="row g-5">
10 <div class="col-md-12">
11 <h1><%= @page_title %></h1>
12 <%= render "shared/flash_message", object: flash %>
13 </div>
14 </div>
15 <div class="row g-5">
16 <div class="col-sm-1">
17 <div class="position-sticky" style="top: 1rem;">
18 <div class="text-center mt-4">
19 <%= link_to(
20 "<i class='bi bi-journal-check' style='font-size: 1.5rem;'></i>".html_safe,
21 album_add_path,
22 title: "How to add chord"
23 ) %>
24 </div>
25 </div>
26 </div>
27 <div class="col-sm-11">
28 <%= form_with model: @album, url: { action: "add" }, html: { :class=> "row g-3" } do |form| %>
29 <div class="col-md-6">
30 <%= form.text_field :name, class: "form-control", placeholder: "Type your favorite album title..." %>
31 <%= form.hidden_field :user_id, value: @user.id if @user.present? %>
32 </div>
33 <div class="col-12">
34 <%= form.text_area(:description, class: "form-control" , rows: 5, placeholder: "Give it a description...") %>
35 </div>
36 <div class="col-12">
37 <%=
38 "<div class='alert alert-danger' role='alert'>
39 You are not logged in. #{link_to('@nowhereman', profile_path('nowhereman'))} is going to claim your contribution.
40 </div>".html_safe unless user_signed_in?
41 %>
42 <%= form.submit(t('home_add_album'), class: "btn btn-primary") %>
43 </div>
44 <% end %>
45 </div>
46 </div>
47 <%= render 'shared/partial_breadcrumbs' do %>
48 <li class="breadcrumb-item">
49 <%= link_to(
50 t('guitar_chord_add'),
51 guitar_chord_add_path
52 ) %>
53 </li>
54 <% end %>
55 </main>