diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 649c272d..818ebbd5 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -515,3 +515,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; + } + } +} diff --git a/app/views/posts/show.haml b/app/views/posts/show.haml index e46114af..da3dd16a 100644 --- a/app/views/posts/show.haml +++ b/app/views/posts/show.haml @@ -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