<commit_before>module NavigationHelper
  def social_navigation(opts={})
    elems = []
    elems << content_tag(:li, link_to("&#xe006;", "http://www.twitter.com/andrewpthorp", class: "twitter", target: "_blank"))
    elems << content_tag(:li, link_to("&#xe004;", "http://www.facebook.com/andrewpthorp", class: "facebook", target: "_blank"))
    elems << content_tag(:li, link_to("&#xe02b;", "http://www.github.com/andrewpthorp", class: "github", target: "_blank"))
    content_tag :ul, elems.join, id: "social-nav", class: "group #{opts[:class]}"
  end

  def site_navigation(opts={})
    elems = []
    elems << content_tag(:li, link_to("", "/", class: "icon-home no-underline", title: "Home"))
    elems << content_tag(:li, link_to("", "/about", class: "icon-about no-underline", title: "About Me"))
    elems << content_tag(:li, link_to("", "/posts", class: "icon-blog no-underline", title: "Blog"))
    elems << content_tag(:li, link_to("", "/portfolio", class: "icon-portfolio no-underline", title: "Portfolio"))
    elems << content_tag(:li, link_to("", "/resume", class: "icon-resume no-underline", title: "Resume"))

    if current_user
      elems << content_tag(:li, link_to("", "/posts/new", class: "icon-plus no-underline", title: "New Post"))
      elems << content_tag(:li, link_to("", "/logout", class: "icon-logout no-underline", title: "Logout"), class: "gutter-bottom-none")
    else
      elems << content_tag(:li, link_to("", "/login?return_to=#{URI::encode(request.fullpath)}", class: "icon-login no-underline", title: "Login"), class: "gutter-bottom-none")
    end

    content_tag :ul, elems.join, id: "site-nav", class: "group #{opts[:class]}"
  end<commit_msg>added tomdoc to navigatiohelper<commit_after># Public: Everything that helps with navigation lives inside of this module.
#
# Examples
#
#   class AndrewThorp < Sinatra::Base
#     helpers NavigationHelper
#   end
module NavigationHelper

  # Public: Return an unordered list (ul) of social links.
  #
  # opts  - A Hash used to modify the result.
  #         :class - A String that is passed on and set as the class on the ul.
  #
  # Returns a String.
  def social_navigation(opts={})
    elems = []
    elems << content_tag(:li, link_to("&#xe006;", "http://www.twitter.com/andrewpthorp", class: "twitter", target: "_blank"))
    elems << content_tag(:li, link_to("&#xe004;", "http://www.facebook.com/andrewpthorp", class: "facebook", target: "_blank"))
    elems << content_tag(:li, link_to("&#xe02b;", "http://www.github.com/andrewpthorp", class: "github", target: "_blank"))
    content_tag :ul, elems.join, id: "social-nav", class: "group #{opts[:class]}"
  end

  # Public: Return the global navigation in an unordered list (ul).
  #
  # opts  - A Hash used to modify the result.
  #         :class - A String that is passed on and set as the class on the ul.
  #
  # Returns a String.
  def site_navigation(opts={})
    elems = []
    elems << content_tag(:li, link_to("", "/", class: "icon-home no-underline", title: "Home"))
    elems << content_tag(:li, link_to("", "/about", class: "icon-about no-underline", title: "About Me"))
    elems << content_tag(:li, link_to("", "/posts", class: "icon-blog no-underline", title: "Blog"))
    elems << content_tag(:li, link_to("", "/portfolio", class: "icon-portfolio no-underline", title: "Portfolio"))
    elems << content_tag(:li, link_to("", "/resume", class: "icon-resume no-underline", title: "Resume"))

    if current_user
      elems << content_tag(:li, link_to("", "/posts/new", class: "icon-plus no-underline", title: "New Post"))
      elems << content_tag(:li, link_to("", "/logout", class: "icon-logout no-underline", title: "Logout"), class: "gutter-bottom-none")
    else
      elems << content_tag(:li, link_to("", "/login?return_to=#{URI::encode(request.fullpath)}", class: "icon-login no-underline", title: "Login"), class: "gutter-bottom-none")
    end

    content_tag :ul, elems.join, id: "site-nav", class: "group #{opts[:class]}"
  end
{'fraction_non_alphanumeric': 0.1911433575181386, 'fraction_numerical': 0.0040030022516887665, 'mean_word_length': 4.337783711615487, 'pattern_counts': {'":': 0, '<': 48, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7464811', 'n_tokens_mistral': 1355, 'n_tokens_neox': 1336, 'n_words': 354}