better_styles 0.0.0.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +15 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +33 -0
  4. data/Rakefile +34 -0
  5. data/app/helpers/styles_helper.rb +33 -0
  6. data/assets/fonts/betterfonts/betterwork-icons.eot +0 -0
  7. data/assets/fonts/betterfonts/betterwork-icons.svg +368 -0
  8. data/assets/fonts/betterfonts/betterwork-icons.ttf +0 -0
  9. data/assets/fonts/betterfonts/betterwork-icons.woff +0 -0
  10. data/assets/fonts/betterfonts/icomoon.eot +0 -0
  11. data/assets/fonts/betterfonts/icomoon.svg +461 -0
  12. data/assets/fonts/betterfonts/icomoon.ttf +0 -0
  13. data/assets/fonts/betterfonts/icomoon.woff +0 -0
  14. data/assets/fonts/betterfonts/magicons-regular-webfont.eot +0 -0
  15. data/assets/fonts/betterfonts/magicons-regular-webfont.svg +461 -0
  16. data/assets/fonts/betterfonts/magicons-regular-webfont.ttf +0 -0
  17. data/assets/fonts/betterfonts/magicons-regular-webfont.woff +0 -0
  18. data/assets/fonts/betterfonts/newmagicons-regular-webfont.eot +0 -0
  19. data/assets/fonts/betterfonts/newmagicons-regular-webfont.svg +199 -0
  20. data/assets/fonts/betterfonts/newmagicons-regular-webfont.ttf +0 -0
  21. data/assets/fonts/betterfonts/newmagicons-regular-webfont.woff +0 -0
  22. data/assets/fonts/betterfonts/orderlifticons-webfont.eot +0 -0
  23. data/assets/fonts/betterfonts/orderlifticons-webfont.svg +172 -0
  24. data/assets/fonts/betterfonts/orderlifticons-webfont.ttf +0 -0
  25. data/assets/fonts/betterfonts/orderlifticons-webfont.woff +0 -0
  26. data/assets/images/better/arrows/arrow-round1-a.png +0 -0
  27. data/assets/images/better/arrows/arrow-round1-b.png +0 -0
  28. data/assets/images/better/arrows/arrow-round2-a.png +0 -0
  29. data/assets/images/better/arrows/arrow-round2-b.png +0 -0
  30. data/assets/images/better/arrows/arrow1-a.png +0 -0
  31. data/assets/images/better/arrows/arrow1-b.png +0 -0
  32. data/assets/images/better/arrows/arrow1.png +0 -0
  33. data/assets/images/better/arrows/arrow2-1.png +0 -0
  34. data/assets/images/better/arrows/arrow2-2.png +0 -0
  35. data/assets/images/better/arrows/arrow2-a.png +0 -0
  36. data/assets/images/better/arrows/arrow2-b.png +0 -0
  37. data/assets/images/better/arrows/arrow3-a.png +0 -0
  38. data/assets/images/better/arrows/arrow3-b.png +0 -0
  39. data/assets/images/better/arrows/arrow4-a.png +0 -0
  40. data/assets/images/better/arrows/arrow4-b.png +0 -0
  41. data/assets/images/better/arrows/arrow5-a.png +0 -0
  42. data/assets/images/better/arrows/arrow5-b.png +0 -0
  43. data/assets/images/better/arrows/arrow6-a.png +0 -0
  44. data/assets/images/better/arrows/arrow6-b.png +0 -0
  45. data/assets/images/better/helper/blank_10.png +0 -0
  46. data/assets/images/better/helper/crossed.png +0 -0
  47. data/assets/images/better/helper/white_10.png +0 -0
  48. data/assets/javascripts/better_styles.js.coffee +4 -0
  49. data/assets/javascripts/betterjs/forms/check_switch.js.coffee +25 -0
  50. data/assets/javascripts/betterjs/helper.js.coffee +74 -0
  51. data/assets/javascripts/betterjs/navigations/aside_link.js.coffee +9 -0
  52. data/assets/javascripts/betterjs/navigations/nav_list.js.coffee +19 -0
  53. data/assets/javascripts/betterjs/rails_ext/rails-ujs.js +479 -0
  54. data/assets/javascripts/betterjs/render_eco.js.coffee +9 -0
  55. data/assets/javascripts/betterjs/templates/fixed_aside_to_header.js.coffee +6 -0
  56. data/assets/javascripts/betterjs/templates/icon_aside.js.coffee +12 -0
  57. data/assets/javascripts/betterjs/templates/scroll_to_fix_aside.js +32 -0
  58. data/assets/javascripts/betterjs/twbs_ext/affix_2_1_0.js +103 -0
  59. data/assets/javascripts/betterjs/twbs_ext/affix_3_3_7.js +162 -0
  60. data/assets/javascripts/betterjs/twbs_ext/affix_ext.js +131 -0
  61. data/assets/stylesheets/better/content/_box.scss +46 -0
  62. data/assets/stylesheets/better/content/_buttons.scss +22 -0
  63. data/assets/stylesheets/better/content/_check_switch.scss +78 -0
  64. data/assets/stylesheets/better/content/_divider.scss +65 -0
  65. data/assets/stylesheets/better/content/_helpers.scss +85 -0
  66. data/assets/stylesheets/better/content/_pix.scss +70 -0
  67. data/assets/stylesheets/better/content/_typography.scss +44 -0
  68. data/assets/stylesheets/better/icons/bettericons.scss +419 -0
  69. data/assets/stylesheets/better/icons/icomoon.scss +1392 -0
  70. data/assets/stylesheets/better/icons/magicons.scss +705 -0
  71. data/assets/stylesheets/better/icons/orderlifticons.scss +300 -0
  72. data/assets/stylesheets/better/layout/_corset.scss +57 -0
  73. data/assets/stylesheets/better/layout/_fullpage_table.scss +185 -0
  74. data/assets/stylesheets/better/layout/_positioning.scss +62 -0
  75. data/assets/stylesheets/better/layout/_section.scss +220 -0
  76. data/assets/stylesheets/better/lib/_helpers.scss +67 -0
  77. data/assets/stylesheets/better/lib/_media_querries.scss +43 -0
  78. data/assets/stylesheets/better/lib/_nav.scss +31 -0
  79. data/assets/stylesheets/better/lib/_shadows.scss +247 -0
  80. data/assets/stylesheets/better/lib/_text.scss +66 -0
  81. data/assets/stylesheets/better/navigations/_aside_lnk.scss +100 -0
  82. data/assets/stylesheets/better/navigations/_nav_list.scss +177 -0
  83. data/assets/stylesheets/better/templates/_fixed_aside_to_header.scss +89 -0
  84. data/assets/stylesheets/better/templates/_icon_aside.scss +404 -0
  85. data/assets/stylesheets/better/templates/_scroll_to_fix_aside.scss +104 -0
  86. data/assets/stylesheets/better/variables/_color.scss +87 -0
  87. data/assets/stylesheets/better/variables/_typography.scss +59 -0
  88. data/assets/stylesheets/better/variables/_vars.scss +57 -0
  89. data/assets/stylesheets/better_styles.scss +44 -0
  90. data/assets/stylesheets/better_styles_min.scss +43 -0
  91. data/lib/better_styles.rb +64 -0
  92. data/lib/better_styles/engine.rb +25 -0
  93. data/lib/better_styles/version.rb +3 -0
  94. data/lib/tasks/better_styles_tasks.rake +4 -0
  95. metadata +181 -0
@@ -0,0 +1,104 @@
1
+ $aside-width: 220px;
2
+ $aside-bg: #222;
3
+ $aside-color: #999;
4
+ $aside-line-top-color: rgba(0,0,0,.42);
5
+ $aside-line-bottom-color: rgba(255,255,255,.13);
6
+
7
+ body {
8
+
9
+ &.fixed-nav {
10
+ #main_stage #aside.affix { top: 50px; }
11
+ #aside_toggle { top: 60px; }
12
+ }
13
+
14
+ &.with_aside {
15
+ // #front_banner { transform: translateX( $aside-width ) ; }
16
+ margin-left: $aside-width;
17
+ margin-right: -1 * $aside-width;
18
+ // transform: translateX( $aside-width ) ;
19
+
20
+ // transform: translateX( $aside-width ) ;
21
+ #main_stage #aside {
22
+ transform: translateX( 0 ) ;
23
+ // transform: translateX( -1 * $aside-width ) ;
24
+ }
25
+
26
+ &.fixed-nav {
27
+ #main_stage #aside { top: 50px; }
28
+ }
29
+ // #main_stage #stage {
30
+ // transform: translateX( $aside-width ) ;
31
+ // }
32
+ #aside_toggle {
33
+ position: fixed;
34
+ left: $aside-width + 20px;
35
+ z-index: 850;
36
+ }
37
+ }
38
+
39
+ }
40
+
41
+ #main_stage, #aside, #stage, #aside_toggle {
42
+ display: block; position: relative;
43
+ margin: 0; padding: 0;
44
+ }
45
+
46
+ #main_stage {
47
+
48
+ // padding-left: $aside-width;
49
+
50
+ #aside {
51
+ // position: absolute;
52
+ position: fixed;
53
+ top: 0; left: 0; bottom: 0;
54
+ width: $aside-width;
55
+ background: $aside-bg;
56
+ color: $aside-color;
57
+
58
+ transform: translateX( -1 * $aside-width );
59
+
60
+ z-index: 500;
61
+
62
+ // &.affix { position: fixed; }
63
+ @include asideScrollBar;
64
+ overflow-y: scroll;
65
+
66
+ }
67
+ #stage {
68
+
69
+ }
70
+
71
+ }
72
+
73
+ #aside_toggle {
74
+ position: fixed;
75
+ top: 20px; left: 20px;
76
+ width: 30px; height: 30px; line-height: 30px;
77
+ border: solid 1px $main-border-color;
78
+ border-radius: 3px;
79
+ background: #fff;
80
+ font-size: 20px;
81
+ text-align: center;
82
+ color: #777;
83
+ z-index: 500;
84
+ cursor: pointer;
85
+ &:hover {
86
+ background: #ccc;
87
+ }
88
+ }
89
+
90
+ // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // //
91
+ @include responsiveStep-md {
92
+
93
+ #aside_toggle { display: none; }
94
+
95
+ #main_stage {
96
+ padding-left: $aside-width;
97
+ #aside {
98
+ transform: translateX( 0 ) ;
99
+ position: absolute;
100
+ &.affix { position: fixed; }
101
+ }
102
+ }
103
+
104
+ }
@@ -0,0 +1,87 @@
1
+ // -------------------------
2
+ // Gray colors
3
+ // -------------------------
4
+ $text-black: rgba(0,0,0, .80) !default;
5
+ $text-gray: rgba(0,0,0, .50) !default;
6
+ $text-gray-light: rgba(0,0,0, .30) !default;
7
+ $text-white: rgba(255,255,255, .90) !default;
8
+ $text-white-light: rgba(255,255,255, .70) !default;
9
+
10
+ // remove twbs colors
11
+
12
+ $gray-dark: #292b2c !default;
13
+ $gray: #464a4c !default;
14
+ $gray-light: #636c72 !default;
15
+ $gray-lighter: #eceeef !default;
16
+ $gray-lightest: #f7f7f9 !default;
17
+
18
+
19
+ $brand: #a0c775 !default;
20
+
21
+ $brand1: $brand;
22
+ $brand2: #e74259 !default;
23
+ $brand3: #fed587 !default;
24
+ $brand4: #cc6699 !default;
25
+ $brand5: #498db0 !default;
26
+ $brand6: #f09033 !default;
27
+ $brand7: #5ab788 !default;
28
+ $brand8: #e74259 !default;
29
+ $brand9: #fed587 !default;
30
+
31
+
32
+
33
+
34
+
35
+ $brand-color: $brand;
36
+
37
+
38
+ // -------------------------
39
+ // Global Background colors.
40
+ // -------------------------
41
+ $main-bg: darken(#fff, 5%) !default; // result: #f2f2f2
42
+ $body-bg: $main-bg; //** Background color for `<body>`
43
+ $dark-bg: #e5e5e5 !default;
44
+ $soft-bg: #f8f8f8 !default;
45
+ $brand-bg: $brand-color !default;
46
+ $bright-bg: $white !default;
47
+
48
+ // -------------------------
49
+ // Global Border color
50
+ // -------------------------
51
+ $main-border-color: #ccc !default;
52
+
53
+
54
+ // -------------------------
55
+ // App colors
56
+ // -------------------------
57
+ $appColorz: (
58
+ black: $text-black,
59
+ gray: $text-gray,
60
+ gray-light: $text-gray-light,
61
+ white: $text-white,
62
+ white-light: $text-white-light,
63
+
64
+ brand: $brand,
65
+ brand1: $brand,
66
+ brand2: $brand2,
67
+ brand3: $brand3,
68
+ brand4: $brand4,
69
+ brand5: $brand5,
70
+ brand6: $brand6,
71
+ brand7: $brand7,
72
+ brand8: $brand8,
73
+ brand9: $brand9
74
+ );
75
+
76
+ $brandColorz: (
77
+ brand: $brand,
78
+ brand1: $brand,
79
+ brand2: $brand2,
80
+ brand3: $brand3,
81
+ brand4: $brand4,
82
+ brand5: $brand5,
83
+ brand6: $brand6,
84
+ brand7: $brand7,
85
+ brand8: $brand8,
86
+ brand9: $brand9
87
+ );
@@ -0,0 +1,59 @@
1
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2
+ // Font-Weights
3
+ $thin: 300 !default;
4
+ $regular: 400 !default;
5
+ $semi: 600 !default;
6
+ $bold: 700 !default;
7
+ $xtra: 800 !default;
8
+
9
+
10
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
11
+ // Font-Sizes
12
+ $display-size: 3.53rem !default;
13
+ $headline-size: 2.65rem !default;
14
+ $title-size: 2rem !default;
15
+ $subheader-size: 1.47rem !default;
16
+ $body-size: 1rem !default;
17
+ $caption-size: 0.9rem !default;
18
+ $small-size: 0.75rem !default;
19
+
20
+
21
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
22
+ $textSizes: (
23
+ display: $display-size,
24
+ headline: $headline-size,
25
+ title: $title-size,
26
+ subheader: $subheader-size,
27
+ body: $body-size,
28
+ caption: $caption-size,
29
+ small: $small-size
30
+ );
31
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
32
+ $textWeights: (
33
+ display: $semi,
34
+ headline: $regular,
35
+ title: $semi,
36
+ subheader: $regular,
37
+ body: $regular,
38
+ caption: $regular,
39
+ small: $regular
40
+ );
41
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
42
+ $textBoldWeights: (
43
+ display: $xtra,
44
+ headline: $bold,
45
+ title: $bold,
46
+ subheader: $semi,
47
+ body: $bold,
48
+ caption: $bold,
49
+ small: $bold
50
+ );
51
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
52
+
53
+
54
+ $line-height: 1.42 !default;
55
+
56
+
57
+ $sansFontFamily: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
58
+ $serifFontFamily: Georgia, "Times New Roman", Times, serif;
59
+ $monoFontFamily: Monaco, Menlo, Consolas, "Courier New", monospace;
@@ -0,0 +1,57 @@
1
+ $vertical-spacing: 1.5rem !default;
2
+ $vertical-spacing-half: 0.75rem !default;
3
+ $horizontal-spacing: 1rem !default;
4
+
5
+ $grid-gutter-width: 30px !default;
6
+
7
+
8
+ //== Divider
9
+ //
10
+ $divider-horizontal-spacing: 1.2rem !default;
11
+ // for .divider and hr elements
12
+ $divider-vertical-spacing: $vertical-spacing !default;
13
+ $divider-top-color: rgba(0,0,0,.23) !default;
14
+ $divider-bottom-color: rgba(255,255,255,.65) !default;
15
+
16
+
17
+ // Sections
18
+ //
19
+
20
+ // Padding
21
+ $section-padding: 50px !default;
22
+ $section-head-padding: 10px !default;
23
+
24
+ $section-xs-padding: 10px !default;
25
+ $section-sm-padding: 30px !default;
26
+ $section-lg-padding: 80px !default;
27
+ $section-xl-padding: 120px !default;
28
+ $section-xxl-padding: 200px !default;
29
+
30
+
31
+ // Colors
32
+ $section-background: $main-bg !default;
33
+ $section-input-bg: $white !default;
34
+
35
+ $section-head-background: #fff !default;
36
+ $section-head-input-bg: $main-bg !default;
37
+ $section-head-color: $brand-color !default;
38
+ $section-head-small-color: $gray-light !default;
39
+
40
+ $section-dark-background: $dark-bg !default;
41
+ $section-dark-input-bg: $white !default;
42
+
43
+ $section-bright-background: $bright-bg !default;
44
+ $section-bright-input-bg: $main-bg !default;
45
+
46
+ $section-soft-background: $soft-bg !default;
47
+ $section-soft-input-bg: $white !default;
48
+
49
+
50
+ $section-head-line-height: 30px !default;
51
+ $section-head-font-size: 20px !default;
52
+
53
+ // Reset margin of first and last childs, so section controls spacing
54
+ $section-reset-child-spacing: true !default;
55
+ $section-reset-row-child-spacing: true !default;
56
+ $section-reset-table-child-spacing: true !default;
57
+
@@ -0,0 +1,44 @@
1
+ // @import "bootstrap";
2
+
3
+
4
+ // import variables:
5
+ @import "better/variables/color";
6
+ @import "better/variables/typography";
7
+ @import "better/variables/vars";
8
+
9
+
10
+ // import helpers:
11
+ @import "better/lib/helpers";
12
+ @import "better/lib/media_querries";
13
+ @import "better/lib/nav";
14
+ @import "better/lib/shadows";
15
+ @import "better/lib/text";
16
+
17
+
18
+ // import layouts:
19
+ @import "better/layout/section";
20
+ @import "better/layout/corset";
21
+ @import "better/layout/fullpage_table";
22
+
23
+
24
+ // import content:
25
+ @import "better/content/box";
26
+ @import "better/content/divider";
27
+ @import "better/content/helpers";
28
+ @import "better/content/pix";
29
+ @import "better/content/typography";
30
+ @import "better/content/buttons";
31
+ @import "better/content/check_switch";
32
+
33
+
34
+ // import navigations:
35
+ @import "better/navigations/aside_lnk";
36
+ @import "better/navigations/nav_list";
37
+
38
+
39
+ // import icons:
40
+ @import "better/icons/icomoon";
41
+ @import "better/icons/magicons";
42
+ @import "better/icons/orderlifticons";
43
+ @import "better/icons/bettericons";
44
+
@@ -0,0 +1,43 @@
1
+ // @import "bootstrap";
2
+
3
+
4
+ // import variables:
5
+ @import "better/variables/color";
6
+ @import "better/variables/typography";
7
+ @import "better/variables/vars";
8
+
9
+
10
+ // import helpers:
11
+ @import "better/lib/helpers";
12
+ @import "better/lib/media_querries";
13
+ @import "better/lib/nav";
14
+ // @import "better/lib/shadows";
15
+ @import "better/lib/text";
16
+
17
+
18
+ // import layouts:
19
+ @import "better/layout/section";
20
+ @import "better/layout/corset";
21
+ @import "better/layout/fullpage_table";
22
+ @import "better/layout/positioning";
23
+
24
+
25
+ // import content:
26
+ @import "better/content/box";
27
+ @import "better/content/divider";
28
+ @import "better/content/helpers";
29
+ @import "better/content/pix";
30
+ @import "better/content/typography";
31
+
32
+
33
+ // import navigations:
34
+ //@import "better/navigations/aside_lnk";
35
+ //@import "better/navigations/nav_list";
36
+
37
+
38
+ // import icons:
39
+ // @import "better/icons/icomoon";
40
+ // @import "better/icons/magicons";
41
+ // @import "better/icons/orderlifticons";
42
+ // @import "better/icons/bettericons";
43
+
@@ -0,0 +1,64 @@
1
+ require 'better_styles/version'
2
+ module BetterStyles
3
+ class << self
4
+ # Inspired by Kaminari
5
+ def load!
6
+ if rails?
7
+ register_rails_engine
8
+ elsif sprockets?
9
+ register_sprockets
10
+ end
11
+ configure_sass
12
+ end
13
+
14
+ # Paths
15
+ def gem_path
16
+ @gem_path ||= File.expand_path '..', File.dirname(__FILE__)
17
+ end
18
+
19
+ def stylesheets_path
20
+ File.join assets_path, 'stylesheets'
21
+ end
22
+
23
+ def javascripts_path
24
+ File.join assets_path, 'javascripts'
25
+ end
26
+
27
+ def fonts_path
28
+ File.join assets_path, 'fonts'
29
+ end
30
+
31
+ def assets_path
32
+ @assets_path ||= File.join gem_path, 'assets'
33
+ end
34
+
35
+ # Environment detection helpers
36
+ def sprockets?
37
+ defined?(::Sprockets)
38
+ end
39
+
40
+ def rails?
41
+ defined?(::Rails)
42
+ end
43
+
44
+ private
45
+
46
+ def configure_sass
47
+ require 'sass'
48
+ ::Sass.load_paths << stylesheets_path
49
+ end
50
+
51
+ def register_rails_engine
52
+ require 'better_styles/engine'
53
+ end
54
+
55
+ def register_sprockets
56
+ Sprockets.append_path(stylesheets_path)
57
+ Sprockets.append_path(javascripts_path)
58
+ Sprockets.append_path(fonts_path)
59
+ end
60
+
61
+ end
62
+ end
63
+
64
+ BetterStyles.load!