Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main #91

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Main #91

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/assets/stylesheets/components/_cards.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
border-radius: 16px;
margin-bottom: 0.5rem;
margin-left: 16px;
max-width: 25%;
max-width: 100%;



Expand Down
8 changes: 8 additions & 0 deletions app/assets/stylesheets/components/_lessons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@
.text-light {
padding-left: 3rem;
}

.lessons{
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 5rem;
padding: 3rem;
}

81 changes: 42 additions & 39 deletions app/views/devise/registrations/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,43 +1,46 @@
<div class="container-fluid w-auto m-6 text-light">
<h2>Edit <%= resource_name.to_s.humanize %></h2>

<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
<%= f.error_notification %>

<div class="form-inputs">
<%= f.input :name %>
<%= f.input :avatar,
as: :file %>
<%= f.input :description %>
<%= f.input :email, required: true, autofocus: true %>

<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
<p>Currently waiting confirmation for: <%= resource.unconfirmed_email %></p>
<div class="container w-auto m-6 text-light">
<div class="form-card">
<h2>Edit <%= resource_name.to_s.humanize %></h2>

<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
<%= f.error_notification %>

<div class="form-inputs">
<%= f.input :name %>
<%= f.input :avatar,
as: :file %>
<%= f.input :description %>
<%= f.input :email, required: true, autofocus: true %>

<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
<p>Currently waiting confirmation for: <%= resource.unconfirmed_email %></p>
<% end %>

<%= f.input :password,
hint: "leave it blank if you don't want to change it",
required: false,
input_html: { autocomplete: "new-password" } %>
<%= f.input :password_confirmation,
required: false,
input_html: { autocomplete: "new-password" } %>


<%= f.collection_radio_buttons :status, [["Jedi", 'Jedi'], ["Padawan", 'Padawan']], :first, :last %> <br>
<%= f.collection_radio_buttons :side, [["Light", 'Light'], ["Dark", 'Dark']], :first, :last %>


<%= f.input :current_password,
hint: "we need your current password to confirm your changes",
required: true,
input_html: { autocomplete: "Confirm your password" } %>
</div>

<div class="form-actions flex">
<%= f.button :submit, "Update", class:"btn btn-success" %>
<%= link_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete, class:"btn btn-danger"%></p>
<%= link_to "Back", :back, class:"btn btn-dark mb-3" %>
</div>
<% end %>

<%= f.input :password,
hint: "leave it blank if you don't want to change it",
required: false,
input_html: { autocomplete: "new-password" } %>
<%= f.input :password_confirmation,
required: false,
input_html: { autocomplete: "new-password" } %>


<%= f.collection_radio_buttons :status, [["Jedi", 'Jedi'], ["Padawan", 'Padawan']], :first, :last %> <br>
<%= f.collection_radio_buttons :side, [["Light", 'Light'], ["Dark", 'Dark']], :first, :last %>


<%= f.input :current_password,
hint: "we need your current password to confirm your changes",
required: true,
input_html: { autocomplete: "Confirm your password" } %>
</div>

<div class="form-actions flex">
<%= f.button :submit, "Update", class:"btn btn-success" %>
<%= link_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete, class:"btn btn-danger"%></p>
<%= link_to "Back", :back, class:"btn btn-dark mb-3" %>
</div>
<% end %>
</div>
56 changes: 28 additions & 28 deletions app/views/devise/registrations/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
<div class="container w-auto text-light">
<h2>Sign up</h2>
<h2>Sign up</h2>

<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
<%= f.error_notification %>
<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
<%= f.error_notification %>

<div class="form-inputs">
<%= f.input :email,
required: true,
autofocus: true,
input_html: { autocomplete: "email" }%>
<%= f.input :password,
required: true,
hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length),
input_html: { autocomplete: "new-password" } %>
<%= f.input :password_confirmation,
required: true,
input_html: { autocomplete: "new-password" } %>
<%= f.input :name,
required: true %>
<%= f.input :description,
required: true %>
<%= f.collection_radio_buttons :status, [["Jedi", 'Jedi'], ["Padawan", 'Padawan']], :first, :last %> <br>
<%= f.collection_radio_buttons :side, [["Light", 'Light'], ["Dark", 'Dark']], :first, :last %>,
<%= f.input :avatar, as: :file %>
</div>
<div class="form-inputs">
<%= f.input :email,
required: true,
autofocus: true,
input_html: { autocomplete: "email" }%>
<%= f.input :password,
required: true,
hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length),
input_html: { autocomplete: "new-password" } %>
<%= f.input :password_confirmation,
required: true,
input_html: { autocomplete: "new-password" } %>
<%= f.input :name,
required: true %>
<%= f.input :description,
required: true %>
<%= f.collection_radio_buttons :status, [["Jedi", 'Jedi'], ["Padawan", 'Padawan']], :first, :last %> <br>
<%= f.collection_radio_buttons :side, [["Light", 'Light'], ["Dark", 'Dark']], :first, :last %>,
<%= f.input :avatar, as: :file %>
</div>

<div class="form-actions">
<%= f.button :submit, "Sign up", class:"btn btn-primary" %>
</div>
<% end %>
<div class="form-actions">
<%= f.button :submit, "Sign up", class:"btn btn-primary" %>
</div>
<% end %>

<%= render "devise/shared/links" %>
<%= render "devise/shared/links" %>
</div>
Empty file.
1 change: 1 addition & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@

<%= render "shared/flashes" %>
<%= yield %>

</body>
</html>
2 changes: 1 addition & 1 deletion app/views/pages/home.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</div>


<div class="row justify-content-around lessons">
<div class="row lessons">
<% @lessons.each do |lesson| %>
<div class="lesson-card <%= current_user&.side&.downcase %> my-3">
<% if lesson.skill_picture.attached? %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/pages/user_profile.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<div>
<h3 class="card-title">Completed</h3>
<p class="card-text">You have completed 4 classes already. <br>Keep training to become the ultimate master. </p>
<h5 class="card-text">You have completed 4 classes already. <br>Keep training to become the ultimate master. </h5>
</div>

</div>
Expand Down
2 changes: 1 addition & 1 deletion config/credentials.yml.enc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rS4pm2cHRwW5bxsm1Xh/hDhTzhmJPGc40NQE/Ngiu7y5xt56mhPLHMJzYwIePG6tVXV9orzFsI/pwgQahskwdE39xtlpwkDwclotEHxodhvtHfoHyqpYgSKEmlEzDk+BdqmNOTZH3XQPolOX0mWnnRXyfX3nENLMHresn89ZA+1zPVUa6kJXidyPNgdh6pyk4tKm4+T4cCCuR41pIu3JjOGhQRhdasjCjya1sF8XFGR+CfyJipCOr78UGZcDv4gQKXaWR6X+G0ad9mU3R3PewK+PnaUnxRvqCeBRb8TkhYUwScA4ne1dYdGycCji6mOOdaN7whFZYiRBsGXuBhjyPnhBjTPophRhl7v9WqPzr8krQG9JHjbfGfxWthoScSzVK0oZ5EUGEd2X3d2gyHvYV4muhyoRZc85twon--OK0WWcHChNAoU0Y0--jmis2zm0Kl1xh4UOxJ40mA==
A3z2Ro8xwa8T3cWbc+vSJbJKVHbPMooTCOiKjlXfwXxrVdnxQfaSGCiHfwo+EhkoCnLqPBFbmrHcOqH2TY1m9E5GFjbce1uo+T0xIr5FNAPQ5AVBUA0BIo5TSmBkQY++TqGWUeCK2Vpc6WAsnVKYoA7wcjN87SRQ9ceERgau+U83GNiZshIAq2MUvwQKHTSF3MgdL/aRhShOdBY/276/SLpI2W6178u3lnNApAWVR6orDm0/XvdriB6itBKawrbsDFeOoGxtluAVytWrieqv763yMExagifMEV/ZCnvJTiccM72hdgclO0mItqQIwmNZsqWXwMZ5pYmeNeUt1oYjcsR4icCWcpBp5X0zBHSWnCmrrNYrnIakS6HnbGgYMBT9JacvKC2MaPrdwELN85AEUH10ZQNREWOST1M/--DsgB2h4Hnb4PUE1r--neh8sJ3bdoCc5MeTme/HWA==
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

# Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
# config.require_master_key = true
config.require_master_key = true

# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
Expand Down
3 changes: 1 addition & 2 deletions render-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ bundle install
bundle exec rails assets:precompile
bundle exec rails assets:clean
bundle exec rails db:migrate

bundle exec rails db:seed
# bundle exec rails db:seed