beyond_canvas 0.12.0.pre → 0.15.1.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -20
  3. data/app/assets/images/icons/checkbox_checked.svg +1 -0
  4. data/app/assets/images/icons/checkbox_unchecked.svg +1 -0
  5. data/app/assets/images/icons/file.svg +1 -0
  6. data/app/assets/images/icons/flash_checkbox.svg +1 -0
  7. data/app/assets/images/icons/flash_close.svg +1 -0
  8. data/app/assets/images/icons/flash_error.svg +1 -0
  9. data/app/assets/images/icons/flash_info.svg +1 -0
  10. data/app/assets/images/icons/flash_warning.svg +1 -0
  11. data/app/assets/images/icons/radiobutton_checked.svg +1 -0
  12. data/app/assets/images/icons/radiobutton_unchecked.svg +1 -0
  13. data/app/assets/javascripts/beyond_canvas/base.js +106 -0
  14. data/app/assets/stylesheets/beyond_canvas/base.scss +28 -0
  15. data/app/assets/stylesheets/beyond_canvas/components/_actions.scss +6 -0
  16. data/app/assets/stylesheets/beyond_canvas/components/_buttons.scss +112 -0
  17. data/app/assets/stylesheets/beyond_canvas/components/_cards.scss +34 -0
  18. data/app/assets/stylesheets/beyond_canvas/components/_comments.scss +6 -0
  19. data/app/assets/stylesheets/beyond_canvas/components/_containers.scss +37 -0
  20. data/app/assets/stylesheets/beyond_canvas/components/_flash.scss +66 -0
  21. data/app/assets/stylesheets/beyond_canvas/components/_forms.scss +43 -0
  22. data/app/assets/stylesheets/beyond_canvas/components/_inputs.scss +143 -0
  23. data/app/assets/stylesheets/beyond_canvas/components/_layouts.scss +7 -0
  24. data/app/assets/stylesheets/beyond_canvas/components/_links.scss +17 -0
  25. data/app/assets/stylesheets/beyond_canvas/components/_main.scss +39 -0
  26. data/app/assets/stylesheets/beyond_canvas/components/_margins.scss +9 -0
  27. data/app/assets/stylesheets/beyond_canvas/components/_markdown.scss +74 -0
  28. data/app/assets/stylesheets/beyond_canvas/components/_notices.scss +58 -0
  29. data/app/assets/stylesheets/beyond_canvas/components/_relative.scss +3 -0
  30. data/app/assets/stylesheets/beyond_canvas/components/_spinner.scss +48 -0
  31. data/app/assets/stylesheets/beyond_canvas/components/_tables.scss +31 -0
  32. data/app/assets/stylesheets/beyond_canvas/components/_texts.scss +7 -0
  33. data/app/assets/stylesheets/beyond_canvas/mailer.scss +5 -0
  34. data/app/assets/stylesheets/beyond_canvas/settings/_breakpoints.scss +6 -0
  35. data/app/assets/stylesheets/beyond_canvas/settings/{_reset_css.sass → _reset_css.scss} +29 -21
  36. data/app/assets/stylesheets/beyond_canvas/settings/_typography.scss +67 -0
  37. data/app/assets/stylesheets/beyond_canvas/settings/_variables.scss +171 -0
  38. data/app/assets/stylesheets/beyond_canvas/utilities/_functions.scss +15 -0
  39. data/app/assets/stylesheets/beyond_canvas/utilities/_mixins.scss +24 -0
  40. data/app/controllers/beyond_canvas/application_controller.rb +2 -18
  41. data/app/controllers/beyond_canvas/system_controller.rb +24 -0
  42. data/app/controllers/concerns/beyond_canvas/locale_management.rb +10 -7
  43. data/app/controllers/concerns/beyond_canvas/request_validation.rb +37 -0
  44. data/app/controllers/concerns/beyond_canvas/status_codes.rb +17 -0
  45. data/app/form_builders/beyond_canvas/form_builder.rb +74 -13
  46. data/app/helpers/beyond_canvas/application_helper.rb +17 -18
  47. data/app/helpers/beyond_canvas/locale_switch_helper.rb +1 -1
  48. data/app/javascript/beyond_canvas/base.js +5 -0
  49. data/app/{assets/javascripts/beyond_canvas → javascript/beyond_canvas/initializers}/buttons.js +34 -14
  50. data/app/{assets/javascripts/beyond_canvas → javascript/beyond_canvas/initializers}/flash.js +10 -7
  51. data/app/javascript/beyond_canvas/initializers/inputs.js +38 -0
  52. data/app/views/beyond_canvas/custom/_public_head.html.erb +1 -0
  53. data/app/views/beyond_canvas/locales/_edit.html.erb +8 -0
  54. data/app/views/beyond_canvas/mailer/_header.html.erb +2 -2
  55. data/app/views/beyond_canvas/shared/_flash.html.erb +13 -0
  56. data/app/views/beyond_canvas/shared/_head.html.erb +29 -0
  57. data/app/views/beyond_canvas/shared/_logo.html.erb +2 -0
  58. data/app/views/layouts/beyond_canvas/public.html.erb +16 -0
  59. data/config/initializers/beyond_canvas/filter_parameter_logging.rb +9 -0
  60. data/config/routes.rb +1 -1
  61. data/lib/beyond_canvas.rb +13 -16
  62. data/lib/beyond_canvas/asset_registration.rb +29 -0
  63. data/lib/beyond_canvas/configuration.rb +27 -0
  64. data/lib/beyond_canvas/engine.rb +12 -1
  65. data/lib/beyond_canvas/version.rb +1 -1
  66. data/lib/generators/beyond_canvas/assets/assets_generator.rb +14 -0
  67. data/lib/generators/beyond_canvas/assets/templates/beyond_canvas.js +1 -0
  68. data/lib/generators/beyond_canvas/assets/templates/beyond_canvas.scss +1 -0
  69. data/lib/generators/beyond_canvas/beyond_api/beyond_api_generator.rb +19 -0
  70. data/lib/generators/beyond_canvas/{custom_styles_generator.rb → custom_styles/custom_styles_generator.rb} +2 -2
  71. data/lib/generators/{templates → beyond_canvas/custom_styles/templates}/beyond_canvas_custom_styles.sass +0 -0
  72. data/lib/generators/beyond_canvas/install/install_generator.rb +35 -0
  73. data/lib/generators/beyond_canvas/install/templates/beyond_canvas.rb.erb +40 -0
  74. data/lib/generators/beyond_canvas/webpacker/plugins/jquery.js +7 -0
  75. data/lib/generators/beyond_canvas/webpacker/templates/beyond_canvas.js +3 -0
  76. data/lib/generators/beyond_canvas/webpacker/templates/beyond_canvas.scss +1 -0
  77. data/lib/generators/beyond_canvas/webpacker/webpacker_generator.rb +26 -0
  78. metadata +105 -65
  79. data/app/assets/javascripts/beyond_canvas.js +0 -3
  80. data/app/assets/javascripts/beyond_canvas/inputs.js +0 -28
  81. data/app/assets/stylesheets/beyond_canvas.sass +0 -25
  82. data/app/assets/stylesheets/beyond_canvas/components/_actions.sass +0 -5
  83. data/app/assets/stylesheets/beyond_canvas/components/_buttons.sass +0 -86
  84. data/app/assets/stylesheets/beyond_canvas/components/_cards.sass +0 -26
  85. data/app/assets/stylesheets/beyond_canvas/components/_comments.sass +0 -5
  86. data/app/assets/stylesheets/beyond_canvas/components/_flash.sass +0 -51
  87. data/app/assets/stylesheets/beyond_canvas/components/_forms.sass +0 -32
  88. data/app/assets/stylesheets/beyond_canvas/components/_inputs.sass +0 -79
  89. data/app/assets/stylesheets/beyond_canvas/components/_layouts.sass +0 -5
  90. data/app/assets/stylesheets/beyond_canvas/components/_links.sass +0 -13
  91. data/app/assets/stylesheets/beyond_canvas/components/_main.sass +0 -28
  92. data/app/assets/stylesheets/beyond_canvas/components/_margins.sass +0 -7
  93. data/app/assets/stylesheets/beyond_canvas/components/_markdown.sass +0 -60
  94. data/app/assets/stylesheets/beyond_canvas/components/_notices.sass +0 -41
  95. data/app/assets/stylesheets/beyond_canvas/components/_relative.sass +0 -2
  96. data/app/assets/stylesheets/beyond_canvas/components/_spinner.sass +0 -38
  97. data/app/assets/stylesheets/beyond_canvas/components/_tables.sass +0 -25
  98. data/app/assets/stylesheets/beyond_canvas/components/_texts.sass +0 -6
  99. data/app/assets/stylesheets/beyond_canvas/mailer.sass +0 -5
  100. data/app/assets/stylesheets/beyond_canvas/settings/_typography.sass +0 -53
  101. data/app/assets/stylesheets/beyond_canvas/settings/_variables.sass +0 -145
  102. data/app/assets/stylesheets/beyond_canvas/utilities/_mixins.sass +0 -19
  103. data/app/views/beyond_canvas/custom/_public_head.html.slim +0 -0
  104. data/app/views/beyond_canvas/shared/_flash.html.slim +0 -6
  105. data/app/views/beyond_canvas/shared/_head.html.slim +0 -20
  106. data/app/views/beyond_canvas/shared/_locale_switch.html.slim +0 -6
  107. data/app/views/beyond_canvas/shared/_logo.html.slim +0 -2
  108. data/app/views/layouts/beyond_canvas/public.html.slim +0 -12
  109. data/config/initializers/beyond_canvas/assets.rb +0 -5
  110. data/lib/generators/beyond_canvas/install_generator.rb +0 -13
  111. data/lib/generators/templates/beyond_canvas.rb +0 -8
  112. data/lib/generators/templates/beyond_canvas_form_utils.rb +0 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a704eb8fc8c4b55d55948f72b6f694d67bac4c4fd668a3542f1c2e0a3826bfdb
4
- data.tar.gz: 9521ae434f1eeee686b9f3421a79057cf807ad854f881be29e2d8ccffceab5e1
3
+ metadata.gz: ef55151b505d03b5e940bbb09fa64b01bf267426fb5d2b20f25a74a0d4226534
4
+ data.tar.gz: b2430821affb163c1ffda7cf4611bc924e310cb21cb02d7ef461b88de594385c
5
5
  SHA512:
6
- metadata.gz: bd1726b41d4a3e55a4704660b2056dad15a4ec191b35377bb4275b2396885fa1591dd4402f2ff21b29035ae61a4719d54d137ab509efcd04287a400674616f3a
7
- data.tar.gz: fa0bec465852750728d95e985a61797fde9625d38c771fe2a97f367475f8ffbfbeaff17bba23e12c30869b0c3583b6b7fb6f6eba57fe82a47eedf9a9f3aadc90
6
+ metadata.gz: 6fcaa57a073215b62c451b5d325022384ad1a8c1a77ecefa50caf40481150ed1c43e18cc5e92478f19011b15929db3f5b665124c2438f2bcd78f7d48bda384aa
7
+ data.tar.gz: d8ab25f70ae9821cb23fab3be6f419f00be764281b02632d4527f0023ae2e711b32e8bbb04d3a322ab6affafc992d3b11b2d0d4a37c1f1e404bcbeea9d623d34
data/README.md CHANGED
@@ -49,26 +49,7 @@
49
49
  $ rails g beyond_canvas:install
50
50
  ```
51
51
 
52
- This will generate `config/initializers/beyond_canvas.rb` file, used for general Beyond Canvas configuration
53
-
54
- ## Style Customization
55
-
56
- Beyond Canvas comes with _out-of-the-box_ styles to make your app look like as a Beyond integrated one. If you want to customize the gem styles, follow these instructions:
57
-
58
- 1. Run the custom style generator:
59
-
60
- ```bash
61
- $ rails g beyond_canvas:custom_styles
62
- ```
63
-
64
- This command will generate a file (`app/assets/stylesheets/_beyond_canvas_custom_styles.sass`) that contains all variables you can customize.
65
-
66
- 1. Import the custom styles **before** Beyond Canvas itself (to override the default styles) on `application.scss`:
67
-
68
- ```scss
69
- @import 'beyond_canvas_custom_styles'
70
- @import 'beyond_canvas'
71
- ```
52
+ This will generate `config/initializers/beyond_canvas.rb` file, used for general Beyond Canvas configuration. Read [this wiki entry](https://github.com/ePages-de/beyond_canvas/wiki/Initializer) to get more information about the different configuration options.
72
53
 
73
54
  ## Documentation
74
55
 
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" style="background: #ffffff;" width="16" height="16" viewBox="0 0 24 24"><path fill="#97C344" d="M0 0v24h24V0H0zm9.6 18.4l-5.8-5.6 2-2.1 3.7 3.6L18 5.6l2.1 2.1L9.6 18.4z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" style="background: #ffff;" width="16" height="16" viewBox="0 0 24 24"><path fill="#c2bf9d" d="M0 0v24h24V0H0zm21.5 21.5h-19v-19h19v19z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M15 2v5h5v15h-16v-20h11zm1-2h-14v24h20v-18l-6-6z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm-1.959 17l-4.5-4.319 1.395-1.435 3.08 2.937 7.021-7.183 1.422 1.409-8.418 8.591z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M24 20.188l-8.315-8.209 8.2-8.282-3.697-3.697-8.212 8.318-8.31-8.203-3.666 3.666 8.321 8.24-8.206 8.313 3.666 3.666 8.237-8.318 8.285 8.203z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm6 16.538l-4.592-4.548 4.546-4.587-1.416-1.403-4.545 4.589-4.588-4.543-1.405 1.405 4.593 4.552-4.547 4.592 1.405 1.405 4.555-4.596 4.591 4.55 1.403-1.416z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M13.25 7c0 .69-.56 1.25-1.25 1.25s-1.25-.56-1.25-1.25.56-1.25 1.25-1.25 1.25.56 1.25 1.25zm10.75 5c0 6.627-5.373 12-12 12s-12-5.373-12-12 5.373-12 12-12 12 5.373 12 12zm-2 0c0-5.514-4.486-10-10-10s-10 4.486-10 10 4.486 10 10 10 10-4.486 10-10zm-13-2v2h2v6h2v-8h-4z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm-1 6h2v8h-2v-8zm1 12.25c-.69 0-1.25-.56-1.25-1.25s.56-1.25 1.25-1.25 1.25.56 1.25 1.25-.56 1.25-1.25 1.25z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" style="background: #ffffff;" width="18" height="18" viewBox="0 0 24 24"><path fill="#97C344" d="M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.6 0 12 0zm0 21.6c-5.3 0-9.6-4.3-9.6-9.6S6.7 2.4 12 2.4s9.6 4.3 9.6 9.6-4.3 9.6-9.6 9.6zm0-15.9c-3.4 0-6.3 2.8-6.3 6.3s2.8 6.2 6.3 6.2 6.2-2.8 6.2-6.2-2.8-6.3-6.2-6.3z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" style="background: #ffffff;" width="18" height="18" viewBox="0 0 24 24"><path fill="#c2bf9d" d="M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.6 0 12 0zm0 21.6c-5.3 0-9.6-4.3-9.6-9.6S6.7 2.4 12 2.4s9.6 4.3 9.6 9.6-4.3 9.6-9.6 9.6z"></path></svg>
@@ -0,0 +1,106 @@
1
+ /*
2
+ * Warning: This file is auto-generated, do not modify. Instead, make your changes in 'app/javascript/beyond_canvas/' and run `yarn build`
3
+ */
4
+ //= require jquery3
5
+ //= require_self
6
+
7
+ (function(factory) {
8
+ typeof define === "function" && define.amd ? define([ "jquery" ], factory) : factory();
9
+ })(function() {
10
+ "use strict";
11
+ var SPINNER_ANIMATION_TIMEOUT = 125;
12
+ (function($) {
13
+ var onDOMReady = function onDOMReady() {
14
+ var inputs = $("input, textarea, select").not(":input[type=button], :input[type=submit], :input[type=reset]");
15
+ inputs.each(function() {
16
+ var input = $(this);
17
+ input.bind("invalid", function(e) {
18
+ if ($(input).is(":hidden")) {
19
+ e.preventDefault();
20
+ }
21
+ $('button[class^="button"]').each(function() {
22
+ hideSpinner($(this));
23
+ });
24
+ enableActionElements();
25
+ });
26
+ });
27
+ $('button[class^="button"]').each(function() {
28
+ var button = $(this);
29
+ button.width(button.width());
30
+ button.data("oldWidth", button.width());
31
+ button.prepend('\n <div class="spinner">\n <div class="bounce1"></div>\n <div class="bounce2"></div>\n <div class="bounce3"></div>\n </div>');
32
+ button.closest("form").on("ajax:success", function() {
33
+ hideSpinner(button);
34
+ enableActionElements();
35
+ }).on("ajax:error", function() {
36
+ hideSpinner(button);
37
+ enableActionElements();
38
+ });
39
+ });
40
+ };
41
+ $(document).on("click", '[class^="button"]', function() {
42
+ disableActionElements();
43
+ showSpinner($(this));
44
+ });
45
+ $(document).on("ready page:load turbolinks:load", onDOMReady);
46
+ })(jQuery);
47
+ function showSpinner(button) {
48
+ button.width(button.width() + $(".spinner").outerWidth(true));
49
+ setTimeout(function() {
50
+ button.find(".spinner").css("display", "flex");
51
+ }, SPINNER_ANIMATION_TIMEOUT);
52
+ }
53
+ function hideSpinner(button) {
54
+ setTimeout(function() {
55
+ button.find(".spinner").hide();
56
+ button.width(button.data("oldWidth"));
57
+ }, SPINNER_ANIMATION_TIMEOUT);
58
+ }
59
+ function disableActionElements() {
60
+ $('a, input[type="submit"], input[type="button"], input[type="reset"], button').each(function() {
61
+ $(this).addClass("actions--disabled");
62
+ });
63
+ }
64
+ function enableActionElements() {
65
+ $('a, input[type="submit"], input[type="button"], input[type="reset"], button').each(function() {
66
+ $(this).removeClass("actions--disabled");
67
+ });
68
+ }
69
+ (function($) {
70
+ var onDOMReady = function onDOMReady() {
71
+ $(".flash").each(function() {
72
+ $(this).css("right", -$(this).width() + "px");
73
+ });
74
+ setTimeout(function() {
75
+ $(".flash").addClass("flash--shown");
76
+ }, 100);
77
+ };
78
+ $(document).on("click", ".flash", function() {
79
+ closeAlert();
80
+ });
81
+ $(document).on("ready page:load turbolinks:load", onDOMReady);
82
+ })(jQuery);
83
+ function closeAlert() {
84
+ $(".flash").removeClass("flash--shown").delay(700).queue(function() {
85
+ $(this).remove();
86
+ });
87
+ }
88
+ (function($) {
89
+ var onDOMReady = function onDOMReady() {
90
+ $('input[type="file"]').each(function() {
91
+ var $input = $(this), $label = $(".input__file__text." + $input.attr("id")), labelVal = $label.html();
92
+ $input.on("change", function(e) {
93
+ var fileName = "";
94
+ if (this.files && this.files.length > 1) fileName = (this.getAttribute("data-multiple-caption") || "").replace("{count}", this.files.length); else if (e.target.value) fileName = e.target.value.split("\\").pop();
95
+ if (fileName) $label.html('<svg class="input__file__icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M15 2v5h5v15h-16v-20h11zm1-2h-14v24h20v-18l-6-6z"/></svg>' + fileName); else $label.html(labelVal);
96
+ });
97
+ $input.on("focus", function() {
98
+ $input.addClass("has-focus");
99
+ }).on("blur", function() {
100
+ $input.removeClass("has-focus");
101
+ });
102
+ });
103
+ };
104
+ $(document).on("ready page:load turbolinks:load", onDOMReady);
105
+ })(jQuery);
106
+ });
@@ -0,0 +1,28 @@
1
+ @import "bourbon";
2
+
3
+ @import "settings/breakpoints";
4
+ @import "settings/variables";
5
+ @import "settings/reset_css";
6
+ @import "settings/typography";
7
+
8
+ @import "utilities/functions";
9
+ @import "utilities/mixins";
10
+
11
+ @import "components/actions";
12
+ @import "components/buttons";
13
+ @import "components/cards";
14
+ @import "components/comments";
15
+ @import "components/containers";
16
+ @import "components/flash";
17
+ @import "components/forms";
18
+ @import "components/inputs";
19
+ @import "components/layouts";
20
+ @import "components/links";
21
+ @import "components/main";
22
+ @import "components/margins";
23
+ @import "components/markdown";
24
+ @import "components/notices";
25
+ @import "components/relative";
26
+ @import "components/tables";
27
+ @import "components/spinner";
28
+ @import "components/texts";
@@ -0,0 +1,6 @@
1
+ .actions {
2
+ &--disabled {
3
+ cursor: not-allowed;
4
+ pointer-events: none;
5
+ }
6
+ }
@@ -0,0 +1,112 @@
1
+ %button {
2
+ @include padding($button-padding);
3
+
4
+ @if $button-box-shadow != true {
5
+ padding-top: 7px;
6
+ }
7
+
8
+ align-items: center;
9
+ border-radius: $button-border-radius;
10
+ border-width: 1px;
11
+ border-style: solid;
12
+ cursor: pointer;
13
+ display: flex;
14
+ font-weight: $button-font-weight;
15
+ justify-content: flex-end;
16
+ line-height: 1;
17
+ outline: none;
18
+ transition: $main-transition;
19
+ }
20
+
21
+ @mixin button-solid($background, $color) {
22
+ @include background-color-darken($background, 10%);
23
+
24
+ color: $color;
25
+
26
+ .spinner {
27
+ display: none;
28
+
29
+ > div {
30
+ background-color: $color;
31
+ }
32
+ }
33
+
34
+ &:hover {
35
+ border-color: darken($background, 10%);
36
+ }
37
+ }
38
+
39
+ @mixin button-transparent($background) {
40
+ background-color: transparent;
41
+ border-color: $background;
42
+ color: $background;
43
+
44
+ .spinner {
45
+ display: none;
46
+
47
+ > div {
48
+ background-color: $background;
49
+ }
50
+ }
51
+
52
+ &:hover {
53
+ background-color: lighten($background, 40%);
54
+ }
55
+ }
56
+
57
+ @mixin button-border($background) {
58
+ border-color: $background;
59
+
60
+ @if $button-box-shadow == true {
61
+ border-bottom-width: 2px;
62
+ border-bottom-color: darken($background, 10%);
63
+ }
64
+ }
65
+
66
+ .button {
67
+ &__solid {
68
+ &--primary {
69
+ @extend %button;
70
+
71
+ @include button-solid($button-primary-background, $button-primary-color);
72
+ @include button-border($button-primary-background);
73
+ }
74
+
75
+ &--secondary {
76
+ @extend %button;
77
+
78
+ @include button-solid($button-secondary-background, $button-secondary-color);
79
+ @include button-border($button-secondary-background);
80
+ }
81
+
82
+ &--danger {
83
+ @extend %button;
84
+
85
+ @include button-solid($button-danger-background, $button-danger-color);
86
+ @include button-border($button-danger-background);
87
+ }
88
+ }
89
+
90
+ &__transparent {
91
+ &--primary {
92
+ @extend %button;
93
+
94
+ @include button-transparent($button-primary-background);
95
+ @include button-border($button-primary-background);
96
+ }
97
+
98
+ &--secondary {
99
+ @extend %button;
100
+
101
+ @include button-transparent($button-secondary-background);
102
+ @include button-border($button-secondary-background);
103
+ }
104
+
105
+ &--danger {
106
+ @extend %button;
107
+
108
+ @include button-transparent($button-danger-background);
109
+ @include button-border($button-danger-background);
110
+ }
111
+ }
112
+ }
@@ -0,0 +1,34 @@
1
+ .card {
2
+ background: $white;
3
+ border-radius: $card-border-radius;
4
+ box-shadow: $card-box-shadow;
5
+
6
+ &:not(:last-child) {
7
+ margin-bottom: $card-margin;
8
+ }
9
+
10
+ &--relative {
11
+ position: relative;
12
+ }
13
+
14
+ &--padding {
15
+ @include padding($card-padding);
16
+
17
+ box-sizing: border-box;
18
+ }
19
+
20
+ &__separator {
21
+ @include margin($card-separator-spacing null);
22
+
23
+ border-bottom: 1px solid $card-separator-color;
24
+ left: -#{$card-padding};
25
+ position: relative;
26
+ width: calc(100% + 2 * #{$card-padding});
27
+ }
28
+
29
+ &__headline {
30
+ color: $card-title-color;
31
+ font-size: 20px;
32
+ margin-bottom: 20px;
33
+ }
34
+ }
@@ -0,0 +1,6 @@
1
+ .comment {
2
+ padding: 20px;
3
+ box-sizing: border-box;
4
+ background: $comment-background;
5
+ color: $comment-color;
6
+ }
@@ -0,0 +1,37 @@
1
+ $columns: 2, 3, 4;
2
+
3
+ .container {
4
+ width: 100%;
5
+ display: flex;
6
+ flex-wrap: wrap;
7
+
8
+ &--center {
9
+ justify-content: center;
10
+ }
11
+
12
+ &__column {
13
+
14
+ @each $column in $columns {
15
+
16
+ &--#{$column} {
17
+ width: 100%;
18
+
19
+ @media (min-width: $laptop) {
20
+ width: calc((100% - (#{$column} - 1) * #{$container-spacing}) / #{$column});
21
+
22
+ &:not(:last-child) {
23
+ margin-right: $container-spacing;
24
+ }
25
+ }
26
+
27
+ &:not(:last-child) {
28
+ margin-bottom: $container-spacing;
29
+
30
+ @media (min-width: $laptop) {
31
+ margin-bottom: 0;
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,66 @@
1
+ .flash {
2
+ @include position(fixed, 70px null null null);
3
+
4
+ background-color: $white;
5
+ border-radius: $flash-border-radius;
6
+ box-shadow: $flash-box-shadow;
7
+ display: flex;
8
+ overflow: hidden;
9
+ transition: 0.7s linear;
10
+ z-index: 9999;
11
+
12
+ &--shown {
13
+ // sass-lint:disable no-important
14
+ right: 25px !important;
15
+ // sass-lint:enable no-important
16
+ transition: 0.4s linear;
17
+ }
18
+
19
+ &__icon {
20
+ @include padding(11px 8px);
21
+
22
+ display: flex;
23
+
24
+ > svg {
25
+ @include size(18px);
26
+
27
+ fill: $white;
28
+ }
29
+
30
+ &--success,
31
+ &--notice {
32
+ background-color: $flash-success;
33
+ }
34
+
35
+ &--info {
36
+ background-color: $flash-info;
37
+ }
38
+
39
+ &--warning {
40
+ background-color: $flash-warning;
41
+ }
42
+
43
+ &--error {
44
+ background-color: $flash-error;
45
+ }
46
+ }
47
+
48
+ &__message {
49
+ @include padding(10px 15px);
50
+
51
+ box-sizing: border-box;
52
+ color: $flash-color;
53
+ }
54
+
55
+ &__close {
56
+ @include padding(10px 15px);
57
+
58
+ cursor: pointer;
59
+
60
+ > svg {
61
+ @include size(8px);
62
+
63
+ fill: $flash-color;
64
+ }
65
+ }
66
+ }