Skip to content

Commit

Permalink
Merge pull request #408 from valor-software/feat/redesign-blog-page
Browse files Browse the repository at this point in the history
feat: created new design for blog page
  • Loading branch information
ZhmenZH authored Nov 8, 2023
2 parents 820afbc + 367ed89 commit 4a1a4b3
Show file tree
Hide file tree
Showing 25 changed files with 481 additions and 354 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "Medusa the New Year-dedicated Release",
"order": 60,
"domains": ["dev_quality_assurance", "sales_marketing", "module_federation", "module_federation"],
"domains": ["dev_quality_assurance", "sales_marketing", "module_federation"],
"authorImg": "assets/articles/medusa-the-new-year-dedicated-release/Vitor_Bergamo.jpeg",
"language": "en",
"bgImg": "assets/articles/medusa-the-new-year-dedicated-release/valor_site_new_year.png",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"bgImg": "assets/articles/migrating-a-repo-to-an-nx-monorepo-while-retaining-history/migrating-a-repo-to-an-nx-monorepo-while-retaining-history.png",
"author": "Guilherme Tod",
"position": "Software Developer",
"date": "Tue Mon 16 2023 10:45:55 GMT+0000 (Coordinated Universal Time)",
"date": "Tue Jan 17 2023 10:45:55 GMT+0000 (Coordinated Universal Time)",
"seoDescription": "Why you should migrate and retain history"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"bgImg": "assets/articles/migrating-a-repo-to-an-nx-monorepo-while-retaining-history/migrating-a-repo-to-an-nx-monorepo-while-retaining-history.png",
"author": "Guilherme Tod",
"position": "Software Developer",
"date": "Tue Mon 16 2023 10:45:55 GMT+0000 (Coordinated Universal Time)",
"date": "Tue Jan 17 2023 10:45:55 GMT+0000 (Coordinated Universal Time)",
"seoDescription": "Why you should migrate and retain history"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "Medusa the New Year-dedicated Release",
"order": 60,
"domains": ["dev_quality_assurance", "sales_marketing", "module_federation", "module_federation"],
"domains": ["dev_quality_assurance", "sales_marketing", "module_federation"],
"authorImg": "assets/articles/medusa-the-new-year-dedicated-release/Vitor_Bergamo.jpeg",
"language": "en",
"bgImg": "assets/articles/medusa-the-new-year-dedicated-release/valor_site_new_year.png",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<ng-container *ngIf="articles?.length">
<swiper
[config]="swiperConfig"
class="article_swiper"
>
<ng-template swiperSlide *ngFor="let article of articles">
<ng-container *ngIf="article && article.title">
<a class="block w-full cursor-pointer" href="javascript:void(0)" [routerLink]="['/articles', getRouteLink(article.title)]">
<blog-portfolio-item [article]="article"></blog-portfolio-item>
</a>
</ng-container>
</ng-template>
</swiper>
<swiper
[config]="swiperConfig"
class="article_swiper"
>
<ng-template swiperSlide *ngFor="let article of articles">
<ng-container *ngIf="article && article.title">
<a class="block w-full cursor-pointer" href="javascript:void(0)"
[routerLink]="['/articles', getRouteLink(article.title)]">
<blog-portfolio-item [article]="article"></blog-portfolio-item>
</a>
</ng-container>
</ng-template>
</swiper>
</ng-container>
30 changes: 17 additions & 13 deletions libs/common-docs/src/models/article.interface.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
export interface IArticle {
author?: string;
authorImg?: string;
secondAuthor?: string;
secondAuthorImg?: string;
domains: string[];
language: string;
bgImg: string;
title: string;
position?: string;
date: string;
content: string;
seoDescription?: string;
order?: number;
author?: string;
authorImg?: string;
secondAuthor?: string;
secondAuthorImg?: string;
domains: string[];
language: string;
bgImg: string;
title: string;
position?: string;
date: string;
content: string;
seoDescription?: string;
order?: number;
readingTime: string;

// ToDO: implement change of the languages
languages?: string[];
}
80 changes: 0 additions & 80 deletions libs/route-pages/blog/src/blog-page.component.html

This file was deleted.

7 changes: 5 additions & 2 deletions libs/route-pages/blog/src/blog.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { routes } from './routes';
import { BlogPageComponent } from './blog-page.component';
import { BlogPageComponent } from './pages';
import { CommonDocsModule } from '@valor-software/common-docs';
import { BlogComponent, ArticleComponent } from './components';
import { BlogComponent, ArticleComponent, BlogItemComponent } from './components';
import { FeedbackModule } from '@valor-software/feedback';
import { SwiperModule } from 'swiper/angular';
import { DomainNamePipe } from './pipes/domain-name.pipe';

@NgModule({
declarations: [
BlogPageComponent,
BlogComponent,
ArticleComponent,
BlogItemComponent,
DomainNamePipe
],
imports: [
CommonModule,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
::ng-deep.turbo-table {
margin-top: 25px;
}

::ng-deep.turbo-table tbody tr:not(:first-of-type) {
border-top: 1px solid gray;
}

::ng-deep.turbo-table tbody tr:not(:first-of-type) td:not(:last-of-type) {
border-right: 1px solid gray
}

::ng-deep.turbo-table tbody tr:not(:first-of-type) td {
padding: 5px 10px;
}

::ng-deep tbody tr:first-of-type {
text-align: center;
}

::ng-deep mark {
background-color: #A9A9A9;
color: #383838;
border-radius: 0.3em;
padding: 0.1em 0.25em;
}

::ng-deep.white {
color: #ffffff;
}

::ng-deep.small-img {
margin: auto;
width: 40%
}

::ng-deep.block-citation {
border-left-width: 8px;
--tw-border-opacity: 1;
border-color: rgba(32, 32, 32, var(--tw-border-opacity));
--tw-bg-opacity: 1;
background-color: #2c2c2d;
}

::ng-deep.block-citation > .attribution {
padding: 0 16px 16px 16px;
text-align: right;
}

::ng-deep.block-citation > blockquote {
border: 0px;
border-radius: 3rem;
}

::ng-deep.block-citation > blockquote > .paragraph:first-of-type:before {
content: open-quote;
float: left;
font-size: 3em;
margin-right: 4px;
font-weight: 700;
line-height: 0.6em;
color: rgba(226, 78, 99, var(--tw-text-opacity));
}

::ng-deep.block-citation > blockquote > .paragraph:first-of-type:after {
content: no-close-quote;
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,76 +13,7 @@ import { of, Subscription } from 'rxjs';
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'article',
styles: [`
::ng-deep.turbo-table {
margin-top: 25px;
}
::ng-deep.turbo-table tbody tr:not(:first-of-type) {
border-top: 1px solid gray;
}
::ng-deep.turbo-table tbody tr:not(:first-of-type) td:not(:last-of-type) {
border-right: 1px solid gray
}
::ng-deep.turbo-table tbody tr:not(:first-of-type) td {
padding: 5px 10px;
}
::ng-deep tbody tr:first-of-type {
text-align: center;
}
::ng-deep mark {
background-color: #A9A9A9;
color: #383838;
border-radius: 0.3em;
padding: 0.1em 0.25em;
}
::ng-deep.white {
color: #ffffff;
}
::ng-deep.small-img {
margin: auto;
width: 40%
}
::ng-deep.block-citation {
border-left-width: 8px;
--tw-border-opacity: 1;
border-color: rgba(32, 32, 32, var(--tw-border-opacity));
--tw-bg-opacity: 1;
background-color: #2c2c2d;
}
::ng-deep.block-citation > .attribution {
padding: 0 16px 16px 16px;
text-align: right;
}
::ng-deep.block-citation > blockquote {
border: 0px;
border-radius: 3rem;
}
::ng-deep.block-citation > blockquote > .paragraph:first-of-type:before {
content: open-quote;
float: left;
font-size: 3em;
margin-right: 4px;
font-weight: 700;
line-height: 0.6em;
color: rgba(226, 78, 99, var(--tw-text-opacity));
}
::ng-deep.block-citation > blockquote > .paragraph:first-of-type:after {
content: no-close-quote;
}
`],
styleUrls: ['./article.component.scss'],
templateUrl: './article.component.html'
})
export class ArticleComponent implements OnDestroy {
Expand Down
Loading

0 comments on commit 4a1a4b3

Please sign in to comment.