Commit f55fbbf1 by tady

fix edit page

parent 043d601a
...@@ -41,5 +41,5 @@ $.extend ...@@ -41,5 +41,5 @@ $.extend
console.log([editor_scrollTop, preview_scrollHeight, editor_height, editor_scrollHeight, preview_scrollTop]) console.log([editor_scrollTop, preview_scrollHeight, editor_height, editor_scrollHeight, preview_scrollTop])
settings.$editor.on 'scroll', _.throttle(adjustPreviewScroll, 1000 / 30) settings.$editor.on 'scroll', _.throttle(adjustPreviewScroll, 1000 / 60)
...@@ -14,7 +14,8 @@ $theme-color-main: #86C6E5; ...@@ -14,7 +14,8 @@ $theme-color-main: #86C6E5;
$theme-text-color: #ffffff; $theme-text-color: #ffffff;
$theme-key-color: #ec0160; $theme-key-color: #ec0160;
$theme-font-base: Verdana, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif; // $theme-font-base: Verdana, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
$theme-font-base: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
$text-deco-font: 'Quicksand', sans-serif; $text-deco-font: 'Quicksand', sans-serif;
......
@import 'modules/settings';
.btn-default {
text-shadow: none;
background: $theme-color-main;
color: $theme-color-light;
border: none;
// @include border_radius;
// color: $theme-color-main;
// border: 1px solid $theme-color-main;
// &:hover {
// @include transition;
// background-color: #eee;
// }
// a {
// color: $theme-color-main;
// }
// .dropdown-toggle {
// background-color: $theme-color-main;
// @include border_radius(0px);
// color: #fff;
// background-image: none!important;
// border: 1px solid transparent;
// .caret {
// font-size: 20px;
// }
// }
}
...@@ -5,3 +5,7 @@ body { ...@@ -5,3 +5,7 @@ body {
font-family: $theme-font-base; font-family: $theme-font-base;
color: $theme-color-dark; color: $theme-color-dark;
} }
.margin-wrapper {
margin-bottom: 20px;
}
@import 'modules/settings';
dt {
padding: 2px 0;
}
dd {
margin-bottom: 10px;
}
...@@ -92,31 +92,6 @@ ...@@ -92,31 +92,6 @@
// margin-top: 40px; // margin-top: 40px;
// } // }
// .post-edit-btn,
// .watch-btn,
// .btn-watched {
// @include border_radius;
// color: $theme-color-main;
// border: 1px solid $theme-color-main;
// &:hover {
// @include transition;
// background-color: #eee;
// }
// a {
// color: $theme-color-main;
// }
// .dropdown-toggle {
// background-color: $theme-color-main;
// @include border_radius(0px);
// color: #fff;
// background-image: none!important;
// border: 1px solid transparent;
// .caret {
// font-size: 20px;
// }
// }
// }
// .watch-btn { // .watch-btn {
// height: 36px; // height: 36px;
// } // }
...@@ -127,19 +102,6 @@ ...@@ -127,19 +102,6 @@
// border: 2px solid $theme-color-main; // border: 2px solid $theme-color-main;
// } // }
// .detail-wrapper {
// dt {
// padding: 2px 0;
// }
// dd {
// margin-bottom: 10px;
// }
// // .label-tag {
// // background-color: #e67e22;
// // padding-top: 4px;
// // // font-weight: 100;
// // }
// }
// .comment-wrapper { // .comment-wrapper {
// .panel-title { // .panel-title {
......
@import 'modules/settings'; @import 'modules/settings';
html, body {
height: 100%;
}
body { body {
padding-top: 60px; padding-top: 80px;
&.rails-posts-edit {
padding-top: 20px;
}
} }
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
.dropdown-menu { .dropdown-menu {
a { a {
color: $theme-color-dark; color: $theme-color-dark;
font-family: $theme-font-base;
} }
.badge { .badge {
color: $theme-color-dark; color: $theme-color-dark;
......
@import 'modules/settings'; @import 'modules/settings';
.panel-heading { .panel-main {
background-color: $theme-color-main;
color: $theme-color-light;
}
.panem-main {
.panel-heading { .panel-heading {
background-color: $theme-color-dark; background-color: $theme-color-dark;
color: $theme-color-light; color: $theme-color-light;
...@@ -16,7 +11,13 @@ ...@@ -16,7 +11,13 @@
} }
} }
.panel { .panel-default {
.panel-heading {
background-image: none;
background-color: $theme-color-main;
color: $theme-color-light;
}
.label { .label {
background-color: transparent; background-color: transparent;
color: $theme-color-dark; color: $theme-color-dark;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#post-form { #post-form {
.row { .row {
margin-top: 20px; // margin-top: 20px;
.col-xs-9 { .col-xs-9 {
.field { .field {
margin-bottom: 10px; margin-bottom: 10px;
...@@ -59,17 +59,17 @@ ...@@ -59,17 +59,17 @@
padding-top: 0; padding-top: 0;
} }
} }
#save_button { // #save_button {
margin-bottom: 10px; // margin-bottom: 10px;
} // }
table { // table {
width: 100%; // width: 100%;
} // }
td { // td {
width: 50%; // width: 50%;
} // }
} }
input, input,
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
label.numbers Now Viewing label.numbers Now Viewing
.col-xs-12.col-md-8 role="navigation" .col-xs-12.col-md-8 role="navigation"
.panel.panem-main .panel.panel-main
.panel-heading .panel-heading
h2.panel-title h2.panel-title
i.fa.fa-rss i.fa.fa-rss
......
doctype html doctype html
= render partial: 'partials/rendezvous'
html lang="ja" html lang="ja"
= render partial: 'partials/rendezvous'
head head
= display_meta_tags site: 'Rendezvous', reverse: true = display_meta_tags site: 'Rendezvous', reverse: true
meta content="width=device-width, initial-scale=1.0" name="viewport" / meta content="width=device-width, initial-scale=1.0" name="viewport" /
......
doctype html doctype html
= render partial: 'partials/rendezvous'
html lang="ja" html lang="ja"
/ = render partial: 'partials/rendezvous'
head head
= display_meta_tags site: 'Rendezvous', reverse: true = display_meta_tags site: 'Rendezvous', reverse: true
meta content="width=device-width, initial-scale=1.0" name="viewport" / meta content="width=device-width, initial-scale=1.0" name="viewport" /
...@@ -28,6 +28,5 @@ html lang="ja" ...@@ -28,6 +28,5 @@ html lang="ja"
javascript: javascript:
window.RV = window.RV || {}; window.RV = window.RV || {};
window.RV.AllTags = JSON.parse('#{raw Tag.all.pluck(:name).to_json}'); window.RV.AllTags = JSON.parse('#{raw Tag.all.pluck(:name).to_json}');
hr/
= javascript_include_tag "application" = javascript_include_tag "application"
= yield :footer_js = yield :footer_js
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#error_explanation #error_explanation
h2 h2
= pluralize(@post.errors.count, "error") = pluralize(@post.errors.count, "error")
| prohibited this post from being saved: |  prohibited this post from being saved:
ul ul
- @post.errors.full_messages.each do |msg| - @post.errors.full_messages.each do |msg|
li= msg li= msg
...@@ -19,19 +19,16 @@ ...@@ -19,19 +19,16 @@
.field .field
.input-group .input-group
span.input-group-addon= f.label :tags span.input-group-addon= f.label :tags
= hidden_field :post, :tags, class: 'mod-mdEditor-tags', style: 'width:300px', value: @post.tags.map{ |_tag| _tag.name }.join(',') = hidden_field :post, :tags, class: 'mod-mdEditor-tags', style: 'width:90%', value: @post.tags.map{ |_tag| _tag.name }.join(',')
.col-xs-3 .col-xs-3
p.actions p = f.submit class: 'btn btn-default js-disable-confirm-unload', id: 'save_button'
= f.submit class: 'btn btn-lg js-disable-confirm-unload', id: 'save_button' p
p.actions
= f.check_box :is_draft = f.check_box :is_draft
= f.label :is_draft, " 下書き保存".html_safe = f.label :is_draft, " 下書き保存".html_safe
p.actions p = f.date_select :specified_date
= f.date_select :specified_date
.row .row
.col-xs-6.editor-panel .col-xs-6.editor-panel
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
...@@ -74,7 +71,7 @@ ...@@ -74,7 +71,7 @@
| 0% | 0%
.col-xs-6.preview-panel .col-xs-6.preview-panel
.panel.preview-wrapper .panel.panel-default.preview-wrapper
.panel-heading .panel-heading
span Preview span Preview
...@@ -112,7 +109,7 @@ input#fileupload data-url="/apis/file_receiver" multiple="" name="files[]" style ...@@ -112,7 +109,7 @@ input#fileupload data-url="/apis/file_receiver" multiple="" name="files[]" style
$.mod_form_resizer({ $.mod_form_resizer({
$editor: $('.mod-form-resizer-editor'), $editor: $('.mod-form-resizer-editor'),
$preview: $('.mod-form-resizer-preview'), $preview: $('.mod-form-resizer-preview'),
height_offset: 250 height_offset: 210
}) })
// Display upload dialog. // Display upload dialog.
......
.row.post-show-wrapper /! view:post/show
.col-xs-9
.panel .row
.col-xs-12.col-md-8
.panel.panel-main
.panel-heading .panel-heading
h3.panel-title h2.panel-title = @post.title
a href=post_path(@post) = @post.title
.panel-body.viewer.github.mod-image-style .panel-body.viewer.github.mod-image-style
= MarkdownRenderer.new(@post.body).render = MarkdownRenderer.new(@post.body).render
.col-xs-3 .col-xs-12.col-md-4
.btn-group.post-edit-btn
a.btn href=edit_post_path(@post) .margin-wrapper
.btn-group
a.btn.btn-default href=edit_post_path(@post)
| 編集  | 編集 
span.glyphicon.glyphicon-pencil span.glyphicon.glyphicon-pencil
button.btn.btn-default.dropdown-toggle data-toggle="dropdown" type="button" button.btn.btn-default.dropdown-toggle data-toggle="dropdown" type="button"
...@@ -32,26 +35,35 @@ ...@@ -32,26 +35,35 @@
.btn-group .btn-group
- if current_user.watching?(post: @post) - if current_user.watching?(post: @post)
= link_to 'Watching <span class="glyphicon glyphicon-eye-open"></span>'.html_safe, watch_post_path, :remote => true, :'data-type' => :html, :class => 'btn ajax_link btn-watched' = link_to 'Watching <span class="glyphicon glyphicon-eye-open"></span>'.html_safe, watch_post_path, :remote => true, :'data-type' => :html, :class => 'btn btn-default ajax_link btn-watched'
- else - else
= link_to 'Watch <span class="glyphicon glyphicon-eye-open"></span>'.html_safe, watch_post_path, :remote => true, :'data-type' => :html, :class => 'btn ajax_link watch-btn' = link_to 'Watch <span class="glyphicon glyphicon-eye-open"></span>'.html_safe, watch_post_path, :remote => true, :'data-type' => :html, :class => 'btn btn-default ajax_link watch-btn'
.well.detail-wrapper style="margin-top:20px" .panel
.panel-heading
h3.panel-title
i.fa.fa-info
| &nbsp; 情報
.panel-body
dl dl
dt 最終編集者 dt 最終編集者
dd dd
a href=(search_path(q: "@#{@post.author.nickname}")) a href=(search_path(q: "@#{@post.author.nickname}"))
= @post.author.name = @post.author.name
dt 最終編集者 dt 作成者
dd 調整中 dd (調整中)
dt 編集履歴
dd (調整中)
dt タグ dt タグ
dd dd
- @post.tags.each do |tag| - @post.tags.map(&:decorate).each do |tag|
span.label.label-tag span.label.label-tag
a href=tag.decorate.show_path a href=tag.show_path
| #{tag.name} | #{tag.structured_name}
| &nbsp; | &nbsp;
dt 指定日 dt 指定日
...@@ -74,13 +86,14 @@ ...@@ -74,13 +86,14 @@
dd dd
= @post.comments.count = @post.comments.count
.row .row
.col-md-12 .col-xs-12
.panel.comment-wrapper .panel.comment-wrapper
.panel-heading .panel-heading
h3.panel-title h3.panel-title
= image_tag 'comment_w.png' i.fa.fa-comments
| Comments | &nbsp;Comments
.panel-body .panel-body
ul.media-list ul.media-list
- @post.comments.each do |comment| - @post.comments.each do |comment|
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
.row .row
.col-xs-12.col-md-8 role="navigation" .col-xs-12.col-md-8 role="navigation"
.panel.panem-main .panel.panel-main
.panel-heading .panel-heading
h2.panel-title h2.panel-title
i.fa.fa-search i.fa.fa-search
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
.row .row
.col-xs-12.col-md-8 role="navigation" .col-xs-12.col-md-8 role="navigation"
.panel.panem-main .panel.panel-main
.panel-heading .panel-heading
h2.panel-title h2.panel-title
i.fa.fa-stack-overflow i.fa.fa-stack-overflow
......
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