5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 03:31:42 +00:00
panel/app/views/posts/template_field/_image.haml

13 lines
461 B
Text

- if @post.url? name
.row
- [@post.get_front_matter(name)].flatten.each do |url|
.col
%img.img-fluid{src: @site.get_url_for_sutty(url)}
- name = [name,''] if template.multiple?
= file_field_tag field_name_for_post_as_string(name),
class: 'form-control',
required: template.required? && value.blank?,
multiple: template.multiple?,
accept: 'image/*'
- if template.multiple?
%small.text-muted.form-text= raw t('posts.image.multiple')