cactu 0.1.2 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +10 -15
  3. data/.travis.yml +7 -0
  4. data/CODE_OF_CONDUCT.md +74 -0
  5. data/Gemfile +1 -1
  6. data/{LICENSE.txt → LICENSE} +1 -1
  7. data/README.md +46 -16
  8. data/Rakefile +9 -0
  9. data/assets/stylesheets/base/_blocks.scss +24 -0
  10. data/assets/stylesheets/base/_global-variables.scss +62 -0
  11. data/assets/stylesheets/base/_reboot.scss +309 -0
  12. data/assets/stylesheets/cactu.scss +46 -0
  13. data/assets/stylesheets/components/_alerts.scss +48 -0
  14. data/assets/stylesheets/components/_buttons.scss +82 -0
  15. data/assets/stylesheets/components/_collapse.scss +84 -0
  16. data/assets/stylesheets/components/_dropdowns.scss +172 -0
  17. data/assets/stylesheets/components/_forms.scss +158 -0
  18. data/assets/stylesheets/components/_grids.scss +95 -0
  19. data/assets/stylesheets/components/_lists.scss +75 -0
  20. data/assets/stylesheets/components/_modals.scss +124 -0
  21. data/assets/stylesheets/components/_navbars.scss +190 -0
  22. data/assets/stylesheets/components/_navs.scss +52 -0
  23. data/assets/stylesheets/components/_paginations.scss +76 -0
  24. data/assets/stylesheets/components/_tables.scss +49 -0
  25. data/assets/stylesheets/components/_tooltips.scss +138 -0
  26. data/assets/stylesheets/elements/_button.scss +94 -0
  27. data/assets/stylesheets/elements/_code.scss +75 -0
  28. data/assets/stylesheets/elements/_icon.scss +66 -0
  29. data/assets/stylesheets/elements/_image.scss +33 -0
  30. data/assets/stylesheets/elements/_typography.scss +130 -0
  31. data/assets/stylesheets/functions/_colors.scss +40 -0
  32. data/assets/stylesheets/functions/_strings.scss +14 -0
  33. data/assets/stylesheets/mixins/_alerts.scss +18 -0
  34. data/assets/stylesheets/mixins/_breakpoints.scss +93 -0
  35. data/assets/stylesheets/mixins/_buttons.scss +96 -0
  36. data/assets/stylesheets/mixins/_forms.scss +44 -0
  37. data/assets/stylesheets/mixins/_grid.scss +18 -0
  38. data/assets/stylesheets/mixins/_hover.scss +27 -0
  39. data/assets/stylesheets/mixins/_icons.scss +22 -0
  40. data/assets/stylesheets/mixins/_navbar.scss +60 -0
  41. data/assets/stylesheets/mixins/_positions.scss +12 -0
  42. data/assets/stylesheets/mixins/_transition.scss +16 -0
  43. data/assets/stylesheets/utilities/_classes.scss +69 -0
  44. data/assets/stylesheets/utilities/_syntax.scss +81 -0
  45. data/cactu.gemspec +15 -15
  46. data/lib/cactu.rb +40 -12
  47. data/lib/cactu/engine.rb +11 -3
  48. data/lib/cactu/version.rb +1 -1
  49. metadata +123 -110
  50. data/app/assets/stylesheets/_cactu.scss +0 -15
  51. data/app/assets/stylesheets/config/_variables.scss +0 -27
  52. data/app/assets/stylesheets/functions/_grid.scss +0 -32
  53. data/app/assets/stylesheets/mixins/_fonts.scss +0 -13
  54. data/app/assets/stylesheets/mixins/_grid.scss +0 -81
  55. data/app/assets/stylesheets/mixins/_menu.scss +0 -47
  56. data/app/assets/stylesheets/ui/_base.scss +0 -53
  57. data/app/assets/stylesheets/ui/_buttons.scss +0 -13
  58. data/app/assets/stylesheets/ui/_forms.scss +0 -3
  59. data/app/assets/stylesheets/ui/_images.scss +0 -3
  60. data/app/assets/stylesheets/ui/_menus.scss +0 -4
  61. data/app/assets/stylesheets/ui/_tables.scss +0 -3
  62. data/app/assets/stylesheets/ui/_text.scss +0 -71
  63. data/bin/cactu +0 -6
  64. data/lib/cactu/generator.rb +0 -80
  65. data/test/cactu_app/.gitignore +0 -16
  66. data/test/cactu_app/Gemfile +0 -49
  67. data/test/cactu_app/README.rdoc +0 -28
  68. data/test/cactu_app/Rakefile +0 -6
  69. data/test/cactu_app/app/assets/images/.keep +0 -0
  70. data/test/cactu_app/app/assets/javascripts/application.js +0 -16
  71. data/test/cactu_app/app/assets/stylesheets/application.css.scss +0 -16
  72. data/test/cactu_app/app/assets/stylesheets/test/_test.css.scss +0 -10
  73. data/test/cactu_app/app/assets/stylesheets/test/config/_responsive_large.css.scss +0 -7
  74. data/test/cactu_app/app/assets/stylesheets/test/config/_responsive_medium.css.scss +0 -7
  75. data/test/cactu_app/app/assets/stylesheets/test/config/_responsive_short.css.scss +0 -3
  76. data/test/cactu_app/app/assets/stylesheets/test/config/_variables.css.scss +0 -7
  77. data/test/cactu_app/app/assets/stylesheets/test/pages/_home.css.scss +0 -2
  78. data/test/cactu_app/app/assets/stylesheets/test/ui/_anchors.css.scss +0 -0
  79. data/test/cactu_app/app/assets/stylesheets/test/ui/_base.css.scss +0 -0
  80. data/test/cactu_app/app/assets/stylesheets/test/ui/_navigations.css.scss +0 -3
  81. data/test/cactu_app/app/assets/stylesheets/test/ui/_text.css.scss +0 -1
  82. data/test/cactu_app/app/controllers/application_controller.rb +0 -5
  83. data/test/cactu_app/app/controllers/concerns/.keep +0 -0
  84. data/test/cactu_app/app/controllers/home_controller.rb +0 -5
  85. data/test/cactu_app/app/controllers/usage_controller.rb +0 -13
  86. data/test/cactu_app/app/helpers/application_helper.rb +0 -2
  87. data/test/cactu_app/app/mailers/.keep +0 -0
  88. data/test/cactu_app/app/models/.keep +0 -0
  89. data/test/cactu_app/app/models/concerns/.keep +0 -0
  90. data/test/cactu_app/app/views/home/index.html.haml +0 -7
  91. data/test/cactu_app/app/views/layouts/application.html.haml +0 -20
  92. data/test/cactu_app/app/views/usage/base.html.haml +0 -19
  93. data/test/cactu_app/app/views/usage/components.html.haml +0 -4
  94. data/test/cactu_app/app/views/usage/started.html.haml +0 -4
  95. data/test/cactu_app/bin/bundle +0 -3
  96. data/test/cactu_app/bin/rails +0 -4
  97. data/test/cactu_app/bin/rake +0 -4
  98. data/test/cactu_app/config.ru +0 -4
  99. data/test/cactu_app/config/application.rb +0 -23
  100. data/test/cactu_app/config/boot.rb +0 -4
  101. data/test/cactu_app/config/database.yml +0 -25
  102. data/test/cactu_app/config/environment.rb +0 -5
  103. data/test/cactu_app/config/environments/development.rb +0 -29
  104. data/test/cactu_app/config/environments/production.rb +0 -80
  105. data/test/cactu_app/config/environments/test.rb +0 -36
  106. data/test/cactu_app/config/initializers/backtrace_silencers.rb +0 -7
  107. data/test/cactu_app/config/initializers/filter_parameter_logging.rb +0 -4
  108. data/test/cactu_app/config/initializers/inflections.rb +0 -16
  109. data/test/cactu_app/config/initializers/mime_types.rb +0 -5
  110. data/test/cactu_app/config/initializers/secret_token.rb +0 -12
  111. data/test/cactu_app/config/initializers/session_store.rb +0 -3
  112. data/test/cactu_app/config/initializers/wrap_parameters.rb +0 -14
  113. data/test/cactu_app/config/locales/en.yml +0 -23
  114. data/test/cactu_app/config/routes.rb +0 -6
  115. data/test/cactu_app/db/seeds.rb +0 -7
  116. data/test/cactu_app/lib/assets/.keep +0 -0
  117. data/test/cactu_app/lib/tasks/.keep +0 -0
  118. data/test/cactu_app/log/.keep +0 -0
  119. data/test/cactu_app/public/404.html +0 -58
  120. data/test/cactu_app/public/422.html +0 -58
  121. data/test/cactu_app/public/500.html +0 -57
  122. data/test/cactu_app/public/favicon.ico +0 -0
  123. data/test/cactu_app/public/robots.txt +0 -5
  124. data/test/cactu_app/test/controllers/.keep +0 -0
  125. data/test/cactu_app/test/fixtures/.keep +0 -0
  126. data/test/cactu_app/test/helpers/.keep +0 -0
  127. data/test/cactu_app/test/integration/.keep +0 -0
  128. data/test/cactu_app/test/mailers/.keep +0 -0
  129. data/test/cactu_app/test/models/.keep +0 -0
  130. data/test/cactu_app/test/test_helper.rb +0 -15
  131. data/test/cactu_app/vendor/assets/javascripts/.keep +0 -0
  132. data/test/cactu_app/vendor/assets/stylesheets/.keep +0 -0
@@ -0,0 +1,52 @@
1
+ //
2
+ // Navs
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Variables
7
+ //
8
+ $nav-link-padding: .5rem .75rem !default;
9
+
10
+
11
+ [class^="nav-"] {
12
+ display: flex;
13
+ flex-wrap: wrap;
14
+ margin: 0;
15
+ padding: 0;
16
+ list-style: none;
17
+
18
+ * {
19
+ display: flex;
20
+ margin: 0;
21
+ }
22
+
23
+ a {
24
+ position: relative;
25
+ text-decoration: none;
26
+ padding: $nav-link-padding;
27
+ }
28
+
29
+ // Adapts to nav styles
30
+ .dropdown {
31
+ .toggle {
32
+ width: 100%;
33
+ justify-content: space-between;
34
+ align-items: center;
35
+ color: $link-color;
36
+ padding: $nav-link-padding;
37
+ background-color: transparent;
38
+
39
+ @include hover-focus {
40
+ color: $link-hover-color;
41
+ }
42
+ }
43
+ }
44
+ }
45
+
46
+ .nav-vertical {
47
+ flex-direction: column;
48
+
49
+ .dropdown nav {
50
+ width: 100%;
51
+ }
52
+ }
@@ -0,0 +1,76 @@
1
+ //
2
+ // Paginations
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Variables
7
+ //
8
+ $pagination-margin: .5rem 0 !default;
9
+ $pagination-item-padding: .25rem .625rem !default;
10
+ $pagination-item-border-width: $border-width !default;
11
+ $pagination-item-border: $pagination-item-border-width solid $border-color !default;
12
+ $pagination-tem-background: $white !default;
13
+ $pagination-item-background-hover: darken($pagination-tem-background, 5%) !default;
14
+ $pagination-item-transition: background-color $speed ease-in-out, color $speed ease-in-out !default;
15
+ $pagination-item-radius-first: $radius 0 0 $radius !default;
16
+ $pagination-item-radius-last: 0 $radius $radius 0 !default;
17
+ $pagination-item-active-color: lighten($text-color, 20%) !default;
18
+ $pagination-item-active-background: darken($pagination-item-background-hover, 5%) !default;
19
+
20
+
21
+ .pagination,
22
+ .pagination-center,
23
+ .pagination-end {
24
+ display: flex;
25
+ flex-wrap: nowrap;
26
+ margin: $pagination-margin;
27
+ padding: 0;
28
+ list-style: none;
29
+
30
+ > *,
31
+ > a {
32
+ display: flex;
33
+ @include transition($pagination-item-transition);
34
+
35
+ &:not(:first-child) {
36
+ margin-left: -$pagination-item-border-width;
37
+ }
38
+ }
39
+
40
+ > * {
41
+ &:first-child,
42
+ &:first-child a {
43
+ border-radius: $pagination-item-radius-first;
44
+ }
45
+
46
+ &:last-child,
47
+ &:last-child a {
48
+ border-radius: $pagination-item-radius-last;
49
+ }
50
+
51
+ @include hover-focus {
52
+ background-color: transparent;
53
+ }
54
+ }
55
+
56
+ a {
57
+ padding: $pagination-item-padding;
58
+ border: $pagination-item-border;
59
+
60
+ @include hover-focus {
61
+ text-decoration: none;
62
+ background-color: $pagination-item-background-hover;
63
+ }
64
+
65
+ &.active {
66
+ color: $pagination-item-active-color;
67
+ background-color: $pagination-item-active-background;
68
+ }
69
+
70
+ &.disabled {
71
+ @include hover-focus {
72
+ background-color: $pagination-tem-background;
73
+ }
74
+ }
75
+ }
76
+ }
@@ -0,0 +1,49 @@
1
+ //
2
+ // Tables
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Variables
7
+ //
8
+ $cell-padding: .625rem 1rem !default;
9
+ $cell-border: $border-base !default;
10
+ $cell-interleaved-color: $white-smoke !default;
11
+
12
+
13
+ th, td {
14
+ padding: $cell-padding;
15
+ border: $cell-border;
16
+ }
17
+
18
+ th {
19
+ font-weight: bold;
20
+ border-bottom-width: 2px;
21
+ }
22
+
23
+ .table-flush,
24
+ .table-flush-interleaved {
25
+ th, td {
26
+ border-top: 0;
27
+ border-right: 0;
28
+ border-left: 0;
29
+ }
30
+
31
+ tr:last-child td {
32
+ border-bottom: 0;
33
+ }
34
+ }
35
+
36
+ .table-interleaved,
37
+ .table-flush-interleaved {
38
+ tr {
39
+ &:nth-child(2n) {
40
+ background-color: $cell-interleaved-color;
41
+ }
42
+ }
43
+ }
44
+
45
+ .table-borderless {
46
+ th, td {
47
+ border: 0;
48
+ }
49
+ }
@@ -0,0 +1,138 @@
1
+ //
2
+ // Tooltips
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Variables
7
+ //
8
+ $tooltip-color: $white !default;
9
+ $tooltip-background: $black !default;
10
+ $tooltip-triangle-size: 6px !default;
11
+ $tooltip-padding-y: .5rem !default;
12
+ $tooltip-padding-x: .625rem !default;
13
+ $tooltip-radius: $radius !default;
14
+ $tooltip-transition: opacity .2s ease-in-out !default;
15
+
16
+
17
+ [class*="tooltip"] {
18
+ position: relative;
19
+
20
+ &:before,
21
+ &:after {
22
+ position: absolute;
23
+ opacity: 0;
24
+ margin: 0;
25
+ padding: 0;
26
+ pointer-events: none;
27
+ z-index: $zindex-top;
28
+ @include transition($tooltip-transition);
29
+ }
30
+
31
+ &:before {
32
+ content: '';
33
+ color: $tooltip-background;
34
+ }
35
+
36
+ &:after {
37
+ content: attr(data-tooltip);
38
+ display: block;
39
+ color: $tooltip-color;
40
+ font-size: 90%;
41
+ padding: $tooltip-padding-y $tooltip-padding-x;
42
+ white-space: nowrap;
43
+ line-height: 1;
44
+ border-radius: $tooltip-radius;
45
+ background-color: $tooltip-background;
46
+ }
47
+
48
+ &:hover {
49
+ &:after,
50
+ &:before {
51
+ opacity: 1;
52
+ }
53
+ }
54
+
55
+ // Has not data-tooltip attribute
56
+ &:not([data-tooltip]) {
57
+ &:before,
58
+ &:after { display: none; }
59
+ }
60
+ }
61
+
62
+ // Empy data-tooltip attribute
63
+ [data-tooltip=''] {
64
+ &:before,
65
+ &:after {
66
+ display: none;
67
+ }
68
+ }
69
+
70
+ .tooltip-top {
71
+ &:before,
72
+ &:after {
73
+ bottom: 100%;
74
+ left: 50%;
75
+ transform: translateX(-50%);
76
+ }
77
+
78
+ &:before {
79
+ @include triangle-icon($tooltip-triangle-size, 'down');
80
+ }
81
+
82
+ &:after {
83
+ margin-bottom: $tooltip-triangle-size - 1;
84
+ }
85
+ }
86
+
87
+ .tooltip-right {
88
+ &:before,
89
+ &:after {
90
+ top: 50%;
91
+ left: 100%;
92
+ transform: translateY(-50%);
93
+ }
94
+
95
+ &:before {
96
+ @include triangle-icon($tooltip-triangle-size, 'left');
97
+ }
98
+
99
+ &:after {
100
+ margin-left: $tooltip-triangle-size;
101
+ }
102
+ }
103
+
104
+ .tooltip-bottom {
105
+ &:before,
106
+ &:after {
107
+ top: 100%;
108
+ left: 50%;
109
+ transform: translateX(-50%);
110
+ }
111
+
112
+ &:before {
113
+ @include triangle-icon($tooltip-triangle-size, 'up');
114
+ }
115
+
116
+ &:after {
117
+ margin-top: $tooltip-triangle-size;
118
+ }
119
+ }
120
+
121
+ .tooltip-left {
122
+ &:before,
123
+ &:after {
124
+ top: 50%;
125
+ transform: translateY(-50%);
126
+ }
127
+
128
+ &:before {
129
+ left: 0;
130
+ margin-left: -$tooltip-triangle-size;
131
+ @include triangle-icon($tooltip-triangle-size, 'right');
132
+ }
133
+
134
+ &:after {
135
+ right: 100%;
136
+ margin-right: $tooltip-triangle-size;
137
+ }
138
+ }
@@ -0,0 +1,94 @@
1
+ //
2
+ // Button
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Variables
7
+ //
8
+ $button-font-weight: $font-weight-normal !default;
9
+ $button-transition: color $speed ease-in-out, background-color $speed ease-in-out, border-color $speed ease-in-out, box-shadow $speed ease-in-out !default;
10
+ $button-padding-y: .375rem !default;
11
+ $button-padding-x: .75rem !default;
12
+ $button-font-size: 1rem !default;
13
+ $button-line-height: $line-height !default;
14
+ $button-border-radius: $radius !default;
15
+ $button-color: $text-color !default;
16
+ $button-background: $gray-200 !default;
17
+ $button-border: $border-width solid transparent !default;
18
+ $button-hover-background: darken($button-background, 10%) !default;
19
+ $button-focus-box-shadow: 0 0 0 $outline-width darken($button-background, 20%) !default;
20
+ $button-disabled-opacity: .57 !default;
21
+ $button-active-box-shadow: inset 0 3px 5px rgba($black, .125) !default;
22
+
23
+
24
+ // Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
25
+ button::-moz-focus-inner,
26
+ [type="button"]::-moz-focus-inner,
27
+ [type="reset"]::-moz-focus-inner,
28
+ [type="submit"]::-moz-focus-inner {
29
+ padding: 0;
30
+ border-style: none;
31
+ }
32
+
33
+ // .button used for links too
34
+ button,
35
+ .button {
36
+ display: inline-block;
37
+ font-weight: $button-font-weight;
38
+ text-align: center;
39
+ white-space: nowrap;
40
+ vertical-align: middle;
41
+ user-select: none;
42
+ color: $button-color;
43
+ border: $button-border;
44
+ background-color: $button-background;
45
+ @include button-size($button-padding-y, $button-padding-x, $button-font-size, $button-line-height, $button-border-radius);
46
+ @include transition($button-transition);
47
+
48
+ // Share hover and focus styles
49
+ &:hover {
50
+ color: $button-color;
51
+ text-decoration: none;
52
+ background-color: $button-hover-background;
53
+ }
54
+
55
+ &:focus,
56
+ &.focus {
57
+ outline: 0;
58
+ color: $button-color;
59
+ text-decoration: none;
60
+ box-shadow: $button-focus-box-shadow;
61
+ }
62
+
63
+ // Disabled comes first so active can properly restyle
64
+ &.disabled,
65
+ &:disabled {
66
+ opacity: $button-disabled-opacity;
67
+ box-shadow: none;
68
+
69
+ @include hover-focus {
70
+ background-color: $button-background;
71
+ }
72
+ }
73
+
74
+ // Only for selectable buttons
75
+ &:not(:disabled):not(.disabled) {
76
+ cursor: pointer;
77
+ }
78
+
79
+ &:not(:disabled):not(.disabled):active,
80
+ &:not(:disabled):not(.disabled).active {
81
+ background-image: none;
82
+ background-color: $button-hover-background;
83
+ box-shadow: $button-active-box-shadow;
84
+
85
+ &:focus {
86
+ box-shadow: $button-focus-box-shadow, $button-active-box-shadow;
87
+ }
88
+ }
89
+
90
+ & ~ button,
91
+ & ~ .button {
92
+ margin-left: .5rem;
93
+ }
94
+ }
@@ -0,0 +1,75 @@
1
+ //
2
+ // Code
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Variables
7
+ //
8
+ $code-color: #ff3860 !default;
9
+ $code-background: $white-smoke !default;
10
+ $code-font-size: .85rem !default;
11
+ $code-padding: .2rem .3rem !default;
12
+ $code-radius: 3px !default;
13
+ $pre-color: $gray-900 !default;
14
+ $pre-background: $code-background !default;
15
+ $pre-padding: 1rem !default;
16
+ $pre-margin: 1rem !default;
17
+ $kbd-color: $white !default;
18
+ $kbd-background: $gray-800 !default;
19
+
20
+
21
+ pre,
22
+ code,
23
+ kbd,
24
+ samp {
25
+ font-family: $font-family-monospace;
26
+ font-size: 1em;
27
+ }
28
+
29
+ // Inline code
30
+ //
31
+ code {
32
+ color: $code-color;
33
+ word-break: break-word;
34
+ background-color: $code-background;
35
+
36
+ // Streamline the style when inside anchors to avoid broken underline and more
37
+ a > & {
38
+ color: inherit;
39
+ }
40
+ }
41
+
42
+ // Blocks of code
43
+ //
44
+ pre {
45
+ display: block;
46
+ font-size: $code-font-size;
47
+ color: $pre-color;
48
+ padding: $pre-padding;
49
+ margin-bottom: $pre-margin;
50
+ overflow: auto;
51
+ // We have @viewport set which causes scrollbars to overlap content in IE11 and Edge, so
52
+ // we force a non-overlapping, non-auto-hiding scrollbar to counteract.
53
+ -ms-overflow-style: scrollbar;
54
+ background-color: $pre-background;
55
+
56
+ // Account for some code outputs that place code tags in pre tags
57
+ code {
58
+ font-size: inherit;
59
+ padding: 0;
60
+ color: inherit;
61
+ word-break: normal;
62
+ }
63
+ }
64
+
65
+ code,
66
+ kbd {
67
+ border-radius: $code-radius;
68
+ font-size: $code-font-size;
69
+ padding: $code-padding;
70
+ }
71
+
72
+ kbd {
73
+ color: $kbd-color;
74
+ background-color: $kbd-background;
75
+ }