5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-30 00:56:22 +00:00
panel/app/views/posts/template_field/_image.haml

14 lines
461 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-09-05 19:17:04 +00:00
required: template.required? && value.blank?,
2018-07-20 16:34:33 +00:00
multiple: template.multiple?,
accept: 'image/*'
- if template.multiple?
%small.text-muted.form-text= raw t('posts.image.multiple')