<%= content_tag :header, as: "Post.Header", href: admin_post_image_path(@post), method: 'POST' do |header| %> <% if @post.header? %> <% header[:style] = "background-image: url(#{@post.header.url});" %> <% end %>
<%= content_tag :svg, method: 'DELETE', href: admin_post_image_path(@post), class: %w(clear), version: "1.1", xmlns: "http://www.w3.org/2000/svg", 'xmlns:xlink' => "http://www.w3.org/1999/xlink", x: "0px", y: "0px", viewBox: "0 0 20 20", 'enable-background' => "new 0 0 20 20", 'xml:space' => "preserve" do |svg| %> <% if !@post.header? %> <% svg.css << 'hidden' %> <% end %> <% end %> <%= link_to @post.title, admin_post_titles_path(@post), class: %w(title) %>

Set a header image. Either drop an image here or select an image.

<% end %>
<%= edit_content_tag(@post) do %> <%= h @post.content %> <% end %>
Done?

<%= link_to 'Look at the preview and publish it!', admin_post_path(@post) %>