-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from axherrm/feat/contact_footer
feat: Sections contact & footer
- Loading branch information
Showing
28 changed files
with
820 additions
and
29 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | ||
} | ||
|
||
} |
11 changes: 11 additions & 0 deletions
11
src/app/components/social-media-card/social-media-card.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
39 changes: 39 additions & 0 deletions
39
src/app/components/social-media-card/social-media-card.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
18 changes: 18 additions & 0 deletions
18
src/app/components/social-media-card/social-media-card.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
|
||
} |
Oops, something went wrong.