diff options
author | Rhenium <rhenium@rhe.jp> | 2014-02-22 00:15:11 +0900 |
---|---|---|
committer | Rhenium <rhenium@rhe.jp> | 2014-02-22 00:15:11 +0900 |
commit | edfd74b8e73a25259a4d0647d5e80850b072c354 (patch) | |
tree | 935bb155363d03ceecd68bc6f60f99d563c34d99 /app/views/layouts/_base.html.haml | |
parent | a0b2bf615d094d714e6a37bfe9895c3e49c8769d (diff) | |
download | aclog-edfd74b8e73a25259a4d0647d5e80850b072c354.tar.gz |
fix top page: don't collapse navbar
Diffstat (limited to 'app/views/layouts/_base.html.haml')
-rw-r--r-- | app/views/layouts/_base.html.haml | 86 |
1 files changed, 40 insertions, 46 deletions
diff --git a/app/views/layouts/_base.html.haml b/app/views/layouts/_base.html.haml index 1a4a203..4c3517d 100644 --- a/app/views/layouts/_base.html.haml +++ b/app/views/layouts/_base.html.haml @@ -17,58 +17,52 @@ %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 + .nav.navbar-nav.navbar-left = link_to "aclog", root_path, class: "navbar-brand" - #menu.collapse.navbar-collapse - %ul.nav.navbar-nav.navbar-right + %ul.nav.navbar-nav.navbar-right + %li.dropdown.omittable + %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.omittable + %a.dropdown-toggle#jump_to_dropdown_toggle{href: "#", data: { toggle: "dropdown" }} + User + %b.caret + %form.dropdown-menu#jump_to_form + .input-group + %input.form-control{id: "jump_to_textbox", type: "text", placeholder: "Username"} + %span.input-group-btn + %button.btn{type: "submit"} Go + - if logged_in? %li.dropdown %a.dropdown-toggle{href: "#", data: { toggle: "dropdown" }} - All + %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", best_path + = link_to "Best", user_path(current_user.screen_name) %li - = link_to "Recent", recent_path + = link_to "Timeline", user_timeline_path(current_user.screen_name) %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.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 "Sign in", "/i/login?redirect_after_login=" + CGI.escape(request.fullpath), class: "signup" + = 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 "Sign in", "/i/login?redirect_after_login=" + CGI.escape(request.fullpath), method: :post, class: "signup" = yield |