diff options
author | Rhenium <rhenium@rhe.jp> | 2013-11-16 08:40:48 +0900 |
---|---|---|
committer | Rhenium <rhenium@rhe.jp> | 2013-11-16 08:40:48 +0900 |
commit | 48f70e75859f70bce7fe43f34b7e40094fc85b5c (patch) | |
tree | 9c5a6a9c5124bd77ead1f36ebdfe608d150de638 | |
parent | d543f3d130394bbf66f2374eee4955150cf7c958 (diff) | |
download | aclog-48f70e75859f70bce7fe43f34b7e40094fc85b5c.tar.gz |
fix html; bootstrap 3
-rw-r--r-- | app/views/layouts/_base.html.haml | 25 | ||||
-rw-r--r-- | app/views/layouts/application.html.haml | 4 | ||||
-rw-r--r-- | app/views/settings/index.html.haml | 13 | ||||
-rw-r--r-- | app/views/shared/sidebar/_i.html.haml | 27 | ||||
-rw-r--r-- | app/views/shared/sidebar/_users.html.haml | 66 | ||||
-rw-r--r-- | app/views/tweets/_tweet.html.haml | 4 | ||||
-rw-r--r-- | app/views/users/_user_ranking.html.haml | 2 |
7 files changed, 64 insertions, 77 deletions
diff --git a/app/views/layouts/_base.html.haml b/app/views/layouts/_base.html.haml index da8a8bc..529da66 100644 --- a/app/views/layouts/_base.html.haml +++ b/app/views/layouts/_base.html.haml @@ -9,18 +9,17 @@ %meta{name: "viewport", content: "width=device-width, initial-scale=1.0"} %body .navbar.navbar-static-top - .navbar-inner - .container - .brand - = link_to "aclog", root_path - %ul.nav.pull-right - %li - = link_to "about", about_path - - 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) - - else - %li= link_to "login", "/i/login" + .navbar-header + = link_to "aclog", root_path, class: "navbar-brand" + .navbar-collapse.collapse + %ul.nav.navbar-nav.navbar-right + %li + = link_to "about", about_path + - 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) + - else + %li= link_to "login", "/i/login" .container = yield diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 99357d1..47a77ac 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -1,7 +1,7 @@ = render layout: "layouts/base" do .row - .span2 + .col-sm-3 .sidebar= render partial: "shared/sidebar/#{sidebar_type}" - .span10 + .col-sm-9 %h1= caption = yield diff --git a/app/views/settings/index.html.haml b/app/views/settings/index.html.haml index 0b334cb..22f631f 100644 --- a/app/views/settings/index.html.haml +++ b/app/views/settings/index.html.haml @@ -1,10 +1,13 @@ %h1 settings = form_tag "/i/settings/update", method: :post do - = check_box_tag :notification, true, @account.notification - = label_tag :notification, t("views.settings.enable_notification") - = check_box_tag :private, true, @account.private - = label_tag :private, t("views.settings.hide_best") - = submit_tag + .checkbox + = check_box_tag :notification, true, @account.notification + = label_tag :notification, t("views.settings.enable_notification") + .checkbox + = check_box_tag :private, true, @account.private + = label_tag :private, t("views.settings.hide_best") + .form-group + = submit_tag "Submit", class: "btn btn-default" = link_to t("views.settings.confirm_deactivation"), controller: "settings", action: "confirm_deactivation" diff --git a/app/views/shared/sidebar/_i.html.haml b/app/views/shared/sidebar/_i.html.haml index 1b7f893..5461916 100644 --- a/app/views/shared/sidebar/_i.html.haml +++ b/app/views/shared/sidebar/_i.html.haml @@ -1,17 +1,10 @@ -%ul.nav.nav-tabs.nav-stacked - %li - = link_to "about", about_path - %li - = link_to "api", about_api_path - %li - = link_to "search help", help_search_path -%ul.nav.nav-tabs.nav-stacked - %li - = link_to "search", search_path -%ul.nav.nav-tabs.nav-stacked - %li - = link_to "best", best_path - %li - = link_to "recent", recent_path - %li - = link_to "timeline", timeline_path +.list-group + = link_to "about", about_path, class: "list-group-item" + = link_to "api", about_api_path, class: "list-group-item" + = link_to "search help", help_search_path, class: "list-group-item" +.list-group + = link_to "search", search_path, class: "list-group-item" +.list-group + = link_to "best", best_path, class: "list-group-item" + = link_to "recent", recent_path, class: "list-group-item" + = link_to "timeline", timeline_path, class: "list-group-item" diff --git a/app/views/shared/sidebar/_users.html.haml b/app/views/shared/sidebar/_users.html.haml index 711ee27..97ce1a3 100644 --- a/app/views/shared/sidebar/_users.html.haml +++ b/app/views/shared/sidebar/_users.html.haml @@ -1,37 +1,29 @@ -.sidebar - .avatar - = link_to user_path(@user.screen_name) do - = image_tag @user.profile_image_url_original, alt: @user.screen_name, width: 64, height: 64, class: "icon img-rounded" - .screen_name= link_to @user.screen_name, twitter_user_url(@user.screen_name) - - if @user.registered? && @user.account.active? - %ul.records - %li - %span reactions - %span.data= @user.stats.reactions_count - %li - %span average - %span.data= @user.stats.average_reactions_count.round(2) - %li - %span joined - %span.data= @user.stats.since_join.to_s + "d ago" - - else - .alert.alert-info - = "@#{@user.screen_name} #{t("views.sidebar.user_not_registered")}" - .user_nav - %ul.nav.nav-tabs.nav-stacked - - if authorized_to_show_best?(@user) - %li - = link_to "best", user_path(@user.screen_name) - %li - = link_to "timeline", user_timeline_path(@user.screen_name) - %li - = link_to "discoveries", user_discoveries_path(@user.screen_name) - %li - = link_to "discovered by", user_discovered_by_path(@user.screen_name) - %li - = link_to "discovered users", user_discovered_users_path(@user.screen_name) - - else - %li - = link_to "timeline", user_path(@user.screen_name) - %li - = link_to "discoveries", user_discoveries_path(@user.screen_name) +.avatar + = link_to user_path(@user.screen_name) do + = image_tag @user.profile_image_url_original, alt: @user.screen_name, width: 64, height: 64, class: "icon img-rounded" +.screen_name= link_to @user.screen_name, twitter_user_url(@user.screen_name) +- if @user.registered? && @user.account.active? + %ul.list-group.records + %li + %span reactions + %span.data= @user.stats.reactions_count + %li + %span average + %span.data= @user.stats.average_reactions_count.round(2) + %li + %span joined + %span.data= @user.stats.since_join.to_s + "d ago" +- else + .alert.alert-info + = "@#{@user.screen_name} #{t("views.sidebar.user_not_registered")}" +.user_nav + .list-group + - if authorized_to_show_best?(@user) + = link_to "best", user_path(@user.screen_name), class: "list-group-item" + = link_to "timeline", user_timeline_path(@user.screen_name), class: "list-group-item" + = link_to "discoveries", user_discoveries_path(@user.screen_name), class: "list-group-item" + = link_to "discovered by", user_discovered_by_path(@user.screen_name), class: "list-group-item" + = link_to "discovered users", user_discovered_users_path(@user.screen_name), class: "list-group-item" + - else + = link_to "timeline", user_path(@user.screen_name), class: "list-group-item" + = link_to "discoveries", user_discoveries_path(@user.screen_name), class: "list-group-item" diff --git a/app/views/tweets/_tweet.html.haml b/app/views/tweets/_tweet.html.haml index 19604ef..e2cd7fe 100644 --- a/app/views/tweets/_tweet.html.haml +++ b/app/views/tweets/_tweet.html.haml @@ -4,7 +4,7 @@ .avatar = link_to user_path(tweet.user.screen_name) do = image_tag tweet.user.profile_image_url, alt: tweet.user.screen_name, title: tweet.user.name - %ul.inline.actions + %ul.list-inline.actions %li.twitter = link_to image_tag("reply.png", alt: "reply"), "https://twitter.com/intent/tweet?in_reply_to=#{tweet.id}" = link_to image_tag("retweet.png", alt: "retweet"), "https://twitter.com/intent/retweet?tweet_id=#{tweet.id}" @@ -38,7 +38,7 @@ %span.count= count %span.type= title %dd - %ul.inline + %ul.list-inline - users.limit(html_favoriters_limit).each do |m| %li - if !m.protected? || session[:user_id] == m.id || session[:user_id] == tweet.user.id diff --git a/app/views/users/_user_ranking.html.haml b/app/views/users/_user_ranking.html.haml index 7ee34cc..5c27924 100644 --- a/app/views/users/_user_ranking.html.haml +++ b/app/views/users/_user_ranking.html.haml @@ -1,5 +1,5 @@ .users - %ul.inline + %ul.list-inline - @result.each do |user_id, favorites_count, retweets_count| - target = User.find(user_id) %li |