app/views/static_pages/home.html.haml
= provide(:title,'Home')
- if logged_in?
%div{class: 'row'}
%aside{class: 'col-md-4'}
%section{class: 'user_info'}
= render 'shared/user_info'
%section{class: 'stats'}
= render 'shared/stats'
%section{class: 'micropost_form'}
= render 'shared/micropost_form'
%div{class: 'col-md-8'}
%h3 Micropost Feed
= form_with url: root_path, method: 'get', data: {remote: false} do
%p
=text_field_tag :search, params[:search]
=submit_tag 'Search', name: nil
= render 'shared/feed'
- else
%div{class:'center jumbotron'}
%h1 Welcome to the sample App
%h2
This is the home page for the
%a(href='http://railstutorial.jp/')
Ruby on Rails Tutorial sample application
= link_to 'Sign up now', signup_path, class: 'btn btn-lg btn-primary'
= link_to image_tag('rails.png', alt: 'Rails logo'), 'http://rubyonrails.org/'