Added Services Page, ToS & Imprint

This commit is contained in:
itzMiney committed 2025-02-06 01:56:17 +01:00
1 parent 3b8fd5752e
commit 0b9596b534
29 files changed
+1038 -23

No files matched your search

-70
View File
@@ -1,70 +0,0 @@
import {Injectable} from '@angular/core';
import {HttpClient, HttpHeaders} from '@angular/common/http';
import {Observable} from 'rxjs';
import { map } from 'rxjs/operators';
interface Article {
id: number;
title: string;
slug: string;
content: string;
createdAt: string;
updatedAt: string;
views: number;
authorId: number;
authorName: string;
}
@Injectable({
providedIn: 'root'
})
export class ArticleService {
private apiUrl = '/api/articles';
constructor(private http: HttpClient) {}
getAllArticles(): Observable<Article[]> {
return this.http.get<Article[]>(`${this.apiUrl}?timestamp=${new Date().getTime()}`);
}
getArticleBySlug(slug: string): Observable<Article |undefined> {
return this.http.get<Article>(`${this.apiUrl}/slug/${slug}`).pipe(
map(article => article)
);
}
getArticleById(id: number): Observable<Article |undefined> {
return this.http.get<Article>(`${this.apiUrl}/id/${id}`).pipe(
map(article => article)
);
}
postArticle(token: string, title: string, content: string ): Observable<any[]> {
return this.http.post<any[]>(this.apiUrl, {
title,
content
},{
headers: {
'Authorization': `Bearer ${token}`
}
});
}
deleteArticle(id: number, token: string): Observable<boolean> {
const headers = new HttpHeaders().set('Authorization', `Bearer ${token}`);
return this.http.delete<any>(`${this.apiUrl}/${id}`, { headers }).pipe(
map((response) => {
// If the backend responds successfully, return true
return !!(response && response.message === 'Article deleted');
})
);
}
editArticle(id: number, token: string | null, title: string, content: string): Observable<any> {
const headers = new HttpHeaders().set('Authorization', `Bearer ${token}`);
const body = { title, content };
return this.http.put<any>(`${this.apiUrl}/${id}`, body, { headers });
}
}
-25
View File
@@ -1,25 +0,0 @@
import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {Observable, tap} from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class AuthService {
private apiUrl = '/api/auth/login';
constructor(private http: HttpClient) {}
login(username: string, password: string): Observable<any> {
return this.http.post(this.apiUrl, { username, password })
.pipe(
tap((response: any) => {
// Store token in localStorage after successful login
if (response.token) {
localStorage.setItem('token', response.token);
}
})
);
}
}
@@ -1,24 +0,0 @@
import {Inject, Injectable, PLATFORM_ID} from '@angular/core';
import {isPlatformBrowser} from '@angular/common';
@Injectable({
providedIn: 'root',
})
export class DeviceDetectorService {
isMobile: boolean = false;
constructor(@Inject(PLATFORM_ID) private platformId: Object) {
this.updateDeviceType();
if (isPlatformBrowser(this.platformId)) {
window.addEventListener('resize', () => this.updateDeviceType());
}
}
private updateDeviceType() {
if (isPlatformBrowser(this.platformId)) {
this.isMobile = window.innerWidth <= 768;
} else {
this.isMobile = false;
}
}
}
+185
View File
@@ -0,0 +1,185 @@
@keyframes fadeIn {
0% {
opacity: 0;
visibility: hidden;
}
100% {
opacity: 1;
visibility: visible;
}
}
#vanta-services-bg {
animation: fadeIn 1s ease-out;
position: fixed;
top: 0;
left: 0;
width: 100vw; /* Full viewport width */
height: 100vh; /* Full viewport height */
z-index: -100; /* Place the background behind content */
}
.services-container {
position: relative;
color: white;
padding-bottom: 60px;
max-width: 960px;
margin: 0 auto;
font-family: 'Roboto', sans-serif;
}
.height-container {
min-height: 100vh;
align-content: center;
}
.services-header {
text-align: center;
}
.services-header h1 {
font-size: 2.5rem;
background: transparent;
border: 4px solid white;
margin: 8px auto 8px auto;
max-width: 280px;
padding: 10px;
border-radius: 45px;
}
.services-header .subtitle {
font-size: 1.2rem;
font-style: italic;
margin-bottom: 30px;
}
.service-cards {
display: flex;
flex-wrap: wrap;
gap: 20px;
justify-content: center;
align-items: center;
margin-top: 30px;
font-family: "Roboto", sans-serif;
}
.service-item {
width: 450px;
text-align: center;
border-radius: 10px;
overflow: hidden;
transition: transform 0.3s ease-in-out;
}
.service-item:hover {
transform: scale(1.05);
}
.service-item span {
font-size: 1.0rem;
font-weight: 400;
color: white;
}
.service-card {
background: linear-gradient(135deg, #8054aa, #bc5570);
border-radius: 35px;
border: none;
padding: 25px;
text-align: center;
color: white;
}
.tabs {
margin-top: 20px;
}
.tab-btn {
background-color: rgba(57, 53, 74, 0.45);
border: none;
border-radius: 25px;
color: white;
padding: 10px;
margin-inline: 15px;
font-size: 1rem;
cursor: pointer;
width: 110px;
display: inline-block;
}
.tab-btn:hover {
background-color: rgb(227, 72, 90);
}
.tab-btn.active {
background-color: rgb(227, 72, 90);
color: #ffffff;
}
.tab-content {
margin-top: 10px;
font-size: 0.9rem;
white-space: pre-line;
text-wrap: pretty;
text-align: left;
}
:host ::ng-deep .centered-text {
display: block;
text-align: center;
margin-top: 20px;
margin-bottom: 10px;
}
.commission-button {
text-align: center;
margin-top: 30px;
margin-bottom: 50px;
}
.comm-btn {
background-color: #FF5C8D;
color: white;
border: none;
padding: 12px 25px;
font-size: 1.2rem;
border-radius: 25px;
cursor: pointer;
}
.comm-btn:hover {
background-color: #FF3C75;
}
.text-content p {
font-size: 1.2rem;
font-weight: 400;
margin-bottom: 10px;
text-align: center;
}
.text-content a {
color: cornflowerblue;
}
@media (max-width: 768px) {
.services-container {
padding: 20px 10px;
}
.services-header h1 {
font-size: 2rem;
}
.service-cards {
flex-direction: column;
}
.service-item {
width: 100%;
}
}
a {
color: white;
}
+44
View File
@@ -0,0 +1,44 @@
<div id="vanta-services-bg"></div>
<div class="height-container">
<div class="services-container">
<div class="services-header" [ngStyle]="{'margin-top': isMobile ? '60px' : '120px'}">
<h1>My Services</h1>
<p class="subtitle">Web Development & Design</p>
</div>
<div class="text-content">
<p>
Welcome!<br><br>
Here is where I offer freelance services in web development and design!<br>
For some of the work I did you can consider checking out my <a href="/portfolio">Portfolio</a>.<br>
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, shoot me a mail at <a href="mailto://michael@itzminey.dev">michael&#64;itzminey.dev</a> with the requested Service and any details and specifications you want me to know about.
</p>
</div>
<div class="commission-button">
<a href="mailto://michael@itzminey.dev" target="_blank">
<button class="comm-btn">Commission me!</button>
</a>
</div>
<div class="service-cards">
<div class="service-item" *ngFor="let service of services; let i = index">
<div class="service-card">
<span [innerHTML]="service.name"></span>
<div class="tabs">
<button
class="tab-btn"
[class.active]="activeTab[i] === 'basic'"
(click)="switchTab(i, 'basic')">Basic</button>
<button
class="tab-btn"
[class.active]="activeTab[i] === 'advanced'"
(click)="switchTab(i, 'advanced')">Advanced</button>
</div>
<div *ngIf="activeTab[i] === 'basic'" class="tab-content" [innerHTML]="service.basic">
</div>
<div *ngIf="activeTab[i] === 'advanced'" class="tab-content" [innerHTML]="service.advanced">
</div>
</div>
</div>
</div>
</div>
</div>
+89
View File
@@ -0,0 +1,89 @@
import {AfterViewInit, Component, Inject, OnDestroy, OnInit, PLATFORM_ID} from '@angular/core';
import {VantaBackgroundService} from '../shared/services/vanta-background.service';
import {DeviceDetectorService} from '../shared/services/device-detector.service';
import {Title} from '@angular/platform-browser';
import {isPlatformBrowser, NgIf, NgFor, NgStyle} from '@angular/common';
@Component({
selector: 'app-services',
imports: [
NgStyle,
NgIf,
NgFor
],
templateUrl: './services.component.html',
styleUrl: './services.component.css'
})
export class ServicesComponent implements OnInit, OnDestroy, AfterViewInit {
private readonly elementId = 'vanta-services-bg';
isMobile: boolean = false;
activeTab: string[] = [];
services = [
{
name: '<b>Design a custom WordPress Website</b> (Files Only)',
basic: '<b class="centered-text">Base Service: (€100)</b>I will make your basic custom designed WordPress Website,<br>and give you the files for installing it on your own dedicated server or WordPress host.<br><b class="centered-text">Additional Services:</b>&bull; Maintenance Service (€35/month),<br><br>&bull; Support Service (€50/month)<br>(Flat Rate €100 for minor issues up to 2.5 hours)',
advanced: '<b class="centered-text">Base Service: (€100)</b>Basic + Detailed documentation of each feature.<br><b class="centered-text">Additional Services:</b>&bull; Maintenance Service (€35/month),<br><br>&bull; Support Service (€50/month)<br>(Flat Rate €100 for minor issues up to 2.5 hours)'
},
{
name: '<b>Design custom WordPress Website + Setup</b>',
basic: '<b class="centered-text">Base Service: (€150)</b>I will make your basic custom designed WordPress Website and also set it up for you on either:<br><br>&bull; A dedicated Server you provide<br>&bull; A WordPress host you already pay for<br>&bull; My own Server (shared host - €20/month)</span><br><b class="centered-text">Additional Services:</b>&bull; Domain registration and management (€20 setup)<br>+ Basic DDoS Protection Setup (€25/month),<br><br>&bull; Maintenance Service (€35/month),<br><br>&bull; Support Service (€50/hour)<br>(Flat Rate €100 for minor issues up to 2.5 hours)',
advanced: '<b class="centered-text">Base Service: (€200)</b>Same as Basic Service + Additional security configuration<br><b class="centered-text">Additional Services:</b>&bull; Domain registration and management (€20 setup)<br>+ Advanced DDoS Protection Setup (€45/month),<br><br>&bull; Dedicated IPv4 Address (€15/month),<br><br>&bull; Maintenance Service (€35/month),<br><br>&bull; Support Service (€50/hour)<br>(Flat Rate €100 for minor issues up to 2.5 hours)'
},
{
name: '<b>Custom-made Website in Angular</b> (Files Only)',
basic: '<b class="centered-text">Base Service: (€200)</b>I will make a custom Website <b>frontend</b> for you using Node.js, TypeScript, HTML & CSS in Angular CLI and give you the files.<br><br>If you already have a backend please provide it to me or a documentation of it, so I can implement it in the frontend.<br><br>If not, provide me with the details of what the backend will be able to do later and I will make placeholders in the frontend code for the backend calls that can be added later.<br><b class="centered-text">Additional Services:</b>&bull; Maintenance Service (€50/month),<br><br>&bull; Support Service (€75/hour)<br>(Flat Rate €130 for minor issues up to 2.5 hours)',
advanced: '<b class="centered-text">Base Service: (€300)</b>Same as basic, but I will also make a Backend for you too.<br><b class="centered-text">Additional Services:</b>Maintenance Service (€50/month),<br><br>Support Service (€75/hour - Flat Rate €130 for minor issues up to 2.5 hours)'
},
{
name: '<b>Custom-made Website in Angular + Setup</b>',
basic: '<b class="centered-text">Base Service: (€400)</b>I will make a custom Website front- and backend for you using Node.js, TypeScript, HTML & CSS in Angular CLI and set it up for you on either:<br><br>&bull; A dedicated Server you provide<br>&bull; A WordPress host you already pay for<br>&bull; My own Server (shared host - €20/month)<br><b class="centered-text">Additional Services:</b>&bull; Domain registration and management (€20 setup)<br>+ Basic DDoS Protection Setup (€25/month),<br><br>&bull; Maintenance Service (€50/month),<br><br>&bull; Support Service (€75/hour)<br>(Flat Rate €130 for minor issues up to 2.5 hours)',
advanced: '<b class="centered-text">Base Service: (€400)</b>Same as Basic Service<br><b class="centered-text">Additional Services:</b>&bull; Domain registration and management (€20 setup)<br>+ Advanced DDoS Protection Setup (€45/month),<br><br>&bull; Dedicated IPv4 Address (€15/month),<br><br>&bull; Maintenance Service (€50/month),<br><br>&bull; Support Service (€75/hour)<br>(Flat Rate €130 for minor issues up to 2.5 hours)'
},
{
name: '<b>Web Server Setup for Customer provided Software</b>',
basic: '<b class="centered-text">Base Service: (€350)</b>I will set up custom server software that you already obtained for you on a dedicated server you provide and configure it to run securely.<br><b class="centered-text">Additional Services:</b>&bull; Maintenance Service (€60/month),<br><br>&bull; Support Service (€90/hour - Flat Rate €160 for minor issues up to 2.5 hours)',
advanced: '<b class="centered-text">Base Service: (€350):</b>I will set up custom server software that you already obtained for you and host it for you on my own dedicated server (shared host - €30/month).<br><b class="centered-text">Additional Services:</b>&bull; Maintenance Service (€60/month),<br><br>&bull; Support Service (€90/hour - Flat Rate €160 for minor issues up to 2.5 hours)'
}
];
constructor(
private vantaService: VantaBackgroundService,
private deviceService: DeviceDetectorService,
private titleService: Title,
@Inject(PLATFORM_ID) private platformId: Object
) {
this.activeTab = this.services.map(() => 'basic');
}
switchTab(serviceIndex: number, tab: string): void {
this.activeTab[serviceIndex] = tab;
}
ngOnInit() {
this.titleService.setTitle('Services | itzMiney');
this.isMobile = this.deviceService.isMobile;
if (isPlatformBrowser(this.platformId)) {
window.addEventListener('resize', this.onResize.bind(this));
}
}
ngAfterViewInit() {
this.vantaService.initVanta(this.elementId, {
color: 0xb3b3b3,
backgroundColor: 0x291c3c
});
}
ngOnDestroy() {
this.vantaService.destroyVanta(this.elementId);
if (isPlatformBrowser(this.platformId)) {
window.removeEventListener('resize', this.onResize);
}
}
onResize() {
// Update the minHeight and minWidth when the window is resized
this.vantaService.resizeVanta(this.elementId);
}
}
-64
View File
@@ -1,64 +0,0 @@
import { Injectable } from '@angular/core';
import {HttpClient, HttpHeaders} from '@angular/common/http';
import { Observable } from 'rxjs';
import {map} from 'rxjs/operators';
interface Username {
id: number;
username: string;
password: string;
createdAt: string;
updatedAt: string;
}
@Injectable({
providedIn: 'root'
})
export class UserService {
private apiUrl = '/api/users';
constructor(private http: HttpClient) {}
getAllUsers(token: string | null): Observable<any[]> {
const headers = new HttpHeaders().set('Authorization', `Bearer ${token}`);
return this.http.get<any[]>(`${this.apiUrl}/?timestamp=${new Date().getTime()}`, { headers });
}
createUser(token: string, username: string, password: string): Observable<any> {
const headers = new HttpHeaders().set('Authorization', `Bearer ${token}`);
return this.http.post<any>(this.apiUrl, {
username,
password
}, { headers });
}
editUser(id: number, token: string | null, username: string, password: string): Observable<any> {
const headers = new HttpHeaders().set('Authorization', `Bearer ${token}`);
const body: any = {};
if (username) {
body.username = username
}
if (password) {
body.password = password;
}
return this.http.put<any>(`${this.apiUrl}/${id}`, body, { headers });
}
deleteUser(id: number, token: string): Observable<boolean> {
const headers = new HttpHeaders().set('Authorization', `Bearer ${token}`);
return this.http.delete<any>(`${this.apiUrl}/${id}`, { headers }).pipe(
map((response) => {
// If the backend responds successfully, return true
return !!(response && response.message === 'User deleted');
})
);
}
getUserById(id: number, token: string): Observable<Username | undefined> {
const headers = new HttpHeaders().set('Authorization', `Bearer ${token}`);
return this.http.get<Username>(`${this.apiUrl}/${id}`, { headers }).pipe(
map(user => user)
);
}
}
@@ -1,52 +0,0 @@
import {Inject, Injectable, PLATFORM_ID} from '@angular/core';
import {isPlatformBrowser} from '@angular/common';
@Injectable({
providedIn: 'root',
})
export class VantaBackgroundService {
private vantaEffect: Map<string, any> = new Map();
constructor(
@Inject(PLATFORM_ID) private platformId: Object,
) {}
initVanta(elementId: string, options?: any) {
if (isPlatformBrowser(this.platformId)) {
const element = document.getElementById(elementId);
if (element && !this.vantaEffect.has(elementId)) {
(window as any).VANTA.NET({
el: element,
mouseControls: false,
touchControls: false,
gyroControls: false,
scale: 1.0,
scaleMobile: 1.0,
points: 12.0,
maxDistance: 30.0,
spacing: 25.0,
showDots: false,
minWidth: window.innerWidth,
minHeight: window.innerHeight,
...(options || {}),
});
element.style.position = 'fixed';
}
}
}
resizeVanta(elementId: string): void {
const effect = this.vantaEffect.get(elementId);
if (effect) {
effect.resize();
}
}
destroyVanta(elementId: string): void {
const effect = this.vantaEffect.get(elementId);
if (effect) {
effect.destroy();
this.vantaEffect.delete(elementId);
}
}
}