beyond_canvas 0.2.1.pre → 0.3.0.pre

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf63764c2f3f2522e73fcfb19015a20b6b9098840e00e357aad9b069395a07eb
4
- data.tar.gz: 401bcc2b337b8eef39fd68aff25721a9d13cbd14ae37ec5223d1b1ad05c4434f
3
+ metadata.gz: bf3dcd314ac438baa2a2bcf49b799573dfedd2b3a6b87cf512bf232ef45c1ed9
4
+ data.tar.gz: 4a6dff736ec740829bdb03de47db718c650c219e52580a5f9158a17fb295b4b2
5
5
  SHA512:
6
- metadata.gz: 65d8e7ca1242430f21ef4488ffc4473ec245ca119b34a1721370ab3f639daee52be4726564a1b49afbd503b59c501dfb4b2c58a2aa3b468acb4c7831dd45fb4b
7
- data.tar.gz: 753b7c44c9d969e4b48d1d65aa8ced5d8baf23049d68278c8dddb7c280978945376a8953f309a07aaac244114902c141c0dc67105f4ec0d4b74afc71a59c0137
6
+ metadata.gz: 50c9320d7335dcf9637fe6c20c9d426b2fad5c3117e49494830e9c751f45e0c852cb636fbaaa231f6bfbf7022b54f2940666696a63db0631150a1ffa17a37d9b
7
+ data.tar.gz: e6b2514256375b12171cb0a17bb93dc089756656f704c1d1f4564bde21d4160a8cb43d9301798be4c1e8e1ecaf5b748b55814181d8490731dc78b45b2a9fca17
data/CHANGELOG.md ADDED
@@ -0,0 +1,30 @@
1
+ ### v0.3.0.pre
2
+
3
+ * features
4
+ * Add flash messages
5
+ * Add CHANGELOG file
6
+ * Add CONTRIBUTING file
7
+ * Add Rakefile
8
+
9
+ ### v0.2.1.pre
10
+
11
+ * bug-fixes
12
+ * Fix headline margin on card
13
+ * Fix gem name
14
+
15
+ ### v0.2.0.pre
16
+
17
+ * features
18
+ * Add Beyond form utils
19
+ * Add single page layout
20
+ * Add lins with icons
21
+ * Add FontAwesome
22
+ * Add input errors
23
+
24
+ * enhancements
25
+ * Improve styles
26
+
27
+ ### v0.1.0.pre
28
+
29
+ * features
30
+ * First pre-release of the gem
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,48 @@
1
+ # Contributing to Beyond API Ruby Client
2
+
3
+ We love pull requests from everyone. Here are some ways _you_ can contribute:
4
+
5
+ * by using alpha, beta, and prerelease versions
6
+ * by reporting bugs
7
+ * by suggesting new features
8
+ * by writing or editing documentation
9
+ * by writing specifications
10
+ * by writing code (**no patch is too small**: fix typos, add comments, clean up inconsistent whitespace)
11
+ * by refactoring code
12
+ * by closing [issues][]
13
+ * by reviewing patches
14
+
15
+ [issues]: https://github.com/ePages-de/beyond_canvasssues
16
+
17
+ ## Submitting an Issue
18
+
19
+ * We use the [GitHub issue tracker][issues] to track bugs and features.
20
+ * Before submitting a bug report or feature request, check to make sure it hasn't already been submitted.
21
+ * When submitting a bug report, please include a [Gist][] that includes a stack trace and any details that may be necessary to reproduce the bug, including your gem version, Ruby version, and operating system. Ideally, a bug report should include a pull request with failing specs.
22
+
23
+ [gist]: https://gist.github.com/
24
+
25
+ ## Cleaning up issues
26
+
27
+ * Issues that have no response from the submitter will be closed after 30 days.
28
+ * Issues will be closed once they're assumed to be fixed or answered. If the maintainer is wrong, it can be opened again.
29
+ * If your issue is closed by mistake, please understand and explain the issue. We will happily reopen the issue.
30
+
31
+ ## Submitting a Pull Request
32
+
33
+ 1. [Fork][fork] the [official repository][repo].
34
+ 2. [Create a topic branch.][branch]
35
+ 3. Implement your feature or bug fix.
36
+ 4. Add, commit, and push your changes.
37
+ 5. [Submit a pull request.][pr]
38
+
39
+ ## Notes
40
+
41
+ * Please don't update the Gem version.
42
+
43
+ [repo]: https://github.com/ePages-de/beyond_canvas/tree/master
44
+ [fork]: https://help.github.com/articles/fork-a-repo/
45
+ [branch]: https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/
46
+ [pr]: https://help.github.com/articles/using-pull-requests/
47
+
48
+ Inspired by https://github.com/thoughtbot/factory_bot/blob/master/CONTRIBUTING.md
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in beyond_api.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,101 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ beyond_canvas (0.3.0.pre)
5
+ bourbon (~> 5.1)
6
+ inline_svg (~> 1.5)
7
+ neat (~> 3.0)
8
+ slim-rails (~> 3.2)
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ actionpack (6.0.0)
14
+ actionview (= 6.0.0)
15
+ activesupport (= 6.0.0)
16
+ rack (~> 2.0)
17
+ rack-test (>= 0.6.3)
18
+ rails-dom-testing (~> 2.0)
19
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
20
+ actionview (6.0.0)
21
+ activesupport (= 6.0.0)
22
+ builder (~> 3.1)
23
+ erubi (~> 1.4)
24
+ rails-dom-testing (~> 2.0)
25
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
26
+ activesupport (6.0.0)
27
+ concurrent-ruby (~> 1.0, >= 1.0.2)
28
+ i18n (>= 0.7, < 2)
29
+ minitest (~> 5.1)
30
+ tzinfo (~> 1.1)
31
+ zeitwerk (~> 2.1, >= 2.1.8)
32
+ bourbon (5.1.0)
33
+ sass (~> 3.4)
34
+ thor (~> 0.19)
35
+ builder (3.2.3)
36
+ concurrent-ruby (1.1.5)
37
+ crass (1.0.5)
38
+ erubi (1.9.0)
39
+ ffi (1.11.1)
40
+ i18n (1.7.0)
41
+ concurrent-ruby (~> 1.0)
42
+ inline_svg (1.5.2)
43
+ activesupport (>= 3.0)
44
+ nokogiri (>= 1.6)
45
+ loofah (2.3.1)
46
+ crass (~> 1.0.2)
47
+ nokogiri (>= 1.5.9)
48
+ method_source (0.9.2)
49
+ mini_portile2 (2.4.0)
50
+ minitest (5.12.2)
51
+ neat (3.0.1)
52
+ sass (~> 3.4)
53
+ thor (~> 0.19)
54
+ nokogiri (1.10.4)
55
+ mini_portile2 (~> 2.4.0)
56
+ rack (2.0.7)
57
+ rack-test (1.1.0)
58
+ rack (>= 1.0, < 3)
59
+ rails-dom-testing (2.0.3)
60
+ activesupport (>= 4.2.0)
61
+ nokogiri (>= 1.6)
62
+ rails-html-sanitizer (1.3.0)
63
+ loofah (~> 2.3)
64
+ railties (6.0.0)
65
+ actionpack (= 6.0.0)
66
+ activesupport (= 6.0.0)
67
+ method_source
68
+ rake (>= 0.8.7)
69
+ thor (>= 0.20.3, < 2.0)
70
+ rake (13.0.0)
71
+ rb-fsevent (0.10.3)
72
+ rb-inotify (0.10.0)
73
+ ffi (~> 1.0)
74
+ sass (3.7.4)
75
+ sass-listen (~> 4.0.0)
76
+ sass-listen (4.0.0)
77
+ rb-fsevent (~> 0.9, >= 0.9.4)
78
+ rb-inotify (~> 0.9, >= 0.9.7)
79
+ slim (4.0.1)
80
+ temple (>= 0.7.6, < 0.9)
81
+ tilt (>= 2.0.6, < 2.1)
82
+ slim-rails (3.2.0)
83
+ actionpack (>= 3.1)
84
+ railties (>= 3.1)
85
+ slim (>= 3.0, < 5.0)
86
+ temple (0.8.2)
87
+ thor (0.20.3)
88
+ thread_safe (0.3.6)
89
+ tilt (2.0.10)
90
+ tzinfo (1.2.5)
91
+ thread_safe (~> 0.1)
92
+ zeitwerk (2.2.0)
93
+
94
+ PLATFORMS
95
+ ruby
96
+
97
+ DEPENDENCIES
98
+ beyond_canvas!
99
+
100
+ BUNDLED WITH
101
+ 2.0.2
data/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2019 ePages GmbH
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
14
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
17
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
18
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
19
+ OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1 @@
1
+ //= require flash
@@ -0,0 +1,21 @@
1
+ document.addEventListener('turbolinks:load', function() {
2
+ 'use strict'
3
+
4
+ $('.flash').each(function() {
5
+ $(this).css('right', -$(this).width() + 'px');
6
+ });
7
+
8
+ setTimeout(function() {
9
+ $('.flash').addClass('flash--shown');
10
+ }, 100);
11
+
12
+ $('.flash').click(function() {
13
+ closeAlert();
14
+ });
15
+
16
+ function closeAlert() {
17
+ $('.flash').removeClass('flash--shown').delay(700).queue(function() {
18
+ $(this).remove();
19
+ });
20
+ }
21
+ });
@@ -10,6 +10,7 @@
10
10
 
11
11
  @import 'components/buttons'
12
12
  @import 'components/cards'
13
+ @import 'components/flash'
13
14
  @import 'components/forms'
14
15
  @import 'components/inputs'
15
16
  @import 'components/links'
@@ -0,0 +1,51 @@
1
+ .flash
2
+ +position(fixed, 70px null null null)
3
+ background-color: $white
4
+ border-radius: $flash-border-radius
5
+ box-shadow: $flash-box-shadow
6
+ display: flex
7
+ overflow: hidden
8
+ transition: .7s linear
9
+ z-index: 9999
10
+
11
+ &--shown
12
+ // sass-lint:disable no-important
13
+ right: 25px !important
14
+ // sass-lint:enable no-important
15
+ transition: .4s linear
16
+
17
+ &__icon
18
+ align-items: center
19
+ box-sizing: border-box
20
+ color: $white
21
+ display: flex
22
+ font-size: 18px
23
+ justify-content: center
24
+ min-width: 34px
25
+ padding: 11px 8px
26
+
27
+ &--success
28
+ background-color: $flash-success
29
+
30
+ &--notice
31
+ background-color: $flash-notice
32
+
33
+ &--warning
34
+ background-color: $flash-warning
35
+
36
+ &--error
37
+ background-color: $flash-error
38
+
39
+ &__message
40
+ +padding(10px 15px)
41
+ box-sizing: border-box
42
+ color: $flash-color
43
+
44
+ &__close
45
+ +padding(10px 15px)
46
+ align-items: center
47
+ box-sizing: border-box
48
+ color: $flash-color
49
+ cursor: pointer
50
+ display: flex
51
+ font-size: 10px
@@ -75,3 +75,13 @@ $hint-color: rgb(158, 158, 158) !default
75
75
 
76
76
  $logo-margin-top-public: 0 !default
77
77
  $logo-margin-bottom-public: 34px !default
78
+
79
+ // Flash
80
+
81
+ $flash-success: rgb(82, 204, 133) !default
82
+ $flash-notice: rgb(90, 129, 171) !default
83
+ $flash-warning: rgb(255, 180, 102) !default
84
+ $flash-error: rgb(218, 60, 60) !default
85
+ $flash-border-radius: 4px !default
86
+ $flash-box-shadow: 0 1px 2px 0 rgba($black, 0.2) !default
87
+ $flash-color: rgb(128, 128, 128) !default
@@ -12,4 +12,19 @@ module BeyondCanvasHelper
12
12
  name
13
13
  end
14
14
  end
15
+
16
+ def get_flash_icon(key)
17
+ case key
18
+ when 'success'
19
+ "fas fa-check"
20
+ when 'notice'
21
+ "fas fa-info"
22
+ when 'warning'
23
+ "fas fa-exclamation"
24
+ when 'error'
25
+ "far fa-times-circle"
26
+ else
27
+ "fas fa-info"
28
+ end
29
+ end
15
30
  end
@@ -0,0 +1,6 @@
1
+ - flash.each do |key, value|
2
+ .flash
3
+ i.flash__icon class="flash__icon--#{key} #{get_flash_icon(key)}"
4
+
5
+ .flash__message = value
6
+ i.fas.fa-times.flash__close
@@ -5,10 +5,12 @@ html
5
5
  = csrf_meta_tags
6
6
  meta content='width=device-width, initial-scale=1.0' name='viewport' /
7
7
  link crossorigin="anonymous" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" rel="stylesheet" /
8
+ script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"
8
9
  = render 'beyond_canvas/custom/public_head'
9
10
 
10
11
  body.body--public
11
12
  main.main class=("#{params[:controller].gsub(/[\/_]/, "-")}--#{params[:action]}")
13
+ = render 'beyond_canvas/flash'
12
14
  .main-wrapper
13
15
  - logo = Dir["app/assets/images/logo.*"].first
14
16
  - unless logo.nil?
@@ -5,6 +5,7 @@ html
5
5
  = csrf_meta_tags
6
6
  meta content='width=device-width, initial-scale=1.0' name='viewport' /
7
7
  link crossorigin="anonymous" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" rel="stylesheet" /
8
+ script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"
8
9
  = render 'beyond_canvas/custom/public_head'
9
10
 
10
11
  body.body--single-page
data/lib/beyond_canvas.rb CHANGED
@@ -1,5 +1,11 @@
1
1
  require "beyond_canvas/version"
2
2
 
3
3
  module BeyondCanvas
4
- class Engine < ::Rails::Engine; end
4
+ class Engine < ::Rails::Engine
5
+ config.before_initialize do
6
+ if config.action_view.javascript_expansions
7
+ config.action_view.javascript_expansions[:beyond_canvas] = %w(beyond_canvas)
8
+ end
9
+ end
10
+ end
5
11
  end
@@ -1,3 +1,3 @@
1
1
  module BeyondCanvas
2
- VERSION = "0.2.1.pre"
2
+ VERSION = "0.3.0.pre".freeze
3
3
  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.2.1.pre
4
+ version: 0.3.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: 2019-08-12 00:00:00.000000000 Z
11
+ date: 2019-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bourbon
@@ -76,11 +76,19 @@ extensions: []
76
76
  extra_rdoc_files: []
77
77
  files:
78
78
  - ".gitignore"
79
- - LICENSE.txt
79
+ - CHANGELOG.md
80
+ - CONTRIBUTING.md
81
+ - Gemfile
82
+ - Gemfile.lock
83
+ - LICENSE
80
84
  - README.md
85
+ - Rakefile
86
+ - app/assets/javascripts/beyond_canvas.js
87
+ - app/assets/javascripts/flash.js
81
88
  - app/assets/stylesheets/_beyond_canvas.sass
82
89
  - app/assets/stylesheets/components/_buttons.sass
83
90
  - app/assets/stylesheets/components/_cards.sass
91
+ - app/assets/stylesheets/components/_flash.sass
84
92
  - app/assets/stylesheets/components/_forms.sass
85
93
  - app/assets/stylesheets/components/_inputs.sass
86
94
  - app/assets/stylesheets/components/_links.sass
@@ -93,6 +101,7 @@ files:
93
101
  - app/assets/stylesheets/utilities/_mixins.sass
94
102
  - app/form_builders/beyond_form_builder.rb
95
103
  - app/helpers/beyond_canvas_helper.rb
104
+ - app/views/beyond_canvas/_flash.html.slim
96
105
  - app/views/beyond_canvas/custom/_public_head.html.slim
97
106
  - app/views/layouts/beyond_canvas/public.html.slim
98
107
  - app/views/layouts/beyond_canvas/single_page.html.slim
@@ -120,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
129
  - !ruby/object:Gem::Version
121
130
  version: 1.3.1
122
131
  requirements: []
123
- rubygems_version: 3.0.2
132
+ rubygems_version: 3.0.3
124
133
  signing_key:
125
134
  specification_version: 4
126
135
  summary: Open-source framework that provides CSS styles
data/LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2019 ePages GmbH
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.