Kaynağa Gözat

Header hinzugefügt

Leonard Schulz (Arbeit) 2 yıl önce
ebeveyn
işleme
4346beafba

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 190
fontend_angular/wbs-rechner-angular/src/app/app.component.html


+ 2 - 1
fontend_angular/wbs-rechner-angular/src/app/app.component.ts

@@ -1,10 +1,11 @@
 import { Component } from '@angular/core';
 import { RouterOutlet } from '@angular/router';
+import { HeaderboxComponent } from './headerbox/headerbox.component';
 
 @Component({
   selector: 'app-root',
   standalone: true,
-  imports: [RouterOutlet],
+  imports: [RouterOutlet, HeaderboxComponent],
   templateUrl: './app.component.html',
   styleUrl: './app.component.css'
 })

+ 20 - 0
fontend_angular/wbs-rechner-angular/src/app/headerbox/headerbox.component.css

@@ -0,0 +1,20 @@
+.box {
+  border: 1px solid var(--highlight-color);
+  padding: 0px;
+  margin: 0px;
+  position: relative;
+}
+
+.header {
+  display: flex;
+  background-color: var(--highlight-color);
+  color: var(--background-color);
+  padding: 2px;
+}
+
+.toolbar {
+  display: flex;
+  position: absolute;
+  top: 0;
+  right: 0;
+}

+ 9 - 0
fontend_angular/wbs-rechner-angular/src/app/headerbox/headerbox.component.html

@@ -0,0 +1,9 @@
+<div class="box">
+    <div class="header">
+        <h2>{{ title }}</h2>
+        <div class="toolbar">
+            <ng-content select="[toolbar]"></ng-content>
+        </div>
+    </div>
+    <ng-content select="[content]"></ng-content>
+  </div>

+ 23 - 0
fontend_angular/wbs-rechner-angular/src/app/headerbox/headerbox.component.spec.ts

@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { HeaderboxComponent } from './headerbox.component';
+
+describe('HeaderboxComponent', () => {
+  let component: HeaderboxComponent;
+  let fixture: ComponentFixture<HeaderboxComponent>;
+
+  beforeEach(async () => {
+    await TestBed.configureTestingModule({
+      imports: [HeaderboxComponent]
+    })
+    .compileComponents();
+    
+    fixture = TestBed.createComponent(HeaderboxComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 12 - 0
fontend_angular/wbs-rechner-angular/src/app/headerbox/headerbox.component.ts

@@ -0,0 +1,12 @@
+import { Component, Input } from '@angular/core';
+
+@Component({
+  selector: 'app-headerbox',
+  standalone: true,
+  imports: [],
+  templateUrl: './headerbox.component.html',
+  styleUrl: './headerbox.component.css'
+})
+export class HeaderboxComponent {
+  @Input() title: string = '';
+}

+ 41 - 1
fontend_angular/wbs-rechner-angular/src/styles.css

@@ -1 +1,41 @@
-/* You can add global styles to this file, and also import other style files */
+@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
+
+/** Main Colors **/
+:root {
+  --background-color: white;
+  --main-color: black;
+  --highlight-color: #0051a1;
+  --light-highlight-color: #0074d9;
+}
+
+body {
+  background-color: var(--background-color);
+  color: var(--main-color);
+  font-family: "Roboto", sans-serif;
+  font-weight: 400;
+  font-style: normal;
+}
+
+h2 {
+  margin: 0px;
+}
+
+/* Checkbox Design */
+input[type="checkbox"] {
+  width: 20px;
+  height: 20px;
+  border-radius: 4px;
+  appearance: none;
+  -webkit-appearance: none;
+  -moz-appearance: none;
+  outline: none;
+  border: 2px solid black;
+  background-color: white;
+}
+
+input[type="checkbox"]:checked {
+  background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"%3E%3Cpath fill="none" d="M0 0h24v24H0z" /%3E%3Cpath d="M5.5 13.6l2.7 2.7L16.8 8l1.4 1.4-9.5 9.5L3 12.3z" fill="black" /%3E%3C/svg%3E');
+  background-repeat: no-repeat;
+  background-position: center;
+  background-size: 19px 19px;
+}

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor