code cleanup + finished contact page

This commit is contained in:
2023-02-21 20:23:19 +01:00
parent a55c60d88a
commit 484294e611
28 changed files with 318 additions and 77 deletions

View File

@@ -2,6 +2,9 @@ import { Injectable } from '@angular/core';
import PocketBase from 'pocketbase';
import {Language, Project} from "../models/project";
import {Technology} from "../models/technology";
import {Timestamp} from "../models/timestamp";
import {Social} from "../models/social";
import {Message} from "../models/message";
@Injectable({
@@ -46,4 +49,20 @@ export class BackendService {
return await this.pb?.collection('technologies').getFullList();
}
public async getTimeline(): Promise<Timestamp[]> {
return await this.pb?.collection('timeline').getFullList();
}
public async getSocials(): Promise<Social[]> {
return [
{href: 'https://www.instagram.com/leonh.23/', image: 'https://instagram.com/favicon.ico'},
{href: 'https://git.leon-hoppe.de/leon.hoppe', image: 'https://git.leon-hoppe.de/favicon.ico'},
{href: 'mailto://leon@ladenbau-hoppe.de', image: 'https://webmail.strato.de/favicon.ico'}
];
}
public async sendMessage(message: Message) {
await this.pb?.collection('messages').create(message);
}
}