adds dark mode

This commit is contained in:
Christian Beutel
2024-02-22 01:00:09 +01:00
parent a24662a56e
commit 442e13b7c7
27 changed files with 240 additions and 83 deletions

102
web/src/css/components.css Normal file
View File

@@ -0,0 +1,102 @@
@import 'tailwindcss/utilities';
@import 'tailwindcss/base';
@import 'tailwindcss/components';
.btn-primary {
@apply h-10 text-white rounded-lg px-4 py-2 bg-primary font-semibold transition-all hover:bg-primary-hover focus:ring-4 ring-input-border-focus
}
.btn-large {
@apply h-12 leading-8
}
.btn-secondary {
@apply rounded-lg px-4 py-2 border border-input-border-focus font-medium transition-all hover:bg-secondary-hover focus:ring-4 ring-input-border-focus
}
.btn-danger {
@apply h-10 text-white rounded-lg px-4 py-2 bg-red-500 font-semibold transition-all hover:bg-red-600 focus:ring-4 ring-red-100
}
.btn-disabled {
@apply bg-gray-500 hover:bg-gray-500
}
.btn-icon {
@apply rounded-full aspect-square h-7 hover:bg-secondary-hover focus:ring-4 ring-input-border-focus transition-colors;
}
.tab {
@apply p-4 rounded-t-lg
}
.tab:hover {
@apply bg-gray-100
}
.tab-active {
@apply bg-primary text-white
}
.tab-active:hover {
@apply bg-primary
}
.tooltip {
position: relative;
}
.tooltip:before,
.tooltip:after {
display: block;
opacity: 0;
pointer-events: none;
position: absolute;
transform: translate3d(0, -10px, 0);
transition: all .15s ease-in-out;
}
.tooltip:before {
background: rgba(36, 39, 52, 0.75);
border-radius: 4px;
color: #fff;
content: attr(data-title);
font-size: 14px;
padding: 6px 10px;
top: 24px;
white-space: nowrap;
}
.tooltip:hover:after,
.tooltip:hover:before {
opacity: 1;
transform: translate3d(0, 0, 0);
}
.spinner {
display: inline-block;
width: 32px;
height: 32px;
}
.spinner:after {
content: " ";
display: block;
width: 32px;
height: 32px;
border-radius: 50%;
border: 6px solid #fff;
border-color: #fff transparent #fff transparent;
animation: spinner 1.2s linear infinite;
}
@keyframes spinner {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}