beyond_canvas 0.1.0.pre

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 065b4cc184018b0a41cfb7bb63ecc93003050d75df117d49010bfc57ccc1282d
4
+ data.tar.gz: c249481c868a9de71728c6e02f08905ea71d9adb357970076ef6cc7f2215698a
5
+ SHA512:
6
+ metadata.gz: 7db8400076fc278cda8e852011989f7337ca02408cba731f56928983ef94f61703f0a3f66805aae8ff00ed34b87d43c9276b844b96eef13b1e947e158b95acf5
7
+ data.tar.gz: 9b364f193d29260ba2c2e9c5e8b4c54aeb9c11e8706a4d59e5b3c50c65bead504c174f435f199369671a8bc87d86f83eddc545cdb89ccb918dc24a21567dcd9c
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ .DS_Store
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
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.
data/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # BeyondEssence
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/beyond_essence`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'beyond_essence'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install beyond_essence
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/beyond_essence.
@@ -0,0 +1,17 @@
1
+ @import 'bourbon'
2
+ @import 'neat'
3
+
4
+ @import 'settings/variables'
5
+ @import 'settings/neat'
6
+ @import 'settings/reset_css'
7
+ @import 'settings/typography'
8
+
9
+ @import 'utilities/mixins'
10
+
11
+ @import 'components/buttons'
12
+ @import 'components/cards'
13
+ @import 'components/forms'
14
+ @import 'components/inputs'
15
+ @import 'components/links'
16
+ @import 'components/main'
17
+ @import 'components/relative'
@@ -0,0 +1,53 @@
1
+ %button
2
+ +padding($button-padding)
3
+ border-radius: $button-border-radius
4
+ cursor: pointer
5
+ font-weight: $button-font-weight
6
+ transition: $main-transition
7
+
8
+ @mixin button-solid($background, $color)
9
+ @if $button-box-shadow != 0
10
+ box-shadow: $button-box-shadow darken($background, 10%)
11
+ +background-color-darken($background, 10%)
12
+ border: 0
13
+ color: $color
14
+
15
+ @mixin button-transparent($background)
16
+ @if $button-box-shadow != 0
17
+ box-shadow: $button-box-shadow darken($background, 10%)
18
+ border: 1px solid $background
19
+ color: $background
20
+
21
+ &:hover
22
+ background-color: lighten($background, 40%)
23
+
24
+
25
+ .button
26
+
27
+ &__solid
28
+
29
+ &--primary
30
+ @extend %button
31
+ +button-solid($button-primary-background, $button-primary-color)
32
+
33
+ &--secondary
34
+ @extend %button
35
+ +button-solid($button-secondary-background, $button-secondary-color)
36
+
37
+ &--danger
38
+ @extend %button
39
+ +button-solid($button-danger-background, $button-danger-color)
40
+
41
+ &__transparent
42
+
43
+ &--primary
44
+ @extend %button
45
+ +button-transparent($button-primary-background)
46
+
47
+ &--secondary
48
+ @extend %button
49
+ +button-transparent($button-secondary-background)
50
+
51
+ &--danger
52
+ @extend %button
53
+ +button-transparent($button-danger-background)
@@ -0,0 +1,11 @@
1
+ %card
2
+ background: $white
3
+ border-radius: $card-border-radius
4
+ box-shadow: $card-box-shadow
5
+
6
+ .card
7
+
8
+ &--padding
9
+ @extend %card
10
+ +padding($card-padding)
11
+ box-sizing: border-box
@@ -0,0 +1,32 @@
1
+ %form__actions
2
+ align-items: center
3
+ display: flex
4
+
5
+ .form
6
+
7
+ &__row,
8
+ &__actions
9
+ width: 100%
10
+
11
+ &:not(:last-child)
12
+ margin-bottom: 30px
13
+
14
+ &__actions
15
+
16
+ &--spaced
17
+ @extend %form__actions
18
+ justify-content: space-between
19
+
20
+ &--left
21
+ @extend %form__actions
22
+ justify-content: flex-start
23
+
24
+ *:not(:last-child)
25
+ margin-right: 30px
26
+
27
+ &--right
28
+ @extend %form__actions
29
+ justify-content: flex-end
30
+
31
+ *:not(:first-child)
32
+ margin-left: 30px
@@ -0,0 +1,25 @@
1
+ #{$all-text-inputs}
2
+ background-color: $white
3
+ border: 1px solid $input-border-color
4
+ border-radius: 3px
5
+ box-sizing: border-box
6
+ line-height: 1
7
+ outline: none
8
+ padding: 6px 8px
9
+ width: 100%
10
+
11
+ #{$all-text-inputs-focus}
12
+ border-color: $input-border-color-focus
13
+
14
+ .input
15
+
16
+ &__label
17
+ color: $label-color
18
+ display: block
19
+ font-size: 13px
20
+ font-weight: bold
21
+
22
+ &__hint
23
+ color: $hint-color
24
+ font-size: 13px
25
+ margin-top: 1px
@@ -0,0 +1,10 @@
1
+ .link
2
+
3
+ &--primary
4
+ +color-darken($link-primary-color, 10%)
5
+
6
+ &--secondary
7
+ +color-darken($link-secondary-color, 10%)
8
+
9
+ &--danger
10
+ +color-darken($link-danger-color, 10%)
@@ -0,0 +1,15 @@
1
+ %body
2
+ background-color: $main-background
3
+
4
+ .body--public
5
+ @extend %body
6
+
7
+ .main-wrapper
8
+ +margin(32px auto)
9
+ max-width: 531px
10
+ width: 94%
11
+
12
+ .logo
13
+ +margin($logo-margin-top-public auto 34px)
14
+ display: block
15
+ width: $logo-width-public
@@ -0,0 +1,2 @@
1
+ .relative
2
+ position: relative
@@ -0,0 +1 @@
1
+ $neat-grid: ( columns: 12, gutter: $card-margin)
@@ -0,0 +1,43 @@
1
+ // sass-lint:disable single-line-per-selector, force-pseudo-nesting
2
+
3
+ html, body, div, span, applet, object, iframe,
4
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
5
+ a, abbr, acronym, address, big, cite, code,
6
+ del, dfn, em, img, ins, kbd, q, s, samp,
7
+ small, strike, strong, sub, sup, tt, var,
8
+ b, u, i, center,
9
+ dl, dt, dd, ol, ul, li,
10
+ fieldset, form, label, legend,
11
+ table, caption, tbody, tfoot, thead, tr, th, td,
12
+ article, aside, canvas, details, embed,
13
+ figure, figcaption, footer, header, hgroup,
14
+ menu, nav, output, ruby, section, summary,
15
+ time, mark, audio, video
16
+ border: 0
17
+ font: inherit
18
+ margin: 0
19
+ padding: 0
20
+ vertical-align: baseline
21
+
22
+ article, aside, details, figcaption, figure,
23
+ footer, header, hgroup, menu, nav, section
24
+ display: block
25
+
26
+ body
27
+ line-height: 1
28
+
29
+ ol, ul
30
+ list-style: none
31
+
32
+ blockquote, q
33
+ quotes: none
34
+
35
+ blockquote::before, blockquote::after,
36
+ q::before, q::after
37
+ content: none
38
+
39
+ table
40
+ border-collapse: collapse
41
+ border-spacing: 0
42
+
43
+ // sass-lint:enable single-line-per-selector, force-pseudo-nesting
@@ -0,0 +1,48 @@
1
+ // sass-lint:disable single-line-per-selector, no-vendor-prefixes
2
+
3
+ html
4
+ font-size: 62.5%
5
+
6
+ body, #{$all-text-inputs}, #{$all-buttons}, select
7
+ -moz-osx-font-smoothing: grayscale
8
+ -webkit-font-smoothing: antialiased
9
+ font-family: unquote($main-font-family)
10
+ font-size: $main-font-size
11
+ font-weight: normal
12
+
13
+ body, #{$all-text-inputs}, select
14
+ color: $main-color
15
+ line-height: $main-line-height
16
+
17
+ h1, h2, h3, h4, h5, h6
18
+ color: $headline-color
19
+ font-weight: bold
20
+ line-height: $headline-line-height
21
+
22
+ h1
23
+ font-size: 5.6rem
24
+
25
+ h2
26
+ font-size: 4rem
27
+
28
+ h3
29
+ font-size: 3.2rem
30
+
31
+ h4
32
+ font-size: 2.4rem
33
+
34
+ h5
35
+ font-size: 1.6rem
36
+
37
+ p
38
+ font-size: 1.6rem
39
+
40
+ a
41
+ color: $main-color
42
+ outline: none
43
+ text-decoration: none
44
+
45
+ strong
46
+ font-weight: bold
47
+
48
+ // sass-lint:enable single-line-per-selector, no-vendor-prefixes
@@ -0,0 +1,73 @@
1
+ // Colors
2
+
3
+ $white: rgb(255, 255, 255) !global
4
+ $black: rgb(0, 0, 0) !global
5
+
6
+ $palette-primary: rgb(78, 183, 168) !default
7
+ $palette-secondary: rgb(28, 53, 69) !default
8
+ $palette-cancel: rgb(153, 153, 153) !default
9
+ $palette-danger: rgb(218, 60, 60) !default
10
+
11
+ // General styles
12
+
13
+ $main-background: rgb(233, 232, 220) !default
14
+ $main-transition: .125s ease-in !global
15
+
16
+ // Typography
17
+
18
+ $main-font-family: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif' !global
19
+ $main-color: rgb(62, 62, 62) !default
20
+ $main-line-height: 1.5 !global
21
+ $main-font-size: 14px !global
22
+
23
+ // Headlines
24
+
25
+ $headline-color: rgb(122, 118, 76) !default
26
+ $headline-line-height: 1 !global
27
+
28
+ // Links
29
+
30
+ $link-primary-color: darken($palette-primary, 10%) !default
31
+ $link-secondary-color: darken($palette-cancel, 10%) !default
32
+ $link-danger-color: darken($palette-danger, 10%) !default
33
+
34
+ // Buttons
35
+
36
+ $button-primary-background: $palette-primary !default
37
+ $button-primary-color: $white !default
38
+
39
+ $button-secondary-background: $palette-cancel !default
40
+ $button-secondary-color: $white !default
41
+
42
+ $button-danger-background: $palette-danger !default
43
+ $button-danger-color: $white !default
44
+
45
+ $button-border-radius: 3px !default
46
+ $button-box-shadow: 0 2px 0 !default
47
+ $button-font-weight: 700 !global
48
+ $button-padding: 6px 12px !global
49
+
50
+ // Cards
51
+
52
+ $card-border-radius: 3px !default
53
+ $card-box-shadow: 0 2px 7px rgba($black, .2) !default
54
+ $card-padding: 40px !global
55
+ $card-margin: 30px !global
56
+
57
+ // Labels
58
+
59
+ $label-color: rgb(128, 128, 128) !default
60
+
61
+ // Text inputs
62
+
63
+ $input-border-color: rgb(217, 216, 195) !default
64
+ $input-border-color-focus: $palette-primary !default
65
+
66
+ // Hints
67
+
68
+ $hint-color: rgb(158, 158, 158) !default
69
+
70
+ // Logo
71
+
72
+ $logo-width-public: 238px !default
73
+ $logo-margin-top-public: 0 !default
@@ -0,0 +1,19 @@
1
+ @mixin background-color-darken($color, $percent)
2
+ background-color: $color
3
+ transition: $main-transition
4
+
5
+ &:hover
6
+ background-color: darken($color, $percent)
7
+ transition: $main-transition
8
+
9
+ @mixin color-darken($color, $percent)
10
+ color: $color
11
+ transition: $main-transition
12
+
13
+ &:hover
14
+ color: darken($color, $percent)
15
+ transition: $main-transition
16
+
17
+ @mixin background-color-lighten($color, $percent)
18
+ background-color: lighten($color, $percent)
19
+ transition: $main-transition
@@ -0,0 +1,30 @@
1
+ class BeyondFormBuilder < ActionView::Helpers::FormBuilder
2
+ def field_wrapper(attribute, args, &block)
3
+ label = args[:label].present? ? args[:label] : attribute.to_s.humanize
4
+ @template.content_tag(:div, class: 'form__row') do
5
+ @template.content_tag(:label, label, class: 'input__label') +
6
+ @template.content_tag(:div, class: 'relative') do
7
+ block.call
8
+ end +
9
+ (@template.content_tag(:div, args[:hint], class: 'input__hint') if args[:hint].present?)
10
+ end
11
+ end
12
+
13
+ def email_field(attribute, args = {})
14
+ field_wrapper(attribute, args) do
15
+ super(attribute, args)
16
+ end
17
+ end
18
+
19
+ def text_field(attribute, args = {})
20
+ field_wrapper(attribute, args) do
21
+ super(attribute, args)
22
+ end
23
+ end
24
+
25
+ def password_field(attribute, args = {})
26
+ field_wrapper(attribute, args) do
27
+ super(attribute, args)
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,18 @@
1
+ doctype html
2
+
3
+ html
4
+ head
5
+ = csrf_meta_tags
6
+ meta content='width=device-width, initial-scale=1.0' name='viewport' /
7
+ = render 'beyond_canvas/custom/public_head'
8
+
9
+ body.body--public
10
+ main.main class=("#{params[:controller].gsub(/[\/_]/, "-")}--#{params[:action]}")
11
+ .main-wrapper
12
+ - logo = Dir["app/assets/images/logo.*"].first
13
+ - unless logo.nil?
14
+ - if File.extname(logo) == '.svg'
15
+ = inline_svg File.basename(logo), class: 'logo'
16
+ - else
17
+ = image_tag File.basename(logo), class: 'logo'
18
+ = yield
@@ -0,0 +1,25 @@
1
+ lib = File.expand_path("../lib", __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require "beyond_canvas/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "beyond_canvas"
7
+ spec.version = BeyondCanvas::VERSION
8
+ spec.authors = ["Unai Abrisketa"]
9
+ spec.email = ["u.abrisketa@epages.com"]
10
+
11
+ spec.summary = "Open-source framework that provides CSS styles"
12
+ spec.description = <<-DESC
13
+ Beyond Canvas is an open-source framework that provides CSS styles for apps
14
+ designed and developed for the online shop software Beyond
15
+ DESC
16
+ spec.homepage = "https://github.com/ePages-de/beyond_canvas"
17
+ spec.license = "MIT"
18
+
19
+ spec.files = `git ls-files`.split("\n")
20
+
21
+ spec.add_dependency "bourbon", "~> 5.1"
22
+ spec.add_dependency "neat", "~> 3.0"
23
+ spec.add_dependency "slim-rails", "~> 3.2"
24
+ spec.add_dependency "inline_svg", "~> 1.5"
25
+ end
@@ -0,0 +1,3 @@
1
+ module BeyondCanvas
2
+ VERSION = "0.1.0.pre"
3
+ end
@@ -0,0 +1,5 @@
1
+ require "beyond_canvas/version"
2
+
3
+ module BeyondCanvas
4
+ class Engine < ::Rails::Engine; end
5
+ end
metadata ADDED
@@ -0,0 +1,123 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: beyond_canvas
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0.pre
5
+ platform: ruby
6
+ authors:
7
+ - Unai Abrisketa
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-07-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bourbon
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '5.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '5.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: neat
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: slim-rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.2'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: inline_svg
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.5'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.5'
69
+ description: |2
70
+ Beyond Canvas is an open-source framework that provides CSS styles for apps
71
+ designed and developed for the online shop software Beyond
72
+ email:
73
+ - u.abrisketa@epages.com
74
+ executables: []
75
+ extensions: []
76
+ extra_rdoc_files: []
77
+ files:
78
+ - ".gitignore"
79
+ - LICENSE.txt
80
+ - README.md
81
+ - app/assets/stylesheets/_beyond_canvas.sass
82
+ - app/assets/stylesheets/components/_buttons.sass
83
+ - app/assets/stylesheets/components/_cards.sass
84
+ - app/assets/stylesheets/components/_forms.sass
85
+ - app/assets/stylesheets/components/_inputs.sass
86
+ - app/assets/stylesheets/components/_links.sass
87
+ - app/assets/stylesheets/components/_main.sass
88
+ - app/assets/stylesheets/components/_relative.sass
89
+ - app/assets/stylesheets/settings/_neat.sass
90
+ - app/assets/stylesheets/settings/_reset_css.sass
91
+ - app/assets/stylesheets/settings/_typography.sass
92
+ - app/assets/stylesheets/settings/_variables.sass
93
+ - app/assets/stylesheets/utilities/_mixins.sass
94
+ - app/form_builders/beyond_form_builder.rb
95
+ - app/views/beyond_canvas/custom/_public_head.html.slim
96
+ - app/views/layouts/beyond_canvas/public.html.slim
97
+ - beyond_canvas.gemspec
98
+ - lib/beyond_canvas.rb
99
+ - lib/beyond_canvas/version.rb
100
+ homepage: https://github.com/ePages-de/beyond_canvas
101
+ licenses:
102
+ - MIT
103
+ metadata: {}
104
+ post_install_message:
105
+ rdoc_options: []
106
+ require_paths:
107
+ - lib
108
+ required_ruby_version: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: '0'
113
+ required_rubygems_version: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">"
116
+ - !ruby/object:Gem::Version
117
+ version: 1.3.1
118
+ requirements: []
119
+ rubygems_version: 3.0.2
120
+ signing_key:
121
+ specification_version: 4
122
+ summary: Open-source framework that provides CSS styles
123
+ test_files: []