Skip to content

Commit

Permalink
Merge pull request #430 from epfl-idevelop/feature/people-detail
Browse files Browse the repository at this point in the history
Amélioration de la page 'People detail'
  • Loading branch information
jdelasoie authored Jan 6, 2020
2 parents 149e9f0 + a9c9a45 commit cec09b9
Show file tree
Hide file tree
Showing 23 changed files with 537 additions and 115 deletions.
1 change: 1 addition & 0 deletions assets/components/atoms/button/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
.btn-secondary {
background: transparent;
border-color: $gray-300;
font-size: .8125rem;

.bg-dark & {
border-color: $gray-600;
Expand Down
7 changes: 6 additions & 1 deletion assets/components/atoms/collapse/collapse-partial.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<div class="collapse collapse-partial" id="biography-text" aria-expanded="false">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. A ad aperiam culpa dolor dolore eaque esse excepturi incidunt libero maxime molestias mollitia neque odit possimus praesentium quaerat quam quas reprehenderit, saepe similique sit totam veritatis vero voluptas voluptatem voluptates voluptatibus! Ab ad adipisci autem blanditiis cum deleniti deserunt dolor, dolores earum eius enim esse est eveniet exercitationem, fuga fugiat fugit illum ipsum maiores molestias mollitia nesciunt officia perferendis praesentium quisquam quos recusandae rem repellat repudiandae sit temporibus vero vitae voluptatem! Blanditiis excepturi neque officia possimus suscipit? A culpa est ipsa nemo officiis. Corporis distinctio, est iure nihil possimus quis veritatis.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque auctor urna id nulla ornare, placerat gravida nulla tincidunt. Nullam scelerisque mauris neque. Quisque condimentum nisl dolor, id auctor lorem interdum non. Pellentesque ut ligula imperdiet, dictum risus eu, cursus eros. Curabitur elementum sapien nec velit egestas consequat. Ut fermentum dolor eu purus efficitur rutrum ac at purus. Curabitur eu risus vel leo vehicula auctor. Aenean in velit nisi. Curabitur ultricies lacinia odio, sed egestas ex facilisis nec. Pellentesque et sagittis justo, id consequat odio. Nullam molestie sit amet eros quis consequat.</p>
<h3>Mission</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque auctor urna id nulla ornare, placerat gravida nulla tincidunt. Nullam scelerisque mauris neque. Quisque condimentum nisl dolor, id auctor lorem interdum non. Pellentesque ut ligula imperdiet, dictum risus eu, cursus eros.</p>
<p>Curabitur elementum sapien nec velit egestas consequat. Ut fermentum dolor eu purus efficitur rutrum ac at purus. Curabitur eu risus vel leo vehicula auctor. Aenean in velit nisi. Curabitur ultricies lacinia odio, sed egestas ex facilisis nec. Pellentesque et sagittis justo, id consequat odio. Nullam molestie sit amet eros quis consequat.</p>
<h3>Travail en cours</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque auctor urna id nulla ornare, placerat gravida nulla tincidunt. Nullam scelerisque mauris neque. Quisque condimentum nisl dolor, id auctor lorem interdum non. Pellentesque ut ligula imperdiet, dictum risus eu, cursus eros. Curabitur elementum sapien nec velit egestas consequat. Ut fermentum dolor eu purus efficitur rutrum ac at purus.</p>
</div>

<button
Expand Down
18 changes: 18 additions & 0 deletions assets/components/atoms/picture/picture-portrait.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<picture>
<source
media="(min-width: 1140px)"
srcset="https://via.placeholder.com/253x360.jpg 1x,https://via.placeholder.com/506x720.jpg 2x">
<source
media="(min-width: 960px)"
srcset="https://via.placeholder.com/211x300.jpg 1x,https://via.placeholder.com/422x600.jpg 2x">
<source
media="(min-width: 720px)"
srcset="https://via.placeholder.com/253x360.jpg 1x,https://via.placeholder.com/506x720.jpg 2x">
<source
media="(min-width: 541px)"
srcset="https://via.placeholder.com/253x360.jpg 1x,https://via.placeholder.com/506x720.jpg 2x">
<source
media="(max-width: 540px)"
srcset="https://via.placeholder.com/211x300.jpg 1x,https://via.placeholder.com/422x600.jpg 2x">
<img src="https://via.placeholder.com/506x720.jpg" class="img-fluid" alt="ALT">
</picture>
8 changes: 8 additions & 0 deletions assets/components/atoms/picture/picture-thumb-square.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<picture>
<source media="(min-width: 1140px)" srcset="https://via.placeholder.com/95x95.jpg 1x,https://via.placeholder.com/190x190.jpg 2x">
<source media="(min-width: 960px)" srcset="https://via.placeholder.com/95x95.jpg 1x,https://via.placeholder.com/190x190.jpg 2x">
<source media="(min-width: 720px)" srcset="https://via.placeholder.com/80x80.jpg 1x,https://via.placeholder.com/160x160.jpg 2x">
<source media="(min-width: 541px)" srcset="https://via.placeholder.com/120x120.jpg 1x,https://via.placeholder.com/240x204.jpg 2x">
<source media="(max-width: 540px)" srcset="https://via.placeholder.com/540x540.jpg 1x,https://via.placeholder.com/1080x1080.jpg 2x">
<img src="https://via.placeholder.com/95x95.jpg" class="img-fluid" alt="ALT">
</picture>
8 changes: 8 additions & 0 deletions assets/components/atoms/picture/picture.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ variants:
wrapper: col-sm-4 col-md-2 col-lg-1
notes: |
Avatar picture need an equal height and width in order to be displayed as a circle
- name: portrait
title: Portrait
wrapper: col-md-3
notes: |
Portrait picture is used in People pages
- name: one-third
title: One third picture
wrapper: col-md-4
Expand All @@ -18,6 +23,9 @@ variants:
- name: news-thumb
title: News Listing Thumbnail
wrapper: col-3 col-md-2
- name: thumb-square
title: Listing square Thumbnail
wrapper: col-3 col-md-2
notes: |
<br>
Expand Down
5 changes: 5 additions & 0 deletions assets/components/atoms/separator/separator.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
@charset 'utf-8';

hr {
border-color: $gray-100;
width: 100%;

&.bold {
border-top-width: 3px;
}

&.darker {
border-color: $gray-200;
}
}
4 changes: 4 additions & 0 deletions assets/components/atoms/separator/separator.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<hr>

<hr class="bold">

<hr class="darker">

<hr class="bold darker">
1 change: 1 addition & 0 deletions assets/components/atoms/separator/separator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ title: Separator
name: separator
notes: |
Use the `.bold` class to make the border wider.
Use the `.darker` class for a darker separator.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% set round = round ? round : false %}
{% set discrete = discrete ? discrete : false %}
{% set negative = negative ? negative : false %}

{% include '@atoms/social-icon/social-icon-single-link.twig' with { pretty_name: 'Facebook', icon: 'icon-facebook', round: round, discrete: discrete, negative: negative, url: 'https://www.facebook.com/epflcampus' } %}
{% include '@atoms/social-icon/social-icon-single-link.twig' with { pretty_name: 'Twitter', icon: 'icon-twitter', round: round, discrete: discrete, negative: negative, url: 'https://twitter.com/epfl' } %}
{% include '@atoms/social-icon/social-icon-single-link.twig' with { pretty_name: 'Instagram', icon: 'icon-instagram', round: round, discrete: discrete, negative: negative, url: 'http://instagram.com/epflcampus' } %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% set pretty_name = pretty_name ?: 'Twitter' %}
{% set user_id = user_id ?: 'firstname.name' %}
{% set icon = icon ?: 'icon-twitter' %}
{% set round = round ? ' social-icon-round' : '' %}
{% set discrete = discrete ? ' social-icon-discrete' : '' %}
{% set negative = negative ? ' social-icon-negative' : '' %}
{% set url = url or '#' %}
<a href="{{ url }}" class="{{ 'social-icon social-icon-details social-' ~ icon ~ round ~ negative ~ discrete }}" rel="nofollow" title="View on {{ pretty_name }}">
{% include '@atoms/icon/icon.twig' with { icon: icon } %}
<span class="user">{{ user_id }}</span>
</a>
24 changes: 24 additions & 0 deletions assets/components/atoms/social-icon/social-icon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,30 @@
}
}

.social-icon-details {
min-height: 2.6em;
text-decoration: none !important;
vertical-align: bottom;

&:hover {
background: $gray-600;
color: white;
}

.user {
position: relative;
top: 2px;
line-height: 24px;
vertical-align: bottom;
}

.icon + .user {
margin-left: .25em;
top: -1px;
line-height: 1em;
}
}

a.social-icon {
margin-bottom: $spacer * 0.3;
transition:
Expand Down
1 change: 1 addition & 0 deletions assets/components/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,5 @@

//
// pages:
@import 'pages/people-detail/people-detail';
@import 'pages/blog-single/blog-single';
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{% if title is not defined %}{% set title = 'Contact information' %}{% endif %}
{% if title %}
<h4>{{title}}</h4>
{% endif %}

<button
class="collapse-title collapse-title-desktop"
type="button"
data-toggle="collapse"
data-target="#collapse-1"
aria-expanded="false"
aria-controls="collapse-1"
>
<strong>Fonction précise</strong>, <span class="font-weight-normal">Nom du département</span>
</button>

<div class="collapse collapse-item show collapse-item-desktop" id="collapse-1">

<div class="row pt-2 pb-2">
<div class="col-md-5">
<p itemprop="location" itemscope itemtype="http://schema.org/Place">
<strong itemprop="name">EPFL PRES</strong><br/>
<span itemprop="address">
CE 3 316 (Centre Est)<br/>
Station 1<br/>
CH-1015 Lausanne
</span>
</p>
</div>
<div class="col-md-7">
<p>
<a href="tel:+41 21 666 77 88" class="btn btn-sm btn-secondary mb-2 align-baseline">+41 21 666 77 88</a>
<small class="align-baseline ml-2">Bureau principal: <a href="#">INN 019</a></small>
<br>
<a href="tel:+41 21 666 55 66" class="btn btn-sm btn-secondary mb-2 align-baseline">+41 21 666 55 66</a>
<small class="align-baseline ml-2">Bureau: <a href="#">INN 018</a></small>
<br>
<small>Unité: <a href="#">EPFL</a> &rsaquo; <a href="#">SI</a> &rsaquo; <a href="#">SI-EXOP</a> &rsaquo; <a href="#">EXAPP</a></small>
</p>
</div>
<div class="col-sm-12">
<p><span class="sr-only">Web site: </span><a href="https://www.epfl.ch/about/vice-presidencies/vice-presidencies/information-systems/">https://www.epfl.ch/about/vice-presidencies/vice-presidencies/information-systems/</a></p>
</div>
</div>

</div>

<button
class="collapse-title collapse-title-desktop collapsed"
type="button"
data-toggle="collapse"
data-target="#collapse-2"
aria-expanded="false"
aria-controls="collapse-2"
>
<strong>Fonction précise</strong>, <span class="font-weight-normal">Nom du département</span>
</button>

<div class="collapse collapse-item collapse-item-desktop" id="collapse-2">

<div class="row pt-2 pb-2">
<div class="col-md-5">
<p itemprop="location" itemscope itemtype="http://schema.org/Place">
<strong itemprop="name">EPFL PRES</strong><br/>
<span itemprop="address">
CE 3 316 (Centre Est)<br/>
Station 1<br/>
CH-1015 Lausanne
</span>
</p>
</div>
<div class="col-md-7">
<p>
<a href="tel:+41 21 666 77 88" class="btn btn-sm btn-secondary mb-2 align-baseline">+41 21 666 77 88</a>
<small class="align-baseline ml-2">Bureau principal: <a href="#">INN 019</a></small>
<br>
<small>Unité: <a href="#">EPFL</a> &rsaquo; <a href="#">SI</a> &rsaquo; <a href="#">SI-EXOP</a> &rsaquo; <a href="#">EXAPP</a></small>
</p>
</div>
<div class="col-sm-12">
<p><span class="sr-only">Web site: </span><a href="https://rh.epfl.ch/">https://rh.epfl.ch/</a></p>
</div>
</div>

</div>

<button
class="collapse-title collapse-title-desktop collapsed"
type="button"
data-toggle="collapse"
data-target="#collapse-3"
aria-expanded="false"
aria-controls="collapse-3"
>
<strong>Fonction précise</strong>, <span class="font-weight-normal">Nom du département</span>
</button>

<div class="collapse collapse-item collapse-item-desktop" id="collapse-3">

<div class="row pt-2 pb-2">
<div class="col-md-5">
<p itemprop="location" itemscope itemtype="http://schema.org/Place">
<strong itemprop="name">EPFL PRES</strong><br/>
<span itemprop="address">
CE 3 316 (Centre Est)<br/>
Station 1<br/>
CH-1015 Lausanne
</span>
</p>
</div>
<div class="col-md-7">
<p>
<a href="tel:+41 21 666 77 88" class="btn btn-sm btn-secondary mb-2 align-baseline">+41 21 666 77 88</a>
<small class="align-baseline ml-2">Bureau principal: <a href="#">INN 019</a></small>
<br>
<a href="tel:+41 21 666 55 66" class="btn btn-sm btn-secondary mb-2 align-baseline">+41 21 666 55 66</a>
<small class="align-baseline ml-2">Bureau: <a href="#">INN 018</a></small>
<br>
<small>Unité: <a href="#">EPFL</a> &rsaquo; <a href="#">SI</a> &rsaquo; <a href="#">SI-EXOP</a> &rsaquo; <a href="#">EXAPP</a></small>
</p>
</div>
</div>

</div>
4 changes: 4 additions & 0 deletions assets/components/molecules/collapse-group/collapse-group.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: collapse-group
variants:
- name: rich-content
title: Collapse with rich content
- name: people-contacts
title: Collapse with contact info
notes: |
Used in People pages
notes: |
<br/>
Expand Down
32 changes: 32 additions & 0 deletions assets/components/molecules/list-group/list-group-infoscience.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<div class="list-group">
{% for i in 1..3 %}
<div class="list-group-item list-group-item-borderless list-group-item-infoscience">
<div class="record-content">
<p>Noms des auteurs: <strong>Titre de la publication lorem ipsum dolor sit amet consectetur adipscing elit</strong>; <i>Sous-titre lorem ipsum dolor sit amet consectetur adipscing elit</i>; Références, lieu de publication, etc.</p>
</div>
<div class="item-metadata">
<p class="item-date">18.11.2019</p>
<p class="item-links small">
<a href="#" target="_blank">Notice détaillée</a> – <a href="#" target="_blank">Texte intégral</a>
</p>
</div>
</div>
{% endfor %}
<!-- Publication with thumbnail image -->
<div class="list-group-item list-group-item-borderless list-group-item-infoscience has-thumbnail">
<div class="list-group-thumbnail">
{% include '@atoms/picture/picture-thumb-square.twig' %}
</div>
<div class="list-group-content">
<div class="record-content">
<p>Noms des auteurs: <strong>Titre de la publication lorem ipsum dolor sit amet consectetur adipscing elit</strong>; <i>Sous-titre lorem ipsum dolor sit amet consectetur adipscing elit</i>; Références, lieu de publication, etc.</p>
</div>
<div class="item-metadata">
<p class="item-date">18.11.2019</p>
<p class="item-links small">
<a href="#" target="_blank">Notice détaillée</a> – <a href="#" target="_blank">Texte intégral</a>
</p>
</div>
</div>
</div>
</div>
45 changes: 44 additions & 1 deletion assets/components/molecules/list-group/list-group.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
@charset 'utf-8';

.list-group-item {
padding-top: 1.25rem;
padding-bottom: 1.25rem;

p:last-child {
margin-bottom: 0;
}
}

.list-group-item-borderless {
padding-right: 0;
padding-left: 0;
Expand All @@ -14,6 +23,7 @@
}

.list-group {

.list-group-teaser {
display: block;
text-decoration: none;
Expand All @@ -29,7 +39,7 @@
}
}

.list-group-teaser-thumbnail {
.list-group-teaser-thumbnail{
flex: 0 0 12rem;
padding: 1rem;
padding-top: 1rem;
Expand Down Expand Up @@ -106,4 +116,37 @@
border: 1px solid $black !important;
}
}

.item-metadata {

p {
display: inline-block;
margin-bottom: 0;
}

.item-date {
font-size: 1rem;
font-weight: bold;
margin-right: 0.5em;
}
}
}

.list-group-item-infoscience {

&.has-thumbnail {
display: flex;

.list-group-thumbnail{
flex: 0 0 8rem;
margin-right: 1rem;
z-index: $zindex-1;
}

.list-group-content {
flex: 0 1 100%;
z-index: $zindex-1;
}

}
}
Loading

0 comments on commit cec09b9

Please sign in to comment.