activeadmin_dark_color_scheme 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +0 -0
  3. data/Gemfile +16 -0
  4. data/Gemfile.lock +122 -0
  5. data/LICENSE.txt +21 -0
  6. data/README.md +39 -0
  7. data/Rakefile +86 -0
  8. data/activeadmin_dark_color_scheme.gemspec +46 -0
  9. data/app/assets/stylesheets/_activeadmin-dark-color-scheme.sass +21 -0
  10. data/app/assets/stylesheets/activeadmin-dark-color-scheme/mixins/_buttons.sass +22 -0
  11. data/app/assets/stylesheets/activeadmin-dark-color-scheme/mixins/_panel-heads.sass +15 -0
  12. data/app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_buttons.sass +33 -0
  13. data/app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_flash.sass +16 -0
  14. data/app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_forms.sass +33 -0
  15. data/app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_login.sass +7 -0
  16. data/app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_misc.sass +7 -0
  17. data/app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_pagination.sass +11 -0
  18. data/app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_panels.sass +7 -0
  19. data/app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_select2.sass +24 -0
  20. data/app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_sidebar.sass +10 -0
  21. data/app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_table-attributes.sass +32 -0
  22. data/app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_table-index.sass +32 -0
  23. data/app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_title-bar.sass +9 -0
  24. data/app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_top-level.sass +18 -0
  25. data/app/assets/stylesheets/activeadmin-dark-color-scheme/variables/_all.sass +44 -0
  26. data/lib/activeadmin/dark_color_scheme/engine.rb +19 -0
  27. data/lib/activeadmin/dark_color_scheme/version.rb +5 -0
  28. data/lib/activeadmin/dark_color_scheme.rb +22 -0
  29. metadata +169 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: ea0de864c7f4557cab10faa272fe4e336a6dccb2446151652e901bc838a3b6e2
4
+ data.tar.gz: 31a463c46d2657364f0974219ea5d7eeec15e6e63e07995dc305bec0a14c41f1
5
+ SHA512:
6
+ metadata.gz: 0c45498bd0fa4b273dddde9b07b48447a8b5c7188f0ccc894dbd9bab674a45730e575af2b870c854cbec1aa2064e1a1091a455cfe982a09fbdb5c23bbd49a5a1
7
+ data.tar.gz: 65e9e9166258a7b5ed262accd03242b6bf7162a9d0af0f8729c4c691eafe0558ce5083eaef883a06d6c1e24befef901610e3ccfcfd54cb805758b72485190b71
data/CHANGELOG.md ADDED
File without changes
data/Gemfile ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in moscow_metro.gemspec
6
+ gemspec
7
+
8
+ group :test do
9
+ gem "pry"
10
+ end
11
+
12
+ group :test do
13
+ # gem "coveralls", require: false
14
+ gem "rake"
15
+ gem "rspec"
16
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,122 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ activeadmin_dark_color_scheme (0.1.1)
5
+ autoprefixer-rails (~> 10, >= 10.4.7)
6
+ sassc-rails (~> 2, >= 2.0.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionpack (7.0.3)
12
+ actionview (= 7.0.3)
13
+ activesupport (= 7.0.3)
14
+ rack (~> 2.0, >= 2.2.0)
15
+ rack-test (>= 0.6.3)
16
+ rails-dom-testing (~> 2.0)
17
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
18
+ actionview (7.0.3)
19
+ activesupport (= 7.0.3)
20
+ builder (~> 3.1)
21
+ erubi (~> 1.4)
22
+ rails-dom-testing (~> 2.0)
23
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
24
+ activesupport (7.0.3)
25
+ concurrent-ruby (~> 1.0, >= 1.0.2)
26
+ i18n (>= 1.6, < 2)
27
+ minitest (>= 5.1)
28
+ tzinfo (~> 2.0)
29
+ autoprefixer-rails (10.4.7.0)
30
+ execjs (~> 2)
31
+ builder (3.2.4)
32
+ coderay (1.1.3)
33
+ concurrent-ruby (1.1.10)
34
+ crass (1.0.6)
35
+ diff-lcs (1.5.0)
36
+ erubi (1.10.0)
37
+ execjs (2.8.1)
38
+ ffi (1.15.5)
39
+ i18n (1.10.0)
40
+ concurrent-ruby (~> 1.0)
41
+ loofah (2.18.0)
42
+ crass (~> 1.0.2)
43
+ nokogiri (>= 1.5.9)
44
+ method_source (1.0.0)
45
+ minitest (5.15.0)
46
+ nokogiri (1.13.6-arm64-darwin)
47
+ racc (~> 1.4)
48
+ pry (0.14.1)
49
+ coderay (~> 1.1)
50
+ method_source (~> 1.0)
51
+ racc (1.6.0)
52
+ rack (2.2.3.1)
53
+ rack-test (1.1.0)
54
+ rack (>= 1.0, < 3)
55
+ rails-dom-testing (2.0.3)
56
+ activesupport (>= 4.2.0)
57
+ nokogiri (>= 1.6)
58
+ rails-html-sanitizer (1.4.3)
59
+ loofah (~> 2.3)
60
+ railties (7.0.3)
61
+ actionpack (= 7.0.3)
62
+ activesupport (= 7.0.3)
63
+ method_source
64
+ rake (>= 12.2)
65
+ thor (~> 1.0)
66
+ zeitwerk (~> 2.5)
67
+ rake (13.0.6)
68
+ rspec (3.11.0)
69
+ rspec-core (~> 3.11.0)
70
+ rspec-expectations (~> 3.11.0)
71
+ rspec-mocks (~> 3.11.0)
72
+ rspec-core (3.11.0)
73
+ rspec-support (~> 3.11.0)
74
+ rspec-expectations (3.11.0)
75
+ diff-lcs (>= 1.2.0, < 2.0)
76
+ rspec-support (~> 3.11.0)
77
+ rspec-mocks (3.11.1)
78
+ diff-lcs (>= 1.2.0, < 2.0)
79
+ rspec-support (~> 3.11.0)
80
+ rspec-support (3.11.0)
81
+ sassc (2.4.0)
82
+ ffi (~> 1.9)
83
+ sassc-rails (2.1.2)
84
+ railties (>= 4.0.0)
85
+ sassc (>= 2.0)
86
+ sprockets (> 3.0)
87
+ sprockets-rails
88
+ tilt
89
+ sprockets (4.0.3)
90
+ concurrent-ruby (~> 1.0)
91
+ rack (> 1, < 3)
92
+ sprockets-rails (3.4.2)
93
+ actionpack (>= 5.2)
94
+ activesupport (>= 5.2)
95
+ sprockets (>= 3.0.0)
96
+ sync (0.5.0)
97
+ term-ansicolor (1.7.1)
98
+ tins (~> 1.0)
99
+ thor (1.2.1)
100
+ tilt (2.0.10)
101
+ tins (1.31.1)
102
+ sync
103
+ tzinfo (2.0.4)
104
+ concurrent-ruby (~> 1.0)
105
+ webrick (1.7.0)
106
+ yard (0.9.28)
107
+ webrick (~> 1.7.0)
108
+ zeitwerk (2.5.4)
109
+
110
+ PLATFORMS
111
+ arm64-darwin-21
112
+
113
+ DEPENDENCIES
114
+ activeadmin_dark_color_scheme!
115
+ pry
116
+ rake
117
+ rspec
118
+ term-ansicolor (~> 1)
119
+ yard (~> 0, >= 0.9.20)
120
+
121
+ BUNDLED WITH
122
+ 2.3.15
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Sergey Pedan
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 ADDED
@@ -0,0 +1,39 @@
1
+ # Activeadmin::DarkColorScheme
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/activeadmin/dark_color_scheme`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'activeadmin_dark_color_scheme'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install activeadmin_dark_color_scheme
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ 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).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/activeadmin_dark_color_scheme.
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,86 @@
1
+ require "bundler/setup"
2
+ require "bundler/gem_tasks"
3
+ require "rspec/core/rake_task"
4
+
5
+ RSpec::Core::RakeTask.new(:spec)
6
+
7
+ # APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
8
+ # load "rails/tasks/engine.rake"
9
+ load "rails/tasks/statistics.rake"
10
+
11
+ task default: :spec
12
+
13
+ # require 'rake/testtask'
14
+ # Rake::TestTask.new do |t|
15
+ # t.libs << 'test'
16
+ # t.test_files = FileList['test/**/*_test.rb']
17
+ # t.verbose = false
18
+ # t.warning = false
19
+ # end
20
+
21
+ # desc 'Test all Gemfiles from test/*.gemfile'
22
+ # task :test_all_gemfiles do
23
+ # require 'term/ansicolor'
24
+ # require 'pty'
25
+ # require 'shellwords'
26
+ # cmd = 'bundle install --quiet && bundle exec rake --trace'
27
+ # statuses = Dir.glob('./test/gemfiles/*{[!.lock]}').map do |gemfile|
28
+ # env = {'BUNDLE_GEMFILE' => gemfile}
29
+ # cmd_with_env = " (#{env.map { |k, v| "export #{k}=#{Shellwords.escape v}" } * ' '}; #{cmd})"
30
+ # $stderr.puts Term::ANSIColor.cyan("Testing\n#{cmd_with_env}")
31
+ # Bundler.with_clean_env do
32
+ # PTY.spawn(env, cmd) do |r, _w, pid|
33
+ # begin
34
+ # r.each_line { |l| puts l }
35
+ # rescue Errno::EIO
36
+ # # Errno:EIO error means that the process has finished giving output.
37
+ # ensure
38
+ # ::Process.wait pid
39
+ # end
40
+ # end
41
+ # end
42
+ # [$? && $?.exitstatus == 0, cmd_with_env]
43
+ # end
44
+ # failed_cmds = statuses.reject(&:first).map { |(_status, cmd_with_env)| cmd_with_env }
45
+ # if failed_cmds.empty?
46
+ # $stderr.puts Term::ANSIColor.green('Tests pass with all gemfiles')
47
+ # else
48
+ # $stderr.puts Term::ANSIColor.red("Failing (#{failed_cmds.size} / #{statuses.size})\n#{failed_cmds * "\n"}")
49
+ # exit 1
50
+ # end
51
+ # end
52
+
53
+ desc "Dumps output to a CSS file for testing"
54
+ task :debug do
55
+ require "sassc"
56
+ require "term/ansicolor"
57
+ require "autoprefixer-rails"
58
+ require "./lib/activeadmin/dark_color_scheme"
59
+
60
+ path = Activeadmin::DarkColorScheme.stylesheets_path
61
+ entrypoins = %w(_activeadmin-dark-color-scheme)
62
+
63
+ entrypoins.each do |file|
64
+ css = File.read("#{path}/#{file}.sass")
65
+ engine = SassC::Engine.new(css, syntax: :sass, load_paths: [path])
66
+ out = File.join("tmp", "#{file[1..-1]}.css")
67
+ css = engine.render
68
+ css = AutoprefixerRails.process(css)
69
+ # File.write(out, css)
70
+ File.open(out, "w+") do |f|
71
+ f << css
72
+ end
73
+ $stderr.puts Term::ANSIColor.green "Compiled #{out}"
74
+ end
75
+ end
76
+
77
+ # desc 'Start a dummy Rails app server'
78
+ # task :rails_server do
79
+ # require 'rack'
80
+ # require 'term/ansicolor'
81
+ # port = ENV['PORT'] || 9292
82
+ # puts %Q(Starting on #{Term::ANSIColor.cyan "http://localhost:#{port}"})
83
+ # Rack::Server.start(
84
+ # config: 'test/dummy_rails/config.ru',
85
+ # Port: port)
86
+ # end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/activeadmin/dark_color_scheme/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "activeadmin_dark_color_scheme"
7
+ spec.version = Activeadmin::DarkColorScheme::VERSION
8
+ spec.authors = ["Sergey Pedan"]
9
+ spec.email = ["sergey.pedan@gmail.com"]
10
+ spec.license = "MIT"
11
+
12
+ spec.summary = "A dark color scheme for ActiveAdmin Ruby CMS"
13
+ spec.description = <<~HEREDOC
14
+ #{spec.summary}. This gem provides Sass files that you can include via Sprockets.
15
+ The dark theme automatically switches on / off with your system’s dark / light mode.
16
+ You can override that on the browser level if you wish.
17
+ HEREDOC
18
+
19
+ spec.homepage = "https://github.com/sergeypedan/activeadmin-dark-color-scheme"
20
+ spec.extra_rdoc_files = ["README.md", "CHANGELOG.md"]
21
+ spec.rdoc_options = ["--charset=UTF-8"]
22
+ spec.metadata = { "changelog_uri" => "#{spec.homepage}/blob/master/CHANGELOG.md",
23
+ "documentation_uri" => "https://www.rubydoc.info/gems/#{spec.name}",
24
+ "homepage_uri" => spec.homepage,
25
+ "source_code_uri" => spec.homepage }
26
+
27
+ spec.require_paths = ["app", "lib/activeadmin"]
28
+
29
+ spec.bindir = "exe"
30
+ spec.executables = []
31
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
32
+ `git ls-files`.split("\n")
33
+ .reject { |f| %w[bin spec test].any? { |dir| f.start_with? dir } }
34
+ .reject { |f| f.start_with? "." }
35
+ end
36
+
37
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.3")
38
+ # SassC requires Ruby 2.3.3+
39
+
40
+ spec.add_runtime_dependency "autoprefixer-rails", "~> 10", ">= 10.4.7"
41
+ spec.add_runtime_dependency "sassc-rails", "~> 2", ">= 2.0.0"
42
+
43
+ spec.add_development_dependency "rspec", "~> 3"
44
+ spec.add_development_dependency "term-ansicolor", "~> 1"
45
+ spec.add_development_dependency "yard", "~> 0", ">= 0.9.20"
46
+ end
@@ -0,0 +1,21 @@
1
+ // Variables
2
+ @import "./activeadmin-dark-color-scheme/variables/all"
3
+
4
+ // Mixins
5
+ @import "./activeadmin-dark-color-scheme/mixins/buttons"
6
+ @import "./activeadmin-dark-color-scheme/mixins/panel-heads"
7
+
8
+ // Modules
9
+ @import "./activeadmin-dark-color-scheme/modules/buttons"
10
+ @import "./activeadmin-dark-color-scheme/modules/flash"
11
+ @import "./activeadmin-dark-color-scheme/modules/forms"
12
+ @import "./activeadmin-dark-color-scheme/modules/login"
13
+ @import "./activeadmin-dark-color-scheme/modules/misc"
14
+ @import "./activeadmin-dark-color-scheme/modules/pagination"
15
+ @import "./activeadmin-dark-color-scheme/modules/panels"
16
+ @import "./activeadmin-dark-color-scheme/modules/select2"
17
+ @import "./activeadmin-dark-color-scheme/modules/sidebar"
18
+ @import "./activeadmin-dark-color-scheme/modules/table-attributes"
19
+ @import "./activeadmin-dark-color-scheme/modules/table-index"
20
+ @import "./activeadmin-dark-color-scheme/modules/title-bar"
21
+ @import "./activeadmin-dark-color-scheme/modules/top-level"
@@ -0,0 +1,22 @@
1
+ @mixin btn-dark-1
2
+ background-color: $btn-dark-1-bg
3
+ background-image: linear-gradient(to bottom, $btn-dark-1-gradient-stop-top, $btn-dark-1-gradient-stop-bottom)
4
+ border-top-color: lighten($btn-dark-1-gradient-stop-top, 10%)
5
+ border-right-color: lighten($btn-dark-1-bg, 10%)
6
+ border-bottom-color: darken($btn-dark-1-gradient-stop-bottom, 10%)
7
+ border-left-color: lighten($btn-dark-1-bg, 10%)
8
+ box-shadow: 0 1px 2px darken($btn-dark-1-gradient-stop-bottom, 10%)
9
+ color: $btn-dark-1-color
10
+ text-shadow: none
11
+
12
+ &:not(.disabled):hover
13
+ background-image: linear-gradient(to bottom, lighten($btn-dark-1-gradient-stop-top, 3%), lighten($btn-dark-1-gradient-stop-bottom, 3%))
14
+
15
+ @mixin btn-light-1
16
+ background-color: $btn-light-1-bg
17
+ background-image: linear-gradient(180deg, $btn-light-1-gradient-stop-top, $btn-light-1-gradient-stop-bottom)
18
+ color: $btn-light-1-color
19
+ text-shadow: none
20
+
21
+ &:not(.disabled):hover
22
+ background-image: linear-gradient(to bottom, darken($btn-light-1-gradient-stop-top, 3%), darken($btn-light-1-gradient-stop-bottom, 3%))
@@ -0,0 +1,15 @@
1
+ @mixin gradient-bar-1
2
+ background-color: $panel-bg-color-solid
3
+ background-image: $panel-head-gradient
4
+ border-style: none
5
+ box-shadow: 0 1px 1px hsla(0, 0%, 0%, .2), 0 1px 0 0 hsla(0, 0%, 100%, .07) inset
6
+ color: #d7d7d7
7
+ text-shadow: none
8
+
9
+ @mixin gradient-bar-2
10
+ background-color: hsl(200, 5%, 20%)
11
+ background-image: $panel-head-gradient
12
+ border-style: none
13
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), 0 1px 0 0 hsla(0, 0%, 100%, .1) inset
14
+ color: #d7d7d7
15
+ text-shadow: none
@@ -0,0 +1,33 @@
1
+ @media (prefers-color-scheme: dark)
2
+
3
+ a.table_tools_button,
4
+ .table_tools .dropdown_menu_button
5
+ color: #d7d7d7
6
+ @include gradient-bar-1
7
+
8
+ &:not(.disabled):hover
9
+ @include gradient-bar-1
10
+
11
+ a.batch_action
12
+ color: darkgray
13
+
14
+ .dropdown_menu
15
+ .dropdown_menu_list_wrapper
16
+ .dropdown_menu_list
17
+ background-color: $panel-bg-color-solid
18
+
19
+ li a:hover
20
+ $color: lighten($panel-bg-color-solid, 3%)
21
+ background-color: $color
22
+ background-image: linear-gradient($color, $color)
23
+
24
+ form
25
+ fieldset
26
+ &.actions, &.buttons
27
+ li.cancel
28
+ a
29
+ @include btn-dark-1
30
+
31
+ form.filter_form
32
+ a.clear_filters_btn
33
+ @include btn-dark-1
@@ -0,0 +1,16 @@
1
+ @media (prefers-color-scheme: dark)
2
+
3
+ body.logged_in
4
+ .flash
5
+ background-color: #c2b36c
6
+ background-image: linear-gradient(#a99847, #a38e35)
7
+ border-bottom-color: #958118 !important
8
+ color: white
9
+ text-shadow: none
10
+
11
+ &.flash_notice
12
+ background-color: #4d8750
13
+ background-image: linear-gradient(#4e9a53, #4d8750)
14
+ border-bottom-color: #2e7732 !important
15
+ border-bottom: 1px solid #adcbaf
16
+ color: #daeec8
@@ -0,0 +1,33 @@
1
+ @media (prefers-color-scheme: dark)
2
+ form
3
+ input[type=submit],
4
+ input[type=button],
5
+ button
6
+ @include btn-light-1
7
+
8
+ fieldset
9
+ &.inputs
10
+ background-color: $panel-bg-color-transparent
11
+ box-shadow: $panel-shadow
12
+
13
+ legend
14
+ span
15
+ @include gradient-bar-1
16
+
17
+ ol > li label
18
+ color: $label-color !important
19
+
20
+ input[type=text],
21
+ input[type=password],
22
+ input[type=email],
23
+ input[type=number],
24
+ input[type=url],
25
+ input[type=tel],
26
+ input[type=date],
27
+ input[type=time],
28
+ textarea
29
+ border-color: $input-border-colors
30
+ box-shadow: inset 0 1px 5px hsla(0, 0%, 0%, .2)
31
+
32
+ input, textarea
33
+ background-color: $input-bg-color
@@ -0,0 +1,7 @@
1
+ @media (prefers-color-scheme: dark)
2
+ body.logged_out
3
+ background-color: $body-bg-color
4
+
5
+ #content_wrapper
6
+ #active_admin_content
7
+ background: $panel-bg-color-transparent
@@ -0,0 +1,7 @@
1
+ @media (prefers-color-scheme: dark)
2
+
3
+ .status_tag
4
+ -webkit-font-smoothing: auto
5
+
6
+ .blank_slate
7
+ border-color: #737373 !important
@@ -0,0 +1,11 @@
1
+ @media (prefers-color-scheme: dark)
2
+ .pagination
3
+ a
4
+ @include btn-dark-1
5
+
6
+ span.page.current
7
+ @include btn-light-1
8
+
9
+ .pagination_information
10
+ b
11
+ color: $body-text-color
@@ -0,0 +1,7 @@
1
+ @media (prefers-color-scheme: dark)
2
+ .section, .panel
3
+ background-color: $panel-bg-color-transparent
4
+ box-shadow: none
5
+
6
+ > h3
7
+ @include gradient-bar-1
@@ -0,0 +1,24 @@
1
+ @media (prefers-color-scheme: dark)
2
+ .select2-dropdown
3
+ background-color: $select2-bg-color
4
+ border-color: $panel-bg-color-solid
5
+
6
+
7
+ .select2-container--default
8
+ .select2-selection--single
9
+ background-color: $input-bg-color
10
+ border-color: $input-border-colors
11
+
12
+ .select2-selection__rendered
13
+ color: $input-text-color
14
+
15
+ .select2-search--dropdown
16
+ .select2-search__field
17
+ background-color: $select2-input-bg-color
18
+ border-color: $input-border-colors
19
+
20
+ .select2-results__option--highlighted[aria-selected]
21
+ background-color: lighten($select2-bg-color, 5%)
22
+
23
+ .select2-results__option[aria-selected=true]
24
+ background-color: $select2-bg-color
@@ -0,0 +1,10 @@
1
+ @media (prefers-color-scheme: dark)
2
+ .sidebar_section
3
+ background-color: $panel-bg-color-transparent
4
+ box-shadow: $panel-shadow
5
+
6
+ > h3
7
+ @include gradient-bar-1
8
+
9
+ label
10
+ color: $label-color
@@ -0,0 +1,32 @@
1
+ @media (prefers-color-scheme: dark)
2
+ .attributes_table
3
+ table
4
+ th
5
+ color: $label-color
6
+ text-shadow: none
7
+
8
+ th, td
9
+ border-bottom-color: $tr-border-bottom-color
10
+
11
+ td
12
+ color: $input-text-color
13
+
14
+ .panel_contents
15
+ table
16
+ tr.odd
17
+ td
18
+ background-color: $tr-odd-bg-color
19
+
20
+ tr.even
21
+ td
22
+ background-color: #272b2d
23
+
24
+ th
25
+ border-bottom-color: $tr-border-bottom-color
26
+ color: $label-color
27
+ text-shadow: none
28
+
29
+ td
30
+ border-bottom-color: $tr-border-bottom-color
31
+ border-bottom-style: solid
32
+ border-bottom-width: 1px
@@ -0,0 +1,32 @@
1
+ @media (prefers-color-scheme: dark)
2
+
3
+ table.index_table
4
+ th
5
+ background-color: $panel-bg-color-solid
6
+ background-image: $panel-head-gradient
7
+ border-top-color: $th-border-color-top
8
+ border-right-color: $th-border-color-right !important
9
+ border-bottom-color: $th-border-color-bottom
10
+ border-left-color: $th-border-color-left
11
+ box-shadow: none
12
+ color: hsl(0, 0%, 95%)
13
+ text-shadow: none
14
+
15
+ &.sorted-asc, &.sorted-desc
16
+ background-color: $th-bg-color
17
+ background-image: $panel-head-gradient
18
+
19
+ a, a:link, a:visited
20
+ color: hsl(0, 0%, 95%)
21
+
22
+ tr
23
+ &.even
24
+ td
25
+ background-color: $tr-even-bg-color
26
+
27
+ &.selected
28
+ td
29
+ background-color: $tr-selected-bg-color
30
+
31
+ td
32
+ border-bottom-color: $tr-border-bottom-color
@@ -0,0 +1,9 @@
1
+ @media (prefers-color-scheme: dark)
2
+
3
+ #title_bar
4
+ @include gradient-bar-2
5
+
6
+ .action_items
7
+ span.action_item
8
+ > a, > .dropdown_menu > a
9
+ @include btn-dark-1
@@ -0,0 +1,18 @@
1
+ @media (prefers-color-scheme: dark)
2
+ \:root
3
+ color-scheme: dark
4
+
5
+ body
6
+ -webkit-font-smoothing: antialiased
7
+ background-color: $body-bg-color
8
+ color: $body-text-color
9
+
10
+ a, a:link, a:visited
11
+ color: $link-color-1
12
+
13
+ code
14
+ background-color: hsla(0, 0%, 47%, 0.25)
15
+ color: $input-text-color
16
+
17
+ h1, h2, h3, h4, h5, h6
18
+ color: $body-text-color
@@ -0,0 +1,44 @@
1
+ // $body-bg-color: hsl(200, 4%, 20%) !default
2
+ $body-bg-color: hsl(200, 8%, 15%) !default
3
+ $body-text-color: hsla(0, 0%, 100%, 0.8) !default
4
+
5
+ // Links
6
+ $link-color-1: hsl(210, 70%, 73%) !default
7
+
8
+ // Tables
9
+ $tr-border-bottom-color: hsla(0, 0%, 100%, .075) !default
10
+ $th-bg-color: #6f6f6f !default
11
+ $th-border-color-bottom: hsl(0, 0%, 30%) !default
12
+ $th-border-color-left: hsl(0, 0%, 24%) !default
13
+ $th-border-color-right: hsl(0, 0%, 35%) !default
14
+ $th-border-color-top: hsl(0, 0%, 31%) !default
15
+ $tr-even-bg-color: hsla(0, 0%, 100%, .02) !default
16
+ $tr-odd-bg-color: $body-bg-color !default
17
+ $tr-selected-bg-color: rgba(0, 0, 0, 0.16) !default
18
+
19
+ // Panels
20
+ $panel-bg-color-solid: hsl(0, 0%, 26%) !default
21
+ $panel-bg-color-transparent: hsla(0, 0%, 100%, 0.05) !default
22
+ $panel-head-gradient: linear-gradient(rgba(255, 255, 255, .08), transparent) !default
23
+ $panel-shadow: 0 1px 4px hsla(0, 0%, 0%, .2) !default
24
+
25
+ // Forms
26
+ $input-bg-color: hsla(0, 0%, 0%, .2) !default
27
+ $input-border-colors: hsla(0, 0%, 50%, .1) hsla(0, 0%, 50%, .2) hsla(0, 0%, 50%, .2) hsla(0, 0%, 50%, .2) !default
28
+ $input-text-color: white !default
29
+ $label-color: hsl(0, 0%, 80%) !default
30
+
31
+ // Select
32
+ $select2-bg-color: hsl(200, 5%, 20%) !default
33
+ $select2-input-bg-color: hsl(240, 0%, 15%) !default
34
+
35
+ // Buttons
36
+ $btn-dark-1-bg: hsl(0, 0%, 17%) !default
37
+ $btn-dark-1-gradient-stop-top: hsl(0, 0%, 33%) !default
38
+ $btn-dark-1-gradient-stop-bottom: hsl(0, 0%, 29%) !default
39
+ $btn-dark-1-color: white !default
40
+
41
+ $btn-light-1-bg: hsl(208, 15%, 87%) !default
42
+ $btn-light-1-gradient-stop-top: hsl(208, 15%, 87%) !default
43
+ $btn-light-1-gradient-stop-bottom: hsl(210, 2%, 68%) !default
44
+ $btn-light-1-color: hsl(0, 0%, 7%) !default
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "autoprefixer-rails"
4
+ require "sassc-rails"
5
+
6
+ module FormtasticTristateRadio
7
+
8
+ # This is standard Rails way to autoload gem’s contents dynamically as an “engine”
9
+ # @see https://guides.rubyonrails.org/engines.html Rails guide on engines
10
+ #
11
+ # module Rails
12
+ class Engine < ::Rails::Engine
13
+ initializer "bootstrap.assets" do |app|
14
+ app.config.assets.paths << root.join("assets", "stylesheets").to_s
15
+ end
16
+ end
17
+ # end
18
+
19
+ end
@@ -0,0 +1,5 @@
1
+ module Activeadmin
2
+ module DarkColorScheme
3
+ VERSION = "0.1.1"
4
+ end
5
+ end
@@ -0,0 +1,22 @@
1
+ require_relative "dark_color_scheme/version"
2
+ require_relative "dark_color_scheme/engine"
3
+
4
+ module Activeadmin
5
+ module DarkColorScheme
6
+ class << self
7
+
8
+ def gem_path
9
+ @gem_path ||= File.expand_path "../../app", File.dirname(__FILE__)
10
+ end
11
+
12
+ def assets_path
13
+ @assets_path ||= File.join gem_path, 'assets'
14
+ end
15
+
16
+ def stylesheets_path
17
+ File.join assets_path, 'stylesheets'
18
+ end
19
+
20
+ end
21
+ end
22
+ end
metadata ADDED
@@ -0,0 +1,169 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: activeadmin_dark_color_scheme
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Sergey Pedan
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-06-10 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: autoprefixer-rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '10'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 10.4.7
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '10'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 10.4.7
33
+ - !ruby/object:Gem::Dependency
34
+ name: sassc-rails
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '2'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 2.0.0
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '2'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 2.0.0
53
+ - !ruby/object:Gem::Dependency
54
+ name: rspec
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '3'
60
+ type: :development
61
+ prerelease: false
62
+ version_requirements: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - "~>"
65
+ - !ruby/object:Gem::Version
66
+ version: '3'
67
+ - !ruby/object:Gem::Dependency
68
+ name: term-ansicolor
69
+ requirement: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - "~>"
72
+ - !ruby/object:Gem::Version
73
+ version: '1'
74
+ type: :development
75
+ prerelease: false
76
+ version_requirements: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - "~>"
79
+ - !ruby/object:Gem::Version
80
+ version: '1'
81
+ - !ruby/object:Gem::Dependency
82
+ name: yard
83
+ requirement: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - "~>"
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: 0.9.20
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: 0.9.20
101
+ description: |
102
+ A dark color scheme for ActiveAdmin Ruby CMS. This gem provides Sass files that you can include via Sprockets.
103
+ The dark theme automatically switches on / off with your system’s dark / light mode.
104
+ You can override that on the browser level if you wish.
105
+ email:
106
+ - sergey.pedan@gmail.com
107
+ executables: []
108
+ extensions: []
109
+ extra_rdoc_files:
110
+ - README.md
111
+ - CHANGELOG.md
112
+ files:
113
+ - CHANGELOG.md
114
+ - Gemfile
115
+ - Gemfile.lock
116
+ - LICENSE.txt
117
+ - README.md
118
+ - Rakefile
119
+ - activeadmin_dark_color_scheme.gemspec
120
+ - app/assets/stylesheets/_activeadmin-dark-color-scheme.sass
121
+ - app/assets/stylesheets/activeadmin-dark-color-scheme/mixins/_buttons.sass
122
+ - app/assets/stylesheets/activeadmin-dark-color-scheme/mixins/_panel-heads.sass
123
+ - app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_buttons.sass
124
+ - app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_flash.sass
125
+ - app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_forms.sass
126
+ - app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_login.sass
127
+ - app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_misc.sass
128
+ - app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_pagination.sass
129
+ - app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_panels.sass
130
+ - app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_select2.sass
131
+ - app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_sidebar.sass
132
+ - app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_table-attributes.sass
133
+ - app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_table-index.sass
134
+ - app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_title-bar.sass
135
+ - app/assets/stylesheets/activeadmin-dark-color-scheme/modules/_top-level.sass
136
+ - app/assets/stylesheets/activeadmin-dark-color-scheme/variables/_all.sass
137
+ - lib/activeadmin/dark_color_scheme.rb
138
+ - lib/activeadmin/dark_color_scheme/engine.rb
139
+ - lib/activeadmin/dark_color_scheme/version.rb
140
+ homepage: https://github.com/sergeypedan/activeadmin-dark-color-scheme
141
+ licenses:
142
+ - MIT
143
+ metadata:
144
+ changelog_uri: https://github.com/sergeypedan/activeadmin-dark-color-scheme/blob/master/CHANGELOG.md
145
+ documentation_uri: https://www.rubydoc.info/gems/activeadmin_dark_color_scheme
146
+ homepage_uri: https://github.com/sergeypedan/activeadmin-dark-color-scheme
147
+ source_code_uri: https://github.com/sergeypedan/activeadmin-dark-color-scheme
148
+ post_install_message:
149
+ rdoc_options:
150
+ - "--charset=UTF-8"
151
+ require_paths:
152
+ - app
153
+ - lib/activeadmin
154
+ required_ruby_version: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ version: 2.3.3
159
+ required_rubygems_version: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ version: '0'
164
+ requirements: []
165
+ rubygems_version: 3.3.7
166
+ signing_key:
167
+ specification_version: 4
168
+ summary: A dark color scheme for ActiveAdmin Ruby CMS
169
+ test_files: []