mirror of
https://github.com/danielvici/tool-website.git
synced 2026-01-17 01:21:25 +00:00
first content
add: Cards for Generators on startpage. test site, navbar
This commit is contained in:
@@ -1,7 +1,32 @@
|
||||
<div class="text-white">
|
||||
|
||||
<h1 class="text-center">Moin Welt</h1>
|
||||
<p>TailwindCSS geht</p>
|
||||
|
||||
|
||||
<div class="mb-6">
|
||||
<app-custom-title
|
||||
[textSizeInPx]="24"
|
||||
text="Tools"
|
||||
textColor="white"
|
||||
class="font-bold"
|
||||
></app-custom-title>
|
||||
</div>
|
||||
<div class="gap-6 ml-4 max-w-7xl mx-auto space-y-12">
|
||||
@for (feature of features; track $index) {
|
||||
@if (feature.enabled) {
|
||||
<div>
|
||||
<div class="mb-4">
|
||||
<app-custom-title
|
||||
[textSizeInPx]="20"
|
||||
[text]="feature.name"
|
||||
textColor="oklch(70.7% 0.165 254.624)"
|
||||
fontWeight="bold"
|
||||
></app-custom-title>
|
||||
</div>
|
||||
<div class="ml-4 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||
@for (tool of feature.tools; track $index) {
|
||||
<app-custom-card [title]="tool.name" [description]="tool.description" descriptionColor="oklch(70.4% 0.04 256.788)"
|
||||
[destination]="tool.link" [enabled]="tool.enabled"></app-custom-card>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,9 +8,8 @@ describe('Startpage', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [Startpage]
|
||||
})
|
||||
.compileComponents();
|
||||
imports: [Startpage],
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(Startpage);
|
||||
component = fixture.componentInstance;
|
||||
|
||||
@@ -1,14 +1,43 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {NgOptimizedImage} from '@angular/common';
|
||||
import { NgOptimizedImage } from '@angular/common';
|
||||
import { CustomTitle } from '../../components/custom-title/custom-title';
|
||||
import { CustomCard } from '../../components/custom-card/custom-card';
|
||||
import {ReactiveFormsModule} from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
selector: 'app-startpage',
|
||||
imports: [
|
||||
NgOptimizedImage
|
||||
],
|
||||
templateUrl: './startpage.html',
|
||||
styleUrl: './startpage.css',
|
||||
imports: [CustomTitle, CustomCard, ReactiveFormsModule],
|
||||
})
|
||||
export class Startpage {
|
||||
|
||||
features = [{
|
||||
name: 'Generators',
|
||||
enabled: true,
|
||||
tools: [{
|
||||
name: 'Password Generator',
|
||||
description: 'Create secure passwords with custom options',
|
||||
link: '/generator/password',
|
||||
enabled: true,
|
||||
}, {
|
||||
name: 'QR Code Generator',
|
||||
description: 'Generate and download QR codes for any text or URL',
|
||||
link: '/generator/qr',
|
||||
enabled: true,
|
||||
}]}, {
|
||||
name: 'Tests',
|
||||
enabled: true,
|
||||
tools: [{
|
||||
name: 'Test 1',
|
||||
description: 'This is a just test description.',
|
||||
link: '/test',
|
||||
enabled: true,
|
||||
},{
|
||||
name: 'Test 2',
|
||||
description: 'This is a just test description.',
|
||||
link: '/test',
|
||||
enabled: false,
|
||||
}]
|
||||
}];
|
||||
}
|
||||
|
||||
0
src/app/sites/test-it/test-it.css
Normal file
0
src/app/sites/test-it/test-it.css
Normal file
9
src/app/sites/test-it/test-it.html
Normal file
9
src/app/sites/test-it/test-it.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<div class="flex flex-col justify-center items-center">
|
||||
<h1 class="text-7xl text-white m-10">Yeah. This Site works...</h1>
|
||||
<div class="flex justify-center">
|
||||
<button
|
||||
class="text-xl w-fit bg-blue-500 text-white py-2 px-4 rounded-md hover:bg-blue-600 transition-colors hover:cursor-pointer"
|
||||
routerLink="/"
|
||||
>Home</button>
|
||||
</div>
|
||||
</div>
|
||||
23
src/app/sites/test-it/test-it.spec.ts
Normal file
23
src/app/sites/test-it/test-it.spec.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TestIt } from './test-it';
|
||||
|
||||
describe('TestIt', () => {
|
||||
let component: TestIt;
|
||||
let fixture: ComponentFixture<TestIt>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [TestIt]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(TestIt);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
14
src/app/sites/test-it/test-it.ts
Normal file
14
src/app/sites/test-it/test-it.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {RouterLink} from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-test-it',
|
||||
imports: [
|
||||
RouterLink
|
||||
],
|
||||
templateUrl: './test-it.html',
|
||||
styleUrl: './test-it.css',
|
||||
})
|
||||
export class TestIt {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user