45 lines
2.3 KiB
Plaintext
45 lines
2.3 KiB
Plaintext
<div class="w-[72vw] md:w-[500px]">
|
|
<header class="absolute z-10 h-36 sm:h-44 inset-x-1 top-1 rounded-t
|
|
bg-cover bg-center bg-gray-50"
|
|
style="background-image: url('<%= @profile["banner"]%>');">
|
|
<div class="inline-block z-20 size-28 sm:size-32 ml-4 mt-16 sm:mt-20">
|
|
<% if @profile["picture"].present? %>
|
|
<img src="<%= @profile["picture"] %>"
|
|
class="inline-block size:28 sm:size-32 rounded-full border-2 border-white" />
|
|
<% else %>
|
|
<span class="inline-block size:28 sm:size-32 overflow-hidden rounded-full border-2 border-white bg-gray-100">
|
|
<svg class="size-full text-gray-300" fill="currentColor" viewBox="0 0 24 24">
|
|
<path d="M24 20.993V24H0v-2.996A14.977 14.977 0 0112.004 15c4.904 0 9.26 2.354 11.996 5.993zM16.002 8.999a4 4 0 11-8 0 4 4 0 018 0z" />
|
|
</svg>
|
|
</span>
|
|
<% end %>
|
|
</div>
|
|
</header>
|
|
<main class="mt-44 sm:mt-52">
|
|
<%= form_for(@user, url: setting_path(:nostr), html: { :method => :put }) do |f| %>
|
|
<%= render FormElements::FieldsetComponent.new(tag: "div", title: "Display name") do %>
|
|
<%= f.text_field :display_name, value: @display_name, class: "w-full sm:w-3/5" %>
|
|
<% if @validation_errors.present? && @validation_errors[:display_name].present? %>
|
|
<p class="error-msg mt-2"><%= @validation_errors[:display_name].first %></p>
|
|
<% end %>
|
|
<% end %>
|
|
<%= render FormElements::FieldsetComponent.new(tag: "div", title: "Nostr address (NIP-05)") do %>
|
|
<%= f.text_field :nip05_address, value: @profile["nip05"], class: "w-full sm:w-3/5" %>
|
|
<% if @validation_errors.present? && @validation_errors[:nip05_address].present? %>
|
|
<p class="error-msg mt-2"><%= @validation_errors[:nip05_address].first %></p>
|
|
<% end %>
|
|
<% end %>
|
|
<%= render FormElements::FieldsetComponent.new(tag: "div", title: "Ligtning address for Zaps") do %>
|
|
<%= f.text_field :lud16_address, value: @profile["lud16"], class: "w-full sm:w-3/5" %>
|
|
<% if @validation_errors.present? && @validation_errors[:lud16_address].present? %>
|
|
<p class="error-msg mt-2"><%= @validation_errors[:lud16_address].first %></p>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|
|
</main>
|
|
<footer>
|
|
<%# <%= @profile.inspect %>
|
|
<%# <%= @profile_event.inspect %>
|
|
</footer>
|
|
</div>
|