diff options
author | re4k <re4k@re4k.info> | 2013-03-28 02:11:40 +0900 |
---|---|---|
committer | re4k <re4k@re4k.info> | 2013-03-28 02:11:40 +0900 |
commit | 295db76b7643868456eafb98cf760a5e383b41ed (patch) | |
tree | 054845af698810440ce1b96324618fb05ee67cb2 /app/views/layouts | |
parent | b4972590475eb595bc88f6ee47125fe8ca6e1fb2 (diff) | |
download | aclog-295db76b7643868456eafb98cf760a5e383b41ed.tar.gz |
Refactor
Diffstat (limited to 'app/views/layouts')
-rw-r--r-- | app/views/layouts/_base.html.haml | 21 | ||||
-rw-r--r-- | app/views/layouts/index.html.haml | 2 |
2 files changed, 23 insertions, 0 deletions
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 diff --git a/app/views/layouts/index.html.haml b/app/views/layouts/index.html.haml new file mode 100644 index 0000000..4c0da9c --- /dev/null +++ b/app/views/layouts/index.html.haml @@ -0,0 +1,2 @@ += render :layout => "layouts/base" do + = yield |