From 41454ba6babf6cbe087c4ed08df90faa42849066 Mon Sep 17 00:00:00 2001 From: Arnaud-D <35631001+Arnaud-D@users.noreply.github.com> Date: Fri, 8 Mar 2024 08:01:36 +0100 Subject: [PATCH 01/15] Ajoute le design du formulaire de titre et sous-titre --- assets/scss/layout/_content.scss | 59 ++++++++++++++++++- .../includes/headline/header.part.html | 17 +----- .../includes/headline/title.part.html | 43 ++++++++++++++ zds/tutorialv2/views/display/config.py | 3 + 4 files changed, 106 insertions(+), 16 deletions(-) create mode 100644 templates/tutorialv2/includes/headline/title.part.html diff --git a/assets/scss/layout/_content.scss b/assets/scss/layout/_content.scss index c665cc9bea..c9f3864278 100644 --- a/assets/scss/layout/_content.scss +++ b/assets/scss/layout/_content.scss @@ -13,6 +13,60 @@ } } + header { + >.title-block { + display: flex; + flex-direction: row; + + margin-bottom: $length-10; + + >.content-thumbnail-group { + flex-shrink: 0; + margin-right: $length-10; + } + + >.content-title-and-subtitle-group { + width:100%; + + padding-bottom: $length-4; + + border-bottom: $length-1 solid $accent-500; + + >.content-title-group { + >.title { + display: inline; + vertical-align: middle; + border: none; + margin: 0; + padding: 0; + } + + >.edit-button { + display: inline-block; + vertical-align: middle; + } + } + + >.content-subtitle-group { + >.subtitle { + display: inline; + vertical-align: middle; + margin: 0; + padding: 0; + } + + >.edit-button { + display: inline-block; + vertical-align: middle; + } + } + + display: flex; + flex-direction: column; + } + } + } + section > h2 { display: flex; @@ -185,7 +239,7 @@ padding-right: $length-10; } - .illu img { + .content-thumbnail-group { display: none; } @@ -195,7 +249,8 @@ .members, p, figure, - blockquote { + blockquote, + .title-block { margin-left: $length-10; margin-right: $length-10; } diff --git a/templates/tutorialv2/includes/headline/header.part.html b/templates/tutorialv2/includes/headline/header.part.html index 2e0315bd3f..a02dc8eeb4 100644 --- a/templates/tutorialv2/includes/headline/header.part.html +++ b/templates/tutorialv2/includes/headline/header.part.html @@ -1,20 +1,9 @@ -{% include "tutorialv2/includes/headline/licence.part.html" with licence=content.licence show_form=display_config.draft_actions.show_license_edit form=form_edit_license %} - -

- {% if show_thumbnail and content.image %} - - {% endif %} - {{ title }} -

- -{% if subtitle %} -

- {{ subtitle }} -

-{% endif %} +{% include "tutorialv2/includes/headline/title.part.html" with content=content title=title show_thumbnail=show_thumbnail show_form=display_config.draft_actions.show_title_edit form_title=form_edit_title form_subtitle=form_edit_subtitle %}