From 5671fd8ce56b16383e4d18d71fc321ff1c3e51f1 Mon Sep 17 00:00:00 2001
From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com>
Date: Thu, 21 Jan 2021 18:25:48 +0100
Subject: [PATCH] fix(style): add global link style

---
 .../components/search/search.component.html   |   4 +-
 .../components/search/search.component.scss   |   6 +-
 .../structure-details.component.html          | 108 +++++++++---------
 .../structure-details.component.scss          |   2 +-
 src/styles.scss                               |   6 +
 5 files changed, 62 insertions(+), 64 deletions(-)

diff --git a/src/app/structure-list/components/search/search.component.html b/src/app/structure-list/components/search/search.component.html
index 72c0a8883..b12adaecf 100644
--- a/src/app/structure-list/components/search/search.component.html
+++ b/src/app/structure-list/components/search/search.component.html
@@ -88,7 +88,7 @@
       [text]="'Filtres'"
       (action)="openModal(TypeModal.accompaniment)"
     ></app-button>
-    <a (click)="openConfirmationModal()" tabindex="0">Ajouter une structure</a>
+    <a (click)="openConfirmationModal()" class="primary" tabindex="0">Ajouter une structure</a>
   </div>
 </div>
 <div class="footerSearchSection isntPhoneContent" fxLayout="row" fxLayoutAlign="space-between center">
@@ -106,7 +106,7 @@
       </label>
     </div>
   </div>
-  <a (click)="openConfirmationModal()" tabindex="0">Ajouter une structure</a>
+  <a (click)="openConfirmationModal()" class="primary" tabindex="0">Ajouter une structure</a>
 </div>
 <app-modal
   [openned]="isConfirmationModalOpen"
diff --git a/src/app/structure-list/components/search/search.component.scss b/src/app/structure-list/components/search/search.component.scss
index 8359c4bdd..5afee7a7d 100644
--- a/src/app/structure-list/components/search/search.component.scss
+++ b/src/app/structure-list/components/search/search.component.scss
@@ -119,11 +119,7 @@
     }
   }
 }
-a {
-  @include hyperlink;
-  width: 100%;
-  text-align: right;
-}
+
 .phoneSection {
   margin: 9px 0px 18px 0px;
   display: none;
diff --git a/src/app/structure-list/components/structure-details/structure-details.component.html b/src/app/structure-list/components/structure-details/structure-details.component.html
index 164d02b42..d9dcb9b6d 100644
--- a/src/app/structure-list/components/structure-details/structure-details.component.html
+++ b/src/app/structure-list/components/structure-details/structure-details.component.html
@@ -9,15 +9,17 @@
 <div class="structrue-details-container" *ngIf="structure && !isLoading">
   <!-- Header info -->
   <div fxLayout="row" fxLayoutAlign="center center" *ngIf="!isClaimed">
-    <button (click)="claimStructure()">Revendiquer</button>
+    <a (click)="claimStructure()" class="primary" tabindex="0">Revendiquer</a>
   </div>
   <div fxLayout="row" fxLayoutAlign="center center">
-    <button
+    <a
       *ngIf="profileService.isLinkedToStructure(structure._id) || profileService.isAdmin()"
       (click)="editStructure()"
+      class="primary"
+      tabindex="0"
     >
       Modifier la structure
-    </button>
+    </a>
   </div>
   <div fxLayout="row" fxLayoutAlign="end center">
     <div (click)="close()" class="ico-close-details"></div>
@@ -67,6 +69,7 @@
             <app-svg-icon [type]="'ico'" [icon]="'web'"></app-svg-icon>
             <a
               target="_blank"
+              class="custom-link"
               rel="noopener noreferrer"
               [href]="structure.website.includes('http') ? structure.website : 'http://' + structure.website"
               >{{ structure.website | url }}</a
@@ -92,11 +95,53 @@
           </div>
         </div>
       </div>
-      <div>
-        {{ structure.description }}
+    </div>
+  </div>
+  <!-- Démarches en ligne -->
+  <div
+    *ngIf="structure.proceduresAccompaniment.length"
+    fxLayout="column"
+    class="structure-details-block"
+    fxLayoutAlign="baseline baseline"
+    fxLayoutGap="20px"
+  >
+    <div fxLayout="row" fxLayoutAlign="none flex-end" fxLayoutGap="8px">
+      <app-svg-icon [type]="'ico'" [icon]="'demarches'" [iconClass]="'icon-32'"></app-svg-icon>
+      <h2>Démarches en ligne</h2>
+    </div>
+    <div fxLayout="column">
+      <div fxLayout="row wrap" fxLayoutGap="24px">
+        <div *ngFor="let accompagnement of structure.proceduresAccompaniment">
+          <app-logo-card *ngIf="accompagnement != 'autres'" [name]="accompagnement"></app-logo-card>
+        </div>
       </div>
-      <div class="info">
-        {{ structure.lockdownActivity }}
+      <p *ngIf="isOtherSection">
+        Tout ce qui est en lien avec la création d'entreprise ex : consultation de sites de références (BPI, Je créé
+        dans ma région, ...), inscription à des newsletters, aide pour trouver des sites (CMA, CCI, Urssaf,...),
+        recherches d'infos sur moteur de recherche...
+      </p>
+    </div>
+  </div>
+  <!-- Services -->
+  <div
+    *ngIf="isBaseSkills() || isAccessRights()"
+    fxLayout="column"
+    class="structure-details-block"
+    fxLayoutAlign="baseline baseline"
+    fxLayoutGap="20px"
+  >
+    <div fxLayout="row" fxLayoutAlign="none flex-end" fxLayoutGap="8px">
+      <app-svg-icon [type]="'ico'" [icon]="'services'" [iconClass]="'icon-32'"></app-svg-icon>
+      <h2>Ateliers</h2>
+    </div>
+    <div fxLayout="row" class="w-100" fxLayout.lt-sm="column">
+      <div fxFlex="50%" *ngIf="isBaseSkills()">
+        <h3 class="subtitle">Compétences de base</h3>
+        <p *ngFor="let skill of baseSkills">{{ skill.text }}</p>
+      </div>
+      <div fxFlex="50%" *ngIf="isAccessRights()">
+        <h3 class="subtitle">Accès aux droits</h3>
+        <p *ngFor="let rights of accessRights">{{ rights.text }}</p>
       </div>
     </div>
   </div>
@@ -147,55 +192,6 @@
       </div>
     </div>
   </div>
-  <!-- Démarches en ligne -->
-  <div
-    *ngIf="structure.proceduresAccompaniment.length"
-    fxLayout="column"
-    class="structure-details-block"
-    fxLayoutAlign="baseline baseline"
-    fxLayoutGap="20px"
-  >
-    <div fxLayout="row" fxLayoutAlign="none flex-end" fxLayoutGap="8px">
-      <app-svg-icon [type]="'ico'" [icon]="'demarches'" [iconClass]="'icon-32'"></app-svg-icon>
-      <h2>Démarches en ligne</h2>
-    </div>
-    <div fxLayout="column">
-      <div fxLayout="row wrap" fxLayoutGap="24px">
-        <div *ngFor="let accompagnement of structure.proceduresAccompaniment">
-          <app-logo-card *ngIf="accompagnement != 'autres'" [name]="accompagnement"></app-logo-card>
-        </div>
-      </div>
-      <p *ngIf="isOtherSection">
-        Tout ce qui est en lien avec la création d'entreprise ex : consultation de sites de références (BPI, Je créé
-        dans ma région, ...), inscription à des newsletters, aide pour trouver des sites (CMA, CCI, Urssaf,...),
-        recherches d'infos sur moteur de recherche...
-      </p>
-    </div>
-  </div>
-  <!-- Services -->
-  <div
-    *ngIf="isBaseSkills() || isAccessRights()"
-    fxLayout="column"
-    class="structure-details-block"
-    fxLayoutAlign="baseline baseline"
-    fxLayoutGap="20px"
-  >
-    <div fxLayout="row" fxLayoutAlign="none flex-end" fxLayoutGap="8px">
-      <app-svg-icon [type]="'ico'" [icon]="'services'" [iconClass]="'icon-32'"></app-svg-icon>
-      <h2>Ateliers</h2>
-    </div>
-    <div fxLayout="row" class="w-100" fxLayout.lt-sm="column">
-      <div fxFlex="50%" *ngIf="isBaseSkills()">
-        <h3 class="subtitle">Compétences de base</h3>
-        <p *ngFor="let skill of baseSkills">{{ skill.text }}</p>
-      </div>
-      <div fxFlex="50%" *ngIf="isAccessRights()">
-        <h3 class="subtitle">Accès aux droits</h3>
-        <p *ngFor="let rights of accessRights">{{ rights.text }}</p>
-      </div>
-    </div>
-  </div>
-
   <!-- Equipements -->
   <div
     *ngIf="structure.hasEquipments()"
diff --git a/src/app/structure-list/components/structure-details/structure-details.component.scss b/src/app/structure-list/components/structure-details/structure-details.component.scss
index e7fe7c131..9cfee3599 100644
--- a/src/app/structure-list/components/structure-details/structure-details.component.scss
+++ b/src/app/structure-list/components/structure-details/structure-details.component.scss
@@ -74,7 +74,7 @@ h4 {
   text-transform: uppercase;
 }
 p,
-a {
+.custom-link {
   @include cn-regular-16;
   margin-top: 9px;
   margin-bottom: 9px;
diff --git a/src/styles.scss b/src/styles.scss
index 1773ee54c..ccd176182 100644
--- a/src/styles.scss
+++ b/src/styles.scss
@@ -5,6 +5,7 @@
 @import 'assets/scss/breakpoint';
 @import 'assets/scss/icons';
 @import 'assets/scss/inputs';
+@import 'assets/scss/hyperlink';
 @import '../node_modules/leaflet.locatecontrol/dist/L.Control.Locate.css';
 
 html {
@@ -35,6 +36,11 @@ a {
   &:hover {
     text-decoration: underline;
   }
+  &.primary {
+    @include hyperlink;
+    width: 100%;
+    text-align: right;
+  }
 }
 
 .clickable {
-- 
GitLab