Design idea

This commit is contained in:
brausjonas
2023-05-24 00:49:59 +02:00
parent aadd9f5f94
commit 702e3e8e4d
8 changed files with 666 additions and 317 deletions
+2 -2
View File
@@ -6,10 +6,10 @@ export const arrowRight = `<svg xmlns="http://www.w3.org/2000/svg" fill="white"
<path fill-rule="evenodd" d="M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8z"/>
</svg>`
export const deleteItem = `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="bi bi-trash-fill" viewBox="0 0 16 16">
export const deleteItem = `<svg xmlns="http://www.w3.org/2000/svg" fill="black" class="bi bi-trash-fill" viewBox="0 0 16 16">
<path d="M2.5 1a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1H3v9a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V4h.5a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H10a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1H2.5zm3 4a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-1 0v-7a.5.5 0 0 1 .5-.5zM8 5a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-1 0v-7A.5.5 0 0 1 8 5zm3 .5v7a.5.5 0 0 1-1 0v-7a.5.5 0 0 1 1 0z"/>
</svg>`
export const editItem = `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="bi bi-pencil-fill" viewBox="0 0 16 16">
export const editItem = `<svg xmlns="http://www.w3.org/2000/svg" fill="black" class="bi bi-pencil-fill" viewBox="0 0 16 16">
<path d="M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.499.499 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11l.178-.178z"/>
</svg>`
+6 -6
View File
@@ -36,28 +36,28 @@ export default function Login() {
const router = useRouter()
return (
<div className="border">
<login className={"login-container"}>
// <div className="border">
<login className={"login-container box-shadow"}>
<p className={"font-big-fat placement"}>Login</p>
<div className={"placement"}>
<br/>
<p className={"font-kinda-big"}>Username</p>
<input type="text" value={inputUserName} onChange={e => setInputUserName(e.target.value)}
placeholder={hint} className="input input-bordered input-sm w-full max-w-xs"
placeholder={hint} className="input input-bordered input-sm w-full max-w-xs box-shadow"
style={{
backgroundColor: backgroundColor
}}/>
<br/>
<p className={"font-kinda-big"}>Password</p>
<input type="password" value={inputPassword} onChange={e => setInputPassword(e.target.value)}
placeholder={hint} className="input input-bordered input-sm w-full max-w-xs"
placeholder={hint} className="input input-bordered input-sm w-full max-w-xs box-shadow"
style={{
backgroundColor: backgroundColor
}}/>
</div>
<Button text={"Login"} color={"#e2001a"} width={"25px"} onClick={() => on_login_click()}/>
<Button text={"Login"} color={"#77932b"} width={100} height={40} onClick={() => on_login_click()}/>
</login>
</div>
// </div>
);
}
+3 -3
View File
@@ -11,7 +11,7 @@ export default function SemesterTile(p)
})
return (
<div onClick={(e) => p.onClick(e)} className={"semester-tile"}>
<div onClick={(e) => p.onClick(e)} className={"semester-tile box-shadow"}>
<p>{p.text}</p>
<StatusBar progress={0}/>
<div style={{
@@ -21,8 +21,8 @@ export default function SemesterTile(p)
alignItems: "center",
gap: 5
}}>
<Button icon={deleteItem} width={30} height={30} onClick={p.onButtonDeleteClick}/>
<Button icon={editItem} width={30} height={30} onClick={p.onButtonEditClick}/>
<Button icon={deleteItem} width={30} height={30} color={"rgba(0, 0, 0, 0)"} onClick={p.onButtonDeleteClick}/>
<Button icon={editItem} width={30} height={30} color={"rgba(0, 0, 0, 0)"} onClick={p.onButtonEditClick}/>
</div>
</div>
)
+28 -3
View File
@@ -11,19 +11,44 @@ import InputForm from "@/components/InputForm";
import Login from "@/components/Login";
import Test from "@/components/Test";
import BasicDateCalendar from "@/components/CalendarSideBar";
import {randomInt} from "next/dist/shared/lib/bloom-filter/utils";
const inter = Inter({subsets: ['latin']})
export default function Home(p) {
return (
<div className={"normal-centered"}>
<div style={{
position: "absolute",
width: "100%",
height: "100%",
overflow: "clip",
pointerEvents: "none"
}}>
<div style={{
position: "absolute",
transform: "skew(20deg)",
width: "100%",
height: "100%",
zIndex: -10,
backgroundColor: "#f2f2f2",
borderTopLeftRadius: 400,
borderBottomRightRadius: 800,
}}></div>
<div style={{
position: "absolute",
width: "100%",
height: "100%",
zIndex: -11,
backgroundColor: "#346991",
}}></div>
</div>
<Login/>
</div>
)
}
+28 -2
View File
@@ -1,5 +1,5 @@
import Button from "@/components/Button";
import {useEffect, useState} from "react";
import React, {useEffect, useState} from "react";
import SemesterTile from "@/components/SemesterTile";
import InputForm from "@/components/InputForm";
import {useRouter} from "next/router";
@@ -91,6 +91,32 @@ export default function SemesterOverview(p)
return (
<div className={"semester-overview"}>
<div style={{
position: "absolute",
width: "100%",
height: "100%",
overflow: "clip",
pointerEvents: "none"
}}>
<div style={{
position: "absolute",
transform: "skew(20deg)",
width: "100%",
height: "100%",
zIndex: -10,
backgroundColor: "#f2f2f2",
borderTopLeftRadius: 400,
borderBottomRightRadius: 800,
}}></div>
<div style={{
position: "absolute",
width: "100%",
height: "100%",
zIndex: -11,
backgroundColor: "#346991",
}}></div>
</div>
{
entries.map(e => (<SemesterTile text={e.name} onClick={(f) => onClickSemester(e, f)} onButtonDeleteClick={() => {
localStorage.setItem("currentsid", e.id)
@@ -101,7 +127,7 @@ export default function SemesterOverview(p)
funcButtonEdit(e, m);
}}/>))
}
<Button color={"#818181"} text={"+"} width={240} height={160} fontColor={"black"} fontSize={50}
<Button color={"#dcdcdc"} text={"+"} width={240} height={160} fontColor={"black"} fontSize={50}
onClick={() => onClickNewSemester()}/>
<PopUp hint={modalHint} text1={"Abbrechen"} text2={"Löschen"} displayState={modalDisplay}
function1={funcButtonAbort} function2={funcButtonDelete}/>
+297 -301
View File
@@ -3,203 +3,211 @@
@tailwind utilities;
:root {
--foreground-rgb: 0, 0, 0;
--background-start-rgb: 255, 255, 255;
--background-end-rgb: 255, 255, 255;
--foreground-rgb: 0, 0, 0;
--background-start-rgb: 255, 255, 255;
--background-end-rgb: 255, 255, 255;
}
body {
background-color: #f2f2f2;
}
.splash {
position: absolute;
border-radius: 70px;
background-color: #c77c0c;
z-index: -5;
}
/**
Page Layouts
*/
.normal-centered
{
height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.normal-centered {
height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.semester-overview
{
height: 100vh;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
flex-wrap: wrap;
align-content: center;
gap: 10px;
.semester-overview {
height: 100vh;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
flex-wrap: wrap;
align-content: center;
gap: 10px;
}
body
body {
height: 100vh;
}
.box-shadow
{
height: 100vh;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
/*
Button
*/
.round-border
{
border-radius: 10px;
border-width: 0;
.round-border {
border-radius: 10px;
border-width: 0;
}
.font-small
{
font-size: 12px;
.font-small {
font-size: 12px;
}
.font-middle
{
font-size: 16px ;
.font-middle {
font-size: 16px;
}
.font-big
{
font-size: 22px;
.font-big {
font-size: 22px;
}
.button
{
background-color: #363636;
padding: 5px;
color: white;
.button {
background-color: #363636;
padding: 5px;
color: white;
}
.button:hover
{
background-color: #585858;
.button:hover {
background-color: #585858;
}
/*
Step Progress Bar
*/
.step-container
{
display: flex;
flex-direction: column;
align-items: center;
max-width: 400px;
.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;
.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%;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-weight: bold;
.step {
width: 40px;
height: 40px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-weight: bold;
}
.steps .not-started
{
background-image: linear-gradient(#b42121, #b44821);
.steps .not-started {
/*background-image: linear-gradient(#b42121, #b44821);*/
background-color: #77932b;
}
.steps .started
{
background-image: linear-gradient(#c75c0c, #c77c0c);
.steps .started {
/*background-image: linear-gradient(#c75c0c, #c77c0c);*/
background-color: #77932b;
}
.steps .finished
{
background-image: linear-gradient(#43C20BFF, #0bc27c);
.steps .finished {
/*background-image: linear-gradient(#43C20BFF, #0bc27c);*/
background-color: #77932b;
}
.steps .active
{
border-width: 3px;
border-color: #1e2428;
.steps .active {
/*border-width: 2px;*/
/*border-color: #1e2428;*/
background-color: #346991;
}
.progress-bar
{
position: absolute;
height: 8px;
background-color: #5d606e;
z-index: -1;
.progress-bar {
position: absolute;
height: 8px;
background-color: #5d606e;
z-index: -1;
}
/*
weekSelector
*/
.dateElement{
display: flex;
margin-left: 20px;
margin-right: 20px;
height: 50px;
width: 200px;
align-items: center;
justify-content: center;
background-color: #0d52ce;
.dateElement {
display: flex;
margin-left: 20px;
margin-right: 20px;
height: 50px;
width: 200px;
align-items: center;
justify-content: center;
background-color: #0d52ce;
}
.weekSelector {
display: flex;
display: flex;
}
/*
Popup
*/
.modal-container
{
z-index: 1;
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
background-color: rgba(0, 0, 0, 0.3);
.modal-container {
z-index: 1;
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
background-color: rgba(0, 0, 0, 0.3);
}
.modal
{
width: 300px;
height: 100px;
border-radius: 10px;
background-color: rgb(255, 255, 255);
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 5px;
.modal {
width: 300px;
height: 100px;
border-radius: 10px;
background-color: rgb(255, 255, 255);
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 5px;
}
.modal p
{
text-align: center;
.modal p {
text-align: center;
}
.modal div
{
display: flex;
flex-direction: row;
width: 100%;
justify-content: end;
gap: 5px;
.modal div {
display: flex;
flex-direction: row;
width: 100%;
justify-content: end;
gap: 5px;
}
/*
@@ -207,114 +215,103 @@ Calender View
*/
.calender-container
{
max-height: 600px;
overflow-y: scroll;
display: grid;
.calender-container {
max-height: 600px;
overflow-y: scroll;
display: grid;
}
.calender-container::-webkit-scrollbar
{
display: none;
.calender-container::-webkit-scrollbar {
display: none;
}
.content
{
grid-area: 1 / 1;
.content {
grid-area: 1 / 1;
}
.overlay
{
padding: 2px 0 0 0;
grid-area: 1 / 1;
pointer-events: none;
.overlay {
padding: 2px 0 0 0;
grid-area: 1 / 1;
pointer-events: none;
}
.no-pointer-events
{
pointer-events: none;
.no-pointer-events {
pointer-events: none;
}
.wochen-tag-container
{
display: flex;
flex-direction: row;
justify-content: space-between;
height: 60px;
width: 1000px;
gap: 5px;
padding: 0 0 5px 0;
background-color: #363636;
.wochen-tag-container {
display: flex;
flex-direction: row;
justify-content: space-between;
height: 60px;
width: 1000px;
gap: 5px;
padding: 0 0 5px 0;
background-color: #363636;
}
.calender-view
{
width: 1000px;
height: 2400px;
background-color: #363636;
display: flex;
flex-direction: row;
align-items: stretch;
justify-content: stretch;
gap: 5px;
user-select: none;
padding: 2px 0 0 0;
.calender-view {
width: 1000px;
height: 2400px;
background-color: #363636;
display: flex;
flex-direction: row;
align-items: stretch;
justify-content: stretch;
gap: 5px;
user-select: none;
padding: 2px 0 0 0;
}
.calender-view .spalte
{
border-radius: 10px;
width: 400px;
background-color: white;
display: grid;
padding: 0 3px;
grid-template-columns: 100%;
.calender-view .spalte {
border-radius: 10px;
width: 400px;
background-color: white;
display: grid;
padding: 0 3px;
grid-template-columns: 100%;
}
.wochen-tag-container .wochen-tag
{
text-align: center;
background-color: #f80000;
width: 400px;
color: white;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
.wochen-tag-container .wochen-tag {
text-align: center;
background-color: #f80000;
width: 400px;
color: white;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
grid-row-start: 1;
grid-row-end: 4;
grid-row-start: 1;
grid-row-end: 4;
}
.entry
{
border-radius: 10px;
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 0 2px;
align-items: center;
cursor: move;
z-index: 10;
overflow: hidden;
margin-top: 1px;
margin-bottom: 1px;
.entry {
border-radius: 10px;
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 0 2px;
align-items: center;
cursor: move;
z-index: 10;
overflow: hidden;
margin-top: 1px;
margin-bottom: 1px;
}
.entry .resize-grab
{
height: 5px;
cursor: ns-resize;
width: 100%;
.entry .resize-grab {
height: 5px;
cursor: ns-resize;
width: 100%;
}
.entry p {
color: white;
font-size: 16px;
cursor: default;
pointer-events: none;
color: white;
font-size: 16px;
cursor: default;
pointer-events: none;
}
/*
@@ -322,163 +319,162 @@ inputForm
*/
input {
border-width: 2px;
border-radius: 5px;
border-width: 2px;
border-radius: 5px;
}
.courseNameInput {
width: 300px;
width: 300px;
}
.semesterDateInput {
width: 150px;
width: 150px;
}
.semesterDateLables, .semesterDateInputPair {
display:flex;
flex-direction: row;
justify-content: left;
display: flex;
flex-direction: row;
justify-content: left;
}
.inputFieldSeperator {
width: 40px;
text-align: center;
width: 40px;
text-align: center;
}
.semesterDateLable{
width: 150px;
margin-right: 40px;
.semesterDateLable {
width: 150px;
margin-right: 40px;
}
.semesterRangeInput {
margin-top: 50px;
margin-top: 50px;
}
.inputForm {
width: 600px;
height: 600px;
padding: 20px;
border: solid;
display: flex;
flex-direction: column;
width: 600px;
height: 600px;
padding: 20px;
border: solid;
display: flex;
flex-direction: column;
}
#buttons {
align-self: flex-end;
display: flex;
flex-direction: row;
align-items: flex-end;
align-self: flex-end;
display: flex;
flex-direction: row;
align-items: flex-end;
}
.dozentSelector {
height: 350px;
border: solid;
margin-top: 20px;
width: 500px;
padding: 10px;
margin-bottom: 20px;
height: 350px;
border: solid;
margin-top: 20px;
width: 500px;
padding: 10px;
margin-bottom: 20px;
}
th {
text-align: left;
padding: 0 10px;
text-align: left;
padding: 0 10px;
}
td
{
padding: 0 10px;
td {
padding: 0 10px;
}
/*
Login
*/
.login-container
{
.login-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 10px;
width: 100%;
height: 100%;
justify-content: space-evenly;
/*gap: 10px;*/
border-radius: 10px;
background-color: #ffffff;
width: 375px;
height: 350px;
}
.input-bordered
{
border: 1px solid #000000;
.input-bordered {
border: none;
border-radius: 5px;
}
.input
{
.input {
padding: 5px;
border: none;
background-color: #e9e9e9;
border-radius: 5px;
font-family: Arial, serif;
font-size: 16px;
}
.border{
width: 375px;
height: 350px;
background-color: #ffffff;
border-radius: 5px;
border-width: 2px;
border-color: #1e2428;
/*gap: 10px;*/
.input:focus
{
outline: none;
}
.placement {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: left;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: left;
}
.font-kinda-big{
.font-kinda-big {
font-size: 18px;
color: #777777;
font-weight: 500;
}
.font-big-fat {
font-size: 22px;
font-weight: bold;
font-size: 22px;
font-weight: bold;
}
.input-sm {
height: 2rem/* 32px */;
padding-left: 0.75rem/* 12px */;
padding-right: 0.75rem/* 12px */;
font-size: 0.875rem/* 14px */;
line-height: 2rem/* 32px */;
}
height: 2rem /* 32px */;
padding-left: 0.75rem /* 12px */;
padding-right: 0.75rem /* 12px */;
font-size: 0.875rem /* 14px */;
line-height: 2rem /* 32px */;
}
/**
SemesterTile
*/
.semester-tile
{
background-color: #797979;
width: 240px;
height: 160px;
color: white;
border-radius: 10px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 20px;
gap: 10px;
.semester-tile {
background-color: #ffffff;
width: 240px;
height: 160px;
color: black;
border-radius: 10px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 20px;
gap: 10px;
}
.semester-tile:hover
{
background-color: #5d606e;
.semester-tile:hover {
background-color: #e1e1e1;
}
.semester-tile p
{
pointer-events: none;
.semester-tile p {
pointer-events: none;
font-weight: bold;
font-size: 23px;
}
.semester-tile .step-container
{
pointer-events: none;
.semester-tile .step-container {
pointer-events: none;
}