From 218e74955bdc60726e92d0c7ef698aff6ca031e9 Mon Sep 17 00:00:00 2001
From: gaelle morin <gmorin.dev@gmail.com>
Date: Thu, 9 Jul 2020 15:49:56 +0200
Subject: [PATCH] feature: notification - templates for circle and private
 notification added

---
 src/header.pug                                |   4 +
 src/styles/base/header.scss                   |   8 +-
 src/styles/base/main.scss                     | 115 ------------------
 .../circle/page-circle-notifications.pug      |   8 ++
 src/views/user/page-user-notifications.pug    |   8 ++
 5 files changed, 24 insertions(+), 119 deletions(-)
 create mode 100644 src/views/circle/page-circle-notifications.pug
 create mode 100644 src/views/user/page-user-notifications.pug

diff --git a/src/header.pug b/src/header.pug
index 33df8cc4..1320e54c 100644
--- a/src/header.pug
+++ b/src/header.pug
@@ -7,6 +7,10 @@ solid-notifications.notLoggedIn(
   bind-user
 )
 
+//- Templates for notifications from circles and from other users
+include views/circle/page-circle-notifications.pug
+include views/user/page-user-notifications.pug
+
 include templates/hubl-user-avatar.pug
 
 details#user-controls.notLoggedIn
diff --git a/src/styles/base/header.scss b/src/styles/base/header.scss
index f1d2dafa..cfc8b82c 100644
--- a/src/styles/base/header.scss
+++ b/src/styles/base/header.scss
@@ -203,6 +203,10 @@ solid-notifications {
             .solid-notification__title {
               font-size: 1.3rem;
               font-weight: 600;
+
+              .solid-notification__title__side {
+                font-weight: normal;
+              }
             }
 
             .solid-notification__summary {
@@ -219,10 +223,6 @@ solid-notifications {
                 max-width: 256px;
               }
             }
-
-            .solid-notification__date {
-              display: none;
-            }
           }
 
           .solid-notification__read {
diff --git a/src/styles/base/main.scss b/src/styles/base/main.scss
index c5b5ff94..23a12a6b 100644
--- a/src/styles/base/main.scss
+++ b/src/styles/base/main.scss
@@ -279,121 +279,6 @@ h5 {
   width: 15vw;
 }
 
-.project-edit-logo {
-  display: flex;
-  height: 8.5vh;
-  margin-top: 20px;
-  margin-bottom: 30px;
-
-  form {
-    display: flex;
-  }
-
-  hubl-user-avatar {
-    width: 104px;
-  }
-
-  input[type='submit'] {
-    @extend .button,
-    .text-bold,
-    .text-uppercase,
-    .button-primary,
-    .bordered;
-    align-self: center;
-  }
-}
-
-.form-picture {
-
-  form {
-    display: block;
-    text-align: center;
-    margin-bottom: 2.6rem;
-    padding-top: 1.8rem;
-
-    @include breakpoint(lg) {
-      display: flex;
-      width: 100%;
-    }
-
-    hubl-user-avatar {
-      display: inline-block;
-      max-width: 100%;
-      max-height: 16.5vh;
-
-      @include breakpoint(lg) {
-        margin-left: 20px;
-        max-height: 8.5vh;
-        max-width: none;
-        width: calc(35vw - 20px);
-      }
-
-      >object,
-      >img {
-        display: block;
-        max-height: 16.5vh !important;
-
-        @include breakpoint(lg) {
-          max-height: 8.5vh !important;
-        }
-      }
-    }
-
-    input {
-      @extend .button,
-      .text-bold,
-      .text-uppercase,
-      .button-primary,
-      .bordered;
-      margin: 10px 0;
-      width: 100%;
-
-      @include breakpoint(lg) {
-        margin: auto 0 auto 2.2rem;
-        width: auto;
-      }
-    }
-  }
-}
-
-
-.p_relative {
-  position: relative;
-}
-
-.is-inline-1200 {
-
-  @include breakpoint(lg) {
-    flex-direction: row;
-  }
-}
-
-.flex_vertical-center {
-  align-items: center;
-}
-
-.flex_column {
-  flex-direction: column;
-}
-
-.pull-left-1200 {
-
-  @include breakpoint(lg) {
-    float: left;
-  }
-}
-
-.profile-avatar {
-  height: 243px;
-  width: 243px;
-  margin-left: 2rem;
-}
-
-solid-picture {
-  
-}
-
-
 .content-box {
   @include window-style-modal();
   flex-direction: column;
diff --git a/src/views/circle/page-circle-notifications.pug b/src/views/circle/page-circle-notifications.pug
new file mode 100644
index 00000000..25bf825f
--- /dev/null
+++ b/src/views/circle/page-circle-notifications.pug
@@ -0,0 +1,8 @@
+solid-notifications-template(data-rdf-type='hd:circle')
+  template
+    .solid-notification__avatar
+      img(src="${await author['account.foaf:depiction']}")
+    .solid-notification__content
+      .solid-notification__title ${await author.name} 
+        span.solid-notification__title__side dans #${await object.name}
+      p.solid-notification__summary ${summary}
diff --git a/src/views/user/page-user-notifications.pug b/src/views/user/page-user-notifications.pug
new file mode 100644
index 00000000..fd4aef37
--- /dev/null
+++ b/src/views/user/page-user-notifications.pug
@@ -0,0 +1,8 @@
+solid-notifications-template(data-rdf-type='foaf:user')
+  template
+    .solid-notification__avatar
+      img(src="${await author['account.foaf:depiction']}")
+    .solid-notification__content
+      .solid-notification__title ${await author.name} 
+        span.solid-notification__title__side en privé
+      p.solid-notification__summary ${summary}
\ No newline at end of file
-- 
GitLab