shipyard-framework 0.5.87 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/assets/javascripts/{shipyard.es6 → shipyard.js} +0 -0
  3. data/assets/javascripts/shipyard/{accordion-trigger.es6 → accordion-trigger.js} +0 -0
  4. data/assets/javascripts/shipyard/{accordion.es6 → accordion.js} +0 -0
  5. data/assets/javascripts/shipyard/{alert-timer.es6 → alert-timer.js} +0 -0
  6. data/assets/javascripts/shipyard/{alert.es6 → alert.js} +0 -0
  7. data/assets/javascripts/shipyard/{core.es6 → core.js} +0 -0
  8. data/assets/javascripts/shipyard/{hamburger.es6 → hamburger.js} +0 -0
  9. data/assets/javascripts/shipyard/{modal-trigger.es6 → modal-trigger.js} +0 -0
  10. data/assets/javascripts/shipyard/{modal.es6 → modal.js} +0 -0
  11. data/assets/javascripts/shipyard/{scroll.es6 → scroll.js} +0 -0
  12. data/assets/stylesheets/shipyard/_functions.sass +1 -0
  13. data/assets/stylesheets/shipyard/components/_tooltips.sass +140 -40
  14. data/assets/stylesheets/shipyard/core/_reset.sass +5 -1
  15. data/assets/stylesheets/shipyard/functions/_opposite-direction.sass +9 -0
  16. data/assets/stylesheets/shipyard/utilities/_typography.sass +2 -1
  17. data/lib/shipyard-framework/version.rb +1 -1
  18. metadata +19 -114
  19. data/.gitignore +0 -13
  20. data/.rspec +0 -3
  21. data/.ruby-version +0 -1
  22. data/.travis.yml +0 -40
  23. data/Brewfile +0 -4
  24. data/CODE_OF_CONDUCT.md +0 -74
  25. data/Gemfile +0 -3
  26. data/LICENSE.txt +0 -21
  27. data/README.md +0 -46
  28. data/Rakefile +0 -16
  29. data/ci/build.rb +0 -5
  30. data/ci/deploy +0 -31
  31. data/ci/jekyll +0 -16
  32. data/ci/percy +0 -16
  33. data/ci/sass_lint +0 -47
  34. data/ci/setup +0 -6
  35. data/shipyard.gemspec +0 -28
  36. data/spec/helpers/alert_helper_spec.rb +0 -27
  37. data/spec/helpers/box_helper_spec.rb +0 -27
  38. data/spec/helpers/button_helper_spec.rb +0 -37
  39. data/spec/helpers/form_helper_spec.rb +0 -29
  40. data/spec/helpers/icon_helper_spec.rb +0 -21
  41. data/spec/helpers/note_helper_spec.rb +0 -19
  42. data/spec/shipyard_spec.rb +0 -7
  43. data/spec/spec_helper.rb +0 -104
  44. data/styleguide/.gitignore +0 -3
  45. data/styleguide/.nojekyll +0 -0
  46. data/styleguide/.ruby-version +0 -1
  47. data/styleguide/Gemfile +0 -9
  48. data/styleguide/Gemfile.lock +0 -125
  49. data/styleguide/_assets/css/application.sass +0 -3
  50. data/styleguide/_assets/css/fonts.sass +0 -2
  51. data/styleguide/_assets/css/layout.sass +0 -10
  52. data/styleguide/_assets/css/syntax.css +0 -209
  53. data/styleguide/_assets/css/vendor.sass +0 -4
  54. data/styleguide/_assets/css/views.sass +0 -103
  55. data/styleguide/_assets/img/arrows/down.svg +0 -3
  56. data/styleguide/_assets/img/checkmark.svg +0 -3
  57. data/styleguide/_assets/js/application.es6 +0 -6
  58. data/styleguide/_assets/js/views/components/alert-trigger.es6 +0 -20
  59. data/styleguide/_assets/js/views/utilities/colors.es6 +0 -14
  60. data/styleguide/_config.yml +0 -67
  61. data/styleguide/_data/breakpoints.yml +0 -15
  62. data/styleguide/_includes/css-stats.html +0 -14
  63. data/styleguide/_includes/page-heading.html +0 -4
  64. data/styleguide/_layouts/application.html +0 -45
  65. data/styleguide/_plugins/color_css_class.rb +0 -13
  66. data/styleguide/_plugins/component_css_class.rb +0 -9
  67. data/styleguide/_plugins/css_declarations.rb +0 -16
  68. data/styleguide/_plugins/css_selectors.rb +0 -16
  69. data/styleguide/_plugins/css_size.rb +0 -20
  70. data/styleguide/_plugins/human_size_filter.rb +0 -12
  71. data/styleguide/_plugins/icon_item.rb +0 -28
  72. data/styleguide/_plugins/opacity_css_class.rb +0 -12
  73. data/styleguide/_plugins/sass_generator.rb +0 -55
  74. data/styleguide/_plugins/sass_output.rb +0 -24
  75. data/styleguide/components/alerts.md +0 -107
  76. data/styleguide/components/boxes.md +0 -97
  77. data/styleguide/components/buttons.md +0 -192
  78. data/styleguide/components/checkboxes.md +0 -281
  79. data/styleguide/components/code.html +0 -49
  80. data/styleguide/components/empty-states.html +0 -12
  81. data/styleguide/components/forms.md +0 -151
  82. data/styleguide/components/horizontal-rules.md +0 -82
  83. data/styleguide/components/icons.md +0 -129
  84. data/styleguide/components/index.md +0 -18
  85. data/styleguide/components/modals/_modal.html +0 -100
  86. data/styleguide/components/modals/example-billing.html +0 -80
  87. data/styleguide/components/modals/example-downgrade.html +0 -33
  88. data/styleguide/components/modals/example-small.html +0 -19
  89. data/styleguide/components/modals/example-survey.html +0 -52
  90. data/styleguide/components/modals/example-tall.html +0 -6
  91. data/styleguide/components/modals/index.md +0 -41
  92. data/styleguide/components/notes.md +0 -67
  93. data/styleguide/components/radio-buttons.md +0 -195
  94. data/styleguide/components/statuses.md +0 -324
  95. data/styleguide/components/tables.md +0 -34
  96. data/styleguide/components/tooltips.md +0 -16
  97. data/styleguide/index.md +0 -27
  98. data/styleguide/stats.md +0 -49
  99. data/styleguide/utilities/accordion.md +0 -55
  100. data/styleguide/utilities/border-radius.md +0 -104
  101. data/styleguide/utilities/colors.md +0 -45
  102. data/styleguide/utilities/grid.md +0 -256
  103. data/styleguide/utilities/index.md +0 -19
  104. data/styleguide/utilities/margin-padding.md +0 -124
  105. data/styleguide/utilities/opacity.md +0 -28
  106. data/styleguide/utilities/position.md +0 -24
  107. data/styleguide/utilities/responsive.md +0 -20
  108. data/styleguide/utilities/typography.md +0 -74
@@ -1,4 +0,0 @@
1
- $font-family: "museo-sans-rounded", "Museo Sans Rounded", Arial, sans-serif
2
- $font-monospace: 'Roboto Mono', monospace
3
- @import shipyard
4
- @import shipyard/components/header
@@ -1,103 +0,0 @@
1
- // Code "Span"
2
- code.highlighter-rouge
3
- @extend .code-inline
4
- margin: 0 3px
5
-
6
- // Code "Block"
7
- .code-block
8
- margin: 15px 0
9
-
10
- hr
11
- @extend .hr
12
- +respond-to(margin, (x0: 30px 0, x1: 40px 0, x2: 50px 0))
13
-
14
- // Shared
15
- .section-description
16
- @extend .text-light
17
- @extend .mb-20
18
-
19
- // Utilities: Colors
20
- +component('shade')
21
- &-list
22
- +respond-to(margin-left, (x0: -5px, x1: -10px))
23
- +respond-to(margin-right, (x0: -5px, x1: -10px))
24
- &-item
25
- text-align: center
26
- &-box
27
- height: 165px
28
- padding: 5px
29
- white-space: nowrap
30
- &:hover
31
- cursor: default
32
- &:not(:hover)
33
- background: #fff !important
34
- &.bg-white
35
- background: $gray-darkest !important
36
- &-color
37
- height: 120px
38
- border-radius: 2px 2px 0 0
39
- color: transparent
40
- transition: 300ms color ease
41
- +when('box:hover')
42
- color: #fff
43
- +when('light:hover, white:hover')
44
- color: $gray-darker
45
- &-text
46
- line-height: 40px
47
- transition: 300ms color ease
48
- +when('box:hover')
49
- color: rgba(#fff,.7)
50
- +when('light:hover')
51
- color: rgba($gray-darker,.6)
52
-
53
- +component('utilities-margin-padding')
54
- &-box
55
- line-height: 40px
56
-
57
- +component('utilities-grid')
58
- &-box
59
- width: 100%
60
- flex-grow: 1
61
- min-height: 30px
62
-
63
- +component('utilities-typography')
64
- &-hr
65
- margin: 0 30px
66
- &-box
67
- &,
68
- &-dark,
69
- &-light,
70
- &-default
71
- padding: 30px 0
72
- margin: 15px 0
73
- &-dark
74
- background: $gray-lighter
75
- &-light
76
- background: #fff
77
- &-default
78
- border: 2px solid $border-color-light
79
-
80
- +component('modal-billing')
81
- &-yearly-promo
82
- text-transform: uppercase
83
-
84
- +component('modal-downgrade')
85
- &-coupon
86
- padding: 0
87
- margin: 0 4px !important
88
- white-space: normal
89
- &-txt
90
- padding: 0 8px
91
- font-family: $font-family
92
- &-tag
93
- padding: 5px
94
- display: inline-block
95
- border-radius: 3px 0 0 3px
96
-
97
- +component('components-checkboxes')
98
- &-switch-col
99
- line-height: 1.2
100
-
101
- +component('css-stat')
102
- &-item
103
- line-height: 1.3
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6">
2
- <path d="M5,6a1,1,0,0,1-.71-.29l-4-4A1,1,0,0,1,1.71.29L5,3.59,8.29.29A1,1,0,0,1,9.71,1.71l-4,4A1,1,0,0,1,5,6Z"/>
3
- </svg>
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8">
2
- <polyline vector-effect="non-scaling-stroke" fill="none" stroke="#000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" points="1 4.25 3.25 7 7 1.5" />
3
- </svg>
@@ -1,6 +0,0 @@
1
- //= require shipyard
2
- //= require views/components/alert-trigger
3
- //= require views/utilities/colors
4
-
5
- shipyard.alertTriggers = new Shipyard('[alert-trigger]', AlertTrigger)
6
- shipyard.colors = new Shipyard('[shade-color]', ShadeColor)
@@ -1,20 +0,0 @@
1
- class AlertTrigger extends Shipyard {
2
- constructor (el) {
3
- super(el)
4
- this.alert = shipyard.alerts.filter(this.attr('alert-trigger'))
5
- this.on('click', (e) => { this.click(e) })
6
- }
7
-
8
- click (e) {
9
- e.preventDefault()
10
- this.addClass('btn-loading')
11
- this.el.blur()
12
- this.alert.trigger('show', {
13
- afterClose: () => { this.reset() }
14
- })
15
- }
16
-
17
- reset () {
18
- this.removeClass('btn-loading')
19
- }
20
- }
@@ -1,14 +0,0 @@
1
- class ShadeColor extends Shipyard {
2
- constructor (el) {
3
- super(el)
4
- this.html(this.rgbToHex(this.css('background-color')))
5
- }
6
-
7
- rgbToHex (rgb) {
8
- if (rgb.match(/rgba/)) return '#';
9
- let hex = rgb.substr(4, rgb.indexOf(')') - 4).split(',').map(
10
- (color) => String('0' + parseInt(color).toString(16)).slice(-2)
11
- ).join('');
12
- return `#${hex}`;
13
- }
14
- }
@@ -1,67 +0,0 @@
1
- # Welcome to Jekyll!
2
- #
3
- # This config file is meant for settings that affect your whole blog, values
4
- # which you are expected to set up once and rarely edit after that. If you find
5
- # yourself editing this file very often, consider using Jekyll's data files
6
- # feature for the data you need to update frequently.
7
- #
8
- # For technical reasons, this file is *NOT* reloaded automatically when you use
9
- # 'bundle exec jekyll serve'. If you change this file, please restart the server process.
10
-
11
- # Site settings
12
- # These are used to personalize your new site. If you look in the HTML files,
13
- # you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
14
- # You can create any custom variable you would like, and they will be accessible
15
- # in the templates via {{ site.myvariable }}.
16
- title: Shipyard
17
- description: A sweet front-end framework for Ruby on Rails and Jekyll.
18
- baseurl: /shipyard # the subpath of your site, e.g. /blog
19
- url: "" # the base hostname & protocol for your site, e.g. http://example.com
20
- # source: ./app
21
- # destination: ./tmp
22
- # plugins_dir: ./app/_plugins
23
- # layouts_dir: ./app/_layouts
24
- # includes_dir: ./app/_includes
25
- sass:
26
- style: compressed
27
-
28
- # Build settings
29
- markdown: kramdown
30
- kramdown:
31
- syntax_highlighter: rouge
32
- syntax_highlighter_opts:
33
- default_lang: html
34
- block:
35
- css: class
36
- wrap: true
37
- disable: false
38
- css_class: 'code-block'
39
- span:
40
- css: class
41
- wrap: true
42
- disable: false
43
- css_class: 'code-inline'
44
- plugins:
45
- - jekyll-assets
46
- - shipyard-framework
47
-
48
- assets:
49
- autowrite: true
50
- assets:
51
- - "*.svg"
52
- sources:
53
- - _assets/js
54
- - _assets/css
55
- - _assets/img
56
-
57
- defaults:
58
- -
59
- scope:
60
- path: "" # an empty string here means all files in the project
61
- values:
62
- layout: "application"
63
-
64
- # Exclude from processing.
65
- exclude:
66
- - Gemfile
67
- - Gemfile.lock
@@ -1,15 +0,0 @@
1
- -
2
- modifier: null
3
- label: All Screens
4
- -
5
- modifier: x1
6
- label: Tablets
7
- -
8
- modifier: x2
9
- label: Laptops
10
- -
11
- modifier: x3
12
- label: Large Screens
13
- -
14
- modifier: x4
15
- label: Giant Monitors
@@ -1,14 +0,0 @@
1
- <ul class="col-container">
2
- <li class="css-stat-item col col-10">
3
- <span class="text-sm medium text-lighter display-block">Gzipped Size</span>
4
- <span class="text-xxxl strong text-darker">{% css_size %}</span>
5
- </li>
6
- <li class="css-stat-item col col-10">
7
- <span class="text-sm medium text-lighter display-block">Declarations</span>
8
- <span class="text-xxxl strong text-darker">{% css_declarations %}</span>
9
- </li>
10
- <li class="css-stat-item col col-10">
11
- <span class="text-sm medium text-lighter display-block">Selectors</span>
12
- <span class="text-xxxl strong text-darker">{% css_selectors %}</span>
13
- </li>
14
- </ul>
@@ -1,4 +0,0 @@
1
- <h1>{{ page.title }}</h1>
2
- {% if page.description %}
3
- <p class="text-light text-lg mt-15" markdown="1">{{ page.description }}</p>
4
- {% endif %}
@@ -1,45 +0,0 @@
1
- ---
2
- navigation:
3
- - name: Home
4
- url: /
5
- - name: Components
6
- url: /components/
7
- - name: Utilities
8
- url: /utilities/
9
- ---
10
- <html lang="en" class="{% shipyard_css_classes %}">
11
- <head>
12
- <meta charset="utf-8" />
13
- <title>{{ page.title }}</title>
14
- <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
15
- <meta name="theme-color" content="#20a5a8" />
16
- {% css fonts media:screen rel:preload async %}
17
- {% css syntax media:screen rel:preload async %}
18
- {% css application media:screen %}
19
- </head>
20
- <body>
21
- <header class="header">
22
- <div class="container">
23
- <h6 class="header-logo"><a href="{{ site.baseurl }}/">{{ site.title }}</a></h6>
24
- <button class="hamburger" shipyard="hamburger">
25
- <span class="hamburger-button">Menu</span>
26
- </button>
27
- <ul class="header-list">
28
- {% for link in layout.navigation %}
29
- <li class="header-item {% if page.url == link.url %}header-item-current{% endif %}">
30
- <a href="{{ site.baseurl | append: link.url }}" class="header-link">{{ link.name }}</a>
31
- </li>
32
- {% endfor %}
33
- <li class="header-item header-item-cta">
34
- <a href="https://github.com/codeship/shipyard" target="_blank" class="header-link-cta" rel="noopener">Download</a>
35
- </li>
36
- </ul>
37
- </div>
38
- </header>
39
- <div class="container">{{ content }}</div>
40
- <footer class="align-center text-lightest">
41
- &copy; Shipyard Framework 2017
42
- </footer>
43
- {% js application %}
44
- </body>
45
- </html>
@@ -1,13 +0,0 @@
1
- module Jekyll
2
- module ColorCssClassFilter
3
- def color_css_class(color, shade=nil)
4
- if shade
5
- "#{color}-#{shade}".downcase.chomp '-base'
6
- else
7
- "#{color}".downcase
8
- end
9
- end
10
- end
11
- end
12
-
13
- Liquid::Template.register_filter(Jekyll::ColorCssClassFilter)
@@ -1,9 +0,0 @@
1
- module Jekyll
2
- module ComponentCssClassFilter
3
- def component_css_class(element, breakpoint, modifier=nil)
4
- [element, breakpoint, modifier].reject(&:blank?).join('-')
5
- end
6
- end
7
- end
8
-
9
- Liquid::Template.register_filter(Jekyll::ComponentCssClassFilter)
@@ -1,16 +0,0 @@
1
- module Jekyll
2
- class CssDeclarations < Liquid::Tag
3
- def initialize(tag_name, args, options)
4
- super
5
- end
6
-
7
- def render(context)
8
- sass = context['site']['sass_output'].detect { |s|
9
- s['file'].include? context['page']['sass_file']
10
- }
11
- sass['declarations']
12
- end
13
- end
14
- end
15
-
16
- Liquid::Template.register_tag('css_declarations', Jekyll::CssDeclarations)
@@ -1,16 +0,0 @@
1
- module Jekyll
2
- class CssSelectors < Liquid::Tag
3
- def initialize(tag_name, args, options)
4
- super
5
- end
6
-
7
- def render(context)
8
- sass = context['site']['sass_output'].detect { |s|
9
- s['file'].include? context['page']['sass_file']
10
- }
11
- sass['selectors']
12
- end
13
- end
14
- end
15
-
16
- Liquid::Template.register_tag('css_selectors', Jekyll::CssSelectors)
@@ -1,20 +0,0 @@
1
- module Jekyll
2
- class CssSize < Liquid::Tag
3
- def initialize(tag_name, args, options)
4
- super
5
- end
6
-
7
- def render(context)
8
- sass = context['site']['sass_output'].detect { |s|
9
- s['file'].include? context['page']['sass_file']
10
- }
11
- size = sass['gzip_size']
12
- case
13
- when size >= 1000 then %(#{(size / 1000.0).round(1)} <span class="text-lightest">kb</span>)
14
- else %(#{size} <span class="text-lightest">B</span>)
15
- end
16
- end
17
- end
18
- end
19
-
20
- Liquid::Template.register_tag('css_size', Jekyll::CssSize)
@@ -1,12 +0,0 @@
1
- module Jekyll
2
- module HumanSizeFilter
3
- def number_to_human_size(num, css='text-lightest')
4
- case
5
- when num >= 1000 then %(#{(num / 1000.0).round(1)} <span class="#{css}">kb</span>)
6
- else %(#{num} <span class="#{css}">B</span>)
7
- end
8
- end
9
- end
10
- end
11
-
12
- Liquid::Template.register_filter(Jekyll::HumanSizeFilter)
@@ -1,28 +0,0 @@
1
- require 'shipyard-framework/helpers/icon_helper'
2
-
3
- module Jekyll
4
- class IconItem < Liquid::Tag
5
- include Shipyard::IconHelper
6
-
7
- def initialize(tag_name, args, options)
8
- super
9
- args = args.strip.split(',')
10
- @name = eval(args[0])
11
- @tooltip = args[0]
12
- @options = args[1] ? eval("{#{args[1]}}") : {}
13
- @css = 'bg-gray' if @name == 'bitbucket-white'
14
- end
15
-
16
- def render(context)
17
- %(
18
- <li class="col col-50 col-x1-20 mb-10 mb-x1-20 mb-x2-30" tooltip="#{@tooltip}">
19
- <div class="box box-md box-x1-xxl #{@css}">
20
- #{icon @name, @options}
21
- </div>
22
- </li>
23
- )
24
- end
25
- end
26
- end
27
-
28
- Liquid::Template.register_tag('iconitem', Jekyll::IconItem)
@@ -1,12 +0,0 @@
1
- module Jekyll
2
- module OpacityCssClassFilter
3
- def opacity_css_class(value, decimal='')
4
- css = ''
5
- css += decimal if value > 0
6
- css += value == 5 ? "0#{value}" : "#{value}"
7
- css
8
- end
9
- end
10
- end
11
-
12
- Liquid::Template.register_filter(Jekyll::OpacityCssClassFilter)