Commit 79670397 by tady (Masato TADA)

Merge pull request #129 from tadyjp/fix-bug-and-style

[WIP] バグ修正、スタイル修正
parents 2b94977d f2cee638
# Desc
# .mod-image-style以下のimgタグにstyle用のclassをつける
# Usage:
# Example:
$ ->
$('.mod-image-style').find('img').addClass('img-thumbnail')
$('.mod-image-style').find('img').parent('a')
.append("""<button type="button" class="btn btn-info btn-lg">
<span class="glyphicon glyphicon-share"></span> Open in New Tab
</button>""")
.mod-image-style {
a {
position: relative;
}
a button {
position: absolute;
top: 50%;
left: 50%;
margin-left: -105px;
margin-top: -23px;
background: white;
}
}
// Place all the styles related to the watchings controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
...@@ -23,6 +23,7 @@ class PostsController < ApplicationController ...@@ -23,6 +23,7 @@ class PostsController < ApplicationController
def fork def fork
@post = set_post.generate_fork(current_user) @post = set_post.generate_fork(current_user)
@post.tags.destroy Tag.find_by(name: 'template')
render action: 'new' render action: 'new'
end end
......
...@@ -15,15 +15,15 @@ class TagDecorator < Draper::Decorator ...@@ -15,15 +15,15 @@ class TagDecorator < Draper::Decorator
# tagページのURL # tagページのURL
# urlエンコードを施す # urlエンコードを施す
def show_path def show_path
h.tag_path(name: h.url_encode(model.name)) h.tag_path(name: model.name)
end end
def edit_path def edit_path
h.edit_tag_path(name: h.url_encode(model.name)) h.edit_tag_path(name: model.name)
end end
def event_tag_path def event_tag_path
h.event_tag_path(name: h.url_encode(model.name)) h.event_tag_path(name: model.name)
end end
# tagをtree viewで表示する # tagをtree viewで表示する
......
...@@ -31,11 +31,14 @@ nav.navbar.navbar-fixed-top.navbar-original role="navigation" ...@@ -31,11 +31,14 @@ nav.navbar.navbar-fixed-top.navbar-original role="navigation"
span.glyphicon.glyphicon-flag span.glyphicon.glyphicon-flag
- if current_user.notifications.unread.any? - if current_user.notifications.unread.any?
span.badge = current_user.notifications.unread.recent.count span.badge = current_user.notifications.unread.recent.count
- unless params[:action] == 'new' && params[:controller] == 'posts'
li.new-post-btn li.new-post-btn
form form
a.btn.navbar-btn href=new_post_path a.btn.navbar-btn href=new_post_path
| 投稿する | 投稿する
= image_tag 'write.png', class: "write" = image_tag 'write.png', class: "write"
li.dropdown li.dropdown
a.dropdown-toggle data-toggle="dropdown" a.dropdown-toggle data-toggle="dropdown"
= current_user.name = current_user.name
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
.panel-heading .panel-heading
h3.panel-title h3.panel-title
a href=post_path(@post) = @post.title a href=post_path(@post) = @post.title
.panel-body.viewer.github .panel-body.viewer.github.mod-image-style
= MarkdownRenderer.new(@post.body).render = MarkdownRenderer.new(@post.body).render
.col-xs-3 .col-xs-3
......
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