Skip to content

Commit

Permalink
Merge pull request #7 from axherrm/feat/contact_footer
Browse files Browse the repository at this point in the history
feat: Sections contact & footer
  • Loading branch information
axherrm authored Feb 1, 2024
2 parents 7b83af8 + 36d4374 commit e948d4d
Show file tree
Hide file tree
Showing 28 changed files with 820 additions and 29 deletions.
13 changes: 11 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
"@angular/compiler": "^17.0.7",
"@angular/core": "^17.0.7",
"@angular/forms": "^17.0.7",
"@angular/material": "^17.0.7",
"@angular/platform-browser": "^17.0.7",
"@angular/platform-browser-dynamic": "^17.0.7",
"@angular/router": "^17.0.7",
"@angular/material": "^17.0.7",
"@emailjs/browser": "^3.12.1",
"@studio-freight/lenis": "^1.0.33",
"gsap": "^3.12.2",
"js-circle-progress": "^1.0.0-beta.0",
Expand Down
8 changes: 5 additions & 3 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<main #outest_container>
<main #outest_container style="position: relative;">
<div #backgroundImg id="background-img">
<!-- <img-->
<!-- srcset= "../assets/avatar_600.png 600w,-->
Expand Down Expand Up @@ -28,7 +28,7 @@ <h2 id="main-subheading" [innerHTML]="dataService.languagePack.subheading"></h2>
</div>
</div>

<div id="perspective-div" style="perspective: 10000px; display: flex; flex-direction: column; align-items: center">
<div id="perspective-div" style="display: flex; flex-direction: column; align-items: center">
<!-- [class.rotated]="sidebar.hovered" -->
<div class="content-container">
<heading-card #education_card id="education-start" [heading]="dataService.languagePack.education" type="light" styleClass="alarm-clock-animated"></heading-card>
Expand Down Expand Up @@ -70,7 +70,9 @@ <h2 id="main-subheading" [innerHTML]="dataService.languagePack.subheading"></h2>

<about></about>

<div class="spacer" style="width: 100vw; height: 50vh"></div>
<heading-card id="contact-start" [heading]="dataService.languagePack.contact" type="3" styleClass="alarm-clock-animated" style="margin-top: 5vh"></heading-card>
<contact></contact>
</div>
</div>
<footer-section></footer-section>
</main>
2 changes: 1 addition & 1 deletion src/app/app.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

// for rotation
position: relative;
transform-style: preserve-3d;
//transform-style: preserve-3d; // breaks background-attachment: fixed see https://bugzilla.mozilla.org/show_bug.cgi?id=1352915
transform-origin: left;
transition: all .6s ease-in-out;
&.rotated {
Expand Down
6 changes: 5 additions & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import {AboutComponent} from "./sections/about/about.component";
gsap.registerPlugin(ScrollTrigger);

import "./js/lenis.js";
import {ContactComponent} from "./sections/contact/contact.component";
import {FooterSectionComponent} from "./sections/footer-section/footer-section.component";

@Component({
selector: 'app-root',
Expand All @@ -37,7 +39,9 @@ import "./js/lenis.js";
NavbarDotComponent,
SidebarComponent,
AboutCardComponent,
AboutComponent
AboutComponent,
ContactComponent,
FooterSectionComponent
],
templateUrl: './app.component.html',
styleUrl: './app.component.scss'
Expand Down
13 changes: 0 additions & 13 deletions src/app/components/badge/badge.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,7 @@
max-height: 100%;
display: flex;
align-items: center;
//margin-right: 0.3rem;
//max-height: 2.25rem;
//height: 100%;
//width: auto;
font-size: 2rem;

object {
//height: 100%;
//width: auto;
}

//img {
// height: 100%;
//}
}

.text {
Expand Down
12 changes: 12 additions & 0 deletions src/app/components/chat-row/chat-row.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<div class="img-container" [class.hidden]="followingMessage">
<img *ngIf="isLeft()" src="../../../assets/chat-avatar/avatar.png" height="210" width="210" alt="">
<img *ngIf="!isLeft()" src="../../../assets/chat-avatar/anonymous.svg" alt="">
</div>
<!--<div class="triangle background-gradient"></div>-->
<div class="fake-triangle" [class.hidden]="followingMessage" [class.not-received]="!sent"></div>
<div class="message-box" [class.not-received]="!sent" [innerHTML]="text">
<!-- <ng-content></ng-content>-->
</div>



151 changes: 151 additions & 0 deletions src/app/components/chat-row/chat-row.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
:host {
position: relative;
display: flex;
width: 70%;
margin-top: 1.2rem;
flex-wrap: nowrap;
justify-content: flex-start;
align-items: flex-start;
min-height: var(--1-row-height);

--1-row-height: 5rem;
--triangle-width: 1.25rem;
--triangle-height: 1rem;

// Chat animation
animation-name: show-chat;
animation-duration: 0.5s;
animation-timing-function: ease-in;
animation-delay: 0s;

&.left {
transform-origin: left bottom;
flex-direction: row;

.triangle {
margin-left: 1.5rem;
border-bottom: var(--triangle-height) solid transparent;
border-right: var(--triangle-width) solid rgba(226, 38, 255, 0.8);
}

.fake-triangle {
background: #a445b2;
transform: translateX(1.4rem) rotateZ(45deg);
}
}

&.right {
transform-origin: right bottom;
flex-direction: row-reverse;
align-self: flex-end;

.triangle {
margin-right: 1.5rem;
border-bottom: var(--triangle-height) solid transparent;
border-left: var(--triangle-width) solid rgba(226, 38, 255, 0.8);
}

.fake-triangle {
background: #fa4299;
transform: translateX(-1.4rem) rotateZ(-45deg);
}
}

&.following-message {
margin-top: 0.3rem;
}
}

.img-container {
height: var(--1-row-height);
width: auto;
aspect-ratio: 1;
flex-shrink: 0;

img {
width: 100%;
height: 100%;
border-radius: 50%;
}
}

.message-box {
position: relative;
align-self: center;
background: linear-gradient(90deg, #a445b2, #fa4299);
border-radius: 1rem;
padding: 1.5rem;
text-align: left;

&.not-received {
filter: brightness(0.5);
}
}

.triangle {
margin-top: calc((var(--1-row-height) - var(--triangle-height)) / 2);
width: 0;
height: 0;
}

.fake-triangle {
position: relative;
margin-top: calc((var(--1-row-height)) / 2 - 1rem);
width: 2rem;
height: 2rem;
flex-shrink: 0;
background: #a445b2;
border-radius: 0.4rem;

&.not-received {
filter: brightness(0.5);
}
}

.hidden {
visibility: hidden;
}

// for real gradient on multiple elements, see: https://codepen.io/axherrm/pen/YzgYEeL
//.background-gradient {
// background-image: linear-gradient(90deg, #a445b2, #fa4299);
// background-repeat: no-repeat;
// background-attachment: fixed;
//}

//@keyframes show-chat-left {
// 0% {
// //margin-left: -50%;
// //margin-top: 6rem;
// //transform: scale(0.1);
// //transform: translateX(-70%) translateY(50%) scale(0.1);
// transform: translateX(-70%) scale(0.1);
// }
// //80% {
// // //transform: translateX(-5%) translateY(30%);
// // transform: translateX(-5%) translateY(30%);
// //}
// //90% {
// // transform: translateY(20%);
// //}
// 100% {
// //margin-left: 0;
// //margin-top: 0;
// transform: none;
// }
//}

@keyframes show-chat {
0% {
opacity: 0;
transform: scale(0);
}
80% {
opacity: 0.9;
transform: scale(0.9);
}
100% {
opacity: 1;
transform: none;
}
}
34 changes: 34 additions & 0 deletions src/app/components/chat-row/chat-row.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import {Component, HostBinding, Input} from '@angular/core';
import {NgIf} from "@angular/common";

@Component({
selector: 'chat-row',
standalone: true,
imports: [
NgIf
],
templateUrl: './chat-row.component.html',
styleUrl: './chat-row.component.scss'
})
export class ChatRowComponent {

@Input() text: string;
@Input() side: "left" | "right" = "left";
/**
* Whether a message is not the first message on the same side of the chat.
*/
@Input() @HostBinding("class.following-message") followingMessage: boolean = false;
/**
* Whether the message is sent successfully. Not sent message are styled differently.
*/
@Input() sent: boolean = true;

// @HostBinding("style.flex-direction") flexDirection: string = "row";
@HostBinding("class.left") get left() { return this.isLeft() }
@HostBinding("class.right") get right() { return !this.isLeft() }

isLeft(): boolean {
return this.side === "left";
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<a [href]="input.link" target="_blank" class="container">
<div class="icon-container">
<span *ngIf="input.primeIcon" [class]="'pi icon ' + input.primeIcon"></span>
<div *ngIf="input.iconRef" class="icon">
<img [src]="input.iconRef" alt="" height="32">
</div>
</div>

<div class="username" [innerHTML]="input.username"></div>
<div class="category">{{ input.category }}</div>
</a>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.container {
border-radius: 1.5rem;
padding: 3rem;
background: #262626;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-start;

color: white;
//max-width: 20vw;
}

.icon-container {
background: black;
height: 4rem;
width: 4rem;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
.icon {
aspect-ratio: 1;
color: white;
font-size: 1.7rem;
//display: flex;
//align-items: center;
}
margin-bottom: 3rem;
}

.username {
font-size: 1.6rem;
text-align: right;
}

.category {
margin-top: 1rem;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import {Component, Input} from '@angular/core';
import {SocialMediaItem} from "../../data/model";
import {NgIf} from "@angular/common";

@Component({
selector: 'social-media-card',
standalone: true,
imports: [
NgIf
],
templateUrl: './social-media-card.component.html',
styleUrl: './social-media-card.component.scss'
})
export class SocialMediaCardComponent {

@Input({required: true}) input: SocialMediaItem;

}
Loading

0 comments on commit e948d4d

Please sign in to comment.