From 295db76b7643868456eafb98cf760a5e383b41ed Mon Sep 17 00:00:00 2001 From: re4k Date: Thu, 28 Mar 2013 02:11:40 +0900 Subject: Refactor --- app/views/layouts/_base.html.haml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 app/views/layouts/_base.html.haml (limited to 'app/views/layouts/_base.html.haml') diff --git a/app/views/layouts/_base.html.haml b/app/views/layouts/_base.html.haml new file mode 100644 index 0000000..eab9eb2 --- /dev/null +++ b/app/views/layouts/_base.html.haml @@ -0,0 +1,21 @@ +!!! xml +%html{xmlns: "http://www.w3.org/1999/xhtml"} + %head + %title= @title + = stylesheet_link_tag "application" + %body + .navbar.navbar-static-top + .navbar-inner + .container + .brand + = link_to "aclog", :controller => "main", :action => "index" + %ul.nav.pull-right + %li + = link_to "about", :controller => "main", :action => "about" + - if session[:screen_name] + %li= link_to "logout", :controller => "sessions", :action => "destroy" + %li= link_to "@#{session[:screen_name]}", :controller => "users", :action => "best", :screen_name => session[:screen_name] + - else + %li= link_to "login", "/i/login" + .container + = yield -- cgit v1.2.3