help_center 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +30 -0
  3. data/LICENSE.txt +21 -21
  4. data/README.md +168 -164
  5. data/Rakefile +10 -10
  6. data/app/assets/stylesheets/help_center.scss +140 -139
  7. data/app/controllers/help_center/application_controller.rb +37 -37
  8. data/app/controllers/help_center/notifications_controller.rb +19 -19
  9. data/app/controllers/help_center/support_categories_controller.rb +58 -58
  10. data/app/controllers/help_center/support_posts_controller.rb +72 -72
  11. data/app/controllers/help_center/support_threads_controller.rb +82 -82
  12. data/app/helpers/help_center/support_posts_helper.rb +29 -29
  13. data/app/helpers/help_center/support_threads_helper.rb +28 -28
  14. data/app/jobs/help_center/support_post_notification_job.rb +42 -42
  15. data/app/jobs/help_center/support_thread_notification_job.rb +40 -40
  16. data/app/mailers/help_center/user_mailer.rb +28 -28
  17. data/app/models/support_category.rb +16 -13
  18. data/app/models/support_post.rb +15 -15
  19. data/app/models/support_subscription.rb +19 -19
  20. data/app/models/support_thread.rb +85 -85
  21. data/app/views/help_center/support_categories/_form.html.erb +39 -35
  22. data/app/views/help_center/support_categories/_support_thread.html.erb +25 -25
  23. data/app/views/help_center/support_categories/edit.html.erb +7 -7
  24. data/app/views/help_center/support_categories/index.html.erb +19 -19
  25. data/app/views/help_center/support_categories/new.html.erb +5 -5
  26. data/app/views/help_center/support_categories/show.html.erb +19 -20
  27. data/app/views/help_center/support_posts/_form.html.erb +47 -47
  28. data/app/views/help_center/support_posts/_support_post.html.erb +57 -57
  29. data/app/views/help_center/support_posts/edit.html.erb +23 -23
  30. data/app/views/help_center/support_threads/_form.html.erb +49 -49
  31. data/app/views/help_center/support_threads/_support_thread.html.erb +25 -25
  32. data/app/views/help_center/support_threads/edit.html.erb +7 -7
  33. data/app/views/help_center/support_threads/index.html.erb +19 -19
  34. data/app/views/help_center/support_threads/new.html.erb +5 -5
  35. data/app/views/help_center/support_threads/show.html.erb +29 -42
  36. data/app/views/help_center/user_mailer/new_post.html.erb +9 -9
  37. data/app/views/help_center/user_mailer/new_thread.html.erb +9 -9
  38. data/app/views/layouts/help_center.html.erb +130 -128
  39. data/app/views/shared/_category_actions.html.erb +16 -0
  40. data/app/views/shared/_spacer.html.erb +1 -1
  41. data/app/views/shared/_thread_actions.html.erb +16 -0
  42. data/bin/console +14 -14
  43. data/bin/setup +8 -8
  44. data/config/locales/en.yml +56 -55
  45. data/config/routes.rb +24 -24
  46. data/db/migrate/20170417012930_create_support_categories.rb +19 -19
  47. data/db/migrate/20170417012931_create_support_threads.rb +18 -18
  48. data/db/migrate/20170417012933_create_support_subscriptions.rb +11 -11
  49. data/help_center.gemspec +27 -29
  50. data/lib/generators/help_center/controllers_generator.rb +13 -13
  51. data/lib/generators/help_center/helpers_generator.rb +13 -13
  52. data/lib/generators/help_center/views_generator.rb +13 -13
  53. data/lib/help_center.rb +23 -23
  54. data/lib/help_center/engine.rb +10 -10
  55. data/lib/help_center/slack.rb +22 -22
  56. data/lib/help_center/support_user.rb +10 -10
  57. data/lib/help_center/version.rb +3 -3
  58. metadata +7 -19
  59. data/help_center-0.0.1.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 544e4b74c59725cb067edbda4ef444d32219c13b2433ac277917e0bb5a6d5435
4
- data.tar.gz: b72851a4402159c203c7c91f682f7e9cefac1d4488997a82b72932ebb5f38502
3
+ metadata.gz: 21d5abd35602e62d22607a377c4f63ecd1781e2260a390112183ec05b6467ae6
4
+ data.tar.gz: f052cf2fa537f50ca26823b6d3744e78457ab82841ec4fc914e33f24e5b5c711
5
5
  SHA512:
6
- metadata.gz: 925ef4bccb5794eb48fa9b8c0decfe66c42b6467ab489b1d926a241b14dd6444623335c6e6faa1db3d489bc2a993940836648a272bbe04d9e0c1a065a78382e1
7
- data.tar.gz: 84c61d2bd086a3c489fd020895746139c1bace305768375b29ec010d1d8f9938881a3b001001776ca5bed23ae3418c3b2af76fa42c235132ffa233f607a4b3da
6
+ metadata.gz: a3af90e3300fc85ecdba1ebea049b79c16f18afc31cd601965fce7f6e9d536e20f3f5cb505102351adbb3902bad8ea9b820f9e9796f01fbd44584dde7a28a5ad
7
+ data.tar.gz: 3145813c4bf4d9fbded2d73405c6b54bc1f7a42c25e956372bc74d1803543685e1a428f0bda7eec0ec15511d463cdb6ef649feee1133dd51c2a894cd4c585ce0
data/CHANGELOG.md CHANGED
@@ -1 +1,31 @@
1
+ ### Unreleased
1
2
 
3
+ ### 0.0.6
4
+
5
+ * Bug fixes
6
+ * Fix gemspec error
7
+ * Remove duplicate gem file
8
+ * Add changelog
9
+ * Add index page for categories
10
+ * Add descriptions to categories
11
+ * Change home page layout
12
+
13
+ ### 0.0.5
14
+
15
+ * [BREAKING] Remove Bootstrap in favor of TailwindCSS
16
+
17
+ ### 0.0.4
18
+
19
+ * Default CSS changes
20
+
21
+ ### 0.0.3
22
+
23
+ * Change article layout
24
+
25
+ ### 0.0.2
26
+
27
+ * Fix mailer errors
28
+
29
+ ### 0.0.1
30
+
31
+ * Initial release
data/LICENSE.txt CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2020 Ugurcan Kaya
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 Ugurcan Kaya
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -1,164 +1,168 @@
1
- # HelpCenter
2
-
3
- HelpCenter is a Rails wiki gem with Trix editor support for organizing app documentation and tutorials. It includes support categories, support articles, simple moderation, the ability to leave comments to support articles and more.
4
-
5
- Out of the box, HelpCenter comes with styling for Boostrap v4 but you're free to customize the UI as much as you like by installing the views and tweaking the HTML.
6
-
7
- ## Requirements
8
-
9
- ```
10
- Rails >= 6.0.0
11
- tailwindcss >= 1.6.0
12
- ```
13
-
14
- ## Installation
15
-
16
- Before you get started, HelpCenter requires a `User` model in your application (for now).
17
-
18
- Add this line to your application's Gemfile:
19
-
20
- ```ruby
21
- gem 'help_center'
22
- ```
23
-
24
- And then execute:
25
-
26
- ```bash
27
- bundle
28
- ```
29
-
30
- Install the migrations and migrate:
31
-
32
- ```bash
33
- rails help_center:install:migrations
34
- rails db:migrate
35
- ```
36
-
37
- Add HelpCenter to your `User` model. The model **must** have `name` method which will be used to display the user's name on comments & discussions (if enabled). Currently only a model named `User` will work.
38
-
39
- ```ruby
40
- class User < ActiveRecord::Base
41
- include HelpCenter::SupportUser
42
-
43
- def name
44
- "#{first_name} #{last_name}"
45
- end
46
- end
47
- ```
48
-
49
- Next add a `moderator` or `admin` flag to the `User` model.
50
-
51
- ```bash
52
- rails g migration AddModeratorToUsers moderator:boolean
53
- rails db:migrate
54
- ```
55
- Only moderators or admins can add support articles.
56
-
57
- ```
58
- if current_user.admin? || current_user.moderator?
59
- ```
60
-
61
- Add the following line to your `config/routes.rb` file:
62
-
63
- ```ruby
64
- mount HelpCenter::Engine => "/support"
65
- ```
66
-
67
- Add routes for active storage with your custom prefix
68
-
69
- ```ruby
70
- get "/support/rails/active_storage/blobs/:signed_id/*filename" =>
71
- "active_storage/blobs#show"
72
- get "/support/rails/active_storage/representations/:signed_blob_id/:variation_key/*filename" =>
73
- "active_storage/representations#show"
74
- ```
75
-
76
- Lastly, add the CSS to your `application.css` to load some default styles.
77
-
78
- ```scss
79
- *= require help_center
80
- ```
81
-
82
- ## Usage
83
-
84
- To get all the basic functionality, the only thing you need to do is add a link to HelpCenter in your navbar.
85
-
86
- ```erb
87
- <%= link_to "Docs", help_center_path %>
88
- ```
89
-
90
- This will take the user to the views inside the Rails engine and that's all you have to do!
91
-
92
- ### Customizing
93
-
94
- If you'd like to customize the views that HelpCenter uses, you can install the views to your Rails app:
95
-
96
- ```bash
97
- rails g help_center:views
98
- ```
99
-
100
- You can also install a copy of the HelpCenter controllers for advanced customization:
101
-
102
- ```bash
103
- rails g help_center:controllers
104
- ```
105
-
106
- Helpers are available for override as well. They are used for rendering the user avatars, text formatting, and more.
107
-
108
- ```bash
109
- rails g help_center:helpers
110
- ```
111
-
112
- **NOTE:** Keep in mind that the more customization you do, the tougher gem upgrades will be in the future.
113
-
114
- ### User comments & Notifications
115
-
116
- You can enable user comments and questions for support articles. HelpCenter will attempt to send email and slack notifications for users who leave comments when a new reply posted.
117
-
118
- To turn these off you can do the following in `config/initializers/help_center.rb`
119
-
120
- ```ruby
121
- HelpCenter.setup do |config|
122
- config.article_dicussions = false # Default: false
123
- config.send_email_notifications = false # Default: true
124
- config.send_slack_notifications = false # Default: true
125
- end
126
- ```
127
-
128
- Slack notifications require you to set `help_center_slack_url` in your `config/secrets.yml`. If you don't have this value set, it will not attempt Slack notifications even if they are enabled.
129
-
130
-
131
- ## Development
132
-
133
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
134
-
135
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
136
-
137
- ## Roadmap / Upcoming features
138
- Your support is appreciated for this project. Consider backing the project via GitHub Sponsors.
139
-
140
- We plan to release following features:
141
-
142
- - Contact form
143
- - Ticket submission
144
- - Live chat
145
- - Help Center Layout templates
146
- - Built-in search
147
-
148
- ## Acknowledgment
149
-
150
- HelpCenter generated from the awesome [simple_discussion](https://github.com/excid3/simple_discussion) gem by [Chris Oliver](https://github.com/excid3)
151
-
152
- HelpCenter uses [Trix editor](https://github.com/basecamp/trix) by [Basecamp](https://github.com/basecamp)
153
-
154
- ## Contributing
155
-
156
- Bug reports and pull requests are welcome on GitHub at https://github.com/uurcank/help_center This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
157
-
158
- ## License
159
-
160
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
161
-
162
- ## Code of Conduct
163
-
164
- Everyone interacting in the HelpCenter project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/pasilobus/help_center/blob/master/CODE_OF_CONDUCT.md).
1
+ # HelpCenter
2
+
3
+ ### 📖 Knowledge Base for your Ruby on Rails App
4
+
5
+ HelpCenter is a Rails wiki gem with Trix editor support for creating a knowledge base for your project. It includes support categories, support articles, simple moderation, the ability to leave comments to support articles and more.
6
+
7
+ Out of the box, HelpCenter comes with styling for TailwindCSS 2.0 but you're free to customize the UI as much as you like by installing the views and tweaking the HTML.
8
+
9
+ ## Requirements
10
+
11
+ ```
12
+ Rails >= 6.0.0
13
+ tailwindcss >= 2.0.0
14
+ ```
15
+
16
+ ## Installation
17
+
18
+ Before you get started, HelpCenter requires a `User` model in your application (for now).
19
+
20
+ Add this line to your application's Gemfile:
21
+
22
+ ```ruby
23
+ gem 'help_center'
24
+ ```
25
+
26
+ And then execute:
27
+
28
+ ```bash
29
+ bundle
30
+ ```
31
+
32
+ Install the migrations and migrate:
33
+
34
+ ```bash
35
+ rails help_center:install:migrations
36
+ rails db:migrate
37
+ ```
38
+
39
+ Add HelpCenter to your `User` model. The model **must** have `name` method which will be used to display the user's name on comments & discussions (if enabled). Currently only a model named `User` will work.
40
+
41
+ ```ruby
42
+ class User < ActiveRecord::Base
43
+ include HelpCenter::SupportUser
44
+
45
+ def name
46
+ "#{first_name} #{last_name}"
47
+ end
48
+ end
49
+ ```
50
+
51
+ Next add a `moderator` or `admin` flag to the `User` model.
52
+
53
+ ```bash
54
+ rails g migration AddModeratorToUsers moderator:boolean
55
+ rails db:migrate
56
+ ```
57
+ Only moderators or admins can add support articles.
58
+
59
+ ```
60
+ if current_user.admin? || current_user.moderator?
61
+ ```
62
+
63
+ Add the following line to your `config/routes.rb` file:
64
+
65
+ ```ruby
66
+ mount HelpCenter::Engine => "/docs"
67
+ ```
68
+
69
+ Add routes for active storage with your custom prefix
70
+
71
+ ```ruby
72
+ get "/support/rails/active_storage/blobs/:signed_id/*filename" =>
73
+ "active_storage/blobs#show"
74
+ get "/support/rails/active_storage/representations/:signed_blob_id/:variation_key/*filename" =>
75
+ "active_storage/representations#show"
76
+ ```
77
+
78
+ Lastly, add the CSS to your `application.css` to load some default styles.
79
+
80
+ ```scss
81
+ *= require help_center
82
+ ```
83
+
84
+ ## Usage
85
+
86
+ To get all the basic functionality, the only thing you need to do is add a link to HelpCenter in your navbar.
87
+
88
+ ```erb
89
+ <%= link_to "Docs", help_center_path %>
90
+ ```
91
+
92
+ This will take the user to the views inside the Rails engine and that's all you have to do!
93
+
94
+ ### Customizing
95
+
96
+ If you'd like to customize the views that HelpCenter uses, you can install the views to your Rails app:
97
+
98
+ ```bash
99
+ rails g help_center:views
100
+ ```
101
+
102
+ You can also install a copy of the HelpCenter controllers for advanced customization:
103
+
104
+ ```bash
105
+ rails g help_center:controllers
106
+ ```
107
+
108
+ Helpers are available for override as well. They are used for rendering the user avatars, text formatting, and more.
109
+
110
+ ```bash
111
+ rails g help_center:helpers
112
+ ```
113
+
114
+ **NOTE:** Keep in mind that the more customization you do, the tougher gem upgrades will be in the future.
115
+
116
+ ### User comments & Notifications
117
+
118
+ You can enable user comments and questions for support articles. HelpCenter will attempt to send email and slack notifications for users who leave comments when a new reply posted.
119
+
120
+ To turn these off you can do the following in `config/initializers/help_center.rb`
121
+
122
+ ```ruby
123
+ HelpCenter.setup do |config|
124
+ config.article_dicussions = false # Default: false
125
+ config.send_email_notifications = false # Default: true
126
+ config.send_slack_notifications = false # Default: true
127
+ end
128
+ ```
129
+
130
+ Slack notifications require you to set `help_center_slack_url` in your `config/secrets.yml`. If you don't have this value set, it will not attempt Slack notifications even if they are enabled.
131
+
132
+
133
+ ## Development
134
+
135
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
136
+
137
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
138
+
139
+ ## Roadmap / Upcoming features
140
+ Your support is appreciated for this project. Consider backing the project via GitHub Sponsors.
141
+
142
+ We plan to release following features:
143
+
144
+ - Contact form
145
+ - Built-in search
146
+ - Versioning Support
147
+ - Themes
148
+ - Dark Mode Support
149
+
150
+ ## Acknowledgment
151
+
152
+ [simple_discussion](https://github.com/excid3/simple_discussion) by [Chris Oliver](https://github.com/excid3)
153
+
154
+ [Trix editor](https://github.com/basecamp/trix) by [Basecamp](https://github.com/basecamp)
155
+
156
+ [TailwindCSS](https://github.com/basecamp/trix) by [Tailwind Labs](https://github.com/tailwindlabs/tailwindcss)
157
+
158
+ ## Contributing
159
+
160
+ Bug reports and pull requests are welcome on GitHub at https://github.com/uurcank/help_center This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
161
+
162
+ ## License
163
+
164
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
165
+
166
+ ## Code of Conduct
167
+
168
+ Everyone interacting in the HelpCenter project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/pasilobus/help_center/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile CHANGED
@@ -1,10 +1,10 @@
1
- require "bundler/gem_tasks"
2
- require "rake/testtask"
3
-
4
- Rake::TestTask.new(:test) do |t|
5
- t.libs << "test"
6
- t.libs << "lib"
7
- t.test_files = FileList["test/**/*_test.rb"]
8
- end
9
-
10
- task :default => :test
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << "test"
6
+ t.libs << "lib"
7
+ t.test_files = FileList["test/**/*_test.rb"]
8
+ end
9
+
10
+ task :default => :test
@@ -1,139 +1,140 @@
1
- @import "font-awesome-sprockets";
2
- @import "font-awesome";
3
-
4
- /* Allow pagination to be centered */
5
- .help_center .support-threads-nav nav {
6
- display: inline-block;
7
- }
8
-
9
- /* Highlight the active navigation item in the sidebar */
10
- .help_center .support-thread-filters {
11
- a {
12
- color: #555;
13
- }
14
-
15
- .active {
16
- color: #eee;
17
- font-weight: 500;
18
- padding: 0.25rem;
19
- border-radius: 5px;
20
- }
21
- }
22
-
23
- /* Formatting for the support threads */
24
- .help_center .support-thread {
25
- margin-bottom: -20px;
26
-
27
- h4 {
28
- margin-bottom: 4px;
29
-
30
- a {
31
- color: #222;
32
- font-size: 16px;
33
- font-weight: normal;
34
- line-height: 1.1;
35
- }
36
- }
37
- }
38
-
39
- .help_center .support-thread-filters a {
40
- color: #555555;
41
- display: block;
42
-
43
- &:hover {
44
- color: #bfbfbf;
45
- text-decoration: none
46
- }
47
- }
48
-
49
- .help_center .thread-details {
50
- color: #999;
51
- font-size: 12px;
52
- text-transform: uppercase;
53
- display: flex;
54
- flex-direction: column;
55
- }
56
-
57
- .help_center .thread-reaction {
58
- background: #eeeeee;
59
- padding: 1rem;
60
- text-align: center;
61
- border-radius: 0.5rem;
62
- margin-top: 2rem;
63
- }
64
-
65
- .help_center .thread-reaction-links {
66
- font-size: 2rem;
67
- margin: 0.25rem;
68
- }
69
-
70
- /* Display the support post count above the "posts" text on the index page */
71
- .help_center .thread-posts-count {
72
- color: #222;
73
- text-align: center;
74
-
75
- span, small {
76
- display: block;
77
- }
78
-
79
- .count {
80
- font-size: 1.5em;
81
- font-weight: 300;
82
- line-height: 1em;
83
- }
84
-
85
- &:hover {
86
- color: #222;
87
- text-decoration: none;
88
- }
89
- }
90
-
91
- /* Formatting for the support posts themselves */
92
- .help_center .support-post {
93
- position: relative;
94
-
95
- /* When the URL anchor matches a post id, highlight that item */
96
- &:target {
97
- background-color: rgb(248, 238, 199);
98
- }
99
-
100
- /* Fill this out if you want to highlight the OPs posts */
101
- &.original-poster {
102
- }
103
-
104
- &.solved {
105
- border: 2px solid #5cb85c;
106
- }
107
- }
108
-
109
- /* Formatting for the support hr to match card border */
110
- .help_center hr {
111
- border: 0;
112
- border-top: 1px solid rgba(0, 0, 0, 0.125);
113
- margin: 24px -20px;
114
- }
115
-
116
- // Forms
117
- .help_center label {
118
- margin-bottom: 0.5rem;
119
- }
120
-
121
- .help_center .form-input, .form-select {
122
- display: block;
123
- width: 100%;
124
- font-size: 0.875rem;
125
- line-height: 1.25rem;
126
- }
127
-
128
- .help_center input[type="color" i] {
129
- appearance: square-button;
130
- width: 44px;
131
- height: 23px;
132
- background-color: -internal-light-dark(rgb(239, 239, 239), rgb(74, 74, 74));
133
- cursor: default;
134
- border-width: 1px;
135
- border-style: solid;
136
- border-color: -internal-light-dark(rgb(118, 118, 118), rgb(195, 195, 195));
137
- border-image: initial;
138
- padding: 1px 2px;
139
- }
1
+ @import "font-awesome-sprockets";
2
+ @import "font-awesome";
3
+
4
+ /* Allow pagination to be centered */
5
+ .help_center .support-threads-nav nav {
6
+ display: inline-block;
7
+ }
8
+
9
+ /* Highlight the active navigation item in the sidebar */
10
+ .help_center .support-thread-filters {
11
+ a {
12
+ color: #555;
13
+ }
14
+
15
+ .active {
16
+ color: #2a326d;
17
+ font-weight: 500;
18
+ padding: 0.25rem;
19
+ }
20
+ }
21
+
22
+ /* Formatting for the support threads */
23
+ .help_center .support-thread {
24
+ margin-bottom: -20px;
25
+
26
+ h4 {
27
+ margin-bottom: 4px;
28
+
29
+ a {
30
+ color: #222;
31
+ font-size: 16px;
32
+ font-weight: normal;
33
+ line-height: 1.1;
34
+ }
35
+ }
36
+ }
37
+
38
+ .help_center .support-thread-filters a {
39
+ color: #555555;
40
+ display: block;
41
+
42
+ &:hover {
43
+ color: #bfbfbf;
44
+ text-decoration: none
45
+ }
46
+ }
47
+
48
+ .help_center .thread-details {
49
+ color: #999;
50
+ font-size: 12px;
51
+ text-transform: uppercase;
52
+ display: flex;
53
+ flex-direction: column;
54
+ }
55
+
56
+ .help_center .thread-reaction {
57
+ background: #eeeeee;
58
+ padding: 1rem;
59
+ text-align: center;
60
+ border-radius: 0.5rem;
61
+ margin-top: 2rem;
62
+ }
63
+
64
+ .help_center .thread-reaction-links {
65
+ font-size: 2rem;
66
+ margin: 0.25rem;
67
+ }
68
+
69
+ /* Display the support post count above the "posts" text on the index page */
70
+ .help_center .thread-posts-count {
71
+ color: #222;
72
+ text-align: center;
73
+
74
+ span, small {
75
+ display: block;
76
+ }
77
+
78
+ .count {
79
+ font-size: 1.5em;
80
+ font-weight: 300;
81
+ line-height: 1em;
82
+ }
83
+
84
+ &:hover {
85
+ color: #222;
86
+ text-decoration: none;
87
+ }
88
+ }
89
+
90
+ /* Formatting for the support posts themselves */
91
+ .help_center .support-post {
92
+ position: relative;
93
+
94
+ /* When the URL anchor matches a post id, highlight that item */
95
+ &:target {
96
+ background-color: rgb(248, 238, 199);
97
+ }
98
+
99
+ /* Fill this out if you want to highlight the OPs posts */
100
+ &.original-poster {
101
+ }
102
+
103
+ &.solved {
104
+ border: 2px solid #5cb85c;
105
+ }
106
+ }
107
+
108
+ /* Formatting for the support hr to match card border */
109
+ .help_center hr {
110
+ border: 0;
111
+ border-top: 1px solid rgba(0, 0, 0, 0.125);
112
+ margin: 24px -20px;
113
+ }
114
+
115
+ // Forms
116
+ .help_center label {
117
+ margin-bottom: 0.5rem;
118
+ }
119
+
120
+ .help_center .form-input, .form-select {
121
+ display: block;
122
+ width: 100%;
123
+ font-size: 0.875rem;
124
+ line-height: 1.25rem;
125
+ }
126
+
127
+ .help_center input[type="color" i] {
128
+ appearance: square-button;
129
+ width: 44px;
130
+ height: 23px;
131
+ background-color: -internal-light-dark(rgb(239, 239, 239), rgb(74, 74, 74));
132
+ cursor: default;
133
+ border-width: 1px;
134
+ border-style: solid;
135
+ border-color: -internal-light-dark(rgb(118, 118, 118), rgb(195, 195, 195));
136
+ border-image: initial;
137
+ padding: 1px 2px;
138
+ }
139
+
140
+