colorful css
This commit is contained in:
parent
1d05c217b9
commit
75c2be36dd
3 changed files with 280 additions and 117 deletions
|
|
@ -1,149 +1,311 @@
|
||||||
:root {
|
:root {
|
||||||
--base-color: #ffffff;
|
--primary-color: #ff6b6b;
|
||||||
--base-font-color: #333333;
|
--primary-light: #ffeded;
|
||||||
--base-font-size: 16 px;
|
--primary-dark: #e64c4c;
|
||||||
--border-color: #d7dde4;
|
--text-color: #333333;
|
||||||
--body-color: #f8f9fa;
|
--text-light: #666666;
|
||||||
--hover-color: #eaeaea;
|
--background-color: #f8f9fa;
|
||||||
--transition-duration: 0.15 s;
|
--white: #ffffff;
|
||||||
--base-color-alt3: #e4e9ec;
|
--border-color: #e4e9ec;
|
||||||
|
--hover-color: #f5f5f5;
|
||||||
|
--shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||||
|
--font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||||
|
--transition: 0.2s ease;
|
||||||
|
--radius: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
* {
|
* {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
font-family: var(--font-main);
|
||||||
padding: 0;
|
color: var(--text-color);
|
||||||
font-family: sans-serif;
|
background-color: var(--background-color);
|
||||||
font-size: var(--base-font-size);
|
|
||||||
line-height: 1.5;
|
|
||||||
color: var(--base-font-color);
|
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 100vh;
|
min-height: 100vh;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: var(--body-color);
|
line-height: 1.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Sidebar */
|
||||||
aside {
|
aside {
|
||||||
min-width: 5rem;
|
min-width: 4.5rem;
|
||||||
max-width: 5rem;
|
max-width: 4.5rem;
|
||||||
padding: 1rem 0;
|
background-color: var(--primary-color);
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
display: flex;
|
position: fixed;
|
||||||
flex-direction: column;
|
left: 0;
|
||||||
|
top: 0;
|
||||||
border-right: 1px solid var(--border-color);
|
border-right: 1px solid var(--border-color);
|
||||||
background-color: var(--base-color);
|
box-shadow: var(--shadow);
|
||||||
align-items: center;
|
z-index: 10;
|
||||||
justify-content: space-between;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nav {
|
nav {
|
||||||
flex-shrink: 0;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
row-gap: 1rem;
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
overflow: auto;
|
padding-top: 2rem;
|
||||||
|
gap: 1.5rem;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nav>a {
|
||||||
|
color: var(--white);
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
width: 3rem;
|
||||||
|
height: 3rem;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
border-radius: 50%;
|
||||||
|
transition: background-color var(--transition);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav>a:hover {
|
||||||
|
background-color: var(--primary-dark);
|
||||||
|
}
|
||||||
|
|
||||||
|
nav>a:last-child {
|
||||||
|
margin-top: auto;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav>a>i {
|
||||||
|
text-decoration: none;
|
||||||
|
color: var(--white);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tooltip for sidebar icons */
|
||||||
|
nav>a::after {
|
||||||
|
content: attr(data-title);
|
||||||
|
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 {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Main content area */
|
||||||
.app-body {
|
.app-body {
|
||||||
height: 100vh;
|
flex: 1;
|
||||||
flex-grow: 1;
|
margin-left: 4.5rem;
|
||||||
|
padding: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow: auto;
|
min-height: 100vh;
|
||||||
}
|
overflow-x: hidden;
|
||||||
|
|
||||||
.app-body>* {
|
|
||||||
width: 100%;
|
|
||||||
padding: 0 1rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
max-height: 5rem;
|
background-color: var(--white);
|
||||||
min-height: 5rem;
|
border-bottom: 1px solid var(--border-color);
|
||||||
|
padding: 1rem 2rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 1.8rem;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--primary-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
padding: 0 0;
|
flex: 1;
|
||||||
flex-grow: 1;
|
padding: 2rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
position: relative;
|
gap: 1.5rem;
|
||||||
overflow: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Search form */
|
||||||
.search-container {
|
.search-container {
|
||||||
|
background-color: var(--white);
|
||||||
|
border-radius: var(--radius);
|
||||||
|
padding: 1.25rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-wrap: wrap;
|
||||||
|
gap: 1rem;
|
||||||
|
align-items: center;
|
||||||
|
box-shadow: var(--shadow);
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-container>*:first-child {
|
.search-box {
|
||||||
flex-grow: 1;
|
flex: 1;
|
||||||
|
min-width: 250px;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-container>* {
|
.search-box input {
|
||||||
flex-grow: 0;
|
width: 100%;
|
||||||
|
padding: 0.75rem 1rem 0.75rem 2.5rem;
|
||||||
|
border: 1px solid var(--border-color);
|
||||||
|
border-radius: var(--radius);
|
||||||
|
font-size: 1rem;
|
||||||
|
transition: border-color var(--transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.search-box::before {
|
||||||
|
content: "🔍";
|
||||||
|
position: absolute;
|
||||||
|
left: 1rem;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
color: var(--text-light);
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-container label:not(.search-box) {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.5rem;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
color: var(--text-light);
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-container input[type="date"] {
|
||||||
|
padding: 0.75rem;
|
||||||
|
border: 1px solid var(--border-color);
|
||||||
|
border-radius: var(--radius);
|
||||||
|
min-width: 160px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: var(--primary-color);
|
||||||
|
box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Table styling */
|
||||||
|
#results-table {
|
||||||
|
background-color: var(--white);
|
||||||
|
border-radius: var(--radius);
|
||||||
|
box-shadow: var(--shadow);
|
||||||
|
overflow: hidden;
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
cursor: pointer;
|
|
||||||
user-select: none;
|
|
||||||
border-collapse: collapse;
|
|
||||||
overflow: auto;
|
|
||||||
table-layout: fixed;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
border-collapse: separate;
|
||||||
|
border-spacing: 0;
|
||||||
|
font-size: 0.95rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
table>thead {
|
thead {
|
||||||
height: 4rem;
|
/* background-color: var(--primary-light); */
|
||||||
|
border-bottom: 1px black;
|
||||||
}
|
}
|
||||||
|
|
||||||
table>tbody {
|
tbody {
|
||||||
overflow: auto
|
color: var(--text-light);
|
||||||
}
|
}
|
||||||
|
|
||||||
table>*>tr {
|
thead th {
|
||||||
width: 100%;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
table>thead>tr>th {
|
th {
|
||||||
text-align: left;
|
|
||||||
font-weight: 300;
|
|
||||||
}
|
|
||||||
|
|
||||||
table>thead>tr {
|
|
||||||
border-bottom: 1px solid var(--border-color);
|
|
||||||
box-shadow: 0px 0px 10px 2px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
table>*>tr>* {
|
|
||||||
padding: 1rem 1rem;
|
|
||||||
border-bottom: 1px solid var(--border-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
table>*>tr>*:first-child {
|
|
||||||
padding-left: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
table>*>tr>*:last-child {
|
|
||||||
padding-right: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
table>tbody>tr:hover {
|
|
||||||
background-color: var(--hover-color);
|
|
||||||
box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.1) inset;
|
|
||||||
transition: var(--transition-duration);
|
|
||||||
}
|
|
||||||
|
|
||||||
table>tbody>tr>td {
|
|
||||||
font-weight: 200;
|
font-weight: 200;
|
||||||
|
text-align: left;
|
||||||
|
padding: 1rem;
|
||||||
|
/* color: var(--primary-dark); */
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
padding: 1rem;
|
||||||
|
border-top: 1px solid var(--border-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
th:first-child,
|
||||||
|
td:first-child {
|
||||||
|
padding-left: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
th:last-child,
|
||||||
|
td:last-child {
|
||||||
|
padding-right: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.clickable {
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color var(--transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.clickable:hover {
|
||||||
|
background-color: var(--hover-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.active {
|
||||||
|
background-color: var(--primary-light);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Order details */
|
||||||
|
.details-content {
|
||||||
|
background-color: var(--hover-color);
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.details-content table {
|
||||||
|
margin: 0;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.details-content th {
|
||||||
|
background-color: transparent;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Links */
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: var(--text-light);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Responsive adjustments */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.search-container {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: stretch;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-container>* {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
aside {
|
||||||
|
min-width: 3.5rem;
|
||||||
|
max-width: 3.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-body {
|
||||||
|
margin-left: 3.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav a {
|
||||||
|
width: 2.5rem;
|
||||||
|
height: 2.5rem;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
<title>{{template "title" .}}</title>
|
<title>{{template "title" .}}</title>
|
||||||
<script src="/static/htmx2.04.js" defer></script>
|
<script src="/static/htmx2.04.js" defer></script>
|
||||||
<link rel="stylesheet" href="/static/style.css">
|
<link rel="stylesheet" href="/static/style.css">
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{{define "nav"}}
|
{{define "nav"}}
|
||||||
<a href="/orders">All orders</a>
|
<a href="/orders" data-title="Zamówienia"><i class="fas fa-list-ul"></i></a>
|
||||||
<a href="/order">New order</a>
|
<a href="/order" data-title="Nowe zamówienie"><i class="fas fa-plus-circle"></i></a>
|
||||||
<a href="/cakes">All Cakes</a>
|
<a href="/cakes" data-title="Wszystkie ciasta"><i class="fas fa-birthday-cake"></i></a>
|
||||||
<a href="/cake">New Cake</a>
|
<a href="/cake" data-title="Nowe ciasto"><i class="fas fa-plus"></i></a>
|
||||||
<a href="/logout">Logout</a>
|
<a href="/logout" data-title="Wyloguj"><i class="fas fa-sign-out-alt"></i></a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue