style rewrite
This commit is contained in:
parent
8c7067d5d9
commit
7c756e87c1
8 changed files with 737 additions and 376 deletions
|
|
@ -1,16 +1,32 @@
|
||||||
<header>
|
<!doctype html>
|
||||||
<h1>Login</h1>
|
<html lang="en">
|
||||||
</header>
|
<head>
|
||||||
<main>
|
<meta charset="UTF-8" />
|
||||||
<form method="post">
|
<title>Login</title>
|
||||||
<label>Login</label>
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<label>
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
<input type="text" name="login" />
|
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||||
</label>
|
<link rel="stylesheet" href="/static/style.css">
|
||||||
<label>Password</label>
|
<link rel="stylesheet" href="/static/fontawesome/css/fontawesome.min.css">
|
||||||
<label>
|
<link rel="stylesheet" href="/static/fontawesome/css/solid.css">
|
||||||
<input type="password" name="password" />
|
</head>
|
||||||
</label>
|
<body class="login-page">
|
||||||
<button type="submit">login</button>
|
<div class="login-card">
|
||||||
</form>
|
<div class="login-icon">
|
||||||
</main>
|
<i class="fa-solid fa-birthday-cake"></i>
|
||||||
|
</div>
|
||||||
|
<h1>Zaloguj się</h1>
|
||||||
|
<form method="post">
|
||||||
|
<label>
|
||||||
|
<span>Login</span>
|
||||||
|
<input type="text" name="login" />
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<span>Hasło</span>
|
||||||
|
<input type="password" name="password" />
|
||||||
|
</label>
|
||||||
|
<button type="submit">Zaloguj się</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,7 @@ func (h *Server) order(r *http.Request) (any, int, error) {
|
||||||
|
|
||||||
url := strings.Split(r.URL.String(), "/")
|
url := strings.Split(r.URL.String(), "/")
|
||||||
if len(url) < 3 || url[2] == "" {
|
if len(url) < 3 || url[2] == "" {
|
||||||
|
data.Order.Date = time.Now()
|
||||||
return data, http.StatusOK, nil
|
return data, http.StatusOK, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,368 +1,706 @@
|
||||||
:root {
|
:root {
|
||||||
--primary-color: #ff6b6b;
|
--surface: #fff8f0;
|
||||||
--primary-light: #ffeded;
|
--surface-container-low: #faf3e7;
|
||||||
--primary-dark: #e64c4c;
|
--surface-container-highest: #eae2d2;
|
||||||
--text-color: #333333;
|
--primary: #8c4d50;
|
||||||
--text-light: #666666;
|
--primary-container: #fcacaf;
|
||||||
--background-color: #f8f9fa;
|
--primary-hover: #7a3f42;
|
||||||
--white: #ffffff;
|
--on-background: #363227;
|
||||||
--border-color: #e4e9ec;
|
--on-surface: #363227;
|
||||||
--hover-color: #f5f5f5;
|
--on-surface-variant: #645f52;
|
||||||
--shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
--outline-variant: #b9b1a3;
|
||||||
--bottom-shadow: 0 4px 2px -2px rgba(0, 0, 0, 0.1);
|
--secondary-container: #e0f5cb;
|
||||||
--font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
--on-secondary-container: #4c5e3e;
|
||||||
--transition: 0.2s ease;
|
--nav-height: 4rem;
|
||||||
--radius: 6px;
|
--border-radius: 48px;
|
||||||
|
--small-radius: 24px;
|
||||||
|
--small-border-radius: 8px;
|
||||||
|
--max-content-width: 80rem;
|
||||||
|
--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
|
||||||
|
--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
|
||||||
|
--shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
|
||||||
|
--transition: 0.2s ease;
|
||||||
|
--transition-slow: 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: var(--font-main);
|
font-family: "Plus Jakarta Sans", sans-serif;
|
||||||
color: var(--text-color);
|
color: var(--on-background);
|
||||||
background-color: var(--background-color);
|
background-color: var(--surface);
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fadeInUp {
|
||||||
|
from { opacity: 0; transform: translateY(8px); }
|
||||||
|
to { opacity: 1; transform: translateY(0); }
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fadeIn {
|
||||||
|
from { opacity: 0; }
|
||||||
|
to { opacity: 1; }
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes slideDown {
|
||||||
|
from { opacity: 0; max-height: 0; }
|
||||||
|
to { opacity: 1; max-height: 500px; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sidebar */
|
|
||||||
aside {
|
aside {
|
||||||
min-width: 4.5rem;
|
min-width: 5rem;
|
||||||
max-width: 4.5rem;
|
max-width: 5rem;
|
||||||
background-color: var(--primary-color);
|
background-color: var(--surface-container-low);
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
border-right: 1px solid var(--border-color);
|
box-shadow: var(--shadow-md);
|
||||||
box-shadow: var(--shadow);
|
z-index: 10;
|
||||||
z-index: 10;
|
border-radius: 0 var(--small-radius) var(--small-radius) 0;
|
||||||
|
border-right: 1px solid var(--outline-variant);
|
||||||
|
animation: fadeIn 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav {
|
nav {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-top: 2rem;
|
padding-top: 2rem;
|
||||||
gap: 1.5rem;
|
gap: 0.5rem;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav>a {
|
nav > a {
|
||||||
color: var(--white);
|
color: var(--on-surface-variant);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-size: 1.5rem;
|
font-size: 1.3rem;
|
||||||
width: 3rem;
|
width: 3rem;
|
||||||
height: 3rem;
|
height: 3rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-radius: 50%;
|
border-radius: var(--small-border-radius);
|
||||||
transition: background-color var(--transition);
|
transition: all var(--transition);
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav>a:hover {
|
nav > a:hover {
|
||||||
background-color: var(--primary-dark);
|
background-color: var(--primary-container);
|
||||||
|
color: var(--primary);
|
||||||
|
transform: scale(1.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
nav>a:last-child {
|
nav > a:active {
|
||||||
margin-top: auto;
|
transform: scale(0.95);
|
||||||
margin-bottom: 2rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nav>a>i {
|
nav > a:last-child {
|
||||||
text-decoration: none;
|
margin-top: auto;
|
||||||
color: var(--white);
|
margin-bottom: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tooltip for sidebar icons */
|
nav > a > i {
|
||||||
nav>a::after {
|
text-decoration: none;
|
||||||
content: attr(data-title);
|
color: inherit;
|
||||||
position: absolute;
|
|
||||||
left: 120%;
|
|
||||||
top: 50%;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
background-color: var(--text-color);
|
|
||||||
color: var(--white);
|
|
||||||
padding: 0.3rem 0.8rem;
|
|
||||||
border-radius: var(--radius);
|
|
||||||
font-size: 0.8rem;
|
|
||||||
white-space: nowrap;
|
|
||||||
opacity: 0;
|
|
||||||
pointer-events: none;
|
|
||||||
transition: opacity var(--transition);
|
|
||||||
z-index: 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nav>a:hover::after {
|
nav > a::after {
|
||||||
opacity: 1;
|
content: attr(data-title);
|
||||||
|
position: absolute;
|
||||||
|
left: 120%;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
background-color: var(--on-background);
|
||||||
|
color: var(--surface);
|
||||||
|
padding: 0.4rem 0.8rem;
|
||||||
|
border-radius: var(--small-border-radius);
|
||||||
|
font-size: 0.8rem;
|
||||||
|
font-weight: 500;
|
||||||
|
white-space: nowrap;
|
||||||
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
transition: all var(--transition-slow);
|
||||||
|
z-index: 1;
|
||||||
|
box-shadow: var(--shadow-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
nav > a:hover::after {
|
||||||
|
opacity: 1;
|
||||||
|
left: 130%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Main content area */
|
|
||||||
.app-body {
|
.app-body {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
margin-left: 4.5rem;
|
margin-left: 5rem;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100dvh;
|
height: 100dvh;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
animation: fadeInUp 0.35s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
background-color: var(--white);
|
background-color: var(--surface);
|
||||||
border-bottom: 1px solid var(--border-color);
|
border-bottom: 1px solid var(--outline-variant);
|
||||||
padding: 1rem 2rem;
|
padding: 1rem 2rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
position: sticky;
|
||||||
position: sticky;
|
top: 0;
|
||||||
top: 0;
|
z-index: 5;
|
||||||
z-index: 5;
|
transition: box-shadow var(--transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
header h1 {
|
||||||
font-size: 1.8rem;
|
font-family: "Plus Jakarta Sans", sans-serif;
|
||||||
font-weight: 600;
|
font-size: 1.5rem;
|
||||||
color: var(--primary-color);
|
font-weight: 700;
|
||||||
|
color: var(--on-background);
|
||||||
|
letter-spacing: -0.02em;
|
||||||
}
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 2rem;
|
padding: 1.5rem 2rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100%;
|
gap: 0.75rem;
|
||||||
gap: 1.5rem;
|
overflow-y: auto;
|
||||||
overflow: hidden;
|
min-height: 0;
|
||||||
|
max-width: var(--max-content-width);
|
||||||
|
width: 100%;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbar {
|
||||||
|
display: flex;
|
||||||
|
gap: 0.75rem;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Search form */
|
|
||||||
.search-container {
|
.search-container {
|
||||||
background-color: var(--white);
|
background-color: var(--surface);
|
||||||
border-radius: var(--radius);
|
border: 1px solid var(--outline-variant);
|
||||||
padding: 1.25rem;
|
border-radius: var(--small-radius);
|
||||||
display: flex;
|
padding: 1rem 1.25rem;
|
||||||
flex-wrap: wrap;
|
display: flex;
|
||||||
gap: 1rem;
|
flex-wrap: wrap;
|
||||||
align-items: flex-end;
|
gap: 0.75rem;
|
||||||
box-shadow: var(--shadow);
|
align-items: flex-end;
|
||||||
|
box-shadow: var(--shadow-sm);
|
||||||
|
transition: box-shadow var(--transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-container:hover {
|
||||||
|
box-shadow: var(--shadow-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-box {
|
.search-box {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 250px;
|
min-width: 200px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-box input {
|
.search-box input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0.75rem 1rem 0.75rem 2.5rem;
|
padding: 0.5rem 1rem 0.5rem 2.5rem;
|
||||||
border: 1px solid var(--border-color);
|
border: 1px solid var(--outline-variant);
|
||||||
border-radius: var(--radius);
|
border-radius: var(--small-border-radius);
|
||||||
font-size: 1rem;
|
font-size: 0.85rem;
|
||||||
transition: border-color var(--transition);
|
font-family: inherit;
|
||||||
|
background-color: var(--surface);
|
||||||
|
color: var(--on-surface);
|
||||||
|
transition: all var(--transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-box input:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: var(--primary);
|
||||||
|
box-shadow: 0 0 0 3px rgba(140, 77, 80, 0.12);
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-box::before {
|
.search-box::before {
|
||||||
content: "🔍";
|
content: "\f002";
|
||||||
position: absolute;
|
font-family: "Font Awesome 6 Free";
|
||||||
left: 1rem;
|
font-weight: 900;
|
||||||
top: 50%;
|
position: absolute;
|
||||||
transform: translateY(-50%);
|
left: 1rem;
|
||||||
color: var(--text-light);
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
color: var(--on-surface-variant);
|
||||||
|
font-size: 0.8rem;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-container label:not(.search-box) {
|
.search-container label:not(.search-box) {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 0.5rem;
|
gap: 0.3rem;
|
||||||
font-size: 0.9rem;
|
font-size: 0.75rem;
|
||||||
color: var(--text-light);
|
font-weight: 600;
|
||||||
|
color: var(--on-surface-variant);
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-container input[type="date"] {
|
.search-container input[type="date"] {
|
||||||
padding: 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
border: 1px solid var(--border-color);
|
border: 1px solid var(--outline-variant);
|
||||||
border-radius: var(--radius);
|
border-radius: var(--small-border-radius);
|
||||||
min-width: 160px;
|
min-width: 140px;
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
background-color: var(--surface);
|
||||||
|
color: var(--on-surface);
|
||||||
|
transition: all var(--transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-container input:focus {
|
.search-container input[type="date"]:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--primary-color);
|
border-color: var(--primary);
|
||||||
box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
|
box-shadow: 0 0 0 3px rgba(140, 77, 80, 0.12);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
padding: 0.55rem 1.3rem;
|
||||||
|
background-color: var(--primary);
|
||||||
|
color: #fff;
|
||||||
|
border: none;
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
font-size: 0.85rem;
|
||||||
|
font-weight: 600;
|
||||||
|
font-family: inherit;
|
||||||
|
cursor: pointer;
|
||||||
|
text-decoration: none;
|
||||||
|
transition: all var(--transition);
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary:hover {
|
||||||
|
background-color: var(--primary-hover);
|
||||||
|
color: #fff;
|
||||||
|
transform: scale(1.02);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary:active {
|
||||||
|
transform: scale(0.97);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Table styling */
|
|
||||||
#results-table {
|
#results-table {
|
||||||
background-color: var(--white);
|
background-color: var(--surface);
|
||||||
border-radius: var(--radius);
|
border: 1px solid var(--outline-variant);
|
||||||
box-shadow: var(--shadow);
|
border-radius: var(--small-radius);
|
||||||
/* overflow: hidden; */
|
box-shadow: var(--shadow-sm);
|
||||||
margin-top: 1rem;
|
overflow: hidden;
|
||||||
|
transition: box-shadow var(--transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
#results-table:hover {
|
||||||
|
box-shadow: var(--shadow-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
border-spacing: 0;
|
border-spacing: 0;
|
||||||
font-size: 0.95rem;
|
font-size: 0.85rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
thead {
|
thead {
|
||||||
border-bottom: 1px solid var(--border-color);
|
border-bottom: 2px solid var(--outline-variant);
|
||||||
background-color: var(--white);
|
background-color: var(--surface-container-low);
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
box-shadow: 0 2px 0 var(--border-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
tbody th {
|
|
||||||
font-weight: 300;
|
|
||||||
color: var(--text-color);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
thead th {
|
thead th {
|
||||||
color: var(--text-light);
|
color: var(--on-surface-variant);
|
||||||
font-weight: 100;
|
font-weight: 600;
|
||||||
font-size: rem;
|
font-size: 0.7rem;
|
||||||
font-size: 0.8rem;
|
text-transform: uppercase;
|
||||||
/* box-shadow: var(--bottom-shadow); */
|
letter-spacing: 0.05em;
|
||||||
|
padding: 0.75rem 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tbody th {
|
||||||
|
font-weight: 400;
|
||||||
|
color: var(--on-surface);
|
||||||
|
}
|
||||||
|
|
||||||
th {
|
th {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding: 1rem;
|
padding: 0.75rem 1rem;
|
||||||
/* color: var(--primary-dark); */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
td {
|
td {
|
||||||
padding: 1rem;
|
padding: 0.75rem 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
th:first-child,
|
th:first-child,
|
||||||
td:first-child {
|
td:first-child {
|
||||||
padding-left: 1.5rem;
|
padding-left: 1.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
th:last-child,
|
th:last-child,
|
||||||
td:last-child {
|
td:last-child {
|
||||||
padding-right: 1.5rem;
|
padding-right: 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr {
|
||||||
|
transition: background-color var(--transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.clickable {
|
tr.clickable {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background-color var(--transition);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.clickable:hover {
|
tr.clickable:hover {
|
||||||
background-color: var(--hover-color);
|
background-color: var(--surface-container-low);
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.active {
|
tr.active {
|
||||||
background-color: var(--primary-light);
|
background-color: var(--primary-container);
|
||||||
|
}
|
||||||
|
|
||||||
|
tr:not(:last-child) {
|
||||||
|
border-bottom: 1px solid var(--outline-variant);
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-badge {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0.15rem 0.55rem;
|
||||||
|
border-radius: 999px;
|
||||||
|
font-size: 0.7rem;
|
||||||
|
font-weight: 600;
|
||||||
|
letter-spacing: 0.02em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-accepted {
|
||||||
|
background-color: #fff3e0;
|
||||||
|
color: #e65100;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-done {
|
||||||
|
background-color: #e8f5e9;
|
||||||
|
color: #2e7d32;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Order details */
|
|
||||||
.details-content {
|
.details-content {
|
||||||
background-color: var(--hover-color);
|
background-color: var(--surface-container-low);
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.details-content table {
|
.details-content table {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.details-content th {
|
.details-content th {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
font-weight: normal;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Links */
|
|
||||||
a {
|
a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: var(--text-light);
|
color: var(--on-surface-variant);
|
||||||
|
transition: color var(--transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: var(--primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
tr a {
|
tr a {
|
||||||
text-decoration: underline;
|
text-decoration: none;
|
||||||
color: var(--primary-color);
|
font-weight: 600;
|
||||||
|
color: var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
tr a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order {
|
.order {
|
||||||
flex-grow: 1;
|
display: grid;
|
||||||
display: flex;
|
grid-template-columns: 1fr 1fr;
|
||||||
flex-direction: row;
|
gap: 0.75rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 1.5rem;
|
align-content: start;
|
||||||
background-color: var(--white);
|
|
||||||
border-radius: var(--radius);
|
|
||||||
box-shadow: var(--shadow);
|
|
||||||
height: 100%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.order div {
|
.order > div {
|
||||||
flex-grow: 1;
|
display: flex;
|
||||||
display: flex;
|
flex-direction: column;
|
||||||
flex-direction: column;
|
gap: 0.65rem;
|
||||||
|
background-color: var(--surface);
|
||||||
|
border: 1px solid var(--outline-variant);
|
||||||
|
border-radius: var(--small-border-radius);
|
||||||
|
padding: 1rem 1.25rem;
|
||||||
|
transition: box-shadow var(--transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
.order>div {
|
.order > div:hover {
|
||||||
flex-basis: 0;
|
box-shadow: var(--shadow-sm);
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-contents>*:first-child,
|
.order > div:last-child:nth-child(odd) {
|
||||||
.order-contents>*:last-child {
|
grid-column: 1 / -1;
|
||||||
flex-grow: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.order label {
|
.order label {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
flex-direction: column;
|
||||||
flex-direction: row;
|
gap: 0.2rem;
|
||||||
align-items: center;
|
font-size: 0.75rem;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--on-surface-variant);
|
||||||
|
}
|
||||||
|
|
||||||
|
input, select {
|
||||||
|
padding: 0.45rem 0.7rem;
|
||||||
|
border: 1px solid var(--outline-variant);
|
||||||
|
border-radius: var(--small-border-radius);
|
||||||
|
font-size: 0.85rem;
|
||||||
|
font-family: inherit;
|
||||||
|
background-color: var(--surface);
|
||||||
|
color: var(--on-surface);
|
||||||
|
transition: all var(--transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
input:focus, select:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: var(--primary);
|
||||||
|
box-shadow: 0 0 0 3px rgba(140, 77, 80, 0.12);
|
||||||
|
}
|
||||||
|
|
||||||
|
button[type="submit"] {
|
||||||
|
padding: 0.5rem 1.5rem;
|
||||||
|
background-color: var(--primary);
|
||||||
|
color: #fff;
|
||||||
|
border: none;
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
font-size: 0.85rem;
|
||||||
|
font-weight: 600;
|
||||||
|
font-family: inherit;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all var(--transition);
|
||||||
|
align-self: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
button[type="submit"]:hover {
|
||||||
|
background-color: var(--primary-hover);
|
||||||
|
transform: scale(1.02);
|
||||||
|
}
|
||||||
|
|
||||||
|
button[type="submit"]:active {
|
||||||
|
transform: scale(0.97);
|
||||||
|
}
|
||||||
|
|
||||||
|
.order h2 {
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: var(--on-background);
|
||||||
|
letter-spacing: -0.01em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scrollable {
|
.scrollable {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Responsive adjustments */
|
#basket_table button, .order table button {
|
||||||
@media (max-width: 768px) {
|
padding: 0.3rem 0.5rem;
|
||||||
.search-container {
|
background-color: var(--primary-container);
|
||||||
flex-direction: column;
|
color: var(--primary);
|
||||||
align-items: stretch;
|
border: none;
|
||||||
}
|
border-radius: var(--small-border-radius);
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
transition: all var(--transition);
|
||||||
|
}
|
||||||
|
|
||||||
.search-container>* {
|
#basket_table button:hover, .order table button:hover {
|
||||||
width: 100%;
|
background-color: var(--primary);
|
||||||
}
|
color: #fff;
|
||||||
|
transform: scale(1.05);
|
||||||
|
}
|
||||||
|
|
||||||
aside {
|
#basket_table button:active, .order table button:active {
|
||||||
min-width: 3.5rem;
|
transform: scale(0.95);
|
||||||
max-width: 3.5rem;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.app-body {
|
#total-price {
|
||||||
margin-left: 3.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav a {
|
|
||||||
width: 2.5rem;
|
|
||||||
height: 2.5rem;
|
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
}
|
font-weight: 700;
|
||||||
}
|
color: var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.order table {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.order table th {
|
||||||
|
padding: 0.35rem 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.htmx-request {
|
||||||
|
opacity: 0.7;
|
||||||
|
pointer-events: none;
|
||||||
|
transition: opacity var(--transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-page {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
min-height: 100dvh;
|
||||||
|
background-color: var(--surface-container-low);
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-card {
|
||||||
|
background-color: var(--surface);
|
||||||
|
border: 1px solid var(--outline-variant);
|
||||||
|
border-radius: var(--small-radius);
|
||||||
|
padding: 2.5rem;
|
||||||
|
box-shadow: var(--shadow-lg);
|
||||||
|
width: 100%;
|
||||||
|
max-width: 26rem;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-card::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 4px;
|
||||||
|
background: linear-gradient(90deg, var(--primary), var(--primary-container));
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-icon {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
font-size: 2.5rem;
|
||||||
|
color: var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-card h1 {
|
||||||
|
font-family: "Plus Jakarta Sans", sans-serif;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
font-weight: 700;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
color: var(--on-background);
|
||||||
|
text-align: center;
|
||||||
|
letter-spacing: -0.02em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-card form {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-card label {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.35rem;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--on-surface-variant);
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-card button {
|
||||||
|
padding: 0.75rem 2rem;
|
||||||
|
background-color: var(--primary);
|
||||||
|
color: #fff;
|
||||||
|
border: none;
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 600;
|
||||||
|
font-family: inherit;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all var(--transition);
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-card button:hover {
|
||||||
|
background-color: var(--primary-hover);
|
||||||
|
transform: scale(1.02);
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-card button:active {
|
||||||
|
transform: scale(0.97);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1024px) {
|
||||||
|
.order {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.order > div:last-child:nth-child(odd) {
|
||||||
|
grid-column: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.toolbar {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: stretch;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-container {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: stretch;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-container > * {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
aside {
|
||||||
|
min-width: 3.5rem;
|
||||||
|
max-width: 3.5rem;
|
||||||
|
border-radius: 0 var(--small-border-radius) var(--small-border-radius) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-body {
|
||||||
|
margin-left: 3.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav a {
|
||||||
|
width: 2.5rem;
|
||||||
|
height: 2.5rem;
|
||||||
|
font-size: 1.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
padding: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
padding: 0.75rem 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
header h1 {
|
||||||
|
font-size: 1.15rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.order > div {
|
||||||
|
padding: 0.85rem 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,36 +1,34 @@
|
||||||
{{define "title"}}
|
{{define "title"}}
|
||||||
Cake {{.ID}}
|
Ciasto {{if .ID}}#{{.ID}}{{else}}nowe{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{define "main"}}
|
{{define "main"}}
|
||||||
<main>
|
<main>
|
||||||
<form method="post">
|
<form method="post" class="order">
|
||||||
<div>
|
<div>
|
||||||
<h2>Info</h2>
|
<h2>Informacje o cieście</h2>
|
||||||
<label>
|
<input hidden="hidden" name="id" value="{{.ID}}">
|
||||||
<input hidden="hidden" name="id" value="{{.ID}}">
|
<label>Nazwa
|
||||||
</label>
|
|
||||||
<label>name</label>
|
|
||||||
<label>
|
|
||||||
<input type="text" name="name" value="{{.Name}}">
|
<input type="text" name="name" value="{{.Name}}">
|
||||||
</label>
|
</label>
|
||||||
<label>price</label>
|
<label>Cena (gr)
|
||||||
<label>
|
|
||||||
<input type="number" name="price" min="0" value="{{.Price}}">
|
<input type="number" name="price" min="0" value="{{.Price}}">
|
||||||
</label>
|
</label>
|
||||||
<label>category</label>
|
<label>Kategoria
|
||||||
<label for="category"></label><select name="category" id="category" >
|
<select name="category" id="category">
|
||||||
<option {{ if eq .Category "common" }}selected{{ end }} value="common">common</option>
|
<option {{ if eq .Category "common" }}selected{{ end }} value="common">common</option>
|
||||||
<option {{ if eq .Category "christmas" }}selected{{ end }} value="christmas">christmas</option>
|
<option {{ if eq .Category "christmas" }}selected{{ end }} value="christmas">christmas</option>
|
||||||
<option {{ if eq .Category "easter" }}selected{{ end }} value="easter">easter</option>
|
<option {{ if eq .Category "easter" }}selected{{ end }} value="easter">easter</option>
|
||||||
<option {{ if eq .Category "donuts" }}selected{{ end }} value="donuts">donuts</option>
|
<option {{ if eq .Category "donuts" }}selected{{ end }} value="donuts">donuts</option>
|
||||||
</select>
|
</select>
|
||||||
<label>availability</label>
|
</label>
|
||||||
<label for="availability"></label><select name="availability" id="availability" >
|
<label>Dostępność
|
||||||
<option {{ if eq .Availability "available" }}selected{{ end }} value="available">available</option>
|
<select name="availability" id="availability">
|
||||||
<option {{ if eq .Availability "unavailable" }}selected{{ end }} value="unavailable">unavailable</option>
|
<option {{ if eq .Availability "available" }}selected{{ end }} value="available">dostępne</option>
|
||||||
</select>
|
<option {{ if eq .Availability "unavailable" }}selected{{ end }} value="unavailable">niedostępne</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
<button type="submit">Zapisz ciasto</button>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit">submit</button>
|
|
||||||
</form>
|
</form>
|
||||||
</main>
|
</main>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,37 @@
|
||||||
{{define "title"}}
|
{{define "title"}}
|
||||||
Cakes
|
Ciasta
|
||||||
{{end}}
|
{{end}}
|
||||||
{{define "main"}}
|
{{define "main"}}
|
||||||
<main>
|
<main>
|
||||||
<table>
|
<div class="toolbar">
|
||||||
<tr>
|
<a href="/cake" class="btn-primary">
|
||||||
<th></th>
|
<i class="fa-solid fa-plus"></i>
|
||||||
<th>Name</th>
|
Nowe ciasto
|
||||||
<th>Price</th>
|
</a>
|
||||||
<th>Category</th>
|
</div>
|
||||||
<th>Availability</th>
|
<div id="results-table" class="scrollable">
|
||||||
</tr>
|
<table>
|
||||||
{{range .}}
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><a href="/cake/{{.ID}}">edit</a></th>
|
<th></th>
|
||||||
<th>{{.Name}}</th>
|
<th>Nazwa</th>
|
||||||
<th>{{.Price}}</th>
|
<th>Cena</th>
|
||||||
<th>{{.Category}}</th>
|
<th>Kategoria</th>
|
||||||
<th>{{.Availability}}</th>
|
<th>Dostępność</th>
|
||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
</thead>
|
||||||
</table>
|
<tbody>
|
||||||
|
{{range .}}
|
||||||
|
<tr>
|
||||||
|
<th><a href="/cake/{{.ID}}">Edytuj</a></th>
|
||||||
|
<th>{{.Name}}</th>
|
||||||
|
<th>{{.Price}} PLN</th>
|
||||||
|
<th>{{.Category}}</th>
|
||||||
|
<th>{{.Availability}}</th>
|
||||||
|
</tr>
|
||||||
|
{{end}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,9 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<title>{{template "title" .}}</title>
|
<title>{{template "title" .}}</title>
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||||
<script src="/static/htmx2.04.js" defer></script>
|
<script src="/static/htmx2.04.js" defer></script>
|
||||||
<script src="/static/order.js" ></script>
|
<script src="/static/order.js" ></script>
|
||||||
<link rel="stylesheet" href="/static/style.css">
|
<link rel="stylesheet" href="/static/style.css">
|
||||||
|
|
|
||||||
|
|
@ -9,78 +9,74 @@
|
||||||
<main>
|
<main>
|
||||||
<form method="post" class="order">
|
<form method="post" class="order">
|
||||||
{{with .Order}}
|
{{with .Order}}
|
||||||
<div class="order-contents">
|
<div>
|
||||||
<div>
|
<h2>Dane zamówienia</h2>
|
||||||
<h2>Dane zamówienia</h2>
|
<input hidden="hidden" name="id" value="{{.ID}}">
|
||||||
<label>
|
<label>Imię
|
||||||
<input hidden="hidden" name="id" value="{{.ID}}">
|
<input type="text" name="name" value="{{.Name}}">
|
||||||
</label>
|
</label>
|
||||||
<label>Imię
|
<label>Nazwisko
|
||||||
<input type="text" name="name" value="{{.Name}}">
|
<input type="text" name="surname" value="{{.Surname}}">
|
||||||
</label>
|
</label>
|
||||||
<label>Nazwisko
|
<label>Numer telefonu
|
||||||
<input type="text" name="surname" value="{{.Surname}}">
|
<input type="tel" name="phone" value="{{.Phone}}">
|
||||||
</label>
|
</label>
|
||||||
<label>Numer telefonu
|
<label>Lokalizacja
|
||||||
<input type="tel" name="phone" value="{{.Phone}}">
|
<select name="location">
|
||||||
</label>
|
<option {{ if eq .Location "Kartuzy" }}selected{{ end }} value="Kartuzy">Kartuzy</option>
|
||||||
<label>Lokalizacja
|
<option {{ if eq .Location "Somonino" }}selected{{ end }} value="Somonino">Somonino</option>
|
||||||
<select name="location">
|
</select>
|
||||||
<option {{ if eq .Location "Kartuzy" }}selected{{ end }} value="Kartuzy">Kartuzy</option>
|
</label>
|
||||||
<option {{ if eq .Location "Somonino" }}selected{{ end }} value="Somonino">Somonino</option>
|
<label>Data dostawy
|
||||||
</select>
|
<input type="date" name="date" value="{{.Date.Format "2006-01-02"}}">
|
||||||
</label>
|
</label>
|
||||||
<label>Data dostawy
|
<label>Status
|
||||||
<input type="date" name="date" value="{{.Date.Format "2006-01-02"}}">
|
<select name="status">
|
||||||
</label>
|
<option {{ if eq .Status "accepted" }}selected{{ end }} value="accepted">accepted</option>
|
||||||
<label>Status
|
<option {{ if eq .Status "done" }}selected{{ end }} value="done">done</option>
|
||||||
<select name="status">
|
</select>
|
||||||
<option {{ if eq .Status "accepted" }}selected{{ end }} value="accepted">accepted</option>
|
</label>
|
||||||
<option {{ if eq .Status "done" }}selected{{ end }} value="done">done</option>
|
<label>Zaliczka
|
||||||
</select>
|
<input type="number" name="paid" min="0" value="{{.Paid}}">
|
||||||
</label>
|
</label>
|
||||||
<label>Zaliczka
|
</div>
|
||||||
<input type="number" name="paid" min="0" value="{{.Paid}}">
|
<div>
|
||||||
</label>
|
<h2>Dodane ciasta</h2>
|
||||||
</div>
|
<div class="scrollable" style="flex:1">
|
||||||
<div>
|
<table id="basket_table">
|
||||||
<h2>Dodane Ciasta</h2>
|
</table>
|
||||||
<div class="scrollable">
|
|
||||||
<table id="basket_table" >
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<ul id="basket" class="scrollable">
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<label>
|
|
||||||
<small>Total:</small><br>
|
|
||||||
<p id="total-price">100PLN</p>
|
|
||||||
</label>
|
|
||||||
<button type="submit">Zapisz</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
<ul id="basket" class="scrollable">
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h2>Podsumowanie</h2>
|
||||||
|
<label>
|
||||||
|
<small>Do zapłaty:</small>
|
||||||
|
<span id="total-price">100 PLN</span>
|
||||||
|
</label>
|
||||||
|
<button type="submit">Zapisz</button>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{with .Catalogue}}
|
{{with .Catalogue}}
|
||||||
<div>
|
<div class="catalog-section">
|
||||||
<h2>Katalog</h2>
|
<h2>Katalog</h2>
|
||||||
<div class="scrollable">
|
<div class="scrollable">
|
||||||
<table>
|
<table>
|
||||||
{{range .}}
|
{{range .}}
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{.Name}}<br><small>{{.Category}} (#{{.ID}})</small></th>
|
<th>{{.Name}}<br><small>{{.Category}} (#{{.ID}})</small></th>
|
||||||
<th>{{.Price}}PLN</th>
|
<th>{{.Price}} PLN</th>
|
||||||
<th>
|
<th>
|
||||||
<button type=button onClick="addCake({{.ID}},{{.Name}}, {{.Price}}, 1)">
|
<button type=button onClick="addCake({{.ID}},{{.Name}}, {{.Price}}, 1)">
|
||||||
<i class="fa-solid fa-plus"></i>
|
<i class="fa-solid fa-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</form>
|
</form>
|
||||||
</main>
|
</main>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,12 @@ Zamówienia
|
||||||
{{end}}
|
{{end}}
|
||||||
{{define "main"}}
|
{{define "main"}}
|
||||||
<main>
|
<main>
|
||||||
|
<div class="toolbar">
|
||||||
|
<a href="/order" class="btn-primary">
|
||||||
|
<i class="fa-solid fa-plus"></i>
|
||||||
|
Nowe zamówienie
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<form class="search-container" hx-get="/orders/search" hx-target="#results-table"
|
<form class="search-container" hx-get="/orders/search" hx-target="#results-table"
|
||||||
hx-trigger="keyup delay:500ms, change">
|
hx-trigger="keyup delay:500ms, change">
|
||||||
<label>Data początkowa
|
<label>Data początkowa
|
||||||
|
|
@ -16,15 +22,6 @@ Zamówienia
|
||||||
{{template "orders-table" .Orders}}
|
{{template "orders-table" .Orders}}
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<style>
|
|
||||||
.hidden {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.active {
|
|
||||||
background-color: #e6f2ff;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
{{end}}
|
{{end}}
|
||||||
{{define "orders-table"}}
|
{{define "orders-table"}}
|
||||||
<table id="orders_table">
|
<table id="orders_table">
|
||||||
|
|
@ -46,9 +43,9 @@ Zamówienia
|
||||||
<th>{{.Location}}</th>
|
<th>{{.Location}}</th>
|
||||||
<th>{{.Date.Format "2006-01-02"}}</th>
|
<th>{{.Date.Format "2006-01-02"}}</th>
|
||||||
<th>{{.Total}} PLN</th>
|
<th>{{.Total}} PLN</th>
|
||||||
<th>{{.Status}}</th>
|
<th><span class="status-badge status-{{.Status}}">{{.Status}}</span></th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="hidden">
|
<tr class="hidden details-row">
|
||||||
<td colspan="6" class="details-content">
|
<td colspan="6" class="details-content">
|
||||||
{{template "order_info" .}}
|
{{template "order_info" .}}
|
||||||
</td>
|
</td>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue