beyond_canvas 0.8.1.pre → 0.9.0.pre

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2b4a9611b4fb459d4454a166f9984e56403afd19d40b872e873481a57b58026d
4
- data.tar.gz: adc77192a838146243ccfb8572f33b01f0e5d4d27950ab02e4ee84c35cce83ad
3
+ metadata.gz: 335beddd2eac597c9fa0897cb7c20f6fb57c86a0ca5e622836298e8c325cfd24
4
+ data.tar.gz: a82e3214de0668784582bc4f8b32c5f761687c49343f00f54191e494318c1cf0
5
5
  SHA512:
6
- metadata.gz: bd712299f19099d27f198c4d48fdd6c2ec68fbe3480aba124335816b8880c7f61d148c65f09c0eed27ef8f5fa9db3f0a442673ba6c3119ecc4a69c6569db9f33
7
- data.tar.gz: b62e2a194d42964e6bff4f1b31fdf561803b7944252665f974f2888907026aab098bbcb6c043fc4f7c70952d3c88178c5452dc41f114ce335194d146e70dfe90
6
+ metadata.gz: 53c3b4a996a98077b105426c0b130092a083a86b2b8d9fa12ec2779d47e685e1d3e199f3fd4fcd3527a60751377cf1cc0d713e5cd2af93787c4097fbeb0830f2
7
+ data.tar.gz: e25da7ec134955b4f5b192dc7f4824328754b3a32c19c4a595b4bed7f913b62d4528222b093169af51fea63e21295efbdcddbce1d36bc2ce1fa9bbe09a1c4ac1
@@ -1,41 +1,39 @@
1
- $(document).ready(function() {
2
- ('use strict');
1
+ (function($) {
2
+ $(document).on('click', '[class^="button"]', function() {
3
+ disableActionElements();
4
+ showSpinner($(this));
5
+ });
3
6
 
4
- $('[class^="button"]').each(function() {
5
- var button = $(this);
7
+ $(document).on('ready page:load turbolinks:load', function() {
8
+ $('[class^="button"]').each(function() {
9
+ var button = $(this);
6
10
 
7
- // Add width attribute and save old width
8
- button.width(button.width());
9
- button.data('oldWidth', button.width());
11
+ // Add width attribute and save old width
12
+ button.width(button.width());
13
+ button.data('oldWidth', button.width());
10
14
 
11
- // Add the spinner
12
- button.prepend(`
15
+ // Add the spinner
16
+ button.prepend(`
13
17
  <div class="spinner">
14
18
  <div class="bounce1"></div>
15
19
  <div class="bounce2"></div>
16
20
  <div class="bounce3"></div>
17
- </div>`
18
- );
19
-
20
- // Bind ajax:success and ajax:error to the form the button belongs to
21
- button
22
- .closest('form')
23
- .on('ajax:success', function() {
24
- hideSpinner(button);
25
- enableActionElements();
26
- })
27
- .on('ajax:error', function() {
28
- hideSpinner(button);
29
- enableActionElements();
30
- });
31
- });
32
-
33
- // Bind click event to buttons
34
- $('[class^="button"]').click(function() {
35
- disableActionElements();
36
- showSpinner($(this));
21
+ </div>`);
22
+
23
+ // Bind ajax:success and ajax:error to the form the button belongs to
24
+ button
25
+ .closest('form')
26
+ .on('ajax:success', function() {
27
+ hideSpinner(button);
28
+ enableActionElements();
29
+ })
30
+ .on('ajax:error', function() {
31
+ hideSpinner(button);
32
+ enableActionElements();
33
+ });
34
+ });
37
35
  });
38
- });
36
+ })(jQuery);
39
37
 
40
38
  function showSpinner(button) {
41
39
  // Adjust the width of the button
@@ -1,24 +1,24 @@
1
- $(document).ready(function() {
2
- ('use strict');
3
-
4
- $('.flash').each(function() {
5
- $(this).css('right', -$(this).width() + 'px');
1
+ (function($) {
2
+ $(document).on('click', '.flash', function() {
3
+ closeAlert();
6
4
  });
7
5
 
8
- setTimeout(function() {
9
- $('.flash').addClass('flash--shown');
10
- }, 100);
6
+ $(document).on('ready page:load turbolinks:load', function() {
7
+ $('.flash').each(function() {
8
+ $(this).css('right', -$(this).width() + 'px');
9
+ });
11
10
 
12
- $('.flash').click(function() {
13
- closeAlert();
11
+ setTimeout(function() {
12
+ $('.flash').addClass('flash--shown');
13
+ }, 100);
14
14
  });
15
+ })(jQuery);
15
16
 
16
- function closeAlert() {
17
- $('.flash')
18
- .removeClass('flash--shown')
19
- .delay(700)
20
- .queue(function() {
21
- $(this).remove();
22
- });
23
- }
24
- });
17
+ function closeAlert() {
18
+ $('.flash')
19
+ .removeClass('flash--shown')
20
+ .delay(700)
21
+ .queue(function() {
22
+ $(this).remove();
23
+ });
24
+ }
@@ -0,0 +1,57 @@
1
+ .markdown
2
+
3
+ > :first-child
4
+ margin-top: 0 !important
5
+
6
+ > *:not(:last-child)
7
+ margin-bottom: 16px
8
+
9
+ h1, h2, h3, h4
10
+ margin-top: 24px
11
+
12
+ h1
13
+ font-size: 2em
14
+
15
+ h2
16
+ font-size: 1.5em
17
+
18
+ h3
19
+ font-size: 1.25em
20
+
21
+ h4
22
+ font-size: 1em
23
+
24
+ ul,
25
+ ol
26
+ padding-left: 2em
27
+
28
+ ul
29
+ margin-bottom: 0
30
+
31
+ table
32
+
33
+ thead
34
+ background-color: $markdown-table-head-background
35
+ font-weight: 700
36
+
37
+ thead,
38
+ tbody
39
+
40
+ tr
41
+
42
+ th,
43
+ td
44
+ border: 1px solid $markdown-table-border-color
45
+ padding: .4em .8em
46
+
47
+ blockquote
48
+ border-left: .25em solid $markdown-blockquote-border-color
49
+ color: $markdown-blockquote-font-color
50
+ padding: 0 1em
51
+
52
+ hr
53
+ background-color: $markdown-hr-background
54
+ border: 0
55
+ height: 4px
56
+ margin: 24px 0 !important
57
+ padding: 0
@@ -0,0 +1,6 @@
1
+ .text
2
+
3
+ &__align
4
+
5
+ &--center
6
+ text-align: center
@@ -133,3 +133,13 @@ $notice-warning-background: rgb(193, 179, 26) !default
133
133
  $notice-error-background: rgb(162, 66, 60) !default
134
134
  $notice-border-radius: 4px !default
135
135
  $notice-color: rgb(255, 255, 255) !default
136
+
137
+ // ************************************************************
138
+ // Markdown
139
+ // ************************************************************
140
+
141
+ $markdown-table-head-background: #f6f8fa
142
+ $markdown-table-border-color: #dfe2e5
143
+ $markdown-blockquote-font-color: #6a737d
144
+ $markdown-blockquote-border-color: #dfe2e5
145
+ $markdown-hr-background: #e1e4e8
@@ -20,3 +20,5 @@
20
20
  @import 'beyond_canvas/components/relative'
21
21
  @import 'beyond_canvas/components/tables'
22
22
  @import 'beyond_canvas/components/spinner'
23
+ @import 'beyond_canvas/components/texts'
24
+ @import 'beyond_canvas/components/markdown'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BeyondCanvas
4
- VERSION = '0.8.1.pre'
4
+ VERSION = '0.9.0.pre'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beyond_canvas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1.pre
4
+ version: 0.9.0.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Unai Abrisketa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-04 00:00:00.000000000 Z
11
+ date: 2020-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bourbon
@@ -155,9 +155,11 @@ files:
155
155
  - app/assets/stylesheets/beyond_canvas/components/_links.sass
156
156
  - app/assets/stylesheets/beyond_canvas/components/_main.sass
157
157
  - app/assets/stylesheets/beyond_canvas/components/_margins.sass
158
+ - app/assets/stylesheets/beyond_canvas/components/_markdown.sass
158
159
  - app/assets/stylesheets/beyond_canvas/components/_notices.sass
159
160
  - app/assets/stylesheets/beyond_canvas/components/_relative.sass
160
161
  - app/assets/stylesheets/beyond_canvas/components/_tables.sass
162
+ - app/assets/stylesheets/beyond_canvas/components/_texts.sass
161
163
  - app/assets/stylesheets/beyond_canvas/components/spinner.sass
162
164
  - app/assets/stylesheets/beyond_canvas/settings/_reset_css.sass
163
165
  - app/assets/stylesheets/beyond_canvas/settings/_typography.sass