kayessess 0.1.2 → 0.1.3
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.
- data/app/assets/stylesheets/kayessess.css.scss +0 -3
- data/app/assets/stylesheets/modules/_tree.scss +21 -0
- data/app/controllers/kayessess/sections_controller.rb +1 -1
- data/app/helpers/kayessess/styleguide_helper.rb +1 -1
- data/app/views/kayessess/sections/_tree.html.erb +9 -0
- data/app/views/kayessess/sections/_tree_node.html.erb +3 -0
- data/app/views/kayessess/sections/index.html.erb +3 -8
- data/config/routes.rb +2 -2
- data/lib/kayessess/version.rb +1 -1
- metadata +6 -4
- data/app/views/kayessess/styleguides/show.html.erb +0 -3
@@ -0,0 +1,21 @@
|
|
1
|
+
.kayessess__tree {
|
2
|
+
@extend .padding-medium;
|
3
|
+
}
|
4
|
+
|
5
|
+
.kayessess__tree__path {
|
6
|
+
@extend .margin-wide-left;
|
7
|
+
|
8
|
+
& & {
|
9
|
+
@extend .margin-wide-left;
|
10
|
+
|
11
|
+
padding-top: 0;
|
12
|
+
padding-bottom: 0;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
.kayessess__node {
|
17
|
+
@extend .padding-medium-top;
|
18
|
+
@extend .padding-medium-bottom;
|
19
|
+
|
20
|
+
display: block;
|
21
|
+
}
|
@@ -12,7 +12,7 @@ module Kayessess
|
|
12
12
|
|
13
13
|
def section_navigation
|
14
14
|
@styleguide.root_sections.inject([]){|nav, node|
|
15
|
-
nav << link_to(node.
|
15
|
+
nav << link_to(node.name, section_path(node.to_path), class: 'kayessess__navigation__item')
|
16
16
|
nav
|
17
17
|
}.join('').html_safe
|
18
18
|
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<ol class="kayessess__tree__path">
|
2
|
+
<li class="kayessess__branch">
|
3
|
+
<%= link_to(tree.name, section_path(tree.to_path), class: 'kayessess__node') %>
|
4
|
+
<ol class="kayessess__tree__path">
|
5
|
+
<%= render :partial => "tree_node", :collection => tree.sections %>
|
6
|
+
</ol>
|
7
|
+
<%= render :partial => "tree", :collection => tree.children %>
|
8
|
+
</li>
|
9
|
+
</ol>
|
@@ -1,8 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
<%= @sections.inspect %>
|
5
|
-
|
6
|
-
<ol>
|
7
|
-
<%= render :partial => "section", :collection => @sections %>
|
8
|
-
</ol>
|
1
|
+
<section class="kayessess__tree">
|
2
|
+
<%= render :partial => "tree", locals: {tree: @tree_root} %>
|
3
|
+
</section>
|
data/config/routes.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Kayessess::Engine.routes.draw do
|
2
|
-
root :to => '
|
2
|
+
root :to => 'sections#index'
|
3
3
|
|
4
|
-
resources :sections, only: [:
|
4
|
+
resources :sections, only: [:show], constraints: { id: /.+/ }, :path => '' do
|
5
5
|
get 'example', on: :member
|
6
6
|
end
|
7
7
|
end
|
data/lib/kayessess/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kayessess
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -323,16 +323,18 @@ files:
|
|
323
323
|
- app/assets/stylesheets/lib/_syntax.scss
|
324
324
|
- app/assets/stylesheets/modules/_examples.scss
|
325
325
|
- app/assets/stylesheets/modules/_section.scss
|
326
|
+
- app/assets/stylesheets/modules/_tree.scss
|
326
327
|
- app/controllers/kayessess/application_controller.rb
|
327
328
|
- app/controllers/kayessess/sections_controller.rb
|
328
329
|
- app/helpers/kayessess/styleguide_helper.rb
|
329
330
|
- app/views/kayessess/common/_section_example.html.erb
|
330
331
|
- app/views/kayessess/sections/_node.html.erb
|
331
332
|
- app/views/kayessess/sections/_section.html.erb
|
333
|
+
- app/views/kayessess/sections/_tree.html.erb
|
334
|
+
- app/views/kayessess/sections/_tree_node.html.erb
|
332
335
|
- app/views/kayessess/sections/example.html.erb
|
333
336
|
- app/views/kayessess/sections/index.html.erb
|
334
337
|
- app/views/kayessess/sections/show.html.erb
|
335
|
-
- app/views/kayessess/styleguides/show.html.erb
|
336
338
|
- app/views/layouts/kayessess/application.html.erb
|
337
339
|
- app/views/layouts/kayessess/example.html.erb
|
338
340
|
- config/routes.rb
|
@@ -462,7 +464,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
462
464
|
version: '0'
|
463
465
|
segments:
|
464
466
|
- 0
|
465
|
-
hash:
|
467
|
+
hash: -1269859489091150148
|
466
468
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
467
469
|
none: false
|
468
470
|
requirements:
|
@@ -471,7 +473,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
471
473
|
version: '0'
|
472
474
|
segments:
|
473
475
|
- 0
|
474
|
-
hash:
|
476
|
+
hash: -1269859489091150148
|
475
477
|
requirements: []
|
476
478
|
rubyforge_project:
|
477
479
|
rubygems_version: 1.8.23
|