beyond_canvas 0.8.1.pre → 0.9.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/beyond_canvas/buttons.js +28 -30
- data/app/assets/javascripts/beyond_canvas/flash.js +19 -19
- data/app/assets/stylesheets/beyond_canvas/components/_markdown.sass +57 -0
- data/app/assets/stylesheets/beyond_canvas/components/_texts.sass +6 -0
- data/app/assets/stylesheets/beyond_canvas/settings/_variables.sass +10 -0
- data/app/assets/stylesheets/beyond_canvas.sass +2 -0
- data/lib/beyond_canvas/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 335beddd2eac597c9fa0897cb7c20f6fb57c86a0ca5e622836298e8c325cfd24
|
4
|
+
data.tar.gz: a82e3214de0668784582bc4f8b32c5f761687c49343f00f54191e494318c1cf0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53c3b4a996a98077b105426c0b130092a083a86b2b8d9fa12ec2779d47e685e1d3e199f3fd4fcd3527a60751377cf1cc0d713e5cd2af93787c4097fbeb0830f2
|
7
|
+
data.tar.gz: e25da7ec134955b4f5b192dc7f4824328754b3a32c19c4a595b4bed7f913b62d4528222b093169af51fea63e21295efbdcddbce1d36bc2ce1fa9bbe09a1c4ac1
|
@@ -1,41 +1,39 @@
|
|
1
|
-
|
2
|
-
('
|
1
|
+
(function($) {
|
2
|
+
$(document).on('click', '[class^="button"]', function() {
|
3
|
+
disableActionElements();
|
4
|
+
showSpinner($(this));
|
5
|
+
});
|
3
6
|
|
4
|
-
$(
|
5
|
-
|
7
|
+
$(document).on('ready page:load turbolinks:load', function() {
|
8
|
+
$('[class^="button"]').each(function() {
|
9
|
+
var button = $(this);
|
6
10
|
|
7
|
-
|
8
|
-
|
9
|
-
|
11
|
+
// Add width attribute and save old width
|
12
|
+
button.width(button.width());
|
13
|
+
button.data('oldWidth', button.width());
|
10
14
|
|
11
|
-
|
12
|
-
|
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
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
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
|
-
|
2
|
-
('
|
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
|
-
|
9
|
-
$('.flash').
|
10
|
-
|
6
|
+
$(document).on('ready page:load turbolinks:load', function() {
|
7
|
+
$('.flash').each(function() {
|
8
|
+
$(this).css('right', -$(this).width() + 'px');
|
9
|
+
});
|
11
10
|
|
12
|
-
|
13
|
-
|
11
|
+
setTimeout(function() {
|
12
|
+
$('.flash').addClass('flash--shown');
|
13
|
+
}, 100);
|
14
14
|
});
|
15
|
+
})(jQuery);
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
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
|
@@ -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
|
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.
|
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-
|
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
|