diff --git a/index.php b/index.php index 0676609327d0c5b1c94d1495dbb747dcead38fb2..17b78814c4a9288ea9fe78484a72a901bfea79a0 100644 --- a/index.php +++ b/index.php @@ -32,8 +32,10 @@ <?php require_once('src/html/edit-profile.html'); ?> <?php require_once('src/html/projects.html'); ?> <?php require_once('src/html/project.html'); ?> + <?php require_once('src/html/project-edition.html'); ?> <?php require_once('src/html/channels.html'); ?> <?php require_once('src/html/channel.html'); ?> + <?php require_once('src/html/channel-edition.html'); ?> <?php require_once('src/html/search.html'); ?> </main> diff --git a/src/html/channel-edition.html b/src/html/channel-edition.html new file mode 100644 index 0000000000000000000000000000000000000000..f6c9ff489ee29a7ac148d819eaa7f7b22460a0ec --- /dev/null +++ b/src/html/channel-edition.html @@ -0,0 +1,7 @@ +<div id="channel-edition" style="display: none"> + <ldp-form + class="edit-form" + data-src="<?php echo $sdn; ?>/channels/1/" + bind-resources + ></ldp-form> +</div> diff --git a/src/html/dashboard.html b/src/html/dashboard.html index 3d43d0e8ac7efe54e2d9ab29d728bf2cf0d822d8..37ffb96e3fc5cefd590b4911599323da2d440fe3 100644 --- a/src/html/dashboard.html +++ b/src/html/dashboard.html @@ -7,17 +7,20 @@ <!--</form>--> <div class="list-condensed"> - <ldp-router> - <ldp-route name="edit-profile" id-prefix="<?php echo $sdn; ?>/members/"> - <ldp-display - data-src="<?php echo $sdn; ?>/members/1/" - set-name="firstname, name-separator, lastname" - value-name-separator=" " - data-fields="avatar, name" - widget-avatar="ldp-display-img" - next="edit-profile" - ></ldp-display> - </ldp-route> - </ldp-router> + <ldp-display + id="to-user-profile" + data-src="<?php echo $sdn; ?>/members/1/" + set-name="firstname, name-separator, lastname" + value-name-separator=" " + data-fields="avatar, name" + widget-avatar="ldp-display-img" + ></ldp-display> </div> + + <script> + document.querySelector("#to-user-profile").addEventListener("click", () => { + document.getElementById("navbar-router").navigate("member"); + document.getElementById("member-page-router").navigate("member-detail"); + }); + </script> </div> diff --git a/src/html/edit-profile.html b/src/html/edit-profile.html index cbde15fbf1b714bd74b50a0c6cb45f238fd56f8f..f2dfa90876cfec7bc7d054c263f9fddbb04b0c0e 100644 --- a/src/html/edit-profile.html +++ b/src/html/edit-profile.html @@ -18,17 +18,16 @@ </script> <div id="edit-profile" style="display: none"> - <!--ldp-form - class="edit-form" - data-src="<?php echo $sdn; ?>/members/1/" - bind-resources - ></ldp-form--> - - <label for="avatar-input"> <img id="avatar-preview" src="http://cdn.hd-app.local/members/alexandre-bourlier.jpg" style="width: 100%;"/> </label> <input type="file" id="avatar-input" name="avatar" value="http://cdn.hd-app.local/members/alexandre-bourlier.jpg" />`; + + <ldp-form + class="edit-form" + data-src="<?php echo $sdn; ?>/members/1/" + bind-resources + ></ldp-form> </div> <div id="crop-modal"> diff --git a/src/html/home.html b/src/html/home.html deleted file mode 100644 index 14c027aac62d2a7ee23ebe7955f106c77072c983..0000000000000000000000000000000000000000 --- a/src/html/home.html +++ /dev/null @@ -1,5 +0,0 @@ -<div id="home" style="display: none"> - <div id="logoContainer"> - <img src="./img/Logo_Happy_Dev.png" alt="Logo Happy Dev"> - </div> -</div> diff --git a/src/html/member.html b/src/html/member.html index 21a20e77d423d506e8fbed04924a5323642a832e..85bab3dbf2a8dbb263575acd9ed3ffe920ec9dc9 100644 --- a/src/html/member.html +++ b/src/html/member.html @@ -11,23 +11,40 @@ <div id="member-chat" class="chat-wrapper"></div> <div id="member-detail" style="display: none"> - <ldp-display - id="member-info" - set-name="firstname, name-separator, lastname" - value-name-separator=" " - data-fields="avatar, name, cell, email, number" - widget-avatar="ldp-display-img" - widget-cell="ldp-display-cell" - widget-email="ldp-display-mailto" - widget-number="ldp-display-tel" - bind-resources - ></ldp-display> + <div class="section info"> + <i class="fa fa-pencil" aria-hidden="true"></i> + <i class="name fa fa-pencil" aria-hidden="true"></i> - <h2 class="section skills">Compétences</h2> - <ldp-display - id="member-skills" - id-suffix="skills" - bind-resources + <ldp-display + id="member-info" + data-src="<?php echo $sdn; ?>/members/1/" + set-name="firstname, name-separator, lastname" + value-name-separator=" " + data-fields="avatar, name, cell, email, number" + widget-avatar="ldp-display-img" + widget-cell="ldp-display-cell" + widget-email="ldp-display-mailto" + widget-number="ldp-display-tel" + bind-resources ></ldp-display> + </div> + + <div class="section skills"> + <i class="fa fa-pencil" aria-hidden="true"></i> + <h2>Compétences</h2> + <ldp-display + id="member-skills" + id-suffix="skills" + bind-resources + ></ldp-display> + </div> </div> </div> + +<script> + document.querySelectorAll("#member-detail .fa-pencil").forEach((el) => { + el.addEventListener("click", (e) => { + document.getElementById('navbar-router').navigate('edit-profile'); + }); + }); +</script> diff --git a/src/html/menu.html b/src/html/menu.html index 2598d69dc802637783c2e2b8985434ed37c33f68..21090ec6ae665e17685a57ffc69f40e4ad1aceed 100644 --- a/src/html/menu.html +++ b/src/html/menu.html @@ -17,17 +17,15 @@ <i class="fa fa-tasks" aria-hidden="true"></i> <span class="d-none d-md-inline"> Projets</span> </ldp-route> - <ldp-route class="nav-item d-none" name="project" id-prefix="<?php echo $sdn; ?>/projects/"> - Projet - </ldp-route> + <ldp-route class="d-none" name="project" id-prefix="<?php echo $sdn; ?>/projects/"></ldp-route> + <ldp-route class="d-none" name="project-edition" id-prefix="<?php echo $sdn; ?>/channels/"></ldp-route> <ldp-route class="nav-item pb-2 align-self-stretch text-center text-md-left" name="channels"> <i class="fa fa-comments" aria-hidden="true"></i> <span class="d-none d-md-inline"> Channels</span> </ldp-route> - <ldp-route class="nav-item d-none" name="channel" id-prefix="<?php echo $sdn; ?>/channels/"> - channel - </ldp-route> + <ldp-route class="d-none" name="channel" id-prefix="<?php echo $sdn; ?>/channels/"></ldp-route> + <ldp-route class="d-none" name="channel-edition" id-prefix="<?php echo $sdn; ?>/channels/"></ldp-route> </div> <div class="col-2 col-md-1"></div> diff --git a/src/html/project-edition.html b/src/html/project-edition.html new file mode 100644 index 0000000000000000000000000000000000000000..fbd8a5af67a7c5507fa14a46d062fa97c3fbc41e --- /dev/null +++ b/src/html/project-edition.html @@ -0,0 +1,8 @@ +<div id="project-edition" style="display: none"> + <ldp-form + class="edit-form" + data-src="<?php echo $sdn; ?>/projects/1/" + bind-resources + ></ldp-form> +</div> + diff --git a/src/scss/_channels.scss b/src/scss/_channels.scss index efd811f897529c0f6c8c2426013d51c0d9a2313d..d5f0e816c35664633f4acfd03e6cbfca998df947 100644 --- a/src/scss/_channels.scss +++ b/src/scss/_channels.scss @@ -2,7 +2,6 @@ #channels-list { display: flex; flex-direction: column; - margin-top: 40px; ldp-display { @extend %td; diff --git a/src/scss/_dashboard.scss b/src/scss/_dashboard.scss index ed3af2179698b765549ec08a85ca61585cf9010e..c85ed58ceaa0f595c46097226fd0187b3a86301b 100644 --- a/src/scss/_dashboard.scss +++ b/src/scss/_dashboard.scss @@ -1,6 +1,5 @@ #dashboard { - #search-help { - font-style: italic; - padding-left: 5px; + #to-user-profile { + cursor: pointer; } } diff --git a/src/scss/_member.scss b/src/scss/_member.scss index 79aa023ca4d8beafd81c47573655982469c23e8f..359cb2ac00b33ed458bed2f7e66e6b336b643ae5 100644 --- a/src/scss/_member.scss +++ b/src/scss/_member.scss @@ -61,8 +61,24 @@ } .section { - @extend %detail-section; - margin-top: 40px; + position: relative; + + i { + position: absolute; + display: block; + top: 5px; + right: 10px; + cursor: pointer; + + &.name { + top: 290px; + } + } + + h2 { + @extend %detail-section; + margin-top: 40px; + } } #member-skills { diff --git a/src/scss/_projects.scss b/src/scss/_projects.scss index a24e197a7f5cb3c927858c86c856e507aa924d5c..3ace468da20dd4c23e9d799a2e32ab71a8dc1a08 100644 --- a/src/scss/_projects.scss +++ b/src/scss/_projects.scss @@ -2,7 +2,6 @@ #projects-list { display: flex; flex-direction: column; - margin-top: 40px; ldp-display { @extend %td;