Skip to content

Commit

Permalink
fix design, hipchat notification on draft, user search link
Browse files Browse the repository at this point in the history
  • Loading branch information
tady committed Sep 5, 2014
1 parent 0f216c3 commit adfebd5
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 41 deletions.
Binary file added app/assets/images/face.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/app.css.scss
Expand Up @@ -9,7 +9,7 @@

.navbar-default .navbar-brand,
.label a {
color: white;
// color: white;
}

#app-search-form {
Expand Down
14 changes: 7 additions & 7 deletions app/assets/stylesheets/basic.css.scss
Expand Up @@ -2,17 +2,17 @@
@import url(http://fonts.googleapis.com/css?family=Flamenco:300,400);
@import url(http://fonts.googleapis.com/css?family=Quicksand:300,400,700);
p, h1, h2, h3, h4, h5, h6, span {
font-family: 'メイリオ', 'meiryo', hiragino kaku go;
letter-spacing: 2pt;
line-height: 150%;
margin: 0;
padding: 0;
// font-family: 'メイリオ', 'meiryo', hiragino kaku go;
// letter-spacing: 2pt;
// line-height: 150%;
// margin: 0;
// padding: 0;
}

.badge {
.badge.badge-transparent {
background-color: transparent;
color: $main-color;
font-family: 'Quicksand';
// font-family: 'Quicksand';
letter-spacing: 0;
border: 1.5px solid $main-color;
padding: 4px 6px;
Expand Down
18 changes: 11 additions & 7 deletions app/assets/stylesheets/flow.css.scss
Expand Up @@ -60,9 +60,13 @@
}

.label-tag {
background-color: #e67e22;
// background-color: #e67e22;
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);
}

Expand Down Expand Up @@ -112,11 +116,11 @@
dd {
margin-bottom: 10px;
}
.label-tag {
background-color: #e67e22;
padding-top: 4px;
font-weight: 100;
}
// .label-tag {
// background-color: #e67e22;
// padding-top: 4px;
// // font-weight: 100;
// }
}

.comment-wrapper {
Expand Down
5 changes: 5 additions & 0 deletions app/decorators/user_decorator.rb
Expand Up @@ -4,4 +4,9 @@ class UserDecorator < Draper::Decorator
def draft_count
model.posts.where(is_draft: true).count
end

# URL for user thumbnail.
def image_url
model.image_url.presence || h.asset_path('face.jpg')
end
end
2 changes: 2 additions & 0 deletions app/models/concerns/hipchat_integration.rb
@@ -1,6 +1,8 @@
module HipchatIntegration
# Call Hipchat API
def notify_hipchat!
return if is_draft

client = HipChat::Client.new(Settings.hipchat.token)
client[Settings.hipchat.room].send('Rendezvous', notify_hipchat_body, message_format:'text', notify: 1)
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/flow/show.html.slim
Expand Up @@ -38,4 +38,4 @@
- Tag.recent(10).each_with_index do |tag, i|
a.list-group-item data-tag-id=tag.id href=search_path(q: "##{tag.name}")
= tag.name
span.badge = tag.posts_count
span.badge.badge-transparent = tag.posts_count
2 changes: 1 addition & 1 deletion app/views/posts/_large_item.html.slim
Expand Up @@ -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
|.&nbsp;&nbsp;
- post.tags.each do |tag|
span.label.label-success.label-tag #{tag.name}
span.label.label-tag #{tag.name}
| &nbsp;
.col-xs-4
small.pull-right
Expand Down
6 changes: 3 additions & 3 deletions app/views/posts/show.html.slim
Expand Up @@ -40,7 +40,7 @@
dl
dt 作成者
dd
a href=(search_path(q: "@#{@post.author.name}"))
a href=(search_path(q: "@#{@post.author.nickname}"))
| @#{@post.author.name}

dt タグ
Expand Down Expand Up @@ -83,10 +83,10 @@
- @post.comments.each do |comment|
li.media
a.pull-left href="#"
img.media-object src=comment.author.image_url /
img.media-object src=comment.author.decorate.image_url /
.media-body
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
li.media
a.pull-left href="#"
Expand Down
26 changes: 5 additions & 21 deletions config/aws-s3-bucket-policy.json
@@ -1,33 +1,17 @@
{
"Version": "2012-10-17",
"Id": "Rendezvous http referer policy",
"Id": "Rendezvous IP policy",
"Statement": [
{
"Sid": "Allow get requests referred by rendezvous",
"Sid": "IPAllow",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::rendezvous-uploads/*",
"Condition": {
"StringLike": {
"aws:Referer": [
"http://localhost:3000/*",
"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.*"
"IpAddress": {
"aws:SourceIp": [
"111.111.111.111/32"
]
}
}
Expand Down

0 comments on commit adfebd5

Please sign in to comment.