Compare commits

..

4 Commits

Author SHA1 Message Date
2de779d90c refator style defs for home template
All checks were successful
continuous-integration/drone/push Build is passing
2025-04-03 23:08:32 -04:00
6d9a9a2439 add animations to template 2025-04-03 23:08:02 -04:00
e6ea47d764 import animations to home comp 2025-04-03 23:07:25 -04:00
404809025d add slideIn and wobble animations 2025-04-03 23:06:50 -04:00
4 changed files with 82 additions and 9 deletions

View File

@@ -0,0 +1,42 @@
import { animate, keyframes, query, stagger, style, transition, trigger } from '@angular/animations';
export const slidInAnimations = [
trigger('slideIn', [
transition(':enter', [
style({ overflow: 'hidden' }),
query('p, h1, h2, h3, h4, h5, h6, span, a', [
style({ opacity: 0, transform: 'translateY(20px)' }),
stagger(100, [animate('800ms ease-out', style({ opacity: 1, transform: 'translateY(0)' }))]),
]),
]),
]),
];
export const wobbleAnimation = [
trigger('wobble', [
transition('* => *', [
animate(
'5s',
keyframes([
style({ borderRadius: '50%', offset: 0 }),
style({ borderRadius: '80% 10%', offset: 0.2 }),
style({ borderRadius: '60% 30%', offset: 0.3 }),
style({ borderRadius: '50%', offset: 0.5 }),
style({ borderRadius: '30% 60%', offset: 0.7 }),
style({ borderRadius: '10% 80%', offset: 0.8 }),
style({ borderRadius: '50%', offset: 1 }),
])
// keyframes([
// style({ borderRadius: '50%', offset: 0 }),
// style({ borderRadius: '10% 20%', offset: 0.15 }),
// style({ borderRadius: '30% 10%', offset: 0.3 }),
// style({ borderRadius: '20% ', offset: 0.45 }),
// style({ borderRadius: '30% 10% ', offset: 0.6 }),
// style({ borderRadius: '30% ', offset: 0.75 }),
// style({ borderRadius: '70% 20%', offset: 0.9 }),
// style({ borderRadius: '50%', offset: 1 }),
// ])
),
]),
]),
];

View File

@@ -1,5 +1,9 @@
<section class="intro">
<span class="intro__img"></span>
<section class="intro" [@slideIn]>
<div class="intro__img-container">
<!-- <div class="intro__circle intro__circle--large"></div> -->
<div class="intro__circle intro__circle--large" [@wobble]="isWobbling" (@wobble.done)="onwobbleDone()"></div>
<div class="intro__circle intro__circle--small"></div>
</div>
<h1 class="intro__header">Hi 👋, I'm Raghu Chagarlamudi</h1>
<p class="intro__sub-head">I am a well-versed front-end web developer with extensive experience in building delightful and scalable web applications.</p>
<a mat-fab extended href="https://www.google.com/" target="_blank" class="intro__button">Get to Know More About Me</a>

View File

@@ -3,14 +3,33 @@
justify-content: center;
flex-direction: column;
align-items: center;
padding: 1rem;
&__img {
display: block;
height: 300px;
width: 300px;
&__img-container {
position: relative;
width: 208px;
height: 208px;
}
&__circle {
position: absolute;
border-radius: 50%;
&--large {
height: 208px;
width: 208px;
background-color: var(--mat-sys-primary);
}
&--small {
height: 200px;
width: 200px;
background-image: url("../../assests/images/rc-logo.jpeg");
background-size: cover;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
&__header {

View File

@@ -2,6 +2,7 @@ import { Component } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
import { slidInAnimations, wobbleAnimation } from '../animations/animations';
@Component({
standalone: true,
@@ -9,5 +10,12 @@ import { MatIconModule } from '@angular/material/icon';
imports: [MatButtonModule, MatIconModule],
templateUrl: './home.component.html',
styleUrl: './home.component.scss',
animations: [slidInAnimations, wobbleAnimation],
})
export class HomeComponent {}
export class HomeComponent {
isWobbling = true;
onwobbleDone() {
this.isWobbling = !this.isWobbling;
}
}