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

[Outreachy] Optimize the registry for dark and light mode #5395

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
44 changes: 44 additions & 0 deletions assets/scss/_registry.scss
svrnm marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,47 @@
.registry-entry {
@extend .shadow;
}

// Optimize styles and responsiveness for dark and light mode, see https://getbootstrap.com/docs/5.3/customize/color-modes/
#searchForm .btn.btn-outline-success,
.btn-outline-danger,
.btn-outline-secondary {
&:hover {
color: var(--bs-white);
}
}

.badge.rounded-pill.text-bg-primary {
font-weight: $font-weight-bold;
}

$color-mode-type: data;
// Define dark mode colors for data container
$dark-border-color: darken(#cccccc, 20%);
$background-color: map-get($otel-colors, 'dark-background');

@include color-mode(dark) {
@media (prefers-color-scheme: dark) {
.border-bolded {
border-color: $dark-border-color;
}
// .border-danger {
// }
.card.registry-entry {
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8) !important;
}
.card.registry-entry,
.list-group > .list-group-item {
$dark-background: #262d2c;
}
}
// override search box entry border styling in dark mode for mobile devices
@media (max-width: 767.98px) {
.form-control {
border: 1px solid rgba(var(--bs-body-color-rgb), 0.6);
}
.ms-auto > .badge {
font-size: $font-size-sm;
}
}
}
2 changes: 2 additions & 0 deletions assets/scss/_variables_project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ $otel-colors: (
'blue-light': #cee1ff,
'purple': #425cc7,
'light-green': #c0f587,
'dark-background': #262d2c,
);

$otel-component-colors: (
Expand Down Expand Up @@ -43,3 +44,4 @@ $otel-registry-license-colors: (
$primary: map-get($otel-colors, 'blue');
$secondary: map-get($otel-colors, 'orange');
$td-enable-google-fonts: false;
$box-shadow-large: 0 20px 50px rgba(0, 0, 0, 0.8);
2 changes: 1 addition & 1 deletion layouts/partials/ecosystem/registry/entry.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
{{ $package = merge .package (index $remoteRegistries .package.registry) -}}
{{ $package = merge $package (dict "type" .registryType) -}}
{{ end -}}
{{ $highlightStyle := "" -}}
{{ $highlightStyle := "border-bolded" -}}
{{ if $isNew -}}
{{ $highlightStyle = "border-info" -}}
{{ end -}}
Expand Down