Ariane

828 views
766 views

Published on

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

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
828
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • 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 !

    ×