shipyard-framework 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/shipyard/box_helper.rb +22 -0
- data/app/helpers/shipyard/note_helper.rb +20 -0
- data/assets/stylesheets/shipyard/_components.sass +1 -0
- data/assets/stylesheets/shipyard/components/_alerts.sass +2 -2
- data/assets/stylesheets/shipyard/components/_buttons.sass +15 -4
- data/assets/stylesheets/shipyard/components/_code.sass +21 -2
- data/assets/stylesheets/shipyard/components/_forms.sass +4 -4
- data/assets/stylesheets/shipyard/components/_notes.sass +30 -0
- data/assets/stylesheets/shipyard/components/_tooltips.sass +3 -3
- data/assets/stylesheets/shipyard/core/_typography.sass +1 -1
- data/assets/stylesheets/shipyard/mixins/_components.sass +9 -1
- data/assets/stylesheets/shipyard/variables/_color_utilities.sass +6 -0
- data/assets/stylesheets/shipyard/variables/_colors.scss +15 -12
- data/assets/stylesheets/shipyard/variables/_components.scss +16 -0
- data/assets/stylesheets/shipyard/variables/_typography.sass +4 -4
- data/lib/shipyard-framework/jekyll/box_tag.rb +21 -0
- data/lib/shipyard-framework/jekyll/note_tag.rb +18 -0
- data/lib/shipyard-framework/version.rb +1 -1
- data/lib/shipyard-framework.rb +4 -0
- data/styleguide/Gemfile.lock +1 -1
- data/styleguide/_sass/views.sass +3 -3
- data/styleguide/components/alerts.md +2 -2
- data/styleguide/components/boxes.md +54 -0
- data/styleguide/components/index.html +3 -1
- data/styleguide/components/notes.md +50 -0
- metadata +9 -3
- data/styleguide/components/boxes.html +0 -37
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 012416749336816965f8232bd66ce83714e27efd
|
4
|
+
data.tar.gz: 75d164a2deb0985740166e01efa83851a7f4409c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95a4fa016cd9f1bbd0be6a71399286e3ff456e4c73112f5acc3b37b3fbc9a1dcaa19a215b6139420815672df2edb43d3e751f7f580db7c23c953c207774260df
|
7
|
+
data.tar.gz: e4df0db55dca161de2a38dd16fcfad5cd50d1b338e65cfe3f6d0d80281af2831c121ab5778a168f311b46c58c43b680e83489bc38c834e26f4ac2cd9b7e3711e
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Shipyard
|
2
|
+
module BoxHelper
|
3
|
+
include ActionView::Context
|
4
|
+
include ActionView::Helpers::TagHelper
|
5
|
+
include ActionView::Helpers::TextHelper
|
6
|
+
|
7
|
+
def box(types, content)
|
8
|
+
# Gather the appropriate box classes into an array.
|
9
|
+
class_list = ['box']
|
10
|
+
types.each do |type|
|
11
|
+
class_list << "box-#{type}"
|
12
|
+
end
|
13
|
+
|
14
|
+
# Join the CSS Classes together.
|
15
|
+
options ||= {}
|
16
|
+
options[:class] = class_list.join(' ')
|
17
|
+
|
18
|
+
# Return the HTML structure for the box.
|
19
|
+
content_tag :div, content, options
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Shipyard
|
2
|
+
module NoteHelper
|
3
|
+
include ActionView::Context
|
4
|
+
include ActionView::Helpers::TagHelper
|
5
|
+
include ActionView::Helpers::TextHelper
|
6
|
+
|
7
|
+
def note(type, content)
|
8
|
+
# Gather the appropriate box classes into an array.
|
9
|
+
class_list = ['note']
|
10
|
+
class_list << "note-#{type}" if type
|
11
|
+
|
12
|
+
# Join the CSS Classes together.
|
13
|
+
options ||= {}
|
14
|
+
options[:class] = class_list.join(' ')
|
15
|
+
|
16
|
+
# Return the HTML structure for the box.
|
17
|
+
content_tag :div, content, options
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
+component('alert')
|
2
2
|
display: block
|
3
|
-
border-radius: 5px
|
4
3
|
background: $gray
|
5
4
|
color: $gray-lightest
|
6
5
|
position: relative
|
7
6
|
text-shadow: 0 1px 0 rgba(#000,.08)
|
7
|
+
+border-radius
|
8
8
|
+respond-to(min-height, (x0: 50px, x1: 60px))
|
9
9
|
+respond-to(margin-bottom, (x0: 10px, x1: 15px))
|
10
10
|
+respond-to(padding, (x0: 12px 10px, x1: 17px 20px, x2: 17px 30px))
|
@@ -37,8 +37,8 @@
|
|
37
37
|
color: $red-lightest
|
38
38
|
background: $red
|
39
39
|
&-info
|
40
|
-
background: $blue
|
41
40
|
color: $blue-lightest
|
41
|
+
background: $blue
|
42
42
|
|
43
43
|
// Alert: Sub-components
|
44
44
|
&-txt,
|
@@ -90,11 +90,11 @@
|
|
90
90
|
|
91
91
|
// Alert Buttons
|
92
92
|
.alert &
|
93
|
-
+btn-color(
|
94
|
-
+btn-hover(
|
93
|
+
+btn-color($gray-dark)
|
94
|
+
+btn-hover($gray-darker)
|
95
95
|
.alert-info &
|
96
|
-
+btn-color(
|
97
|
-
+btn-hover(
|
96
|
+
+btn-color($blue-dark)
|
97
|
+
+btn-hover($blue-darker)
|
98
98
|
.alert-warning &
|
99
99
|
+btn-color($yellow-darker)
|
100
100
|
+btn-hover($yellow-darkest)
|
@@ -103,6 +103,17 @@
|
|
103
103
|
.alert-error &
|
104
104
|
+extend('caution')
|
105
105
|
|
106
|
+
// Note Buttons
|
107
|
+
.note-info &
|
108
|
+
+btn-color($blue-dark)
|
109
|
+
+btn-hover($blue-darker)
|
110
|
+
.note-warning &
|
111
|
+
+btn-color($yellow-dark)
|
112
|
+
+btn-hover($yellow-darker)
|
113
|
+
.note-success &
|
114
|
+
+btn-color($green-dark)
|
115
|
+
+btn-hover($green-darker)
|
116
|
+
|
106
117
|
&-margin
|
107
118
|
margin: 0 5px
|
108
119
|
&-lg
|
@@ -25,8 +25,8 @@
|
|
25
25
|
border-color: darken($gray, 10%)
|
26
26
|
background-color: darken($gray, 5%)
|
27
27
|
.alert-info &
|
28
|
-
border-color: darken($blue,
|
29
|
-
background-color: darken($blue,
|
28
|
+
border-color: darken($blue, 11%)
|
29
|
+
background-color: darken($blue, 6%)
|
30
30
|
.alert-error &
|
31
31
|
border-color: $red-dark
|
32
32
|
background-color: lighten($red-dark, 7%)
|
@@ -36,3 +36,22 @@
|
|
36
36
|
.alert-success &
|
37
37
|
border-color: $green-dark
|
38
38
|
background-color: darken($green, 10%)
|
39
|
+
|
40
|
+
// Code blocks inside of notes
|
41
|
+
.note &
|
42
|
+
margin: 0 2px
|
43
|
+
color: darken($purple-dark, 6%)
|
44
|
+
border-color: darken($gray-lighter, 12%)
|
45
|
+
background-color: darken($gray-lighter, 6%)
|
46
|
+
.note-info &
|
47
|
+
color: $purple-darker
|
48
|
+
border-color: darken($blue-light, 8%)
|
49
|
+
background-color: $blue-light
|
50
|
+
.note-success &
|
51
|
+
color: $purple-darker
|
52
|
+
border-color: darken($green-light, 8%)
|
53
|
+
background-color: $green-light
|
54
|
+
.note-warning &
|
55
|
+
color: $purple-darker
|
56
|
+
border-color: darken($yellow-light, 8%)
|
57
|
+
background-color: $yellow-light
|
@@ -102,18 +102,18 @@
|
|
102
102
|
&::before
|
103
103
|
z-index: 1
|
104
104
|
content: "*"
|
105
|
-
+component-styles(required-asterisk)
|
105
|
+
+sub-component-styles(required-asterisk)
|
106
106
|
+when('error')
|
107
|
-
+component-styles(required-asterisk-error)
|
107
|
+
+sub-component-styles(required-asterisk-error)
|
108
108
|
&::after
|
109
109
|
content: ""
|
110
110
|
display: block
|
111
111
|
border-style: solid
|
112
112
|
border-radius: 0 3px 0 0
|
113
113
|
border-color: transparent
|
114
|
-
+component-styles(required-corner)
|
114
|
+
+sub-component-styles(required-corner)
|
115
115
|
+when('error')
|
116
|
-
+component-styles(required-corner-error)
|
116
|
+
+sub-component-styles(required-corner-error)
|
117
117
|
|
118
118
|
&-full
|
119
119
|
width: 100%
|
@@ -0,0 +1,30 @@
|
|
1
|
+
+component('note')
|
2
|
+
display: block
|
3
|
+
position: relative
|
4
|
+
+respond-to(min-height, (x0: 50px, x1: 60px))
|
5
|
+
+respond-to(margin-bottom, (x0: 10px, x1: 15px))
|
6
|
+
+respond-to(padding, (x0: 12px 10px, x1: 17px 20px, x2: 17px 30px))
|
7
|
+
a, strong, .strong
|
8
|
+
&:not(.btn)
|
9
|
+
font-weight: $bold
|
10
|
+
|
11
|
+
// Note: Types
|
12
|
+
a
|
13
|
+
color: $blue-dark
|
14
|
+
|
15
|
+
// Note: Type colors defined in _components.scss
|
16
|
+
+sub-component('info')
|
17
|
+
+sub-component('success')
|
18
|
+
+sub-component('warning')
|
19
|
+
|
20
|
+
// Note: CTAs
|
21
|
+
&-cta
|
22
|
+
+breakpoint-x0
|
23
|
+
display: block
|
24
|
+
text-align: center
|
25
|
+
margin-top: 10px
|
26
|
+
+breakpoint-x1
|
27
|
+
top: 50%
|
28
|
+
right: 10px
|
29
|
+
position: absolute
|
30
|
+
transform: translatey(-50%)
|
@@ -9,8 +9,8 @@
|
|
9
9
|
transform: rotate(45deg) translatey(50%)
|
10
10
|
transform-origin: center center
|
11
11
|
border: 4px solid transparent
|
12
|
-
border-right-color: $gray-
|
13
|
-
border-bottom-color: $gray-
|
12
|
+
border-right-color: $gray-darker
|
13
|
+
border-bottom-color: $gray-darker
|
14
14
|
margin-top: 0
|
15
15
|
&:after
|
16
16
|
top: -34px
|
@@ -21,7 +21,7 @@
|
|
21
21
|
text-align: center
|
22
22
|
border-radius: 3px
|
23
23
|
content: attr(tooltip)
|
24
|
-
background: $gray-
|
24
|
+
background: $gray-darker
|
25
25
|
font-size: $font-size-xxs
|
26
26
|
font-weight: $bold
|
27
27
|
transform: translate(-50%, 6px)
|
@@ -3,12 +3,13 @@
|
|
3
3
|
$component: $name !global
|
4
4
|
.#{$name}
|
5
5
|
@content
|
6
|
+
+component-styles($name)
|
6
7
|
|
7
8
|
@mixin sub-component($name)
|
8
9
|
$sub-component: "#{$component}-#{$name}" !global
|
9
10
|
&-#{$name}
|
10
11
|
@content
|
11
|
-
+component-styles($name)
|
12
|
+
+sub-component-styles($name)
|
12
13
|
|
13
14
|
@mixin extend($modifier: null)
|
14
15
|
@if $modifier
|
@@ -23,6 +24,13 @@
|
|
23
24
|
z-index: map-get($z-index, $component)
|
24
25
|
|
25
26
|
@mixin component-styles($modifier)
|
27
|
+
$component-styles: map-get($components, $component)
|
28
|
+
@if $component-styles
|
29
|
+
@each $property, $value in $component-styles
|
30
|
+
@if type-of($value) != map
|
31
|
+
#{$property}: $value
|
32
|
+
|
33
|
+
@mixin sub-component-styles($modifier)
|
26
34
|
$component-styles: map-get($components, $component)
|
27
35
|
@if $component-styles
|
28
36
|
@each $property, $value in map-get($component-styles, $modifier)
|
@@ -4,11 +4,13 @@ $gray-light: color('gray', 'light') !default
|
|
4
4
|
$gray-lighter: color('gray', 'lighter') !default
|
5
5
|
$gray-lightest: color('gray', 'lightest') !default
|
6
6
|
$gray-dark: color('gray', 'dark') !default
|
7
|
+
$gray-darker: color('gray', 'darker') !default
|
7
8
|
$gray-darkest: color('gray', 'darkest') !default
|
8
9
|
|
9
10
|
// Green
|
10
11
|
$green: color('green') !default
|
11
12
|
$green-light: color('green', 'light') !default
|
13
|
+
$green-lighter: color('green', 'lighter') !default
|
12
14
|
$green-lightest: color('green', 'lightest') !default
|
13
15
|
$green-dark: color('green', 'dark') !default
|
14
16
|
$green-darker: color('green', 'darker') !default
|
@@ -17,15 +19,19 @@ $green-darkest: color('green', 'darkest') !default
|
|
17
19
|
// Blue
|
18
20
|
$blue: color('blue') !default
|
19
21
|
$blue-light: color('blue', 'light') !default
|
22
|
+
$blue-lighter: color('blue', 'lighter') !default
|
20
23
|
$blue-lightest: color('blue', 'lightest') !default
|
21
24
|
$blue-dark: color('blue', 'dark') !default
|
25
|
+
$blue-darker: color('blue', 'darker') !default
|
22
26
|
$blue-darkest: color('blue', 'darkest') !default
|
23
27
|
|
24
28
|
// Teal
|
25
29
|
$teal: color('teal') !default
|
26
30
|
$teal-light: color('teal', 'light') !default
|
31
|
+
$teal-lighter: color('teal', 'lighter') !default
|
27
32
|
$teal-lightest: color('teal', 'lightest') !default
|
28
33
|
$teal-dark: color('teal', 'dark') !default
|
34
|
+
$teal-darker: color('teal', 'darker') !default
|
29
35
|
$teal-darkest: color('teal', 'darkest') !default
|
30
36
|
|
31
37
|
// Red
|
@@ -4,13 +4,14 @@ $colors: (
|
|
4
4
|
light: #bac5d2,
|
5
5
|
lighter: #dfe6eb,
|
6
6
|
lightest: #f2f5f7,
|
7
|
-
dark: #
|
7
|
+
dark: darken(#788594, 18%),
|
8
|
+
darker: #313a44,
|
8
9
|
darkest: #1e252c
|
9
10
|
),
|
10
11
|
"green": (
|
11
12
|
base: darken(#3acc7c, 3%),
|
12
|
-
light: lighten(#3acc7c,
|
13
|
-
lighter: lighten(#3acc7c,
|
13
|
+
light: lighten(#3acc7c, 22%),
|
14
|
+
lighter: lighten(#3acc7c, 34%),
|
14
15
|
lightest: lighten(#3acc7c, 41%),
|
15
16
|
dark: darken(#3acc7c, 18%),
|
16
17
|
darker: darken(#3acc7c, 26%),
|
@@ -18,19 +19,21 @@ $colors: (
|
|
18
19
|
),
|
19
20
|
"blue": (
|
20
21
|
base: #1ca1e3,
|
21
|
-
light: #5eb9e6,
|
22
|
-
lighter: #9ed8f5,
|
23
|
-
lightest: lighten(#9ed8f5,
|
22
|
+
light: lighten(#5eb9e6, 15%),
|
23
|
+
lighter: lighten(#9ed8f5, 9%),
|
24
|
+
lightest: lighten(#9ed8f5, 15%),
|
24
25
|
dark: #0075b0,
|
25
|
-
|
26
|
+
darker: darken(#0075b0, 7%),
|
27
|
+
darkest: darken(#004d73, 5%)
|
26
28
|
),
|
27
29
|
"teal": (
|
28
30
|
base: #20a5a8,
|
29
31
|
light: #6ab7b9,
|
30
32
|
lighter: #b2dbdc,
|
31
33
|
lightest: lighten(#b2dbdc, 13%),
|
32
|
-
dark: #
|
33
|
-
|
34
|
+
dark: darken(#20a5a8, 8%),
|
35
|
+
darker: darken(#20a5a8, 16%),
|
36
|
+
darkest: darken(#20a5a8, 24%)
|
34
37
|
),
|
35
38
|
"red": (
|
36
39
|
base: #e06158,
|
@@ -43,12 +46,12 @@ $colors: (
|
|
43
46
|
),
|
44
47
|
"yellow": (
|
45
48
|
base: #ffca49,
|
46
|
-
light: lighten(#ffca49,
|
47
|
-
lighter:
|
49
|
+
light: lighten(#ffca49, 8%),
|
50
|
+
lighter: #ffe7b1,
|
48
51
|
lightest: lighten(#ffe7b1, 7%),
|
49
52
|
dark: darken(#ffca49, 20%),
|
50
53
|
darker: darken(#ffca49, 30%),
|
51
|
-
darkest: darken(#ffca49,
|
54
|
+
darkest: darken(#ffca49, 47%)
|
52
55
|
),
|
53
56
|
"orange": (
|
54
57
|
base: #ff9f49,
|
@@ -36,6 +36,22 @@ $component-defaults: (
|
|
36
36
|
color: #fff,
|
37
37
|
font-weight: $medium
|
38
38
|
)
|
39
|
+
),
|
40
|
+
note: (
|
41
|
+
background: $gray-lighter,
|
42
|
+
border-radius: $border-radius,
|
43
|
+
info: (
|
44
|
+
color: $blue-darkest,
|
45
|
+
background: $blue-lighter
|
46
|
+
),
|
47
|
+
success: (
|
48
|
+
color: $green-darkest,
|
49
|
+
background: $green-lighter
|
50
|
+
),
|
51
|
+
warning: (
|
52
|
+
color: $yellow-darkest,
|
53
|
+
background: $yellow-lighter
|
54
|
+
)
|
39
55
|
)
|
40
56
|
) !default;
|
41
57
|
|
@@ -20,11 +20,11 @@ $font-size-sm: map-get($font-sizes, sm) !default
|
|
20
20
|
$font-size-xs: map-get($font-sizes, xs) !default
|
21
21
|
$font-size-xxs: map-get($font-sizes, xxs) !default
|
22
22
|
$font: $normal 16px / 1.6 $font-family !default
|
23
|
-
$text-color: $gray-
|
23
|
+
$text-color: $gray-darker !default
|
24
24
|
$text-color-disabled: lighten($gray, 15%) !default
|
25
25
|
$text-color-lightest: lighten($gray, 10%) !default
|
26
26
|
$text-color-lighter: lighten($gray, 5%) !default
|
27
27
|
$text-color-light: $gray !default
|
28
|
-
$text-color-darkest: $gray-
|
29
|
-
$text-color-darker: lighten($gray-
|
30
|
-
$text-color-dark: lighten($gray-
|
28
|
+
$text-color-darkest: $gray-darker !default
|
29
|
+
$text-color-darker: lighten($gray-darker, 4%) !default
|
30
|
+
$text-color-dark: lighten($gray-darker, 7%) !default
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require_relative '../../../app/helpers/shipyard/box_helper'
|
2
|
+
|
3
|
+
module Shipyard
|
4
|
+
module Jekyll
|
5
|
+
class Box < Liquid::Block
|
6
|
+
include Shipyard::BoxHelper
|
7
|
+
|
8
|
+
def initialize(tag_name, types, options)
|
9
|
+
super
|
10
|
+
@types = []
|
11
|
+
types.tr(' ','').split(',').each do |type|
|
12
|
+
@types << type.tr(':','').to_sym
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def render(context)
|
17
|
+
box @types, raw(super.strip)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require_relative '../../../app/helpers/shipyard/note_helper'
|
2
|
+
|
3
|
+
module Shipyard
|
4
|
+
module Jekyll
|
5
|
+
class Note < Liquid::Block
|
6
|
+
include Shipyard::NoteHelper
|
7
|
+
|
8
|
+
def initialize(tag_name, type, options)
|
9
|
+
super
|
10
|
+
@type = type.tr(':','').to_sym unless type.blank?
|
11
|
+
end
|
12
|
+
|
13
|
+
def render(context)
|
14
|
+
note @type, raw(super.strip)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/shipyard-framework.rb
CHANGED
@@ -69,9 +69,13 @@ module Shipyard
|
|
69
69
|
|
70
70
|
def register_jekyll_tags
|
71
71
|
require 'shipyard-framework/jekyll/button_tag'
|
72
|
+
require 'shipyard-framework/jekyll/box_tag'
|
73
|
+
require 'shipyard-framework/jekyll/note_tag'
|
72
74
|
require 'shipyard-framework/jekyll/alert_tag'
|
73
75
|
require 'shipyard-framework/jekyll/shipyard_version_tag'
|
74
76
|
Liquid::Template.register_tag('btn', Shipyard::Jekyll::Button)
|
77
|
+
Liquid::Template.register_tag('box', Shipyard::Jekyll::Box)
|
78
|
+
Liquid::Template.register_tag('note', Shipyard::Jekyll::Note)
|
75
79
|
Liquid::Template.register_tag('alert', Shipyard::Jekyll::Alert)
|
76
80
|
Liquid::Template.register_tag('shipyard_version', Shipyard::Jekyll::ShipyardVersion)
|
77
81
|
end
|
data/styleguide/Gemfile.lock
CHANGED
data/styleguide/_sass/views.sass
CHANGED
@@ -39,10 +39,10 @@ hr
|
|
39
39
|
+when('box:hover')
|
40
40
|
color: #fff
|
41
41
|
+when('light:hover')
|
42
|
-
color: $gray-
|
42
|
+
color: $gray-darker
|
43
43
|
&-text
|
44
44
|
transition: 300ms color ease
|
45
45
|
+when('box:hover')
|
46
|
-
color: #fff
|
46
|
+
color: rgba(#fff,.7)
|
47
47
|
+when('light:hover')
|
48
|
-
color: $gray-
|
48
|
+
color: rgba($gray-darker,.6)
|
@@ -44,7 +44,7 @@ title: Shipyard Alerts
|
|
44
44
|
<p class="text-light margin-bottom-sm">Useful when drawing attention to critical, time-sensitive information — even if nothing has gone wrong.</p>
|
45
45
|
|
46
46
|
{% alert :warning %}
|
47
|
-
There are only 2 seats left on this flight! We recommend to book your tickets as soon as possible.
|
47
|
+
There are only 2 seats left on this flight! We recommend to <a href="#">book your tickets</a> as soon as possible.
|
48
48
|
Use the code <code class="code-inline">Travel_Light_2017</code> before you book your flight.
|
49
49
|
{% btn Call to Action, :sm, class: 'alert-cta' %}
|
50
50
|
{% endalert %}
|
@@ -55,7 +55,7 @@ title: Shipyard Alerts
|
|
55
55
|
<p class="text-light margin-bottom-sm">Useful when drawing attention to something that has gone critically wrong.</p>
|
56
56
|
|
57
57
|
{% alert :error %}
|
58
|
-
This flight is now sold out. Let's get you on the next flight to Kauai
|
58
|
+
This flight is now sold out. Let's get you on the <a href="#">next flight to Kauai</a>.
|
59
59
|
We hope the code <code class="code-inline">Travel_Light_2017</code> will be useful for your next flight.
|
60
60
|
{% btn Call to Action, :sm, class: 'alert-cta' %}
|
61
61
|
{% endalert %}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
---
|
2
|
+
title: Shipyard Boxes
|
3
|
+
box_sizes: [xxs, xs, sm, md, lg, xl]
|
4
|
+
---
|
5
|
+
|
6
|
+
# {{ page.title }}
|
7
|
+
<p class="text-light text-lg margin-top-xxs">Boxes should be used to grab a draw attention to specific groups of content, and are most useful to linked content. By default, all boxes need to have the base class of <code class="code-inline">.box</code> in order to function properly.</p>
|
8
|
+
|
9
|
+
---
|
10
|
+
|
11
|
+
### Default `.box`
|
12
|
+
<p class="text-light margin-bottom-sm">Useful when needing to draw extra attention to a particular group of content.</p>
|
13
|
+
|
14
|
+
{% box %}
|
15
|
+
<p>Donec id elit non mi porta gravida at eget metus. Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Cras mattis consectetur purus sit amet fermentum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Integer posuere erat a ante venenatis dapibus posuere velit aliquet.</p>
|
16
|
+
{% endbox %}
|
17
|
+
|
18
|
+
---
|
19
|
+
|
20
|
+
### Padded `.box-padding`
|
21
|
+
<p class="text-light margin-bottom-sm">Useful when needing to draw extra attention to a particular group of content.</p>
|
22
|
+
|
23
|
+
{% box :padding %}
|
24
|
+
<p>Donec id elit non mi porta gravida at eget metus. Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Cras mattis consectetur purus sit amet fermentum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Integer posuere erat a ante venenatis dapibus posuere velit aliquet.</p>
|
25
|
+
{% endbox %}
|
26
|
+
|
27
|
+
---
|
28
|
+
|
29
|
+
### Linked `.box-link`
|
30
|
+
<p class="text-light margin-bottom-sm">Useful when linking important components to another page or another group of content.</p>
|
31
|
+
|
32
|
+
{% box :link, :padding %}
|
33
|
+
<p>Donec id elit non mi porta gravida at eget metus. Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Cras mattis consectetur purus sit amet fermentum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Integer posuere erat a ante venenatis dapibus posuere velit aliquet.</p>
|
34
|
+
{% endbox %}
|
35
|
+
|
36
|
+
---
|
37
|
+
|
38
|
+
### Secondary `.box-secondary`
|
39
|
+
<p class="text-light margin-bottom-sm">Useful when connecting secondary information to the default box styles.</p>
|
40
|
+
|
41
|
+
{% box :secondary, :padding %}
|
42
|
+
<p>Donec id elit non mi porta gravida at eget metus. Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Cras mattis consectetur purus sit amet fermentum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Integer posuere erat a ante venenatis dapibus posuere velit aliquet.</p>
|
43
|
+
{% endbox %}
|
44
|
+
|
45
|
+
---
|
46
|
+
|
47
|
+
### Box Sizes `.box-[{{ page.box_sizes | join: ', ' }}]`
|
48
|
+
<p class="text-light margin-bottom-sm">Useful when you need to create boxes with fixed heights. Note: The <a href="{{ site.baseurl }}/utilities/responsive">responsive utility classes</a> can also be applied to each box size.</p>
|
49
|
+
|
50
|
+
{% for size in page.box_sizes %}
|
51
|
+
<div class="box box-{{ size }} margin-top-md">
|
52
|
+
<strong class="center text-lighter text-sm">.box-{{ size }}</strong>
|
53
|
+
</div>
|
54
|
+
{% endfor %}
|
@@ -1,10 +1,12 @@
|
|
1
1
|
---
|
2
2
|
title: Shipyard Components
|
3
|
-
components: [Grid, Boxes, Buttons, Empty States, Alerts, Forms, Icons, Modals, Tooltips, Code]
|
3
|
+
components: [Grid, Boxes, Buttons, Empty States, Alerts, Notes, Forms, Icons, Modals, Tooltips, Code]
|
4
4
|
---
|
5
5
|
|
6
6
|
<h1>{{ page.title }}</h1>
|
7
|
+
|
7
8
|
<hr />
|
9
|
+
|
8
10
|
<ul class="col-container">
|
9
11
|
{% for component in page.components %}
|
10
12
|
<li class="margin-bottom-xs margin-bottom-x1-sm margin-bottom-x2-lg col col-100 col-x1-25">
|
@@ -0,0 +1,50 @@
|
|
1
|
+
---
|
2
|
+
title: Shipyard Notes
|
3
|
+
---
|
4
|
+
|
5
|
+
# {{ page.title }}
|
6
|
+
<p class="text-light text-lg margin-top-xxs">Notes should be used to grab a user's attention along side of other content.</p>
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
### Default `.note`
|
11
|
+
<p class="text-light margin-bottom-sm">Used to display notes, tips, and other non-critical information.</p>
|
12
|
+
|
13
|
+
{% note %}
|
14
|
+
Ten other people are also viewing tickets for <a href="#">this flight</a>.
|
15
|
+
Use the code <code class="code-inline">Travel_Light_2017</code> before you book your flight.
|
16
|
+
{% btn Call to Action, :sm, class: 'note-cta' %}
|
17
|
+
{% endnote %}
|
18
|
+
|
19
|
+
---
|
20
|
+
|
21
|
+
### Info `.note-info`
|
22
|
+
<p class="text-light margin-bottom-sm">Useful when drawing attention to non-critical information or actions we want the user to take.</p>
|
23
|
+
|
24
|
+
{% note :info %}
|
25
|
+
Ten other people are also viewing tickets for <a href="#">this flight</a>.
|
26
|
+
Use the code <code class="code-inline">Travel_Light_2017</code> before you book your flight.
|
27
|
+
{% btn Call to Action, :sm, class: 'note-cta' %}
|
28
|
+
{% endnote %}
|
29
|
+
|
30
|
+
---
|
31
|
+
|
32
|
+
### Success `.note-success`
|
33
|
+
<p class="text-light margin-bottom-sm">Useful when drawing attention to interactions that have produced successful results.</p>
|
34
|
+
|
35
|
+
{% note :success %}
|
36
|
+
Pack your bags! You'll be on the next flight to Hawaii.
|
37
|
+
Use the code <code class="code-inline">Travel_Light_2017</code> on your next flight. In the meantime you can <a href="#">invite a friend</a> to this flight.
|
38
|
+
{% btn Call to Action, :sm, class: 'note-cta' %}
|
39
|
+
{% endnote %}
|
40
|
+
|
41
|
+
---
|
42
|
+
|
43
|
+
### Warning `.note-warning`
|
44
|
+
<p class="text-light margin-bottom-sm">Useful when drawing attention to critical information.</p>
|
45
|
+
|
46
|
+
{% note :warning %}
|
47
|
+
There are only 2 seats left on this flight! We recommend to <a href="#">book your tickets</a> as soon as possible.
|
48
|
+
Use the code <code class="code-inline">Travel_Light_2017</code> before you book your flight.
|
49
|
+
{% btn Call to Action, :sm, class: 'note-cta' %}
|
50
|
+
{% endnote %}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shipyard-framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shipyard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|
@@ -59,10 +59,12 @@ files:
|
|
59
59
|
- README.md
|
60
60
|
- Rakefile
|
61
61
|
- app/helpers/shipyard/alert_helper.rb
|
62
|
+
- app/helpers/shipyard/box_helper.rb
|
62
63
|
- app/helpers/shipyard/button_helper.rb
|
63
64
|
- app/helpers/shipyard/form_helper.rb
|
64
65
|
- app/helpers/shipyard/icon_helper.rb
|
65
66
|
- app/helpers/shipyard/layout_helper.rb
|
67
|
+
- app/helpers/shipyard/note_helper.rb
|
66
68
|
- app/views/shipyard/_alerts.slim
|
67
69
|
- assets/icons/arrows/arrow-down.svg
|
68
70
|
- assets/icons/gear.svg
|
@@ -106,6 +108,7 @@ files:
|
|
106
108
|
- assets/stylesheets/shipyard/components/_icons.sass
|
107
109
|
- assets/stylesheets/shipyard/components/_input-switch.sass
|
108
110
|
- assets/stylesheets/shipyard/components/_modals.sass
|
111
|
+
- assets/stylesheets/shipyard/components/_notes.sass
|
109
112
|
- assets/stylesheets/shipyard/components/_tooltips.sass
|
110
113
|
- assets/stylesheets/shipyard/core/_animations.sass
|
111
114
|
- assets/stylesheets/shipyard/core/_grid.sass
|
@@ -132,7 +135,9 @@ files:
|
|
132
135
|
- lib/shipyard-framework.rb
|
133
136
|
- lib/shipyard-framework/icons.rb
|
134
137
|
- lib/shipyard-framework/jekyll/alert_tag.rb
|
138
|
+
- lib/shipyard-framework/jekyll/box_tag.rb
|
135
139
|
- lib/shipyard-framework/jekyll/button_tag.rb
|
140
|
+
- lib/shipyard-framework/jekyll/note_tag.rb
|
136
141
|
- lib/shipyard-framework/jekyll/shipyard_version_tag.rb
|
137
142
|
- lib/shipyard-framework/rails/engine.rb
|
138
143
|
- lib/shipyard-framework/rails/railtie.rb
|
@@ -151,7 +156,7 @@ files:
|
|
151
156
|
- styleguide/_sass/views.sass
|
152
157
|
- styleguide/assets/css/application.sass
|
153
158
|
- styleguide/components/alerts.md
|
154
|
-
- styleguide/components/boxes.
|
159
|
+
- styleguide/components/boxes.md
|
155
160
|
- styleguide/components/buttons.html
|
156
161
|
- styleguide/components/code.html
|
157
162
|
- styleguide/components/empty-states.html
|
@@ -159,6 +164,7 @@ files:
|
|
159
164
|
- styleguide/components/grid.html
|
160
165
|
- styleguide/components/index.html
|
161
166
|
- styleguide/components/modals.html
|
167
|
+
- styleguide/components/notes.md
|
162
168
|
- styleguide/components/tooltips.html
|
163
169
|
- styleguide/index.html
|
164
170
|
- styleguide/utilities/colors.html
|
@@ -1,37 +0,0 @@
|
|
1
|
-
---
|
2
|
-
title: Shipyard Boxes
|
3
|
-
box_sizes: [xxs, xs, sm, md, lg, xl]
|
4
|
-
---
|
5
|
-
|
6
|
-
<h1>{{ page.title }}</h1>
|
7
|
-
|
8
|
-
<hr />
|
9
|
-
|
10
|
-
<div class="box box-padding">
|
11
|
-
<h4>Default Box</h4>
|
12
|
-
<p>Donec id elit non mi porta gravida at eget metus. Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Cras mattis consectetur purus sit amet fermentum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Integer posuere erat a ante venenatis dapibus posuere velit aliquet.</p>
|
13
|
-
</div>
|
14
|
-
|
15
|
-
<hr />
|
16
|
-
|
17
|
-
<div class="box-link box-padding">
|
18
|
-
<h4>Linked Box</h4>
|
19
|
-
<p>Donec id elit non mi porta gravida at eget metus. Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Cras mattis consectetur purus sit amet fermentum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Integer posuere erat a ante venenatis dapibus posuere velit aliquet.</p>
|
20
|
-
</div>
|
21
|
-
|
22
|
-
<hr />
|
23
|
-
|
24
|
-
<div class="box-secondary box-padding">
|
25
|
-
<h4>Secondary Box</h4>
|
26
|
-
<p>Donec id elit non mi porta gravida at eget metus. Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Cras mattis consectetur purus sit amet fermentum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Integer posuere erat a ante venenatis dapibus posuere velit aliquet.</p>
|
27
|
-
</div>
|
28
|
-
|
29
|
-
<hr />
|
30
|
-
|
31
|
-
<h2>Boxes Sizes</h2>
|
32
|
-
|
33
|
-
{% for size in page.box_sizes %}
|
34
|
-
<div class="box box-{{ size }} margin-top-md">
|
35
|
-
<strong class="center text-lighter text-sm">.box-{{ size }}</strong>
|
36
|
-
</div>
|
37
|
-
{% endfor %}
|