captive_admin 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 768d49dd8ca3536e72e10052151ec5d2219301f4d28d156dfba3578d9b887d0d
4
+ data.tar.gz: '0496d73cb46ae0ffb71f7ae68e5aebd2051fa456e465907437cf685395fa67d8'
5
+ SHA512:
6
+ metadata.gz: '003469e9696132247a891b8a018760b2033393cd0ca0027f7eb323a196ac47db5b8d0a7320c40f9b2d9c2ba030bc72f1dfdcbed405fc922795d199c389cb28ac'
7
+ data.tar.gz: 5054777dd4c804cf975bcc7dfb9f98ba4ad67b1c9cf883ba8134ecf7abbe041a8240f66d1046130500d44f3450b1b5fac4ffc00e817f92f6fa72c50e3a39ff9b
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,13 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.6
3
+
4
+ Style/StringLiterals:
5
+ Enabled: true
6
+ EnforcedStyle: double_quotes
7
+
8
+ Style/StringLiteralsInInterpolation:
9
+ Enabled: true
10
+ EnforcedStyle: double_quotes
11
+
12
+ Layout/LineLength:
13
+ Max: 120
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in captive_admin.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "rspec", "~> 3.0"
11
+
12
+ gem "rubocop", "~> 1.21"
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 Stéphane Hanser
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,33 @@
1
+ # CaptiveAdmin
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/captive_admin`. 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
+ Install the gem and add to the application's Gemfile by executing:
10
+
11
+ $ bundle add captive_admin
12
+
13
+ If bundler is not being used to manage dependencies, install the gem by executing:
14
+
15
+ $ gem install captive_admin
16
+
17
+ ## Usage
18
+
19
+ TODO: Write usage instructions here
20
+
21
+ ## Development
22
+
23
+ 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.
24
+
25
+ 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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
26
+
27
+ ## Contributing
28
+
29
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/captive_admin.
30
+
31
+ ## License
32
+
33
+ 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,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
@@ -0,0 +1,18 @@
1
+ @import "active_admin/base";
2
+
3
+ /* Active Admin CSS */
4
+ @media screen {
5
+ @import "./typography";
6
+ @import "./header";
7
+ @import "./forms";
8
+ @import "./components/tables";
9
+ @import "./components/links";
10
+ @import "./components/panels";
11
+ @import "./components/status_tags";
12
+ @import "./pages/logged_out";
13
+ @import "./structure/title_bar";
14
+
15
+ body {
16
+ color: $fg-default;
17
+ }
18
+ }
@@ -0,0 +1,14 @@
1
+ form {
2
+ fieldset {
3
+ &.inputs {
4
+ background-color: $bg-subtle;
5
+ }
6
+ }
7
+
8
+ /* Buttons */
9
+ input[type=submit], form input[type=button], form button {
10
+ @include primary-button;
11
+ cursor: pointer;
12
+ }
13
+ }
14
+
@@ -0,0 +1,29 @@
1
+ // ----------------------------------- Header
2
+ #header {
3
+ text-shadow: none;
4
+ background: $bg-emphasis;
5
+
6
+ h1 {
7
+ color: $fg-onEmphasis;
8
+ }
9
+
10
+ a, a:link { color: $fg-onEmphasis; }
11
+
12
+ ul.tabs {
13
+ & > li {
14
+ &.current > a {
15
+ background: $accent-subtle;
16
+ color: $fg-default;
17
+ }
18
+
19
+ &:hover > a {
20
+ background: $accent-subtle;
21
+ color: $accent-fg;
22
+ }
23
+ }
24
+ }
25
+
26
+ #utility_nav {
27
+ a:hover { color: $accent-fg; }
28
+ }
29
+ }
@@ -0,0 +1,3 @@
1
+ @import "active_admin/mixins";
2
+
3
+ @import "./mixins/all";
@@ -0,0 +1,9 @@
1
+ body {
2
+ @include body-family;
3
+ }
4
+
5
+ // Headings
6
+ h1,h2,h3,h4,h5,h6 {
7
+ @include title-family;
8
+ letter-spacing: .5px;
9
+ }
@@ -0,0 +1,3 @@
1
+ a, a:link, a:visited {
2
+ color: $accent-fg;
3
+ }
@@ -0,0 +1,6 @@
1
+ // ----------------------------------- Helper class to apply to elements to make them sections
2
+ .section, .panel{ @include section; }
3
+
4
+ // ----------------------------------- Sidebar Sections
5
+
6
+ .sidebar_section { @include section; }
@@ -0,0 +1,12 @@
1
+ .status_tag {
2
+ border: 1px solid;
3
+ border-radius: 12px;
4
+ letter-spacing: 0.5px;
5
+ padding: $spacer-1 $spacer-2;
6
+
7
+ &.yes {
8
+ background: $success-subtle;
9
+ color: $success-fg;
10
+ }
11
+ &.no { background: $bg-subtle; color: $fg-muted; }
12
+ }
@@ -0,0 +1,6 @@
1
+ // --------- Index Tables
2
+
3
+
4
+ table.index_table {
5
+ tr.even td { background: $bg-subtle; }
6
+ }
@@ -0,0 +1,4 @@
1
+ @import "./variables";
2
+ @import "./buttons";
3
+ @import "./sections";
4
+ @import "./typography";
@@ -0,0 +1,14 @@
1
+ @mixin primary-button {
2
+ background-color: $primary-emphasis;
3
+ background-image: none;
4
+ color: $primary-onEmphasis;
5
+ border: none;
6
+ text-shadow: none;
7
+
8
+ &:not(.disabled) {
9
+ &:hover{
10
+ background-color: $primary-muted;
11
+ background-image: none;
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,7 @@
1
+ @mixin section-background {
2
+ background: $bg-subtle;
3
+
4
+ // heritage AA
5
+ @include rounded(4px);
6
+ @include inset-shadow(0,1px,4px, #ddd);
7
+ }
@@ -0,0 +1,11 @@
1
+ @mixin sans-family {
2
+ @include body-family;
3
+ }
4
+
5
+ @mixin body-family {
6
+ font-family: $default-font-family;
7
+ }
8
+
9
+ @mixin title-family {
10
+ font-family: $title-font-family;
11
+ }
@@ -0,0 +1,100 @@
1
+ // Couleurs du nuancier Captive
2
+ // https://www.notion.so/Nuanciers-Captive-pour-le-web-et-mobile-ee189f2db6e543e6bc7cba77c9e8dff5
3
+ $white: #FFFFFF;
4
+
5
+ $blue-grey-900: #102A43;
6
+ $blue-grey-600: #486581;
7
+ $blue-grey-500: #5E7997;
8
+ $blue-grey-050: #F5F7FA;
9
+
10
+ $pink-vivid-500: #D9127C;
11
+ $pink-vivid-400: #E8368F;
12
+ $pink-vivid-050: #FFF5F8;
13
+
14
+ $light-blue-vivid-700: #1177B6;
15
+ $light-blue-vivid-600: #188DCD;
16
+ $light-blue-vivid-050: #F0FBFF;
17
+
18
+ $lime-green-700: #507712;
19
+ $lime-green-600: #63921A;
20
+ $lime-green-050: #F2FDE0;
21
+
22
+ $red-vivid-600: #CF1124;
23
+ $red-vivid-500: #E12D39;
24
+ $red-vivid-050: #FFF0F0;
25
+
26
+ $yellow-vivid-800: #B44D12;
27
+ $yellow-vivid-700: #CB6E17;
28
+ $yellow-vivid-050: #FFFBEA;
29
+
30
+ $purple-700: #421987;
31
+ $purple-500: #653CAD;
32
+ $purple-050: #EAE2F8;
33
+
34
+ // Couleurs du Design System Captive
35
+ // https://www.notion.so/captive/UI-Les-couleurs-du-design-system-Captive-eed4bbb0295f4d949c47e183033e5180
36
+
37
+ $fg-default: $blue-grey-900;
38
+ $fg-muted: $blue-grey-600;
39
+ $fg-subtle: $blue-grey-500;
40
+ $fg-onEmphasis: $white;
41
+
42
+ $bg-default: $white;
43
+ $bg-subtle: $blue-grey-050;
44
+ $bg-emphasis: $blue-grey-900;
45
+
46
+ $primary-fg: $pink-vivid-500;
47
+ $primary-emphasis: $pink-vivid-500;
48
+ $primary-muted: $pink-vivid-400;
49
+ $primary-subtle: $pink-vivid-050;
50
+ $primary-onEmphasis: $white;
51
+
52
+ $accent-fg: $light-blue-vivid-700;
53
+ $accent-emphasis: $light-blue-vivid-700;
54
+ $accent-muted: $light-blue-vivid-600;
55
+ $accent-subtle: $light-blue-vivid-050;
56
+
57
+ $success-fg: $lime-green-700;
58
+ $success-emphasis: $lime-green-700;
59
+ $success-muted: $lime-green-600;
60
+ $success-subtle: $lime-green-050;
61
+
62
+ $attention-fg: $yellow-vivid-800;
63
+ $attention-emphasis: $yellow-vivid-800;
64
+ $attention-muted: $yellow-vivid-700;
65
+ $attention-subtle: $yellow-vivid-050;
66
+
67
+ $danger-fg: $red-vivid-600;
68
+ $danger-emphasis: $red-vivid-600;
69
+ $danger-muted: $red-vivid-500;
70
+ $danger-subtle: $red-vivid-050;
71
+
72
+ $support-fg: $purple-700;
73
+ $support-emphasis: $purple-700;
74
+ $support-muted: $purple-500;
75
+ $support-subtle: $purple-050;
76
+
77
+
78
+ // Espacements
79
+ // Cf https://www.notion.so/captive/UI-Espacement-du-Design-System-Captive-cc192b02b57d453fa0da9fdc6d1234c2
80
+ $spacer-0: 0;
81
+ $spacer-1: 4px;
82
+ $spacer-2: 8px;
83
+ $spacer-3: 12px;
84
+ $spacer-4: 16px;
85
+ $spacer-5: 24px;
86
+ $spacer-6: 32px;
87
+ $spacer-7: 48px;
88
+ $spacer-8: 64px;
89
+ $spacer-9: 96px;
90
+ $spacer-10: 128px;
91
+ $spacer-11: 192px;
92
+ $spacer-12: 256px;
93
+
94
+
95
+ // Fonts
96
+ // https://www.notion.so/captive/Typographie-Captive-85c60f5a849f4adaacaf18cc4aff2cea
97
+ @import url('https://fonts.googleapis.com/css2?family=Open+Sans&family=Barlow:wght@400;600&display=swap');
98
+
99
+ $default-font-family: "Open Sans", -apple-system, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue;
100
+ $title-font-family: "Barlow", -apple-system, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue;
@@ -0,0 +1,9 @@
1
+ body.logged_out {
2
+ background: $bg-subtle;
3
+
4
+ h2 {
5
+ background-color: $bg-emphasis;
6
+ background-image: none;
7
+ text-shadow: none;
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ #title_bar {
2
+ .action_items {
3
+ span.action_item {
4
+ & > a, & > .dropdown_menu > a {
5
+ @include primary-button;
6
+ }
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CaptiveAdmin
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "captive_admin/version"
4
+
5
+ module CaptiveAdmin
6
+ class Error < StandardError; end
7
+ # Your code goes here...
8
+ module Rails
9
+ class Engine < ::Rails::Engine
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,4 @@
1
+ module CaptiveAdmin
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: captive_admin
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Captive
8
+ - Stéphane Hanser
9
+ autorequire:
10
+ bindir: exe
11
+ cert_chain: []
12
+ date: 2023-07-13 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Un thème pour ActiveAdmin aux couleurs de Captive.
15
+ email:
16
+ - shanser@captive.fr
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - ".rspec"
22
+ - ".rubocop.yml"
23
+ - Gemfile
24
+ - LICENSE.txt
25
+ - README.md
26
+ - Rakefile
27
+ - app/assets/stylesheets/captive_admin/_base.scss
28
+ - app/assets/stylesheets/captive_admin/_forms.scss
29
+ - app/assets/stylesheets/captive_admin/_header.scss
30
+ - app/assets/stylesheets/captive_admin/_mixins.scss
31
+ - app/assets/stylesheets/captive_admin/_typography.scss
32
+ - app/assets/stylesheets/captive_admin/components/_links.scss
33
+ - app/assets/stylesheets/captive_admin/components/_panels.scss
34
+ - app/assets/stylesheets/captive_admin/components/_status_tags.scss
35
+ - app/assets/stylesheets/captive_admin/components/_tables.scss
36
+ - app/assets/stylesheets/captive_admin/mixins/_all.scss
37
+ - app/assets/stylesheets/captive_admin/mixins/_buttons.scss
38
+ - app/assets/stylesheets/captive_admin/mixins/_sections.scss
39
+ - app/assets/stylesheets/captive_admin/mixins/_typography.scss
40
+ - app/assets/stylesheets/captive_admin/mixins/_variables.scss
41
+ - app/assets/stylesheets/captive_admin/pages/_logged_out.scss
42
+ - app/assets/stylesheets/captive_admin/structure/_title_bar.scss
43
+ - lib/captive_admin.rb
44
+ - lib/captive_admin/version.rb
45
+ - sig/captive_admin.rbs
46
+ homepage: https://github.com/Captive-Studio/captive_admin
47
+ licenses:
48
+ - MIT
49
+ metadata:
50
+ homepage_uri: https://github.com/Captive-Studio/captive_admin
51
+ source_code_uri: https://github.com/Captive-Studio/captive_admin
52
+ changelog_uri: https://github.com/Captive-Studio/captive_admin/releases
53
+ post_install_message:
54
+ rdoc_options: []
55
+ require_paths:
56
+ - lib
57
+ required_ruby_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: 2.6.0
62
+ required_rubygems_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ requirements: []
68
+ rubygems_version: 3.3.26
69
+ signing_key:
70
+ specification_version: 4
71
+ summary: Un thème pour ActiveAdmin aux couleurs de Captive.
72
+ test_files: []