From 7932b1ab021d776968afde8691019f7c331ffda9 Mon Sep 17 00:00:00 2001 From: fred <fred> Date: Tue, 3 Sep 2019 09:55:39 +0200 Subject: [PATCH] Advancing on dashboard --- src/includes/components/widgets.pug | 31 +++++- src/includes/mentor/profile.pug | 14 +-- src/includes/mentor/resources/detail.pug | 2 +- src/includes/mentor/resources/list.pug | 14 +-- src/styles/index.scss | 127 ++++++++++++++++++++++- 5 files changed, 166 insertions(+), 22 deletions(-) diff --git a/src/includes/components/widgets.pug b/src/includes/components/widgets.pug index 0ac6b1ec..3fe0ee7a 100644 --- a/src/includes/components/widgets.pug +++ b/src/includes/components/widgets.pug @@ -42,17 +42,40 @@ sib-widget(name='cs-resource-format-name') sib-widget(name='cs-resource-status') template - div ${value ? ( value == 'to_improve' ? `Improvement required` : `Refused` ) : `Pending validation`} + div.button_base.button_pending ${value ? ( value == 'to_improve' ? `Improvement required` : `Refused` ) : `Pending validation`} - -sib-widget(name='cs-action') +sib-widget(name='cs-validate-action') template div - sib-link( + sib-link.button_base( data-src="\${src}" next="\${value}" ) ${label} +sib-widget(name='cs-detail-action') + template + div + sib-link( + data-src="\${src}" + next="\${value}" + ) <i class="fas fa-eye"></i> + +sib-widget(name='cs-edit-action') + template + div + sib-link( + data-src="\${src}" + next="\${value}" + ) <i class="fas fa-pen"></i> + +sib-widget(name='cs-delete-action') + template + div + sib-link( + data-src="\${src}" + next="\${value}" + ) <i class="fas fa-trash-alt"></i> + sib-widget(name='cs-section_introduction') template div diff --git a/src/includes/mentor/profile.pug b/src/includes/mentor/profile.pug index b01c3c19..93cc091e 100644 --- a/src/includes/mentor/profile.pug +++ b/src/includes/mentor/profile.pug @@ -1,10 +1,10 @@ include ../components/widgets div.container_min - h2.title_lead_avenir My Account + h2.title_lead.fd_bleu My Account -div.block_list - div.button__actions +div.block_list.flex + div.button__actions.w_25 div.resources__newresource sib-link(next='mentor-resource-create') div @@ -23,7 +23,7 @@ div.block_list role='log out' ) Logout - div.profile_information + div.profile_information.block_log.w_75 sib-display( bind-user fields='account.picture, name, mentor_profile.headline, mentor_profile.city, mentor_profile.country, registered_on' @@ -35,7 +35,7 @@ div.block_list widget-mentor_profile.registered_on='cs-display-property' ) - sib-display( + sib-display.bold( fields="" nested-field="resources" counter-template="<p>${counter} resource(s) uploaded here</p>" @@ -60,6 +60,6 @@ div.block_list widget-mentor_profile.phone='cs-display-resource-property' widget-mentor_profile.linkedin='cs-display-link' widget-mentor_profile.twitter='cs-display-link' - label-mentor_profile.twitter='Twitter' - label-mentor_profile.linkedin='Linkedin' + label-mentor_profile.twitter='<i class="fab fa-twitter"></i>' + label-mentor_profile.linkedin='<i class="fab fa-linkedin-in"></i>' ) \ No newline at end of file diff --git a/src/includes/mentor/resources/detail.pug b/src/includes/mentor/resources/detail.pug index 4ef2057f..a0da4397 100644 --- a/src/includes/mentor/resources/detail.pug +++ b/src/includes/mentor/resources/detail.pug @@ -3,7 +3,7 @@ include ../../components/widgets .block_log.block_creat_count sib-display( bind-resources, - fields='format, steps, content(name, preview_image, description, tags),\ + fields='steps, format, content(name, preview_image, description, tags),\ submitter_info(submitter.name, \ submitter.mentor_profile.organisation.name, skills, uri, broken),\ review.reviewer.name, copyright, specifications(\ diff --git a/src/includes/mentor/resources/list.pug b/src/includes/mentor/resources/list.pug index 42f25aee..8a01038b 100644 --- a/src/includes/mentor/resources/list.pug +++ b/src/includes/mentor/resources/list.pug @@ -37,7 +37,7 @@ div.block_list action-validate='mentor-resource-validate' label-validate='Check ->' - widget-validate='cs-action' + widget-validate='cs-validate-action' ) div(id='requests', class="tabcontent") @@ -47,7 +47,7 @@ div.block_list label-create='Create associated resource' action-create="mentor-resource-create" - widget-create='cs-action' + widget-create='cs-validate-action' ) div(id='history', class="tabcontent") @@ -68,12 +68,12 @@ div.block_list class-content='content__left' class-actions='actions__right' - widget-edit='cs-action' - action-edit='mentor-resource-edit' - - widget-detail='cs-action' + widget-detail='cs-detail-action' action-detail='mentor-resource-detail' + + widget-edit='cs-edit-action' + action-edit='mentor-resource-edit' - widget-delete='cs-action' + widget-delete='cs-delete-action' action-delete='delete' ) diff --git a/src/styles/index.scss b/src/styles/index.scss index 04d442d9..0c6072b2 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -76,6 +76,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX*/ --marge-petit: 3rem; --marge-base-750: 1rem; --bg-btn-base: #01AFCC; + --clr-roll-black:#444C4D; } /* XXXXXXXXXXXXXXXXXXXXXXXX technique XXXXXXXXXXXXXXXXXXXXXX */ @@ -121,16 +122,19 @@ img{ width: auto; } -.flex, sib-set-default{ +.flex, sib-set-default,#resources-history>div div{ display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; } -.flex_espace, sib-set-default{ +.flex_espace, sib-set-default,#resources-history>div div{ justify-content: space-between; } +sib-set-default[name="actions"]{ + justify-content: flex-end; +} .flex_item_center{ align-items: center; @@ -323,6 +327,10 @@ p{ top: 30%; } +.bold{ + font-weight: bold; +} + /* XXXXXXXXXXXXXXXXXXXXXXXXXXXX ICONES XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX*/ .ico_gauche{ @@ -743,8 +751,119 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX*/ background-color:white; } +sib-set-default[name="content"]>*{ + display: block; + width: 100%; + text-align: left; + font-family: "var(--typo-btn)"; + font-size: 1.4rem; +} + +sib-display-value,sib-multiple label,cs-resource-status div{ + font-weight: bold; + } +sib-multiple label{ + margin-right: 1rem; +} +#resources-history cs-resource-status[name="review.status"]{ + width: 100%; + display: block; + text-align: right; + div{ + display: inline-block; + font-family: "var(--typo-btn)"; + } +} +#resources-history .fas{ + color: var(--bg-btn-base); + margin-left: 2.5rem; + font-size: 1.5rem; + transition: .3s all ease-in; + cursor: pointer; + &:hover{ + color: var(--clr-roll-black); + } + } +sib-multiple label, cs-resource-status[name="review.status"]+*{ + float: left; + width: auto; +} +.button_pending{ + background: #5DC6F2; + border-radius: 4px; + border: none; + cursor: pointer; +} +#pending-resources > div sib-display[label-validate="Check ->"]>div{ + display:flex; + justify-content: space-between; +} + +/*XXXXXXXXXXXXXXXXXXXXX DETAIL RESSOURCES XXXXXXXXXXXXXXXXXXXXXXXXXXXXX*/ +/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +XXXXXXXXXXXXXXXXXXXXXXXX PROFILE XXXXXXXXXXXXXXXXXXXXX +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX*/ + +.block_list.flex .button__actions>div{ + display: block; +} + +.profile_information{ + margin-left: 8rem; + width: 40%; + padding: 3rem; + position: relative; + cs-display-label p{ + margin: 1.5rem 0 0.5rem 0; + font-weight: bold; + } + sib-display:last-child{ + width: 100%; + position: absolute; + top: 100%; + left: 0; + background: var(--bg-btn-base); + padding: 3rem; + text-align: left; + margin-bottom: 2rem; + cs-display-resource-property[name="email"] + p,.fab{ + color: var(--bg-block); + } + cs-display-link { + display: inline-block; + width: 3rem; + p{ + margin: 0; + } + + } + } +} + +cs-profile-picture{ + width: 8.5rem; + height: 8.5rem; + float:left; + margin-right: 1.5rem; + img{ + border-radius: 50%; + } +} + +cs-display-property[name="name"] p{ + font-size: 2rem; + font-weight: bold; + margin: 0; +} + +cs-display-property[name="mentor_profile.country"] p{ + clear: both; +} + /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXX MEDIA QUERIES XXXXXXXXXXXXXXXXXXXXX @@ -764,4 +883,6 @@ b, strong { font-weight: bolder; } -div{} \ No newline at end of file +div{ + +} \ No newline at end of file -- GitLab