activeadmin_blaze_theme 0.5.14 → 0.7.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/specs.yml +26 -0
  3. data/.gitignore +11 -2
  4. data/.rspec +2 -0
  5. data/.rubocop.yml +27 -0
  6. data/Gemfile +15 -0
  7. data/LICENSE.txt +1 -1
  8. data/README.md +102 -54
  9. data/Rakefile +15 -1
  10. data/activeadmin_blaze_theme.gemspec +2 -12
  11. data/app/assets/stylesheets/activeadmin_blaze_theme/_base.scss +197 -0
  12. data/app/assets/stylesheets/activeadmin_blaze_theme/_contents.scss +43 -0
  13. data/app/assets/stylesheets/activeadmin_blaze_theme/_footer.scss +15 -0
  14. data/app/assets/stylesheets/activeadmin_blaze_theme/_form.scss +381 -0
  15. data/app/assets/stylesheets/activeadmin_blaze_theme/_header.scss +140 -0
  16. data/app/assets/stylesheets/activeadmin_blaze_theme/_navigation.scss +69 -0
  17. data/app/assets/stylesheets/activeadmin_blaze_theme/_sidebars.scss +64 -0
  18. data/app/assets/stylesheets/activeadmin_blaze_theme/_tables.scss +96 -0
  19. data/app/assets/stylesheets/activeadmin_blaze_theme/_variables.scss +46 -0
  20. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/blaze.scss +2 -0
  21. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.inputs.scss +0 -9
  22. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.overlays.scss +8 -1
  23. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.typography.scss +1 -0
  24. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_objects.grid.scss +4 -3
  25. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_utilities.alignment.scss +12 -0
  26. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_utilities.visibility.scss +47 -0
  27. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/objects.containers.scss +0 -2
  28. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/objects.drawers.scss +6 -6
  29. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/objects.modals.scss +1 -1
  30. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/utilities.alignment.scss +12 -0
  31. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/utilities.visibility.scss +45 -0
  32. data/app/assets/stylesheets/activeadmin_blaze_theme/theme.scss +11 -989
  33. data/bin/rails +29 -0
  34. data/bin/rake +29 -0
  35. data/bin/rspec +29 -0
  36. data/bin/rubocop +29 -0
  37. data/extra/edit.png +0 -0
  38. data/extra/index.png +0 -0
  39. data/index.js +2 -0
  40. data/lib/activeadmin/views/activeadmin_form.rb +6 -2
  41. data/lib/activeadmin_blaze_theme.rb +8 -5
  42. data/lib/activeadmin_blaze_theme/version.rb +1 -1
  43. data/lib/formtastic/inputs/blaze_toggle_input.rb +12 -8
  44. data/package.json +13 -0
  45. data/spec/dummy/.ruby-version +1 -0
  46. data/spec/dummy/.tool-versions +1 -0
  47. data/spec/dummy/Rakefile +6 -0
  48. data/spec/dummy/app/admin/authors.rb +57 -0
  49. data/spec/dummy/app/admin/dashboard.rb +32 -0
  50. data/spec/dummy/app/admin/posts.rb +50 -0
  51. data/spec/dummy/app/admin/tags.rb +4 -0
  52. data/spec/dummy/app/assets/config/manifest.js +3 -0
  53. data/spec/dummy/app/assets/images/.keep +0 -0
  54. data/spec/dummy/app/assets/javascripts/active_admin.js +1 -0
  55. data/spec/dummy/app/assets/stylesheets/active_admin.scss +4 -0
  56. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  57. data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
  58. data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
  59. data/spec/dummy/app/controllers/application_controller.rb +2 -0
  60. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  61. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  62. data/spec/dummy/app/javascript/packs/application.js +15 -0
  63. data/spec/dummy/app/jobs/application_job.rb +7 -0
  64. data/spec/dummy/app/mailers/application_mailer.rb +4 -0
  65. data/spec/dummy/app/models/application_record.rb +7 -0
  66. data/spec/dummy/app/models/author.rb +26 -0
  67. data/spec/dummy/app/models/concerns/.keep +0 -0
  68. data/spec/dummy/app/models/post.rb +25 -0
  69. data/spec/dummy/app/models/post_tag.rb +9 -0
  70. data/spec/dummy/app/models/profile.rb +9 -0
  71. data/spec/dummy/app/models/tag.rb +6 -0
  72. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  73. data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
  74. data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
  75. data/spec/dummy/bin/rails +4 -0
  76. data/spec/dummy/bin/rake +4 -0
  77. data/spec/dummy/bin/setup +33 -0
  78. data/spec/dummy/config.ru +5 -0
  79. data/spec/dummy/config/application.rb +18 -0
  80. data/spec/dummy/config/boot.rb +5 -0
  81. data/spec/dummy/config/cable.yml +10 -0
  82. data/spec/dummy/config/database.yml +8 -0
  83. data/spec/dummy/config/environment.rb +5 -0
  84. data/spec/dummy/config/environments/development.rb +62 -0
  85. data/spec/dummy/config/environments/production.rb +112 -0
  86. data/spec/dummy/config/environments/test.rb +49 -0
  87. data/spec/dummy/config/initializers/active_admin.rb +335 -0
  88. data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -0
  89. data/spec/dummy/config/initializers/assets.rb +12 -0
  90. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  91. data/spec/dummy/config/initializers/content_security_policy.rb +28 -0
  92. data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
  93. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  94. data/spec/dummy/config/initializers/inflections.rb +16 -0
  95. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  96. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  97. data/spec/dummy/config/locales/en.yml +33 -0
  98. data/spec/dummy/config/puma.rb +38 -0
  99. data/spec/dummy/config/routes.rb +3 -0
  100. data/spec/dummy/config/spring.rb +6 -0
  101. data/spec/dummy/config/storage.yml +7 -0
  102. data/spec/dummy/db/migrate/20170806125915_create_active_storage_tables.active_storage.rb +27 -0
  103. data/spec/dummy/db/migrate/20180101010101_create_active_admin_comments.rb +16 -0
  104. data/spec/dummy/db/migrate/20180607053251_create_authors.rb +13 -0
  105. data/spec/dummy/db/migrate/20180607053254_create_profiles.rb +12 -0
  106. data/spec/dummy/db/migrate/20180607053255_create_tags.rb +11 -0
  107. data/spec/dummy/db/migrate/20180607053257_create_post_tags.rb +12 -0
  108. data/spec/dummy/db/migrate/20180607053739_create_posts.rb +17 -0
  109. data/spec/dummy/db/schema.rb +99 -0
  110. data/spec/dummy/lib/assets/.keep +0 -0
  111. data/spec/dummy/public/404.html +67 -0
  112. data/spec/dummy/public/422.html +67 -0
  113. data/spec/dummy/public/500.html +66 -0
  114. data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
  115. data/spec/dummy/public/apple-touch-icon.png +0 -0
  116. data/spec/dummy/public/favicon.ico +0 -0
  117. data/spec/rails_helper.rb +36 -0
  118. data/spec/spec_helper.rb +20 -0
  119. data/spec/support/capybara.rb +3 -0
  120. data/spec/support/drivers.rb +7 -0
  121. data/spec/system/theme_spec.rb +15 -0
  122. metadata +186 -136
  123. data/extra/screenshot1.jpg +0 -0
  124. data/extra/screenshot2.jpg +0 -0
  125. data/extra/screenshot3.jpg +0 -0
  126. data/extra/screenshot4.jpg +0 -0
@@ -0,0 +1,69 @@
1
+ body.active_admin {
2
+ nav.pagination {
3
+ @extend .c-pagination;
4
+
5
+ float: none;
6
+ justify-content: center;
7
+ margin: 0;
8
+ padding: 0;
9
+
10
+ span > a {
11
+ background: transparent;
12
+ background-image: none;
13
+ border: 0 none;
14
+ box-shadow: none;
15
+ color: initial;
16
+ cursor: pointer;
17
+ padding: 6px 10px;
18
+ margin: 0 auto;
19
+ text-shadow: none;
20
+ }
21
+
22
+ a:hover, span:hover > a {
23
+ background: transparent;
24
+ background-image: none;
25
+ color: #888;
26
+ text-shadow: none;
27
+ }
28
+
29
+ .first, .prev, .next, .last {
30
+ display: inline-block;
31
+ margin-right: 2px;
32
+ padding: 0;
33
+ }
34
+
35
+ .prev {
36
+ margin-right: 16px;
37
+ }
38
+
39
+ .next {
40
+ margin-left: 14px;
41
+ }
42
+
43
+ .page {
44
+ display: inline-block;
45
+ margin-right: 2px;
46
+ padding: 0;
47
+ &.current {
48
+ background-color: transparent;
49
+ background-image: none;
50
+ border-radius: 20px;
51
+ color: #000;
52
+ padding: 6px 10px;
53
+ text-shadow: none;
54
+ }
55
+ &.current:hover {
56
+ background-color: transparent;
57
+ background-image: none;
58
+ }
59
+ &.gap {
60
+ border: 0 none;
61
+ }
62
+ &.gap:hover {
63
+ background-color: transparent;
64
+ color: initial;
65
+ cursor: default;
66
+ }
67
+ }
68
+ }
69
+ }
@@ -0,0 +1,64 @@
1
+ body.active_admin {
2
+ #sidebar {
3
+ background: $bg-sidebar;
4
+ min-height: calc(100vh - #{$height-topbar + $height-titlebar + 2 + 40});
5
+ padding: 0 15px;
6
+ .sidebar_section {
7
+ margin-bottom: 20px;
8
+ }
9
+ .filter_form .selectize-control > .selectize-input {
10
+ width: 100%;
11
+ }
12
+ }
13
+ #active_admin_content > #sidebar, #active_admin_content > #main_content_wrapper {
14
+ float: none;
15
+ }
16
+ .panel_contents {
17
+ @extend .c-card__item;
18
+ padding: 8px 10px 10px 10px;
19
+ }
20
+ .sidebar_section {
21
+ @extend .c-card;
22
+ @extend .u-high;
23
+ .filter_form_field {
24
+ input[type='datetime-local'],
25
+ input[type='email'],
26
+ input[type='number'],
27
+ input[type='password'],
28
+ input[type='search'],
29
+ input[type='tel'],
30
+ input[type='text'],
31
+ input[type='time'],
32
+ input[type='url'],
33
+ textarea {
34
+ background-color: $bg-inputs;
35
+ background-image: none;
36
+ }
37
+ select {
38
+ background-color: $bg-inputs;
39
+ }
40
+ }
41
+ > h3 {
42
+ @extend .c-card__item;
43
+ @extend .c-card__item--brand;
44
+ background-image: none;
45
+ border: 0 none !important;
46
+ color: $fg-box-title;
47
+ margin-bottom: 2px;
48
+ margin-top: 0;
49
+ padding: 8px 11px;
50
+ text-shadow: $text-shadow 0 1px 0;
51
+ }
52
+ h4 {
53
+ margin: 0;
54
+ }
55
+ input[type='submit'] {
56
+ @extend .c-button--info;
57
+
58
+ color: #f4f4f4;
59
+ }
60
+ ul {
61
+ margin: 0 0 8px 0;
62
+ }
63
+ }
64
+ }
@@ -0,0 +1,96 @@
1
+ body.active_admin {
2
+ .blaze-table {
3
+ @extend .c-table;
4
+ // @extend .c-table--striped;
5
+ // @extend .c-table--condensed;
6
+ >thead {
7
+ @extend .c-table__head;
8
+ >tr {
9
+ @extend .c-table__row;
10
+ @extend .c-table__row--heading;
11
+ >th {
12
+ @extend .c-table__cell;
13
+ }
14
+ }
15
+ }
16
+ >tbody {
17
+ @extend .c-table__body;
18
+ >tr {
19
+ @extend .c-table__row;
20
+ >td {
21
+ @extend .c-table__cell;
22
+ }
23
+ }
24
+ }
25
+ &.table-bordered {
26
+ border: 1px solid #ddd;
27
+ &.table-rows {
28
+ border-bottom: 0 none;
29
+ }
30
+ }
31
+ &.table-rows >tbody >tr {
32
+ border-bottom: 1px solid #ddd;
33
+ }
34
+ &.table-striped >tbody >tr.even {
35
+ background: #f4f4f4;
36
+ }
37
+ }
38
+
39
+ .table_tools {
40
+ a {
41
+ @extend .button-base;
42
+ cursor: pointer;
43
+ margin-right: 10px;
44
+ span {
45
+ color: $fg-table-link;
46
+ }
47
+ }
48
+ a:hover,
49
+ a.table_tools_button:hover,
50
+ .dropdown_menu_button:hover {
51
+ background-color: #aaa;
52
+ background-image: none;
53
+ }
54
+ .dropdown_menu_list a {
55
+ width: 100%;
56
+ }
57
+ }
58
+
59
+ .index_table {
60
+ th {
61
+ background-image: none;
62
+ background-color: #eee;
63
+ border: 0 none;
64
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 1px #fff inset;
65
+ }
66
+ tbody > tr > td:first-child {
67
+ border-left: 1px solid $fg-table-borders;
68
+ }
69
+ tbody > tr > td {
70
+ border-right: 1px solid $fg-table-borders;
71
+ }
72
+ .col.col-selectable > div {
73
+ text-align: center;
74
+ }
75
+ }
76
+ .index_as_table {
77
+ overflow-x: auto;
78
+ }
79
+ .panel_contents table tr:last-child {
80
+ > td, > th {
81
+ border-bottom: 0 none;
82
+ }
83
+ }
84
+ .col-actions {
85
+ padding: 1px 2px 0 6px;
86
+ vertical-align: middle;
87
+ a.c-button {
88
+ // color: #222;
89
+ margin-right: 1px;
90
+ margin-left: 1px;
91
+ }
92
+ // .table_actions {
93
+ // text-align: center;
94
+ // }
95
+ }
96
+ }
@@ -0,0 +1,46 @@
1
+ // default colors
2
+ $color-black: #111 !default;
3
+ $color-grey: #B0BEC5 !default;
4
+ $color-white: #FFF !default;
5
+ $color-beige: #F2F2EA !default;
6
+ $color-red: #F44336 !default;
7
+ $color-pink: #E91E63 !default;
8
+ $color-purple: #9C27B0 !default;
9
+ $color-blue: #2196F3 !default;
10
+ $color-green: #4CAF50 !default;
11
+ $color-cyan: #00BCD4 !default;
12
+ $color-yellow: #FFEB3B !default;
13
+ $color-orange: #FF9800 !default;
14
+ $color-brown: #795548 !default;
15
+
16
+ $color-brand: #2C3E50 !default;
17
+ $color-info: $color-blue !default;
18
+ $color-warning: $color-orange !default;
19
+ $color-success: $color-green !default;
20
+ $color-error: $color-red !default;
21
+
22
+ // main variables
23
+ $bg-footer: #dfdfdf !default; // bg footer bar
24
+ $bg-form1: #f4f4f4 !default; // bg 1st level forms
25
+ $bg-form2: darken($bg-form1, 3%) !default; // bg 2nd level forms (nested)
26
+ $bg-form3: darken($bg-form1, 6%) !default; // bg 3rd level forms (nested)
27
+ $bg-form4: darken($bg-form1, 9%) !default; // bg 4th level forms (nested)
28
+ $bg-form-sub-headings: lighten( $color-brand, 64% ) !default; // bg nested forms title
29
+ $bg-header: $color-brand !default; // bg header bar
30
+ $bg-inputs: #fff !default; // bg forms inputs
31
+ $bg-menu-active: #7b929e !default; // bg menu item current / hover
32
+ $bg-sidebar: #efefef; // bg sidebar
33
+ $fg-box-title: #fff !default;
34
+ $fg-button-link: #fff !default;
35
+ $fg-menu-items: #f8f8f8 !default;
36
+ $fg-table-borders: #e4e4e4 !default;
37
+ $fg-table-link: #eee !default;
38
+
39
+ // other variables
40
+ $color-validation-error: #932419 !default;
41
+ $form-padding: 10px !default;
42
+ $inputs-spacing: 10px !default;
43
+ $height-inputs: 26px !default;
44
+ $height-topbar: 40px !default;
45
+ $height-titlebar: 38px !default;
46
+ $text-shadow: #000 !default;
@@ -1,3 +1,4 @@
1
+ // v3.6.3
1
2
  @import "generics.global";
2
3
  @import "objects.containers";
3
4
  @import "objects.grid";
@@ -39,3 +40,4 @@
39
40
  @import "utilities.boxing";
40
41
  @import "utilities.elevation";
41
42
  @import "utilities.sizes";
43
+ @import "utilities.visibility";
@@ -3,14 +3,6 @@
3
3
  .o-field {
4
4
  position: relative;
5
5
 
6
- .c-field--success ~ .c-icon {
7
- color: $field-success-border-color;
8
- }
9
-
10
- .c-field--error ~ .c-icon {
11
- color: $field-error-border-color;
12
- }
13
-
14
6
  .c-field:disabled ~ .c-icon {
15
7
  color: $field-disabled-border-color;
16
8
  }
@@ -19,7 +11,6 @@
19
11
  position: absolute;
20
12
  top: 50%;
21
13
  transform: translateY(-50%);
22
- color: $field-border-color;
23
14
  }
24
15
  }
25
16
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  .c-overlay {
4
4
  display: block;
5
- position: absolute;
5
+ position: fixed;
6
6
  top: 0;
7
7
  right: 0;
8
8
  bottom: 0;
@@ -10,9 +10,16 @@
10
10
  width: 100%;
11
11
  height: 100%;
12
12
  background-color: transparentize($overlay-background-color, .6);
13
+ opacity: 0;
14
+ visibility: hidden;
13
15
  z-index: $overlay-z-index;
14
16
  }
15
17
 
18
+ .c-overlay--visible {
19
+ opacity: 1;
20
+ visibility: visible;
21
+ }
22
+
16
23
  .c-overlay--fullpage {
17
24
  position: fixed;
18
25
  }
@@ -41,6 +41,7 @@
41
41
  padding: $spacing-small $spacing-medium;
42
42
  border-radius: $border-radius;
43
43
  white-space: pre;
44
+ word-wrap: normal;
44
45
  overflow-x: auto;
45
46
  }
46
47
 
@@ -1,7 +1,8 @@
1
1
  @import "settings.global";
2
+ @import "utilities.visibility";
2
3
 
3
4
  @mixin grid {
4
- display: flex;
5
+ @include display-flex;
5
6
  }
6
7
 
7
8
  @mixin grid--wrap {
@@ -62,11 +63,11 @@
62
63
  }
63
64
 
64
65
  @mixin grid__cell--hidden {
65
- display: none;
66
+ @include display-none;
66
67
  }
67
68
 
68
69
  @mixin grid__cell--visible {
69
- display: initial;
70
+ @include display-initial;
70
71
  }
71
72
 
72
73
  @mixin grid__cell--width($width) {
@@ -2,6 +2,18 @@
2
2
  text-align: center;
3
3
  }
4
4
 
5
+ @mixin justified {
6
+ text-align: justify;
7
+ }
8
+
9
+ @mixin left {
10
+ text-align: left;
11
+ }
12
+
13
+ @mixin right {
14
+ text-align: right;
15
+ }
16
+
5
17
  @mixin center-block {
6
18
  position: relative;
7
19
  }
@@ -0,0 +1,47 @@
1
+ @import "settings.global";
2
+ @import "tools.mediaqueries";
3
+
4
+ @mixin visible {
5
+ visibility: visible;
6
+ }
7
+
8
+ @mixin invisible {
9
+ visibility: hidden;
10
+ }
11
+
12
+ @mixin display-none {
13
+ display: none;
14
+ }
15
+
16
+ @mixin display-initial {
17
+ display: initial;
18
+ }
19
+
20
+ @mixin display-inline {
21
+ display: inline;
22
+ }
23
+
24
+ @mixin display-inline-block {
25
+ display: inline-block;
26
+ }
27
+
28
+ @mixin display-block {
29
+ display: block;
30
+ }
31
+
32
+ @mixin display-table {
33
+ display: table;
34
+ }
35
+
36
+ @mixin display-table-cell {
37
+ display: table-cell;
38
+ }
39
+
40
+ @mixin display-flex {
41
+ display: flex;
42
+ }
43
+
44
+ @mixin display-inline-flex {
45
+ display: inline-flex;
46
+ }
47
+
@@ -20,8 +20,6 @@
20
20
  @include containers__responsive(super);
21
21
  }
22
22
 
23
-
24
-
25
23
  margin: auto;
26
24
  @each $size, $width in $screen-limits {
27
25
  &--#{$size} {