2023-11-28 16:48:47 +00:00
|
|
|
= form_for site, html: { class: form_class(site) } do |f|
|
|
|
|
-# Desktop view with 3 columns and radio_buttons
|
|
|
|
.row.designs.d-none.d-lg-flex
|
2023-11-29 14:39:51 +00:00
|
|
|
.col-md-4.max-height.overflow-auto
|
2023-11-28 16:48:47 +00:00
|
|
|
%h2.pb-3= t('.selector')
|
|
|
|
- @designs.each do |design|
|
2023-11-29 14:39:51 +00:00
|
|
|
.col.d-flex.flex-column.pl-2.mb-n1.border-magenta.border-solid
|
2023-11-28 16:48:47 +00:00
|
|
|
%div
|
|
|
|
= f.label "design_id_#{design.id}", " - #{design.name}",
|
|
|
|
class: 'h5 font-weight-bolder'
|
|
|
|
.flex-fill.f-3
|
|
|
|
= sanitize_markdown design.description,
|
|
|
|
tags: %w[p a strong em]
|
2023-12-19 17:04:02 +00:00
|
|
|
.col
|
|
|
|
- designs.each do |design|
|
|
|
|
= f.radio_button :design_id, design.id,
|
|
|
|
checked: design.id == (site.design_id || @designs.first.id),
|
|
|
|
disabled: design.disabled,
|
|
|
|
required: true, class: 'radio-toolbar toggler'
|
|
|
|
.row.toggled
|
|
|
|
.col-md-8.border-0.border-lg-right.border-dashed.border-cyan
|
|
|
|
.border-lg-left.border-cyan
|
|
|
|
%h2.text-center.pb-3= t('.preview')
|
|
|
|
.embed-responsive.embed-responsive-1by1
|
|
|
|
%iframe.embed-responsive-item{allowfullscreen: "", src: "/placeholder.png"}
|
|
|
|
.col-md-3
|
|
|
|
%h2.pb-3= t('.characteristics')
|
|
|
|
%div
|
|
|
|
- characteristics = design.characteristics
|
|
|
|
- characteristics.each_line.with_index do |characteristic, index|
|
|
|
|
%h5 #{index+1}. #{characteristic}
|
|
|
|
%br
|
|
|
|
%a.btn.btn-primary.btn-lg.mt-4{role: "button", href: design.url}= t('.source_code')
|