fortitude 0.9.1-java → 0.9.2-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/.travis.yml +28 -22
  4. data/CHANGES.md +50 -0
  5. data/CONTRIBUTORS.md +1 -0
  6. data/doc/.gitignore +18 -0
  7. data/doc/Gemfile +21 -0
  8. data/doc/config.rb +92 -0
  9. data/doc/source/images/background.png +0 -0
  10. data/doc/source/images/middleman.png +0 -0
  11. data/doc/source/images/why/icon_button.png +0 -0
  12. data/doc/source/images/why/icon_button@2x.png +0 -0
  13. data/doc/source/images/why/modal_dialog@2x.png +0 -0
  14. data/doc/source/index.html.pcss +96 -0
  15. data/doc/source/index.html.rb +66 -0
  16. data/doc/source/javascripts/all.js +1 -0
  17. data/doc/source/javascripts/highlight.pack.js +1 -0
  18. data/doc/source/layouts/layout.rb +55 -0
  19. data/doc/source/portable/fortitude-bootstrap.rb +53 -0
  20. data/doc/source/shared/base.pcss +62 -0
  21. data/doc/source/shared/base.rb +30 -0
  22. data/doc/source/shared/common.rb +55 -0
  23. data/doc/source/shared/standard_page.rb +40 -0
  24. data/doc/source/stylesheets/_shared_prefix.scss +25 -0
  25. data/doc/source/stylesheets/all.css.scss +7 -0
  26. data/doc/source/stylesheets/basics.css.scss +20 -0
  27. data/doc/source/stylesheets/bootstrap_importer.css.scss +1 -0
  28. data/doc/source/stylesheets/highlight/arta.css +140 -0
  29. data/doc/source/stylesheets/highlight/ascetic.css +52 -0
  30. data/doc/source/stylesheets/highlight/atelier-dune.dark.css +95 -0
  31. data/doc/source/stylesheets/highlight/atelier-dune.light.css +95 -0
  32. data/doc/source/stylesheets/highlight/atelier-forest.dark.css +95 -0
  33. data/doc/source/stylesheets/highlight/atelier-forest.light.css +95 -0
  34. data/doc/source/stylesheets/highlight/atelier-heath.dark.css +95 -0
  35. data/doc/source/stylesheets/highlight/atelier-heath.light.css +95 -0
  36. data/doc/source/stylesheets/highlight/atelier-lakeside.dark.css +95 -0
  37. data/doc/source/stylesheets/highlight/atelier-lakeside.light.css +95 -0
  38. data/doc/source/stylesheets/highlight/atelier-seaside.dark.css +95 -0
  39. data/doc/source/stylesheets/highlight/atelier-seaside.light.css +95 -0
  40. data/doc/source/stylesheets/highlight/brown_paper.css +104 -0
  41. data/doc/source/stylesheets/highlight/brown_papersq.png +0 -0
  42. data/doc/source/stylesheets/highlight/codepen-embed.css +108 -0
  43. data/doc/source/stylesheets/highlight/color-brewer.css +168 -0
  44. data/doc/source/stylesheets/highlight/dark.css +104 -0
  45. data/doc/source/stylesheets/highlight/default.css +152 -0
  46. data/doc/source/stylesheets/highlight/docco.css +135 -0
  47. data/doc/source/stylesheets/highlight/far.css +111 -0
  48. data/doc/source/stylesheets/highlight/foundation.css +136 -0
  49. data/doc/source/stylesheets/highlight/github.css +124 -0
  50. data/doc/source/stylesheets/highlight/googlecode.css +147 -0
  51. data/doc/source/stylesheets/highlight/hybrid.css +170 -0
  52. data/doc/source/stylesheets/highlight/idea.css +125 -0
  53. data/doc/source/stylesheets/highlight/ir_black.css +109 -0
  54. data/doc/source/stylesheets/highlight/kimbie.dark.css +96 -0
  55. data/doc/source/stylesheets/highlight/kimbie.light.css +96 -0
  56. data/doc/source/stylesheets/highlight/magula.css +121 -0
  57. data/doc/source/stylesheets/highlight/mono-blue.css +69 -0
  58. data/doc/source/stylesheets/highlight/monokai.css +127 -0
  59. data/doc/source/stylesheets/highlight/monokai_sublime.css +154 -0
  60. data/doc/source/stylesheets/highlight/obsidian.css +153 -0
  61. data/doc/source/stylesheets/highlight/paraiso.dark.css +95 -0
  62. data/doc/source/stylesheets/highlight/paraiso.light.css +95 -0
  63. data/doc/source/stylesheets/highlight/pojoaque.css +107 -0
  64. data/doc/source/stylesheets/highlight/pojoaque.jpg +0 -0
  65. data/doc/source/stylesheets/highlight/railscasts.css +187 -0
  66. data/doc/source/stylesheets/highlight/rainbow.css +108 -0
  67. data/doc/source/stylesheets/highlight/school_book.css +112 -0
  68. data/doc/source/stylesheets/highlight/school_book.png +0 -0
  69. data/doc/source/stylesheets/highlight/solarized_dark.css +108 -0
  70. data/doc/source/stylesheets/highlight/solarized_light.css +108 -0
  71. data/doc/source/stylesheets/highlight/sunburst.css +164 -0
  72. data/doc/source/stylesheets/highlight/tomorrow-night-blue.css +95 -0
  73. data/doc/source/stylesheets/highlight/tomorrow-night-bright.css +94 -0
  74. data/doc/source/stylesheets/highlight/tomorrow-night-eighties.css +94 -0
  75. data/doc/source/stylesheets/highlight/tomorrow-night.css +95 -0
  76. data/doc/source/stylesheets/highlight/tomorrow.css +92 -0
  77. data/doc/source/stylesheets/highlight/vs.css +93 -0
  78. data/doc/source/stylesheets/highlight/xcode.css +158 -0
  79. data/doc/source/stylesheets/highlight/zenburn.css +118 -0
  80. data/doc/source/why/a_larger_view.html.rb +774 -0
  81. data/doc/source/why/a_simple_helper.html.rb +332 -0
  82. data/doc/source/why/building_a_rich_modal_dialog.html.rb +156 -0
  83. data/doc/source/why/commonality_and_inheritance.html.rb +564 -0
  84. data/doc/source/why/example_list.rb +60 -0
  85. data/doc/source/why/example_page.rb +116 -0
  86. data/doc/source/why/index.html.rb +86 -0
  87. data/doc/source/why/other_benefits.html.rb +110 -0
  88. data/fortitude.gemspec +6 -1
  89. data/lib/fortitude/doctypes/html4_tags_strict.rb +1 -0
  90. data/lib/fortitude/doctypes/html5.rb +1 -0
  91. data/lib/fortitude/method_templates/tag_method_template.rb.smpl +27 -14
  92. data/lib/fortitude/rails/helpers.rb +2 -2
  93. data/lib/fortitude/rendering_context.rb +10 -1
  94. data/lib/fortitude/tags/tag.rb +3 -2
  95. data/lib/fortitude/tags/tag_support.rb +8 -3
  96. data/lib/fortitude/tilt/fortitude_template.rb +6 -2
  97. data/lib/fortitude/version.rb +1 -1
  98. data/lib/fortitude/widget.rb +2 -0
  99. data/lib/fortitude/widget/convenience.rb +30 -0
  100. data/lib/fortitude/widget/files.rb +22 -11
  101. data/lib/fortitude/widget/needs.rb +5 -3
  102. data/spec/helpers/system_helpers.rb +1 -0
  103. data/spec/rails/development_mode_system_spec.rb +0 -1
  104. data/spec/rails/rendering_system_spec.rb +20 -1
  105. data/spec/rails/templates/rendering_system_spec/app/controllers/rendering_system_spec_controller.rb +13 -0
  106. data/spec/rails/templates/rendering_system_spec/app/views/rendering_system_spec/render_hash_subclass.rb +18 -0
  107. data/spec/rails/templates/rendering_system_spec/lib/my_hash.rb +5 -0
  108. data/spec/system/convenience_methods_system_spec.rb +166 -0
  109. data/spec/system/formatting_system_spec.rb +25 -1
  110. data/spec/system/tag_rendering_system_spec.rb +73 -0
  111. data/spec/system/tilt_system_spec.rb +31 -0
  112. data/spec/system/widget_class_from_spec.rb +20 -4
  113. metadata +91 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a0da70f10c6efd92397b92b403da0fc45a0fdd8e
4
- data.tar.gz: 3747f7259db1e882d52cee43c0bcbb8206ac5af0
3
+ metadata.gz: c93f8669e21ad6c24b05ee70f6495a89c8f2b3d8
4
+ data.tar.gz: 92acd8a7745f0dcd24af14b2e631b9786ee01142
5
5
  SHA512:
6
- metadata.gz: 2e594adf4b0fcdfe2f18075d3f33bc9f2107201ce970de766044089f97a68758c3d9648ea97ca0c6e835eb9dcd968ecd1a6fd7f0c068e8ea8125f63733af123e
7
- data.tar.gz: c932fee9235eee71853d612347ac39fc4b361dae5118118224351a566ebc7317da381fb93cb64ddb959ff70c31df9ccd5bb847c155a818cc159466e6c7ffd608
6
+ metadata.gz: b517772661194a742cfd5e3a76220e5fee17e5abf41a0642f9c7afacdc7cf6c4dea0c6986895d76fa0b35ca3de8304c51a1072b36ccdc34c5014e0a5b0f96194
7
+ data.tar.gz: 9065a12094ce4249747a119bf57e51ddf3294d2e96427052afe252349a1ed7ad5e22f8746ba8c38816081d5c6354b780393c0fcef9d579105e15633729b7822b
data/.gitignore CHANGED
@@ -7,7 +7,6 @@ Gemfile.lock
7
7
  InstalledFiles
8
8
  _yardoc
9
9
  coverage
10
- doc/
11
10
  lib/bundler/man
12
11
  pkg
13
12
  rdoc
@@ -18,3 +17,4 @@ tmp
18
17
  lib/*.bundle
19
18
  /*.sublime-project
20
19
  /*.sublime-workspace
20
+ /doc/source/.retina_images_workaround
@@ -1,16 +1,18 @@
1
1
  rvm:
2
2
  - "1.8.7"
3
- - "1.9.3"
4
- - "2.0.0"
5
- - "2.1.4"
6
- - "jruby-1.7.16.1"
3
+ - "1.9.3-p551"
4
+ - "2.0.0-p598"
5
+ - "2.1.5"
6
+ - "2.2.0"
7
+ - "jruby-1.7.18"
7
8
  env:
8
- - FORTITUDE_SPECS_RAILS_VERSION=4.1.7
9
- - FORTITUDE_SPECS_RAILS_VERSION=4.0.11
10
- - FORTITUDE_SPECS_RAILS_VERSION=3.2.20
9
+ - FORTITUDE_SPECS_RAILS_VERSION=4.2.0
10
+ - FORTITUDE_SPECS_RAILS_VERSION=4.1.9
11
+ - FORTITUDE_SPECS_RAILS_VERSION=4.0.13
12
+ - FORTITUDE_SPECS_RAILS_VERSION=3.2.21
11
13
  - FORTITUDE_SPECS_RAILS_VERSION=3.1.12
12
14
  - FORTITUDE_SPECS_RAILS_VERSION=3.0.20
13
- - FORTITUDE_NATIVE_EXTENSIONS=false FORTITUDE_SPECS_RAILS_VERSION=4.1.7
15
+ - FORTITUDE_NATIVE_EXTENSIONS=false FORTITUDE_SPECS_RAILS_VERSION=4.2.0
14
16
  - FORTITUDE_NATIVE_EXTENSIONS=false FORTITUDE_SPECS_RAILS_VERSION=3.0.20
15
17
  before_script:
16
18
  - export JRUBY_OPTS="$JRUBY_OPTS -J-Xmx128m -J-Xms128m -J-Xss2048k"
@@ -18,11 +20,13 @@ matrix:
18
20
  exclude:
19
21
  # Rails 4.x doesn't support Ruby 1.8.7
20
22
  - rvm: 1.8.7
21
- env: FORTITUDE_SPECS_RAILS_VERSION=4.1.7
23
+ env: FORTITUDE_SPECS_RAILS_VERSION=4.2.0
22
24
  - rvm: 1.8.7
23
- env: FORTITUDE_NATIVE_EXTENSIONS=false FORTITUDE_SPECS_RAILS_VERSION=4.1.7
25
+ env: FORTITUDE_SPECS_RAILS_VERSION=4.1.9
24
26
  - rvm: 1.8.7
25
- env: FORTITUDE_SPECS_RAILS_VERSION=4.0.11
27
+ env: FORTITUDE_NATIVE_EXTENSIONS=false FORTITUDE_SPECS_RAILS_VERSION=4.2.0
28
+ - rvm: 1.8.7
29
+ env: FORTITUDE_SPECS_RAILS_VERSION=4.0.13
26
30
  # 2014-06-19 ageweke -- ARGH. After trying about seventeen different things, no matter what I do,
27
31
  # Travis fails JRuby builds about 20% of the time with "Killed". Their documentation indicates that this
28
32
  # is likely an out-of-memory issue (i.e., entire VM's memory is consumed). However, I'm running JRuby with
@@ -34,17 +38,19 @@ matrix:
34
38
  # one manually to make sure there aren't other failures, too. This is very frustrating, but I can't seem to
35
39
  # find a way around it. If there's a fix out there somewhere, I'm all ears!
36
40
  allow_failures:
37
- - rvm: jruby-1.7.16.1
38
- env: FORTITUDE_SPECS_RAILS_VERSION=4.1.7
39
- - rvm: jruby-1.7.16.1
40
- env: FORTITUDE_SPECS_RAILS_VERSION=4.0.11
41
- - rvm: jruby-1.7.16.1
42
- env: FORTITUDE_SPECS_RAILS_VERSION=3.2.20
43
- - rvm: jruby-1.7.16.1
41
+ - rvm: jruby-1.7.18
42
+ env: FORTITUDE_SPECS_RAILS_VERSION=4.2.0
43
+ - rvm: jruby-1.7.18
44
+ env: FORTITUDE_SPECS_RAILS_VERSION=4.1.9
45
+ - rvm: jruby-1.7.18
46
+ env: FORTITUDE_SPECS_RAILS_VERSION=4.0.13
47
+ - rvm: jruby-1.7.18
48
+ env: FORTITUDE_SPECS_RAILS_VERSION=3.2.21
49
+ - rvm: jruby-1.7.18
44
50
  env: FORTITUDE_SPECS_RAILS_VERSION=3.1.12
45
- - rvm: jruby-1.7.16.1
51
+ - rvm: jruby-1.7.18
46
52
  env: FORTITUDE_SPECS_RAILS_VERSION=3.0.20
47
- - rvm: jruby-1.7.16.1
48
- env: FORTITUDE_NATIVE_EXTENSIONS=false FORTITUDE_SPECS_RAILS_VERSION=4.1.7
49
- - rvm: jruby-1.7.16.1
53
+ - rvm: jruby-1.7.18
54
+ env: FORTITUDE_NATIVE_EXTENSIONS=false FORTITUDE_SPECS_RAILS_VERSION=4.2.0
55
+ - rvm: jruby-1.7.18
50
56
  env: FORTITUDE_NATIVE_EXTENSIONS=false FORTITUDE_SPECS_RAILS_VERSION=3.0.20
data/CHANGES.md CHANGED
@@ -1,5 +1,55 @@
1
1
  # Fortitude Releases
2
2
 
3
+ ## 0.9.2, 22 January 2015
4
+
5
+ * Began writing lots of documentation for Fortitude, beginning with the reasons why you should use it.
6
+ * Fixed a single spec that caused failures under Rails 4.2.0 (which was an issue with the spec and something changed
7
+ in Rails 4.2, not Fortitude).
8
+ * Fixed a bug where if you call `return` from inside a block passed to a tag method, the closing tags would not be
9
+ output, resulting in invalid HTML. (Thanks to [Leaf](https://github.com/leafo) for the bug report!)
10
+ * Fixed a bug where if you raised an exception from inside a block passed to a tag method, the closing tags would not
11
+ be output, resulting in invalid HTML.
12
+ * Added a couple of missing `form_for` helper methods (`button`, `submit`) that somehow I missed. (Thanks to
13
+ [Leaf](https://github.com/leafo) for the bug report!)
14
+ * Fixed a bug where passing an object that was a `Hash`, or a subclass of `Hash`, to a view would cause that object to
15
+ become an object of class `ActiveSupport::HashWithIndifferentAccess` instead. (This was because we were, internally,
16
+ calling `#with_indifferent_access` on the `Hash` we had that contained all assignments to a widget, and
17
+ `#with_indifferent_access` is recursive.)
18
+ * `Fortitude::Widget.widget_class_from_file`, when it cannot find a class in the given file, now returns any constants
19
+ it _did_ find matching names it thinks that file might use in the resulting exception. This can be used to, for
20
+ example, determine if the file in question actually contains a module with the appropriate name, rather than a
21
+ widget class.
22
+ * When rendering using Tilt, Fortitude now properly supplies the file and line to the call to `eval` the source code of
23
+ the widget. This, in turn, means that `__FILE__`, `__LINE__`, and `caller` will work properly when used at class
24
+ level inside a widget rendered via Tilt.
25
+ * Fixed a bug where `Fortitude::Widget.widget_class_from_file` and `Fortitude::Widget.widget_class_from_source` would,
26
+ when scanning a file containing an ordinary class definition like
27
+ `module Foo; module Bar; class Baz < Fortitude::Widget`, instead return a class `Foo::Baz` if such existed and
28
+ was a descendant of `Fortitude::Widget` instead of the correct `Foo::Bar::Baz`.
29
+ * Fixed a bug where, if `format_output` was turned on, `<pre>` tags would still insert whitespace and newlines for
30
+ formatting like any other tag &mdash; which is incorrect, because, only inside `<pre>` tags, such whitespace is
31
+ significant. Now, `<pre>` tags correctly suppress all formatting within them.
32
+ * Added `Fortitude::Widget#content_and_attributes_from_tag_arguments`; this takes as input any style of arguments
33
+ permitted to a Fortitude tag method (_e.g._, `p`, `p 'hello'`, `p :id => :foo`, `p 'hello', :id => :foo`) and always
34
+ returns a two-element array &mdash; the first element is the text supplied to the method (if any), and the second
35
+ is the attributes supplied to the method (if any), or an empty `Hash` otherwise. This can help take a fair amount of
36
+ bookkeeping burden off of helper methods you might build on top of Fortitude.
37
+ * Added `Fortitude::Widget#add_css_classes` (_a.k.a._ `#add_css_class`). This takes as its first argument one or more
38
+ CSS classes to add (as a `String`, `Symbol`, or `Array` of such), and, as its remainder, any arguments valid for a
39
+ Fortitude tag method (_e.g._, textual content, a `Hash` of attributes, textual content and a `Hash`, or neither).
40
+ It then returns a two-argument array of textual content and attributes; the attributes will have a `class` or
41
+ `:class` key that contains any classes specified in the original, plus the additional classes to add. In other
42
+ words, you can use it as such:
43
+
44
+ ```ruby
45
+ def super_p(*args, &block)
46
+ p(*add_css_classes(:super, *args), &block)
47
+ end
48
+ ```
49
+
50
+ ...and now `super_p` acts just like `p`, except that it adds a class of `super` to its output. This is an extremely
51
+ common pattern in code built on top of Fortitude, and so now it is baked into the core.
52
+
3
53
  ## 0.9.1, 14 December 2014
4
54
 
5
55
  * Fixed a bug where doing something like `div nil, :class => 'foo'` would simply output `<div></div>`, rather than the
@@ -31,6 +31,7 @@ Fortitude is written by [Andrew Geweke](https://github.com/ageweke), with contri
31
31
  properly.
32
32
  * Reporting a bug where doing something like `div(nil, :class => 'foo')` would produce just `<div></div>` instead of
33
33
  the desired `<div class="foo"></div>`.
34
+ * Reporting an issue where `return`ing from inside a block passed to a tag method would not render the closing tags.
34
35
  * [Adam Becker](https://github.com/ajb) for:
35
36
  * Discussion and details around exactly what `:attribute => true`, `:attribute => false`, and so on should render
36
37
  from Fortitude.
@@ -0,0 +1,18 @@
1
+ # See http://help.github.com/ignore-files/ for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile ~/.gitignore_global
6
+
7
+ # Ignore bundler config
8
+ /.bundle
9
+
10
+ # Ignore the build directory
11
+ /build
12
+
13
+ # Ignore cache
14
+ /.sass-cache
15
+ /.cache
16
+
17
+ # Ignore .DS_store file
18
+ .DS_Store
@@ -0,0 +1,21 @@
1
+ # If you do not have OpenSSL installed, update
2
+ # the following line to use "http://" instead
3
+ source 'https://rubygems.org'
4
+
5
+ gem "middleman", "~>3.3.7"
6
+
7
+ # Live-reloading plugin
8
+ gem "middleman-livereload", "~> 3.1.0"
9
+
10
+ # For faster file watcher updates on Windows:
11
+ gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw]
12
+
13
+ # Windows does not come with time zone data
14
+ gem "tzinfo-data", platforms: [:mswin, :mingw]
15
+
16
+ gem "fortitude", :path => "../"
17
+ gem "parcels", :path => '../../parcels'
18
+ gem "bootstrap-sass", :require => false
19
+ gem "retina_images", :path => '../../retina_images'
20
+ gem "humanize"
21
+ gem "awesome_print"
@@ -0,0 +1,92 @@
1
+ require 'fortitude'
2
+ require 'parcels'
3
+ require 'retina_images'
4
+ require 'source/shared/base'
5
+ require 'source/shared/standard_page'
6
+
7
+ ###
8
+ # Compass
9
+ ###
10
+
11
+ # Change Compass configuration
12
+ # compass_config do |config|
13
+ # config.output_style = :compact
14
+ # end
15
+
16
+ ###
17
+ # Page options, layouts, aliases and proxies
18
+ ###
19
+
20
+ # Per-page layout changes:
21
+ #
22
+ # With no layout
23
+ # page "/path/to/file.html", :layout => false
24
+ #
25
+ # With alternative layout
26
+ # page "/path/to/file.html", :layout => :otherlayout
27
+ #
28
+ # A path which all have the same layout
29
+ # with_layout :admin do
30
+ # page "/admin/*"
31
+ # end
32
+
33
+ # Proxy pages (http://middlemanapp.com/basics/dynamic-pages/)
34
+ # proxy "/this-page-has-no-template.html", "/template-file.html", :locals => {
35
+ # :which_fake_page => "Rendering a fake page with a local variable" }
36
+
37
+ ###
38
+ # Helpers
39
+ ###
40
+
41
+ # Automatic image dimensions on image_tag helper
42
+ # activate :automatic_image_sizes
43
+
44
+ # Reload the browser automatically whenever files change
45
+ # configure :development do
46
+ # activate :livereload
47
+ # end
48
+
49
+ # Methods defined in the helpers block are available in templates
50
+ # helpers do
51
+ # def some_helper
52
+ # "Helping"
53
+ # end
54
+ # end
55
+
56
+ set :css_dir, 'stylesheets'
57
+
58
+ set :js_dir, 'javascripts'
59
+
60
+ set :images_dir, 'images'
61
+
62
+ # Build-specific configuration
63
+ configure :build do
64
+ # For example, change the Compass output style for deployment
65
+ # activate :minify_css
66
+
67
+ # Minify Javascript on build
68
+ # activate :minify_javascript
69
+
70
+ # Enable cache buster
71
+ # activate :asset_hash
72
+
73
+ # Use relative URLs
74
+ # activate :relative_assets
75
+
76
+ # Or use a different image path
77
+ # set :http_prefix, "/Content/images/"
78
+ end
79
+
80
+ sprockets.import_asset 'bootstrap.js'
81
+
82
+ after_configuration do
83
+ doc_root = File.expand_path(File.dirname(__FILE__))
84
+ widgets_root = File.join(doc_root, 'source')
85
+ images_root = File.join(doc_root, 'source', 'images')
86
+ temp_dir_root = File.expand_path(File.join(File.dirname(doc_root), 'tmp', 'docs'))
87
+
88
+ sprockets.parcels.workaround_directories_root = temp_dir_root
89
+ sprockets.parcels.add_widget_tree!(widgets_root)
90
+
91
+ sprockets.retina_images.add_image_tree!(images_root)
92
+ end
@@ -0,0 +1,96 @@
1
+ @at-root #{&} { padding-left: 0; padding-right: 0; }
2
+
3
+ .highlighted {
4
+ background-color: $background-color;
5
+ padding-bottom: 60px;
6
+ }
7
+
8
+ .jumbotron {
9
+ text-align: center;
10
+ padding-top: 60px;
11
+ padding-bottom: 20px;
12
+ }
13
+
14
+ h2 {
15
+ font-family: $body-font;
16
+ font-weight: $body-font-medium-weight;
17
+ color: $highlight-color;
18
+ margin-left: auto;
19
+ margin-right: auto;
20
+ margin-top: 60px;
21
+ }
22
+
23
+ h3 {
24
+ font-family: $body-font;
25
+ color: $highlight-color;
26
+ }
27
+
28
+ .what-is {
29
+ text-align: left;
30
+ margin-top: 30px;
31
+ h3 {
32
+ padding-left: 10px;
33
+ }
34
+ p {
35
+ color: $highlight-color;
36
+ font-size: 130%;
37
+ padding-left: 10%;
38
+ padding-right: 10%;
39
+ }
40
+ }
41
+
42
+ .praise-quotes {
43
+ padding-left: 30px;
44
+ padding-right: 30px;
45
+ }
46
+
47
+ blockquote {
48
+ .attribution {
49
+ margin-top: 10px;
50
+ text-align: right;
51
+ }
52
+
53
+ border: none;
54
+ color: $highlight-color;
55
+ font-style: italic;
56
+ }
57
+
58
+ .nav-links {
59
+ margin-top: 30px;
60
+ padding-left: 15px;
61
+ padding-right: 15px;
62
+ }
63
+
64
+ .nav-link-button {
65
+ border: 1px solid $highlight-color;
66
+ background-color: $bold-translucent;
67
+ vertical-align: center;
68
+
69
+ h3 {
70
+ padding-top: 15px;
71
+ padding-bottom: 15px;
72
+ margin-top: 0;
73
+ margin-bottom: 0;
74
+ }
75
+
76
+ a {
77
+ h3 {
78
+ font-weight: $body-font-medium-weight;
79
+ text-align: center;
80
+ }
81
+ }
82
+ }
83
+
84
+ .offsite-links {
85
+ padding-left: 30px;
86
+ padding-right: 30px;
87
+ padding-top: 15px;
88
+ padding-bottom: 50px;
89
+
90
+ font-family: $heading-font;
91
+ font-weight: $heading-font-light-weight;
92
+ a { padding-bottom: 15px; color: black; }
93
+ color: black;
94
+ font-size: 16px;
95
+ text-align: center;
96
+ }
@@ -0,0 +1,66 @@
1
+ class Views::Index < ::Views::Shared::Base
2
+ def content
3
+ fluid_container {
4
+ div(:class => :highlighted) {
5
+ jumbotron {
6
+ h1 "Fortitude"
7
+ h2 "Beautifully-factored HTML views for your Ruby or Rails application.", :class => :subhead
8
+ }
9
+
10
+ row(:class => 'praise-quotes') {
11
+ praise_quote "Quin H.", %{At first, I was skeptical. But after writing views in Fortitude for a couple of weeks,
12
+ I realized I could never go back to anything else. It makes that big a difference.}
13
+ praise_quote "Oleksiy K.", %{I’ve been doing Rails (95% backend) for 8 years now...and today, after hearing about Fortitude
14
+ and Parcels, was the first time ever that I wanted to actually try to do some user-facing feature development.}
15
+ }
16
+
17
+ row(:class => 'what-is') {
18
+ columns(:medium => 12) {
19
+ p %{Fortitude is a templating engine for Ruby, with or without Rails, that gives you all the power of
20
+ Ruby to factor your views. Using Fortitude, you'll build dramatically better-factored, more readable,
21
+ more maintainable views.}
22
+ }
23
+ }
24
+
25
+ row(:class => 'nav-links') {
26
+ big_nav_link "Why use Fortitude?", "/why"
27
+ big_nav_link "Getting Started", "/getting-started"
28
+ big_nav_link "Reference", "/reference"
29
+ }
30
+ }
31
+
32
+ row(:class => 'offsite-links') {
33
+ columns(:medium => 4) {
34
+ a("Fortitude on GitHub", :href => 'https://github.com/ageweke/fortitude')
35
+ }
36
+ columns(:medium => 4) {
37
+ a("Fortitude on Travis CI", :href => 'https://travis-ci.org/ageweke/fortitude')
38
+ }
39
+ columns(:medium => 4) {
40
+ a("Fortitude on Google Groups", :href => 'https://groups.google.com/forum/#!forum/fortitude-ruby')
41
+ }
42
+ }
43
+ }
44
+ end
45
+
46
+ def big_nav_link(text, to_where)
47
+ columns(:small => 4) {
48
+ div(:class => 'nav-link-button') {
49
+ a(:href => to_where) {
50
+ h3 text, :class => 'nav-link'
51
+ }
52
+ }
53
+ }
54
+ end
55
+
56
+ def praise_quote(attribution, quote)
57
+ columns(:medium => 6) {
58
+ blockquote {
59
+ span(:class => 'quote') {
60
+ text quote
61
+ }
62
+ div("— #{attribution}", :class => 'attribution')
63
+ }
64
+ }
65
+ end
66
+ end