Merge pull request #43 from itzMiney/development

Style updates and code optimization
This commit is contained in:
Michael authored and GitHub committed 2026-03-17 01:48:12 +01:00
commit 7451fe33b7
21 files changed
+308 -175

No files matched your search

+1 -1
View File
@@ -30,7 +30,7 @@
"SOCIALS_SUB": "Man kann mich an vielen Orten finden",
"SOCIALS_GAMES": "Spiele",
"SOCIALS_COMMS": "Spenden und Freelance Aufträge",
"SOCIALS_COMMS": "Spenden",
"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&#64;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
View File
@@ -31,7 +31,7 @@
"SOCIALS_SUB": "You can find me in a lotta places",
"SOCIALS_GAMES": "Games",
"SOCIALS_COMMS": "Donations & Commissions",
"SOCIALS_COMMS": "Donations",
"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&#64;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.",
+5 -7
View File
@@ -43,7 +43,6 @@ a {
}
.about-header h1 {
font-size: 5rem;
margin-bottom: 0;
font-weight: 700;
background: linear-gradient(45deg, #c3acff 0%, #a6ffb0 100%);
@@ -121,7 +120,6 @@ a {
.about-content {
max-width: 900px;
margin: 0 auto;
padding: 0 25px;
font-size: 1.2rem;
line-height: 1.6;
}
@@ -158,29 +156,29 @@ a {
.terminal-bg {
background: #1b1920;
padding: 2px 22px 11px 22px;
padding: 8px 22px 11px 22px;
margin: 0 0 80px 0;
border-radius: 0 0 20px 20px;
}
.terminal-bg h2 {
line-height: 0.5;
line-height: 1.2;
margin: 8px 0;
}
.terminal-bg a.secret {
color: white;
}
::ng-deep.terminal-bg a {
.terminal-bg a {
color: #cb84df;
}
::ng-deep.terminal-bg p {
.terminal-bg p {
font-size: 1rem;
}
.cursorblink {
margin-left: 8px;
animation: cursorBlink 1.25s infinite;
}
+3 -3
View File
@@ -8,7 +8,7 @@
<div class="height-container">
<div class="about-header">
<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>
</div>
<div class="down-arrow" (click)="scrollDown()">
@@ -18,7 +18,7 @@
<div class="separator"></div>
<section id="content"></section>
<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="window-title"><p><code>Konsole</code></p></div> <div class="window-buttons"><p>🟡 🟣 🔴</p></div>
</div>
@@ -60,7 +60,7 @@
</ul>
</div>
</div>
<h2>$<span class="cursorblink">&#9608;</span></h2>
<h2>$ <span class="cursorblink">&#9608;</span></h2>
</code>
</div>
</div>
+5 -2
View File
@@ -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 {Title} from '@angular/platform-browser';
import {TranslatePipe} from '@ngx-translate/core';
import {ParallaxComponent} from '../shared/parallax/parallax.component';
import {NgStyle} from '@angular/common';
@Component({
selector: 'app-about',
encapsulation: ViewEncapsulation.None,
templateUrl: './about.component.html',
imports: [
TranslatePipe,
ParallaxComponent
ParallaxComponent,
NgStyle
],
styleUrls: ['./about.component.css']
})
+3 -1
View File
@@ -7,7 +7,9 @@
<app-mobile-navbar></app-mobile-navbar>
}
}
<router-outlet />
<router-outlet></router-outlet>
@if (showFooter) {
<app-footer></app-footer>
}
+8 -3
View File
@@ -1,6 +1,5 @@
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 {provideAnimationsAsync} from '@angular/platform-browser/animations/async';
import {provideClientHydration, withEventReplay} from '@angular/platform-browser';
@@ -17,7 +16,13 @@ export function createTranslateLoader(http: HttpClient) {
export const appConfig: ApplicationConfig = {
providers: [
provideZoneChangeDetection({ eventCoalescing: true }),
provideRouter(routes),
provideRouter(routes,
withViewTransitions(),
withInMemoryScrolling({
scrollPositionRestoration: 'top',
anchorScrolling: 'enabled'
})
),
provideAnimationsAsync(),
provideClientHydration(withEventReplay()),
provideHttpClient(),
@@ -1,14 +1,3 @@
@keyframes fadeIn {
0% {
opacity: 0;
visibility: hidden;
}
100% {
opacity: 1;
visibility: visible;
}
}
.height-container {
display: flex;
min-height: 100vh;
@@ -124,15 +113,16 @@ h1 {
animation: spin 1s linear infinite;
}
::ng-deep img {
.article-content img {
max-width: 90%;
padding: 15px;
border-radius: 35px;
height: auto;
box-sizing: border-box;
cursor: pointer;
}
::ng-deep .gallery {
.article-content .gallery {
display: grid;
max-width: 90vw;
grid-template-columns: repeat(3, 1fr);
@@ -141,14 +131,14 @@ h1 {
padding: 15px;
}
::ng-deep .gallery img {
.article-content .gallery img {
width: 100%;
height: auto;
border-radius: 20px;
object-fit: cover;
}
::ng-deep .modal {
.modal {
position: fixed;
top: 0;
left: 0;
@@ -158,22 +148,55 @@ h1 {
display: flex;
justify-content: center;
align-items: center;
animation: fadeIn 0.3s ease forwards;
z-index: 1000;
cursor: pointer;
}
::ng-deep .modal img {
.modal img {
max-width: 80%;
max-height: 80%;
border-radius: 20px;
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 {
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 {
opacity: 1;
@@ -181,6 +204,17 @@ h1 {
}
}
@keyframes modalImageOut {
from {
opacity: 1;
transform: scale(1);
}
to {
opacity: 0;
transform: scale(0.95);
}
}
@keyframes spin {
0% {
transform: rotate(0deg);
@@ -191,13 +225,13 @@ h1 {
}
@media (max-width: 768px) {
::ng-deep .gallery img {
.article-content .gallery img {
flex: 1 1 calc(50% - 15px);
}
}
@media (max-width: 480px) {
::ng-deep .gallery img {
.article-content .gallery img {
gap: 0;
padding: 0;
flex: 1 1 100%;
@@ -205,13 +239,13 @@ h1 {
}
@media (max-width: 480px) {
::ng-deep img {
.article-content img {
max-width: 98%;
}
}
@media (max-width: 480px) {
::ng-deep .modal img {
.modal img {
max-width: 95%;
max-height: 95%;
}
@@ -6,16 +6,24 @@
">
</app-parallax>
<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>
<!-- Article Title -->
<h1>{{ article.title }}</h1>
<div class="content-container">
<!-- Article Content -->
<div #articleContent class="article-content" [innerHTML]="article.content"></div>
<div
#articleContent
class="article-content"
[innerHTML]="article.content"
(click)="onArticleContentClick($event)"
></div>
<a href="/blog"><button>{{ 'ARTICLE_BACK' | translate }}</button></a>
<!-- Article Metadata -->
<div class="article-meta">
<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>
@@ -23,27 +31,30 @@
</div>
</div>
</div>
<!-- Modal -->
<!-- Image Modal -->
@if (selectedImage) {
<div class="modal" (click)="closePreview()">
<img [src]="selectedImage" alt="Full Preview" />
<div
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>
} @else {
@if (!loading && error) {
} @else if (error) {
<!-- Error Message -->
<div class="error-message">
<h1>404</h1>
<p>{{ 'ARTICLE_NOTFOUND' | translate }}</p>
<a href="/blog"><button>{{ 'ARTICLE_BACK' | translate }}</button></a>
</div>
}
}
<!-- Loading State-->
@if (loading) {
<div class="loading-container">
<div class="spinner"></div>
</div>
}
<!-- Error Message -->
</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 {ArticleService} from '../../shared/services/article.service';
import {ActivatedRoute} from '@angular/router';
@@ -20,6 +20,7 @@ interface Article {
@Component({
selector: 'app-article-page',
encapsulation: ViewEncapsulation.None,
imports: [
DatePipe,
NgStyle,
@@ -29,16 +30,14 @@ interface Article {
templateUrl: './article-page.component.html',
styleUrl: './article-page.component.css'
})
export class ArticlePageComponent implements OnInit, AfterViewInit {
@ViewChild('articleContent') articleContent!: ElementRef<HTMLDivElement>;
export class ArticlePageComponent implements OnInit {
selectedImage: string | null = null;
private imagesProcessed = false;
article: Article | undefined;
currentArticle: any;
article: Article | null = null;
error: boolean = false;
copied: boolean = false;
loading: boolean = true;
constructor(
private articleService: ArticleService,
private titleService: Title,
@@ -49,28 +48,57 @@ export class ArticlePageComponent implements OnInit, AfterViewInit {
ngOnInit() {
this.route.params.subscribe((params) => {
const slug = params['slug'];
if (slug) {
this.loadTitleBySlug(slug);
} else {
this.titleService.setTitle('Article | itzMiney');
}
});
const slug = this.route.snapshot.paramMap.get('slug') || '';
this.articleService.getArticleBySlug(slug).subscribe(
(article) => {
this.loading = true;
this.error = false;
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.titleService.setTitle(`${article.title} | itzMiney`);
this.loading = false;
console.log('Article found!')
},
(error) => {
error: (error) => {
console.error('Error fetching article:', error);
this.article = null;
this.loading = false;
if (error.status === 404) {
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() {
@@ -84,48 +112,4 @@ export class ArticlePageComponent implements OnInit, AfterViewInit {
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;
}
}
);
}
}
+50 -2
View File
@@ -107,8 +107,8 @@
text-align: center;
}
::ng-deep .text-content a {
color: cornflowerblue;
.text-content a {
color: #cb84df;
}
.modal-backdrop {
@@ -165,6 +165,54 @@
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 {
border: 2px solid white;
width: 40px;
+12 -2
View File
@@ -31,8 +31,18 @@
</div>
<!-- Modal -->
@if (showModal) {
<div class="modal-backdrop" (click)="closeModal()">
<div class="modal-content" (click)="$event.stopPropagation()">
<div
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">
<h2>{{ selectedItem?.label }}</h2>
<button (click)="closeModal()">Close</button>
+3 -26
View File
@@ -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 { CommonModule, NgStyle } from '@angular/common';
import {Title} from '@angular/platform-browser';
import {AudioPlayerComponent} from '../shared/audio-player/audio-player.component';
import {TranslatePipe} from '@ngx-translate/core';
import {animate, stagger, style, transition, trigger, query} from '@angular/animations';
import {ParallaxComponent} from '../shared/parallax/parallax.component';
@Component({
selector: 'app-portfolio',
encapsulation: ViewEncapsulation.None,
imports: [
NgStyle,
AudioPlayerComponent,
@@ -17,30 +17,7 @@ import {ParallaxComponent} from '../shared/parallax/parallax.component';
ParallaxComponent
],
templateUrl: './portfolio.component.html',
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
})
])
])
]
styleUrl: './portfolio.component.css'
})
export class PortfolioComponent implements OnInit {
galleryItems = [
@@ -44,12 +44,23 @@
}
.audio-player {
display: flex;
flex-direction: column;
position: fixed;
bottom: 10px;
left: 20px;
width: 340px;
height: 130px;
bottom: 0;
left: 0;
align-items: center;
justify-content: center;
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 {
margin-left: 15px;
text-align: center;
@@ -1,4 +1,4 @@
<div class="audio-player">
<div class="audio-player" [ngClass]="{ mobile: isMobile }">
<div id="youtube-player"></div>
<h3>{{ nowPlayingTitle() }}</h3>
<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 {
@@ -10,16 +12,26 @@ declare global {
@Component({
selector: 'app-audio-player',
imports: [],
imports: [
NgClass
],
templateUrl: './audio-player.component.html',
styleUrl: './audio-player.component.css'
})
export class AudioPlayerComponent implements AfterViewInit {
export class AudioPlayerComponent implements AfterViewInit, OnInit {
isMobile: boolean = false;
private player: any;
isPlayerReady = signal(false);
isPlaying = signal(false);
nowPlayingTitle = signal<string>('');
constructor(private deviceService: DeviceDetectorService) {}
ngOnInit() {
this.isMobile = this.deviceService.isMobile;
}
ngAfterViewInit() {
if (window.YT && window.YT.Player) {
this.createPlayer();
@@ -117,3 +117,33 @@
.language-switch button.de {
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 -->
@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>
<ul>
<li><a [routerLink]="'/'" [class.active]="activeLink === '/'"><i class="fa-solid fa-address-card"></i>&#x2007;{{ 'NAV_ABOUT' | translate }}</a></li>
+13 -15
View File
@@ -1,16 +1,4 @@
@keyframes fadeIn {
0% {
opacity: 0;
visibility: hidden;
}
100% {
opacity: 1;
visibility: visible;
}
}
#bg-base {
animation: fadeIn 1s ease-out;
position: fixed;
inset: 0;
z-index: -105;
@@ -24,7 +12,6 @@
}
#parallax-scene {
animation: fadeIn 1s ease-out;
position: fixed;
inset: 0;
z-index: -100;
@@ -51,8 +38,19 @@
background-repeat: repeat;
background-size: 320px 320px;
background-position: center top;
opacity: 0.18;
animation: arrowsScroll 15s linear infinite;
opacity: 0;
animation:
trianglesFadeIn 1.4s ease-out forwards,
arrowsScroll 24s linear infinite;
}
@keyframes trianglesFadeIn {
from {
opacity: 0;
}
to {
opacity: 0.13;
}
}
@keyframes arrowsScroll {
+1 -1
View File
@@ -33,7 +33,7 @@
<br><br>
<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>&#x2007;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>&#x2007;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>&#x2007;Ko-Fi Commissions</button></a> --->
</div>
</div>
</div>
+6
View File
@@ -11,3 +11,9 @@ body {
margin: 0;
font-family: Roboto, "Helvetica Neue", sans-serif;
}
::view-transition-old(root),
::view-transition-new(root) {
animation-duration: 220ms;
animation-timing-function: ease;
}