diff --git a/app/assets/stylesheets/extranet/_default/pages/_home.sass b/app/assets/stylesheets/extranet/_default/pages/_home.sass new file mode 100644 index 0000000000000000000000000000000000000000..447bf5620182a955fe3bd851a371b399ec228c55 --- /dev/null +++ b/app/assets/stylesheets/extranet/_default/pages/_home.sass @@ -0,0 +1,32 @@ +.home-index + .experiences + margin-top: px2rem(80) + ul + padding-left: 0 + li + @include make-row + display: flex + position: relative + > div + @include make-col-ready + &:nth-child(1) + width: percentage(2/9) + &:nth-child(2) + @include pseudo-bottom-border + @include pseudo-top-border + display: flex + justify-content: space-between + padding-bottom: px2rem(16) + padding-top: px2rem(12) + width: percentage(7/9) + display: flex + justify-content: space-between + > div + align-self: stretch + display: flex + flex-direction: column + justify-content: space-between + a + align-self: center + img + max-height: 80px \ No newline at end of file diff --git a/app/views/extranet/home/index.html.erb b/app/views/extranet/home/index.html.erb index aa3714a7af09b02bc46eaa44c985e84362a29448..1e31979398dd4f7a324ddf8d211f85bbd557a112 100644 --- a/app/views/extranet/home/index.html.erb +++ b/app/views/extranet/home/index.html.erb @@ -3,16 +3,43 @@ <div class="row"> <div class="col-md-8"> <h2>Mouvements récents</h2> - <% @experiences.each do |experience| %> - <article> - <%= link_to experience.person, experience.person %> - <%= experience.description %> - <%= experience.from_year %> - <%= experience.to_year %> - <%= link_to experience.organization, experience.organization %> - </article> - <% end %> + <div class="experiences"> + <ul> + <% @experiences.ordered.each do |experience| %> + <li class="mb-3"> + <div> + <%= link_to experience.person, class: "stretched-link" do %> + <% if experience.person.picture.attached? %> + <%= kamifusen_tag experience.person.picture, width: 200, class: 'img-fluid' %> + <% else %> + <%= image_tag 'extranet/avatar.png', width: 200, class: 'img-fluid' %> + <% end %> + <% end %> + </div> + <div> + <div> + <p class="mb-0"> + <%= experience.person.first_name %> <b><%= experience.person.last_name %></b> + <br> + <%= experience.description %> — <%= experience.organization %> + </p> + <small><%= experience.created_at %></small> + </div> + <% if experience.organization.present? %> + <% if experience.organization.logo.attached? %> + <%= link_to experience.organization do %> + <%= kamifusen_tag experience.organization.logo, height: 80, class: 'img-fluid' %> + <% end %> + <% end %> + <% end %> + </div> + </li> + <% end %> + </ul> + </div> </div> + + <div class="col-md-4"> <h2>Promotions actuelles</h2> <p><%= link_to 'Voir toutes les promotions', education_cohorts_path %></p> @@ -20,4 +47,4 @@ <%= link_to cohort, cohort %><br> <% end %> </div> -</div> +</div> \ No newline at end of file