diff --git a/anwendung/src/components/Button.jsx b/anwendung/src/components/Button.jsx index 34bb7a9..17fb59c 100644 --- a/anwendung/src/components/Button.jsx +++ b/anwendung/src/components/Button.jsx @@ -21,8 +21,8 @@ export default function Button(p) { //if parameters are not set, they are set to default values if (height == null) height = 50; if (width == null) width = 100; - if (iconWidth == null) iconWidth = 50; - if (iconHeight == null) iconHeight = 50; + if (iconWidth == null) iconWidth = width-10; + if (iconHeight == null) iconHeight = height-10; if (onClick == null) onClick = () => {}; //build in the icon width and height to the svg tag (svg tag should not contain any size information by default) @@ -42,6 +42,9 @@ export default function Button(p) { style={{ width: width, height: height, + display: "flex", + alignItems: "center", + justifyContent: "center" }} onClick={onClick}> {text} diff --git a/anwendung/src/components/Icons.js b/anwendung/src/components/Icons.js index a3d9b12..455f54d 100644 --- a/anwendung/src/components/Icons.js +++ b/anwendung/src/components/Icons.js @@ -1,11 +1,7 @@ -export const arrowLeft = ` +export const arrowLeft = ` ` -export const arrowRight = ` +export const arrowRight = ` ` - -export const test = ` - -`; \ No newline at end of file diff --git a/anwendung/src/components/StatusBar.jsx b/anwendung/src/components/StatusBar.jsx new file mode 100644 index 0000000..398bc23 --- /dev/null +++ b/anwendung/src/components/StatusBar.jsx @@ -0,0 +1,23 @@ +import React from "react" + +export default function StatusBar(p) +{ + if(p.progress > 100) p.progress = 100; + let classNames = ["not-started", "started", "finished"]; + let index = p.progress / 50; + + return ( +
+
+ + + +
+
+
+ ) +} \ No newline at end of file diff --git a/anwendung/src/pages/_app.js b/anwendung/src/pages/_app.js index cd67a73..2300201 100644 --- a/anwendung/src/pages/_app.js +++ b/anwendung/src/pages/_app.js @@ -1,4 +1,4 @@ -//import '@/styles/globals.css' +import '@/styles/globals.css' export default function App({ Component, pageProps }) { return diff --git a/anwendung/src/pages/index.js b/anwendung/src/pages/index.js index 6f35ffd..511c076 100644 --- a/anwendung/src/pages/index.js +++ b/anwendung/src/pages/index.js @@ -1,10 +1,32 @@ -import { Inter } from 'next/font/google' +import {Inter} from 'next/font/google' +import React, {useState} from "react"; +import StatusBar from "@/components/StatusBar"; import Button from "@/components/Button"; +import {arrowLeft, arrowRight} from "@/components/Icons"; -const inter = Inter({ subsets: ['latin'] }) +const inter = Inter({subsets: ['latin']}) -export default function Home() { - return ( - <> - ) -} +export default function Home(p) { + + const [pr, setPr] = useState(0) + + return ( +
+
+ ) +} \ No newline at end of file diff --git a/anwendung/src/styles/globals.css b/anwendung/src/styles/globals.css index c6198ae..9e1a712 100644 --- a/anwendung/src/styles/globals.css +++ b/anwendung/src/styles/globals.css @@ -4,7 +4,7 @@ :root { --foreground-rgb: 0, 0, 0; - --background-start-rgb: 214, 219, 220; + --background-start-rgb: 255, 255, 255; --background-end-rgb: 255, 255, 255; } @@ -24,8 +24,14 @@ body { rgb(var(--background-end-rgb)) ) rgb(var(--background-start-rgb)); + display: flex; + align-items: center; + justify-content: center; } +/* +Button + */ .round-border { border-radius: 10px; @@ -56,3 +62,54 @@ body { { background-color: #585858; } + +/* +Step Progress Bar + */ +.step-container +{ + display: flex; + flex-direction: column; + align-items: center; + max-width: 400px; +} + +.steps +{ + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-between; + gap: 20px; + width: 100%; + position: relative; +} + +.step +{ + width: 40px; height: 40px; + border-radius: 50%; +} + +.steps .not-started +{ + background-color: #e10000; +} + +.steps .started +{ + background-color: #ecc700; +} + +.steps .finished +{ + background-color: #46be10; +} + +.progress-bar +{ + position: absolute; + height: 8px; + background-color: #5d606e; + z-index: -1; +}