Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

まとめ詳細: ソーシャルボタンを追加 #54

Merged
merged 2 commits into from
Dec 15, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 28 additions & 6 deletions app/assets/stylesheets/matomes.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
@import "common";

$header_width: 960px;
$infomation_width: 600px;
$contribute_width: 300px;
$infomation_width: 760px;
$contribute_width: 200px;
$cover_size: 100px;

// header
Expand Down Expand Up @@ -69,6 +69,8 @@ $cover_size: 100px;
}

.meta {
vertical-align: middle;

.description {
margin-right: 0.5em;
}
Expand All @@ -79,7 +81,8 @@ $cover_size: 100px;
}

.user {
margin-top: 0.5em;
display: inline-block;
margin-top: 10px;

img {
vertical-align: middle;
Expand All @@ -93,9 +96,6 @@ $cover_size: 100px;
.name {
font-weight: bold;
}

.title {
}
}

#edit {
Expand Down Expand Up @@ -231,6 +231,28 @@ $cover_size: 100px;
}
}

// social button
#matome .social {
display: inline-block;
margin-top: 3px;
margin-left: 10px;
height: 26px;
max-width: 330px;
vertical-align: middle;
white-space: nowrap;
overflow: hidden;

li {
display: inline-block;
margin-right: 5px;
margin-bottom: 5px;

&.twitter {
width: 90px;
}
}
}

// dialog
#matome_dialog {
img {
Expand Down
2 changes: 1 addition & 1 deletion app/views/base/_mixi_button.html.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<div data-plugins-type="mixi-favorite" data-service-key="<%= Settings.mixi_key %>" data-size="medium" data-href="" data-show-faces="false" data-show-count="true" data-show-comment="true" data-width=""></div>
<div data-plugins-type="mixi-favorite" data-service-key="<%= Settings.mixi_key %>" data-size="medium" data-href="<%= url_for id: target ||= nil, only_path: false %>" data-show-faces="false" data-show-count="true" data-show-comment="true" data-width=""></div>
<script type="text/javascript">$(document).ajaxComplete(function() { try{ $('[data-plugins-type="mixi-favorite"]:empty').each(function(i, element) { new __MIXI_PLUGINS__.FavoriteFrame(element); }); } catch(e) {} });</script>
2 changes: 1 addition & 1 deletion app/views/clips/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
li.facebook
== render partial: '/base/facebook_button', locals: { target: @clip }
li.mixi
== render partial: '/base/mixi_button'
== render partial: '/base/mixi_button', locals: { target: @clip }

.other_info
- if user_signed_in? && @clip.user_id == current_user.id
Expand Down
20 changes: 15 additions & 5 deletions app/views/matomes/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,26 @@
= link_to 'まとめを編集', edit_matome_path(@matome)
.text
h1 = @matome.title
p.meta
.meta
- if @matome.description.present?
span.description = @matome.description
span.updated_at
| 更新日:
= I18n.l @matome.updated_at.to_date, format: :long
p.user
span.avatar = link_to_user_by_avatar(@matome.user)
span.name = "#{@matome.user.nick_name}"
span.title さん
.meta
.user
span.avatar = link_to_user_by_avatar(@matome.user)
span.name = link_to @matome.user.nick_name, user_path(@matome.user)
span.title さん
.social
ul
li.twitter
== render partial: '/base/twitter_button', locals: { target: @matome }
li.facebook
== render partial: '/base/facebook_button', locals: { target: @matome }
li.mixi
== render partial: '/base/mixi_button', locals: { target: @matome }

.contribute
p.meta
.like
Expand Down