From 6808b4539db05d76c998660a3630392edf61e353 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 8 Jul 2015 15:12:25 +1000 Subject: [PATCH] add the text "Accepted Answer" next to the lonely button use new "fade-out" class for the green areas in post menu --- .../initializers/extend-for-solved-button.js.es6 | 2 +- assets/stylesheets/solutions.scss | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/discourse/initializers/extend-for-solved-button.js.es6 b/assets/javascripts/discourse/initializers/extend-for-solved-button.js.es6 index 53d9a6b..d757199 100644 --- a/assets/javascripts/discourse/initializers/extend-for-solved-button.js.es6 +++ b/assets/javascripts/discourse/initializers/extend-for-solved-button.js.es6 @@ -81,7 +81,7 @@ export default { 'unacceptAnswer', locale, 'check-square', - {className: 'accepted'}) + {className: 'accepted fade-out', prefixHTML: '' + I18n.t('solved.accepted_answer') + ''}) ); } diff --git a/assets/stylesheets/solutions.scss b/assets/stylesheets/solutions.scss index ace1aa9..9eecf0d 100644 --- a/assets/stylesheets/solutions.scss +++ b/assets/stylesheets/solutions.scss @@ -1,12 +1,25 @@ -.post-controls .accepted, .fa.accepted { +.post-controls .accepted, .fa.accepted, .accepted-text { color: green; } +.post-controls .accepted-text { + display: inline-block; + font-size: inherit; + vertical-align: middle; + line-height: 35px; + margin-right: -5px; + z-index: 999; +} + // you can style accepted answers however your want .topic-post.accepted-answer .topic-body { // background-color: #E9FFE0; } +.mobile-view .post-controls .accepted-text { + float: left; +} + .mobile-view .cooked .solved { margin-bottom: 15px; }