Merge pull request #43 from itzMiney/development
Style updates and code optimization
This commit is contained in:
21 files changed
+308
-175
No files matched your search
+1
-1
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
"SOCIALS_SUB": "Man kann mich an vielen Orten finden",
|
"SOCIALS_SUB": "Man kann mich an vielen Orten finden",
|
||||||
"SOCIALS_GAMES": "Spiele",
|
"SOCIALS_GAMES": "Spiele",
|
||||||
"SOCIALS_COMMS": "Spenden und Freelance Aufträge",
|
"SOCIALS_COMMS": "Spenden",
|
||||||
|
|
||||||
"SERVS_TITLE": "Leistungen",
|
"SERVS_TITLE": "Leistungen",
|
||||||
"SERVS": "Willkommen!<br><br>Hier kannst du Freelance-Leistungen von mir in Web-Development and Design beauftragen!<br> Sieh dir auch gerne mein <a href='/portfolio'>Portfolio</a> an um meine bisherige Arbeiten zu betrachten. Wenn dir gefällt was ich tue, würde ich mich sehr freuen über einen Auftrag von dir zu einer der Leistungen die ich hier anbiete!<br>Wenn du dich interressierst, schick mir gerne eine E-Mail an <a href=\"mailto:michael@itzminey.dev\">michael@itzminey.dev</a> mit der Leistung die du beantragen willst, zusammen mit allen relevanten Details und Spezifikationen.<br>Bitte kontaktiere mich auch unter der oben genannten E-Mail-Adresse oder über die Kontaktschaltfläche unten, um einen genauen Kostenvoranschlag zu erhalten oder ein individuelles Pauschalpaket zu besprechen, das auf deine spezifischen Bedürfnisse zugeschnitten ist.",
|
"SERVS": "Willkommen!<br><br>Hier kannst du Freelance-Leistungen von mir in Web-Development and Design beauftragen!<br> Sieh dir auch gerne mein <a href='/portfolio'>Portfolio</a> an um meine bisherige Arbeiten zu betrachten. Wenn dir gefällt was ich tue, würde ich mich sehr freuen über einen Auftrag von dir zu einer der Leistungen die ich hier anbiete!<br>Wenn du dich interressierst, schick mir gerne eine E-Mail an <a href=\"mailto:michael@itzminey.dev\">michael@itzminey.dev</a> mit der Leistung die du beantragen willst, zusammen mit allen relevanten Details und Spezifikationen.<br>Bitte kontaktiere mich auch unter der oben genannten E-Mail-Adresse oder über die Kontaktschaltfläche unten, um einen genauen Kostenvoranschlag zu erhalten oder ein individuelles Pauschalpaket zu besprechen, das auf deine spezifischen Bedürfnisse zugeschnitten ist.",
|
||||||
|
|||||||
+1
-1
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
"SOCIALS_SUB": "You can find me in a lotta places",
|
"SOCIALS_SUB": "You can find me in a lotta places",
|
||||||
"SOCIALS_GAMES": "Games",
|
"SOCIALS_GAMES": "Games",
|
||||||
"SOCIALS_COMMS": "Donations & Commissions",
|
"SOCIALS_COMMS": "Donations",
|
||||||
|
|
||||||
"SERVS_TITLE": "My Services",
|
"SERVS_TITLE": "My Services",
|
||||||
"SERVS": "Welcome!<br><br>Here is where I offer freelance services in web development and design!<br> Feel free to check out my <a href='/portfolio'>Portfolio</a> to see some of my previous work. If you like what I do consider commissioning my services that I offer for various prices and tiers here on this site!<br>If you're interested, feel free to email me at <a href=\"mailto:michael@itzminey.dev\">michael@itzminey.dev</a> with the service you're requesting, along with any relevant details and specifications.<br>Please also contact me at the above mail or with the contact button below for a precise estimate or to discuss a customized flat-rate package tailored to your specific needs.",
|
"SERVS": "Welcome!<br><br>Here is where I offer freelance services in web development and design!<br> Feel free to check out my <a href='/portfolio'>Portfolio</a> to see some of my previous work. If you like what I do consider commissioning my services that I offer for various prices and tiers here on this site!<br>If you're interested, feel free to email me at <a href=\"mailto:michael@itzminey.dev\">michael@itzminey.dev</a> with the service you're requesting, along with any relevant details and specifications.<br>Please also contact me at the above mail or with the contact button below for a precise estimate or to discuss a customized flat-rate package tailored to your specific needs.",
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ a {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.about-header h1 {
|
.about-header h1 {
|
||||||
font-size: 5rem;
|
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
background: linear-gradient(45deg, #c3acff 0%, #a6ffb0 100%);
|
background: linear-gradient(45deg, #c3acff 0%, #a6ffb0 100%);
|
||||||
@@ -121,7 +120,6 @@ a {
|
|||||||
.about-content {
|
.about-content {
|
||||||
max-width: 900px;
|
max-width: 900px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 0 25px;
|
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
}
|
}
|
||||||
@@ -158,29 +156,29 @@ a {
|
|||||||
|
|
||||||
.terminal-bg {
|
.terminal-bg {
|
||||||
background: #1b1920;
|
background: #1b1920;
|
||||||
padding: 2px 22px 11px 22px;
|
padding: 8px 22px 11px 22px;
|
||||||
margin: 0 0 80px 0;
|
margin: 0 0 80px 0;
|
||||||
border-radius: 0 0 20px 20px;
|
border-radius: 0 0 20px 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.terminal-bg h2 {
|
.terminal-bg h2 {
|
||||||
line-height: 0.5;
|
line-height: 1.2;
|
||||||
|
margin: 8px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.terminal-bg a.secret {
|
.terminal-bg a.secret {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
::ng-deep.terminal-bg a {
|
.terminal-bg a {
|
||||||
color: #cb84df;
|
color: #cb84df;
|
||||||
}
|
}
|
||||||
|
|
||||||
::ng-deep.terminal-bg p {
|
.terminal-bg p {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cursorblink {
|
.cursorblink {
|
||||||
margin-left: 8px;
|
|
||||||
animation: cursorBlink 1.25s infinite;
|
animation: cursorBlink 1.25s infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<div class="height-container">
|
<div class="height-container">
|
||||||
<div class="about-header">
|
<div class="about-header">
|
||||||
<div class="title-box">
|
<div class="title-box">
|
||||||
<h1><code>itzMiney</code></h1>
|
<h1 [ngStyle]="{'font-size': isMobile ? '4rem' : '5rem'}"><code>itzMiney</code></h1>
|
||||||
<p class="subtitle">{{ 'ABOUT_SUB' | translate}}</p>
|
<p class="subtitle">{{ 'ABOUT_SUB' | translate}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="down-arrow" (click)="scrollDown()">
|
<div class="down-arrow" (click)="scrollDown()">
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
<div class="separator"></div>
|
<div class="separator"></div>
|
||||||
<section id="content"></section>
|
<section id="content"></section>
|
||||||
<div class="about-container">
|
<div class="about-container">
|
||||||
<div class="about-content">
|
<div class="about-content" [ngStyle]="{'padding': isMobile ? '0 10px;' : '0 25px'}">
|
||||||
<div class="terminal-title">
|
<div class="terminal-title">
|
||||||
<div class="window-title"><p><code>Konsole</code></p></div> <div class="window-buttons"><p>🟡 🟣 🔴</p></div>
|
<div class="window-title"><p><code>Konsole</code></p></div> <div class="window-buttons"><p>🟡 🟣 🔴</p></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h2>$<span class="cursorblink">█</span></h2>
|
<h2>$ <span class="cursorblink">█</span></h2>
|
||||||
</code>
|
</code>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,15 +1,18 @@
|
|||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit, ViewEncapsulation} from '@angular/core';
|
||||||
import {DeviceDetectorService} from '../shared/services/device-detector.service';
|
import {DeviceDetectorService} from '../shared/services/device-detector.service';
|
||||||
import {Title} from '@angular/platform-browser';
|
import {Title} from '@angular/platform-browser';
|
||||||
import {TranslatePipe} from '@ngx-translate/core';
|
import {TranslatePipe} from '@ngx-translate/core';
|
||||||
import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
||||||
|
import {NgStyle} from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-about',
|
selector: 'app-about',
|
||||||
|
encapsulation: ViewEncapsulation.None,
|
||||||
templateUrl: './about.component.html',
|
templateUrl: './about.component.html',
|
||||||
imports: [
|
imports: [
|
||||||
TranslatePipe,
|
TranslatePipe,
|
||||||
ParallaxComponent
|
ParallaxComponent,
|
||||||
|
NgStyle
|
||||||
],
|
],
|
||||||
styleUrls: ['./about.component.css']
|
styleUrls: ['./about.component.css']
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -7,7 +7,9 @@
|
|||||||
<app-mobile-navbar></app-mobile-navbar>
|
<app-mobile-navbar></app-mobile-navbar>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
<router-outlet />
|
|
||||||
|
<router-outlet></router-outlet>
|
||||||
|
|
||||||
@if (showFooter) {
|
@if (showFooter) {
|
||||||
<app-footer></app-footer>
|
<app-footer></app-footer>
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
import {ApplicationConfig, importProvidersFrom, provideZoneChangeDetection} from '@angular/core';
|
import {ApplicationConfig, importProvidersFrom, provideZoneChangeDetection} from '@angular/core';
|
||||||
import {provideRouter} from '@angular/router';
|
import {provideRouter, withInMemoryScrolling, withViewTransitions} from '@angular/router';
|
||||||
|
|
||||||
import {routes} from './app.routes';
|
import {routes} from './app.routes';
|
||||||
import {provideAnimationsAsync} from '@angular/platform-browser/animations/async';
|
import {provideAnimationsAsync} from '@angular/platform-browser/animations/async';
|
||||||
import {provideClientHydration, withEventReplay} from '@angular/platform-browser';
|
import {provideClientHydration, withEventReplay} from '@angular/platform-browser';
|
||||||
@@ -17,7 +16,13 @@ export function createTranslateLoader(http: HttpClient) {
|
|||||||
export const appConfig: ApplicationConfig = {
|
export const appConfig: ApplicationConfig = {
|
||||||
providers: [
|
providers: [
|
||||||
provideZoneChangeDetection({ eventCoalescing: true }),
|
provideZoneChangeDetection({ eventCoalescing: true }),
|
||||||
provideRouter(routes),
|
provideRouter(routes,
|
||||||
|
withViewTransitions(),
|
||||||
|
withInMemoryScrolling({
|
||||||
|
scrollPositionRestoration: 'top',
|
||||||
|
anchorScrolling: 'enabled'
|
||||||
|
})
|
||||||
|
),
|
||||||
provideAnimationsAsync(),
|
provideAnimationsAsync(),
|
||||||
provideClientHydration(withEventReplay()),
|
provideClientHydration(withEventReplay()),
|
||||||
provideHttpClient(),
|
provideHttpClient(),
|
||||||
|
|||||||
@@ -1,14 +1,3 @@
|
|||||||
@keyframes fadeIn {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
opacity: 1;
|
|
||||||
visibility: visible;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.height-container {
|
.height-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
@@ -124,15 +113,16 @@ h1 {
|
|||||||
animation: spin 1s linear infinite;
|
animation: spin 1s linear infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
::ng-deep img {
|
.article-content img {
|
||||||
max-width: 90%;
|
max-width: 90%;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
border-radius: 35px;
|
border-radius: 35px;
|
||||||
height: auto;
|
height: auto;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
::ng-deep .gallery {
|
.article-content .gallery {
|
||||||
display: grid;
|
display: grid;
|
||||||
max-width: 90vw;
|
max-width: 90vw;
|
||||||
grid-template-columns: repeat(3, 1fr);
|
grid-template-columns: repeat(3, 1fr);
|
||||||
@@ -141,14 +131,14 @@ h1 {
|
|||||||
padding: 15px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::ng-deep .gallery img {
|
.article-content .gallery img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
::ng-deep .modal {
|
.modal {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
@@ -158,22 +148,55 @@ h1 {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
animation: fadeIn 0.3s ease forwards;
|
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
::ng-deep .modal img {
|
.modal img {
|
||||||
max-width: 80%;
|
max-width: 80%;
|
||||||
max-height: 80%;
|
max-height: 80%;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes fadeIn {
|
.modal-enter {
|
||||||
|
animation: modalFadeIn 0.25s ease forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-leave {
|
||||||
|
animation: modalFadeOut 0.25s ease forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-image-enter {
|
||||||
|
animation: modalImageIn 0.25s ease forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-image-leave {
|
||||||
|
animation: modalImageOut 0.25s ease forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes modalFadeIn {
|
||||||
from {
|
from {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: scale(0.95); /* optional: slight zoom effect */
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes modalFadeOut {
|
||||||
|
from {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes modalImageIn {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: scale(0.95);
|
||||||
}
|
}
|
||||||
to {
|
to {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
@@ -181,6 +204,17 @@ h1 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes modalImageOut {
|
||||||
|
from {
|
||||||
|
opacity: 1;
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 0;
|
||||||
|
transform: scale(0.95);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@keyframes spin {
|
@keyframes spin {
|
||||||
0% {
|
0% {
|
||||||
transform: rotate(0deg);
|
transform: rotate(0deg);
|
||||||
@@ -191,13 +225,13 @@ h1 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
::ng-deep .gallery img {
|
.article-content .gallery img {
|
||||||
flex: 1 1 calc(50% - 15px);
|
flex: 1 1 calc(50% - 15px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 480px) {
|
@media (max-width: 480px) {
|
||||||
::ng-deep .gallery img {
|
.article-content .gallery img {
|
||||||
gap: 0;
|
gap: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
flex: 1 1 100%;
|
flex: 1 1 100%;
|
||||||
@@ -205,13 +239,13 @@ h1 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 480px) {
|
@media (max-width: 480px) {
|
||||||
::ng-deep img {
|
.article-content img {
|
||||||
max-width: 98%;
|
max-width: 98%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 480px) {
|
@media (max-width: 480px) {
|
||||||
::ng-deep .modal img {
|
.modal img {
|
||||||
max-width: 95%;
|
max-width: 95%;
|
||||||
max-height: 95%;
|
max-height: 95%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,16 +6,24 @@
|
|||||||
">
|
">
|
||||||
</app-parallax>
|
</app-parallax>
|
||||||
<div class="height-container">
|
<div class="height-container">
|
||||||
@if (!loading && article) {
|
<!-- Loading State-->
|
||||||
|
@if (loading) {
|
||||||
|
<div class="loading-container">
|
||||||
|
<div class="spinner"></div>
|
||||||
|
</div>
|
||||||
|
} @else if (article) {
|
||||||
|
<!-- Article -->
|
||||||
<div class="article-container">
|
<div class="article-container">
|
||||||
<div>
|
<div>
|
||||||
<!-- Article Title -->
|
|
||||||
<h1>{{ article.title }}</h1>
|
<h1>{{ article.title }}</h1>
|
||||||
<div class="content-container">
|
<div class="content-container">
|
||||||
<!-- Article Content -->
|
<div
|
||||||
<div #articleContent class="article-content" [innerHTML]="article.content"></div>
|
#articleContent
|
||||||
|
class="article-content"
|
||||||
|
[innerHTML]="article.content"
|
||||||
|
(click)="onArticleContentClick($event)"
|
||||||
|
></div>
|
||||||
<a href="/blog"><button>{{ 'ARTICLE_BACK' | translate }}</button></a>
|
<a href="/blog"><button>{{ 'ARTICLE_BACK' | translate }}</button></a>
|
||||||
<!-- Article Metadata -->
|
|
||||||
<div class="article-meta">
|
<div class="article-meta">
|
||||||
<p><strong>Author:</strong> {{ article.authorName}}</p>
|
<p><strong>Author:</strong> {{ article.authorName}}</p>
|
||||||
<p><strong>Views:</strong> {{ article.views }}</p><br><button (click)="copyLink()" [ngStyle]="{'background-color':copied ? '#22b34b' : ''}">{{ copied ? 'Copied' : 'Share' }}</button>
|
<p><strong>Views:</strong> {{ article.views }}</p><br><button (click)="copyLink()" [ngStyle]="{'background-color':copied ? '#22b34b' : ''}">{{ copied ? 'Copied' : 'Share' }}</button>
|
||||||
@@ -23,27 +31,30 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Modal -->
|
<!-- Image Modal -->
|
||||||
@if (selectedImage) {
|
@if (selectedImage) {
|
||||||
<div class="modal" (click)="closePreview()">
|
<div
|
||||||
<img [src]="selectedImage" alt="Full Preview" />
|
class="modal"
|
||||||
|
animate.enter="modal-enter"
|
||||||
|
animate.leave="modal-leave"
|
||||||
|
(click)="closePreview()"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
[src]="selectedImage"
|
||||||
|
alt="Full Preview"
|
||||||
|
class="modal-image"
|
||||||
|
animate.enter="modal-image-enter"
|
||||||
|
animate.leave="modal-image-leave"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
} @else {
|
} @else if (error) {
|
||||||
@if (!loading && error) {
|
<!-- Error Message -->
|
||||||
<div class="error-message">
|
<div class="error-message">
|
||||||
<h1>404</h1>
|
<h1>404</h1>
|
||||||
<p>{{ 'ARTICLE_NOTFOUND' | translate }}</p>
|
<p>{{ 'ARTICLE_NOTFOUND' | translate }}</p>
|
||||||
<a href="/blog"><button>{{ 'ARTICLE_BACK' | translate }}</button></a>
|
<a href="/blog"><button>{{ 'ARTICLE_BACK' | translate }}</button></a>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
|
||||||
<!-- Loading State-->
|
|
||||||
@if (loading) {
|
|
||||||
<div class="loading-container">
|
|
||||||
<div class="spinner"></div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
<!-- Error Message -->
|
|
||||||
</div>
|
</div>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import {AfterViewInit, Component, ElementRef, OnInit, ViewChild} from '@angular/core';
|
import {Component, OnInit, ViewEncapsulation} from '@angular/core';
|
||||||
import { DatePipe, NgStyle } from '@angular/common';
|
import { DatePipe, NgStyle } from '@angular/common';
|
||||||
import {ArticleService} from '../../shared/services/article.service';
|
import {ArticleService} from '../../shared/services/article.service';
|
||||||
import {ActivatedRoute} from '@angular/router';
|
import {ActivatedRoute} from '@angular/router';
|
||||||
@@ -20,6 +20,7 @@ interface Article {
|
|||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-article-page',
|
selector: 'app-article-page',
|
||||||
|
encapsulation: ViewEncapsulation.None,
|
||||||
imports: [
|
imports: [
|
||||||
DatePipe,
|
DatePipe,
|
||||||
NgStyle,
|
NgStyle,
|
||||||
@@ -29,16 +30,14 @@ interface Article {
|
|||||||
templateUrl: './article-page.component.html',
|
templateUrl: './article-page.component.html',
|
||||||
styleUrl: './article-page.component.css'
|
styleUrl: './article-page.component.css'
|
||||||
})
|
})
|
||||||
export class ArticlePageComponent implements OnInit, AfterViewInit {
|
export class ArticlePageComponent implements OnInit {
|
||||||
@ViewChild('articleContent') articleContent!: ElementRef<HTMLDivElement>;
|
|
||||||
selectedImage: string | null = null;
|
selectedImage: string | null = null;
|
||||||
private imagesProcessed = false;
|
article: Article | null = null;
|
||||||
article: Article | undefined;
|
|
||||||
currentArticle: any;
|
|
||||||
error: boolean = false;
|
error: boolean = false;
|
||||||
copied: boolean = false;
|
copied: boolean = false;
|
||||||
|
|
||||||
loading: boolean = true;
|
loading: boolean = true;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private articleService: ArticleService,
|
private articleService: ArticleService,
|
||||||
private titleService: Title,
|
private titleService: Title,
|
||||||
@@ -49,28 +48,57 @@ export class ArticlePageComponent implements OnInit, AfterViewInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.route.params.subscribe((params) => {
|
this.route.params.subscribe((params) => {
|
||||||
const slug = params['slug'];
|
const slug = params['slug'];
|
||||||
if (slug) {
|
|
||||||
this.loadTitleBySlug(slug);
|
|
||||||
} else {
|
|
||||||
this.titleService.setTitle('Article | itzMiney');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const slug = this.route.snapshot.paramMap.get('slug') || '';
|
this.loading = true;
|
||||||
this.articleService.getArticleBySlug(slug).subscribe(
|
this.error = false;
|
||||||
(article) => {
|
this.article = null;
|
||||||
|
|
||||||
|
if (!slug) {
|
||||||
|
this.titleService.setTitle('Error | itzMiney');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.articleService.getArticleBySlug(slug).subscribe({
|
||||||
|
next: (article: Article | undefined) => {
|
||||||
|
if (!article) {
|
||||||
|
this.article = null;
|
||||||
|
this.loading = false;
|
||||||
|
this.error = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.article = article;
|
this.article = article;
|
||||||
|
this.titleService.setTitle(`${article.title} | itzMiney`);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
console.log('Article found!')
|
|
||||||
},
|
},
|
||||||
(error) => {
|
error: (error) => {
|
||||||
console.error('Error fetching article:', error);
|
console.error('Error fetching article:', error);
|
||||||
|
this.article = null;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|
||||||
if (error.status === 404) {
|
if (error.status === 404) {
|
||||||
this.error = true;
|
this.error = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onArticleContentClick(event: MouseEvent) {
|
||||||
|
const target = event.target as HTMLElement;
|
||||||
|
|
||||||
|
if (target.tagName === 'IMG') {
|
||||||
|
const img = target as HTMLImageElement;
|
||||||
|
this.openPreview(img.src);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
openPreview(src: string) {
|
||||||
|
this.selectedImage = src;
|
||||||
|
}
|
||||||
|
|
||||||
|
closePreview() {
|
||||||
|
this.selectedImage = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
copyLink() {
|
copyLink() {
|
||||||
@@ -84,48 +112,4 @@ export class ArticlePageComponent implements OnInit, AfterViewInit {
|
|||||||
|
|
||||||
navigator.clipboard.writeText(shareLink).then()
|
navigator.clipboard.writeText(shareLink).then()
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewInit() {
|
|
||||||
this.makeImagesClickable();
|
|
||||||
this.imagesProcessed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private makeImagesClickable() {
|
|
||||||
const imgs: NodeListOf<HTMLImageElement> = this.articleContent.nativeElement.querySelectorAll('img');
|
|
||||||
imgs.forEach(img => {
|
|
||||||
img.style.cursor = 'pointer';
|
|
||||||
if (!img.dataset['clickable']) {
|
|
||||||
img.addEventListener('click', () => this.openPreview(img.src));
|
|
||||||
img.dataset['clickable'] = 'true';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
openPreview(src: string) {
|
|
||||||
this.selectedImage = src;
|
|
||||||
}
|
|
||||||
|
|
||||||
closePreview() {
|
|
||||||
this.selectedImage = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
loadTitleBySlug(slug: string) {
|
|
||||||
this.articleService.getArticleBySlug(slug).subscribe(
|
|
||||||
(article) => {
|
|
||||||
this.article = article;
|
|
||||||
this.loading = false;
|
|
||||||
|
|
||||||
setTimeout(() => this.makeImagesClickable(), 0);
|
|
||||||
|
|
||||||
console.log('Article found!')
|
|
||||||
},
|
|
||||||
(error) => {
|
|
||||||
console.error('Error fetching article:', error);
|
|
||||||
this.loading = false;
|
|
||||||
if (error.status === 404) {
|
|
||||||
this.error = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -107,8 +107,8 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
::ng-deep .text-content a {
|
.text-content a {
|
||||||
color: cornflowerblue;
|
color: #cb84df;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-backdrop {
|
.modal-backdrop {
|
||||||
@@ -165,6 +165,54 @@
|
|||||||
background-color: #ef85a4;
|
background-color: #ef85a4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fade-in {
|
||||||
|
animation: fadeIn 250ms ease-out forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fade-out {
|
||||||
|
animation: fadeOut 200ms ease-in forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-enter {
|
||||||
|
animation: modalEnter 250ms ease-out forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-leave {
|
||||||
|
animation: modalLeave 200ms ease-in forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fadeIn {
|
||||||
|
from { opacity: 0; }
|
||||||
|
to { opacity: 1; }
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fadeOut {
|
||||||
|
from { opacity: 1; }
|
||||||
|
to { opacity: 0; }
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes modalEnter {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: scale(0.95) translateY(10px);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
transform: scale(1) translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes modalLeave {
|
||||||
|
from {
|
||||||
|
opacity: 1;
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 0;
|
||||||
|
transform: scale(0.95) translateY(10px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
hr.rounded {
|
hr.rounded {
|
||||||
border: 2px solid white;
|
border: 2px solid white;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
|
|||||||
@@ -31,8 +31,18 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- Modal -->
|
<!-- Modal -->
|
||||||
@if (showModal) {
|
@if (showModal) {
|
||||||
<div class="modal-backdrop" (click)="closeModal()">
|
<div
|
||||||
<div class="modal-content" (click)="$event.stopPropagation()">
|
class="modal-backdrop"
|
||||||
|
animate.enter="fade-in"
|
||||||
|
animate.leave="fade-out"
|
||||||
|
(click)="closeModal()"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="modal-content"
|
||||||
|
animate.enter="modal-enter"
|
||||||
|
animate.leave="modal-leave"
|
||||||
|
(click)="$event.stopPropagation()"
|
||||||
|
>
|
||||||
<img [src]="selectedItem?.src" [alt]="selectedItem?.alt">
|
<img [src]="selectedItem?.src" [alt]="selectedItem?.alt">
|
||||||
<h2>{{ selectedItem?.label }}</h2>
|
<h2>{{ selectedItem?.label }}</h2>
|
||||||
<button (click)="closeModal()">Close</button>
|
<button (click)="closeModal()">Close</button>
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit, ViewEncapsulation} from '@angular/core';
|
||||||
import {DeviceDetectorService} from '../shared/services/device-detector.service';
|
import {DeviceDetectorService} from '../shared/services/device-detector.service';
|
||||||
import { CommonModule, NgStyle } from '@angular/common';
|
import { CommonModule, NgStyle } from '@angular/common';
|
||||||
import {Title} from '@angular/platform-browser';
|
import {Title} from '@angular/platform-browser';
|
||||||
import {AudioPlayerComponent} from '../shared/audio-player/audio-player.component';
|
import {AudioPlayerComponent} from '../shared/audio-player/audio-player.component';
|
||||||
import {TranslatePipe} from '@ngx-translate/core';
|
import {TranslatePipe} from '@ngx-translate/core';
|
||||||
import {animate, stagger, style, transition, trigger, query} from '@angular/animations';
|
|
||||||
import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-portfolio',
|
selector: 'app-portfolio',
|
||||||
|
encapsulation: ViewEncapsulation.None,
|
||||||
imports: [
|
imports: [
|
||||||
NgStyle,
|
NgStyle,
|
||||||
AudioPlayerComponent,
|
AudioPlayerComponent,
|
||||||
@@ -17,30 +17,7 @@ import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
|||||||
ParallaxComponent
|
ParallaxComponent
|
||||||
],
|
],
|
||||||
templateUrl: './portfolio.component.html',
|
templateUrl: './portfolio.component.html',
|
||||||
styleUrl: './portfolio.component.css',
|
styleUrl: './portfolio.component.css'
|
||||||
animations: [
|
|
||||||
trigger('fadeInOut', [
|
|
||||||
transition(':enter', [
|
|
||||||
style({ opacity: 0, transform: 'translateY(20px)' }),
|
|
||||||
animate('0.5s ease-out', style({ opacity: 1, transform: 'translateY(0)' }))
|
|
||||||
]),
|
|
||||||
transition(':leave', [
|
|
||||||
animate('0.3s ease-in', style({ opacity: 0, transform: 'translateY(20px)' }))
|
|
||||||
])
|
|
||||||
]),
|
|
||||||
trigger('staggerGallery', [
|
|
||||||
transition(':enter', [
|
|
||||||
query('.gallery-item', [
|
|
||||||
style({ opacity: 0, transform: 'translateY(20px)' }),
|
|
||||||
stagger(100, [
|
|
||||||
animate('0.5s ease-out', style({ opacity: 1, transform: 'translateY(0)' }))
|
|
||||||
])
|
|
||||||
], {
|
|
||||||
optional: true
|
|
||||||
})
|
|
||||||
])
|
|
||||||
])
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
export class PortfolioComponent implements OnInit {
|
export class PortfolioComponent implements OnInit {
|
||||||
galleryItems = [
|
galleryItems = [
|
||||||
|
|||||||
@@ -44,12 +44,23 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.audio-player {
|
.audio-player {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 10px;
|
width: 340px;
|
||||||
left: 20px;
|
height: 130px;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.audio-player.mobile {
|
||||||
|
background: linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.audio-player h3 {
|
.audio-player h3 {
|
||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="audio-player">
|
<div class="audio-player" [ngClass]="{ mobile: isMobile }">
|
||||||
<div id="youtube-player"></div>
|
<div id="youtube-player"></div>
|
||||||
<h3>{{ nowPlayingTitle() }}</h3>
|
<h3>{{ nowPlayingTitle() }}</h3>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import {Component, AfterViewInit, signal} from '@angular/core';
|
import {Component, AfterViewInit, signal, OnInit} from '@angular/core';
|
||||||
|
import {DeviceDetectorService} from '../services/device-detector.service';
|
||||||
|
import {NgClass} from '@angular/common';
|
||||||
|
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
@@ -10,16 +12,26 @@ declare global {
|
|||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-audio-player',
|
selector: 'app-audio-player',
|
||||||
imports: [],
|
imports: [
|
||||||
|
NgClass
|
||||||
|
],
|
||||||
templateUrl: './audio-player.component.html',
|
templateUrl: './audio-player.component.html',
|
||||||
styleUrl: './audio-player.component.css'
|
styleUrl: './audio-player.component.css'
|
||||||
})
|
})
|
||||||
export class AudioPlayerComponent implements AfterViewInit {
|
export class AudioPlayerComponent implements AfterViewInit, OnInit {
|
||||||
|
isMobile: boolean = false;
|
||||||
private player: any;
|
private player: any;
|
||||||
|
|
||||||
isPlayerReady = signal(false);
|
isPlayerReady = signal(false);
|
||||||
isPlaying = signal(false);
|
isPlaying = signal(false);
|
||||||
nowPlayingTitle = signal<string>('');
|
nowPlayingTitle = signal<string>('');
|
||||||
|
|
||||||
|
constructor(private deviceService: DeviceDetectorService) {}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.isMobile = this.deviceService.isMobile;
|
||||||
|
}
|
||||||
|
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
if (window.YT && window.YT.Player) {
|
if (window.YT && window.YT.Player) {
|
||||||
this.createPlayer();
|
this.createPlayer();
|
||||||
|
|||||||
@@ -117,3 +117,33 @@
|
|||||||
.language-switch button.de {
|
.language-switch button.de {
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.menu-enter {
|
||||||
|
animation: menuFadeIn 240ms ease-out forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-leave {
|
||||||
|
animation: menuFadeOut 220ms ease-in forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes menuFadeIn {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
backdrop-filter: blur(0px);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
backdrop-filter: blur(4px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes menuFadeOut {
|
||||||
|
from {
|
||||||
|
opacity: 1;
|
||||||
|
backdrop-filter: blur(4px);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 0;
|
||||||
|
backdrop-filter: blur(0px);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,7 +7,11 @@
|
|||||||
|
|
||||||
<!-- Full-Screen Menu -->
|
<!-- Full-Screen Menu -->
|
||||||
@if (menuOpen) {
|
@if (menuOpen) {
|
||||||
<div class="full-screen-menu">
|
<div
|
||||||
|
class="full-screen-menu"
|
||||||
|
animate.enter="menu-enter"
|
||||||
|
animate.leave="menu-leave"
|
||||||
|
>
|
||||||
<button class="close-icon" (click)="toggleMenu()">✖</button>
|
<button class="close-icon" (click)="toggleMenu()">✖</button>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a [routerLink]="'/'" [class.active]="activeLink === '/'"><i class="fa-solid fa-address-card"></i> {{ 'NAV_ABOUT' | translate }}</a></li>
|
<li><a [routerLink]="'/'" [class.active]="activeLink === '/'"><i class="fa-solid fa-address-card"></i> {{ 'NAV_ABOUT' | translate }}</a></li>
|
||||||
|
|||||||
@@ -1,16 +1,4 @@
|
|||||||
@keyframes fadeIn {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
opacity: 1;
|
|
||||||
visibility: visible;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#bg-base {
|
#bg-base {
|
||||||
animation: fadeIn 1s ease-out;
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
z-index: -105;
|
z-index: -105;
|
||||||
@@ -24,7 +12,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#parallax-scene {
|
#parallax-scene {
|
||||||
animation: fadeIn 1s ease-out;
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
z-index: -100;
|
z-index: -100;
|
||||||
@@ -51,8 +38,19 @@
|
|||||||
background-repeat: repeat;
|
background-repeat: repeat;
|
||||||
background-size: 320px 320px;
|
background-size: 320px 320px;
|
||||||
background-position: center top;
|
background-position: center top;
|
||||||
opacity: 0.18;
|
opacity: 0;
|
||||||
animation: arrowsScroll 15s linear infinite;
|
animation:
|
||||||
|
trianglesFadeIn 1.4s ease-out forwards,
|
||||||
|
arrowsScroll 24s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes trianglesFadeIn {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 0.13;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes arrowsScroll {
|
@keyframes arrowsScroll {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<br><br>
|
<br><br>
|
||||||
<h3>{{ 'SOCIALS_COMMS' | translate }}</h3>
|
<h3>{{ 'SOCIALS_COMMS' | translate }}</h3>
|
||||||
<a href="https://ko-fi.com/itzMiney" target="_blank"><button class="kofi"><a class="fa-solid fa-mug-hot"></a> Ko-Fi Donations</button></a>
|
<a href="https://ko-fi.com/itzMiney" target="_blank"><button class="kofi"><a class="fa-solid fa-mug-hot"></a> Ko-Fi Donations</button></a>
|
||||||
<a href="https://ko-fi.com/itzMiney/commissions" target="_blank"><button class="kofi-comms"><a class="fa-solid fa-mug-hot"></a> Ko-Fi Commissions</button></a>
|
<!--- <a href="https://ko-fi.com/itzMiney/commissions" target="_blank"><button class="kofi-comms"><a class="fa-solid fa-mug-hot"></a> Ko-Fi Commissions</button></a> --->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -11,3 +11,9 @@ body {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: Roboto, "Helvetica Neue", sans-serif;
|
font-family: Roboto, "Helvetica Neue", sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::view-transition-old(root),
|
||||||
|
::view-transition-new(root) {
|
||||||
|
animation-duration: 220ms;
|
||||||
|
animation-timing-function: ease;
|
||||||
|
}
|
||||||
Reference in new issue
Block a user