toadstool 0.0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. data/Gemfile +11 -0
  2. data/Rakefile +4 -0
  3. data/config.rb +42 -0
  4. data/config.ru +6 -0
  5. data/doc-src/SASS-Guidelines.md +222 -0
  6. data/doc-src/What-Is-Toadstool.md +44 -0
  7. data/doc-src/changelog.md +29 -0
  8. data/doc-src/config.md +18 -0
  9. data/doc-src/mit_license.md +7 -0
  10. data/doc-src/mixin_directory.md +17 -0
  11. data/doc-src/sass.md +4 -0
  12. data/lib/RackServer.rb +93 -0
  13. data/lib/bin/toadstool +99 -0
  14. data/public/fonts/fontawesome-webfont.eot +0 -0
  15. data/public/fonts/fontawesome-webfont.svg +255 -0
  16. data/public/fonts/fontawesome-webfont.ttf +0 -0
  17. data/public/fonts/fontawesome-webfont.woff +0 -0
  18. data/public/fonts/zocial-regular-webfont.eot +0 -0
  19. data/public/fonts/zocial-regular-webfont.svg +138 -0
  20. data/public/fonts/zocial-regular-webfont.ttf +0 -0
  21. data/public/fonts/zocial-regular-webfont.woff +0 -0
  22. data/public/images/toadstool-logo.png +0 -0
  23. data/public/javascripts/application.js +74 -0
  24. data/public/javascripts/css_browser_selector.js +8 -0
  25. data/public/javascripts/lang-apollo.js +2 -0
  26. data/public/javascripts/lang-clj.js +18 -0
  27. data/public/javascripts/lang-css.js +2 -0
  28. data/public/javascripts/lang-go.js +1 -0
  29. data/public/javascripts/lang-hs.js +2 -0
  30. data/public/javascripts/lang-lisp.js +3 -0
  31. data/public/javascripts/lang-lua.js +2 -0
  32. data/public/javascripts/lang-ml.js +2 -0
  33. data/public/javascripts/lang-n.js +4 -0
  34. data/public/javascripts/lang-proto.js +1 -0
  35. data/public/javascripts/lang-scala.js +2 -0
  36. data/public/javascripts/lang-sql.js +2 -0
  37. data/public/javascripts/lang-tex.js +1 -0
  38. data/public/javascripts/lang-vb.js +2 -0
  39. data/public/javascripts/lang-vhdl.js +3 -0
  40. data/public/javascripts/lang-wiki.js +2 -0
  41. data/public/javascripts/lang-xq.js +3 -0
  42. data/public/javascripts/lang-yaml.js +2 -0
  43. data/public/javascripts/modernizr.mods.js +22 -0
  44. data/public/javascripts/prettify.js +28 -0
  45. data/public/javascripts/selectivizr-min.js +5 -0
  46. data/public/stylesheets/style.css +615 -0
  47. data/public/stylesheets/toadstool.css +1643 -0
  48. data/readme.md +37 -0
  49. data/sass/_buttons.scss +20 -0
  50. data/sass/_config.scss +216 -0
  51. data/sass/_design.scss +6 -0
  52. data/sass/_forms.scss +18 -0
  53. data/sass/_modules.scss +12 -0
  54. data/sass/_reset.scss +5 -0
  55. data/sass/_typography.scss +93 -0
  56. data/sass/_ui_patterns.scss +0 -0
  57. data/sass/_web_fonts.scss +32 -0
  58. data/sass/buttons/_cupid_config.scss +20 -0
  59. data/sass/buttons/_minimal_config.scss +15 -0
  60. data/sass/color/_color_math.scss +63 -0
  61. data/sass/color/_extends.scss +291 -0
  62. data/sass/color/_grayscale_math.scss +10 -0
  63. data/sass/modules/example_module/_extends.scss +0 -0
  64. data/sass/modules/example_module/_mixins.scss +0 -0
  65. data/sass/modules/example_module/readme.md +96 -0
  66. data/sass/style.scss +45 -0
  67. data/sass/toadstool.scss +14 -0
  68. data/sass/ui_patterns/_color_grid.scss +286 -0
  69. data/sass/ui_patterns/_example.scss +0 -0
  70. data/toadstool.rb +84 -0
  71. data/views/abstract_colors.erb +1 -0
  72. data/views/alerts.erb +1 -0
  73. data/views/buttons.erb +1 -0
  74. data/views/color_palettes.erb +221 -0
  75. data/views/forms.erb +24 -0
  76. data/views/forms/disabled_button.erb +18 -0
  77. data/views/forms/password_input.erb +22 -0
  78. data/views/forms/primary_button.erb +18 -0
  79. data/views/forms/username_input.erb +23 -0
  80. data/views/grid.erb +127 -0
  81. data/views/grid24.erb +59 -0
  82. data/views/grids/grid_arguments.erb +22 -0
  83. data/views/grids/use_definition.erb +12 -0
  84. data/views/layout.erb +58 -0
  85. data/views/modules/example_module/module.erb +0 -0
  86. data/views/modules/example_module/module.js +0 -0
  87. data/views/modules/example_module/readme.md +29 -0
  88. data/views/modules/example_module/view.erb +0 -0
  89. data/views/modules/readme.md +10 -0
  90. data/views/semantic_colors.erb +1 -0
  91. data/views/shared/_html_example.erb +31 -0
  92. data/views/shared/_main_footer.erb +12 -0
  93. data/views/shared/_main_header.erb +4 -0
  94. data/views/shared/_main_nav.erb +16 -0
  95. data/views/shared/_sass_example.erb +10 -0
  96. data/views/shared/_toadstool_subheader.erb +6 -0
  97. data/views/typography.erb +17 -0
  98. data/views/typography/body_copy.erb +19 -0
  99. data/views/typography/body_links.erb +18 -0
  100. data/views/typography/general_typography.erb +19 -0
  101. data/views/typography/headings.erb +65 -0
  102. data/views/typography/vertical_rhythm.erb +13 -0
  103. data/views/typography/web_fonts.erb +11 -0
  104. data/views/ui_patterns/example.erb +1 -0
  105. data/views/ui_patterns/forms/text_input.erb +10 -0
  106. data/views/ui_patterns/readme.md +14 -0
  107. metadata +216 -0
data/readme.md ADDED
@@ -0,0 +1,37 @@
1
+ #Welcome to Toadstool
2
+ ![toadstool logo](/Anotheruiguy/toadstool/raw/master/public/images/toadstool-logo.png "toadstool - put that in your styleguide")
3
+
4
+ Toadstool is a Styleguide framework. Concepts are simple, build in the abstract and apply to the semantic.
5
+
6
+ Toadstool is currently developed as a Sinatra app using Sass (SCSS) and Compass. We have made recent updates that makes the core set of Sass functions into a Compass extension.
7
+
8
+ ##To run the app
9
+ Toadstool is built using ``Sinatra``, but you can run the app using ``shotgun`` if you prefer.
10
+
11
+ **To run** ``ruby toadstool.rb`` will start the app. If you are running a VM you may need to run ``ruby toadstool.rb -o 0.0.0.0``. If you are so inclined, feel free to reset the port like so ``ruby toadstool.rb -o 0.0.0.0 -p 3000``
12
+
13
+ A `Rakefile` has been added to the project, simply running `rake server` will start the app.
14
+
15
+ ##Sass / Compass
16
+ The Compass config is included in toadstool.rb, no need to run as a separate process.
17
+
18
+ *Note:* Sinatra serves the rendered Sass from memory without generating actual CSS files. However, if you have CSS files in public/stylesheets, those will be served instead. If you edit your Sass, but don't see your changes in the browser, delete any CSS files in public/stylesheets.
19
+
20
+ #Stipe Compass Extension
21
+ Stipe is the life blood of the Toadstool style guide framework. Consisting of a series of mixins, extends and defaults that give Toadstool that 'instant on' experience.
22
+
23
+ [Stipe](https://rubygems.org/gems/stipe)
24
+
25
+ ##To install
26
+ `gem install stipe`
27
+
28
+ Current gem version dependency => 0.0.3.8
29
+
30
+ ##To use
31
+ To use the Stipe gem, using Bundler `gem 'stipe'`
32
+
33
+ Stipe is a Compass Extension, so Compass is set as a depdency. You will need to include `require 'stipe'` in your config.rb file.
34
+
35
+
36
+ ###Please don't mind the mess ...
37
+ This is a work in progress, if you are following along at home, pull master a lot :D
@@ -0,0 +1,20 @@
1
+ // Toadstool comes pre-loaded with a series of pre-developed buttons
2
+ // Special thanks to Chad for the work (http://hellohappy.org/css3-buttons/)
3
+ // To use, simply uncomment the buttons you want and extend the silent class
4
+ // --------------------------------------------------------------------
5
+ // Minimal
6
+ @import "buttons/minimal_config"; // Minimal config options
7
+ @import "stipe/buttons/lib/minimal"; // Sass UI code
8
+
9
+ // Cupid-green
10
+ @import "buttons/cupid_config"; // Minimal config options
11
+ @import "stipe/buttons/lib/cupid-green"; // Sass UI code
12
+
13
+
14
+
15
+ // buttons
16
+ // --------------------------------------------------------------------
17
+ //* toadstool buttons */
18
+ button, a.button {
19
+ @extend %stipe_buttons; // pre-loaded silent class, I know you want to nuke this!
20
+ }
data/sass/_config.scss ADDED
@@ -0,0 +1,216 @@
1
+ // The config file is intended to allow users to quickly redefine core elements of the design
2
+ // that will cascade throughout the css to get your design up and running FAST!
3
+
4
+
5
+
6
+ ///// Typography configuration /////
7
+ // -----------------------------------------------------------------------------
8
+ // $font_size: 12;
9
+ //
10
+ // $heading_1: 46;
11
+ // $heading_2: 32;
12
+ // $heading_3: 28;
13
+ // $heading_4: 18;
14
+ // $heading_5: 18;
15
+ // $heading_6: 18;
16
+ //
17
+ // $line: $font_size * 1.5;
18
+ //
19
+ // $small_point_size: 10;
20
+ // $large_point_size: 14;
21
+ //
22
+ $primary_font_family: #{"Helvetica Neue", Arial, sans-serif};
23
+ // $secondary_font_family: #{"Helvetica Neue", Arial, sans-serif};
24
+ // $heading_font_family: #{"Helvetica Neue", Arial, sans-serif};
25
+
26
+ // $icon_font_alpha: #{'FontAwesome'};
27
+ // $icon_font_bravo: #{'zocial'};
28
+
29
+
30
+ ///// Default webfont directory /////
31
+ // -----------------------------------------------------------------------------
32
+ // $webfont_directory: "/fonts/";
33
+
34
+
35
+
36
+ ///// default image directory /////
37
+ // -----------------------------------------------------------------------------
38
+ // In Sinatra, the images folder resides in the public directory. This directory is not made publically accessible,
39
+ // so simply referencing the images directory will be fine.
40
+ // $imgDir: "/images/";
41
+
42
+
43
+
44
+ /////// OOCSS generic base colors ////////
45
+ // -----------------------------------------------------------------------------
46
+ // Red, green, yellow, blue, accent and black is not law, but a common theme in most designs.
47
+ // Using Toadstool, all you need to do is edit these 6 hex values and everything else is created
48
+ // by magic, unicorns and fairy dust!
49
+ // $alpha_primary: #5a2e2e; // red
50
+ // $bravo_primary: #3e4147; // green
51
+ // $charlie_primary: #fffedf; // yellow
52
+ // $delta_primary: #2a2c31; // blue
53
+ // $echo_primary: #dfba69; // accent
54
+
55
+ // $alpha_gray: #333; //black
56
+
57
+
58
+
59
+ /////// Toadstool color math ////////
60
+ // -----------------------------------------------------------------------------
61
+ // This is a bootstrap template for creating an array of colors
62
+ // @import "stipe/color/default_color_pallet";
63
+
64
+ // Don't like Stipe's color pallet, no worries. Uncomment these lines and go for it!
65
+ @import "color/color_math";
66
+ @import "color/grayscale_math";
67
+
68
+
69
+ /////// Grid configuration ////////
70
+ // -----------------------------------------------------------------------------
71
+ // setting default units of measurement for Toadstool grid solution
72
+ // $grid_type: 12; // sets default column grid
73
+ // $grid_uom: percent; // use either ``em`` or ``percent``
74
+ $grid_padding_l: 0 !default; // sets default left/right padding inside grid block
75
+ $grid_padding_r: 0 !default; // sets default left/right padding inside grid block
76
+ // $grid_padding_tb: 0; // sets default top/bottom padding inside grid block
77
+ // $grid_border: 0; // sets default border width on all grid blocks
78
+ // $grid_child: none; // sets parent child relationship between grid blocks
79
+ // $grid_align: default; // by default grids float left. Optional argument is ``center``
80
+ // $col_base: 10; // equal to 10px in the standard 960.gs
81
+ // $col_gutter: $col_base * 2; // sets default grid gutter width
82
+ // $grid_960: 960 / 100%; // grid math for percentages
83
+
84
+
85
+
86
+
87
+ /////// Toadstool's semantic variables ////////
88
+ // Semantic variables should always be matched up with abstract values, never semantic to semantic
89
+ // -----------------------------------------------------------------------------
90
+
91
+ // abstract 'white' value to easily applied to semantic class objects
92
+ // $white: #fff;
93
+
94
+ // default shadow colors
95
+ // $shadow_color: fade-out($alpha_gray, 0.5);
96
+
97
+ // primary header font color
98
+ // $primary_header_color: $alpha_gray;
99
+
100
+ // default heading font weight
101
+ // $heading_font_weight: normal;
102
+
103
+ // primary font color for the app
104
+ // $primary_text: $bravo_gray;
105
+
106
+ // default <a href="#"> link color
107
+ // $href_color: $delta_color;
108
+ // $href_color_alt: $delta_color_bravo;
109
+
110
+ // used with the <ins> tag
111
+ // http://www.w3schools.com/tags/tag_ins.asp
112
+ // $ins_color: $charlie_color;
113
+
114
+ // used with the <mark> tag
115
+ // http://www.w3schools.com/html5/tag_mark.asp
116
+ // $mark_color: $charlie_color;
117
+
118
+ // webkit tap highlight color
119
+ // $webkit_tap_hightlight: $delta_color_bravo;
120
+
121
+ // overrides the default content selection color in the browser
122
+ // $selection_color: $charlie_color;
123
+ // $selection_text_color: $primary_text;
124
+
125
+ // default border color
126
+ // $border_color: $charlie_gray;
127
+
128
+
129
+
130
+ // Config defaults for forms
131
+ // -----------------------------------------------------------------------------
132
+ // $alert_background_color: $alpha_color;
133
+
134
+ // $input_disabled: $bravo_gray;
135
+ // $input_disabled_bkg: lighten($input_disabled, 75%);
136
+ // $input_disabled_border: lighten($input_disabled, 50%);
137
+ // $input_disabled_text: lighten($input_disabled, 50%);
138
+ //
139
+ // $form_field_background_color: $white;
140
+ // $form_field_focus_color: $white;
141
+ // $form_field_fail_bkg: $white;
142
+ //
143
+ // $form_field_border: $charlie_gray;
144
+ // $form_field_border_fail: $alpha_color;
145
+ // $form_field_focus_border_color: $charlie_gray;
146
+ //
147
+ // $form_field_text: $primary_text;
148
+ // $error_text: $alpha_color;
149
+ // $form_field_fail: $alpha_color;
150
+ // $form_field_text_fail: $alpha_color;
151
+ // $instructional_text: $charlie_gray;
152
+ // $placeholder_text: $hotel_gray;
153
+ // $form_label_color: $alpha_gray;
154
+
155
+
156
+
157
+ // Config defaults for buttons
158
+ // -----------------------------------------------------------------------------
159
+ // $primary_button_border_color: $bravo_color;
160
+ // $secondary_button_border_color: $bravo_gray;
161
+ // $button_text: $white;
162
+
163
+
164
+
165
+ // Config defaults for ``standard_rounded_border`` mixin
166
+ // -----------------------------------------------------------------------------
167
+ // $standard_round_corner: 3; // sets default border radius
168
+ // $standard_corner_width: 1px; // sets default border width
169
+ // $standard_border_color: $border_color; // sets default border color
170
+
171
+
172
+
173
+ // Config defaults for ``standard_block_spacing`` mixin
174
+ // -----------------------------------------------------------------------------
175
+ // $default_block_spacing: 20; // sets margin-bottom
176
+
177
+
178
+
179
+ // Config defaults for site border style
180
+ // -----------------------------------------------------------------------------
181
+ // $standard_border_style: solid;
182
+
183
+
184
+
185
+ // Config defaults for ``standard_hr`` mixin
186
+ // -----------------------------------------------------------------------------
187
+ // $standard_hr_spacing: 40; // sets padding and margin bottom
188
+ // $standard_hr_color: $delta_gray;
189
+ // $standard_hr_width: 1px;
190
+
191
+
192
+
193
+ // Config values for all default shadows
194
+ // -----------------------------------------------------------------------------
195
+ // $h-shadow: 0; // horizontal shadow settings
196
+ // $v-shadow: 2; // vertical shaddow settings
197
+ // $blur: 3; // blur settings
198
+ //
199
+ // $inset_color: $shadow_color; // for use with ``dual_box_shadow`` mixin
200
+ // $ih-shadow: 0; // inset horizontal shadow settings
201
+ // $iv-shadow: 2; // inset vertical shaddow settings
202
+ // $is-shadow: 2; // inset spread shaddow settings
203
+ // $iblur: 3; // inset blur settings
204
+
205
+
206
+
207
+
208
+ /////////////// UI @media breakpoint defaults ////////////////
209
+ // -----------------------------------------------------------------------------
210
+ // $tablet: "screen and (max-width: 64em)";
211
+ // $tablet_portrait: "screen and (max-width: 50em) and (orientation: portrait)";
212
+ // $tablet_landscape: "screen and (max-width: 50em) and (orientation: landscape)";
213
+ //
214
+ // $mobile: "screen and (max-width: 30em)";
215
+ // $mobile_portrait: "screen and (max-width: 30em) and (orientation : portrait)";
216
+ // $mobile_landscape: "screen and (max-width: 30em) and (orientation : landscape)";
data/sass/_design.scss ADDED
@@ -0,0 +1,6 @@
1
+ // Grid background for column view
2
+ // @import "stipe/grid/debug";
3
+
4
+
5
+
6
+ ///////// global //////////
data/sass/_forms.scss ADDED
@@ -0,0 +1,18 @@
1
+ input[type=text], input[type=password], input[type="date"], select {
2
+ @extend %input_fields; // style comes from stipe/forms/_extends.scss
3
+ }
4
+
5
+ input[type=text], input[type=password], input[type="date"] {
6
+ @media #{$mobile} {
7
+ -webkit-appearance: none; // this is to remove the default inner shadow
8
+ -moz-appearance: none; // if this ever works, Moz bug for over a year
9
+ }
10
+ }
11
+
12
+ input[disabled], textarea[disabled], select[disabled], .disabled {
13
+ @extend %disabled_inputs; // style comes from stipe/forms/_extends.scss
14
+ }
15
+
16
+ label {
17
+ @extend %form_labels; // style comes from stipe/forms/_extends.scss
18
+ }
@@ -0,0 +1,12 @@
1
+
2
+ // Resource file that will import designated mixin and extend files
3
+ // --------------------------------------------
4
+
5
+ // List mixins to import here
6
+ // --------------------------------------------
7
+ @import "modules/example_module/mixins";
8
+
9
+
10
+ // List extends to import here
11
+ // --------------------------------------------
12
+ @import "modules/example_module/extends";
data/sass/_reset.scss ADDED
@@ -0,0 +1,5 @@
1
+ // There is nothing in this reset, if you are not happy with the reset options installed with Toadstool,
2
+ // please feel free to roll your own.
3
+
4
+ // Simple refer to this document via the config.scss file and ROCK IT!
5
+ // --------------------------------------------------------------------------------
@@ -0,0 +1,93 @@
1
+ // Twitter's 'Font-Awesome' is installed in Toadstool
2
+ // see http://goo.gl/4JkBd for list of icon options
3
+ // Stipe has all icon classes loaded as silent classes, to activate use the following example
4
+ // -----------------------------------------------------------------------
5
+ // .icon-glass {
6
+ // @extend %icon-glass;
7
+ // }
8
+
9
+
10
+
11
+ // Zocial's icon font is installed in Toadstool
12
+ // see http://goo.gl/t92t5 for list of icon options
13
+ // Stipe has all icon classes loaded as silent classes, to activate use the following example
14
+ // -----------------------------------------------------------------------
15
+ // .zocial-amazon {
16
+ // @extend %zocial-amazon;
17
+ // }
18
+
19
+
20
+
21
+ // Import of default text bootstrap settings
22
+ // -----------------------------------------------------------------------
23
+ @import "stipe/typography/default"; // Comment out if unwanted
24
+
25
+
26
+
27
+ // Customize the following to fit your specifications
28
+ // Commented out styles represent Toadstool's default bootstrap styles
29
+ // -----------------------------------------------------------------------
30
+ html {
31
+ // font: em($font_size, 16) $primary_font_family;
32
+ // line-height: baseline($font_size);
33
+ // color: $primary_text;
34
+ }
35
+
36
+ h1 {
37
+ // font-size: 2em; // user agent default
38
+ // @extend %headings_1;
39
+ }
40
+
41
+ h2 {
42
+ // font-size: 1.5em; // user agent default
43
+ // @extend %headings_2;
44
+ }
45
+
46
+ h3 {
47
+ // font-size: 1.17em; // user agent default
48
+ // @extend %headings_3;
49
+ }
50
+
51
+ h4 {
52
+ // font-size: 1em; // user agent default
53
+ // @extend %headings_4;
54
+ }
55
+
56
+ h5 {
57
+ // font-size: 0.83em; // user agent default
58
+ // @extend %headings_5;
59
+ }
60
+
61
+ h6 {
62
+ // font-size: 0.75em; // user agent default
63
+ // @extend %headings_6;
64
+ }
65
+
66
+ // Standard body text support
67
+ // --------------------------------
68
+ p {
69
+ // margin-bottom: baseline-margin($font_size);
70
+ // text-indent: 0;
71
+ }
72
+
73
+ b {
74
+ // &:after {
75
+ // content: " ";
76
+ // }
77
+ }
78
+
79
+
80
+ // :link Pseudo-class is totally not necessary as I can tell
81
+ // code here to combat legacy code
82
+ a {
83
+ // &:link {
84
+ // color: $href_color;
85
+ // text-decoration: none;
86
+ // }
87
+ // &:hover, &:active {
88
+ // text-decoration: underline;
89
+ // }
90
+ // &:visited {
91
+ // color: $href_color;
92
+ // }
93
+ }
File without changes
@@ -0,0 +1,32 @@
1
+
2
+ // -----------------------------------------------------------
3
+ @import "stipe/typography/mixins"; // Do not edit, needed to pull in necessary mixin
4
+ $webfont_directory: "/fonts/" !default; // edit this directory in the '_config.scss' file if needed.
5
+
6
+
7
+
8
+ // Pre-loaded web fonts for your use, enjoy!
9
+ // Fonts needed to be loaded in path specified above
10
+ // in relation to the rendered CSS file
11
+ // -----------------------------------------------------------
12
+ // To activate 'zocial' uncomment both lines
13
+ // @import "stipe/typography/web_fonts/zocial";
14
+ // @import "stipe/typography/web_fonts/zocial_characters";
15
+
16
+ // To activate 'font_awesome' uncomment both lines
17
+ // @import "stipe/typography/web_fonts/font_awesome";
18
+ // @import "stipe/typography/web_fonts/font_awesome_pua";
19
+
20
+
21
+
22
+ // Install your own
23
+ // -----------------------------------------------------------
24
+ //@font-face {
25
+ // @include font-face ($font_family: [name of family], $font-file: [name of file], $font_weight: [value], $font_style: [value]);
26
+ //}
27
+
28
+
29
+
30
+ // Install google fonts
31
+ // -----------------------------------------------------------
32
+ // @import url(http://fonts.googleapis.com/css?family=Emblema+One);