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

Commit

Permalink
まとめ詳細: ソーシャルボタンを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
YOSHIDA Hiroki committed Dec 15, 2013
1 parent 6f52367 commit 07d3681
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 11 deletions.
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
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

0 comments on commit 07d3681

Please sign in to comment.