From 2117b9c90ddd527be507e753f230bf116661b2d3 Mon Sep 17 00:00:00 2001 From: "marcusferl@weifer.de" Date: Mon, 5 Sep 2022 10:38:08 +0200 Subject: [PATCH] up --- src/app/app.module.ts | 5 ++++- src/app/header/header.component.html | 8 ++++++-- src/app/header/header.component.scss | 24 ++++++++++++++++++++++++ src/app/header/header.component.ts | 19 +++++++++++++++++-- src/app/input/input.component.html | 3 +-- src/app/input/input.component.scss | 19 ++++++++++++++----- src/app/output/output.component.scss | 6 +++++- src/styles.scss | 1 + 8 files changed, 72 insertions(+), 13 deletions(-) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index dd6d30d..35b6eef 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -13,6 +13,8 @@ import { OutputComponent } from './output/output.component'; import { FormsModule } from '@angular/forms'; import { MatIconModule } from '@angular/material/icon'; import { MatButtonModule } from '@angular/material/button'; +import { MatSlideToggleModule } from '@angular/material/slide-toggle'; + @NgModule({ @@ -31,7 +33,8 @@ import { MatButtonModule } from '@angular/material/button'; MatSelectModule, FormsModule, MatIconModule, - MatButtonModule + MatButtonModule, + MatSlideToggleModule ], providers: [], bootstrap: [AppComponent] diff --git a/src/app/header/header.component.html b/src/app/header/header.component.html index 470e0d1..3b2a763 100644 --- a/src/app/header/header.component.html +++ b/src/app/header/header.component.html @@ -1,3 +1,7 @@ -
-

Ipv4 Converter

+
+
+

Ipv4 Converter

+ {{toggleText}} +
+
\ No newline at end of file diff --git a/src/app/header/header.component.scss b/src/app/header/header.component.scss index 3a07fe0..03fc7d0 100644 --- a/src/app/header/header.component.scss +++ b/src/app/header/header.component.scss @@ -1,10 +1,34 @@ .header { box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.10); font-size: 30px; + display: flex; + flex-direction: column; } +.toggle { + margin-bottom: 15px; +} + .logo { height: 70px; margin-left: 20px; +} + +.body { + margin: 0; + font-family: Roboto, "Helvetica Neue", sans-serif; + background-color: white; + +} + +.bodydark { + + background-color: gray; + + h1 { + color: white; + } + + } \ No newline at end of file diff --git a/src/app/header/header.component.ts b/src/app/header/header.component.ts index f13222c..1097526 100644 --- a/src/app/header/header.component.ts +++ b/src/app/header/header.component.ts @@ -3,14 +3,29 @@ import { Component, OnInit } from '@angular/core'; @Component({ selector: 'app-header', templateUrl: './header.component.html', - styleUrls: ['./header.component.scss'] + styleUrls: ['./header.component.scss', '../../styles.scss'] }) export class HeaderComponent implements OnInit { - + toggle = false; + toggleText = "Daymode" + mode = 'body' constructor() { + } + stylemode() { + switch (this.toggle) { + case true: + this.toggle = false; + this.toggleText = "Daymode" + this.mode = "body" + break; + case false: + this.toggle = true; + this.toggleText = "Darkmode" + this.mode = 'bodydark' + } } ngOnInit(): void { diff --git a/src/app/input/input.component.html b/src/app/input/input.component.html index 2dafca3..44bf028 100644 --- a/src/app/input/input.component.html +++ b/src/app/input/input.component.html @@ -1,9 +1,8 @@ -
+
IPv4 - Prefix diff --git a/src/app/input/input.component.scss b/src/app/input/input.component.scss index c4ce215..7fee2be 100644 --- a/src/app/input/input.component.scss +++ b/src/app/input/input.component.scss @@ -1,12 +1,12 @@ .input_field { height: 58px; - min-width: 300px; + min-width: 50px; max-width: 1000px; width: auto; - margin-top: 15px; - margin-right: 12px; + margin-left: 5px; + margin-right: 15px; border: 1px solid rgba(0, 0, 0, 0.30); border-radius: 10px; @@ -15,11 +15,20 @@ .select { min-width: 50px; max-width: 100px; + margin-top: 20px; + margin-right: 15px; width: auto; - margin-top: 15px; - margin-right: 12px; + + } .button { padding-top: 10px; +} + +.flexcontainer { + display: flex; + flex-direction: row; + align-items: center; + } \ No newline at end of file diff --git a/src/app/output/output.component.scss b/src/app/output/output.component.scss index e30e598..ad19958 100644 --- a/src/app/output/output.component.scss +++ b/src/app/output/output.component.scss @@ -1,7 +1,6 @@ .card { min-height: 40px; max-height: 250px; - background-color: white; min-width: 300px; max-width: auto; width: auto; @@ -13,6 +12,7 @@ padding-top: 0px; margin-bottom: 10px; margin-left: 5px; + margin-right: 5px; } @@ -25,4 +25,8 @@ .outlabel { width: 20px; margin-right: 100px; +} + +body { + background-color: black; } \ No newline at end of file diff --git a/src/styles.scss b/src/styles.scss index f7b3e20..f371c94 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -38,4 +38,5 @@ body { body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; + } \ No newline at end of file