add daisy tailwind theme

pull/105/head
Alex Turchyn 2 years ago
parent 6a41f82e5b
commit b8bae6d0e4

@ -30,3 +30,19 @@ button .enabled {
button[disabled] .enabled {
display: none;
}
.base-input {
@apply input input-bordered bg-white;
}
.base-button {
@apply btn text-white text-base no-animation;
}
.white-button {
@apply btn btn-outline text-base bg-white border-2;
}
.base-checkbox {
@apply checkbox rounded bg-white checkbox-sm no-animation;
}

@ -1,21 +1,25 @@
<h2>Log in</h2>
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<div class="field">
<%= f.label :email %><br>
<%= f.email_field :email, autofocus: true, autocomplete: 'email' %>
</div>
<div class="field">
<%= f.label :password %><br>
<%= f.password_field :password, autocomplete: 'current-password' %>
</div>
<% if devise_mapping.rememberable? %>
<div class="field">
<%= f.check_box :remember_me, checked: true %>
<%= f.label :remember_me %>
<div class="max-w-xl mx-auto px-2">
<h1 class="text-4xl font-bold text-center my-8">Log In 👋</h1>
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<div class="form-control">
<%= f.label :email, class: 'label' %>
<%= f.email_field :email, autofocus: true, autocomplete: 'email', class: 'base-input' %>
</div>
<div class="form-control mt-2">
<%= f.label :password, class: 'label' %>
<%= f.password_field :password, autocomplete: 'current-password', class: 'base-input' %>
</div>
<% if devise_mapping.rememberable? %>
<div class="form-control mt-2">
<%= f.label :remember_me, class: 'flex items-center cursor-pointer' do %>
<%= f.check_box :remember_me, checked: true, class: 'base-checkbox' %>
<span class="label">Remember me</span>
<% end %>
</div>
<% end %>
<div class="form-control my-4">
<%= f.submit 'Log in', class: 'base-button' %>
</div>
<% end %>
<div class="actions">
<%= f.submit 'Log in' %>
</div>
<% end %>
<%= render 'devise/shared/links' %>
<%= render 'devise/shared/links' %>
</div>

@ -1,21 +1,21 @@
<%- if controller_name != 'sessions' %>
<%= link_to 'Log in', new_session_path(resource_name) %><br>
<%= link_to 'Log in', new_session_path(resource_name), class: 'link-hover' %><br>
<% end %>
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
<%= link_to 'Sign up', new_registration_path %><br>
<%= link_to 'Sign up', new_registration_path, class: 'link-hover' %><br>
<% end %>
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
<%= link_to 'Forgot your password?', new_password_path(resource_name) %><br>
<%= link_to 'Forgot your password?', new_password_path(resource_name), class: 'link-hover' %><br>
<% end %>
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br>
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name), class: 'link-hover' %><br>
<% end %>
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br>
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name), class: 'link-hover' %><br>
<% end %>
<%- if devise_mapping.omniauthable? %>

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html data-theme="cupcake">
<head>
<title>
Docuseal
@ -11,12 +11,20 @@
<%= stylesheet_pack_tag 'application', media: 'all' %>
<%= yield :head %>
</head>
<body class="font-sans antialiased font-normal leading-normal bg-white text-gray-700">
<body>
<turbo-frame id="modal"></turbo-frame>
<%= render 'shared/navbar' %>
<div>
<%= flash[:notice] || flash[:alert] %>
</div>
<% if flash.present? %>
<div id="flash" class="max-w-xl mx-auto px-2">
<div class="alert shadow-lg">
<div class="flex w-full justify-between">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-info flex-shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
<span class="w-full"><%= flash[:notice] || flash[:alert] %></span>
<a href="#" onclick="[event.preventDefault(), window.flash.remove()]">&times;</a>
</div>
</div>
</div>
<% end %>
<%= yield %>
</body>
</html>

@ -1,30 +1,36 @@
Setup
<%= form_for '', url: setup_index_path do |f| %>
<%= f.fields_for @user do |ff| %>
<div>
<%= ff.label :first_name %>
<%= ff.text_field :first_name, required: true %>
</div>
<div>
<%= ff.label :last_name %>
<%= ff.text_field :last_name, required: true %>
</div>
<% end %>
<%= f.fields_for @account do |ff| %>
<div>
<%= ff.label :name, 'Company name' %>
<%= ff.text_field :name, required: true %>
</div>
<% end %>
<%= f.fields_for @user do |ff| %>
<div>
<%= ff.label :email %>
<%= ff.email_field :email, required: true %>
</div>
<div>
<%= ff.label :password %>
<%= ff.password_field :password, required: true %>
<div class="max-w-xl mx-auto px-2">
<h1 class="text-4xl font-bold text-center my-8">Initial Setup 👋</h1>
<%= form_for '', url: setup_index_path do |f| %>
<%= f.fields_for @user do |ff| %>
<div class="flex space-x-4">
<div class="form-control w-1/2">
<%= ff.label :first_name, class: 'label' %>
<%= ff.text_field :first_name, required: true, class: 'base-input' %>
</div>
<div class="form-control w-1/2">
<%= ff.label :last_name, class: 'label' %>
<%= ff.text_field :last_name, required: true, class: 'base-input' %>
</div>
</div>
<% end %>
<%= f.fields_for @account do |ff| %>
<div class="form-control mt-2">
<%= ff.label :name, 'Company name', class: 'label' %>
<%= ff.text_field :name, required: true, class: 'base-input' %>
</div>
<% end %>
<%= f.fields_for @user do |ff| %>
<div class="form-control mt-2">
<%= ff.label :email, class: 'label' %>
<%= ff.email_field :email, required: true, class: 'base-input' %>
</div>
<div class="form-control mt-2">
<%= ff.label :password, class: 'label' %>
<%= ff.password_field :password, required: true, placeholder: '************', class: 'base-input' %>
</div>
<% end %>
<div class="form-control mt-8">
<%= f.button button_title, class: 'base-button' %>
</div>
<% end %>
<%= f.button button_title %>
<% end %>
</div>

@ -1,7 +1,12 @@
<% if signed_in? %>
<div>
<%= link_to 'Home', root_path, class: 'bg-red-500' %>
<%= link_to 'Sign out', destroy_user_session_path, data: { turbo_method: :delete } %>
<%= current_user.email %>
</div>
<% end %>
<div class="max-w-6xl mx-auto px-2 py-2">
<a href="<%= root_path %>" class="text-2xl font-bold">
<span>DocuSeal</span>
</a>
<% if signed_in? %>
<div>
<%= link_to 'Home', root_path, class: 'bg-red-500' %>
<%= link_to 'Sign out', destroy_user_session_path, data: { turbo_method: :delete } %>
<%= current_user.email %>
</div>
<% end %>
</div>

@ -9,7 +9,6 @@
"@github/catalyst": "^2.0.0-beta",
"@hotwired/turbo-rails": "^7.3.0",
"@rails/activestorage": "^7.0.4-3",
"@tailwindcss/forms": "^0.5.0",
"autoprefixer": "^10.4.14",
"babel-loader": "9.1.2",
"babel-plugin-dynamic-import-node": "^2.3.3",
@ -17,6 +16,7 @@
"compression-webpack-plugin": "10.0.0",
"css-loader": "^6.7.3",
"css-minimizer-webpack-plugin": "^5.0.0",
"daisyui": "^2.52.0",
"mini-css-extract-plugin": "^2.7.5",
"postcss": "^8.4.23",
"postcss-import": "^15.1.0",

@ -1,5 +1,8 @@
module.exports = {
plugins: [
require('@tailwindcss/forms')
]
require('daisyui')
],
daisyui: {
themes: ['cupcake']
}
}

@ -2008,11 +2008,27 @@ color-name@1.1.3:
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==
color-name@~1.1.4:
color-name@^1.0.0, color-name@~1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
color-string@^1.9.0:
version "1.9.1"
resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.9.1.tgz#4467f9146f036f855b764dfb5bf8582bf342c7a4"
integrity sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==
dependencies:
color-name "^1.0.0"
simple-swizzle "^0.2.2"
color@^4.2:
version "4.2.3"
resolved "https://registry.yarnpkg.com/color/-/color-4.2.3.tgz#d781ecb5e57224ee43ea9627560107c0e0c6463a"
integrity sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==
dependencies:
color-convert "^2.0.1"
color-string "^1.9.0"
colord@^2.9.1:
version "2.9.3"
resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.3.tgz#4f8ce919de456f1d5c1c368c307fe20f3e59fb43"
@ -2197,6 +2213,14 @@ css-select@^5.1.0:
domutils "^3.0.1"
nth-check "^2.0.1"
css-selector-tokenizer@^0.8.0:
version "0.8.0"
resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.8.0.tgz#88267ef6238e64f2215ea2764b3e2cf498b845dd"
integrity sha512-Jd6Ig3/pe62/qe5SBPTN8h8LeUg/pT4lLgtavPf7updwwHpvFzxvOQBHYj2LZDMjUnBzgvIUSjRcf6oT5HzHFg==
dependencies:
cssesc "^3.0.0"
fastparse "^1.1.2"
css-tree@^2.2.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-2.3.1.tgz#10264ce1e5442e8572fc82fbe490644ff54b5c20"
@ -2283,6 +2307,16 @@ csstype@^3.1.1:
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b"
integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==
daisyui@^2.52.0:
version "2.52.0"
resolved "https://registry.yarnpkg.com/daisyui/-/daisyui-2.52.0.tgz#1e22abd655bf4a5cb466e1a1f264bb597e9ec254"
integrity sha512-LQTA5/IVXAJHBMFoeaEMfd7/akAFPPcdQPR3O9fzzcFiczneJFM73CFPnScmW2sOgn/D83cvkP854ep2T9OfTg==
dependencies:
color "^4.2"
css-selector-tokenizer "^0.8.0"
postcss-js "^4.0.0"
tailwindcss "^3"
debug@2.6.9:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
@ -2868,6 +2902,11 @@ fastest-levenshtein@^1.0.12:
resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5"
integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==
fastparse@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.2.tgz#91728c5a5942eced8531283c79441ee4122c35a9"
integrity sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==
fastq@^1.6.0:
version "1.15.0"
resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a"
@ -3349,6 +3388,11 @@ is-arrayish@^0.2.1:
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==
is-arrayish@^0.3.1:
version "0.3.2"
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03"
integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==
is-bigint@^1.0.1:
version "1.0.4"
resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3"
@ -4198,7 +4242,7 @@ postcss-import@^15.1.0:
read-cache "^1.0.0"
resolve "^1.1.7"
postcss-js@^4.0.1:
postcss-js@^4.0.0, postcss-js@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/postcss-js/-/postcss-js-4.0.1.tgz#61598186f3703bab052f1c4f7d805f3991bee9d2"
integrity sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==
@ -4842,6 +4886,13 @@ signature_pad@^4.1.5:
resolved "https://registry.yarnpkg.com/signature_pad/-/signature_pad-4.1.5.tgz#d2ff3e9b21b479f46ae145e98e973b7928f9a22d"
integrity sha512-VOE846UbQMeLBbcR08KwjwE1wNLgp3gqC7yr/AELkgSMs/BdRpxIZna6K5XyZJpA7IWq9GiInw1C8PLm57VO6Q==
simple-swizzle@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a"
integrity sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==
dependencies:
is-arrayish "^0.3.1"
sirv@^1.0.7:
version "1.0.19"
resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.19.tgz#1d73979b38c7fe91fcba49c85280daa9c2363b49"
@ -5038,7 +5089,7 @@ svgo@^3.0.2:
csso "^5.0.5"
picocolors "^1.0.0"
tailwindcss@^3.3.2:
tailwindcss@^3, tailwindcss@^3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.3.2.tgz#2f9e35d715fdf0bbf674d90147a0684d7054a2d3"
integrity sha512-9jPkMiIBXvPc2KywkraqsUfbfj+dHDb+JPWtSJa9MLFdrPyazI7q6WX2sUrm7R9eVR7qqv3Pas7EvQFzxKnI6w==

Loading…
Cancel
Save