Merge branch 'philippdormann/uptime-kuma/main' into philippdormann/uptime-kuma/feature/darkmode

This commit is contained in:
Philipp Dormann 2021-08-03 15:31:45 +02:00
commit b7e01bed99
No known key found for this signature in database
GPG Key ID: 3BB9ADD52DCA4314
8 changed files with 105 additions and 19 deletions

View File

@ -1,16 +1,46 @@
@import "vars.scss";
@import "node_modules/bootstrap/scss/bootstrap";
html,
body,
input,
.modal-content {
background: var(--page-background);
color: var(--main-font-color);
}
a,
.table,
.nav-link {
color: var(--main-font-color);
}
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
color: #0a0a0a;
}
.nav-link:hover,
.nav-link:focus {
color: #5cdd8b;
}
.form-control,
.form-control:focus,
.form-select,
.form-select:focus {
color: var(--main-font-color);
background-color: var(--background-4);
}
#app {
font-family: ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol,noto color emoji;
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
segoe ui, Roboto, helvetica neue, Arial, noto sans, sans-serif,
apple color emoji, segoe ui emoji, segoe ui symbol, noto color emoji;
}
.shadow-box {
overflow: hidden;
box-shadow: 0 15px 70px rgba(0, 0, 0, .1);
box-shadow: 0 15px 70px rgba(0, 0, 0, 0.1);
padding: 10px;
border-radius: 10px;
&.big-padding {
padding: 20px;
}
@ -22,10 +52,14 @@
}
.btn-primary {
color: white;
// color: white;
color: #0a0a0a;
&:hover, &:active, &:focus, &.active {
color: white;
&:hover,
&:active,
&:focus,
&.active {
color: #0a0a0a;
background-color: $highlight;
border-color: $highlight;
}
@ -36,3 +70,8 @@
backdrop-filter: blur(3px);
}
@media (prefers-color-scheme: dark) {
a:hover {
color: #7ce8a4;
}
}

View File

@ -1,8 +1,32 @@
$primary: #5CDD8B;
$danger: #DC3545;
$warning: #f8a306;
$primary: #5cdd8b;
$danger: #dc3545;
$warning: #dca235;
$link-color: #111;
$border-radius: 50rem;
$border-radius: .25rem;
$highlight: #7ce8a4;
$highlight-white: #e7faec;
$highlight-white: #e7faec;
:root {
color-scheme: light dark;
//
--page-background: #fafafa;
--background-secondary: #d0d3d5;
--background-4: #d0d3d5;
--background-ternary: #8e8e8e;
--background-sidebar-active: #e4e4e4;
--background-navbar: #FFF;
--main-font-color: #212529;
}
@media (prefers-color-scheme: dark) {
:root {
--page-background: #0a0a0a;
--background-secondary: #656565;
--background-4: #313131;
--background-ternary: #a7a7a7;
--background-sidebar-active: #777777;
--background-navbar: #333333;
--main-font-color: #e4e4e4;
}
}

View File

@ -149,7 +149,7 @@ export default {
border-radius: 50rem;
&.empty {
background-color: aliceblue;
background-color: #d0d3d5;
}
&.down {
@ -168,4 +168,8 @@ export default {
}
}
.hp-bar-big .beat.empty{
background-color: #848484;
}
</style>

View File

@ -490,3 +490,18 @@ export default {
},
}
</script>
<style>
.modal-dialog .form-text, .modal-dialog p{
color: var(--main-font-color);
}
.modal-content{
border: 1px solid var(--main-font-color);
}
@media (prefers-color-scheme: dark) {
.btn-close{
background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23FFF'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
opacity: 1;
}
}
</style>

View File

@ -7,7 +7,7 @@
<!-- Desktop header -->
<header v-if="! $root.isMobile" class="d-flex flex-wrap justify-content-center py-3 mb-3 border-bottom">
<router-link to="/dashboard" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto text-dark text-decoration-none">
<router-link to="/dashboard" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto text-decoration-none">
<object class="bi me-2 ms-4" width="40" height="40" data="/icon.svg" alt="Logo" />
<span class="fs-4 title">Uptime Kuma</span>
</router-link>
@ -28,7 +28,7 @@
<!-- Mobile header -->
<header v-else class="d-flex flex-wrap justify-content-center mt-3 mb-3">
<router-link to="/dashboard" class="d-flex align-items-center text-dark text-decoration-none">
<router-link to="/dashboard" class="d-flex align-items-center text-decoration-none">
<object class="bi" width="40" height="40" data="/icon.svg" />
<span class="fs-4 title ms-2">Uptime Kuma</span>
</router-link>
@ -113,7 +113,7 @@ export default {
height: 60px;
width: 100%;
left: 0;
background-color: #fff;
background-color: var(--background-navbar);
box-shadow: 0 15px 47px 0 rgba(0, 0, 0, 0.05), 0 5px 14px 0 rgba(0, 0, 0, 0.05);
text-align: center;
white-space: nowrap;

View File

@ -119,11 +119,11 @@ export default {
}
&:hover {
background-color: $highlight-white;
background-color: var(--background-4);
}
&.active {
background-color: #cdf8f4;
background-color: var(--background-4);
}
}
}

View File

@ -173,7 +173,7 @@ export default {
@import "../assets/vars";
.num {
font-size: 30px;
font-size: 1rem;
color: $primary;
font-weight: bold;
display: block;

View File

@ -205,4 +205,8 @@ export default {
.shadow-box {
padding: 20px;
}
.list-group-item{
background-color: var(--background-4);
color: var(--main-font-color);
}
</style>