You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a fork of the original Arbre project starting when I stepped down from maintaining Active Admin in 2018.
2
-
Google 'why fork open source' for relevant articles.
3
-
4
-
# Arbre - HTML Views in Ruby
1
+
# Arbo - HTML Views in Ruby
5
2
6
-
[Arbre](https://www.activeadmin.info/arbre) makes it easy to generate HTML directly in Ruby. This gem was extracted from [Active Admin](https://github.com/activeadmin/active_admin).
3
+
[Arbo](https://github.com/varyonic/arbo) makes it easy to generate HTML directly in Ruby. This gem was forked from [Arbre](https://github.com/activeadmin/arbre),
4
+
starting when the author stepped down from maintaining Active Admin in 2018.
5
+
Google 'why fork open source' for relevant articles.
7
6
8
7
[![Version ][rubygems_badge]][rubygems]
9
-
[![Travis CI ][travis_badge]][travis]
10
8
11
9
## Goals
12
10
13
-
The purpose of Arbre is to leave the view as ruby objects as long
14
-
as possible. This allows OO Design to be used to implement the view layer.
11
+
The purpose of Arbo is to support Varyonic's fork of ActiveAdmin.
15
12
16
13
## Getting started
17
14
@@ -25,10 +22,8 @@ Please open GitHub issues for bugs and enhancements only, not general help reque
25
22
Please search previous issues (and Google and StackOverflow) before creating a new issue.
Copy file name to clipboardexpand all lines: docs/index.md
+14-14
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
---
2
2
redirect_from: /docs/documentation.html
3
3
---
4
-
# Arbre
4
+
# Arbo
5
5
HTML Views in Ruby
6
6
7
7
### Introduction
8
8
9
-
Arbre is a alternate template system for [Ruby on Rails Action View](http://guides.rubyonrails.org/action_view_overview.html).
10
-
Arbre expresses HTML using a Ruby DSL, which makes it similar to the [Builder](https://github.com/tenderlove/builder) gem for XML.
11
-
Arbre was extracted from [Active Admin](https://activeadmin.info/).
9
+
Arbo is a alternate template system for [Ruby on Rails Action View](http://guides.rubyonrails.org/action_view_overview.html).
10
+
Arbo expresses HTML using a Ruby DSL, which makes it similar to the [Builder](https://github.com/tenderlove/builder) gem for XML.
11
+
Arbo is a fork of Arbre, which was extracted from [Active Admin](https://activeadmin.info/).
12
12
13
13
An example `index.html.arb`:
14
14
@@ -23,18 +23,18 @@ html {
23
23
}
24
24
```
25
25
26
-
The purpose of Arbre is to leave the view as Ruby objects as long as possible,
26
+
The purpose of Arbo is to leave the view as Ruby objects as long as possible,
27
27
which allows an object-oriented approach including inheritance, composition, and encapsulation.
28
28
29
29
### Installation
30
30
31
-
Add gem `arbre` to your `Gemfile` and `bundle install`.
31
+
Add gem `arbo` to your `Gemfile` and `bundle install`.
32
32
33
-
Arbre registers itself as a Rails template handler for files with an extension `.arb`.
33
+
Arbo registers itself as a Rails template handler for files with an extension `.arb`.
34
34
35
35
### Tags
36
36
37
-
Arbre DSL is composed of HTML tags. Tag attributes including `id` and HTML classes are passed as a hash parameter and the tag body is passed as a block. Most HTML5 tags are implemented, including `script`, `embed` and `video`.
37
+
Arbo DSL is composed of HTML tags. Tag attributes including `id` and HTML classes are passed as a hash parameter and the tag body is passed as a block. Most HTML5 tags are implemented, including `script`, `embed` and `video`.
38
38
39
39
A special case is the paragraph tag, <p>, which is mapped to `para`.
40
40
@@ -44,9 +44,9 @@ To include text that is not immediately part of a tag use `text_node`.
44
44
45
45
### Components
46
46
47
-
Arbre DSL can be extended by defining new tags composed of other, simpler tags.
47
+
Arbo DSL can be extended by defining new tags composed of other, simpler tags.
48
48
This provides a simpler alternative to nesting partials.
49
-
The recommended approach is to subclass Arbre::Component and implement a new builder method.
49
+
The recommended approach is to subclass Arbo::Component and implement a new builder method.
50
50
51
51
The builder_method defines the method that will be called to build this component
52
52
when using the DSL. The arguments passed into the builder_method will be passed
@@ -55,7 +55,7 @@ into the #build method for you.
55
55
For example:
56
56
57
57
```ruby
58
-
classPanel < Arbre::Component
58
+
classPanel < Arbo::Component
59
59
builder_method :panel
60
60
61
61
defbuild(title, attributes= {})
@@ -68,14 +68,14 @@ end
68
68
69
69
By default components are `div` tags with an HTML class corresponding to the component class name. This can be overridden by redefining the `tag_name` method.
70
70
71
-
Several examples of Arbre components are [included in Active Admin](https://activeadmin.info/12-arbre-components.html)
71
+
Several examples of Arbo components are [included in Active Admin](https://activeadmin.info/12-arbo-components.html)
72
72
73
73
### Contexts
74
74
75
-
An [Arbre::Context](http://www.rubydoc.info/gems/arbre/Arbre/Context) is an object in which Arbre DSL is interpreted, providing a root for the Ruby DOM that can be [searched and manipulated](http://www.rubydoc.info/gems/arbre/Arbre/Element). A context is automatically provided when a `.arb` template or partial is loaded. Contexts can be used when developing or testing a component. Contexts are rendered by calling to_s.
75
+
An [Arbo::Context](http://www.rubydoc.info/gems/arbo/Arbo/Context) is an object in which Arbo DSL is interpreted, providing a root for the Ruby DOM that can be [searched and manipulated](http://www.rubydoc.info/gems/arbo/Arbo/Element). A context is automatically provided when a `.arb` template or partial is loaded. Contexts can be used when developing or testing a component. Contexts are rendered by calling to_s.
0 commit comments