Add compact layout for content, port sign-in screens
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2e301c3019
commit
b329b557c4
@ -1,5 +1,7 @@
|
|||||||
<header class="py-10">
|
<header class="py-10">
|
||||||
<div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8">
|
<div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
<h1 class="text-3xl font-bold text-white"><%= page_title %></h1>
|
<h1 class="text-3xl font-bold text-white">
|
||||||
|
<%= page_title %>
|
||||||
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
7
app/views/components/_header_compact.html.erb
Normal file
7
app/views/components/_header_compact.html.erb
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<header class="py-10">
|
||||||
|
<div class="max-w-xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
|
<h1 class="text-3xl font-bold text-white text-center">
|
||||||
|
<%= page_title %>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
</header>
|
5
app/views/components/_main_compact.html.erb
Normal file
5
app/views/components/_main_compact.html.erb
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<main class="w-full max-w-xl mx-auto pb-12 px-4 sm:px-6 lg:px-8">
|
||||||
|
<div class="bg-white rounded-lg shadow px-6 py-12 sm:px-12">
|
||||||
|
<%= yield %>
|
||||||
|
</div>
|
||||||
|
</main>
|
@ -1,14 +1,21 @@
|
|||||||
<h2>Resend confirmation instructions</h2>
|
<%= render partial: "components/header_compact", locals: { page_title: "Log in" } %>
|
||||||
|
|
||||||
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
|
<%= render layout: "components/main_compact" do %>
|
||||||
<%= render "devise/shared/error_messages", resource: resource %>
|
<h2>Resend confirmation instructions</h2>
|
||||||
<p>
|
|
||||||
<%= f.label :email, 'Email address', class: 'block mb-1' %>
|
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
|
||||||
<%= f.email_field :email, required: true, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
|
<%= render "devise/shared/error_messages", resource: resource %>
|
||||||
</p>
|
<p>
|
||||||
<p class="mt-8">
|
<%= f.label :email, 'Email address', class: 'block mb-1' %>
|
||||||
<%= f.submit "Resend confirmation instructions", class: 'btn-md btn-blue' %>
|
<%= f.email_field :email,
|
||||||
</p>
|
required: true, autofocus: true, autocomplete: "email",
|
||||||
|
value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email),
|
||||||
|
class: "w-full sm:w-4/5" %>
|
||||||
|
</p>
|
||||||
|
<p class="mt-8">
|
||||||
|
<%= f.submit "Resend confirmation instructions", class: 'btn-md btn-blue' %>
|
||||||
|
</p>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<%= render "devise/shared/links" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= render "devise/shared/links" %>
|
|
||||||
|
@ -1,27 +1,31 @@
|
|||||||
<h2>Change your password</h2>
|
<%= render partial: "components/header_compact", locals: { page_title: "Log in" } %>
|
||||||
|
|
||||||
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
|
<%= render layout: "components/main_compact" do %>
|
||||||
<%= render "devise/shared/error_messages", resource: resource %>
|
<h2>Change your password</h2>
|
||||||
<%= f.hidden_field :reset_password_token %>
|
|
||||||
|
|
||||||
<p class="mb-1">
|
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
|
||||||
<%= f.label :password, "New password" %>
|
<%= render "devise/shared/error_messages", resource: resource %>
|
||||||
</p>
|
<%= f.hidden_field :reset_password_token %>
|
||||||
<p>
|
|
||||||
<%= f.password_field :password, autofocus: true, autocomplete: "new-password" %>
|
<p class="mb-1">
|
||||||
<% if @minimum_password_length %>
|
<%= f.label :password, "New password" %>
|
||||||
<br><em class="text-sm text-gray-500">(<%= @minimum_password_length %> characters minimum)</em>
|
</p>
|
||||||
<% end %>
|
<p>
|
||||||
</p>
|
<%= f.password_field :password, autofocus: true, autocomplete: "new-password" %>
|
||||||
<p class="mb-1">
|
<% if @minimum_password_length %>
|
||||||
<%= f.label :password_confirmation, "Confirm new password" %>
|
<br><em class="text-sm text-gray-500">(<%= @minimum_password_length %> characters minimum)</em>
|
||||||
</p>
|
<% end %>
|
||||||
<p>
|
</p>
|
||||||
<%= f.password_field :password_confirmation, autocomplete: "new-password" %>
|
<p class="mb-1">
|
||||||
</p>
|
<%= f.label :password_confirmation, "Confirm new password" %>
|
||||||
<p class="mt-8">
|
</p>
|
||||||
<%= f.submit "Change my password", class: 'btn-md btn-blue' %>
|
<p>
|
||||||
</p>
|
<%= f.password_field :password_confirmation, autocomplete: "new-password" %>
|
||||||
|
</p>
|
||||||
|
<p class="mt-8">
|
||||||
|
<%= f.submit "Change my password", class: 'btn-md btn-blue' %>
|
||||||
|
</p>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<%= render "devise/shared/links" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= render "devise/shared/links" %>
|
|
||||||
|
@ -1,18 +1,22 @@
|
|||||||
<h2>Forgot your password?</h2>
|
<%= render partial: "components/header_compact", locals: { page_title: "Log in" } %>
|
||||||
|
|
||||||
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
|
<%= render layout: "components/main_compact" do %>
|
||||||
<%= render "devise/shared/error_messages", resource: resource %>
|
<h2>Forgot your password?</h2>
|
||||||
<p>
|
|
||||||
<%= f.label :cn, 'User', class: 'block' %>
|
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
|
||||||
<%= f.text_field :cn, autofocus: true, autocomplete: "username", required: true %> @ kosmos.org
|
<%= render "devise/shared/error_messages", resource: resource %>
|
||||||
</p>
|
<p>
|
||||||
<p>
|
<%= f.label :cn, 'User', class: 'block' %>
|
||||||
<%= f.label :email, 'Email address', class: 'block' %>
|
<%= f.text_field :cn, autofocus: true, autocomplete: "username", required: true %> @ kosmos.org
|
||||||
<%= f.email_field :email, autocomplete: "email", required: true %>
|
</p>
|
||||||
</p>
|
<p>
|
||||||
<p class="mt-8">
|
<%= f.label :email, 'Email address', class: 'block' %>
|
||||||
<%= f.submit "Send me reset password instructions", class: 'btn-md btn-blue' %>
|
<%= f.email_field :email, autocomplete: "email", required: true %>
|
||||||
</p>
|
</p>
|
||||||
|
<p class="mt-8">
|
||||||
|
<%= f.submit "Send me a reset link", class: 'btn-md btn-blue' %>
|
||||||
|
</p>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<%= render "devise/shared/links" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= render "devise/shared/links" %>
|
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
<h2>Log in</h2>
|
<%= render partial: "components/header_compact", locals: { page_title: "Log in" } %>
|
||||||
|
|
||||||
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
|
<%= render layout: "components/main_compact" do %>
|
||||||
<%= render "devise/shared/error_messages", resource: resource %>
|
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
|
||||||
<p>
|
<%= render "devise/shared/error_messages", resource: resource %>
|
||||||
<%= f.label :cn, 'User', class: 'block' %>
|
<p>
|
||||||
<%= f.text_field :cn, autofocus: true, autocomplete: "username" %> @ kosmos.org
|
<%= f.label :cn, 'User', class: 'block' %>
|
||||||
</p>
|
<%= f.text_field :cn, autofocus: true, autocomplete: "username" %> @ kosmos.org
|
||||||
<p>
|
</p>
|
||||||
<%= f.label :password, class: 'block' %>
|
<p>
|
||||||
<%= f.password_field :password, autocomplete: "current-password" %>
|
<%= f.label :password, class: 'block' %>
|
||||||
</p>
|
<%= f.password_field :password, autocomplete: "current-password" %>
|
||||||
<p class="mt-8">
|
</p>
|
||||||
<%= f.submit "Log in", class: 'btn-md btn-blue' %>
|
<p class="mt-8">
|
||||||
</p>
|
<%= f.submit "Log in", class: 'btn-md btn-blue' %>
|
||||||
|
</p>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<%= render "devise/shared/links" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= render "devise/shared/links" %>
|
|
||||||
|
@ -21,13 +21,13 @@
|
|||||||
<%= render partial: "shared/icons/comet" %>
|
<%= render partial: "shared/icons/comet" %>
|
||||||
<!-- <img class="h-8 w-8" src="https://tailwindui.com/img/logos/workflow-mark-indigo-500.svg" alt="Workflow"> -->
|
<!-- <img class="h-8 w-8" src="https://tailwindui.com/img/logos/workflow-mark-indigo-500.svg" alt="Workflow"> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="hidden md:block">
|
<% if user_signed_in? && current_user.is_admin? %>
|
||||||
<div class="ml-10 flex items-baseline space-x-4">
|
<div class="hidden md:block">
|
||||||
<% if user_signed_in? && current_user.is_admin? %>
|
<div class="ml-10 flex items-baseline space-x-4">
|
||||||
<%= render partial: 'shared/admin_nav' %>
|
<%= render partial: 'shared/admin_nav' %>
|
||||||
<% end %>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="hidden md:block">
|
<div class="hidden md:block">
|
||||||
<%= render partial: 'shared/header_account' %>
|
<%= render partial: 'shared/header_account' %>
|
||||||
|
@ -21,11 +21,13 @@
|
|||||||
<%= render partial: "shared/icons/comet" %>
|
<%= render partial: "shared/icons/comet" %>
|
||||||
<!-- <img class="h-8 w-8" src="https://tailwindui.com/img/logos/workflow-mark-indigo-500.svg" alt="Workflow"> -->
|
<!-- <img class="h-8 w-8" src="https://tailwindui.com/img/logos/workflow-mark-indigo-500.svg" alt="Workflow"> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="hidden md:block">
|
<% if user_signed_in? && current_user.confirmed? %>
|
||||||
<div class="ml-10 flex items-baseline space-x-4">
|
<div class="hidden md:block">
|
||||||
<%= render partial: 'shared/main_nav' %>
|
<div class="ml-10 flex items-baseline space-x-4">
|
||||||
|
<%= render partial: 'shared/main_nav' %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="hidden md:block">
|
<div class="hidden md:block">
|
||||||
<%= render partial: 'shared/header_account' %>
|
<%= render partial: 'shared/header_account' %>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user