diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml
index 9d3a8b5..cfc3cb6 100644
--- a/.github/workflows/cd.yml
+++ b/.github/workflows/cd.yml
@@ -1,14 +1,16 @@
on:
workflow_call:
+ repository_dispatch:
+ types: [publish-event]
jobs:
build:
runs-on: ubuntu-latest
- environment: ${{ github.ref == 'refs/heads/master' && 'production' || 'staging' }}
+ environment: ${{ (github.event.client_payload.env && github.event_name == 'repository_dispatch') && github.event.client_payload.env || (github.ref == 'refs/heads/master' && 'production' || 'staging') }}
env:
VM_CONTENTFUL_SPACE: ${{ secrets.VM_CONTENTFUL_SPACE }}
VM_CONTENTFUL_ACCESS_TOKEN: ${{ secrets.VM_CONTENTFUL_ACCESS_TOKEN }}
- VM_CONTENTFUL_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'production' || 'staging' }}
+ VM_CONTENTFUL_ENVIRONMENT: ${{ (github.event.client_payload.env && github.event_name == 'repository_dispatch') && github.event.client_payload.env || (github.ref == 'refs/heads/master' && 'production' || 'staging') }}
outputs:
ENVIRONMENT: ${{ env.VM_CONTENTFUL_ENVIRONMENT }}
steps:
@@ -95,3 +97,5 @@ jobs:
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }}
channelId: live
projectId: ${{ secrets.FIREBASE_PROJECT_ID }}
+ target: ${{ secrets.FIREBASE_SITE_TARGET }}
+
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 060e325..c621446 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -51,7 +51,7 @@ jobs:
deploy:
if: >
- (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master' || (github.event.pull_request.base.ref == 'develop' && github.event.pull_request.head.repo.full_name == github.repository))
+ (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master' || (github.event.pull_request.base.ref == 'develop' && github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.user.login == 'valerymelou'))
needs: test
uses: ./.github/workflows/cd.yml
secrets: inherit
diff --git a/libs/blog/feature-home/src/lib/blog-home.component.html b/libs/blog/feature-home/src/lib/blog-home.component.html
index 3fe4e6a..f754a97 100644
--- a/libs/blog/feature-home/src/lib/blog-home.component.html
+++ b/libs/blog/feature-home/src/lib/blog-home.component.html
@@ -57,7 +57,7 @@
+ @if (loading) {
+
+ }
+
+
+
diff --git a/libs/shared/layout/src/lib/logo/logo.component.spec.ts b/libs/shared/layout/src/lib/logo/logo.component.spec.ts
new file mode 100644
index 0000000..6cf6022
--- /dev/null
+++ b/libs/shared/layout/src/lib/logo/logo.component.spec.ts
@@ -0,0 +1,21 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+import { LogoComponent } from './logo.component';
+
+describe('LogoComponent', () => {
+ let component: LogoComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ imports: [LogoComponent],
+ }).compileComponents();
+
+ fixture = TestBed.createComponent(LogoComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/libs/shared/layout/src/lib/logo/logo.component.ts b/libs/shared/layout/src/lib/logo/logo.component.ts
new file mode 100644
index 0000000..4137af2
--- /dev/null
+++ b/libs/shared/layout/src/lib/logo/logo.component.ts
@@ -0,0 +1,143 @@
+import { Component } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import {
+ NavigationEnd,
+ NavigationStart,
+ RouteConfigLoadEnd,
+ RouteConfigLoadStart,
+ Router,
+} from '@angular/router';
+
+@Component({
+ selector: 'app-logo',
+ standalone: true,
+ imports: [CommonModule],
+ templateUrl: './logo.component.html',
+ styles: `
+ /* HTML: */
+ .loader {
+ width: 40px;
+ aspect-ratio: 1;
+ border-radius: 50%;
+ border: 2px solid #3754ed;
+ animation:
+ l20-1 0.8s infinite linear alternate,
+ l20-2 1.6s infinite linear;
+ }
+
+ @keyframes l20-1 {
+ 0% {
+ clip-path: polygon(
+ 50% 50%,
+ 0 0,
+ 50% 0%,
+ 50% 0%,
+ 50% 0%,
+ 50% 0%,
+ 50% 0%
+ );
+ }
+ 12.5% {
+ clip-path: polygon(
+ 50% 50%,
+ 0 0,
+ 50% 0%,
+ 100% 0%,
+ 100% 0%,
+ 100% 0%,
+ 100% 0%
+ );
+ }
+ 25% {
+ clip-path: polygon(
+ 50% 50%,
+ 0 0,
+ 50% 0%,
+ 100% 0%,
+ 100% 100%,
+ 100% 100%,
+ 100% 100%
+ );
+ }
+ 50% {
+ clip-path: polygon(
+ 50% 50%,
+ 0 0,
+ 50% 0%,
+ 100% 0%,
+ 100% 100%,
+ 50% 100%,
+ 0% 100%
+ );
+ }
+ 62.5% {
+ clip-path: polygon(
+ 50% 50%,
+ 100% 0,
+ 100% 0%,
+ 100% 0%,
+ 100% 100%,
+ 50% 100%,
+ 0% 100%
+ );
+ }
+ 75% {
+ clip-path: polygon(
+ 50% 50%,
+ 100% 100%,
+ 100% 100%,
+ 100% 100%,
+ 100% 100%,
+ 50% 100%,
+ 0% 100%
+ );
+ }
+ 100% {
+ clip-path: polygon(
+ 50% 50%,
+ 50% 100%,
+ 50% 100%,
+ 50% 100%,
+ 50% 100%,
+ 50% 100%,
+ 0% 100%
+ );
+ }
+ }
+ @keyframes l20-2 {
+ 0% {
+ transform: scaleY(1) rotate(0deg);
+ }
+ 49.99% {
+ transform: scaleY(1) rotate(135deg);
+ }
+ 50% {
+ transform: scaleY(-1) rotate(0deg);
+ }
+ 100% {
+ transform: scaleY(-1) rotate(-135deg);
+ }
+ }
+ `,
+})
+export class LogoComponent {
+ loading = false;
+
+ constructor(router: Router) {
+ router.events.subscribe({
+ next: (event) => {
+ if (
+ event instanceof NavigationStart ||
+ event instanceof RouteConfigLoadStart
+ ) {
+ this.loading = true;
+ } else if (
+ event instanceof NavigationEnd ||
+ event instanceof RouteConfigLoadEnd
+ ) {
+ this.loading = false;
+ }
+ },
+ });
+ }
+}
diff --git a/libs/shared/layout/src/lib/navbar/navbar.component.html b/libs/shared/layout/src/lib/navbar/navbar.component.html
index 009376e..3d4d2d7 100644
--- a/libs/shared/layout/src/lib/navbar/navbar.component.html
+++ b/libs/shared/layout/src/lib/navbar/navbar.component.html
@@ -1,13 +1,5 @@
-
-
-
+