_footer.html.erb 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <footer>
  2. <hr id='footer_separator'/>
  3. <br/>
  4. <table id='footer_table'>
  5. <tr>
  6. <td id='footer_left'>
  7. <span id='footer_follow' class='desktop'>
  8. <%= t('footer.follow') %>
  9. </span>
  10. <% @user.user_social_links.each do |link| %>
  11. <%= link_to(
  12. image_tag(link.social_link.logo, class: "footer_social_icon", alt: link.social_link.i18n_link_title, title: link.social_link.i18n_link_title),
  13. link.generate_link,
  14. target: "_blank",
  15. title: link.social_link.i18n_link_title
  16. ) %>
  17. <% end %>
  18. </td>
  19. <td id='footer_center'>
  20. <%= t('footer.copy', name: @user.full_name, year: Date.today.year) %>
  21. </td>
  22. <td id='footer_right'>
  23. <%= link_to(
  24. t("footer.help"),
  25. help_path,
  26. id: "footer_help",
  27. title: t("footer.help")
  28. ) %>
  29. <br/><br/>
  30. <%
  31. path = request.fullpath
  32. if path.to_s[0..4] =~ /[a-z]{2}/ then
  33. path = path[3..] + "/"
  34. end
  35. %>
  36. <% I18n.available_locales.each do |locale| %>
  37. <%= link_to(
  38. image_tag("lang/#{locale.to_s}.svg", alt: t("footer.lang_#{locale.to_s}"), title: t("footer.lang_#{locale.to_s}")),
  39. request.protocol + request.host_with_port + "/" + locale.to_s + path,
  40. class: "lang",
  41. title: t("footer.lang_#{locale.to_s}")
  42. ) %>
  43. <% end %>
  44. </td>
  45. </tr>
  46. </table>
  47. </footer>