modularis 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +24 -0
  3. data/.idea/scopes/scope_settings.xml +5 -0
  4. data/.rbenv-version +1 -0
  5. data/CONTRIBUTING.md +53 -0
  6. data/Gemfile +4 -0
  7. data/Gemfile.lock +19 -0
  8. data/Gruntfile.js +27 -0
  9. data/LICENSE +22 -0
  10. data/README.md +27 -0
  11. data/Rakefile +2 -0
  12. data/docs/CHANGELOG.md +260 -0
  13. data/docs/Capfile +4 -0
  14. data/docs/Gemfile +13 -0
  15. data/docs/Gemfile.lock +45 -0
  16. data/docs/Procfile +2 -0
  17. data/docs/README.md +1 -0
  18. data/docs/_sidebar-components.html.erb +115 -0
  19. data/docs/_sidebar.html.erb +115 -0
  20. data/docs/changelog.html.erb +33 -0
  21. data/docs/compile.rb +34 -0
  22. data/docs/components/alert-boxes.html.erb +204 -0
  23. data/docs/components/block-grid.html.erb +132 -0
  24. data/docs/components/breadcrumbs.html.erb +156 -0
  25. data/docs/components/button-groups.html.erb +230 -0
  26. data/docs/components/buttons.html.erb +222 -0
  27. data/docs/components/clearing.html.erb +152 -0
  28. data/docs/components/custom-forms.html.erb +309 -0
  29. data/docs/components/dropdown-buttons.html.erb +235 -0
  30. data/docs/components/dropdown.html.erb +188 -0
  31. data/docs/components/flex-video.html.erb +95 -0
  32. data/docs/components/forms.html.erb +477 -0
  33. data/docs/components/global.html.erb +92 -0
  34. data/docs/components/grid.html.erb +366 -0
  35. data/docs/components/inline-lists.html.erb +91 -0
  36. data/docs/components/joyride.html.erb +183 -0
  37. data/docs/components/keystrokes.html.erb +76 -0
  38. data/docs/components/kitchen-sink.html.erb +870 -0
  39. data/docs/components/labels.html.erb +102 -0
  40. data/docs/components/magellan.html.erb +86 -0
  41. data/docs/components/orbit.html.erb +276 -0
  42. data/docs/components/pagination.html.erb +183 -0
  43. data/docs/components/panels.html.erb +123 -0
  44. data/docs/components/pricing-tables.html.erb +156 -0
  45. data/docs/components/progress-bars.html.erb +123 -0
  46. data/docs/components/reveal.html.erb +162 -0
  47. data/docs/components/section.html.erb +496 -0
  48. data/docs/components/side-nav.html.erb +124 -0
  49. data/docs/components/split-buttons.html.erb +220 -0
  50. data/docs/components/sub-nav.html.erb +122 -0
  51. data/docs/components/switch.html.erb +290 -0
  52. data/docs/components/tables.html.erb +125 -0
  53. data/docs/components/thumbnails.html.erb +89 -0
  54. data/docs/components/tooltips.html.erb +75 -0
  55. data/docs/components/top-bar.html.erb +283 -0
  56. data/docs/components/type.html.erb +396 -0
  57. data/docs/components/visibility.html.erb +110 -0
  58. data/docs/config/deploy.rb +36 -0
  59. data/docs/config.ru +12 -0
  60. data/docs/controller.rb +53 -0
  61. data/docs/css/_coderay.scss +116 -0
  62. data/docs/css/_settings.scss +1 -0
  63. data/docs/css/docs.scss +185 -0
  64. data/docs/css/normalize.scss +396 -0
  65. data/docs/css/qunit-composite.css +13 -0
  66. data/docs/css/qunit.css +235 -0
  67. data/docs/faq.html.erb +63 -0
  68. data/docs/img/demos/demo1-th.jpg +0 -0
  69. data/docs/img/demos/demo1.jpg +0 -0
  70. data/docs/img/demos/demo2-th.jpg +0 -0
  71. data/docs/img/demos/demo2.jpg +0 -0
  72. data/docs/img/demos/demo3-th.jpg +0 -0
  73. data/docs/img/demos/demo3.jpg +0 -0
  74. data/docs/img/demos/demo4-th.jpg +0 -0
  75. data/docs/img/demos/demo4.jpg +0 -0
  76. data/docs/img/demos/demo5-th.jpg +0 -0
  77. data/docs/img/demos/demo5.jpg +0 -0
  78. data/docs/index.html.erb +285 -0
  79. data/docs/javascript.html.erb +134 -0
  80. data/docs/js/docs.js +3 -0
  81. data/docs/js/qunit-composite.js +105 -0
  82. data/docs/js/qunit.js +1977 -0
  83. data/docs/js/tests/tabs/simple_tabs.html +57 -0
  84. data/docs/js/tests/tabs/simple_tabs.js +54 -0
  85. data/docs/js/tests/tooltips/tooltips.html +39 -0
  86. data/docs/js/tests/tooltips/tooltips.js +11 -0
  87. data/docs/layout.html.erb +128 -0
  88. data/docs/media-queries.html.erb +96 -0
  89. data/docs/rails.html.erb +76 -0
  90. data/docs/rtl.html.erb +53 -0
  91. data/docs/sass.html.erb +1295 -0
  92. data/docs/support.html.erb +143 -0
  93. data/docs/test/_test-scripts.html.erb +36 -0
  94. data/docs/test/cards.html.erb +77 -0
  95. data/docs/test/flexbox-grid.html.erb +68 -0
  96. data/docs/test/flip-nav.html.erb +54 -0
  97. data/docs/test/layout.html.erb +15 -0
  98. data/docs/test/off-canvas1.html.erb +64 -0
  99. data/docs/test/off-canvas2.html.erb +75 -0
  100. data/docs/test/off-canvas3.html.erb +65 -0
  101. data/docs/test_layout.html.erb +128 -0
  102. data/js/modularis/index.js +18 -0
  103. data/js/vendor/custom.modernizr.js +4 -0
  104. data/js/vendor/jquery.js +9597 -0
  105. data/js/vendor/zepto.js +1884 -0
  106. data/lib/modularis/engine.rb +18 -0
  107. data/lib/modularis/generators/USAGE +15 -0
  108. data/lib/modularis/generators/install_generator.rb +54 -0
  109. data/lib/modularis/generators/templates/application.html.erb +46 -0
  110. data/lib/modularis/generators/templates/application.html.haml +31 -0
  111. data/lib/modularis/generators/templates/application.html.slim +28 -0
  112. data/lib/modularis/version.rb +3 -0
  113. data/lib/modularis.rb +17 -0
  114. data/modularis.gemspec +20 -0
  115. data/package.json +15 -0
  116. data/scss/compagecss/_variables.scss +1192 -0
  117. data/scss/compagecss/components/_alert-boxes.scss +106 -0
  118. data/scss/compagecss/components/_block-grid.scss +70 -0
  119. data/scss/compagecss/components/_breadcrumbs.scss +124 -0
  120. data/scss/compagecss/components/_button-groups.scss +88 -0
  121. data/scss/compagecss/components/_buttons.scss +226 -0
  122. data/scss/compagecss/components/_clearing.scss +217 -0
  123. data/scss/compagecss/components/_custom-forms.scss +246 -0
  124. data/scss/compagecss/components/_dropdown-buttons.scss +114 -0
  125. data/scss/compagecss/components/_dropdown.scss +149 -0
  126. data/scss/compagecss/components/_flex-video.scss +45 -0
  127. data/scss/compagecss/components/_flexbox-grid.scss +225 -0
  128. data/scss/compagecss/components/_flip.scss +105 -0
  129. data/scss/compagecss/components/_forms.scss +361 -0
  130. data/scss/compagecss/components/_global.scss +289 -0
  131. data/scss/compagecss/components/_grid.scss +184 -0
  132. data/scss/compagecss/components/_inline-lists.scss +52 -0
  133. data/scss/compagecss/components/_joyride.scss +210 -0
  134. data/scss/compagecss/components/_keystrokes.scss +56 -0
  135. data/scss/compagecss/components/_labels.scss +84 -0
  136. data/scss/compagecss/components/_magellan.scss +21 -0
  137. data/scss/compagecss/components/_off-canvas.scss +86 -0
  138. data/scss/compagecss/components/_orbit.scss +209 -0
  139. data/scss/compagecss/components/_pagination.scss +99 -0
  140. data/scss/compagecss/components/_panels.scss +76 -0
  141. data/scss/compagecss/components/_pricing-tables.scss +130 -0
  142. data/scss/compagecss/components/_progress-bars.scss +70 -0
  143. data/scss/compagecss/components/_reveal.scss +131 -0
  144. data/scss/compagecss/components/_section.scss +303 -0
  145. data/scss/compagecss/components/_side-nav.scss +68 -0
  146. data/scss/compagecss/components/_split-buttons.scss +166 -0
  147. data/scss/compagecss/components/_sub-nav.scss +67 -0
  148. data/scss/compagecss/components/_switch.scss +249 -0
  149. data/scss/compagecss/components/_tables.scss +80 -0
  150. data/scss/compagecss/components/_thumbs.scss +47 -0
  151. data/scss/compagecss/components/_tooltips.scss +113 -0
  152. data/scss/compagecss/components/_top-bar.scss +462 -0
  153. data/scss/compagecss/components/_type.scss +422 -0
  154. data/scss/compagecss/components/_visibility.scss +320 -0
  155. data/scss/modularis.scss +49 -0
  156. data/scss/normalize.scss +402 -0
  157. data/templates/project/.gitignore +44 -0
  158. data/templates/project/MIT-LICENSE.txt +20 -0
  159. data/templates/project/config.rb +26 -0
  160. data/templates/project/humans.txt +8 -0
  161. data/templates/project/index.html +124 -0
  162. data/templates/project/manifest.rb +44 -0
  163. data/templates/project/robots.txt +4 -0
  164. data/templates/project/scss/app.scss +48 -0
  165. data/templates/upgrade/manifest.rb +34 -0
  166. metadata +235 -0
@@ -0,0 +1,57 @@
1
+ <!DOCTYPE html>
2
+ <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
3
+ <!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
4
+ <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
5
+ <head>
6
+ <meta charset="utf-8" />
7
+
8
+ <!-- Set the viewport width to device width for mobile -->
9
+ <meta name="viewport" content="width=device-width" />
10
+
11
+ <title>Modularis Tabs Testing</title>
12
+
13
+ <!-- Included CSS Files -->
14
+ <link rel="stylesheet" href="../../../stylesheets/styles.css">
15
+ <link rel="stylesheet" href="../../../stylesheets/qunit.css">
16
+
17
+ <script src="../../../../lib/assets/javascripts/modularis/modernizr.modularis.js"></script>
18
+ </head>
19
+ <body>
20
+
21
+ <div class="row">
22
+ <div class="twelve columns">
23
+ <div id="qunit"></div>
24
+ <div id="qunit-fixture">
25
+
26
+ <div class="row">
27
+ <div class="twelve columns">
28
+ <ul id="tabs1" class="tabs">
29
+ <li class="active"><a href="#simple1">Simple Tab 1</a></li>
30
+ <li><a href="#simple2">Simple Tab 2</a></li>
31
+ <li><a href="#simple3">Simple Tab 3</a></li>
32
+ </ul>
33
+ <ul class="tabs-content">
34
+ <li class="active" id="simple1Tab">This is simple tab 1's content. Pretty neat, huh?</li>
35
+ <li id="simple2Tab">This is simple tab 2's content. Now you see it!</li>
36
+ <li id="simple3Tab">This is simple tab 3's content. It's only okay.</li>
37
+ </ul>
38
+ </div>
39
+ </div>
40
+
41
+ </div>
42
+ </div>
43
+ </div>
44
+
45
+ <!-- Test Modularis Components Here -->
46
+
47
+
48
+
49
+
50
+ <!-- Included JS Files -->
51
+ <script src="../../../../lib/assets/javascripts/modularis/jquery.js"></script>
52
+ <script src="../../../../lib/assets/javascripts/modularis/modularis.js"></script>
53
+ <script src="../../../../lib/assets/javascripts/modularis/jquery.modularis.tabs.js"></script>
54
+ <script src="../../../javascripts/qunit.js"></script>
55
+ <script src="../../../javascripts/tests/tabs/simple_tabs.js"></script>
56
+ </body>
57
+ </html>
@@ -0,0 +1,54 @@
1
+ module('core', {
2
+ setup: function () {
3
+ this.$tabs = $('#tabs1');
4
+ $(document).modularis('tabs');
5
+ },
6
+ teardown: function () {
7
+
8
+ }
9
+ });
10
+ test('setup is correct', function () {
11
+ ok(this.$tabs.length == 1, 'one one set of tabs should be present');
12
+ strictEqual(this.$tabs.find('a:last').hasClass('active'), false, 'last tab should not be active');
13
+ });
14
+ test('click tab activates content pane', function () {
15
+ var $activeTab = this.$tabs.find('.active a'),
16
+ $activeTabContent = $($activeTab.attr('href') + 'Tab'),
17
+ $lastTab = this.$tabs.find('a:last'),
18
+ $lastTabContent = $($lastTab.attr('href') + 'Tab');
19
+
20
+ strictEqual($activeTabContent.hasClass('active'), true, 'active tab content should be active');
21
+
22
+ $lastTab.trigger('click');
23
+
24
+ strictEqual($activeTabContent.hasClass('active'), false, 'previous tab content should no longer be active');
25
+ strictEqual($lastTabContent.hasClass('active'), true, 'newly clicked tab should be active');
26
+ });
27
+
28
+ module('initialize with wrong scope', {
29
+ setup: function () {
30
+ this.$tabs = $('#tabs1');
31
+ $('#tabs2').modularis('tabs');
32
+ },
33
+ teardown: function () {
34
+
35
+ }
36
+ });
37
+ test('setup is correct', function () {
38
+ ok(this.$tabs.length == 1, 'one one set of tabs should be present');
39
+ strictEqual(this.$tabs.find('a:last').hasClass('active'), false, 'last tab should not be active');
40
+ });
41
+ test('click tab activates content pane', function () {
42
+ var $activeTab = this.$tabs.find('.active a'),
43
+ $activeTabContent = $($activeTab.attr('href') + 'Tab'),
44
+ $lastTab = this.$tabs.find('a:last'),
45
+ $lastTabContent = $($lastTab.attr('href') + 'Tab');
46
+
47
+ strictEqual($activeTabContent.hasClass('active'), true, 'active tab content should be active');
48
+
49
+ // triggering an event on an uninitialized tabs should have no effect
50
+ $lastTab.trigger('click');
51
+
52
+ strictEqual($activeTabContent.hasClass('active'), true, 'previous tab should still be active');
53
+ strictEqual($lastTabContent.hasClass('active'), false, 'newly clicked tab should be NOT active');
54
+ });
@@ -0,0 +1,39 @@
1
+ <!DOCTYPE html>
2
+ <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
3
+ <!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
4
+ <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
5
+ <head>
6
+ <meta charset="utf-8" />
7
+
8
+ <!-- Set the viewport width to device width for mobile -->
9
+ <meta name="viewport" content="width=device-width" />
10
+
11
+ <title>Modularis Tooltips Testing</title>
12
+
13
+ <!-- Included CSS Files -->
14
+ <link rel="stylesheet" href="../../../stylesheets/styles.css">
15
+ <link rel="stylesheet" href="../../../stylesheets/qunit.css">
16
+
17
+ <script src="../../../../lib/assets/javascripts/modularis/modernizr.modularis.js"></script>
18
+ </head>
19
+ <body>
20
+
21
+ <div class="row">
22
+ <div class="twelve columns">
23
+ <div id="qunit"></div>
24
+ <div id="qunit-fixture">
25
+
26
+ <span class="has-tip" data-width="210" title="I'm on bottom and the default position.">Tooltip</span>
27
+
28
+ </div>
29
+ </div>
30
+ </div>
31
+
32
+ <!-- Included JS Files -->
33
+ <script src="../../../../lib/assets/javascripts/modularis/jquery.js"></script>
34
+ <script src="../../../../lib/assets/javascripts/modularis/modularis.js"></script>
35
+ <script src="../../../../lib/assets/javascripts/modularis/jquery.modularis.tooltips.js"></script>
36
+ <script src="../../../javascripts/qunit.js"></script>
37
+ <script src="../../../javascripts/tests/tooltips/tooltips.js"></script>
38
+ </body>
39
+ </html>
@@ -0,0 +1,11 @@
1
+ module('core', {
2
+ setup: function () {
3
+ $(document).modularis('tooltips');
4
+ },
5
+ teardown: function () {
6
+
7
+ }
8
+ });
9
+ test('setup', function () {
10
+ ok(false, 'please test');
11
+ });
@@ -0,0 +1,128 @@
1
+ <!doctype html>
2
+ <!--[if IE 8]><html class="no-js lt-ie9" lang="en"><![endif]-->
3
+ <!--[if gt IE 8]><!--><html class="no-js" lang="en"><!--<![endif]-->
4
+ <head>
5
+ <meta charset="utf-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Modularis Docs: <%= @page_title %></title>
8
+ <link rel="stylesheet" href="<%= asset_path %>/normalize.css" />
9
+ <link rel="stylesheet" href="<%= asset_path %>/docs.css" />
10
+ <script src="<%= asset_path %>/vendor/custom.modernizr.js"></script>
11
+ </head>
12
+ <body class="antialiased">
13
+
14
+ <nav class="top-bar">
15
+ <ul class="title-area">
16
+ <!-- Title Area -->
17
+ <li class="name">
18
+ <h1><a href="/">Modularis</a></h1>
19
+ </li>
20
+ <!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
21
+ <li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
22
+ </ul>
23
+
24
+ <section class="top-bar-section">
25
+ <!-- Right Nav Section -->
26
+ <ul class="right">
27
+ <li class="divider"></li>
28
+ <li><a href="<%= features_path %>">Features</a></li>
29
+ <li class="divider"></li>
30
+ <li><a href="<%= add_ons_path %>">Add-ons</a></li>
31
+ <li class="divider"></li>
32
+ <li><a href="<%= case_studies_path %>">Case Studies</a></li>
33
+ <li class="divider"></li>
34
+ <li><a href="<%= docs_path %>">Docs</a></li>
35
+ <li class="divider"></li>
36
+ <li><a href="<%= training_path %>">Training</a></li>
37
+ <li class="divider"></li>
38
+ <li class="has-form">
39
+ <a href="http://modularis.themepile.com/docs" class="button">Getting Started</a>
40
+ </li>
41
+ </ul>
42
+ </section>
43
+ </nav>
44
+
45
+ <% @page_title = "4 Documentation" %>
46
+ <div class="row">
47
+ <div class="large-12 columns">
48
+ <h1 class="docs header"><a href="http://modularis.themepile.com/docs/">Modularis <%= @page_title %></a></h1>
49
+ <h6 class="docs subheader"><a href="http://modularis.themepile.com/old-docs/f3">Want F3 Docs?</a></h6>
50
+ <hr>
51
+ </div>
52
+ </div>
53
+
54
+ <%= yield %>
55
+
56
+ <footer class="row full-width">
57
+ <div class="large-5 columns">
58
+ <h6><strong>Made by ZURB</strong></h6>
59
+ <p>Modularis is made by <a href="http://www.themepile.com/">ZURB</a>, a product design company in Campbell, California. We've put more than 14 years of experience building web products, services and websites into this framework. <a href="http://modularis.themepile.com/about.php">Modularis Info and Goodies &rarr;</a></p>
60
+ </div>
61
+
62
+ <div class="large-3 columns">
63
+ <h6><strong>Using Modularis?</strong></h6>
64
+ <p>Let us know how you're using Modularis and we might feature you as an example! <a href="mailto:modularis@themepile.com?subject=I'm%20using%20Modularis">Get in touch &rarr;</a></p>
65
+ </div>
66
+
67
+ <div class="large-4 columns">
68
+ <h6><strong>Need some help?</strong></h6>
69
+ <p>For answers or help visit the <a href="http://modularis.themepile.com/docs/support.html">Support page</a>.</p>
70
+ </div>
71
+ </footer>
72
+
73
+ <div id="copyright">
74
+ <div class="row full-width">
75
+ <div class="large-4 columns">
76
+ <p>Site content &copy; <%= Time.now.year %> ZURB, inc.</p>
77
+ </div>
78
+ <div class="large-8 columns">
79
+ <ul class="inline-list right">
80
+ <li><a href="http://modularis.themepile.com">Home</a></li>
81
+ <li><a href="http://modularis.themepile.com/download.php">Download</a></li>
82
+ <li><a href="http://modularis.themepile.com/docs">Docs</a></li>
83
+ <li><a href="http://modularis.themepile.com/docs/changelog.html">Changelog</a></li>
84
+ <li><a href="http://modularis.themepile.com/about.php">About</a></li>
85
+ <li><a href="http://feeds.feedburner.com/themepile/blog">Subscribe to the ZURBlog</a></li>
86
+ </ul>
87
+ </div>
88
+ </div>
89
+ </div>
90
+
91
+ <script>
92
+
93
+ // Google Analytics
94
+ var _gaq = _gaq || [];
95
+ _gaq.push(
96
+ ['_setAccount', 'UA-2195009-2'],
97
+ ['_trackPageview'],
98
+ ['b._setAccount', 'UA-2195009-27'],
99
+ ['b._trackPageview']
100
+ );
101
+
102
+ (function() {
103
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
104
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
105
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
106
+ })();
107
+
108
+ document.write('<script src="<%= asset_path %>/vendor/'
109
+ + ('__proto__' in {} ? 'zepto' : 'jquery')
110
+ + '.js"><\/script>');
111
+ </script>
112
+ <script src="<%= asset_path %>/docs.js"></script>
113
+ <script>
114
+ $(document)
115
+ <% if @joyride %>
116
+ .modularis()
117
+ .modularis('joyride', 'start');
118
+ <% else %>
119
+ .modularis();
120
+ <% end %>
121
+
122
+ // For Kitchen Sink Page
123
+ $('#start-jr').on('click', function() {
124
+ $(document).modularis('joyride','start');
125
+ });
126
+ </script>
127
+ </body>
128
+ </html>
@@ -0,0 +1,96 @@
1
+ <% @side_nav = "using" %>
2
+ <% @page_title = "Media Queries" %>
3
+ <div class="row">
4
+ <div class="large-9 push-3 columns">
5
+
6
+ <div class="row">
7
+ <div class="large-12 columns">
8
+ <h2><%= @page_title %></h2>
9
+ <h4 class="subheader">We keep media queries fairly simple in Modularis and let the percentage-based grid do the heavy lifting across various screen sizes.</h4>
10
+
11
+ <hr>
12
+
13
+ <h4>Working with Media Queries and CSS</h4>
14
+ <p>In CSS, media queries are easily written with a specific syntax. We only use one major breakpoint for the grid in Modularis to shift layouts for screens above 768px wide. The rest of the media queries are used for visibility classes. The following snippet shows you each of the media queries used in Modularis:</p>
15
+
16
+ <%= code_example '
17
+ /* We use this media query to add styles to any device that supports media queries */
18
+ @media only screen { }
19
+
20
+ /* Used to alter styles for screens at least 768px wide. This is where the grid changes. */
21
+ @media only screen and (min-width: 768px) {}
22
+
23
+ /* Used to alter styles for screens at least 1280px wide. */
24
+ @media only screen and (min-width: 1280px) {}
25
+
26
+ /* Used to alter styles for screens at least 1440px wide. */
27
+ @media only screen and (min-width: 1440px) {}
28
+
29
+ /* Apply styles to screens in landscape orientation */
30
+ @media only screen and (orientation: landscape) {}
31
+
32
+ /* Apply styles to screens in portrait orientation */
33
+ @media only screen and (orientation: portrait) {}
34
+
35
+ /* We also use Modernizr to add a .touch class to the body when applicable */
36
+ /* You can prepend this class to anything and it will style only for touch devices */
37
+ .touch .your-element {}
38
+ ', :css %>
39
+
40
+ <h4>Working with Media Queries and SCSS</h4>
41
+ <p>You can go ahead and use any of the CSS media queries in your SCSS files, but we've also made it easier with some handy variables you can use instead! Those variables are:</p>
42
+
43
+ <%= code_example '
44
+ /* Available Variables */
45
+ $small-screen: emCalc(768px);
46
+ $medium-screen: emCalc(1280px);
47
+ $large-screen: emCalc(1440px);
48
+
49
+ $screen: "only screen";
50
+ $small: "only screen and (min-width:"#{$small-screen}")";
51
+ $medium: "only screen and (min-width:"#{$medium-screen}")";
52
+ $large: "only screen and (min-width:"#{$large-screen}")";
53
+ $landscape: "only screen and (orientation: landscape)";
54
+ $portrait: "only screen and (orientation: portrait)";
55
+
56
+ /* We use this media query to add styles to any device that supports media queries */
57
+ @media #{$screen} { }
58
+
59
+ /* Used to alter styles for screens at least 768px wide. This is where the grid changes. */
60
+ @media #{$small} { }
61
+
62
+ /* Used to alter styles for screens at least 1280px wide. */
63
+ @media #{$medium} { }
64
+
65
+ /* Used to alter styles for screens at least 1440px wide. */
66
+ @media #{$large} { }
67
+
68
+ /* Apply styles to screens in landscape orientation */
69
+ @media #{$landscape} { }
70
+
71
+ /* Apply styles to screens in portrait orientation */
72
+ @media #{$portrait} { }
73
+
74
+ /* We also use Modernizr to add a .touch class to the body when applicable */
75
+ /* You can prepend this class to anything and it will style only for touch devices */
76
+ .touch .your-element {}
77
+ ', :css %>
78
+
79
+ </div>
80
+ </div>
81
+
82
+
83
+ </div>
84
+
85
+ <div class="large-3 pull-9 columns">
86
+ <%= render "_sidebar.html.erb" %>
87
+ </div>
88
+ </div>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
@@ -0,0 +1,76 @@
1
+ <% @side_nav = "using" %>
2
+
3
+ <div class="row">
4
+ <div class="large-9 push-3 columns"
5
+ <% @page_title = "Rails" %>
6
+ <div class="row">
7
+ <div class="large-12 columns">
8
+ <h2><%= @page_title %></h2>
9
+ <h4 class="subheader">We use Rails to develop our <a href="http://themepile.com/apps">apps</a> and Modularis makes things so much quicker. Start using Modularis in your Rails projects by following these instructions.</h4>
10
+ <hr>
11
+
12
+ <h4>Adding Modularis to the Asset Pipeline</h4>
13
+ <p>First you'll want to add the following gems to the assets group in your <code>Gemfile</code> like so:</p>
14
+
15
+ <%= code_example "
16
+ group :assets do
17
+ gem 'sass-rails', '~> 3.2.3'
18
+ gem 'coffee-rails', '~> 3.2.1'
19
+ gem 'uglifier', '>= 1.0.3'
20
+ # Add Modularis Here
21
+ gem 'themepile-modularis', '~> 4.0.0'
22
+ end
23
+ ", :ruby %>
24
+
25
+ <p>Then run <code>bundle install</code> to finish installing Modularis.</p>
26
+
27
+ <div class="panel">
28
+ <p><strong>NOTE:</strong> Make sure that your restart your server after running <code>bundle install</code>. Otherwise the asset pipeline may not recognize the new Modularis files.</p>
29
+ </div>
30
+
31
+ <h4>Easy Install</h4>
32
+ <p>Simply run <code>rails g modularis:install</code> to configure your application to use Modularis. That's it!</p>
33
+
34
+ <h4>Manual Installation</h4>
35
+ <h5 class="subheader">Add Modularis to your CSS</h5>
36
+ <p>Append the following line to your <code>app/assets/stylesheets/application.css</code> file:</p>
37
+
38
+ <%= code_example '
39
+ /*= require modularis */
40
+ ', :css %>
41
+
42
+ <p>If you're planning on using <a href="http://sass-lang.com/" rel="nofollow">Sass</a> then you'll want to rename <code>application.css</code> to <code>application.scss</code>. That file should then look like:</p>
43
+
44
+ <%= code_example '
45
+ @import "modularis";
46
+ ', :css %>
47
+
48
+ <h5 class="subheader">Add Modularis to your JS</h5>
49
+ <p>Append the following lines to your <code>app/assets/javascripts/application.js</code> file:</p>
50
+
51
+ <%= code_example '
52
+ //= require modularis
53
+ $(document).modularis();
54
+ ', :js %>
55
+
56
+ <h5 class="subheader">Add Modernizr</h5>
57
+ <p>Make sure that <a href="http://modernizr.com/" rel="nofollow">Modernizr</a> is included in the <code>&lt;head&gt;</code> of your page:</p>
58
+
59
+ <%= code_example '
60
+ javascript_include_tag "vendor/custom.modernizr"
61
+ ', :ruby %>
62
+
63
+ <h5 class="subheader">Set Viewport Width</h5>
64
+ <p>Add the following line to the <kbd>&lt;head&gt;</kbd> of your page layout:</p>
65
+
66
+ <%= code_example '
67
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
68
+ ', :html %>
69
+
70
+ </div>
71
+ </div>
72
+ <div class="large-3 pull-9 columns">
73
+ <%= render "_sidebar.html.erb" %>
74
+ </div>
75
+ </div>
76
+ </div>
data/docs/rtl.html.erb ADDED
@@ -0,0 +1,53 @@
1
+ <% @side_nav = "using" %>
2
+ <div class="row">
3
+ <div class="large-9 push-3 columns">
4
+
5
+ <% @page_title = "Right-to-Left Support" %>
6
+ <div class="row">
7
+ <div class="large-12 columns">
8
+ <h2><%= @page_title %></h2>
9
+ <h4 class="subheader">Right-to-left text direction support in Modularis allows you to easily switch text direction for all components.<h4>
10
+ </div>
11
+ </div>
12
+
13
+ <div class="row">
14
+ <div class="large-12 columns">
15
+ <h3>Setup</h3>
16
+ <p>Modularis 4 was built to support right-to-left text direction out of the box, but you'll need to make a couple of adjustments to your markup and SCSS to get everything up and running.</p>
17
+
18
+ <h4>Markup Changes for Right-to-Left Layouts</h4>
19
+ <p>You'll need to make a few changes to your markup to get the javascript components working nice and smooth. In the <code>html</code> tag, you'll need to add a <code>dir</code> attribute with a value of <code>rtl</code>. Here's what your <code>html</code> tag should look like:</p>
20
+ <%= code_example '
21
+ <!-- This example is for a right-to-left Arabic layout -->
22
+ <html class="no-js" lang="ar" dir="rtl">
23
+ ', :html %>
24
+ <h5>Change the Language Too</h5>
25
+ <p>You'll need to change your <code>lang</code> attribute value to match your language. Here's a handy list of common right-to-left languages and their html codes:</p>
26
+ <ul>
27
+ <li><strong>Arabic:</strong> ar</li>
28
+ <li><strong>Chinese:</strong> zh</li>
29
+ <li><strong>Farsi:</strong> fa</li>
30
+ <li><strong>Hebrew:</strong> he, iw</li>
31
+ <li><strong>Japanese:</strong> ja</li>
32
+ <li><strong>Urdu:</strong> ur</li>
33
+ <li><strong>Yiddish:</strong> yi, ji</li>
34
+ </ul>
35
+ <hr>
36
+ <h4>A Single SCSS Adjustment</h4>
37
+ <p>We made it really easy to switch the entire Modularis grid to right-to-left by changing the <code>$text-direction</code> SCSS variable. Here's what the variable should look like:</p>
38
+ <%= code_example '
39
+ $text-direction: rtl;
40
+ ', :css %>
41
+ <p>By changing this single variable, the entire grid and all the Modularis components will be switched to right-to-left orientation.</p>
42
+ <div class="panel">
43
+ <h6>Using CSS</h6>
44
+ <p>If you downloaded a static version of Modularis using the customizer to get a right-to-left support, your download should be ready to use without any of the steps mentioned above.</p>
45
+ <a href="http://modularis.themepile.com/download.php#customizeModularis">Download Right-to-Left Modularis 4 &raquo;</a>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ <div class="large-3 pull-9 columns">
51
+ <%= render "_sidebar.html.erb" %>
52
+ </div>
53
+ </div>