- provide :title, 'Projects'

.page-header
  %h1
    = yield :title
    = link_to new_project_path, class: 'btn btn-primary' do
      %span.glyphicon.glyphicon-plus
      Add new Project

- if @projects.any?
  %table.table.table-striped
    %thead
      %tr
        %th Name
        %th Viewports
        %th
          = succeed 's' do
            %abbr.initialism{ title: 'Uniform Resource Locators' } URL

    %tbody
      - @projects.each do |project|
        %tr{ data: { keyboard_focusable: true } }
          %td= link_to project.name, project, class: 'url-multiline'
          %td= project.viewports.map(&:to_s).join(', ')
          %td.numeric= project.urls.size

- provide :title, 'Projects'

- if @projects.any?
  .page-header
    %h1
      = yield :title
      = link_to new_project_path, class: 'btn btn-primary' do
        %span.glyphicon.glyphicon-plus
        Add new Project

  %table.table.table-striped
    %thead
      %tr
        %th Name
        %th Viewports
        %th
          = succeed 's' do
            %abbr.initialism{ title: 'Uniform Resource Locators' } URL

    %tbody
      - @projects.each do |project|
        %tr{ data: { keyboard_focusable: true } }
          %td= link_to project.name, project, class: 'url-multiline'
          %td= project.viewports.map(&:to_s).join(', ')
          %td.numeric= project.urls.size
- else
  -# There are no projects
  .jumbotron
    %h1 Hello, nice to meet you.

    %p
      Thanks for using Diffux! If you happen to bump into a problem or think of
      a feature you'd like to see,
      = succeed '.' do
        = link_to "we'd love to hear about it",
                  'https://github.com/trotzig/diffux/issues'
      And, if you are the coding type, we'd be delighted to accept your pull
      requests.

    %p
      First, you'll want to create a new project and give it some viewport
      widths and URLs to snapshot.

    %p
      = link_to new_project_path, class: 'btn btn-primary' do
        %span.glyphicon.glyphicon-plus
        Add new Project

Add friendly intro jumbotron to main page
Add friendly intro jumbotron to main page

When people first set up Diffux, they were previously presented with a
more or less blank page. While this worked, it wasn't very friendly. I'd
like to start people off on the right foot, so if they don't have any
projects yet, I think it would be nice to show a friendly message
welcoming them to the app and gives them a link to help encourage
contributions.

The copy that I wrote is just a pretty rough first draft, but I figured
it was better than what we had before, so I'm shipping it.

Change-Id: I97e5241497d82dc435591a5cd9a7a7923d8b7988
