Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: features section #1312

Merged
merged 39 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
a3f5f48
style: basic layout of features tab
Prerna290 Apr 11, 2024
f39b1a9
style: create model for features
Prerna290 Apr 13, 2024
da4db61
fix: grid of left and main column
Prerna290 Apr 13, 2024
21104c2
style: icon on left-col
Prerna290 Apr 15, 2024
4eabdff
style: bg color for selected
Prerna290 Apr 17, 2024
22d2527
style: change a tag outside nb-list-item
Prerna290 Apr 17, 2024
234b3ac
fix: plus icon for subheadings
Prerna290 Apr 18, 2024
9f74f12
style: show active when refreshed the page
Prerna290 Apr 18, 2024
78650f6
style: show active when refreshed
Prerna290 Apr 18, 2024
b0b82cd
style: make image corners rounded
Prerna290 Apr 19, 2024
5e4bc5c
style: remove commented code
Prerna290 Apr 19, 2024
c2c4545
style: change component name
Prerna290 Apr 22, 2024
78b6e9c
style: create new component for main-column
Prerna290 Apr 22, 2024
00e98f7
style: show indexes as per input limit
Prerna290 Apr 25, 2024
f83511d
style: change model name
Prerna290 Apr 25, 2024
049e5f3
style: remove slice
Prerna290 Apr 25, 2024
3675a8f
style: remove slice
Prerna290 Apr 25, 2024
7c79ff9
style: set functionality for limit
Prerna290 Apr 29, 2024
ddc9ebf
style: show component of aggencies page
Prerna290 Apr 30, 2024
46adc1b
style: change params to queryParams
Prerna290 Apr 30, 2024
95f7ded
style: fix padding of heading
Prerna290 May 1, 2024
181eb7f
style: change routerLink functionality
Prerna290 May 1, 2024
7a889cd
style: apply active class to selected link
Prerna290 May 1, 2024
e350a8a
style: change model name
Prerna290 May 2, 2024
04c402d
style: increase padding top
Prerna290 May 3, 2024
b551fd5
fix: active style on features-index
Prerna290 May 8, 2024
219e6f8
style: define dataTypes
Prerna290 May 27, 2024
ea4e40f
Merge branch 'test-server' into refactor-features-section
Prerna290 May 28, 2024
6dd1610
style: change the variable name
Prerna290 May 28, 2024
cc6cd20
style: create service for isMobile
Prerna290 May 28, 2024
bd69f6f
Merge branch 'refactor-features-section' of https://github.com/Prerna…
Prerna290 May 28, 2024
67aec25
style: defines sections of know community and build
Prerna290 Jun 3, 2024
4457ee9
style: change path
Prerna290 Jun 3, 2024
dc5537c
style: dataTypeWithFilter function
Prerna290 Jun 3, 2024
b3e66e1
style: dataTypeWithFilter function
Prerna290 Jun 3, 2024
0edaefc
style: add conditions to show sections
Prerna290 Jun 3, 2024
edae380
style: icons in section
Prerna290 Jun 4, 2024
8a009f2
style: use order property to show features in order
Prerna290 Jun 4, 2024
5619145
fix: static assest url
Prerna290 Jun 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/commudle-admin/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ const routes: Routes = [
loadChildren: () =>
import('./feature-modules/public-reading-book/public-reading-book.module').then((m) => m.PublicReadingBookModule),
},
{
path: 'features',
loadChildren: () => import('./feature-modules/features/features.module').then((m) => m.FeaturesModule),
},
{
path: 'case-studies',
loadChildren: () => import('./feature-modules/case-study/case-study.module').then((m) => m.CaseStudyModule),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div *ngIf="selectedFeature" class="feature-content">
<div *ngIf="selectedFeature.image" class="image">
<img
alt="{{ selectedFeature.title }}"
[src]="imageUrl(selectedFeature.image).url()"
title="{{ selectedFeature.title }}"
/>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.feature-content {
@apply md:com-mt-0 md:com-p-0 com-pt-0 com-p-4;
}

img {
@apply com-w-full;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { FeaturesContentComponent } from './features-content.component';

describe('FeaturesContentComponent', () => {
let component: FeaturesContentComponent;
let fixture: ComponentFixture<FeaturesContentComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [FeaturesContentComponent],
}).compileComponents();

fixture = TestBed.createComponent(FeaturesContentComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Component, Input, OnInit } from '@angular/core';
import { IFeature } from 'apps/shared-models/features.model';
import { CmsService } from 'apps/shared-services/cms.service';

@Component({
selector: 'commudle-features-content',
templateUrl: './features-content.component.html',
styleUrls: ['./features-content.component.scss'],
})
export class FeaturesContentComponent implements OnInit {
@Input() selectedFeature: IFeature;
constructor(private cmsService: CmsService) {}

ngOnInit(): void {}

imageUrl(source: any) {
return this.cmsService.getImageUrl(source);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<div class="features">
<nb-card>
<nb-card-body>
<nb-list>
<nb-list-item
*ngFor="let feature of features; let i = index"
class="clickable"
[class.active]="feature.slug.current === selectedFeatureSlug"
>
<div class="feature" (click)="toggleShowAnswers(feature.slug.current, i)">
<div class="feature-item">
<div class="heading">
<div *ngIf="feature.icon" class="logo">
<img alt="{{ feature.title }}" [src]="imageUrl(feature.icon).url()" title="{{ feature.title }}" />
</div>
<h2>
{{ feature.title }}
</h2>
</div>
<div *ngIf="showSubHeading[i] && feature.features" class="sub-heading">
<ul *ngFor="let subheading of feature.features">
<li>{{ subheading }}</li>
</ul>
</div>
</div>
<div *ngIf="feature.features">
<fa-icon [icon]="showSubHeading[i] ? faMinus : faAdd"></fa-icon>
</div>
</div>
<div *ngIf="isMobileView && showSubHeading[i]">
<commudle-features-content [selectedFeature]="selectedFeature"></commudle-features-content>
</div>
</nb-list-item>
</nb-list>
</nb-card-body>
</nb-card>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
.features {
@apply com-w-full md:com-m-0 com-mt-6;
}

nb-card {
@apply com-m-0;

nb-card-body {
@apply com-p-0;
}
nb-list {
nb-list-item {
@apply com-border-t-0 com-p-0 com-flex com-flex-col;
&:last-child {
@apply com-border-b-0;
}

.feature {
@apply com-flex com-flex-row com-justify-between com-items-start com-w-full com-p-6;

h2 {
@apply com-flex com-m-0 com-text-gray-900 com-text-lg com-font-normal com-mr-2 com-no-underline;
}

fa-icon {
@apply com-flex com-justify-end com-text-xl com-font-normal com-text-gray-900 com-mt-1;
}
}

.feature-item {
@apply com-flex com-flex-col com-w-full com-mr-4;
}

.heading {
@apply com-flex com-flex-row md:com-items-center com-items-start md:com-m-0 com-mt-1;

.logo {
@apply com-w-7 com-h-7 com-mr-3;

img {
@apply com-w-full com-h-full;
}
}

h2 {
@apply com-text-xl com-font-normal;
}
}

.sub-heading {
@apply com-flex com-flex-row com-mt-4 com-pt-4 com-border-0 com-border-t com-border-solid com-border-gray-300 com-items-start com-flex-wrap;
ul {
@apply com-m-0;
li {
@apply com-text-lg com-font-normal;
}
}
}
}
}
}
a {
}

.active {
@apply com-bg-Bright-Gray #{!important};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { FeaturesComponent } from './features-index.component';

describe('FeaturesComponent', () => {
let component: FeaturesComponent;
let fixture: ComponentFixture<FeaturesComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [FeaturesComponent],
}).compileComponents();

fixture = TestBed.createComponent(FeaturesComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { faAdd, faMinus } from '@fortawesome/free-solid-svg-icons';
import { IFeature } from 'apps/shared-models/features.model';
import { CmsService } from 'apps/shared-services/cms.service';

@Component({
selector: 'commudle-features-index',
templateUrl: './features-index.component.html',
styleUrls: ['./features-index.component.scss'],
})
export class FeaturesIndexComponent implements OnInit {
@Input() features: IFeature[];
@Input() selectedFeature: IFeature;
@Output() featureSlug: EventEmitter<string> = new EventEmitter<string>();
showSubHeading = [];
Prerna290 marked this conversation as resolved.
Show resolved Hide resolved
faAdd = faAdd;
faMinus = faMinus;
isMobileView: boolean;
selectedFeatureSlug: string;

constructor(private cmsService: CmsService) {}

ngOnInit(): void {
this.isMobileView = window.innerWidth <= 640;
this.featureSlug.emit(this.features[0].slug.current);
this.selectedFeatureSlug = this.features[0].slug.current;
}

imageUrl(source: any) {
return this.cmsService.getImageUrl(source);
}

toggleShowAnswers(slug, index?: number) {
if (slug) {
this.selectedFeatureSlug = slug;
this.featureSlug.emit(slug);
}
for (let i = 0; i < this.showSubHeading.length; i++) {
if (i !== index) {
this.showSubHeading[i] = false;
}
}
this.showSubHeading[index] = !this.showSubHeading[index];
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
<div class="features">
<div class="base-layout">
<div class="container">
<div class="header">
<h1 class="heading"><span>One Stop Solution</span> For Your Developer Communities</h1>
<h2 class="subheading">
We understand the vast engagement needs to build a developer community network for your company.
</h2>
<div class="header-image">
<img [src]="staticAssets.features_page_header.url" class="com-w-full" />
</div>
</div>
<h2 *ngIf="showHeading" class="features-heading">
<a [routerLink]="'.'" fragment="features">Everything Your Developer Community Needs</a>
</h2>
<h2 *ngIf="showSubHeading" class="features-subheading">
Build communities with multiple types of engagements, your search for 'the right platform' ends here.
</h2>
<div class="two-column-layout">
<div class="left-column">
<div *ngIf="features" class="features-index">
<commudle-features-index
[features]="features"
[selectedFeature]="selectedFeature"
(featureSlug)="getFeaturesData($event)"
></commudle-features-index>
</div>
<a [routerLink]="['/pricing']" class="start-now-btn"
><button nbButton status="primary" size="giant" fullWidth class="read-or-download">Start Now</button></a
>
</div>
<div *ngIf="!isMobileView && selectedFeature" class="main-column">
<commudle-features-content [selectedFeature]="selectedFeature"></commudle-features-content>
</div>
</div>
<div class="platform" id="know-your-community">
<h2 class="heading">
<a [routerLink]="'.'" fragment="know-your-community">Know & Grow Your Community Like Never Before</a>
</h2>
<p class="subheading">
With multiple options to engage with your community members, you can gain smarter insights on what the
community needs.
</p>
<commudle-public-page-layout [imageOnLeft]="true">
<div content>
<div class="content">
<div image class="image desktop-hidden">
<img
alt="Know your community"
[src]="staticAssets.features_know_your_community.url"
title="Know your community"
/>
</div>
<ul>
<li>
<div class="icon">
<!-- <fa-icon [icon]="faShapes"></fa-icon> -->
</div>
<div>
<p class="heading">Generative Growth</p>
<p class="subheading">
With thousands of techies already using Commudle, your member base keeps growing with each
activity.
</p>
</div>
</li>
<li>
<div class="icon">
<!-- <fa-icon [icon]="faHandsHoldingCircle"></fa-icon> -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove if not required

</div>
<div>
<p class="heading">Custom Dashboards & API's</p>
<p class="subheading">
Need custom dashboards or API's to integrate with your existing systems? We will build them for
you.
</p>
</div>
</li>
<li>
<div class="icon">
<!-- <fa-icon [icon]="faChartLine"></fa-icon> -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove if not required

</div>
<div>
<p class="heading">Easy Migration</p>
<p class="subheading">
Are you already using a community platform with limited engagements and want to migrate? Our team
will guide you step-by-step on how to do it smoothly.
</p>
</div>
</li>
</ul>
<a [routerLink]="['/pricing']" class="start-now-btn"
><button nbButton status="primary" size="giant" class="read-or-download">Start Now</button></a
>
</div>
</div>
<div image class="image mobile-hidden">
<img
alt="Know your community"
[src]="staticAssets.features_know_your_community.url"
title="Know your community"
/>
</div>
</commudle-public-page-layout>
</div>
<div class="build-community" id="build-community">
<h2 class="heading-build-community">
<a [routerLink]="'.'" fragment="build-community">Build Your Communities with 100,000+ techies on Commudle</a>
</h2>
<div image class="image">
<img
alt="Build your community"
[src]="staticAssets.features_build_your_community.url"
title="Build your community"
/>
</div>
</div>
<div class="faq">
<commudle-faq [answers]="answers" [questions]="questions"></commudle-faq>
</div>
</div>
</div>
</div>
Loading