refills 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (188) hide show
  1. checksums.yaml +4 -4
  2. data/.hound.yml +3 -2
  3. data/.ruby-version +1 -1
  4. data/.scss-lint.yml +97 -24
  5. data/CONTRIBUTING.md +4 -3
  6. data/Gemfile +13 -10
  7. data/README.md +31 -15
  8. data/circle.yml +7 -0
  9. data/config.rb +4 -13
  10. data/{lib → helpers}/snippet_helpers.rb +14 -6
  11. data/lib/refills/version.rb +1 -1
  12. data/refills.gemspec +2 -2
  13. data/sache.json +1 -1
  14. data/source/_badges.html.erb +1 -1
  15. data/source/_cards.html.erb +1 -1
  16. data/source/_centered_navigation.html.erb +5 -5
  17. data/source/_comment.html.erb +2 -2
  18. data/source/_device.html.erb +0 -1
  19. data/source/_expander.html.erb +2 -2
  20. data/source/_flex_boxes.html.erb +6 -6
  21. data/source/_footer.html.erb +1 -1
  22. data/source/_footer_2.html.erb +1 -1
  23. data/source/_grid_items.html.erb +7 -7
  24. data/source/_grid_items_lines.html.erb +8 -8
  25. data/source/_hero.html.erb +4 -9
  26. data/source/_icon_bullet_points.html.erb +6 -7
  27. data/source/_logo_section.html.erb +8 -0
  28. data/source/_modal.html.erb +2 -2
  29. data/source/_navigation.html.erb +2 -3
  30. data/source/_search_bar.html.erb +1 -1
  31. data/source/_search_tools.html.erb +54 -52
  32. data/source/_side_image.html.erb +0 -1
  33. data/source/_sliding_panel.html.erb +13 -0
  34. data/source/_type_system_geometric.html.erb +4 -3
  35. data/source/_type_system_rounded.html.erb +3 -3
  36. data/source/_type_system_sans.html.erb +3 -3
  37. data/source/_type_system_serif.html.erb +4 -4
  38. data/source/_type_system_slab.html.erb +3 -3
  39. data/source/_type_system_traditional.html.erb +3 -3
  40. data/source/components.html.erb +9 -5
  41. data/source/images/background-image.png +0 -0
  42. data/source/images/cosmin_capitanu_screen.jpg +0 -0
  43. data/source/images/new.svg +22 -0
  44. data/source/images/placeholder_square.png +0 -0
  45. data/source/images/placeholder_wide.png +0 -0
  46. data/source/images/placeholder_wider.png +0 -0
  47. data/source/index.html.erb +10 -3
  48. data/source/javascripts/jquery.erToc.js +1 -6
  49. data/source/javascripts/refills/accordion_base.js +5 -0
  50. data/source/javascripts/refills/accordion_tabs.js +1 -2
  51. data/source/javascripts/refills/accordion_tabs_minimal.js +1 -2
  52. data/source/javascripts/refills/base-accordion.js +5 -0
  53. data/source/javascripts/refills/centered_navigation.js +27 -9
  54. data/source/javascripts/refills/coffeescript/accordion.coffee +3 -4
  55. data/source/javascripts/refills/coffeescript/accordion_base.coffee +6 -0
  56. data/source/javascripts/refills/coffeescript/accordion_tabs.coffee +9 -12
  57. data/source/javascripts/refills/coffeescript/accordion_tabs_minimal.coffee +9 -12
  58. data/source/javascripts/refills/coffeescript/animate.coffee +4 -7
  59. data/source/javascripts/refills/coffeescript/base-accordion.coffee +5 -0
  60. data/source/javascripts/refills/coffeescript/centered_navigation.coffee +6 -8
  61. data/source/javascripts/refills/coffeescript/dropdown.coffee +6 -10
  62. data/source/javascripts/refills/coffeescript/expander.coffee +4 -6
  63. data/source/javascripts/refills/coffeescript/fade_in.coffee +6 -8
  64. data/source/javascripts/refills/coffeescript/modal.coffee +7 -11
  65. data/source/javascripts/refills/coffeescript/navigation.coffee +6 -8
  66. data/source/javascripts/refills/coffeescript/parallax.coffee +9 -8
  67. data/source/javascripts/refills/coffeescript/scroll_on_page.coffee +6 -11
  68. data/source/javascripts/refills/coffeescript/search_tools.coffee +0 -85
  69. data/source/javascripts/refills/coffeescript/sliding_panel.coffee +6 -0
  70. data/source/javascripts/refills/coffeescript/vertical_tabs.coffee +21 -21
  71. data/source/javascripts/refills/dropdown.js +8 -8
  72. data/source/javascripts/refills/expander.js +1 -4
  73. data/source/javascripts/refills/modal.js +1 -1
  74. data/source/javascripts/refills/navigation.js +26 -7
  75. data/source/javascripts/refills/navigation_centered.js +13 -0
  76. data/source/javascripts/refills/scroll_on_page.js +8 -5
  77. data/source/javascripts/refills/search_tools.js +2 -2
  78. data/source/javascripts/refills/sliding_panel.js +6 -0
  79. data/source/javascripts/refills/unstyled/accordion.js +5 -0
  80. data/source/javascripts/refills/unstyled/accordion_tabs.js +18 -0
  81. data/source/javascripts/refills/unstyled/dropdown.js +12 -0
  82. data/source/javascripts/refills/unstyled/expander.js +8 -0
  83. data/source/javascripts/refills/unstyled/modal.js +17 -0
  84. data/source/javascripts/refills/unstyled/navigation.js +13 -0
  85. data/source/javascripts/refills/unstyled/navigation_centered.js +13 -0
  86. data/source/javascripts/refills/unstyled/scroll_on_page.js +29 -0
  87. data/source/javascripts/refills/unstyled/sliding_panel.js +6 -0
  88. data/source/javascripts/refills/unstyled/vertical_tabs.js +32 -0
  89. data/source/layouts/layout.erb +3 -3
  90. data/source/refills-hero.html.erb +6 -3
  91. data/source/stylesheets/_bourbon-nav.scss +14 -7
  92. data/source/stylesheets/_refill.scss +215 -0
  93. data/source/stylesheets/_refills-footer.scss +62 -0
  94. data/source/stylesheets/_refills-header.scss +113 -0
  95. data/source/stylesheets/_refills-menu.scss +91 -0
  96. data/source/stylesheets/_refills-nav.scss +13 -13
  97. data/source/stylesheets/_refills-styles.scss +8 -644
  98. data/source/stylesheets/_refills-variables.scss +20 -0
  99. data/source/stylesheets/all.css.scss +78 -0
  100. data/source/stylesheets/refills/_accordion-tabs-minimal.scss +9 -14
  101. data/source/stylesheets/refills/_accordion-tabs.scss +11 -16
  102. data/source/stylesheets/refills/_accordion.scss +13 -29
  103. data/source/stylesheets/refills/_animate.scss +9 -10
  104. data/source/stylesheets/refills/_badges.scss +18 -35
  105. data/source/stylesheets/refills/_breadcrumbs.scss +15 -19
  106. data/source/stylesheets/refills/_button-group.scss +6 -12
  107. data/source/stylesheets/refills/_cards.scss +22 -31
  108. data/source/stylesheets/refills/_centered-navigation.scss +16 -13
  109. data/source/stylesheets/refills/_comment.scss +3 -6
  110. data/source/stylesheets/refills/_device.scss +29 -40
  111. data/source/stylesheets/refills/_dropdown.scss +17 -27
  112. data/source/stylesheets/refills/_expander.scss +14 -21
  113. data/source/stylesheets/refills/_fade-in.scss +7 -11
  114. data/source/stylesheets/refills/_flashes.scss +21 -33
  115. data/source/stylesheets/refills/_flex-boxes.scss +18 -26
  116. data/source/stylesheets/refills/_footer-2.scss +19 -33
  117. data/source/stylesheets/refills/_footer.scss +15 -38
  118. data/source/stylesheets/refills/_grid-items-lines.scss +12 -21
  119. data/source/stylesheets/refills/_grid-items.scss +31 -40
  120. data/source/stylesheets/refills/_hero.scss +22 -55
  121. data/source/stylesheets/refills/_hover-tile-animation.scss +8 -17
  122. data/source/stylesheets/refills/_icon-bullet-points.scss +26 -35
  123. data/source/stylesheets/refills/_image-gradient-dynamic.scss +31 -20
  124. data/source/stylesheets/refills/_logo-section.scss +25 -0
  125. data/source/stylesheets/refills/_maps.scss +2 -2
  126. data/source/stylesheets/refills/_modal.scss +32 -45
  127. data/source/stylesheets/refills/_navigation.scss +33 -39
  128. data/source/stylesheets/refills/_pagination.scss +10 -23
  129. data/source/stylesheets/refills/_progress-bar-indication.scss +8 -15
  130. data/source/stylesheets/refills/_progress-bar.scss +24 -26
  131. data/source/stylesheets/refills/_ribbon.scss +4 -5
  132. data/source/stylesheets/refills/_scroll-on-page.scss +12 -15
  133. data/source/stylesheets/refills/_search-bar.scss +6 -13
  134. data/source/stylesheets/refills/_search-tools.scss +41 -42
  135. data/source/stylesheets/refills/_side-image.scss +8 -20
  136. data/source/stylesheets/refills/_sliding-panel.scss +79 -0
  137. data/source/stylesheets/refills/_stats.scss +2 -3
  138. data/source/stylesheets/refills/_switch.scss +13 -16
  139. data/source/stylesheets/refills/_tables-minimal.scss +12 -24
  140. data/source/stylesheets/refills/_tables.scss +11 -20
  141. data/source/stylesheets/refills/_texture-legend.scss +17 -13
  142. data/source/stylesheets/refills/_textures.scss +13 -9
  143. data/source/stylesheets/refills/_tooltip.scss +9 -16
  144. data/source/stylesheets/refills/_type-system-geometric.scss +14 -17
  145. data/source/stylesheets/refills/_type-system-rounded.scss +19 -19
  146. data/source/stylesheets/refills/_type-system-sans.scss +26 -26
  147. data/source/stylesheets/refills/_type-system-serif.scss +17 -20
  148. data/source/stylesheets/refills/_type-system-slab.scss +14 -17
  149. data/source/stylesheets/refills/_type-system-traditional.scss +18 -21
  150. data/source/stylesheets/refills/_vertical-tabs.scss +26 -30
  151. data/source/stylesheets/refills/_video.scss +1 -1
  152. data/source/stylesheets/refills/unstyled/_accordion-tabs.scss +36 -0
  153. data/source/stylesheets/refills/unstyled/_accordion.scss +17 -0
  154. data/source/stylesheets/refills/unstyled/_button-group.scss +30 -0
  155. data/source/stylesheets/refills/unstyled/_cards.scss +20 -0
  156. data/source/stylesheets/refills/unstyled/_comment.scss +28 -0
  157. data/source/stylesheets/refills/unstyled/_dropdown.scss +42 -0
  158. data/source/stylesheets/refills/unstyled/_expander.scss +20 -0
  159. data/source/stylesheets/refills/unstyled/_footer.scss +64 -0
  160. data/source/stylesheets/refills/unstyled/_hover-menu.scss +60 -0
  161. data/source/stylesheets/refills/unstyled/_modal.scss +71 -0
  162. data/source/stylesheets/refills/unstyled/_navigation-centered.scss +92 -0
  163. data/source/stylesheets/refills/unstyled/_navigation.scss +82 -0
  164. data/source/stylesheets/refills/unstyled/_scroll-on-page.scss +22 -0
  165. data/source/stylesheets/refills/unstyled/_search-bar.scss +26 -0
  166. data/source/stylesheets/refills/unstyled/_sliding-panel.scss +36 -0
  167. data/source/stylesheets/refills/unstyled/_switch.scss +50 -0
  168. data/source/stylesheets/refills/unstyled/_tooltip.scss +36 -0
  169. data/source/stylesheets/refills/unstyled/_vertical-tabs.scss +53 -0
  170. data/source/stylesheets/vendor/prism.css +4 -4
  171. data/source/svgs/_menu_icon.html.erb +6 -0
  172. data/source/svgs/_refills_logo.html.erb +8 -0
  173. data/source/type-systems.html.erb +5 -1
  174. data/spec/refills/import_generator_spec.rb +1 -1
  175. metadata +59 -19
  176. data/.travis.yml +0 -8
  177. data/source/_sliding_menu.html.erb +0 -13
  178. data/source/images/placeholder_logo_1.png +0 -0
  179. data/source/images/placeholder_logo_1_dark.png +0 -0
  180. data/source/images/placeholder_logo_2.png +0 -0
  181. data/source/images/placeholder_logo_2_dark.png +0 -0
  182. data/source/images/placeholder_logo_3.png +0 -0
  183. data/source/images/placeholder_logo_3_dark.png +0 -0
  184. data/source/images/placeholder_logo_4.png +0 -0
  185. data/source/images/placeholder_logo_4_dark.png +0 -0
  186. data/source/javascripts/refills/sliding_menu.js +0 -6
  187. data/source/stylesheets/all.scss +0 -66
  188. data/source/stylesheets/refills/_sliding-menu.scss +0 -86
@@ -0,0 +1,60 @@
1
+ .hover-menu {
2
+ $large-screen: 53.75em !default;
3
+ $submenu-width: 12em;
4
+
5
+ overflow: visible;
6
+ padding-right: 0;
7
+
8
+ @include media($large-screen) {
9
+ position: relative;
10
+ }
11
+
12
+ .hover-menu-item {
13
+ left: 0;
14
+ position: relative;
15
+
16
+ &::after {
17
+ content: "›";
18
+ padding-left: 0.5em;
19
+ }
20
+ }
21
+
22
+ .submenu {
23
+ display: none;
24
+ margin: 0;
25
+ padding-left: 0;
26
+
27
+ @include media($large-screen) {
28
+ left: 0;
29
+ position: absolute;
30
+ }
31
+ }
32
+
33
+ .submenu li {
34
+ display: block;
35
+ padding-right: 0;
36
+ }
37
+
38
+ .submenu li a {
39
+ display: inline-block;
40
+ text-align: right;
41
+ width: 100%;
42
+
43
+ @include media($large-screen) {
44
+ text-align: left;
45
+ width: $submenu-width;
46
+ }
47
+ }
48
+
49
+ .submenu .submenu {
50
+ @include media($large-screen) {
51
+ left: $submenu-width;
52
+ top: 0;
53
+ }
54
+ }
55
+
56
+ &:focus > .submenu,
57
+ &:hover > .submenu {
58
+ display: block;
59
+ }
60
+ }
@@ -0,0 +1,71 @@
1
+ .modal {
2
+ $medium-screen: 40em !default;
3
+ $large-screen: 53.75em !default;
4
+
5
+ label {
6
+ cursor: pointer;
7
+ font-weight: normal;
8
+ margin-bottom: 0;
9
+ }
10
+
11
+ .modal-state {
12
+ display: none;
13
+ }
14
+
15
+ .modal-fade-screen { // overlay
16
+ @include position(fixed, 0);
17
+ background-color: rgba(#000, 0.85);
18
+ opacity: 0;
19
+ transition: opacity 0.25s ease;
20
+ visibility: hidden;
21
+ z-index: 99999;
22
+
23
+ @include media($large-screen) {
24
+ padding-top: 10em;
25
+ }
26
+ }
27
+
28
+ .modal-bg {
29
+ @include position(absolute, 0);
30
+ cursor: pointer;
31
+ }
32
+
33
+ .modal-close {
34
+ cursor: pointer;
35
+ }
36
+
37
+ .modal-inner {
38
+ background-color: #fff;
39
+ margin: auto;
40
+ max-height: 95%;
41
+ overflow: auto;
42
+ position: relative;
43
+ top: 0.5em;
44
+ transition: opacity 0.25s ease;
45
+ width: 95%;
46
+
47
+ @include media($medium-screen) {
48
+ max-height: 70%;
49
+ width: 60%;
50
+ }
51
+
52
+ @include media($large-screen) {
53
+ width: 50%;
54
+ }
55
+ }
56
+
57
+ .modal-state:checked + .modal-fade-screen {
58
+ opacity: 1;
59
+ visibility: visible;
60
+ }
61
+ }
62
+
63
+ .modal-open {
64
+ overflow: hidden;
65
+ }
66
+
67
+ .modal-closed {
68
+ overflow: auto;
69
+ }
70
+
71
+ // Based on code by Kasper Mikiewicz
@@ -0,0 +1,92 @@
1
+ .navigation-centered {
2
+ $large-screen: 53.75em !default;
3
+ $centered-navigation-height: 60px;
4
+ $centered-navigation-logo-height: 2em;
5
+
6
+ width: 100%;
7
+
8
+ // Mobile view
9
+ .mobile-logo {
10
+ display: inline;
11
+ float: left;
12
+
13
+ @include media($large-screen) {
14
+ display: none;
15
+ }
16
+
17
+ img {
18
+ max-height: $centered-navigation-logo-height;
19
+ }
20
+ }
21
+
22
+ .navigation-centered-mobile-menu {
23
+ float: right;
24
+ padding-top: 0.5em;
25
+
26
+ @include media ($large-screen) {
27
+ display: none;
28
+ }
29
+ }
30
+
31
+ // Nav menu
32
+ .navigation-centered-wrapper {
33
+ @include clearfix;
34
+ position: relative;
35
+ }
36
+
37
+ ul.navigation-centered-menu {
38
+ clear: both;
39
+ display: none;
40
+ margin: 0 auto;
41
+ overflow: visible;
42
+ padding: 0;
43
+ width: 100%;
44
+
45
+ &.show {
46
+ display: block;
47
+ }
48
+
49
+ @include media ($large-screen) {
50
+ display: block;
51
+ text-align: center;
52
+ }
53
+ }
54
+
55
+ // Nav items
56
+ ul li.nav-link {
57
+ display: block;
58
+ text-align: right;
59
+ width: 100%;
60
+
61
+ a {
62
+ display: inline-block;
63
+ }
64
+
65
+ &:last-child a {
66
+ padding-right: 0;
67
+ }
68
+
69
+ @include media($large-screen) {
70
+ display: inline;
71
+
72
+ a {
73
+ padding-right: 1em;
74
+ }
75
+ }
76
+ }
77
+
78
+ // Centered logo
79
+ li.logo.nav-link {
80
+ display: none;
81
+ line-height: 0;
82
+
83
+ @include media($large-screen) {
84
+ display: inline;
85
+ }
86
+ }
87
+
88
+ .logo img {
89
+ margin-bottom: -$centered-navigation-logo-height / 3;
90
+ max-height: $centered-navigation-logo-height;
91
+ }
92
+ }
@@ -0,0 +1,82 @@
1
+ .navigation {
2
+ $large-screen: 53.75em !default;
3
+ $large-screen: $large-screen;
4
+
5
+ // Mobile view
6
+ .navigation-menu-button {
7
+ display: block;
8
+ float: right;
9
+ margin: 0;
10
+ padding-top: 0.5em;
11
+
12
+ @include media ($large-screen) {
13
+ display: none;
14
+ }
15
+ }
16
+
17
+ // Nav menu
18
+ .navigation-wrapper {
19
+ @include clearfix;
20
+ position: relative;
21
+ }
22
+
23
+ .logo {
24
+ float: left;
25
+
26
+ img {
27
+ max-height: 2em;
28
+ padding-right: 1em;
29
+ }
30
+ }
31
+
32
+ nav {
33
+ float: none;
34
+
35
+ @include media ($large-screen) {
36
+ float: left;
37
+ line-height: 1.5em;
38
+ padding-top: 0.3em;
39
+ }
40
+ }
41
+
42
+ ul.navigation-menu {
43
+ clear: both;
44
+ display: none;
45
+ margin: 0 auto;
46
+ overflow: visible;
47
+ padding: 0;
48
+ width: 100%;
49
+
50
+ @include media ($large-screen) {
51
+ display: block;
52
+ margin: 0;
53
+ padding: 0;
54
+ }
55
+
56
+ &.show {
57
+ display: block;
58
+ }
59
+ }
60
+
61
+ // Nav items
62
+ ul li.nav-link {
63
+ display: block;
64
+ text-align: right;
65
+ width: 100%;
66
+
67
+ @include media ($large-screen) {
68
+ background: transparent;
69
+ display: inline;
70
+ text-decoration: none;
71
+ width: auto;
72
+ }
73
+ }
74
+
75
+ li.nav-link a {
76
+ display: inline-block;
77
+
78
+ @include media ($large-screen) {
79
+ padding-right: 1em;
80
+ }
81
+ }
82
+ }
@@ -0,0 +1,22 @@
1
+ .scroll-on-page {
2
+ $large-screen: 53.75em !default;
3
+
4
+ aside {
5
+ @include media($large-screen) {
6
+ @include span-columns(4);
7
+ }
8
+ }
9
+
10
+ .scroll-on-page-link {
11
+ display: block;
12
+ outline: none;
13
+ }
14
+
15
+ article {
16
+ @include media($large-screen) {
17
+ @include span-columns(8);
18
+ }
19
+ }
20
+ }
21
+
22
+ // Based on code by http://codepen.io/xmark/
@@ -0,0 +1,26 @@
1
+ .search-bar {
2
+ width: 100%;
3
+
4
+ form {
5
+ position: relative;
6
+ }
7
+
8
+ input {
9
+ box-sizing: border-box;
10
+ display: block;
11
+ margin: 0;
12
+ position: relative;
13
+ width: 100%;
14
+ }
15
+
16
+ button {
17
+ @include position(absolute, 0 0 0 null);
18
+ padding: 5px 10px;
19
+
20
+ }
21
+
22
+ img {
23
+ height: 12px;
24
+ opacity: 0.7;
25
+ }
26
+ }
@@ -0,0 +1,36 @@
1
+ .sliding-panel-content {
2
+ $sliding-panel-width: 220px;
3
+
4
+ @include position(fixed, 0 auto 0 0);
5
+ @include size($sliding-panel-width, 100%);
6
+ background: #fff;
7
+ -webkit-overflow-scrolling: touch;
8
+ overflow-y: auto;
9
+ transform: translateX(- $sliding-panel-width);
10
+ transition: all 0.25s linear;
11
+ z-index: 999999;
12
+
13
+ &.is-visible {
14
+ transform: translateX(0);
15
+ }
16
+ }
17
+
18
+ .sliding-panel-fade-screen {
19
+ @include position(fixed, 0);
20
+ background: #000;
21
+ opacity: 0;
22
+ transition: all 0.2s ease-in-out;
23
+ visibility: hidden;
24
+ z-index: 9999;
25
+
26
+ &.is-visible {
27
+ opacity: 0.4;
28
+ visibility: visible;
29
+ }
30
+ }
31
+
32
+ .sliding-panel-close {
33
+ cursor: pointer;
34
+ }
35
+
36
+ // Based on code by Diego Eis
@@ -0,0 +1,50 @@
1
+ .switch {
2
+ $switch-width: 52px;
3
+ $switch-padding: 2px;
4
+ $switch-height: 32px;
5
+ $knob-size: $switch-height - ($switch-padding * 2);
6
+ $knob-width: $knob-size;
7
+
8
+ cursor: pointer;
9
+ display: inline-block;
10
+ position: relative;
11
+
12
+ input {
13
+ display: none;
14
+
15
+ + .checkbox {
16
+ @include size($switch-width, $switch-height);
17
+ border: 1px solid #000;
18
+ cursor: pointer;
19
+ position: relative;
20
+ width: $switch-width;
21
+ z-index: 0;
22
+
23
+ &::before {
24
+ @include position(absolute, $switch-padding 0 0 $switch-padding);
25
+ content: "";
26
+ width: $switch-width - ($switch-padding * 2);
27
+ z-index: 1;
28
+ }
29
+
30
+ &::after {
31
+ @include position(absolute, 1px 0 0 1px);
32
+ @include size($knob-size);
33
+ background-color: #000;
34
+ content: "";
35
+ transition: all 0.3s ease;
36
+ z-index: 2;
37
+ }
38
+ }
39
+
40
+ &:checked {
41
+ + .checkbox {
42
+ background-color: #aaa;
43
+
44
+ &::after {
45
+ left: $switch-width - $knob-width - ($switch-padding * 2) + 1px;
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }