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,14 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ <article class="post">
5
+
6
+ <header class="post-header">
7
+ <h1 class="post-title">{{ page.title }}</h1>
8
+ </header>
9
+
10
+ <div class="post-content">
11
+ {{ content }}
12
+ </div>
13
+
14
+ </article>
@@ -0,0 +1,15 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ <article class="post">
5
+
6
+ <header class="post-header">
7
+ <h1>{{ page.title }}</h1>
8
+ <p>{{ page.subtitle }}</p>
9
+ </header>
10
+
11
+ <main class="post-content">
12
+ {{ content }}
13
+ </main>
14
+
15
+ </article>
@@ -0,0 +1,11 @@
1
+ require 'json'
2
+
3
+ module ChameleonVersion
4
+ class Generator < Jekyll::Generator
5
+ def generate(site)
6
+
7
+ site.data['chameleon_version'] = JSON.load(File.open(File.expand_path('../../../package.json', __FILE__)))['version']
8
+
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,22 @@
1
+ require 'fileutils'
2
+
3
+ class MyNewCommand < Jekyll::Command
4
+ class << self
5
+
6
+ # As the docs get precompiled before being sent up to jekyll,
7
+ # and they sit inside Chameleon, the images folder needs to be
8
+ # copied into the docs repo.
9
+ if (!File.directory?('images'))
10
+ FileUtils.cp_r '../images', 'images'
11
+ end
12
+
13
+ def init_with_program(prog)
14
+ prog.command(:build) do |c|
15
+ c.action do
16
+ puts "hello world"
17
+ end
18
+ end
19
+ end
20
+
21
+ end
22
+ end
@@ -0,0 +1,2 @@
1
+ require "jekyll-assets"
2
+ require "autoprefixer-rails"
@@ -0,0 +1,28 @@
1
+ ---
2
+ layout: post
3
+ title: "Getting Started"
4
+ categories: chameleon
5
+ permalink: /chameleon/getting-started
6
+ ---
7
+
8
+ Chameleon is designed to work with most frameworks. If you find a language or framework doesn't seem to be working, feel free to create a pull request.
9
+
10
+ ## Importing with Sass
11
+
12
+ Create a new `chameleon_and_globals.scss` file in your sass directory, and add the following:
13
+
14
+ ```scss
15
+ @import 'chameleon';
16
+ @include CHAMELEON-base;
17
+ ```
18
+
19
+ This will bring in the core chameleon file, and the base styles (reset and box model). However to reduce bloat, not all patterns are included by default. You can now include the relevant mixins required for your project.
20
+
21
+ For example, if you only required the grid, typography, and form patterns:
22
+
23
+ ```scss
24
+ @include CHAMELEON-grid;
25
+ @include CHAMELEON-typography;
26
+ @include CHAMELEON-forms;
27
+ ...
28
+ ```
@@ -0,0 +1,24 @@
1
+ ---
2
+ layout: post
3
+ title: "Overview"
4
+ categories: chameleon
5
+ permalink: /
6
+ ---
7
+
8
+ Chameleon is a library of front-end patterns, variables, and helpers that when used, will Pusherify your UI!
9
+
10
+ It includes our color palettes, typography, and repeated components that are used across our products.
11
+
12
+ ### FAQ
13
+
14
+ *Why would I want to use this?*
15
+
16
+ If you're working on a public facing app or project, then it's important that the visual style is kept consistent. The core aim of this library, is to help you spend less time worrying about what font-size something should be, or what the primary colour is. All of the variables are set, and many repeated patterns are here ready to drop in.
17
+
18
+ *What things are in here?*
19
+
20
+ Firstly, the base Sass variables. These include our colours, our typefaces, our font-weights, and our breakpoints. Certain patterns that are (or are likely to be) repeated across projects can also be found here. For example, buttons, form fields, and labels. There are also a few larger components, however for the most part, these are kept at project level.
21
+
22
+ *Credits*
23
+
24
+ Zurb Foundation for the the grid. Marvel for their colour naming convention.
@@ -0,0 +1,61 @@
1
+ ---
2
+ layout: post
3
+ title: "Buttons"
4
+ subtitle: "We have three main buttons styles: primary, secondary, and tertiary. Ideally, the primary button should only ever be used once on a page as the main call to action."
5
+ categories: components
6
+ permalink: /components/buttons/
7
+ ---
8
+
9
+ <div class="pattern">
10
+ <a class="btn btn--primary">Get Started</a>
11
+ <a class="btn btn--primary ghosted">Get Started</a>
12
+ </div>
13
+
14
+ ``` html
15
+ <a class="btn btn--primary">Get Started</a>
16
+ <a class="btn btn--primary ghosted">Get Started</a>
17
+ ```
18
+
19
+ <div class="pattern pattern--dark">
20
+ <a class="btn btn--secondary">Update</a>
21
+ <a class="btn btn--secondary ghosted">Update</a>
22
+ </div>
23
+
24
+ ``` html
25
+ <a class="btn btn--secondary">Update</a>
26
+ <a class="btn btn--secondary ghosted">Update</a>
27
+ ```
28
+
29
+ <div class="pattern pattern--dark">
30
+ <a class="btn btn--tertiary">View Libraries</a>
31
+ </div>
32
+
33
+ ``` html
34
+ <a class="btn btn--tertiary">View Libraries</a>
35
+ ```
36
+
37
+ ## Small
38
+ There is also a smaller button style. This is mainly used for UI elements, and in tables.
39
+
40
+ <div class="pattern pattern">
41
+ <a class="btn btn--primary btn--small">Copy Snippet</a>
42
+ <a class="btn btn--neutral btn--small">Test</a>
43
+ </div>
44
+
45
+ ``` html
46
+ <a class="btn btn--primary btn--small">Copy Snippet</a>
47
+ <a class="btn btn--neutral btn--small">Test</a>
48
+ ```
49
+
50
+ ## Social Buttons
51
+ These are used for linking social accounts when signing in/registering with Pusher
52
+
53
+ <div class="pattern">
54
+ <button class="btn btn--google">Connect Google Account</button>
55
+ <button class="btn btn--github">Connect GitHub Account</button>
56
+ </div>
57
+
58
+ ``` html
59
+ <button class="btn btn--google">Connect Google Account</button>
60
+ <button class="btn btn--github">Connect GitHub Account</button>
61
+ ```
@@ -0,0 +1,139 @@
1
+ ---
2
+ layout: post
3
+ title: "Colors"
4
+ subtitle: "This is our new color palette. All new branded content should now be using these rather than the legacy blue/pink."
5
+ categories: layout
6
+ permalink: /layout/colors/
7
+ ---
8
+
9
+ ## Primary Colors
10
+
11
+ <div class="grid grid--collapse">
12
+ <div class="grid__small-12 grid__medium-6 grid__columns">
13
+ <div class="color-block cb-primary">
14
+ <ul>
15
+ <li>$color-primary</li>
16
+ <li>#549eff</li>
17
+ <li>rgb(84, 158, 255)</li>
18
+ <li>Pantone Solid Uncoated 2173 U</li>
19
+ </ul>
20
+ </div>
21
+ </div>
22
+ <div class="grid__small-12 grid__medium-6 grid__columns grid--end">
23
+ <div class="color-block cb-developer">
24
+ <ul>
25
+ <li>$color-developer</li>
26
+ <li>#58d794</li>
27
+ <li>rgb(88, 215, 148)</li>
28
+ <li>Pantone Solid Uncoated 353 U</li>
29
+ </ul>
30
+ </div>
31
+ </div>
32
+ </div>
33
+
34
+ <div class="space-breaker"></div>
35
+
36
+ ## Neutral Colors
37
+ We also have a defined palette of neutral colors, that can be used for text and borders.
38
+
39
+ <div class="grid grid--collapse">
40
+ <div class="grid__small-12 grid__medium-4 grid__columns">
41
+ <div class="color-block cb-white">
42
+ <ul>
43
+ <li>$color-white</li>
44
+ <li>#ffffff</li>
45
+ <li>rgb(255, 255, 255)</li>
46
+ </ul>
47
+ </div>
48
+ </div>
49
+ <div class="grid__small-12 grid__medium-4 grid__columns">
50
+ <div class="color-block cb-snow">
51
+ <ul>
52
+ <li>$color-snow</li>
53
+ <li>#f4f8fb</li>
54
+ <li>rgb(244, 248, 251)</li>
55
+ </ul>
56
+ </div>
57
+ </div>
58
+ <div class="grid__small-12 grid__medium-4 grid__columns">
59
+ <div class="color-block cb-smoke">
60
+ <ul>
61
+ <li>$color-smoke</li>
62
+ <li>#d3dce7</li>
63
+ <li>rgb(211, 220, 231)</li>
64
+ </ul>
65
+ </div>
66
+ </div>
67
+ <div class="grid__small-12 grid__medium-4 grid__columns">
68
+ <div class="color-block cb-silver">
69
+ <ul>
70
+ <li>$color-silver</li>
71
+ <li>#8690a6</li>
72
+ <li>rgb(134, 144, 166)</li>
73
+ </ul>
74
+ </div>
75
+ </div>
76
+
77
+ <div class="grid__small-12 grid__medium-4 grid__columns">
78
+ <div class="color-block cb-slate">
79
+ <ul>
80
+ <li>$color-slate</li>
81
+ <li>#414859</li>
82
+ <li>rgb(65, 72, 89)</li>
83
+ </ul>
84
+ </div>
85
+ </div>
86
+ <div class="grid__small-12 grid__medium-4 grid__columns grid--end">
87
+ <div class="color-block cb-black">
88
+ <ul>
89
+ <li>$color-black</li>
90
+ <li>#2b303b</li>
91
+ <li>rgb(43, 48, 59)</li>
92
+ </ul>
93
+ </div>
94
+ </div>
95
+ </div>
96
+
97
+ <div class="space-breaker"></div>
98
+
99
+ ## UI Colors
100
+ These colors should be used to highlight elements that require action. They are mainly used on [Alerts](/alerts).
101
+
102
+ <div class="grid grid--collapse">
103
+ <div class="grid__small-12 grid__medium-3 grid__columns">
104
+ <div class="color-block cb-success">
105
+ <ul>
106
+ <li>$color-success</li>
107
+ <li>#43ac6a</li>
108
+ <li>rgb(67, 172, 106)</li>
109
+ </ul>
110
+ </div>
111
+ </div>
112
+ <div class="grid__small-12 grid__medium-3 grid__columns">
113
+ <div class="color-block cb-warning">
114
+ <ul>
115
+ <li>$color-warning</li>
116
+ <li>#ffae00</li>
117
+ <li>rgb(255, 174, 0)</li>
118
+ </ul>
119
+ </div>
120
+ </div>
121
+ <div class="grid__small-12 grid__medium-3 grid__columns">
122
+ <div class="color-block cb-alert">
123
+ <ul>
124
+ <li>$color-danger</li>
125
+ <li>#b74a48</li>
126
+ <li>rgb(183, 74, 72)</li>
127
+ </ul>
128
+ </div>
129
+ </div>
130
+ <div class="grid__small-12 grid__medium-3 grid__columns">
131
+ <div class="color-block cb-information">
132
+ <ul>
133
+ <li>$color-information</li>
134
+ <li>#34495e</li>
135
+ <li>rgb(52, 73, 94)</li>
136
+ </ul>
137
+ </div>
138
+ </div>
139
+ </div>
@@ -0,0 +1,24 @@
1
+ ---
2
+ layout: post
3
+ title: "Flex Aligners"
4
+ subtitle: "Flexbox is a relatively new feature in CSS that allows for easy alignment of content. A number of helper classes are included in chameleon that allow for flexbox to quickly be used."
5
+ categories: layout
6
+ permalink: /layout/flex/
7
+ ---
8
+
9
+ <div class="pattern">
10
+ <div class="grid grid--collapse">
11
+ <div class="grid__columns-12">
12
+ <div class="flex-block u-vertical-align u-horizontal-align">
13
+ <p>This is aligned vertically and horizontally</p>
14
+ </div>
15
+ </div>
16
+ </div>
17
+ </div>
18
+
19
+
20
+ ``` html
21
+ <div class="u-vertical-align u-horizontal-align">
22
+ <p>This is aligned vertically and horizontally</p>
23
+ </div>
24
+ ```
@@ -0,0 +1,66 @@
1
+ ---
2
+ layout: post
3
+ title: "Forms"
4
+ subtitle: "Form inputs can be used without having to add any additional classes. With the exception of checkboxes and radios, they will always default to 100% width of their parent."
5
+ categories: components
6
+ permalink: /components/forms/
7
+ ---
8
+
9
+ ## Basic Input
10
+ <div class="pattern">
11
+ <input type="email" placeholder="Email address">
12
+ </div>
13
+
14
+ ``` html
15
+ <input type="email" placeholder="Email address">
16
+ ```
17
+
18
+ There are also modifier classes for inputs that sit on a darker background:
19
+
20
+ <div class="pattern pattern--dark">
21
+ <input type="email" class="input--light" placeholder="Email address">
22
+ </div>
23
+
24
+ ``` html
25
+ <input type="email" class="input--light" placeholder="Email address">
26
+ ```
27
+
28
+ As well as classes to indicate status:
29
+
30
+ <div class="pattern">
31
+ <input type="email" class="valid" placeholder="Email address">
32
+ <input type="password" class="error" style="margin-top:20px" placeholder="Password">
33
+ </div>
34
+
35
+ ``` html
36
+ <input type="email" class="valid" placeholder="Email address">
37
+ <input type="password" class="error" placeholder="Password">
38
+ ```
39
+
40
+ ## Select
41
+ <div class="pattern">
42
+ <select>
43
+ <option selected disabled>Select a cluster</option>
44
+ <option>mt1 (us-east-1)</option>
45
+ <option>eu (eu-west-1)</option>
46
+ <option>ap1 (ap-southeast-1)</option>
47
+ </select>
48
+ </div>
49
+
50
+ ```html
51
+ <select>
52
+ <option selected disabled>Select a cluster</option>
53
+ <option>mt1 (us-east-1)</option>
54
+ <option>eu (eu-west-1)</option>
55
+ <option>ap1 (ap-southeast-1)</option>
56
+ </select>
57
+ ```
58
+
59
+ ## Checkbox
60
+ <div class="pattern">
61
+ <input type="checkbox" value="1" checked="checked" name="hello" id="hello">
62
+ </div>
63
+
64
+ ```html
65
+ <input type="checkbox" value="1" checked="checked" name="hello" id="hello">
66
+ ```
@@ -0,0 +1,28 @@
1
+ ---
2
+ layout: post
3
+ title: "Visibility"
4
+ subtitle: "There are a number of utility classes, including a set of visibility classes. These allow content to be hidden under certain circumstances (for example at differing screen sizes)."
5
+ categories: layout
6
+ permalink: /layout/visibility/
7
+ ---
8
+
9
+ Each breakpoint has it's own set of classes that can be used:
10
+
11
+ ```sass
12
+ $breakpoints: (
13
+ small: 0,
14
+ medium: 640px,
15
+ large: 1024px,
16
+ xlarge: 1200px,
17
+ xxlarge: 1440px,
18
+ );
19
+ ```
20
+
21
+ ``` html
22
+ <div class="hide-for-small"></div>
23
+ <div class="hide-for-large"></div>
24
+ ...
25
+ <div class="show-for-medium"></div>
26
+ <div class="show-for-xlarge"></div>
27
+ ...
28
+ ```