diff --git a/assets/components/atoms/button/button-tertiary-states.twig b/assets/components/atoms/button/button-tertiary-states.twig new file mode 100644 index 000000000..f18ad545f --- /dev/null +++ b/assets/components/atoms/button/button-tertiary-states.twig @@ -0,0 +1,4 @@ + + + + diff --git a/assets/components/atoms/button/button-tertiary.twig b/assets/components/atoms/button/button-tertiary.twig new file mode 100644 index 000000000..12e7af205 --- /dev/null +++ b/assets/components/atoms/button/button-tertiary.twig @@ -0,0 +1 @@ + diff --git a/assets/components/atoms/button/button.scss b/assets/components/atoms/button/button.scss index 87ce98b97..75acefae2 100644 --- a/assets/components/atoms/button/button.scss +++ b/assets/components/atoms/button/button.scss @@ -123,6 +123,47 @@ input[type="button"] { } } +.btn-tertiary { + background: $canard; + font-weight: $font-weight-bold; + color: $white; + + &:hover, + &.hover { + background: $canard-dark; + border-color: $canard-dark; + color: $white; + } + + &:focus, + &:focus-visible, + &.focus { + outline-color: $canard-dark !important; + color: $white; + } + + &:not(:disabled):not(.disabled):active, + &:not(:disabled):not(.disabled).active { + // ugly ↓ + // background: linear-gradient(to bottom, $canard-dark 0%, $red 100%); + background: color.adjust($canard-dark, $lightness: -10%); + border-color: color.adjust($canard-dark, $lightness: -10%); + } + + &:disabled, + &.disabled { + background: $gray-100; + border-color: $gray-300; + color: $gray-300; + + .bg-dark & { + background: $black; + border-color: $gray-600; + color: $gray-600; + } + } +} + .btn-light { &, &:hover { diff --git a/assets/components/atoms/button/button.yml b/assets/components/atoms/button/button.yml index e3ec2e736..0cf882fc3 100644 --- a/assets/components/atoms/button/button.yml +++ b/assets/components/atoms/button/button.yml @@ -22,6 +22,14 @@ variants: title: Secondary states preview notes: | *For previewing purposes only. **Do not use in production!*** + - name: tertiary + title: Button tertiary + notes: | + For less aggressive buttons that are still in line with the EPFL graphic charter. + - name: tertiary-states + title: Tertiary states preview + notes: | + *For previewing purposes only. **Do not use in production!*** notes: | Button is your interaction friend when you want people to complete an action. By clicking a button, people expect to trigger an event, confirm a form or load a new page. Don't put many buttons on one single page. The primary action should be obvious for people. diff --git a/assets/components/atoms/picture/picture-avatar.twig b/assets/components/atoms/picture/picture-avatar.twig index 126735946..ab052c1dc 100644 --- a/assets/components/atoms/picture/picture-avatar.twig +++ b/assets/components/atoms/picture/picture-avatar.twig @@ -1,18 +1,19 @@ +{% set avatar_path = avatar_path|default("./images/styleguide/people/avatar-") %} diff --git a/assets/components/atoms/picture/picture-cover.twig b/assets/components/atoms/picture/picture-cover.twig index c168291f5..f20eb691e 100644 --- a/assets/components/atoms/picture/picture-cover.twig +++ b/assets/components/atoms/picture/picture-cover.twig @@ -1,19 +1,19 @@ -{% set cover_path = cover_path|default("https://via.placeholder.com/") %} +{% set cover_path = cover_path|default("./images/styleguide/teaser/news-teaser-") %} diff --git a/assets/components/atoms/picture/picture-fullwidth-teaser.twig b/assets/components/atoms/picture/picture-fullwidth-teaser.twig index fba00c147..c8f5fa635 100644 --- a/assets/components/atoms/picture/picture-fullwidth-teaser.twig +++ b/assets/components/atoms/picture/picture-fullwidth-teaser.twig @@ -1,21 +1,19 @@ -{% if not img %} -{% set img %}./images/styleguide/teaser/news-teaser{% endset %} -{% endif %} +{% set cover_path = cover_path|default("./images/styleguide/teaser/news-teaser-") %} diff --git a/assets/components/atoms/picture/picture-one-third-square.twig b/assets/components/atoms/picture/picture-one-third-square.twig index 3ee256d30..c26eea0fc 100644 --- a/assets/components/atoms/picture/picture-one-third-square.twig +++ b/assets/components/atoms/picture/picture-one-third-square.twig @@ -1,18 +1,19 @@ +{% set img_path = img_path|default("./images/styleguide/teaser/news-teaser-") %} diff --git a/assets/components/atoms/picture/picture-one-third.twig b/assets/components/atoms/picture/picture-one-third.twig index 67d86edf1..be621fbf5 100644 --- a/assets/components/atoms/picture/picture-one-third.twig +++ b/assets/components/atoms/picture/picture-one-third.twig @@ -1,18 +1,19 @@ +{% set img_path = img_path|default("./images/styleguide/teaser/news-teaser-") %} diff --git a/assets/components/atoms/picture/picture-portrait.twig b/assets/components/atoms/picture/picture-portrait.twig index e8a0905d2..c645442c9 100644 --- a/assets/components/atoms/picture/picture-portrait.twig +++ b/assets/components/atoms/picture/picture-portrait.twig @@ -1,18 +1,19 @@ +{% set portrait_path = portrait_path|default("./images/styleguide/people/portrait-") %} diff --git a/assets/components/atoms/picture/picture-question.twig b/assets/components/atoms/picture/picture-question.twig index d2b6bddc3..6e7b58c49 100644 --- a/assets/components/atoms/picture/picture-question.twig +++ b/assets/components/atoms/picture/picture-question.twig @@ -1,18 +1,19 @@ +{% set img_path = img_path|default("./images/styleguide/homepage/7-science-question/science-question-") %} diff --git a/assets/components/atoms/picture/picture-thumb-square.twig b/assets/components/atoms/picture/picture-thumb-square.twig index 7c36681d5..f3d86d8bc 100644 --- a/assets/components/atoms/picture/picture-thumb-square.twig +++ b/assets/components/atoms/picture/picture-thumb-square.twig @@ -1,8 +1,19 @@ +{% set thumb_path = thumb_path|default("./images/styleguide/news-thumbs/news_thumb-") %} diff --git a/assets/components/atoms/picture/picture.twig b/assets/components/atoms/picture/picture.twig index 13130313b..a1236974d 100644 --- a/assets/components/atoms/picture/picture.twig +++ b/assets/components/atoms/picture/picture.twig @@ -1,18 +1,19 @@ +{% set img_path = img_path|default("./images/styleguide/teaser/news-teaser-") %} diff --git a/assets/components/atoms/picture/picture.yml b/assets/components/atoms/picture/picture.yml index 043ed8694..269749504 100644 --- a/assets/components/atoms/picture/picture.yml +++ b/assets/components/atoms/picture/picture.yml @@ -12,7 +12,7 @@ variants: Picture used in 'Organism > Fullwidth teaser' and 'News > Highlighted'. - name: avatar title: Avatar - wrapper: col-sm-4 col-md-2 col-lg-1 + wrapper: col-sm-4 col-md-2 notes: | Avatar picture need an equal height and width in order to be displayed as a circle - name: portrait @@ -25,6 +25,7 @@ variants: wrapper: col-md-4 - name: one-third-square title: One third Square picture + wrapper: col-md-4 - name: news-thumb title: News Listing Thumbnail wrapper: col-3 col-md-2 diff --git a/assets/components/content-types/study-plan/study-plan-bachelor.twig b/assets/components/content-types/study-plan/study-plan-bachelor.twig index ab2f8858b..e8ea51ef5 100644 --- a/assets/components/content-types/study-plan/study-plan-bachelor.twig +++ b/assets/components/content-types/study-plan/study-plan-bachelor.twig @@ -13,11 +13,6 @@