<commit_before>- title "Labs"
.row.top
  .col-lg-8
    %ol.breadcrumb
      %li= link_to Lab.to_s.pluralize, labs_path
      - if params[:country].present?
        %li.active
          = link_to labs_path(country: params[:country]) do
            %span.flag{class: "flag-#{params[:country]}"}
            = ISO3166::Country[params[:country]]
      - else
        %li.active= link_to t("views.labs.index.all_countries"), labs_path
  .col-lg-4
    = render "header"

.row
  - cache ["v2-labsindex-#{I18n.locale}-#{Digest::MD5.hexdigest([params.to_s].to_s)}", Lab.last_updated_at] do
    .col-lg-8.content
      - if params[:query].present?
        .search-results
          = link_to "×", labs_path, class: 'close right'
          #{pluralize @labs.size, "search result"} for
          %strong= params[:query]

      .labs= render @labs
      = paginate @labs

  .col-lg-4.sidebar-offcanvas
    - cache ["v1-countries-#{I18n.locale}-#{Digest::MD5.hexdigest([params.to_s].to_s)}", Lab.last_updated_at] do
      .heading
        Filter by
        %strong Country
      .list-group
        = link_to url_for(params.merge(country: nil, page: nil)), class: "list-group-item #{params[:country].blank? ? 'active' : ''}" do
          = t("views.labs.index.all_countries", default: "All Countries")
          %span.badge= @count

        - @countries.each do |country,country_code,count|
          = link_to url_for(params.merge(country: country_code, page: nil)), class: "list-group-item #{params[:country] == country_code ? 'active' : ''}" do
            = country
            %span.badge= count

    .heading
      %strong Download
      the Fab Labs list
    %dl
      %dt Format:
      %dd= link_to "JSON", api_v0_labs_url(format: 'json'), class: 'btn btn-primary'
    .hint CSV and XLSX (Excel) coming soon.

    .heading
      %strong Expand
      the Network
    - if current_user
      = link_to new_lab_path, class: "btn btn-success" do
        = fa_icon "plus", text: t("views.labs.index.add_a_lab", default: "Add a Lab")

    - else
      = link_to new_lab_path, class: "btn btn-success", data: {toggle: "tooltip", placement: "bottom" }, title: "You need to be signed in to add a Lab" do
        = fa_icon "plus", text: t("views.labs.index.add_a_lab", default: "Add a Lab")<commit_msg>First test at changing the Labs page UI<commit_after>- title "Labs"
.row.top
  %h2 Fab Labs
  %p
  A Fab Lab is a technical prototyping platform for innovation and invention, providing stimulus for local entrepreneurship. A Fab Lab is also a platform for learning and innovation: a place to play, to create, to learn, to mentor, to invent. To be a Fab Lab means connecting to a global community of learners, educators, technologists, researchers, makers and innovators- -a knowledge sharing network that spans 30 countries and 24 time zones. Because all Fab Labs share common tools and processes, the program is building a global network, a distributed laboratory for research and invention.
  %p
  You can read more on the Fab Foundation website
  = succeed "." do
    %a{:href => "http://fabfoundation.org/index.php/what-is-a-fab-lab/index.html"} here

  %h3 Expand the Network
  %p Here you can add your lab to the list.
  - if current_user
    = link_to new_lab_path, class: "btn btn-success" do
      = fa_icon "plus", text: t("views.labs.index.add_a_lab", default: "Add a Lab")
  - else
    = link_to new_lab_path, class: "btn btn-success", data: {toggle: "tooltip", placement: "bottom" }, title: "You need to be signed in to add a Lab" do
      = fa_icon "plus", text: t("views.labs.index.add_a_lab", default: "Add a Lab")

.row
  .col-lg-8
    %ol.breadcrumb
      %li= link_to Lab.to_s.pluralize, labs_path
      - if params[:country].present?
        %li.active
          = link_to labs_path(country: params[:country]) do
            %span.flag{class: "flag-#{params[:country]}"}
            = ISO3166::Country[params[:country]]
      - else
        %li.active= link_to t("views.labs.index.all_countries"), labs_path
  .col-lg-4
    = render "header"

.row
  - cache ["v2-labsindex-#{I18n.locale}-#{Digest::MD5.hexdigest([params.to_s].to_s)}", Lab.last_updated_at] do
    .col-lg-8.content
      - if params[:query].present?
        .search-results
          = link_to "×", labs_path, class: 'close right'
          #{pluralize @labs.size, "search result"} for
          %strong= params[:query]

      .labs= render @labs
      = paginate @labs

  .col-lg-4.sidebar-offcanvas
    - cache ["v1-countries-#{I18n.locale}-#{Digest::MD5.hexdigest([params.to_s].to_s)}", Lab.last_updated_at] do
      .heading
        Filter by
        %strong Country
      .list-group
        = link_to url_for(params.merge(country: nil, page: nil)), class: "list-group-item #{params[:country].blank? ? 'active' : ''}" do
          = t("views.labs.index.all_countries", default: "All Countries")
          %span.badge= @count

        - @countries.each do |country,country_code,count|
          = link_to url_for(params.merge(country: country_code, page: nil)), class: "list-group-item #{params[:country] == country_code ? 'active' : ''}" do
            = country
            %span.badge= count

    .heading
      %strong Download
      the Fab Labs list
    %dl
      %dt Format:
      %dd= link_to "JSON", api_v0_labs_url(format: 'json'), class: 'btn btn-primary'
    .hint CSV and XLSX (Excel) coming soon.
{'fraction_non_alphanumeric': 0.1374187558031569, 'fraction_numerical': 0.007428040854224698, 'mean_word_length': 2.814447592067989, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7195725', 'n_tokens_mistral': 1826, 'n_tokens_neox': 1780, 'n_words': 481}