Skip to content

Commit

Permalink
add testimonial org and logo
Browse files Browse the repository at this point in the history
  • Loading branch information
gautamjajoo committed Aug 7, 2021
1 parent d0bb13c commit 651ce59
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 9 deletions.
11 changes: 10 additions & 1 deletion frontend_v2/src/app/components/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ <h3 class="fw-light center">Sponsors</h3>
</div>
</div>
</section>
<!-- Testimonials Section -->
<section class="ev-container testimonial-wrapper text-med-black ev-super-light-bg">
<div class="grad-container text-med-black">
<div class="row">
Expand All @@ -439,7 +440,15 @@ <h3 class="fw-light center">Testimonials</h3>
<div class="testimonial-body">
<span class="fs-24">{{ testimonialbody }}</span>
</div>
<div class="testimonial-author fs-20">- {{ testimonialauthor }}</div>
<div class="row">
<div class="testimonial-author fs-20">
<img src="../../../assets/images/profile.png" class="logo"/>
<div class="testimonial-details">
<h5 class="name fs-20">{{ testimonialauthor}}</h5>
<span class="orgname fs-18">{{ testimonialorg }}</span>
</div>
</div>
</div>
<img src="assets/images/testimonials/arrow.png" (click)="testimonialNavigate()" class="testimonial-arrow-left" />
<img
src="assets/images/testimonials/arrow.png"
Expand Down
21 changes: 16 additions & 5 deletions frontend_v2/src/app/components/home/home.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ p {
width: 70%;
margin-left: 15%;
padding-top: 120px;
padding-bottom: 100px;
padding-bottom: 50px;
span {
color: #000;
font-weight: $fw-light;
Expand All @@ -113,11 +113,22 @@ p {
}

.testimonial-author {
color: #000;
font-weight: $fw-regular;
padding-bottom: 70px;
text-align: right;
padding-right: 15vw;
text-align: left;
display: flex;
align-items: center;
justify-content: center;
.logo {
height: 100px;
width: 100px;
}
.testimonial-details {
margin-left: 15px;
}
.name {
margin: 0;
padding-bottom: 5px;
}
}

.testimonial-arrow-left {
Expand Down
14 changes: 11 additions & 3 deletions frontend_v2/src/app/components/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ export class HomeComponent implements OnInit, AfterViewInit, OnDestroy {
* Sample testimonials till the API comes up
*/
testimonials = [
{ text: '1-' + this.ipsum, author: 'Lorem' },
{ text: '2-' + this.ipsum, author: 'Octopus' },
{ text: '3-' + this.ipsum, author: 'Penguin' },
{ text: '1-' + this.ipsum, author: 'Lorem', org: 'Georgia Tech', image:'' },
{ text: '2-' + this.ipsum, author: 'Octopus', org: 'Google', image:'' },
{ text: '3-' + this.ipsum, author: 'Penguin', org: 'Facebook', image:'' },
];

/**
Expand All @@ -53,6 +53,11 @@ export class HomeComponent implements OnInit, AfterViewInit, OnDestroy {
*/
testimonialauthor = this.testimonials[this.selected]['author'];

/**
* Selected testimonial orgName
*/
testimonialorg = this.testimonials[this.selected]['org'];

/**
* Subscribe Form
*/
Expand Down Expand Up @@ -180,6 +185,7 @@ export class HomeComponent implements OnInit, AfterViewInit, OnDestroy {
const a = this.document.getElementsByClassName('testimonial-body')[0];
const b = this.document.getElementsByClassName('testimonial-author')[0];
const c = this.document.getElementsByClassName('testimonial-quotes')[0];
const d = this.document.getElementsByClassName('testimonial-org')[0];
if (direction === 'left') {
this.testimonialLeft();
} else {
Expand All @@ -189,6 +195,7 @@ export class HomeComponent implements OnInit, AfterViewInit, OnDestroy {
this.disappearAppear(a, this);
this.disappearAppear(b, this);
this.disappearAppear(c, this);
this.disappearAppear(d, this);
}

/**
Expand All @@ -199,6 +206,7 @@ export class HomeComponent implements OnInit, AfterViewInit, OnDestroy {
setTimeout(function () {
scope.testimonialbody = scope.testimonials[scope.selected]['text'];
scope.testimonialauthor = scope.testimonials[scope.selected]['author'];
scope.testimonialorg = scope.testimonials[scope.selected]['org'];
element.style.marginLeft = '15%';
}, 1000);
};
Expand Down

0 comments on commit 651ce59

Please sign in to comment.