Skip to content
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
25 changes: 11 additions & 14 deletions assets/scss/td/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -173,20 +173,17 @@ $td-link-underline-offsets: (
}
}

@if $enable-dark-mode {
@include color-mode(dark) {
// EXPERIMENTAL better contrast for dark homepage navbar links.
// Opt-in via body_class:
.td-navbar-links-all-active {
.nav-link {
// The homepage is the only page that does not have any navbar items
// that are active, because the user isn't viewing a page in any other
// section. Make nav-links more contrasted by setting all entries (which
// happen to be non-active) to the active color.
--bs-nav-link-color: var(--bs-navbar-active-color) !important;
--bs-nav-link-hover-color: var(--bs-navbar-active-color) !important;
}
}
// EXPERIMENTAL better contrast for dark homepage navbar links. Opt-in via
// body_class, or custom CSS, optionally guarded/wrapped by .td-home and/or
// @include color-mode(dark):
.td-navbar-links-all-active {
.nav-link {
// The homepage is the only page that does not have any navbar items
// that are active, because the user isn't viewing a page in any other
// section. Make nav-links more contrasted by setting all entries (which
// happen to be non-active) to the active color.
--bs-nav-link-color: var(--bs-navbar-active-color) !important;
--bs-nav-link-hover-color: var(--bs-navbar-active-color) !important;
}
}

Expand Down
10 changes: 10 additions & 0 deletions assets/scss/td/extra/_bs-defaults.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Bootstrap default theme color overrides:
// TODO: rework the td-box--* classes so that they don't override `color`;
// otherwise we can't use Bootstrap's CSS variables:
// --bs-link-color: $color !important;
// --bs-link-color-rgb: red !important;
.td-box--primary {
a {
color: tint-color($primary, 80%) !important;
}
}
4 changes: 4 additions & 0 deletions assets/scss/td/extra/_index.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
// Experimental extra styles that projects can test run. These styles might
// eventually be merged into the core Docsy theme.

// @import 'bs-defaults'; // Commented out on purpose, see note below.
@import 'buttons';
@import 'main-container';
@import 'navbar';

// NOTE: we do NOT import bs-defaults here, to leave it opt-in for projects that
// use Bootstrap's default color theme, like the Docsy and Docsy Example sites.

// -----------------------------------------------------------------------------
// Margin fix for nested lists [EXPERIMENTAL]

Expand Down
1 change: 1 addition & 0 deletions docsy.dev/assets/scss/_styles_project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
@import 'td/color-adjustments-dark';
@import 'td/code-dark';
@import 'td/extra';
@import 'td/extra/bs-defaults';
@import 'td/gcs-search-dark';

// Custom Docsy website styles below this point:
Expand Down
13 changes: 8 additions & 5 deletions docsy.dev/content/en/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,17 @@ params:

{{% blocks/lead color="primary" %}}

Docsy is a theme for the Hugo static site generator that's specifically designed
for technical documentation sets. Our aim is to help you get a working
Docsy is a theme for the [Hugo][] static site generator that's specifically
designed for technical documentation sets. Our aim is to help you get a working
documentation site up and running as easily as possible, so you can concentrate
on creating great content for your users.

<a href="https://www.netlify.com/" target="_blank" rel="noopener">
<img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" />
</a>
[![Deploys by Netlify][netlify-badge]][netlify]

[Hugo]: https://gohugo.io/
[netlify]: https://www.netlify.com/
[netlify-badge]: https://www.netlify.com/img/global/badges/netlify-color-accent.svg

{{% /blocks/lead %}}

{{% blocks/section color="dark" type="row" %}}
Expand Down
8 changes: 8 additions & 0 deletions docsy.dev/content/en/docs/content/lookandfeel.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ To enable them, add the following to your project's `_styles_project.scss`:
@import 'td/extra';
```

If your project uses Bootstrap's default color theme (that is, you do not
override `$primary`, `$secondary`, etc.) then you can opt in to the extra
dark-mode style adjustments as follows:

```scss
@import 'td/extra/bs-defaults';
```

[td/extra]: https://github.com/google/docsy/tree/main/assets/scss/td/extra
[assets/scss/td]: https://github.com/google/docsy/tree/main/assets/scss/td
[Alerts]: /docs/content/adding-content/#alerts
Expand Down
13 changes: 8 additions & 5 deletions docsy.dev/content/en/tests/blocks-cover/height-auto/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,17 @@ description: A Hugo theme for creating great technical documentation sites

{{% blocks/lead color="primary" %}}

Docsy is a theme for the Hugo static site generator that's specifically designed
for technical documentation sets. Our aim is to help you get a working
Docsy is a theme for the [Hugo][] static site generator that's specifically
designed for technical documentation sets. Our aim is to help you get a working
documentation site up and running as easily as possible, so you can concentrate
on creating great content for your users.

<a href="https://www.netlify.com/" target="_blank" rel="noopener">
<img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" />
</a>
[![Deploys by Netlify][netlify-badge]][netlify]

[Hugo]: https://gohugo.io/
[netlify]: https://www.netlify.com/
[netlify-badge]: https://www.netlify.com/img/global/badges/netlify-color-accent.svg

{{% /blocks/lead %}}

{{% blocks/section color="dark" type="row" %}}
Expand Down
13 changes: 8 additions & 5 deletions docsy.dev/content/en/tests/blocks-cover/height-full/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,17 @@ description: A Hugo theme for creating great technical documentation sites

{{% blocks/lead color="primary" %}}

Docsy is a theme for the Hugo static site generator that's specifically designed
for technical documentation sets. Our aim is to help you get a working
Docsy is a theme for the [Hugo][] static site generator that's specifically
designed for technical documentation sets. Our aim is to help you get a working
documentation site up and running as easily as possible, so you can concentrate
on creating great content for your users.

<a href="https://www.netlify.com/" target="_blank" rel="noopener">
<img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" />
</a>
[![Deploys by Netlify][netlify-badge]][netlify]

[Hugo]: https://gohugo.io/
[netlify]: https://www.netlify.com/
[netlify-badge]: https://www.netlify.com/img/global/badges/netlify-color-accent.svg

{{% /blocks/lead %}}

{{% blocks/section color="dark" type="row" %}}
Expand Down
13 changes: 8 additions & 5 deletions docsy.dev/content/en/tests/blocks-cover/height-min/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,17 @@ params:

{{% blocks/lead color="primary" %}}

Docsy is a theme for the Hugo static site generator that's specifically designed
for technical documentation sets. Our aim is to help you get a working
Docsy is a theme for the [Hugo][] static site generator that's specifically
designed for technical documentation sets. Our aim is to help you get a working
documentation site up and running as easily as possible, so you can concentrate
on creating great content for your users.

<a href="https://www.netlify.com/" target="_blank" rel="noopener">
<img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" />
</a>
[![Deploys by Netlify][netlify-badge]][netlify]

[Hugo]: https://gohugo.io/
[netlify]: https://www.netlify.com/
[netlify-badge]: https://www.netlify.com/img/global/badges/netlify-color-accent.svg

{{% /blocks/lead %}}

{{% blocks/section color="dark" type="row" %}}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docsy",
"version": "0.14.0-dev+94-g4fdc4844",
"version": "0.14.0-dev+95-g83e9a3e6",
"repository": "github:google/docsy",
"homepage": "https://www.docsy.dev",
"license": "Apache-2.0",
Expand Down
Loading