mirror of
https://0xacab.org/sutty/sutty
synced 2025-02-24 04:31:49 +00:00
Merge branch 'usar-sutty-editor' into panel.sutty.nl
This commit is contained in:
commit
84e77bdbc0
4 changed files with 32 additions and 3 deletions
|
@ -516,3 +516,32 @@ $bezier: cubic-bezier(0.75, 0, 0.25, 1);
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
p { min-height: $font-size-base * $line-height-base; }
|
||||
h1 { min-height: $h1-font-size * $headings-line-height; }
|
||||
h2 { min-height: $h2-font-size * $headings-line-height; }
|
||||
h3 { min-height: $h3-font-size * $headings-line-height; }
|
||||
h4 { min-height: $h4-font-size * $headings-line-height; }
|
||||
h5 { min-height: $h5-font-size * $headings-line-height; }
|
||||
h6 { min-height: $h6-font-size * $headings-line-height; }
|
||||
|
||||
iframe { border: 0; }
|
||||
|
||||
audio { width: 100%; }
|
||||
|
||||
img,
|
||||
video,
|
||||
iframe {
|
||||
@extend .img-fluid;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
& > * {
|
||||
margin-bottom: 1rem;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -207,7 +207,7 @@ MetadataTemplate = Struct.new(:site, :document, :name, :label, :type,
|
|||
|
||||
def allowed_tags
|
||||
@allowed_tags ||= %w[strong em del u mark p h1 h2 h3 h4 h5 h6 ul ol li img iframe audio video div figure blockquote
|
||||
figcaption a sub sup small table thead tbody tfoot tr th td].freeze
|
||||
figcaption a sub sup small table thead tbody tfoot tr th td br].freeze
|
||||
end
|
||||
|
||||
# Decifra el valor
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
= render 'posts/attribute_feedback',
|
||||
post: post, attribute: attribute, metadata: metadata
|
||||
|
||||
.new-editor{ id: attribute }
|
||||
.new-editor.content{ id: attribute }
|
||||
= text_area_tag "#{base}[#{attribute}]", metadata.value.html_safe,
|
||||
dir: dir, lang: locale,
|
||||
**field_options(attribute, metadata), class: 'd-none'
|
||||
|
|
|
@ -37,5 +37,5 @@
|
|||
- next if metadata.front_matter?
|
||||
|
||||
- cache [metadata, I18n.locale] do
|
||||
%section.editor{ id: attr, dir: dir }
|
||||
%section.content.pb-3{ id: attr, dir: dir }
|
||||
= @post.public_send(attr).value.html_safe
|
||||
|
|
Loading…
Reference in a new issue