Commit 24988b65 by tady (Masato TADA)

Merge pull request #136 from tadyjp/fix-0905

fix design, hipchat notification on draft, user search link
parents 0f216c30 adfebd5d
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
.navbar-default .navbar-brand, .navbar-default .navbar-brand,
.label a { .label a {
color: white; // color: white;
} }
#app-search-form { #app-search-form {
......
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
@import url(http://fonts.googleapis.com/css?family=Flamenco:300,400); @import url(http://fonts.googleapis.com/css?family=Flamenco:300,400);
@import url(http://fonts.googleapis.com/css?family=Quicksand:300,400,700); @import url(http://fonts.googleapis.com/css?family=Quicksand:300,400,700);
p, h1, h2, h3, h4, h5, h6, span { p, h1, h2, h3, h4, h5, h6, span {
font-family: 'メイリオ', 'meiryo', hiragino kaku go; // font-family: 'メイリオ', 'meiryo', hiragino kaku go;
letter-spacing: 2pt; // letter-spacing: 2pt;
line-height: 150%; // line-height: 150%;
margin: 0; // margin: 0;
padding: 0; // padding: 0;
} }
.badge { .badge.badge-transparent {
background-color: transparent; background-color: transparent;
color: $main-color; color: $main-color;
font-family: 'Quicksand'; // font-family: 'Quicksand';
letter-spacing: 0; letter-spacing: 0;
border: 1.5px solid $main-color; border: 1.5px solid $main-color;
padding: 4px 6px; padding: 4px 6px;
......
...@@ -60,9 +60,13 @@ ...@@ -60,9 +60,13 @@
} }
.label-tag { .label-tag {
background-color: #e67e22; // background-color: #e67e22;
padding-top: 4px; padding-top: 4px;
font-weight: 300; // font-weight: 300;
background-color: transparent;
color: #75b3c8;
border: 1.5px solid #75b3c8;
padding: 4px 6px;
@include border_radius(20px); @include border_radius(20px);
} }
...@@ -112,11 +116,11 @@ ...@@ -112,11 +116,11 @@
dd { dd {
margin-bottom: 10px; margin-bottom: 10px;
} }
.label-tag { // .label-tag {
background-color: #e67e22; // background-color: #e67e22;
padding-top: 4px; // padding-top: 4px;
font-weight: 100; // // font-weight: 100;
} // }
} }
.comment-wrapper { .comment-wrapper {
......
...@@ -4,4 +4,9 @@ class UserDecorator < Draper::Decorator ...@@ -4,4 +4,9 @@ class UserDecorator < Draper::Decorator
def draft_count def draft_count
model.posts.where(is_draft: true).count model.posts.where(is_draft: true).count
end end
# URL for user thumbnail.
def image_url
model.image_url.presence || h.asset_path('face.jpg')
end
end end
module HipchatIntegration module HipchatIntegration
# Call Hipchat API # Call Hipchat API
def notify_hipchat! def notify_hipchat!
return if is_draft
client = HipChat::Client.new(Settings.hipchat.token) client = HipChat::Client.new(Settings.hipchat.token)
client[Settings.hipchat.room].send('Rendezvous', notify_hipchat_body, message_format:'text', notify: 1) client[Settings.hipchat.room].send('Rendezvous', notify_hipchat_body, message_format:'text', notify: 1)
end end
......
...@@ -38,4 +38,4 @@ ...@@ -38,4 +38,4 @@
- Tag.recent(10).each_with_index do |tag, i| - Tag.recent(10).each_with_index do |tag, i|
a.list-group-item data-tag-id=tag.id href=search_path(q: "##{tag.name}") a.list-group-item data-tag-id=tag.id href=search_path(q: "##{tag.name}")
= tag.name = tag.name
span.badge = tag.posts_count span.badge.badge-transparent = tag.posts_count
...@@ -16,7 +16,7 @@ a.list-group-item.post-list.mod-hover-hidden data-post-id=post.id href=post_path ...@@ -16,7 +16,7 @@ a.list-group-item.post-list.mod-hover-hidden data-post-id=post.id href=post_path
abbr.js-time-ago data-time-ago-at=post.updated_at abbr.js-time-ago data-time-ago-at=post.updated_at
|.&nbsp;&nbsp; |.&nbsp;&nbsp;
- post.tags.each do |tag| - post.tags.each do |tag|
span.label.label-success.label-tag #{tag.name} span.label.label-tag #{tag.name}
| &nbsp; | &nbsp;
.col-xs-4 .col-xs-4
small.pull-right small.pull-right
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
dl dl
dt 作成者 dt 作成者
dd dd
a href=(search_path(q: "@#{@post.author.name}")) a href=(search_path(q: "@#{@post.author.nickname}"))
| @#{@post.author.name} | @#{@post.author.name}
dt タグ dt タグ
...@@ -83,10 +83,10 @@ ...@@ -83,10 +83,10 @@
- @post.comments.each do |comment| - @post.comments.each do |comment|
li.media li.media
a.pull-left href="#" a.pull-left href="#"
img.media-object src=comment.author.image_url / img.media-object src=comment.author.decorate.image_url /
.media-body .media-body
h4.media-heading= comment.author.name h4.media-heading= comment.author.name
= comment.body = MarkdownRenderer.new(comment.body).render
= form_tag(comment_post_path, method: :post, data: { 'form-id' => "comment_#{@post.id}" }) do = form_tag(comment_post_path, method: :post, data: { 'form-id' => "comment_#{@post.id}" }) do
li.media li.media
a.pull-left href="#" a.pull-left href="#"
......
{ {
"Version": "2012-10-17", "Version": "2012-10-17",
"Id": "Rendezvous http referer policy", "Id": "Rendezvous IP policy",
"Statement": [ "Statement": [
{ {
"Sid": "Allow get requests referred by rendezvous", "Sid": "IPAllow",
"Effect": "Allow", "Effect": "Allow",
"Principal": "*", "Principal": "*",
"Action": "s3:GetObject", "Action": "s3:GetObject",
"Resource": "arn:aws:s3:::rendezvous-uploads/*", "Resource": "arn:aws:s3:::rendezvous-uploads/*",
"Condition": { "Condition": {
"StringLike": { "IpAddress": {
"aws:Referer": [ "aws:SourceIp": [
"http://localhost:3000/*", "111.111.111.111/32"
"http://rendezvous.*"
]
}
}
},
{
"Sid": "Explicit deny to ensure requests are allowed only from specific referer.",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::rendezvous-uploads/*",
"Condition": {
"StringNotLike": {
"aws:Referer": [
"http://localhost:3000/*",
"http://rendezvous.*"
] ]
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment