5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-28 16:56:22 +00:00

fix: ajuste de estilos en plantillas #13587

This commit is contained in:
jazzari 2023-06-22 14:28:05 -03:00
parent ec2fa89589
commit 9f9bf4cf99
2 changed files with 32 additions and 12 deletions

View file

@ -290,16 +290,37 @@ svg {
} }
} }
.custom-control {
border: 1px solid magenta;
padding:7px 15px 2px;
}
.custom-control-label { .custom-control-label {
font-weight: bold; font-weight: bold;
} }
.custom-control-label::before {
display: none;
}
.des-description {
font-size: small;
margin-left: 10px;
}
.designs { .designs {
.design { .design {
margin-top: 1rem; margin-top: 1rem;
} }
} }
.radio-toolbar {
opacity: 0;
position: absolute;
width: 0;
}
.editor { .editor {
.ProseMirror-menubar { .ProseMirror-menubar {
min-height: 32px; min-height: 32px;

View file

@ -1,34 +1,33 @@
= form_for site, html: { class: form_class(site) } do |f| = form_for site, html: { class: form_class(site) } do |f|
- unless site.persisted? - unless site.persisted?
.form-group#design_id .form-group#design_id
%h2= t('.design.title')
%p.lead= t('.help.design')
- if invalid? site, :design_id - if invalid? site, :design_id
= render 'bootstrap/alert' do = render 'bootstrap/alert' do
= t('activerecord.errors.models.site.attributes.design_id.layout_incompatible.help', = t('activerecord.errors.models.site.attributes.design_id.layout_incompatible.help',
layouts: site.incompatible_layouts.to_sentence) layouts: site.incompatible_layouts.to_sentence)
.row .row.designs
- @designs = Design.all.order(priority: :desc) - @designs = Design.all.order(priority: :desc)
.col-md-3.black-bg.col-sm-12 .col-md-3.col-sm-12
%h5.pb-3 Selector de Plantillas %h5.pb-3 Selector de Plantillas
- @designs.each do |design| - @designs.each do |design|
.design.col.d-flex.flex-column .design.col.d-flex.flex-column.custom-control
.custom-control.custom-radio .custom
= f.radio_button :design_id, design.id, = f.radio_button :design_id, design.id,
checked: design.id == site.design_id, checked: design.id == site.design_id,
disabled: design.disabled, disabled: design.disabled,
required: true, class: 'custom-control-input' required: true, class: 'radio-toolbar'
= f.label "design_id_#{design.id}", design.name, = f.label "design_id_#{design.id}", " - #{design.name}",
class: 'custom-control-label' class: 'custom-control-label'
.flex-fill .flex-fill.des-description
= sanitize_markdown design.description, = sanitize_markdown design.description,
tags: %w[p a strong em] tags: %w[p a strong em]
.col-md-6.black-bg.col-sm-12
.col-md-6.col-sm-12
%h5.text-center.pb-3 Previsualizar Plantilla %h5.text-center.pb-3 Previsualizar Plantilla
.embed-responsive.embed-responsive-1by1 .embed-responsive.embed-responsive-1by1
%iframe.embed-responsive-item{allowfullscreen: "", src: "https://www.youtube.com/embed/zpOULjyy-n8?rel=0"} %iframe.embed-responsive-item{allowfullscreen: "", src: "https://www.youtube.com/embed/zpOULjyy-n8?rel=0"}
.col-md-3.black-bg.col.sm-12 .col-md-3.col.sm-12
%h5.pb-3 Características %h5.pb-3 Características
= @designs.first.inspect = @designs.first.inspect