diff options
author | Rhenium <rhenium@rhe.jp> | 2014-02-20 20:36:51 +0900 |
---|---|---|
committer | Rhenium <rhenium@rhe.jp> | 2014-02-20 20:36:51 +0900 |
commit | e0d3da8ccadc46099ad05e838b84d4fc06c995e9 (patch) | |
tree | 61447cc9da2d26b17fa5b895be786c20444968e3 /app/views/layouts/_base.html.haml | |
parent | 33689cbce02d01aa59aab7d2aaba9e7127aacd9f (diff) | |
download | aclog-e0d3da8ccadc46099ad05e838b84d4fc06c995e9.tar.gz |
apply rot's new web design
Diffstat (limited to 'app/views/layouts/_base.html.haml')
-rw-r--r-- | app/views/layouts/_base.html.haml | 73 |
1 files changed, 59 insertions, 14 deletions
diff --git a/app/views/layouts/_base.html.haml b/app/views/layouts/_base.html.haml index 58b83f8..1a4a203 100644 --- a/app/views/layouts/_base.html.haml +++ b/app/views/layouts/_base.html.haml @@ -2,28 +2,73 @@ %html{xmlns: "http://www.w3.org/1999/xhtml"} %head %title= yield :title + %meta{name: "viewport", content: "width=device-width"} + %meta{"http-equiv" => "X-UA-Compatible", content: "IE=edge,chrome=1"} + %link{rel: "shortcut icon", href: image_path("favicon.ico")} + %link{rel: "apple-touch-icon-precomposed", href: image_path("apple-touch-icon-precomposed.png")} + %meta{name: "msapplication-TileImage", content: image_path("tile-image.png")} + %meta{name: "msapplication-TileColor", content: "#f0eadb"} = stylesheet_link_tag "application", media: "all" = javascript_include_tag "application" - = javascript_include_tag params[:controller] - %meta{name: "viewport", content: "width=600px"} - if @next_url %link{rel: "next", href: @next_url} - if @prev_url %link{rel: "prev", href: @prev_url} - %body - .navbar.navbar-default.navbar-static-top + %body{data: { controller: controller.controller_path, action: controller.action_name }} + %nav.navbar.navbar-static-top .container .navbar-header + %button.navbar-toggle{type: "button", data: { toggle: "collapse", target: "#menu" }} + %span.sr-only Toggle navigation + %span.icon-bar + %span.icon-bar + %span.icon-bar = link_to "aclog", root_path, class: "navbar-brand" - .navbar-right - %ul.nav.navbar-nav - %li - = link_to "about", about_path + #menu.collapse.navbar-collapse + %ul.nav.navbar-nav.navbar-right + %li.dropdown + %a.dropdown-toggle{href: "#", data: { toggle: "dropdown" }} + All + %b.caret + %ul.dropdown-menu + %li + = link_to "Best", best_path + %li + = link_to "Recent", recent_path + %li + = link_to "Timeline", timeline_path + %li.dropdown + %a.dropdown-toggle{href: "#", data: { toggle: "dropdown" }, onclick: "setTimeout(function() { $(\"#jump_to\").focus(); }, 0)"} + User + %b.caret + %form.dropdown-menu + .input-group + %input.form-control{id: "jump_to", type: "text", placeholder: "Screen name"} + %span.input-group-btn + %button.btn{type: "submit", onclick: "this.form.action = \"#{user_path(":screen_name")}\".replace(\":screen_name\", $(\"#jump_to\").val()); this.form.submit();"} Go - if logged_in? - %li= link_to "settings", settings_path - %li= link_to "logout", logout_path - %li= link_to "@" + session[:account].user.screen_name, user_path(session[:account].user.screen_name) + %li.dropdown + %a.dropdown-toggle{href: "#", data: { toggle: "dropdown" }} + %img{src: current_user.profile_image_url, alt: "@" + current_user.screen_name, height: "24", width: "24"} + %b.caret + %ul.dropdown-menu + %li + = link_to "Best", user_path(current_user.screen_name) + %li + = link_to "Timeline", user_timeline_path(current_user.screen_name) + %li + = link_to "Discoveries", user_discoveries_path(current_user.screen_name) + %li + = link_to "Discovered by", user_discovered_by_path(current_user.screen_name) + %li + = link_to "Discovered users", user_discovered_users_path(current_user.screen_name) + %li.divider + %li + = link_to "Setting", settings_path + %li + = link_to "API", about_api_path + %li + = link_to "Sign out", logout_path - else - %li= link_to "login", "/i/login?redirect_after_login=" + CGI.escape(request.fullpath) - .container - = yield + %li= link_to "Sign in", "/i/login?redirect_after_login=" + CGI.escape(request.fullpath), class: "signup" + = yield |