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

14 lines
441 B
Text
Raw Normal View History

2018-07-02 22:07:06 +00:00
- if @post.url? name
2018-07-20 18:17:34 +00:00
.row
- [@post.get_front_matter(name)].flatten.each do |url|
.col
%img.img-fluid{src: @site.get_url_for_sutty(url)}
2018-07-20 16:34:33 +00:00
- name = [name,''] if template.multiple?
2018-07-02 20:45:32 +00:00
= file_field_tag field_name_for_post_as_string(name),
class: 'form-control',
2018-07-20 16:34:33 +00:00
required: template.required?,
multiple: template.multiple?,
accept: 'image/*'
- if template.multiple?
%small.text-muted.form-text= t('posts.image.multiple')