pusher-chameleon 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +7 -0
  2. data/.ruby-version +1 -0
  3. data/Gemfile +3 -0
  4. data/Gemfile.lock +23 -0
  5. data/README.md +17 -0
  6. data/docs/.gitignore +4 -0
  7. data/docs/Gemfile +10 -0
  8. data/docs/Gemfile.lock +72 -0
  9. data/docs/README.md +15 -0
  10. data/docs/Rakefile +40 -0
  11. data/docs/_config.production.yml +18 -0
  12. data/docs/_config.yml +39 -0
  13. data/docs/_includes/footer.html +38 -0
  14. data/docs/_includes/head.html +15 -0
  15. data/docs/_includes/header.html +27 -0
  16. data/docs/_includes/icon-github.html +1 -0
  17. data/docs/_includes/icon-github.svg +3 -0
  18. data/docs/_includes/logo-pusher.svg +4 -0
  19. data/docs/_includes/sidebar.html +33 -0
  20. data/docs/_layouts/default.html +53 -0
  21. data/docs/_layouts/page.html +14 -0
  22. data/docs/_layouts/post.html +15 -0
  23. data/docs/_plugins/chameleon_version.rb +11 -0
  24. data/docs/_plugins/copy_images_directory.rb +22 -0
  25. data/docs/_plugins/ext.rb +2 -0
  26. data/docs/_posts/2016-03-16-getting-started.md +28 -0
  27. data/docs/_posts/2016-03-16-introduction.md +24 -0
  28. data/docs/_posts/2016-03-17-buttons.md +61 -0
  29. data/docs/_posts/2016-03-17-colors.md +139 -0
  30. data/docs/_posts/2016-03-17-flex.md +24 -0
  31. data/docs/_posts/2016-03-17-forms.md +66 -0
  32. data/docs/_posts/2016-03-17-visibility.md +28 -0
  33. data/docs/_posts/2016-04-04-typography.md +111 -0
  34. data/docs/_posts/2016-04-05-syntax-highlighting.md +28 -0
  35. data/docs/_posts/2016-05-08-alerts.md +50 -0
  36. data/docs/_posts/2016-05-12-labels.md +22 -0
  37. data/docs/_posts/2016-05-13-tooltips.md +33 -0
  38. data/docs/_sass/_base.scss +36 -0
  39. data/docs/_sass/_chameleon_imports.scss +20 -0
  40. data/docs/_sass/_layout.scss +136 -0
  41. data/docs/_sass/_typography.scss +41 -0
  42. data/docs/_sass/layout/_aside.scss +151 -0
  43. data/docs/about.md +15 -0
  44. data/docs/autoprefixer.yml +4 -0
  45. data/docs/css/main.scss +11 -0
  46. data/docs/feed.xml +30 -0
  47. data/docs/index.html +23 -0
  48. data/images/ui_icons/alert_beta.svg +3 -0
  49. data/images/ui_icons/alert_info.svg +3 -0
  50. data/images/ui_icons/alert_tick.svg +6 -0
  51. data/images/ui_icons/alert_warning.svg +6 -0
  52. data/images/ui_icons/chevron_down.svg +3 -0
  53. data/images/ui_icons/github--active.svg +6 -0
  54. data/images/ui_icons/github.svg +6 -0
  55. data/images/ui_icons/google--active.svg +6 -0
  56. data/images/ui_icons/google.svg +10 -0
  57. data/images/ui_icons/plus.svg +3 -0
  58. data/javascripts/chameleon/code_box.js +14 -0
  59. data/javascripts/chameleon/pusher_featurette.js +52 -0
  60. data/javascripts/chameleon/pusher_text_cycler.js +60 -0
  61. data/lib/pusher-chameleon.rb +71 -0
  62. data/lib/pusher-chameleon/engine.rb +13 -0
  63. data/lib/pusher-chameleon/version.rb +8 -0
  64. data/package.json +24 -0
  65. data/pusher-chameleon.gemspec +21 -0
  66. data/stylesheets/.gitkeep +0 -0
  67. data/stylesheets/_base.scss +400 -0
  68. data/stylesheets/_global.scss +96 -0
  69. data/stylesheets/chameleon.scss +30 -0
  70. data/stylesheets/components/_alert.scss +102 -0
  71. data/stylesheets/components/_code_box.scss +84 -0
  72. data/stylesheets/components/_flex_aligners.scss +38 -0
  73. data/stylesheets/components/_label.scss +41 -0
  74. data/stylesheets/components/_signpost.scss +150 -0
  75. data/stylesheets/components/_spacers.scss +11 -0
  76. data/stylesheets/components/_statistic.scss +62 -0
  77. data/stylesheets/components/_tooltip.scss +65 -0
  78. data/stylesheets/components/_visibility.scss +117 -0
  79. data/stylesheets/forms/_base.scss +47 -0
  80. data/stylesheets/forms/_buttons.scss +242 -0
  81. data/stylesheets/forms/_checkbox.scss +31 -0
  82. data/stylesheets/forms/_field.scss +11 -0
  83. data/stylesheets/forms/_fieldset.scss +18 -0
  84. data/stylesheets/forms/_forms.scss +21 -0
  85. data/stylesheets/forms/_input.scss +14 -0
  86. data/stylesheets/forms/_range.scss +110 -0
  87. data/stylesheets/forms/_select.scss +15 -0
  88. data/stylesheets/forms/_textarea.scss +11 -0
  89. data/stylesheets/grid/_classes.scss +152 -0
  90. data/stylesheets/grid/_column.scss +126 -0
  91. data/stylesheets/grid/_flex-grid.scss +268 -0
  92. data/stylesheets/grid/_grid.scss +60 -0
  93. data/stylesheets/grid/_gutter.scss +34 -0
  94. data/stylesheets/grid/_layout.scss +51 -0
  95. data/stylesheets/grid/_position.scss +73 -0
  96. data/stylesheets/grid/_row.scss +95 -0
  97. data/stylesheets/grid/_size.scss +24 -0
  98. data/stylesheets/typography/_base.scss +60 -0
  99. data/stylesheets/typography/_helpers.scss +66 -0
  100. data/stylesheets/typography/_import.scss +54 -0
  101. data/stylesheets/typography/_syntax_highlighting.scss +168 -0
  102. data/stylesheets/typography/_syntax_highlighting_dark.scss +73 -0
  103. data/stylesheets/typography/_syntax_highlighting_light.scss +73 -0
  104. data/stylesheets/typography/_titles.scss +69 -0
  105. data/stylesheets/typography/_typography.scss +12 -0
  106. data/stylesheets/util/_breakpoint.scss +273 -0
  107. data/stylesheets/util/_color.scss +42 -0
  108. data/stylesheets/util/_flex.scss +68 -0
  109. data/stylesheets/util/_mixins.scss +233 -0
  110. data/stylesheets/util/_selector.scss +40 -0
  111. data/stylesheets/util/_unit.scss +90 -0
  112. data/stylesheets/util/_url_helper.scss +30 -0
  113. data/stylesheets/util/_util.scss +13 -0
  114. data/stylesheets/util/_value.scss +107 -0
  115. metadata +199 -0
@@ -0,0 +1,111 @@
1
+ ---
2
+ layout: post
3
+ title: "Typography"
4
+ categories: layout
5
+ permalink: /layout/typography/
6
+ ---
7
+
8
+ We have two core fonts: `Realtime Text` and `Proxima Nova`.
9
+
10
+ Realtime Text is used for titles and elements (such as buttons), whereas Proxima Nova is used for paragraph text.
11
+
12
+ Title classes use the Greek alphabet as a naming convention. This allows the styled heading to be seperated from the semantic tag.
13
+
14
+ For example, an H1 and an H6 with a `title--gamma` class, will both visually look the same.
15
+
16
+ <div class="pattern">
17
+ <h1 class="title--alpha pattern-item">Page title (28px)</h1>
18
+ <br>
19
+ <h2 class="title--beta pattern-item">Section title - (24px)</h2>
20
+ <br>
21
+ <h3 class="title--gamma pattern-item">Section sub-title - (22px)</h3>
22
+ <br>
23
+ <h4 class="title--delta pattern-item">Paragraph title - (18px)</h4>
24
+ <br>
25
+ <h5 class="title--epsilon pattern-item">Paragraph sub-title - (16px)</h5>
26
+ <br>
27
+ <h6 class="title--zeta pattern-item">Paragraph heading - (12px)</h6>
28
+ </div>
29
+
30
+ ``` html
31
+ <h1 class="title--alpha">H1 - Page title</h1>
32
+ <h2 class="title--beta">H2 - Section title</h2>
33
+ <h3 class="title--delta">H3 - Section sub-title</h3>
34
+ <h4 class="title--gamma">H4 - Paragraph title</h4>
35
+ <h5 class="title--epsilon">H5 - Paragraph sub-title</h5>
36
+ <h6 class="title--zeta">H6 - Paragraph heading</h6>
37
+ ```
38
+
39
+ * * *
40
+
41
+ ## Utility Classes
42
+
43
+ These classes provide a quick way to change text color and alignment.
44
+
45
+ <div class="pattern">
46
+ <span class="u-color-primary">I will always be colored with the primary color</span>
47
+ <br>
48
+ <br>
49
+ <span class="u-color-developer">I will always be colored with the developer color</span>
50
+ <br>
51
+ <br>
52
+ <span class="u-color-beta">I will always be colored with the beta color</span>
53
+ <br>
54
+ <br>
55
+ <span class="u-color-snow">I will always be colored with the neutral snow color</span>
56
+ <br>
57
+ <br>
58
+ <span class="u-color-smoke">I will always be colored with the neutral smoke color</span>
59
+ <br>
60
+ <br>
61
+ <span class="u-color-silver">I will always be colored with the neutral silver color</span>
62
+ <br>
63
+ <br>
64
+ <span class="u-color-slate">I will always be colored with the neutral slate color</span>
65
+ <br>
66
+ <br>
67
+ <span class="u-color-black">I will always be colored with the neutral black color</span>
68
+ <br>
69
+ <br>
70
+ <span class="u-color-danger">I will always be colored with the ui danger color</span>
71
+ <br>
72
+ <br>
73
+ <span class="u-color-warning">I will always be colored with the ui warning color</span>
74
+ <br>
75
+ <br>
76
+ <span class="u-color-success">I will always be colored with the ui success color</span>
77
+ </div>
78
+
79
+ ```html
80
+ <span class="u-color-primary">I will always be colored with the primary color</span>
81
+ <span class="u-color-developer">I will always be colored with the developer color</span>
82
+ <span class="u-color-beta">I will always be colored with the beta color</span>
83
+ <span class="u-color-snow">I will always be colored with the neutral snow color</span>
84
+ <span class="u-color-smoke">I will always be colored with the neutral smoke color</span>
85
+ <span class="u-color-silver">I will always be colored with the neutral silver color</span>
86
+ <span class="u-color-slate">I will always be colored with the neutral slate color</span>
87
+ <span class="u-color-black">I will always be colored with the neutral black color</span>
88
+ <span class="u-color-danger">I will always be colored with the ui danger color</span>
89
+ <span class="u-color-warning">I will always be colored with the ui warning color</span>
90
+ <span class="u-color-success">I will always be colored with the ui success color</span>
91
+ ```
92
+
93
+ <div class="pattern u-text-align-center">
94
+ <span>I will be aligned centrally on desktop and tablet, and left aligned on mobile</span>
95
+ </div>
96
+
97
+ ```html
98
+ <div class="u-text-align-center">
99
+ <span>I will be aligned centrally on desktop and tablet, and left aligned on mobile</span>
100
+ </div>
101
+ ```
102
+
103
+ <div class="pattern u-text-align-right">
104
+ <span>I will be aligned to the right</span>
105
+ </div>
106
+
107
+ ```html
108
+ <div class="u-text-align-right">
109
+ <span>I will be aligned to the right</span>
110
+ </div>
111
+ ```
@@ -0,0 +1,28 @@
1
+ ---
2
+ layout: post
3
+ title: "Syntax Highlighting"
4
+ subtitle: "For code snippets, a pygments typography mixin is included to highlight different languages."
5
+ categories: layout
6
+ permalink: /layout/syntax-highlighting/
7
+ ---
8
+
9
+ To use the mixin, just ensure that your codesnippets are wrapped in a `.highlight` class.
10
+
11
+ **Ruby**
12
+
13
+ ``` ruby
14
+ Pusher.trigger('my-channel', 'my-event', {
15
+ message: 'hello world'
16
+ });
17
+ ```
18
+
19
+ ***
20
+
21
+ **JavaScript**
22
+
23
+ ``` javascript
24
+ var channel = pusher.subscribe('my-channel');
25
+ channel.bind('my-event', function(data) {
26
+ alert('Received my-event with message: ' + data.message);
27
+ });
28
+ ```
@@ -0,0 +1,50 @@
1
+ ---
2
+ layout: post
3
+ title: "Alerts"
4
+ subtitle: "Inline alerts are useful for attracting a users attention. They default to 100% width of the parent container."
5
+ categories: components
6
+ permalink: /components/alerts/
7
+ ---
8
+ <div class="pattern">
9
+ <div class="alert alert--information">
10
+ <span class="alert__copy"><strong>Important:</strong> Protocols 1, 2, and 3 are no longer supported</span>
11
+ </div>
12
+ </div>
13
+ ``` html
14
+ <div class="alert alert--information">
15
+ <span class="alert__copy"><strong>Important:</strong> Protocols 1, 2, and 3 are no longer supported</span>
16
+ </div>
17
+ ```
18
+
19
+ <div class="pattern">
20
+ <div class="alert alert--error">
21
+ <span class="alert__copy">Sorry, something's gone wrong. Try again in a moment</span>
22
+ </div>
23
+ </div>
24
+ ``` html
25
+ <div class="alert alert--error">
26
+ <span class="alert__copy">Sorry, something's gone wrong. Try again in a moment</span>
27
+ </div>
28
+ ```
29
+
30
+ <div class="pattern">
31
+ <div class="alert alert--success">
32
+ <span class="alert__copy">Great! You're now signed up to receive our newsletter!</span>
33
+ </div>
34
+ </div>
35
+ ``` html
36
+ <div class="alert alert--success">
37
+ <span class="alert__copy">Great! You're now signed up to receive our newsletter!</span>
38
+ </div>
39
+ ```
40
+
41
+ <div class="pattern">
42
+ <div class="alert alert--beta">
43
+ <span class="alert__copy">Our Push Notifications system is currently in beta. This means you may experience errors, and the APIs may change.</span>
44
+ </div>
45
+ </div>
46
+ ``` html
47
+ <div class="alert alert--beta">
48
+ <span class="alert__copy">Our Push Notifications system is currently in beta. This means you may experience errors, and the APIs may change.</span>
49
+ </div>
50
+ ```
@@ -0,0 +1,22 @@
1
+ ---
2
+ layout: post
3
+ title: "Labels"
4
+ subtitle: "Labels are standalone inline-block elements useful for highlighting information, and conveying interface feedback"
5
+ categories: components
6
+ permalink: /components/labels/
7
+ ---
8
+ <div class="pattern">
9
+ <span class="label label--success">Collaborator</span>
10
+ <span class="label label--warning">Connection Timeout</span>
11
+ <span class="label label--danger">Error</span>
12
+ <span class="label label--information">Information</span>
13
+ <span class="label label--beta">Beta</span>
14
+ </div>
15
+
16
+ ``` html
17
+ <span class="label label--success">Connected</span>
18
+ <span class="label label--warning">Connection Timeout</span>
19
+ <span class="label label--danger">Error</span>
20
+ <span class="label label--information">Information</span>
21
+ <span class="label label--beta">Beta</span>
22
+ ```
@@ -0,0 +1,33 @@
1
+ ---
2
+ layout: post
3
+ title: "Tooltips"
4
+ categories: components
5
+ permalink: /components/tooltips/
6
+ ---
7
+
8
+ Toolips are useful for adding in extra information, that doesn't make sense always showing.
9
+
10
+
11
+ <div class="pattern">
12
+ <span class="tooltip" data-tooltip-title="We aim to respond to support queries within 72 hours">
13
+ <button class="btn btn--primary">Hover Me</button>
14
+ </span>
15
+ </div>
16
+
17
+ ``` html
18
+ <span class="tooltip" data-tooltip-title="We aim to respond to support queries within 72 hours">
19
+ <button class="btn btn--primary">Hover Me</button>
20
+ </span>
21
+ ```
22
+
23
+ <div class="pattern pattern--dark">
24
+ <span class="tooltip tooltip--light" data-tooltip-title="We aim to respond to support queries within 72 hours">
25
+ <button class="btn btn--primary">Hover Me</button>
26
+ </span>
27
+ </div>
28
+
29
+ ``` html
30
+ <span class="tooltip tooltip--light" data-tooltip-title="We aim to respond to support queries within 72 hours">
31
+ <button class="btn btn--primary">Hover Me</button>
32
+ </span>
33
+ ```
@@ -0,0 +1,36 @@
1
+
2
+ /**
3
+ * Code formatting
4
+ */
5
+ .highlight {
6
+ border-radius: 3px;
7
+ margin: 10px 0;
8
+ }
9
+
10
+ code {
11
+ padding: 1px 5px;
12
+ }
13
+
14
+ pre {
15
+ padding: 8px 12px;
16
+ overflow-x: auto;
17
+
18
+ > code {
19
+ border: 0;
20
+ padding-right: 0;
21
+ padding-left: 0;
22
+ }
23
+ }
24
+
25
+ p {
26
+ margin: 10px 0;
27
+ }
28
+
29
+ hr {
30
+ display: block;
31
+ height: 1px;
32
+ border: 0;
33
+ border-top: 1px solid #ddd;
34
+ margin: 30px 0;
35
+ padding: 0;
36
+ }
@@ -0,0 +1,20 @@
1
+ $font-url-helper-path: false;
2
+ $font-url-path: "/chameleon/fonts/";
3
+
4
+ @import '../../stylesheets/chameleon';
5
+
6
+ $global-font-smoothing: true;
7
+ $file-url-helper-path: true;
8
+ $file-url-path: "/chameleon/images/";
9
+
10
+
11
+ $font-family-secondary: 'Proxima Nova';
12
+
13
+ @include CHAMELEON-base;
14
+ @include CHAMELEON-grid;
15
+ @include CHAMELEON-typography;
16
+ @include CHAMELEON-forms;
17
+ @include CHAMELEON-flex-aligners;
18
+ @include CHAMELEON-alert;
19
+ @include CHAMELEON-labels;
20
+ @include CHAMELEON-tooltips;
@@ -0,0 +1,136 @@
1
+ .docs {
2
+ min-height: 100vh;
3
+
4
+ @media #{$medium-up} {
5
+ padding-left: 300px;
6
+ }
7
+ }
8
+
9
+ @import 'layout/aside';
10
+
11
+ .docs__content {
12
+ padding: 60px 0;
13
+
14
+ @media #{$medium-up} {
15
+ padding: 100px 0;
16
+ }
17
+ }
18
+
19
+ .pattern {
20
+ padding: 20px;
21
+ background-color: #fff;
22
+ border: 1px solid darken($color-snow, 5%);
23
+ border-bottom: 0;
24
+ border-radius: 3px 3px 0 0;
25
+
26
+ + .highlighter-rouge .highlight {
27
+ margin: 0 0 40px;
28
+ border-radius: 0 0 3px 3px;
29
+ }
30
+
31
+ &--dark {
32
+ background-color: $color-black;
33
+ border: 1px solid $color-black;
34
+ }
35
+
36
+ .grid {
37
+ margin-bottom: 20px;
38
+ }
39
+
40
+ .grid__columns > .grid-block {
41
+ min-height: 50px;
42
+ background-color: #eee;
43
+ text-align: center;
44
+ padding: 18px 4px;
45
+ font-size: 14px;
46
+ line-height: 1.2em;
47
+ }
48
+
49
+
50
+ .flex-block {
51
+ width: 100%;
52
+ height: 220px;
53
+ background-color: #eee;
54
+ }
55
+ }
56
+
57
+
58
+ .cb-var {
59
+ width: 100%;
60
+ height: 40px;
61
+ border: 1px dashed #ccc;
62
+ border-top: 0;
63
+ text-align: center;
64
+ font-size: 15px;
65
+ padding: 12px 0;
66
+ }
67
+
68
+ @each $colorName, $colorHex in $color-palette {
69
+ .cb-#{$colorName} {
70
+ background-color: $colorHex;
71
+ @if (lightness($colorHex) > 70) {
72
+ color: $color-black;
73
+ }
74
+ @else {
75
+ color: #fff;
76
+ }
77
+ }
78
+ }
79
+
80
+ @each $colorName, $colorHex in $color-neutrals {
81
+ .cb-#{$colorName} {
82
+ background-color: $colorHex;
83
+ @if (lightness($colorHex) > 60) {
84
+ color: $color-black;
85
+ border: 1px solid $color-snow;
86
+ }
87
+ @else {
88
+ color: #fff;
89
+ }
90
+ }
91
+ }
92
+
93
+ .post-header {
94
+ border-bottom: 2px solid $color-smoke;
95
+ padding-bottom: 20px;
96
+ margin-bottom: 20px;
97
+
98
+ p {
99
+ margin-bottom: 10px;
100
+ width: 100%;
101
+
102
+ @media #{$large-up} {
103
+ max-width: 45%;
104
+ }
105
+ }
106
+ }
107
+
108
+
109
+ .color-block {
110
+ width: 100%;
111
+ height: 180px;
112
+ padding: 26px 20px;
113
+
114
+ ul {
115
+ list-style: none;
116
+ margin: 0;
117
+ padding: 0;
118
+ }
119
+
120
+ ul li {
121
+ @extend %font-family-secondary;
122
+ display: block;
123
+ font-size: rem-calc(14px);
124
+
125
+ &:first-of-type {
126
+ margin-bottom: 20px;
127
+ font-size: rem-calc(18px);
128
+ font-weight: 400;
129
+ }
130
+ }
131
+ }
132
+
133
+ .space-breaker {
134
+ width: 100%;
135
+ height: 30px;
136
+ }
@@ -0,0 +1,41 @@
1
+ h1 {
2
+ @extend %font-family-primary;
3
+ @extend .title--alpha;
4
+ // font-size: rem-calc(24px);
5
+ // color: $color-slate;
6
+ // font-weight: 700;
7
+ // line-height: 1em;
8
+ // text-transform: uppercase;
9
+ }
10
+
11
+ h2:not(.pattern-item) {
12
+ @extend %font-family-primary;
13
+ font-size: rem-calc(16px);
14
+ color: $color-slate;
15
+ font-weight: 700;
16
+ text-transform: uppercase;
17
+ margin-bottom: 20px;
18
+ }
19
+
20
+ h3 {
21
+ @extend .title--gamma;
22
+ }
23
+
24
+ h4 {
25
+ @extend .title--delta;
26
+ }
27
+
28
+ h5 {
29
+ @extend .title--epsilon;
30
+ }
31
+
32
+ h6 {
33
+ @extend .title--zeta;
34
+ }
35
+
36
+ p {
37
+ font-size: rem-calc(18px);
38
+ line-height: 1.6em;
39
+ margin-bottom: rem-calc(20px);
40
+ color: $color-slate;
41
+ }