index.html.erb 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <% content_for :head do %>
  2. <%= stylesheet_link_tag "profile", media: "all", "data-turbolinks-track": "reload" %>
  3. <% end %>
  4. <section id='info'>
  5. <h3>
  6. <%= @user.full_name %>
  7. </h3>
  8. <article>
  9. <h5>
  10. <%=image_tag(@user.picture[0], id: "profile_image", alt: "")%>
  11. <span>
  12. <%= @user.i18n_tagline %>
  13. </span>
  14. </h5>
  15. <div id='social'>
  16. <% @user.user_social_links.each do |link| %>
  17. <%= link_to(
  18. image_tag(link.social_link.logo, class: "project_image", alt: link.social_link.i18n_link_title, title: link.social_link.i18n_link_title),
  19. link.generate_link,
  20. target: "_blank",
  21. title: link.social_link.i18n_link_title
  22. ) %>
  23. <% end %>
  24. </div>
  25. </article>
  26. </section>
  27. <section id='about'>
  28. <h3>
  29. <%= t("profile.description") %>
  30. </h3>
  31. <article>
  32. <p>
  33. <%= @user.i18n_bio %>
  34. </p>
  35. <div id='resume_download'>
  36. <%= link_to(
  37. t("profile.resume"),
  38. @resume_main.file,
  39. target: "_blank",
  40. title: t("profile.resume"),
  41. class: "a_button"
  42. ) %>
  43. <% if @resume_languages.size > 0 %>
  44. <details>
  45. <summary class='pointer'>
  46. <%= t("profile.resume_lang") %>
  47. </summary>
  48. <ul>
  49. <% @resume_languages.each do |resume| %>
  50. <li>
  51. <%= link_to(
  52. t("profile.resume_" + resume.language),
  53. resume.file,
  54. target: "_blank",
  55. title: t("profile.resume_" + resume.language)
  56. ) %>
  57. </li>
  58. <% end%>
  59. </ul>
  60. </details>
  61. <% end%>
  62. </div>
  63. </article>
  64. </section>
  65. <section id='skills'>
  66. <h3>
  67. TODO
  68. </h3>
  69. <article>
  70. <%
  71. prev_nature = ""
  72. @user.technologies.each do |technology|
  73. if technology.nature != prev_nature
  74. %>
  75. </p>
  76. <p>
  77. <%
  78. end
  79. %>
  80. <span class='technology technology_<%=technology.nature%>'>
  81. <%= image_tag(technology.logo, class: "technology_logo", alt: "") %>
  82. <span class='technology_name'>
  83. <%= technology.name %>
  84. </span>
  85. </span>
  86. <%
  87. prev_nature = technology.nature
  88. end
  89. %>
  90. </p>
  91. </article>
  92. </section>
  93. <section id='experience'>
  94. <h3>
  95. <%= t("profile.experience") %>
  96. </h3>
  97. <article>
  98. <table>
  99. <%
  100. prev_company = ""
  101. prev_city = ""
  102. same_company = false
  103. same_company_class = "last_role"
  104. @user.work_experiences.each do |experience|
  105. if experience.company == prev_company && experience.city == prev_city
  106. same_company = true
  107. same_company_class = "";
  108. else
  109. same_company = false
  110. same_company_class = "last_role"
  111. end
  112. %>
  113. <tr>
  114. <td class='company'>
  115. <% if !same_company %>
  116. <h5 class='company'>
  117. <%= experience.company %>
  118. </h5>
  119. <% if experience.companyLogo.attached? %>
  120. <span class='company_logo'>
  121. <%=
  122. image_tag(
  123. experience.companyLogo,
  124. alt: experience.company
  125. )
  126. %>
  127. </span>
  128. <% end %>
  129. <% end %>
  130. </td>
  131. <td class='timeline <%= same_company_class %>'>
  132. <% if !same_company %>
  133. <%= image_tag("control/point.svg", alt: "") %>
  134. <% end %>
  135. </td>
  136. <td class='details <%= same_company_class %>'>
  137. <%
  138. experience_date = "";
  139. if (experience.end == nil)
  140. experience_date = t(
  141. "time.date_month_since",
  142. year: experience.start.year,
  143. month: t("time." + Date::MONTHNAMES[experience.start.month].downcase)
  144. ).humanize
  145. else
  146. experience_date =
  147. t(
  148. "time.date_month",
  149. year: experience.start.year,
  150. month: t("time." + Date::MONTHNAMES[experience.start.month].downcase)
  151. ).humanize +
  152. " - " +
  153. t(
  154. "time.date_month",
  155. year: experience.end.year,
  156. month: t("time." + Date::MONTHNAMES[experience.end.month].downcase)
  157. ).humanize
  158. end
  159. %>
  160. <h4 class='role'>
  161. <%= experience.i18n_role %>
  162. </h4>
  163. <span class='date'>
  164. <%= experience_date %>
  165. </span>
  166. <p class='description'>
  167. <%= experience.i18n_description.html_safe %>
  168. </p>
  169. </td>
  170. </tr>
  171. <%
  172. prev_company = experience.company
  173. prev_city = experience.city
  174. end
  175. %>
  176. </table>
  177. </article>
  178. </section>