Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
fatihturker committed Sep 6, 2021
2 parents 66696fb + a5dcd20 commit cf3eba3
Show file tree
Hide file tree
Showing 10 changed files with 137 additions and 159 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,38 +26,18 @@
[style.border-color]="option.style.themeColor"
/>
<div class="footer-social">
<a
[href]="option.reviewer.social.twitter"
target="_blank"
aria-label="twitter"
rel="noopener"
>
<i
aria-hidden="true"
[style.color]="option.style.themeColor"
[class]="
'fab fa-' +
environmentCommon.website.twitter.cssClass +
' fa-2x fa-fw'
"
></i>
</a>
<a
[href]="option.reviewer.social.linkedIn"
target="_blank"
aria-label="linkedin"
rel="noopener"
>
<i
aria-hidden="true"
[style.color]="option.style.themeColor"
[class]="
'fab fa-' +
environmentCommon.website.linkedin.cssClass +
' fa-2x fa-fw'
"
></i>
</a>
<app-ext-link [href]="option.reviewer.social.twitter">
<i body aria-hidden="true"
[style.color]="option.style.themeColor"
[class]="'fab fa-' + environmentCommon.website.twitter.cssClass + ' fa-2x fa-fw'">
</i>
</app-ext-link>
<app-ext-link [href]="option.reviewer.social.linkedIn">
<i body aria-hidden="true"
[style.color]="option.style.themeColor"
[class]="'fab fa-' + environmentCommon.website.linkedin.cssClass + ' fa-2x fa-fw'">
</i>
</app-ext-link>
</div>
<div class="reviewer">
<p class="reviewer-name">{{option.reviewer.name}}</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Component, Input } from "@angular/core";
import { environment } from "src/environments/environment";
import { environmentCommon } from "src/environments/environment-common";
import { URLS } from "../../../../data/constant";
import { ThemeService } from "../../../../service/theme/theme.service";
import { Component, Input } from '@angular/core';
import { environment } from 'src/environments/environment';
import { environmentCommon } from 'src/environments/environment-common';
import { URLS } from '../../../../data/constant';
import { ThemeService } from '../../../../service/theme/theme.service';

export interface TestimonialOption {
review: string;
Expand All @@ -20,37 +20,38 @@ export interface TestimonialOption {
};
}

@Component({
selector: "app-testimonial-card",
templateUrl: "./testimonial-card.component.html",
styleUrls: ["./testimonial-card.component.scss"],
})
@Component( {
selector: 'app-testimonial-card',
templateUrl: './testimonial-card.component.html',
styleUrls: [ './testimonial-card.component.scss' ],
} )
export class TestimonialCardComponent {
URLS = URLS;

environment = environment;
environmentCommon = environmentCommon;

brand = {
brandLogo: "",
brandLogo: '',
};

@Input() option: TestimonialOption = {
review:
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse in elit blandit, tempus risus vitae, elementum eros. Suspendisse nec orci at neque molestie dignissim. ",
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse in elit blandit, tempus risus vitae, elementum eros. Suspendisse nec orci at neque molestie dignissim. ',
reviewer: {
name: "Open Template Hub",
title: "Co-Founder",
photoUri: "",
name: 'Open Template Hub',
title: 'Co-Founder',
photoUri: '',
social: {
linkedIn: '',
twitter: '',
},
},
style: {
themeColor: "var(--brand-color-lighter-2)",
themeColor: 'var(--brand-color-lighter-2)',
},
};

constructor(private themeService: ThemeService) {}
constructor( private themeService: ThemeService ) {
}
}
2 changes: 1 addition & 1 deletion src/app/component/common/ext-link/ext-link.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class ExtLinkComponent {
queryParams: {
href: this.href,
website: this.website,
info: 'You are about to leave this website. Please remember don\'t click on unknown links or download unverified software.'
info: 'You are about to leave this website. Please remember, don\'t click on unknown links or download unverified software.'
}
} );
} else {
Expand Down
156 changes: 78 additions & 78 deletions src/app/page/raw-landing-layout/home/home.component.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
import { AfterViewInit, Component } from "@angular/core";
import { FormBuilder } from "@angular/forms";
import { Router } from "@angular/router";
import { CountUp } from "countup.js";
import { environment } from "../../../../environments/environment";
import { environmentCommon } from "../../../../environments/environment-common";
import { TestimonialOption } from "../../../component/common/card/testimonial-card/testimonial-card.component";
import { Partner } from "../../../component/common/swiper-wrapper/swiper-wrapper.component";
import { PARTNERS, URLS } from "../../../data/constant";
import { AuthenticationService } from "../../../service/auth/authentication.service";
import { ThemeService } from "../../../service/theme/theme.service";

@Component({
selector: "app-home",
templateUrl: "./home.component.html",
styleUrls: ["./home.component.scss", "../raw-landing-layout.component.scss"],
})
import { AfterViewInit, Component } from '@angular/core';
import { FormBuilder } from '@angular/forms';
import { Router } from '@angular/router';
import { CountUp } from 'countup.js';
import { environment } from '../../../../environments/environment';
import { environmentCommon } from '../../../../environments/environment-common';
import { TestimonialOption } from '../../../component/common/card/testimonial-card/testimonial-card.component';
import { Partner } from '../../../component/common/swiper-wrapper/swiper-wrapper.component';
import { PARTNERS, URLS } from '../../../data/constant';
import { AuthenticationService } from '../../../service/auth/authentication.service';
import { ThemeService } from '../../../service/theme/theme.service';

@Component( {
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: [ './home.component.scss', '../raw-landing-layout.component.scss' ],
} )
export class HomeComponent implements AfterViewInit {
downloadCounter = 6100;
serverTypesCounter = 5;
uiTypesCounter = 3;

brand = {
brandLogo: "",
brandLogo: '',
};

URLS = URLS;
Expand All @@ -35,61 +35,61 @@ export class HomeComponent implements AfterViewInit {

option1: TestimonialOption = {
review:
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse in elit blandit, tempus risus vitae, elementum eros. Suspendisse nec orci at neque molestie dignissim. ",
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse in elit blandit, tempus risus vitae, elementum eros. Suspendisse nec orci at neque molestie dignissim. ',
reviewer: {
name: "Furkan Yavuz",
title: "Co-Founder @ Open Template Hub",
name: 'Furkan Yavuz',
title: 'Co-Founder @ Open Template Hub',
photoUri:
"https://avatars0.githubusercontent.com/u/2248168?s=460&u=435ef6ade0785a7a135ce56cae751fb3ade1d126&v=4",
'https://avatars0.githubusercontent.com/u/2248168?s=460&u=435ef6ade0785a7a135ce56cae751fb3ade1d126&v=4',
social: {
linkedIn: "https://www.linkedin.com/in/furkanyavuz",
twitter: "https://twitter.com/codigrate",
linkedIn: 'https://www.linkedin.com/in/furkanyavuz',
twitter: 'https://twitter.com/furknyavuz',
},
},
style: { themeColor: "var(--warn)" },
style: { themeColor: 'var(--warn)' },
};

option2: TestimonialOption = {
review:
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse in elit blandit, tempus risus vitae, elementum eros. Suspendisse nec orci at neque molestie dignissim. ",
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse in elit blandit, tempus risus vitae, elementum eros. Suspendisse nec orci at neque molestie dignissim. ',
reviewer: {
name: "Fatih Türker",
title: "Co-Founder @ Open Template Hub",
name: 'Fatih Türker',
title: 'Co-Founder @ Open Template Hub',
photoUri:
"https://avatars1.githubusercontent.com/u/2202179?s=460&u=261b1129e7106c067783cb022ab9999aad833bdc&v=4",
'https://avatars1.githubusercontent.com/u/2202179?s=460&u=261b1129e7106c067783cb022ab9999aad833bdc&v=4',
social: {
linkedIn: "https://www.linkedin.com/in/fatihtrker",
twitter: "https://twitter.com/remoklify",
linkedIn: 'https://www.linkedin.com/in/fatihtrker',
twitter: 'https://twitter.com/remoklify',
},
},
style: { themeColor: "var(--error)" },
style: { themeColor: 'var(--error)' },
};

option3: TestimonialOption = {
review:
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse in elit blandit, tempus risus vitae, elementum eros. Suspendisse nec orci at neque molestie dignissim. ",
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse in elit blandit, tempus risus vitae, elementum eros. Suspendisse nec orci at neque molestie dignissim. ',
reviewer: {
name: "Mert Saraç",
title: "Software Developer @ Open Template Hub",
name: 'Mert Saraç',
title: 'Software Developer @ Open Template Hub',
photoUri:
"https://avatars1.githubusercontent.com/u/38442589?s=400&u=aa3cda11724fc297a0bfa6beb35c9be81687cf3c&v=4",
'https://avatars1.githubusercontent.com/u/38442589?s=400&u=aa3cda11724fc297a0bfa6beb35c9be81687cf3c&v=4',
social: {
linkedIn: "",
twitter: "",
linkedIn: 'https://www.linkedin.com/in/mertlsarac',
twitter: 'https://twitter.com/mertlsarac',
},
},
style: { themeColor: "var(--info)" },
style: { themeColor: 'var(--info)' },
};

constructor(
private formBuilder: FormBuilder,
public router: Router,
private authenticationService: AuthenticationService,
private themeService: ThemeService
private formBuilder: FormBuilder,
public router: Router,
private authenticationService: AuthenticationService,
private themeService: ThemeService
) {
// redirect to home if already logged in
if (this.authenticationService.currentUserValue) {
this.router.navigate([URLS.dashboard.root]);
if ( this.authenticationService.currentUserValue ) {
this.router.navigate( [ URLS.dashboard.root ] );
}

this.brand = this.themeService.brand;
Expand All @@ -106,83 +106,83 @@ export class HomeComponent implements AfterViewInit {
formattingFn: undefined,
};

options.formattingFn = (n: number) => {
return this.countUpFormatter(n, this.downloadCounter);
options.formattingFn = ( n: number ) => {
return this.countUpFormatter( n, this.downloadCounter );
};

if (this.downloadCounter < this.KILO) {
if ( this.downloadCounter < this.KILO ) {
options.duration = 2;
} else if (this.downloadCounter < this.MILLION) {
} else if ( this.downloadCounter < this.MILLION ) {
options.duration = 3;
} else {
options.duration = 4;
}

const eventCountUp = new CountUp(
"npmCounterElement",
this.downloadCounter,
options
'npmCounterElement',
this.downloadCounter,
options
);

options.formattingFn = (n: number) => {
return this.countUpFormatter(n, this.serverTypesCounter);
options.formattingFn = ( n: number ) => {
return this.countUpFormatter( n, this.serverTypesCounter );
};
if (this.serverTypesCounter < this.KILO) {
if ( this.serverTypesCounter < this.KILO ) {
options.duration = 2;
} else if (this.serverTypesCounter < this.MILLION) {
} else if ( this.serverTypesCounter < this.MILLION ) {
options.duration = 3;
} else {
options.duration = 4;
}

const studentCountUp = new CountUp(
"githubStarCounterElement",
this.serverTypesCounter,
options
'githubStarCounterElement',
this.serverTypesCounter,
options
);

options.formattingFn = (n: number) => {
return this.countUpFormatter(n, this.uiTypesCounter);
options.formattingFn = ( n: number ) => {
return this.countUpFormatter( n, this.uiTypesCounter );
};
if (this.uiTypesCounter < this.KILO) {
if ( this.uiTypesCounter < this.KILO ) {
options.duration = 2;
} else if (this.uiTypesCounter < this.MILLION) {
} else if ( this.uiTypesCounter < this.MILLION ) {
options.duration = 3;
} else {
options.duration = 4;
}

const userCountUp = new CountUp(
"serverTypesCounterElement",
this.uiTypesCounter,
options
'serverTypesCounterElement',
this.uiTypesCounter,
options
);

if (!eventCountUp.error) {
if ( !eventCountUp.error ) {
eventCountUp.start();
} else {
console.error(eventCountUp.error);
console.error( eventCountUp.error );
}
if (!studentCountUp.error) {
if ( !studentCountUp.error ) {
studentCountUp.start();
} else {
console.error(studentCountUp.error);
console.error( studentCountUp.error );
}
if (!userCountUp.error) {
if ( !userCountUp.error ) {
userCountUp.start();
} else {
console.error(userCountUp.error);
console.error( userCountUp.error );
}
}

countUpFormatter(n: number, lastNumber: number) {
if (n < this.KILO) {
return n + "";
countUpFormatter( n: number, lastNumber: number ) {
if ( n < this.KILO ) {
return n + '';
} else {
if (n < this.MILLION) {
return Math.round((n / this.KILO) * 10) / 10 + "k";
if ( n < this.MILLION ) {
return Math.round( ( n / this.KILO ) * 10 ) / 10 + 'k';
} else {
return Math.round((n / this.MILLION) * 10) / 10 + "M";
return Math.round( ( n / this.MILLION ) * 10 ) / 10 + 'M';
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@
<p>
{{error}}
</p>
<i aria-hidden="true" class="fas fa-exclamation-triangle fa-lg fa-fw"></i>
</div>
</div>
4 changes: 0 additions & 4 deletions src/app/page/splash-layout/callback/callback.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@
animation: splash-loading-bar 1.5s infinite ease;
}

.splash-content .alert-with-icon {
margin-top: 22px;
}

// Social

.twitter.splash-loading-bar {
Expand Down
Loading

0 comments on commit cf3eba3

Please sign in to comment.