ratchet_design 0.1.19 → 0.1.20
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/ratchet/_esvg.js +72 -0
- data/app/assets/javascripts/ratchet/_icons.js +19 -0
- data/app/assets/javascripts/ratchet/_topology.js +19 -0
- data/app/assets/javascripts/ratchet/base/form.js +4 -4
- data/app/assets/javascripts/ratchet/core.js +15 -8
- data/app/assets/javascripts/ratchet/enhancement/{_collapse.js → collapse.js} +3 -3
- data/app/assets/javascripts/ratchet/enhancement/lightbox.js +52 -118
- data/app/assets/javascripts/ratchet/enhancement/modal.js +185 -0
- data/app/assets/javascripts/ratchet/enhancement/smooth-scroll.js +21 -0
- data/app/assets/javascripts/ratchet/utility/once.js +42 -0
- data/app/assets/stylesheets/ratchet/_colors.yml +54 -0
- data/app/assets/stylesheets/ratchet/_core.scss +8 -1
- data/app/assets/stylesheets/ratchet/base/_button.scss +22 -31
- data/app/assets/stylesheets/ratchet/base/_document.scss +66 -53
- data/app/assets/stylesheets/ratchet/base/_form.scss +0 -1
- data/app/assets/stylesheets/ratchet/base/_list.scss +6 -15
- data/app/assets/stylesheets/ratchet/base/_media.scss +22 -6
- data/app/assets/stylesheets/ratchet/base/_section.scss +8 -257
- data/app/assets/stylesheets/ratchet/base/_slider.scss +388 -0
- data/app/assets/stylesheets/ratchet/base/_table.scss +1 -2
- data/app/assets/stylesheets/ratchet/base/_text.scss +13 -29
- data/app/assets/stylesheets/ratchet/enhancement/_deployments.scss +26 -0
- data/app/assets/stylesheets/ratchet/enhancement/_hero.scss +1 -1
- data/app/assets/stylesheets/ratchet/enhancement/_lightbox.scss +35 -76
- data/app/assets/stylesheets/ratchet/enhancement/_modal.scss +125 -0
- data/app/assets/stylesheets/ratchet/utility/_animations.scss +8 -0
- data/app/assets/stylesheets/ratchet/utility/_color.scss +25 -105
- data/app/assets/stylesheets/ratchet/utility/_global.scss +30 -24
- data/app/assets/stylesheets/ratchet/utility/_grid.scss +152 -15
- data/app/assets/svgs/ratchet/_icons/backup.svg +9 -0
- data/app/assets/svgs/ratchet/_icons/block.svg +7 -0
- data/app/assets/svgs/ratchet/_icons/compose-logomark.svg +8 -0
- data/app/assets/svgs/ratchet/_icons/connecting-in.svg +46 -0
- data/app/assets/svgs/ratchet/_icons/connecting-out.svg +33 -0
- data/app/assets/svgs/ratchet/_icons/customer-buffer.svg +28 -0
- data/app/assets/svgs/ratchet/_icons/customer-citrix.svg +12 -0
- data/app/assets/svgs/ratchet/_icons/customer-guardian.svg +31 -0
- data/app/assets/svgs/ratchet/_icons/customer-roximity.svg +16 -0
- data/app/assets/svgs/ratchet/_icons/customer-upworthy.svg +13 -0
- data/app/assets/svgs/ratchet/_icons/db-money.svg +31 -0
- data/app/assets/svgs/ratchet/_icons/deployment.svg +1 -0
- data/app/assets/svgs/ratchet/{facebook.svg → _icons/facebook.svg} +0 -0
- data/app/assets/svgs/ratchet/_icons/gear.svg +12 -0
- data/app/assets/svgs/ratchet/{github.svg → _icons/github.svg} +0 -0
- data/app/assets/svgs/ratchet/{google-plus.svg → _icons/google-plus.svg} +0 -0
- data/app/assets/svgs/ratchet/{ibm.svg → _icons/ibm.svg} +0 -0
- data/app/assets/svgs/ratchet/{inbox.svg → _icons/inbox.svg} +0 -0
- data/app/assets/svgs/ratchet/_icons/index.svg +3 -0
- data/app/assets/svgs/ratchet/_icons/keylock.svg +8 -0
- data/app/assets/svgs/ratchet/_icons/life-preserver.svg +17 -0
- data/app/assets/svgs/ratchet/{linkedin.svg → _icons/linkedin.svg} +0 -0
- data/app/assets/svgs/ratchet/_icons/metrics.svg +7 -0
- data/app/assets/svgs/ratchet/_icons/money-stack.svg +60 -0
- data/app/assets/svgs/ratchet/_icons/notepad.svg +12 -0
- data/app/assets/svgs/ratchet/_icons/notepad2.svg +14 -0
- data/app/assets/svgs/ratchet/_icons/one-click.svg +6 -0
- data/app/assets/svgs/ratchet/{ratchet.svg → _icons/ratchet.svg} +0 -0
- data/app/assets/svgs/ratchet/_icons/reliability.svg +12 -0
- data/app/assets/svgs/ratchet/_icons/safe.svg +26 -0
- data/app/assets/svgs/ratchet/_icons/scaling.svg +16 -0
- data/app/assets/svgs/ratchet/{search.svg → _icons/search.svg} +0 -0
- data/app/assets/svgs/ratchet/{subscribe.svg → _icons/subscribe.svg} +0 -0
- data/app/assets/svgs/ratchet/{twitter.svg → _icons/twitter.svg} +0 -0
- data/app/assets/svgs/ratchet/{y-combinator.svg → _icons/y-combinator.svg} +0 -0
- data/app/assets/svgs/ratchet/_icons/youtube.svg +3 -0
- data/app/assets/svgs/ratchet/_topology/arbiter.svg +1 -0
- data/app/assets/svgs/ratchet/_topology/backup.svg +1 -0
- data/app/assets/svgs/ratchet/_topology/config.svg +1 -0
- data/app/assets/svgs/ratchet/_topology/haproxy-2.svg +1 -0
- data/app/assets/svgs/ratchet/_topology/haproxy-storage.svg +1 -0
- data/app/assets/svgs/ratchet/_topology/haproxy.svg +1 -0
- data/app/assets/svgs/ratchet/_topology/memory.svg +1 -0
- data/app/assets/svgs/ratchet/_topology/portal-2.svg +1 -0
- data/app/assets/svgs/ratchet/_topology/portal.svg +1 -0
- data/app/assets/svgs/ratchet/_topology/sentinel-memory.svg +1 -0
- data/app/assets/svgs/ratchet/_topology/sentinel.svg +1 -0
- data/app/assets/svgs/ratchet/_topology/storage.svg +1 -0
- data/app/helpers/ratchet/application_helper.rb +10 -2
- data/app/helpers/ratchet/form_helper.rb +84 -1
- data/app/helpers/ratchet/icon_helper.rb +113 -0
- data/app/helpers/ratchet/pricing_helper.rb +133 -0
- data/app/helpers/ratchet/toggle_nav_helper.rb +101 -0
- data/app/views/layouts/ratchet/default.html.slim +3 -3
- data/app/views/shared/ratchet/_defs.html.slim +30 -88
- data/app/views/shared/ratchet/_fonts.html.slim +88 -0
- data/app/views/shared/ratchet/_footer.html.slim +1 -1
- data/app/views/shared/ratchet/_header.html.slim +5 -5
- data/app/views/shared/ratchet/_icons.html.slim +190 -5
- data/lib/ratchet_design/config_data.rb +29 -0
- data/lib/ratchet_design/version.rb +1 -1
- data/lib/ratchet_design.rb +27 -10
- data/public/core-0.1.20.js +22627 -0
- data/public/{fonts-woff-0.1.19.css → fonts-woff-0.1.20.css} +0 -0
- data/public/{fonts-woff2-0.1.19.css → fonts-woff2-0.1.20.css} +0 -0
- metadata +84 -22
- data/app/assets/javascripts/ratchet/_svg.js +0 -55
- data/public/core-0.1.19.js +0 -138
- data/public/core-0.1.19.js.gz +0 -0
- data/public/core-0.1.19.map.json +0 -1
- data/public/fonts-woff-0.1.19.css.gz +0 -0
- data/public/fonts-woff2-0.1.19.css.gz +0 -0
@@ -0,0 +1,185 @@
|
|
1
|
+
/**
|
2
|
+
* Modal 0.0.1
|
3
|
+
* A portable modal module
|
4
|
+
* @author Kyle Foster (@hkfoster)
|
5
|
+
* @license MIT
|
6
|
+
**/
|
7
|
+
|
8
|
+
// Dependencies
|
9
|
+
var toolbox = require( 'compose-toolbox' ),
|
10
|
+
Event = toolbox.event,
|
11
|
+
matches = toolbox.matches,
|
12
|
+
getClosest = toolbox.getClosest,
|
13
|
+
once = require( '../utility/once' );
|
14
|
+
|
15
|
+
function getTriggerPosition( event ) {
|
16
|
+
var left = event.clientX,
|
17
|
+
top = event.clientY,
|
18
|
+
right = window.innerWidth - left,
|
19
|
+
bottom = window.innerHeight - top;
|
20
|
+
|
21
|
+
return {
|
22
|
+
left : left,
|
23
|
+
right : right,
|
24
|
+
top : top,
|
25
|
+
bottom : bottom
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
function focusInput( parent, order ) {
|
30
|
+
order = order - 1 || 0;
|
31
|
+
if ( parent.querySelectorAll( 'input' ).length ) parent.querySelectorAll( 'input' )[ order ].focus();
|
32
|
+
}
|
33
|
+
|
34
|
+
function pythagorean( sideA, sideB ){
|
35
|
+
return Math.sqrt( Math.pow( sideA, 2 ) + Math.pow( sideB, 2 ) );
|
36
|
+
}
|
37
|
+
|
38
|
+
// Public API function
|
39
|
+
var modal = function( selector, content, callback ) {
|
40
|
+
|
41
|
+
// Click handler function
|
42
|
+
var clickHandler = function( event ) {
|
43
|
+
|
44
|
+
// If `close-modal` button is clicked
|
45
|
+
if ( getClosest( event.target, '[data-close-modal]' ) ) {
|
46
|
+
|
47
|
+
// Get outta Dodge
|
48
|
+
closeModal();
|
49
|
+
|
50
|
+
// If attached selector is clicked
|
51
|
+
} else if ( getClosest( event.target, selector ) ) {
|
52
|
+
|
53
|
+
// Show the modal
|
54
|
+
showModal( event );
|
55
|
+
|
56
|
+
}
|
57
|
+
|
58
|
+
// Otherwise just bail
|
59
|
+
return false;
|
60
|
+
|
61
|
+
};
|
62
|
+
|
63
|
+
// Show modal function
|
64
|
+
var showModal = function( event ) {
|
65
|
+
|
66
|
+
// Prevent default behavior
|
67
|
+
event.preventDefault();
|
68
|
+
|
69
|
+
// Prevent page scroll
|
70
|
+
document.body.style.overflow = 'hidden';
|
71
|
+
|
72
|
+
// If modal has yet to be initialized, insert it into the document
|
73
|
+
if ( !document.querySelector( '[data-modal]' ) ) document.body.insertAdjacentHTML( 'beforeend', '<aside data-modal><section data-modal-content></section><a data-close-modal><svg viewBox="0 0 30 30" width="16"><path d="M2 2l26 26M2 28l26-26" stroke="currentColor" stroke-width="4" stroke-linecap="round" fill="none" /></svg><span>esc</span></a></aside>' );
|
74
|
+
|
75
|
+
// Assignment
|
76
|
+
var
|
77
|
+
modalTrigger = event.target,
|
78
|
+
modalElement = document.querySelector( '[data-modal]' ),
|
79
|
+
modalContent = modalElement.querySelector( '[data-modal-content]' ),
|
80
|
+
modalBackdrop = modalElement.querySelector( '[data-modal-backdrop]' ),
|
81
|
+
|
82
|
+
// Calculate trigger's position in the viewport
|
83
|
+
position = getTriggerPosition( event ),
|
84
|
+
|
85
|
+
// Calculate the circle's radius
|
86
|
+
radius = pythagorean( window.innerHeight, window.innerWidth ),
|
87
|
+
|
88
|
+
// Assign position coordinates
|
89
|
+
xPosition = position.left - Math.round( radius ),
|
90
|
+
yPosition = position.top - Math.round( radius ),
|
91
|
+
|
92
|
+
// Position modal background accordingly
|
93
|
+
modalStyles = '<style data-modal-coords>[data-modal]:after { ' +
|
94
|
+
'left: ' + xPosition + 'px; ' +
|
95
|
+
'top: ' + yPosition + 'px; ' +
|
96
|
+
'width: ' + radius * 2 + 'px; ' +
|
97
|
+
'height: ' + radius * 2 + 'px; ' +
|
98
|
+
'}</style>';
|
99
|
+
|
100
|
+
// If content is passed
|
101
|
+
if ( content ) {
|
102
|
+
|
103
|
+
// And it’s a function
|
104
|
+
if ( content instanceof Function ) {
|
105
|
+
|
106
|
+
// Make it our callback
|
107
|
+
callback = content;
|
108
|
+
|
109
|
+
// Otherwise
|
110
|
+
} else {
|
111
|
+
|
112
|
+
// Set modal content accordingly
|
113
|
+
modalContent.innerHTML = content;
|
114
|
+
|
115
|
+
}
|
116
|
+
|
117
|
+
}
|
118
|
+
|
119
|
+
// Insert modal positioning styles into document
|
120
|
+
document.body.insertAdjacentHTML( 'beforeend', modalStyles );
|
121
|
+
|
122
|
+
// Wait for that sumbitch to animate
|
123
|
+
once.evt( modalElement, 'animationend', function( event ) {
|
124
|
+
|
125
|
+
// Then make its contents visible
|
126
|
+
modalElement.setAttribute( 'data-modal', 'visible' );
|
127
|
+
|
128
|
+
// Focus first input
|
129
|
+
focusInput( modalElement );
|
130
|
+
|
131
|
+
}, false );
|
132
|
+
|
133
|
+
// Activate modal
|
134
|
+
modalElement.setAttribute( 'data-modal', 'in' );
|
135
|
+
|
136
|
+
// Run callback function
|
137
|
+
if ( callback ) once.fn( callback( event ) );
|
138
|
+
|
139
|
+
}
|
140
|
+
|
141
|
+
var keyHandler = function( event ) {
|
142
|
+
event = event || window.event;
|
143
|
+
var isEscape;
|
144
|
+
|
145
|
+
if ( 'key' in event ) {
|
146
|
+
isEscape = ( event.key == 'Escape' || event.key == 'Esc' );
|
147
|
+
} else {
|
148
|
+
isEscape = ( event.keyCode == 27 );
|
149
|
+
}
|
150
|
+
|
151
|
+
if ( isEscape ) {
|
152
|
+
closeModal();
|
153
|
+
}
|
154
|
+
}
|
155
|
+
|
156
|
+
var closeModal = function( event ) {
|
157
|
+
var activeModal = document.querySelector( '[data-modal="visible"]' );
|
158
|
+
|
159
|
+
if ( !activeModal ) return false;
|
160
|
+
|
161
|
+
activeModal.setAttribute( 'data-modal', 'out' );
|
162
|
+
|
163
|
+
once.evt( activeModal, 'animationend', function( event ) {
|
164
|
+
|
165
|
+
activeModal.setAttribute( 'data-modal', '' );
|
166
|
+
|
167
|
+
activeModal.querySelector( '[data-modal-content]' ).innerHTML = '';
|
168
|
+
|
169
|
+
document.body.style.overflow = '';
|
170
|
+
|
171
|
+
var styles = document.querySelector( '[data-modal-coords]' );
|
172
|
+
|
173
|
+
if ( styles ) document.body.removeChild( styles );
|
174
|
+
|
175
|
+
}, false );
|
176
|
+
|
177
|
+
}
|
178
|
+
|
179
|
+
document.addEventListener( 'click', clickHandler, false );
|
180
|
+
document.addEventListener( 'keydown', keyHandler, false );
|
181
|
+
|
182
|
+
}
|
183
|
+
|
184
|
+
// Public API
|
185
|
+
module.exports = modal;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
var toolbox = require( 'compose-toolbox' ),
|
2
|
+
Event = toolbox.event
|
3
|
+
|
4
|
+
Event.on( document, 'click', '[data-anchor],a[href^="#"]', function(event) {
|
5
|
+
|
6
|
+
var pos = document.body.scrollTop
|
7
|
+
var anchor = event.target.dataset.anchor || event.target.getAttribute('href')
|
8
|
+
|
9
|
+
if ( event.target.getAttribute('href') ) {
|
10
|
+
event.preventDefault()
|
11
|
+
}
|
12
|
+
|
13
|
+
window.location.hash = anchor
|
14
|
+
document.body.scrollTop = pos
|
15
|
+
|
16
|
+
var target = document.querySelector(anchor)
|
17
|
+
|
18
|
+
if (target) {
|
19
|
+
toolbox.scrollTo(target)
|
20
|
+
}
|
21
|
+
})
|
@@ -0,0 +1,42 @@
|
|
1
|
+
/**
|
2
|
+
* Once 0.0.1
|
3
|
+
* Create one-time events or functions
|
4
|
+
* @author Kyle Foster (@hkfoster)
|
5
|
+
* @license MIT
|
6
|
+
**/
|
7
|
+
|
8
|
+
// Public API function
|
9
|
+
var once = {
|
10
|
+
|
11
|
+
evt: function( target, type, listener, bubbles ) {
|
12
|
+
|
13
|
+
// Create event
|
14
|
+
target.addEventListener( type, function fn( event ) {
|
15
|
+
|
16
|
+
// Remove event
|
17
|
+
target.removeEventListener( type, fn, bubbles );
|
18
|
+
|
19
|
+
// Call handler
|
20
|
+
listener( event );
|
21
|
+
|
22
|
+
}, bubbles );
|
23
|
+
|
24
|
+
},
|
25
|
+
|
26
|
+
fn: function( fn, context ) {
|
27
|
+
var result;
|
28
|
+
|
29
|
+
return function() {
|
30
|
+
if ( fn ) {
|
31
|
+
result = fn.apply( context || this, arguments );
|
32
|
+
fn = null;
|
33
|
+
}
|
34
|
+
|
35
|
+
return result;
|
36
|
+
};
|
37
|
+
}
|
38
|
+
|
39
|
+
};
|
40
|
+
|
41
|
+
// Public API
|
42
|
+
module.exports = once;
|
@@ -0,0 +1,54 @@
|
|
1
|
+
_colors:
|
2
|
+
# Passive colors
|
3
|
+
space: '#1f2b54' # Blue-Black
|
4
|
+
shark: '#30446e' # Dark Blue-Gray
|
5
|
+
steel: '#576e91' # Blue-Gray
|
6
|
+
pewter: '#869ebc' # Light Blue-Gray
|
7
|
+
dolphin: '#b4c1d2' # Lighter Blue
|
8
|
+
alabaster: '#c3cdda' # Light Blue
|
9
|
+
isabella: '#d6dde7' # Off-Cream
|
10
|
+
smoke: '#edf5f7' # Cream
|
11
|
+
cirrus: '#f7fafb' # Off-White
|
12
|
+
white: '#FFFFFF' # White
|
13
|
+
|
14
|
+
# Active colors
|
15
|
+
azure: '#0094fd' # Blue
|
16
|
+
cerulean: '#0FA7DB' # Softer Blue
|
17
|
+
byzantine: '#c60ca5' # Magenta
|
18
|
+
mulberry: '#8f52ea' # Purple
|
19
|
+
majorelle: '#625ff9' # Indigo
|
20
|
+
caribbean: '#25c894' # Mint
|
21
|
+
grass: '#2ac84f' # Green
|
22
|
+
gold: '#f69523' # Yellow
|
23
|
+
tangelo: '#f96623' # Orange
|
24
|
+
rusty: '#dd2f41' # Red
|
25
|
+
orchid: '#a346ce' # Purple
|
26
|
+
|
27
|
+
# Banner-specific colors
|
28
|
+
lochmara: '#008BC3' # Default
|
29
|
+
akaroa: '#D2C9A7' # Error
|
30
|
+
turquoise: '#5CC6E4' # NTTW
|
31
|
+
terracotta: '#A81C27' # Thanksgiving
|
32
|
+
cobalt: '#006dff' # Royal blue
|
33
|
+
capri: '#00d2fe' # Deep sky blue
|
34
|
+
|
35
|
+
gradients:
|
36
|
+
earthrise: [ $azure, $majorelle ] # Blue to Indigo | PostgreSQL
|
37
|
+
royalty: [ $majorelle, $mulberry ] # Indigo to Purple | Elasticsearch
|
38
|
+
lagoon: [ $azure, $caribbean ] # Blue to Mint | RethinkDB
|
39
|
+
pearlescent: [ $azure, $mulberry ] # Blue to Purple | MySQL
|
40
|
+
firestorm: [ $gold, $tangelo ] # Yellow to Orange | RabbitMQ
|
41
|
+
sunset: [ $tangelo, $rusty ] # Orange to Red | Redis
|
42
|
+
berries: [ $byzantine, $rusty ] # Magenta to Red | etcd
|
43
|
+
supernova: [ $byzantine, $mulberry ] # Magenta to Purple | ScyllaDB
|
44
|
+
emerald: [ $caribbean, $grass ] # Mint to Green | MongoDB
|
45
|
+
aurora: [ $pewter, $caribbean ] # Green to Indigo | JanusGraph
|
46
|
+
clearsky: [ $cerulean, $azure ] # Blue to Softer Blue | Compose
|
47
|
+
|
48
|
+
tidal: [ $cobalt, $capri ] # Hero Gradient Only
|
49
|
+
blackhole: [ $space, $shark ] # Hero Gradient Only
|
50
|
+
midnight: [ $steel, $pewter ] # Hero Gradient Only
|
51
|
+
shady: [ $pewter, $alabaster ] # Hero Gradient Only
|
52
|
+
grayscale: [ $dolphin, $isabella ] # Hero Gradient Only
|
53
|
+
polar: [ $alabaster, $smoke ] # Hero Gradient Only
|
54
|
+
eggshell: [ $cirrus, $smoke ] # Hero Gradient Only
|
@@ -1,5 +1,8 @@
|
|
1
1
|
// Utility modules
|
2
|
+
@import 'colors.yml';
|
3
|
+
|
2
4
|
@import 'utility/global';
|
5
|
+
@import 'utility/animations';
|
3
6
|
@import 'utility/grid';
|
4
7
|
@import 'utility/loader';
|
5
8
|
|
@@ -15,6 +18,7 @@
|
|
15
18
|
@import 'base/table';
|
16
19
|
@import 'base/document';
|
17
20
|
@import 'base/section';
|
21
|
+
@import 'base/slider';
|
18
22
|
|
19
23
|
// Enhancement modules
|
20
24
|
@import 'enhancement/feature';
|
@@ -22,4 +26,7 @@
|
|
22
26
|
@import 'enhancement/notice';
|
23
27
|
@import 'enhancement/hero';
|
24
28
|
@import 'enhancement/tooltip';
|
25
|
-
@import 'enhancement/lightbox';
|
29
|
+
@import 'enhancement/lightbox';
|
30
|
+
@import 'enhancement/deployments';
|
31
|
+
@import 'enhancement/modal';
|
32
|
+
@import 'enhancement/lightbox';
|
@@ -1,14 +1,13 @@
|
|
1
1
|
/* ========================================================================== *
|
2
|
-
*
|
2
|
+
* Button module
|
3
3
|
* -------------------------------------------------------------------------- */
|
4
4
|
|
5
5
|
/* ===================================== *
|
6
|
-
*
|
6
|
+
* Utility
|
7
7
|
* ------------------------------------- */
|
8
8
|
|
9
9
|
// Reset default <button> styles
|
10
10
|
@mixin button-reset() {
|
11
|
-
font: initial;
|
12
11
|
margin: initial;
|
13
12
|
padding: initial;
|
14
13
|
border: initial;
|
@@ -26,15 +25,13 @@
|
|
26
25
|
}
|
27
26
|
|
28
27
|
// Resizable / colorable buttons
|
29
|
-
@mixin button($color: $azure, $size: normal, $fill: on, $
|
28
|
+
@mixin button($color: $azure, $size: normal, $fill: on, $rounded: off) {
|
30
29
|
|
31
30
|
// Define default variables
|
32
31
|
$font-size: 16px;
|
33
32
|
$color: $color;
|
34
|
-
$padding:
|
35
|
-
$
|
36
|
-
$margin-bottom: 31px;
|
37
|
-
$border-radius: if($bevel == on, 100px, $radius);
|
33
|
+
$padding: 1em 1.2em;
|
34
|
+
$border-radius: if($rounded == on, 100px, $radius);
|
38
35
|
|
39
36
|
// Define color-based variables
|
40
37
|
@if $color == primary {
|
@@ -45,58 +42,49 @@
|
|
45
42
|
$color: $caribbean;
|
46
43
|
} @else if $color == failure {
|
47
44
|
$color: $rusty;
|
45
|
+
} @else if $color == faded {
|
46
|
+
$color: $alabaster;
|
48
47
|
}
|
49
48
|
|
50
49
|
// Define size-based variables
|
51
50
|
@if $size == small {
|
52
51
|
$font-size: 14px;
|
53
|
-
$padding:
|
54
|
-
$margin-top: 15px;
|
55
|
-
$margin-bottom: 20px;
|
52
|
+
$padding: .8em 1em;
|
56
53
|
} @else if $size == large {
|
57
|
-
$padding:
|
58
|
-
$margin-top: 15px;
|
59
|
-
$margin-bottom: 19px;
|
54
|
+
$padding: 1.2em 1.4em;
|
60
55
|
} @else if $size == x-large {
|
61
56
|
$font-size: 17px;
|
62
|
-
$padding:
|
63
|
-
$margin-top: 15px;
|
64
|
-
$margin-bottom: 30px;
|
57
|
+
$padding: 1.2em 1.4em;
|
65
58
|
}
|
66
59
|
|
67
60
|
// Declarations
|
68
|
-
display: inline-
|
61
|
+
display: inline-flex;
|
62
|
+
align-items: center;
|
69
63
|
width: auto;
|
70
64
|
text-align: center;
|
71
65
|
font-size: $font-size;
|
72
|
-
line-height:
|
66
|
+
line-height: 1em;
|
73
67
|
font-weight: 700;
|
74
68
|
cursor: pointer;
|
75
69
|
padding: $padding;
|
76
|
-
margin-top: $margin-top;
|
77
|
-
margin-bottom: $margin-bottom;
|
78
70
|
transition: $duration;
|
79
|
-
|
71
|
+
border-radius: $border-radius;
|
80
72
|
|
81
73
|
// Default
|
82
|
-
|
83
|
-
&:visited {
|
74
|
+
@include normal {
|
84
75
|
@if $fill == on {
|
85
76
|
color: $white;
|
86
77
|
background: $color;
|
87
78
|
border: none;
|
88
|
-
// border: 1px solid darken($color, 3);
|
89
79
|
} @else {
|
90
80
|
color: $color;
|
91
81
|
background: transparent;
|
92
|
-
|
82
|
+
box-shadow: 0 0 0 1px $color;
|
93
83
|
}
|
94
84
|
}
|
95
85
|
|
96
86
|
// Active
|
97
|
-
|
98
|
-
&:focus,
|
99
|
-
&:active {
|
87
|
+
@include active {
|
100
88
|
@if $fill == on {
|
101
89
|
color: $white;
|
102
90
|
background: darken($color, 3);
|
@@ -112,10 +100,13 @@
|
|
112
100
|
|
113
101
|
// Disabled
|
114
102
|
&[disabled] {
|
115
|
-
// color: $smoke;
|
116
103
|
background: lighten($color, 33);
|
117
|
-
// border-color: $alabaster;
|
118
104
|
text-shadow: none;
|
119
105
|
pointer-events: none;
|
120
106
|
}
|
107
|
+
}
|
108
|
+
|
109
|
+
button,
|
110
|
+
[type=button] {
|
111
|
+
@include button-reset;
|
121
112
|
}
|
@@ -1,15 +1,15 @@
|
|
1
1
|
/* ========================================================================== *
|
2
|
-
*
|
2
|
+
* Document module
|
3
3
|
* -------------------------------------------------------------------------- */
|
4
4
|
|
5
5
|
/* ===================================== *
|
6
|
-
*
|
6
|
+
* Utility
|
7
7
|
* ------------------------------------- */
|
8
8
|
|
9
9
|
// Transparent headers (for use with hero banners)
|
10
10
|
@mixin transparent-header {
|
11
11
|
margin-bottom: -$header-height;
|
12
|
-
z-index:
|
12
|
+
z-index: 100;
|
13
13
|
|
14
14
|
&,
|
15
15
|
&:before {
|
@@ -23,7 +23,8 @@
|
|
23
23
|
|
24
24
|
// Transparent header extendable placeholder
|
25
25
|
%transparent-header {
|
26
|
-
@include transparent-header;
|
26
|
+
@include transparent-header;
|
27
|
+
}
|
27
28
|
|
28
29
|
// Header link styles
|
29
30
|
%header-link {
|
@@ -31,7 +32,6 @@
|
|
31
32
|
flex-shrink: 0;
|
32
33
|
font-size: 14px;
|
33
34
|
font-weight: 600;
|
34
|
-
// text-transform: uppercase;
|
35
35
|
}
|
36
36
|
|
37
37
|
// Logo home link styles
|
@@ -49,7 +49,7 @@
|
|
49
49
|
|
50
50
|
// Header button styles
|
51
51
|
%header-button {
|
52
|
-
@include button($size: small, $color: $white, $fill: off
|
52
|
+
@include button($size: small, $color: $white, $fill: off);
|
53
53
|
font-weight: 600;
|
54
54
|
margin-top: 0;
|
55
55
|
margin-bottom: 0;
|
@@ -59,56 +59,56 @@
|
|
59
59
|
%mobile-menu-button {
|
60
60
|
|
61
61
|
// Hidden on larger screens
|
62
|
-
@extend %hidden;
|
63
|
-
|
64
62
|
// Shown on smaller screens
|
65
|
-
@
|
66
|
-
@include
|
67
|
-
|
68
|
-
z-index: 4;
|
69
|
-
width: 36px;
|
70
|
-
height: 36px;
|
71
|
-
margin-left: auto;
|
72
|
-
padding: 12px 10px;
|
73
|
-
border-radius: 50%;
|
74
|
-
transition: .5s transform;
|
75
|
-
box-shadow: 0 0 0 1px $white;
|
76
|
-
background: transparent linear-gradient(to bottom, $white, $white) 50% 50% / 16px 2px no-repeat;
|
77
|
-
|
78
|
-
&:after,
|
79
|
-
&:before {
|
80
|
-
content: '';
|
81
|
-
display: block;
|
82
|
-
width: 16px;
|
83
|
-
height: 2px;
|
84
|
-
background: $white;
|
85
|
-
transition:
|
86
|
-
.5s opacity,
|
87
|
-
.5s transform;
|
88
|
-
}
|
63
|
+
@include at-least($breakpoint) {
|
64
|
+
@include hidden;
|
65
|
+
}
|
89
66
|
|
90
|
-
|
91
|
-
|
92
|
-
|
67
|
+
@include button-reset;
|
68
|
+
@include shown;
|
69
|
+
z-index: 4;
|
70
|
+
width: 36px;
|
71
|
+
height: 36px;
|
72
|
+
margin-left: auto;
|
73
|
+
padding: 12px 10px;
|
74
|
+
border-radius: 50%;
|
75
|
+
transition: .5s transform;
|
76
|
+
box-shadow: 0 0 0 1px $white;
|
77
|
+
background: transparent linear-gradient(to bottom, $white, $white) 50% 50% / 16px 2px no-repeat;
|
93
78
|
|
94
|
-
|
95
|
-
|
96
|
-
|
79
|
+
&:after,
|
80
|
+
&:before {
|
81
|
+
content: '';
|
82
|
+
display: block;
|
83
|
+
width: 16px;
|
84
|
+
height: 2px;
|
85
|
+
background: $white;
|
86
|
+
transition:
|
87
|
+
.5s opacity,
|
88
|
+
.5s transform;
|
89
|
+
}
|
97
90
|
|
98
|
-
|
99
|
-
|
100
|
-
|
91
|
+
&:after {
|
92
|
+
margin: 8px 0;
|
93
|
+
}
|
94
|
+
|
95
|
+
// Fancy animation when menu open
|
96
|
+
.menu-open & {
|
97
|
+
transform: rotate(-45deg);
|
101
98
|
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
99
|
+
&:after {
|
100
|
+
transform: translateY(-5px) rotate(-90deg);
|
101
|
+
}
|
102
|
+
|
103
|
+
&:before {
|
104
|
+
transform: translateY(5px);
|
105
|
+
opacity: 0;
|
106
106
|
}
|
107
107
|
}
|
108
108
|
}
|
109
109
|
|
110
110
|
/* ===================================== *
|
111
|
-
*
|
111
|
+
* Common
|
112
112
|
* ------------------------------------- */
|
113
113
|
|
114
114
|
*,
|
@@ -124,18 +124,31 @@
|
|
124
124
|
}
|
125
125
|
|
126
126
|
/* ===================================== *
|
127
|
-
*
|
127
|
+
* Document
|
128
128
|
* ------------------------------------- */
|
129
129
|
|
130
|
+
html,
|
131
|
+
body {
|
132
|
+
overflow-x: hidden;
|
133
|
+
}
|
134
|
+
|
130
135
|
body {
|
131
136
|
display: flex;
|
132
137
|
min-height: 100vh;
|
133
138
|
flex-direction: column;
|
134
|
-
color: $
|
139
|
+
color: $steel;
|
135
140
|
font-weight: 400;
|
136
141
|
font-size: $base-size;
|
137
142
|
line-height: $base-height;
|
138
|
-
|
143
|
+
|
144
|
+
h1,
|
145
|
+
h2,
|
146
|
+
h3,
|
147
|
+
h4,
|
148
|
+
h5,
|
149
|
+
h6 {
|
150
|
+
color: $space;
|
151
|
+
}
|
139
152
|
|
140
153
|
a,
|
141
154
|
input,
|
@@ -146,7 +159,7 @@ body {
|
|
146
159
|
}
|
147
160
|
|
148
161
|
/* ===================================== *
|
149
|
-
*
|
162
|
+
* Header
|
150
163
|
* ------------------------------------- */
|
151
164
|
|
152
165
|
// Main site header
|
@@ -180,7 +193,7 @@ header[role=banner] {
|
|
180
193
|
}
|
181
194
|
|
182
195
|
/* ===================================== *
|
183
|
-
*
|
196
|
+
* Navigation
|
184
197
|
* ------------------------------------- */
|
185
198
|
|
186
199
|
// Main site navigation
|
@@ -252,10 +265,10 @@ header[role=banner] > nav[role=navigation] {
|
|
252
265
|
}
|
253
266
|
|
254
267
|
/* ===================================== *
|
255
|
-
*
|
268
|
+
* Main
|
256
269
|
* ------------------------------------- */
|
257
270
|
|
258
271
|
// Main content
|
259
272
|
main {
|
260
273
|
flex: 1;
|
261
|
-
}
|
274
|
+
}
|