kayessess 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -25,10 +25,7 @@ html.kayessess {
25
25
  // ----------------------------------------
26
26
  @import "lib/base";
27
27
  @import "lib/spacing";
28
-
29
28
  @import "layout/*";
30
-
31
29
  @import "lib/syntax";
32
-
33
30
  @import "modules/*";
34
31
  }
@@ -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
+ }
@@ -6,7 +6,7 @@ module Kayessess
6
6
  before_filter :find_node, only: [:show, :example]
7
7
 
8
8
  def index
9
- @sections = @styleguide.sections
9
+ @tree_root = @styleguide.tree.root
10
10
  end
11
11
 
12
12
  def show;
@@ -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.id, section_path(node.to_path), class: 'kayessess__navigation__item')
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>
@@ -0,0 +1,3 @@
1
+ <li>
2
+ <%= link_to(tree_node.name, section_path(tree_node.to_path), class: 'kayessess__node') %>
3
+ </li>
@@ -1,8 +1,3 @@
1
- sections#index
2
-
3
- TODO: sections listing/sitemap here
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 => 'styleguides#show'
2
+ root :to => 'sections#index'
3
3
 
4
- resources :sections, only: [:index, :show], constraints: { id: /.+/ } do
4
+ resources :sections, only: [:show], constraints: { id: /.+/ }, :path => '' do
5
5
  get 'example', on: :member
6
6
  end
7
7
  end
@@ -1,4 +1,4 @@
1
1
  module Kayessess
2
2
  PACKAGE = 'kayessess'
3
- VERSION = '0.1.2'
3
+ VERSION = '0.1.3'
4
4
  end
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.2
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: 1840150361577742207
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: 1840150361577742207
476
+ hash: -1269859489091150148
475
477
  requirements: []
476
478
  rubyforge_project:
477
479
  rubygems_version: 1.8.23
@@ -1,3 +0,0 @@
1
- styleguides#show
2
-
3
- <hr>