diff --git a/src/includes/account-creation.pug b/src/includes/account-creation.pug new file mode 100644 index 0000000000000000000000000000000000000000..4c83f46b7ddfdfe7f070a49c3529891a18111d2b --- /dev/null +++ b/src/includes/account-creation.pug @@ -0,0 +1,30 @@ +sib-router(default-route='account-creation-index') + sib-route(name='account-creation-index') + sib-route(name='mentor-new-account') + sib-route(name='entrepreneur-new-account') + +#account-creation-index(hidden).flex + figure(class="logo") + img(src="../images/logo.png" alt="Coopstarter logo") + + h2.title_lead Welcome to our international index of resources for cooperative mentors and entrepreneurs + + sib-link.block_log(next='mentor-new-account') + div + figure.img_log + img(src="../images/mentor.png" + alt="Create your account as mentor") + h2.button_base I am a mentor + + sib-link.block_log(next='entrepreneur-new-account') + div + figure.img_log + img(src="../images/fusee.png" + alt="Create your account as entrepreneur") + h2.button_base I am an entrepreneur + +#mentor-new-account(hidden).no-sidebar.container + include mentor/create.pug + +#entrepreneur-new-account(hidden).no-sidebar.container + include entrepreneur/create.pug diff --git a/src/includes/components/widgets.pug b/src/includes/components/widgets.pug index 888ab0777da21465fba4cbd494f74f9a7303d1d4..3de85c72f9a232e35b6c1925251a244b2762b3fe 100644 --- a/src/includes/components/widgets.pug +++ b/src/includes/components/widgets.pug @@ -35,20 +35,9 @@ sib-widget(name='cs-action') next="\${value}" ) ${label} - -sib-widget(name='cs-form-password') - template - label - div ${label} - input( - type='password' - value="${value}" - name="${name}" - ) - sib-widget(name='cs-section_introduction') template div - h2 ${label} + h2.title_form ${label} p Informations will appear on your profile to inform entrepreneurs about your skills and activities. We will also use those information to address specific resources for validation. \ No newline at end of file diff --git a/src/includes/entrepreneur/create.pug b/src/includes/entrepreneur/create.pug index 762271cae9455ba85e005409bcc5fb29a623ce7d..2cc9a0be6595d94b12c29bec1031f2e879e60ea2 100644 --- a/src/includes/entrepreneur/create.pug +++ b/src/includes/entrepreneur/create.pug @@ -1,29 +1,24 @@ include ../components/widgets -h2 Create an entrepreneur account +h2.title_form Complete your entrepreneur account sib-form( - data-src=`${endpoints.entrepreneurs}` - fields="user.username, user.last_name, user.first_name, organisation,\ - user.email, user.password, user.password_confirmation" + bind-user + fields="last_name, first_name, entrepreneur_profile.organisation, username" - range-organisation=`${endpoints.organisations}` - - label-user.first_name="Surname" - label-user.last_name="Name" - label-user.username="Username" - label-user.email="Email" - label-organisation="Organisation *" - label-user.password="Password" - label-user.password_confirmation="Password confirmation" + range-entrepreneur_profile.organisation=`${endpoints.organisations}` + + label-first_name="Surname" + label-last_name="Name" + label-entrepreneur_profile.organisation="Organisation *" - class-organisation='form-label is-dark' - multiple-organisation='sib-multiple-select' - widget-organisation='sib-form-auto-completion' + class-entrepreneur_profile.organisation='form-label is-dark' + multiple-entrepreneur_profile.organisation='sib-multiple-select' + widget-entrepreneur_profile.organisation='sib-form-auto-completion' - widget-user.password='cs-form-password' - widget-user.password_confirmation='cs-form-password' + widget-username='sib-form-hidden' - submit-button="CREATE AN ACCOUNT" + submit-button="COMPLETE YOUR ACCOUNT" + next="entrepreneur-dashboard" ) diff --git a/src/includes/entrepreneur/login.pug b/src/includes/entrepreneur/login.pug deleted file mode 100644 index ffdcef9ef86a2210f2c6b7ec7cf0314c61a745bf..0000000000000000000000000000000000000000 --- a/src/includes/entrepreneur/login.pug +++ /dev/null @@ -1,7 +0,0 @@ -h2 I am an entrepreneur - -cs-login(bind-user) - button(id='entrepreneur_login') Login as entrepreneur - -sib-link(next='entrepreneur-new-account') - div Create an account \ No newline at end of file diff --git a/src/includes/mentor/create.pug b/src/includes/mentor/create.pug index 9176e50191675737b6c4cb328821c5e013cec3b8..02890971e1b5031b930f5e97baeb4cb1cb2025ff 100644 --- a/src/includes/mentor/create.pug +++ b/src/includes/mentor/create.pug @@ -11,17 +11,16 @@ figure.logo.img_log h2.title_form Complete your mentor account sib-form( - data-src=`${endpoints.mentors}` - fields="account_information(user.username, user.last_name, user.first_name, organisation,\ - user.email, phone, language,\ - user.password, user.password_confirmation, account.picture),\ - about_you(header_about_you, headline, city, country,\ - biography, skills),\ - social_media(header_social_media, linkedin, twitter)" + bind-user + fields="account_information(last_name, first_name, mentor_profile.organisation,\ + mentor_profile.phone, mentor_profile.language),\ + about_you(header_about_you, account.picture, mentor_profile.headline, mentor_profile.city, mentor_profile.country,\ + mentor_profile.biography, mentor_profile.skills),\ + social_media(header_social_media, mentor_profile.linkedin, mentor_profile.twitter), username" - range-organisation=`${endpoints.organisations}` - range-language=`${endpoints.languages}` + range-mentor_profile.organisation=`${endpoints.organisations}` + range-mentor_profile.language=`${endpoints.languages}` label-header_about_you="About you" label-header_social_media="Social medias" @@ -29,36 +28,32 @@ sib-form( widget-header_social_media="cs-section_header" widget-header_about_you="cs-section_introduction" - label-user.username="Username" - label-user.first_name="Surname" - label-user.last_name="Name" - label-user.email="Email" - label-organisation="Organisation" - label-phone="Phone number" - label-user.password="Password" - label-user.password_confirmation="Password confirmation" - label-language="Language" + label-first_name="Surname" + label-last_name="Name" + label-mentor_profile.organisation="Organisation" + label-mentor_profile.phone="Phone number" + label-mentor_profile.language="Language" label-account.picture="Photo" - label-headline="Headline or current position" - label-city="City" - label-country="Country" - label-biography="Tell us more about your activities" - label-skills="What skills can you share with our entrepreneurs ?" - label-linkedin="Linkedin" - label-twitter="Twitter" - - widget-skills="sib-form-textarea" - widget-biography="sib-form-textarea" - widget-user.password_confirmation="cs-form-password" - widget-user.password="cs-form-password" - - class-organisation='form-label is-dark' - multiple-organisation='sib-multiple-select' - widget-organisation='sib-form-auto-completion' - - class-language='form-label is-dark' - multiple-language='sib-multiple-select' - widget-language='sib-form-auto-completion' - - submit-button="CREATE AN ACCOUNT" + label-mentor_profile.headline="Headline or current position" + label-mentor_profile.city="City" + label-mentor_profile.country="Country" + label-mentor_profile.biography="Tell us more about your activities" + label-mentor_profile.skills="What skills can you share with our entrepreneurs ?" + label-mentor_profile.linkedin="Linkedin" + label-mentor_profile.twitter="Twitter" + + widget-mentor_profile.skills="sib-form-textarea" + widget-mentor_profile.biography="sib-form-textarea" + widget-username="sib-form-hidden" + + class-mentor_profile.organisation='form-label is-dark' + multiple-mentor_profile.organisation='sib-multiple-select' + widget-mentor_profile.organisation='sib-form-auto-completion' + + class-mentor_profile.language='form-label is-dark' + multiple-mentor_profile.language='sib-multiple-select' + widget-mentor_profile.language='sib-form-auto-completion' + + submit-button="COMPLETE YOUR ACCOUNT" + next='mentor-dashboard' ) diff --git a/src/includes/mentor/login.pug b/src/includes/mentor/login.pug deleted file mode 100644 index 7c733598db439af0767cc92e4e0b3409dc2dc71f..0000000000000000000000000000000000000000 --- a/src/includes/mentor/login.pug +++ /dev/null @@ -1,9 +0,0 @@ -figure.img_log - img(src="../images/mentor.png" - alt="Connect as mentor") - -cs-login(bind-user) - button#mentor_login.button_base Login as mentor - -sib-link(next='mentor-new-account') - div.button_base Create an account diff --git a/src/includes/splash.pug b/src/includes/splash.pug index 1fd52476beaa754864a83e788eb12117e627910f..126f9521317af9867b701cf3171fe116b3e5fb19 100644 --- a/src/includes/splash.pug +++ b/src/includes/splash.pug @@ -1,30 +1,15 @@ sib-router(default-route='splash-index') sib-route(name='splash-index') - sib-route(name='mentor-login') - sib-route(name='entrepreneur-login') figure(class="logo") img(src="../images/logo.png" alt="Coopstarter logo") h2.title_lead Welcome to our international index of resources for cooperative mentors and entrepreneurs -#splash-index(hidden).flex - sib-link.block_log(next='mentor-login') - div - figure.img_log - img(src="../images/mentor.png" - alt="Connect as mentor") - h2.button_base I am a mentor +#splash-index(hidden).no-sidebar.block_log.flex + figure.img_log + img(src="../images/mentor.png" + alt="Connect as mentor") - sib-link.block_log(next='entrepreneur-login') - div - figure.img_log - img(src="../images/fusee.png" - alt="Connect as entrepreneur") - h2.button_base I am an entrepreneur - -#mentor-login(hidden).no-sidebar.block_log.flex - include mentor/login.pug - -#entrepreneur-login(hidden).no-sidebar.block_log.flex - include entrepreneur/login.pug + cs-login(bind-user) + button#mentor_login.button_base Connect to the knowledge base \ No newline at end of file diff --git a/src/index.pug b/src/index.pug index d72a1d50eed45f0b822221850803d99ae949b230..d3785ad5db77b63722ac9b92e209f3bde5e99e2f 100644 --- a/src/index.pug +++ b/src/index.pug @@ -4,8 +4,7 @@ html sib-router(default-route='splash') sib-route(name='splash') - sib-route(name='mentor-new-account') - sib-route(name='entrepreneur-new-account') + sib-route(name='account-creation') sib-route(name='mentor-dashboard') sib-route(name='entrepreneur-dashboard') @@ -19,11 +18,8 @@ html #splash(hidden).no-sidebar.container include includes/splash.pug - #mentor-new-account(hidden).no-sidebar.container - include includes/mentor/create.pug - - #entrepreneur-new-account(hidden).no-sidebar.container - include includes/entrepreneur/create.pug + #account-creation(hidden).no-sidebar.container + include includes/account-creation.pug sib-auth sib-auth-provider( @@ -39,7 +35,6 @@ script(type='module'). class CoopStarterLoginComponent extends HTMLElement { async connectedCallback() { mentor_login.onclick = () => this.triggerLogin(); - entrepreneur_login.onclick = () => this.triggerLogin(); this.update(); } @@ -64,6 +59,10 @@ script(type='module'). window.dispatchEvent( new CustomEvent('requestNavigation', { detail: { route: 'entrepreneur-dashboard' } }) ); + } else { + window.dispatchEvent( + new CustomEvent('requestNavigation', { detail: { route: 'account-creation' } }) + ); } } empty(){}