- content_for :title, "#{@seed.owner}'s #{@seed.crop} seeds"
- content_for :opengraph do
  = tag("meta", property: "og:image", content: seed_image_path(@seed))
  - if @seed.description
    = tag("meta", property: "og:description", content: og_description(@seed.description))
  = tag("meta", property: "og:image", content: "#{@seed.owner}'s #{@seed.crop} seeds")
  = tag("meta", property: "og:type", content: "website")
  = tag("meta", property: "og:url", content: request.original_url)
  = tag("meta", property: "og:site_name", content: ENV['GROWSTUFF_SITE_NAME'])


- content_for :breadcrumbs do
  %li.breadcrumb-item= link_to 'Seeds', seeds_path
  %li.breadcrumb-item= link_to @seed.owner, member_seeds_path(@seed.owner)
  %li.breadcrumb-item.active= link_to @seed, @seed

.seed
  .row
    .col-md-9.col-12
      .jumbotron
        .d-flex.justify-content-between
          %h1.display-3
            = crop_icon(@seed.crop)
            = @seed.crop.name.titleize
            seeds
          %span.text-muted= I18n.l @seed.created_at.to_date
        - if @seed.organic != 'unknown'
          .badge.badge-success.seedtitle--organic= @seed.organic
        - if @seed.gmo != 'unknown'
          .badge.badge-success.seedtitle--gmo= @seed.gmo
        - if @seed.heirloom != 'unknown'
          .badge.badge-success.seedtitle--heirloom= @seed.heirloom
        - if @seed.parent_planting
          %p
            Saved from planting:
            = planting_icon
            = link_to @seed.parent_planting, planting_path(@seed.parent_planting)
      = render 'seeds/actions', seed: @seed

      %section= render 'facts', seed: @seed

      - unless @seed.description.blank?
        = cute_icon
        .card.seed--description
          .card-header
            %h2 Notes
          .card-body
            :markdown
              #{strip_tags markdownify(@seed.description)}

      - if current_member
        - if @seed.tradable && current_member != @seed.owner
          %p= link_to "Request seeds",
                      new_message_path(recipient_id: @seed.owner.id,
                                           subject: "Interested in your #{@seed.crop} seeds"),
                      class: 'btn btn-primary'
      - else
        = render 'shared/signin_signup', to: 'request seeds'

      %section.plantings
        = render 'seeds/descendants', seed: @seed
      %section.seed-photos
        - @photos.each do |photo|
          = render 'photos/hero', photo: photo

    .col-md-3.col-12
      = render 'seeds/owner'
      = render @seed.crop
