Browse Source

feat: add font styles

main
Inhji Y. 9 months ago
parent
commit
25726c7635
  1. 8
      assets/css/_phoenix.scss
  2. 26
      assets/css/app.scss
  3. 20
      lib/mirage_web/templates/user_session/new.html.eex
  4. 44
      lib/mirage_web/templates/user_settings/edit.html.eex

8
assets/css/_phoenix.scss

@ -25,11 +25,7 @@
}
.invalid-feedback {
color: $color-danger;
background: $bg-danger;
display: block;
margin: -1rem 0 2rem;
}
form .alert {
margin-top: -2rem;
margin-bottom: 1rem;
padding: 0.5rem;
}

26
assets/css/app.scss

@ -12,7 +12,7 @@ $font-content: 'Open Sans', Helvetica, sans-serif;
$font-heading: $font-content;
$bg-base: #111;
$bg-content: #333;
$bg-content: #282c34;
$bg-info: #31708f;
$color-info: #d9edf7;
@ -212,6 +212,30 @@ kbd {
border-radius: 3px;
}
/* === Forms === */
form {
margin-bottom: 2rem;
fieldset {
border: 0;
margin-bottom: 1rem;
input[type=text],
input[type=url],
input[type=email],
input[type=password] {
background: $bg-content;
color: white;
padding: 0.5rem;
width: 100%;
border-radius: 0;
border: 0;
}
}
}
/* === Content === */
article {

20
lib/mirage_web/templates/user_session/new.html.eex

@ -9,14 +9,22 @@
</div>
<% end %>
<%= label f, :email %>
<%= email_input f, :email, required: true %>
<fieldset>
<%= label f, :email %>
<%= email_input f, :email, required: true %>
</fieldset>
<%= label f, :password %>
<%= password_input f, :password, required: true %>
<fieldset>
<%= label f, :password %>
<%= password_input f, :password, required: true %>
</fieldset>
<%= label f, :remember_me, "Keep me logged in for 60 days" %>
<%= checkbox f, :remember_me %>
<fieldset>
<%= label f, :remember_me do %>
<%= checkbox f, :remember_me %>
<span>Keep me logged in for 60 days</span>
<% end %>
</fieldset>
<div>
<%= submit "Log in" %>

44
lib/mirage_web/templates/user_settings/edit.html.eex

@ -13,13 +13,17 @@
<%= hidden_input f, :action, name: "action", value: "update_email" %>
<%= label f, :email %>
<%= email_input f, :email, required: true %>
<%= error_tag f, :email %>
<fieldset>
<%= label f, :email %>
<%= email_input f, :email, required: true %>
<%= error_tag f, :email %>
</fieldset>
<%= label f, :current_password, for: "current_password_for_email" %>
<%= password_input f, :current_password, required: true, name: "current_password", id: "current_password_for_email" %>
<%= error_tag f, :current_password %>
<fieldset>
<%= label f, :current_password, for: "current_password_for_email" %>
<%= password_input f, :current_password, required: true, name: "current_password", id: "current_password_for_email" %>
<%= error_tag f, :current_password %>
</fieldset>
<div>
<%= submit "Change email" %>
@ -37,19 +41,25 @@
<%= hidden_input f, :action, name: "action", value: "update_password" %>
<%= label f, :password, "New password" %>
<%= password_input f, :password, required: true %>
<%= error_tag f, :password %>
<fieldset>
<%= label f, :password, "New password" %>
<%= password_input f, :password, required: true %>
<%= error_tag f, :password %>
</fieldset>
<%= label f, :password_confirmation, "Confirm new password" %>
<%= password_input f, :password_confirmation, required: true %>
<%= error_tag f, :password_confirmation %>
<fieldset>
<%= label f, :password_confirmation, "Confirm new password" %>
<%= password_input f, :password_confirmation, required: true %>
<%= error_tag f, :password_confirmation %>
</fieldset>
<%= label f, :current_password, for: "current_password_for_password" %>
<%= password_input f, :current_password, required: true, name: "current_password", id: "current_password_for_password" %>
<%= error_tag f, :current_password %>
<fieldset>
<%= label f, :current_password, for: "current_password_for_password" %>
<%= password_input f, :current_password, required: true, name: "current_password", id: "current_password_for_password" %>
<%= error_tag f, :current_password %>
</fieldset>
<div>
<fieldset>
<%= submit "Change password" %>
</div>
</fieldset>
<% end %>

Loading…
Cancel
Save