Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
ArianeBreadcrumbs pour Rails
whoamiSimon COURTOIS CTO chez Selectra  Github: simoncTwitter: @happynoff
Breadcrumbs ?
Breadcrumbs et Rails ?     Crummy
ObjectifCrummy         Twitter BootstrapSchema.org                    I18n
Participer au projet
Participer au projet
Ariane - ObjectifFlexibilitéFaciliter l’usageFaciliter la participation
Ariane - ObjectifFlexibilité          !               U   R             OFaciliter l’usage            Jparticipation      ...
Ariane - Construction# app/controllers/application_controller.rbclass ApplicationController < ActionController::Base befor...
Ariane - Affichage# app/views/layouts/application.html.erb<%= ariane.render %>
Ariane - Lien spécifique     Titre d’un article ?# app/views/articles/show.html.erb<% ariane.add @article.title, article_pa...
Ariane - Structure         Breadcrumb   CrumbAriane          Renders            Base            HTML          HTMLList
Ariane - RenderersRenders                <p class="breadcrumb">  Base                  <a href="/">Home</a> / Articles  HT...
Ariane - Renderers                <ul class="breadcrumb">Renders                  <li>  Base              <a href="/">Home...
Ariane - RenderersJSON               XMLMarkdown           Whatever...
Ariane - Choix du Renderer Renderers inclus dans Ariane<%= ariane.render(Ariane::Render::HTMLList) %> (par défaut)<%= aria...
Ariane - Paramètres# config/initializers/ariane.rbrndr = Ariane::Render::HTML.new({   :divider     => -,   :link_active =>...
Ariane - ObjectifFlexibilitéFaciliter l’usageFaciliter la participation
Ariane - ObjectifFlexibilitéFaciliter l’usageFaciliter la participation
Ariane - La suite ?Dynamic BreadcrumbBig thanks to Anthony Bouch (github: 58bits)   Sucre syntaxique # app/views/articles/...
Ariane - Ressources         Githubhttp://github.com/simonc/ariane       Twitter   @happynoff
Merci !
Upcoming SlideShare
Loading in …5
×

Ariane

1,015 views

Published on

Présentation du projet Ariane (Paris.rb 11/03/12)

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Ariane

  1. 1. ArianeBreadcrumbs pour Rails
  2. 2. whoamiSimon COURTOIS CTO chez Selectra Github: simoncTwitter: @happynoff
  3. 3. Breadcrumbs ?
  4. 4. Breadcrumbs et Rails ? Crummy
  5. 5. ObjectifCrummy Twitter BootstrapSchema.org I18n
  6. 6. Participer au projet
  7. 7. Participer au projet
  8. 8. Ariane - ObjectifFlexibilitéFaciliter l’usageFaciliter la participation
  9. 9. Ariane - ObjectifFlexibilité ! U R OFaciliter l’usage Jparticipation 1Faciliter la
  10. 10. Ariane - Construction# app/controllers/application_controller.rbclass ApplicationController < ActionController::Base before_filter :set_ariane def set_ariane ariane.add "Home", root_path endend # app/controllers/articles_controller.rb class ArticlesController < ApplicationController def set_ariane super ariane.add "Articles", articles_path end end
  11. 11. Ariane - Affichage# app/views/layouts/application.html.erb<%= ariane.render %>
  12. 12. Ariane - Lien spécifique Titre d’un article ?# app/views/articles/show.html.erb<% ariane.add @article.title, article_path(@article) %>
  13. 13. Ariane - Structure Breadcrumb CrumbAriane Renders Base HTML HTMLList
  14. 14. Ariane - RenderersRenders <p class="breadcrumb"> Base <a href="/">Home</a> / Articles HTML </p>HTMLList
  15. 15. Ariane - Renderers <ul class="breadcrumb">Renders <li> Base <a href="/">Home</a> <span class="divider">/</span> </li> HTML <li class="active">Other</li>HTMLList </ul>
  16. 16. Ariane - RenderersJSON XMLMarkdown Whatever...
  17. 17. Ariane - Choix du Renderer Renderers inclus dans Ariane<%= ariane.render(Ariane::Render::HTMLList) %> (par défaut)<%= ariane.render(Ariane::Render::HTML) %><%= ariane.render(Ariane::Render::JSON) %><%= ariane.render(Ariane::Render::XML) %><%= ariane.render(Ariane::Render::...) %> Créez vos propres Renderers !
  18. 18. Ariane - Paramètres# config/initializers/ariane.rbrndr = Ariane::Render::HTML.new({ :divider => -, :link_active => true, :list_id => awesome-breadcrumb})Ariane.configure do |config| config.default_renderer = rndrend <p class="awesome-breadcrumb"> <a href="/">Home</a> - <a href="/articles" class="active">Articles</a> </p>
  19. 19. Ariane - ObjectifFlexibilitéFaciliter l’usageFaciliter la participation
  20. 20. Ariane - ObjectifFlexibilitéFaciliter l’usageFaciliter la participation
  21. 21. Ariane - La suite ?Dynamic BreadcrumbBig thanks to Anthony Bouch (github: 58bits) Sucre syntaxique # app/views/articles/show.html.erb <% ariane.add @article.title, @article %>
  22. 22. Ariane - Ressources Githubhttp://github.com/simonc/ariane Twitter @happynoff
  23. 23. Merci !

×