diff --git a/app/assets/stylesheets/comments.css.scss b/app/assets/stylesheets/comments.css.scss index 96cf18d..8a16d43 100644 --- a/app/assets/stylesheets/comments.css.scss +++ b/app/assets/stylesheets/comments.css.scss @@ -55,6 +55,17 @@ } } +.comment-submit[disabled] { + opacity: 0.4; + cursor: not-allowed; +} + +.comment-submit { + background-color: #008cba; + opacity: 0.8; +} + + .comment-success { color: #66FAB5; } diff --git a/app/views/blogs/_comment.html.slim b/app/views/blogs/_comment.html.slim index 42c33fd..9b828cf 100644 --- a/app/views/blogs/_comment.html.slim +++ b/app/views/blogs/_comment.html.slim @@ -8,7 +8,7 @@ .small-12.large-6.columns = text_field_tag(:name, nil, placeholder: '你的名字', 'ng-model'=> 'name', 'ng-required'=> 'true') = text_field_tag(:email, nil, placeholder: '你的邮箱', 'ng-model'=> 'email', 'ng-pattern'=>"/^.+@.+$/", 'ng-required'=>"true") - button ng-click="submit()" ng-disabled="form.$invalid" 发表 + button.comment-submit ng-click="submit()" ng-disabled="form.$invalid" 发表 p.comment-success ng-show="publish_success" 发布成功 p.comment-fail ng-show="publish_success == false" 发布失败: {{ publish_fail_msg }} .comment-diag ng-cloak=""