Retrospring/app/views/settings/theme/edit.haml

108 lines
4.0 KiB
Plaintext
Raw Normal View History

2020-05-06 09:51:06 -07:00
.card
.card-body
%h1= t(".heading")
%p.lead= t(".lead")
= t(".body_html")
2020-05-10 01:40:48 -07:00
2020-05-06 09:51:06 -07:00
- if current_user.theme
.pull-right
2022-06-26 04:37:15 -07:00
= button_to t(".delete"), settings_theme_path, data: { confirm: t("voc.confirm") }, tabindex: -1, method: :delete, class: "btn btn-danger"
= bootstrap_form_for(current_user.theme || Theme.new, html: { id: "update" }, method: :patch) do |f|
.card
.card-body
%h2= t(".general.heading")
%p= t(".general.body")
.row
.col-sm-6
2022-02-12 15:43:23 -08:00
= f.text_field :background_color, class: "color", data: { default: 0xF0EDF4 }
.col-sm-6
2022-02-12 15:43:23 -08:00
= f.text_field :body_text, class: "color", data: { default: 0x000000 }
.card
.card-body
%h2= t(".colors.heading")
%p= t(".colors.body")
.row
.col-sm-6
2022-02-12 15:43:23 -08:00
= f.text_field :primary_color, class: "color", data: { default: 0x5E35B1 }
.col-sm-6
2022-02-12 15:43:23 -08:00
= f.text_field :primary_text, class: "color", data: { default: 0xFFFFFF }
.col-sm-12
.alert.alert-primary= t(".colors.alert.example", type: t(".colors.alert.type.primary"))
2020-04-25 08:04:23 -07:00
.row
.col-sm-6
2022-02-12 15:43:23 -08:00
= f.text_field :danger_color, class: "color", data: { default: 0xDC3545 }
.col-sm-6
2022-02-12 15:43:23 -08:00
= f.text_field :danger_text, class: "color", data: { default: 0xFFFFFF }
.col-sm-12
.alert.alert-danger= t(".colors.alert.example", type: t(".colors.alert.type.danger"))
2020-04-25 08:04:23 -07:00
.row
.col-sm-6
2022-02-12 15:43:23 -08:00
= f.text_field :warning_color, class: "color", data: { default: 0xFFC107 }
.col-sm-6
2022-02-12 15:43:23 -08:00
= f.text_field :warning_text, class: "color", data: { default: 0x292929 }
.col-sm-12
.alert.alert-warning= t(".colors.alert.example", type: t(".colors.alert.type.warning"))
2020-04-25 08:04:23 -07:00
.row
.col-sm-6
2022-02-12 15:43:23 -08:00
= f.text_field :info_color, class: "color", data: { default: 0x17A2B8 }
.col-sm-6
2022-02-12 15:43:23 -08:00
= f.text_field :info_text, class: "color", data: { default: 0xFFFFFF }
.col-sm-12
.alert.alert-info= t(".colors.alert.example", type: t(".colors.alert.type.info"))
2020-04-25 08:04:23 -07:00
.row
.col-sm-6
2022-02-12 15:43:23 -08:00
= f.text_field :success_color, class: "color", data: { default: 0x28A745 }
.col-sm-6
2022-02-12 15:43:23 -08:00
= f.text_field :success_text, class: "color", data: { default: 0xFFFFFF }
.col-sm-12
.alert.alert-success= t(".colors.alert.example", type: t(".colors.alert.type.success"))
.row
.col-sm-6
2022-02-12 15:43:23 -08:00
= f.text_field :dark_color, class: "color", data: { default: 0x343A40 }
.col-sm-6
2022-02-12 15:43:23 -08:00
= f.text_field :dark_text, class: "color", data: { default: 0xFFFFFF }
.col-sm-12
2022-02-12 15:43:23 -08:00
%a.btn.btn-dark.mb-3{ href: "#" }= t(".colors.button.example", type: t(".colors.button.type.dark"))
.row
.col-sm-6
2022-02-12 15:43:23 -08:00
= f.text_field :light_color, class: "color", data: { default: 0xF8F9FA }
.col-sm-6
2022-02-12 15:43:23 -08:00
= f.text_field :light_text, class: "color", data: { default: 0xFFFFFF }
.col-sm-12
2022-02-12 15:43:23 -08:00
%a.btn.btn-light.mb-3{ href: "#" }= t(".colors.button.example", type: t(".colors.button.type.light"))
.row
.col-sm-6
2022-02-12 15:43:23 -08:00
= f.text_field :muted_text, class: "color", data: { default: 0x6C757D }
.col-sm-6
%p.pt-4.text-muted= t(".colors.text.example")
.card
.card-body
%h2= t(".forms.heading")
%p= t(".forms.body")
.row
.col-sm-6
2022-02-12 15:43:23 -08:00
= f.text_field :input_color, class: "color", data: { default: 0xFFFFFF }
.col-sm-6
2022-02-12 15:43:23 -08:00
= f.text_field :input_text, class: "color", data: { default: 0x000000 }
.card
.card-body
%h2= t(".raised.heading")
%p= t(".raised.body")
.row
.col-sm-6
2022-02-12 15:43:23 -08:00
= f.text_field :raised_background, class: "color", data: { default: 0xFFFFFF }
.col-sm-6
2022-02-12 15:43:23 -08:00
= f.text_field :raised_accent, class: "color", data: { default: 0xF7F7F7 }
.card-footer
%p= t(".raised.accent.example")
.card
.card-body
2020-04-25 08:04:23 -07:00
.pull-left
= f.primary
2022-06-25 17:58:45 -07:00
- provide(:title, generate_title(t(".title")))
- parent_layout "user/settings"