Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dark mode impl-1 🌓 #20

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions scripts/copy-slds.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ fs.cp(
console.log('Done copying SLDS resources');
}
);

fs.cp('./src/styles/styles.css', './src/assets', { recursive: true }, () => {
console.log('Done copying styles.css');
});
66 changes: 66 additions & 0 deletions src/layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,72 @@
rel="stylesheet"
href="$assetsDir/styles/salesforce-lightning-design-system.css"
/>

<style>
[data-theme='light'] {
--background-color-base: #eef4ff;
--text-color-base: #181818;
--brandBackgroundPrimary: #f0f6fc;
--thumbBG: var(--slds-g-color-neutral-base-100);
--scrollbarBG: var(--slds-c-card-color-border);
--border-width-base: 0.5rem;
}

[data-theme='dark'] {
--thumbBG: var(--slds-g-color-neutral-base-100);
--scrollbarBG: var(--slds-c-card-color-border);
--background-color-base: #0d1117;
--text-color-base: #f0f6fc;
--slds-g-color-neutral-base-10: #f0f6fc;
--slds-c-card-color-background: #0d1117;
--slds-c-card-color-border: #3d444d;
--slds-c-card-shadow: 0px 1px 0px 0px #01040966;
--slds-g-color-neutral-base-100: #010409;
--brandBackgroundPrimary: #0d1117 !important;
--slds-g-color-neutral-base-95: #0d1117;
--border-width-base: 0.0625rem;
--slds-g-color-border-base-1: #3d444d;
--slds-g-color-neutral-base-30: #9198a1;
--border-radius-base: 0.25rem;
--slds-c-input-color-border: #3d444d;
--slds-g-color-border-base-4: #3d444d;
--slds-g-color-neutral-base-50: #9198a1;
}

*::selection {
background: #0159e7;
color: #ffffff;
}
*::-moz-selection {
background: #0159e7;
color: #ffffff;
}
*::-webkit-selection {
background: #0159e7;
color: #ffffff;
}
html {
background: var(--background-color-base);
}
body {
background-color: var(--background-color-base) !important;
color: var(--text-color-base) !important;
scrollbar-width: thin;
scrollbar-color: var(--thumbBG) var(--scrollbarBG);
}

body::-webkit-scrollbar {
width: 11px;
}
body::-webkit-scrollbar-track {
background: var(--scrollbarBG);
}
body::-webkit-scrollbar-thumb {
background-color: var(--thumbBG);
border-radius: 6px;
border: 3px solid var(--scrollbarBG);
}
</style>
</head>
<body>
{{{body}}} {{{lwr_resources}}}
Expand Down
43 changes: 26 additions & 17 deletions src/modules/main/logViewer/logViewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ a {
:host {
height: 100%;
line-height: 1;
color: black;
color: var(--text-color-base);
font-size: 0.8125rem;
}
/* tables still need 'cellspacing="0"' in the markup */
Expand Down Expand Up @@ -180,7 +180,8 @@ q {
position: relative;
overflow: visible;
height: 100%;
border-bottom: 1px solid #c9c9c9;
border-bottom: var(--border-width-base) solid
var(--slds-c-card-color-border);
padding-bottom: 0.75rem;
}

Expand All @@ -193,7 +194,7 @@ q {
font-size: 0.75rem;
padding-top: 0.75rem;
padding-bottom: 0.25rem;
color: #747474;
color: var(--slds-g-color-neutral-base-50);
max-width: 12rem;
overflow: hidden;
text-overflow: ellipsis;
Expand Down Expand Up @@ -258,7 +259,7 @@ q {

.metrics-widget li .metricsValue {
font-size: 1rem;
color: #032d60;
color: #0159e7;
}
.reportView
.reportBuilderContainer
Expand All @@ -277,6 +278,10 @@ q {
overflow: visible;
}

.dashboard-container {
border: var(--border-width-base) solid var(--slds-c-card-color-border);
border-radius: var(--border-radius-base);
}
table {
margin: 0px;
padding: 0px;
Expand All @@ -286,7 +291,7 @@ table {
}
th,
td {
border-right: 0.5px solid #a8b8c7;
border-right: var(--border-width-base) solid var(--slds-c-card-color-border);
padding-left: 6px;
padding-right: 6px;
padding-top: 6px;
Expand All @@ -296,11 +301,12 @@ td {
}

td {
border-bottom: 0.5px solid #a8b8c7;
border-bottom: var(--border-width-base) solid
var(--slds-c-card-color-border);
}

th {
background-color: #ecebea;
background-color: var(--slds-g-color-neutral-base-100);
}

.lightning-table-cell-measure-header-value {
Expand All @@ -309,12 +315,15 @@ th {
}
.slds-page-header {
padding: 1rem 1rem;
border-bottom: 1px solid rgb(201, 201, 201);
border-radius: 0.25rem;
background: rgb(243, 243, 243);
/* border-bottom: 1px solid rgb(201, 201, 201); */
/* border-radius: 0.25rem; */
background: var(--slds-c-card-color-background);
background-clip: padding-box;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.1);
border: 1px solid rgb(201, 201, 201);
/* border: 1px solid rgb(201, 201, 201); */
border-top: none;
border-left: none;
border-right: none;
}

.widgets-inner {
Expand Down Expand Up @@ -350,14 +359,14 @@ th {
}

.line-number-text {
color: rgb(68, 68, 68);
color: var(--slds-g-color-neutral-base-50);
font-weight: 400;
}

.line-text {
line-height: normal;
color: #16315a;
fill: #16315a;
color: var(--text-color-base);
fill: var(--text-color-base);
font-weight: 400;
}

Expand Down Expand Up @@ -428,16 +437,16 @@ th {
}

.dashboard-widget {
background-color: white;
background-color: var(--slds-c-card-color-background);
}

.icon-active-filters {
background-color: #0176d3;
border-color: #0176d3;
color: #fff;
color: var(--text-color-base);
}

.widget-container {
border-right: 0.1px solid #c9c9c9;
border-right: 0.1px solid var(--slds-c-card-color-border);
/* border-left: 0.1px solid grey; */
}
18 changes: 6 additions & 12 deletions src/modules/main/logViewer/logViewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,8 @@ <h1>
<div
class="layout-inner-container"
style="
background-color: rgb(
255,
255,
255
background-color: var(
--slds-c-card-color-background
);
overflow-y: auto;
"
Expand All @@ -266,10 +264,8 @@ <h1>
class="grid-layout"
tabindex="-1"
style="
background-color: rgb(
255,
255,
255
background-color: var(
--slds-c-card-color-background
);
background-position: left
top;
Expand Down Expand Up @@ -530,10 +526,8 @@ <h1>
background-position: left
top;
background-size: auto;
background-color: rgb(
255,
255,
255
background-color: var(
--slds-c-card-color-background
);
border-radius: 0px;
"
Expand Down
74 changes: 74 additions & 0 deletions src/modules/my/app/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/* First Header */
.first-header {
position: fixed;
top: 0;
left: 0;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
background-color: var(--slds-g-color-neutral-base-100);
color: var(--text-color-base);
padding: 10px 20px;
z-index: 1000;
height: 50px; /* Fixed height */
transition:
opacity 0.3s ease,
transform 0.3s ease;
}

.first-header.hidden {
opacity: 0;
transform: translateY(-50px); /* Slide up */
}

/* Second Header */
.second-header {
position: fixed;
top: 50px; /* Below the first header by default */
left: 0;
width: 100%;
justify-content: space-between;
align-items: center;
background-color: #1b96ff;
color: var(--text-color-base);
/* padding: 10px 20px; */
z-index: 999;
height: 40px; /* Fixed height */
transition: top 0.3s ease; /* Smooth transition for position change */
}

.second-header.move-to-top {
top: 0; /* Move to the top when the first header is hidden */
}

/* Content Section */
.content {
/* padding: 20px; */
padding-top: 90px; /* Reserve space for both headers (50px each) */
height: auto;
background-color: var(
--slds-c-card-color-background
); /* Optional: To make content distinct */
}

/* Logo Animation */
.logo {
font-size: 1.5rem;
font-weight: bold;
}

.move-to-second-header {
animation: moveLogo 0.5s ease forwards;
}

@keyframes moveLogo {
from {
transform: translateY(-50px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
15 changes: 9 additions & 6 deletions src/modules/my/app/app.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<template>
<!-- <my-multi-select-combobox
label="Value"
name="Value"
options={filterValueOptions}
></my-multi-select-combobox> -->
<my-app-navigation></my-app-navigation>
<div class="first-header">
<my-app-header></my-app-header>
</div>
<div class="second-header">
<my-app-navigation></my-app-navigation>
</div>
<div class="content">
<my-app-content></my-app-content>
</div>
</template>
Loading