Skip to content

Commit 75e091c

Browse files
authored
Add extra styles for cover CTA/layouts and update 0.14.0 blog post (#2514)
1 parent 9e8a919 commit 75e091c

File tree

22 files changed

+393
-106
lines changed

22 files changed

+393
-106
lines changed

assets/scss/td/extra/_buttons.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
$td-cta-buttons-row-breakpoint: sm !default;
2+
3+
.td-cta-buttons {
4+
--td-cta-buttons-gap: 1rem;
5+
display: flex;
6+
flex-direction: column;
7+
justify-content: center;
8+
gap: var(--td-cta-buttons-gap);
9+
10+
@if $td-cta-buttons-row-breakpoint {
11+
@include media-breakpoint-up($td-cta-buttons-row-breakpoint) {
12+
flex-direction: row;
13+
}
14+
}
15+
}

assets/scss/td/extra/_index.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
// Experimental extra styles that projects can test run. These styles might
22
// eventually be merged into the core Docsy theme.
33

4+
@import 'buttons';
5+
@import 'main-container';
46
@import 'navbar';
57

8+
// -----------------------------------------------------------------------------
69
// Margin fix for nested lists [EXPERIMENTAL]
710

811
body {
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Styles for docs-like pages without left sidebar
2+
3+
.td-no-left-sidebar .td-main {
4+
// Hide left sidebar
5+
.td-sidebar {
6+
display: none !important;
7+
}
8+
9+
// Adjust right/ToC sidebar, when visible (i.e., at md and up).
10+
.td-sidebar-toc {
11+
@include media-breakpoint-up(md) {
12+
@extend .col-md-2;
13+
display: block !important;
14+
}
15+
}
16+
17+
// The <main> element sibling of the ToC sidebar
18+
> div > main {
19+
// Always 10 col wide (unless the ToC sidebar is hidden)
20+
@extend .col-md-10;
21+
@extend .col-xl-10;
22+
23+
@include media-breakpoint-up(md) {
24+
padding-right: 3rem;
25+
}
26+
27+
@include media-breakpoint-up(lg) {
28+
// Center content on larger screens
29+
30+
.td-content,
31+
.td-breadcrumbs {
32+
max-width: 80%;
33+
margin-left: auto;
34+
margin-right: auto;
35+
36+
// Cancel .td-max-width-on-larger-screens
37+
// TODO: generalize this?
38+
> * {
39+
max-width: 100%;
40+
}
41+
}
42+
}
43+
}
44+
}

docsy.dev/assets/scss/_styles_project.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
@import 'blog';
1111
@import 'navbar';
1212

13-
// To keep the `td/extra` color adjustments, while dropping the text-decoration,
14-
// use the following class (on your body element), or copy the class styles to
15-
// your project's style file. This class isn't used, it's just an example.
13+
// EXAMPLE: To keep the `td/extra` color adjustments, while dropping the
14+
// text-decoration, use the following class (on your body element), or copy the
15+
// class styles to your project's style file. This class isn't used, it's just
16+
// an example.
1617
._td-navbar-no-decoration {
1718
.td-navbar {
1819
.nav-link {

docsy.dev/content/en/_index.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,36 @@
22
title: Docsy
33
description: A Hugo theme for creating great technical documentation sites
44
params:
5-
ui: { navbar_theme: dark}
5+
ui: { navbar_theme: dark }
6+
btn-lg: class="btn btn-lg btn-{1}" type="button"
67
---
78

8-
{{% blocks/cover title="Welcome to Docsy!" image_anchor="top" height="full" %}}
9+
{{% blocks/cover
10+
title="Welcome to Docsy!"
11+
image_anchor="top"
12+
height="full td-below-navbar"
13+
%}}
14+
15+
<!-- prettier-ignore -->
916
{{% param description %}}
1017
{.display-6}
1118

12-
<a class="btn btn-lg btn-primary me-3" href="about/">Learn More</a>
13-
<a class="btn btn-lg btn-secondary" href="docs/get-started/">Get started</a>
14-
{.p-initial .my-5}
19+
<!-- prettier-ignore -->
20+
<div class="td-cta-buttons my-5">
21+
<button {{% _param btn-lg primary %}} href="about/">
22+
Learn more
23+
</button>
24+
<button {{% _param btn-lg secondary %}} href="docs/get-started/">
25+
Get started
26+
</button>
27+
</div>
1528

1629
{{% blocks/link-down color="info" %}}
30+
1731
{{% /blocks/cover %}}
1832

1933
{{% blocks/lead color="primary" %}}
34+
2035
Docsy is a theme for the Hugo static site generator that's specifically designed
2136
for technical documentation sets. Our aim is to help you get a working
2237
documentation site up and running as easily as possible, so you can concentrate

docsy.dev/content/en/about/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ linkTitle: About
44
menu: {main: {weight: 10}}
55
---
66

7-
{{% blocks/cover title="About Docsy" height="auto" %}}
7+
{{% blocks/cover title="About Docsy" height="auto td-below-navbar" %}}
88

99
Docsy is a pre-configured Hugo theme that provides the core features and behaviors needed to create a technical documentation site. Use Docsy to set up your documentation website, including an optional Blog section, and then spend your time focusing on authoring technical content. Depending on how you choose to configure Docsy and whether you use a hosting service that supports continuous builds, you can even just add your Markdown or HTML content file into a folder on your source repository, and then sit back while it automatically gets added to your site - complete with updated menus.
1010

docsy.dev/content/en/blog/2025/0.13.0.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ cSpell:ignore: docsy FOUC lookandfeel mhchem katex notoc lightdark
1414

1515
{{% card header="Highlights" %}}
1616

17-
- {{% _param FA_LG fire warning %}} <span>Docsy [0.13.0] includes the **_[most
17+
- {{% _param FAS_LG fire warning %}} <span>Docsy [0.13.0] includes the **_[most
1818
upvoted][]_ enhancement** [request of 2025][], and more.</span>
19-
- {{% _param FA_LG check success %}} <span>This release has new features and
19+
- {{% _param FAS_LG check success %}} <span>This release has new features and
2020
only
2121
[minor breaking changes](#breaking-changes).[^explain-report-format]</span>
22-
- {{% _param FA_LG robot info %}} <span>Read about
22+
- {{% _param FAS_LG robot info %}} <span>Read about
2323
[our experiences](#upgrading-and-ai) using AI to
2424
[upgrade Docsy projects](#upgrade).</span>
2525

@@ -36,12 +36,12 @@ cSpell:ignore: docsy FOUC lookandfeel mhchem katex notoc lightdark
3636

3737
Docsy [0.13.0] comes with the following notable features and fixes:
3838

39-
- {{% _param FA compass "" %}} [Navigation and UX](#navigation-and-ux)
39+
- {{% _param FAS compass "" %}} [Navigation and UX](#navigation-and-ux)
4040
improvements including the **_most upvoted_ enhancement** [request of 2025][]:
4141
[Active TOC entry tracking](#active-toc-entry-tracking) ([#349], [#2289])
42-
- {{% _param FA code "" %}} [Alert shortcode](#alert-shortcode) rewrite for
42+
- {{% _param FAS code "" %}} [Alert shortcode](#alert-shortcode) rewrite for
4343
better Markdown support
44-
- {{% _param FA universal-access "" %}} [Accessibility](#accessibility)
44+
- {{% _param FAS universal-access "" %}} [Accessibility](#accessibility)
4545
enhancements for better color contrast and dark mode support
4646

4747
## Ready to upgrade? <a id="breaking-changes"></a> {#ready-to-upgrade}
@@ -54,10 +54,10 @@ Docsy [0.13.0] comes with the following notable features and fixes:
5454
- Optionally skim:
5555
- {{% _param NEW %}} New features
5656
- [Other notable changes](#other-notable-changes)
57-
- {{% _param FA rocket primary %}} Jump to
57+
- {{% _param FAS rocket primary %}} Jump to
5858
[Upgrade to 0.13.0](#upgrading-and-ai) once you are ready.
5959

60-
## {{% _param FA compass "" %}} Navigation and UX improvements {#navigation-and-ux}
60+
## {{% _param FAS compass "" %}} Navigation and UX improvements {#navigation-and-ux}
6161

6262
### {{% _param NEW %}} Active TOC entry tracking {#active-toc-entry-tracking}
6363

@@ -149,7 +149,7 @@ additional navigation items ([#2406]).
149149

150150
[#2406]: https://github.com/google/docsy/pull/2406
151151

152-
## {{% _param FA code "" %}} Alert shortcode improvements {#alert-shortcode}
152+
## {{% _param FAS code "" %}} Alert shortcode improvements {#alert-shortcode}
153153

154154
As of Docsy 0.13.0, `alert` shortcode content is processed differently when
155155
called as Markdown (`{{%/* alert */%}}`): the inner Markdown is now passed
@@ -167,14 +167,14 @@ This change means that your alerts can now:
167167
For details and examples, including important formatting requirements, see
168168
[alert]. For implementation details, see PR [#941].
169169

170-
## {{% _param FA universal-access info %}} Accessibility improvements {#accessibility}
170+
## {{% _param FAS universal-access info %}} Accessibility improvements {#accessibility}
171171

172172
- <i class="fa-solid fa-palette fa-lg text-info px-1"></i> **Color contrast**
173173
has been improved throughout the theme, and Docsy now falls back to Bootstrap
174174
defaults for typography and color. This ensures better accessibility
175175
compliance out of the box. For details, see [#2285] and [Site colors][].
176176

177-
- {{% _param FA palette info %}} **Color contrast** improvements for dark mode:
177+
- {{% _param FAS palette info %}} **Color contrast** improvements for dark mode:
178178
- TOC entry color contrast has been fixed when user preferences differ from
179179
system settings ([#2379]).
180180

@@ -183,10 +183,10 @@ For details and examples, including important formatting requirements, see
183183
to pick colors with good color-contrast][].
184184
{{% _param BADGE EXPERIMENTAL info %}}
185185

186-
- {{% _param FA moon info %}} **[Dark mode][]**:
187-
- {{% _param FA bolt warning %}} [Flash Of Unstyled Content][] (FOUC) has been
188-
fixed ([#2332]).
189-
- {{% _param FA search info %}} **Google search** results page now supports
186+
- {{% _param FAS moon info %}} **[Dark mode][]**:
187+
- {{% _param FAS bolt warning %}} [Flash Of Unstyled Content][] (FOUC) has
188+
been fixed ([#2332]).
189+
- {{% _param FAS search info %}} **Google search** results page now supports
190190
dark-mode ([#2387]). {{%_param BADGE EXPERIMENTAL info %}}
191191

192192
> [!SECONDARY] Dark mode quick reference
@@ -253,17 +253,17 @@ For details and examples, including important formatting requirements, see
253253
[diagrams-formulae]:
254254
/docs/content/diagrams-and-formulae/#latex-support-with-katex
255255
256-
## {{% _param FA rocket primary %}} Upgrade to 0.13.0 {#upgrade}
256+
## {{% _param FAS rocket primary %}} Upgrade to 0.13.0 {#upgrade}
257257
258258
### Prerequisites
259259
260-
> {{% _param FA triangle-exclamation warning %}} **We recommend** that you
260+
> {{% _param FAS triangle-exclamation warning %}} **We recommend** that you
261261
> [Upgrade to Docsy 0.12.0][] first because it contains significant breaking
262262
> changes.
263263
264264
### Upgrade procedure and AI help {#upgrading-and-ai}
265265
266-
> {{% _param FA robot info %}} Have you used AI to help you upgrade Docsy? It
266+
> {{% _param FAS robot info %}} Have you used AI to help you upgrade Docsy? It
267267
> can be a big help!
268268
269269
The [0.12.0 upgrade guide][] was written with both human project maintainers and
@@ -319,10 +319,10 @@ currently _most upvoted_ enhancement requests include:
319319
<!-- prettier-ignore -->
320320
> [!INFO] Your opinion counts!
321321
>
322-
> - {{% _param FA thumbs-up success %}} If you'd like a feature or fix to be
322+
> - {{% _param FAS thumbs-up success %}} If you'd like a feature or fix to be
323323
> considered for inclusion in an upcoming release, **upvote** (with a thumbs
324324
> up) the associated issue or PR.
325-
> - {{% _param FA star warning %}} If you find Docsy useful, consider [starring
325+
> - {{% _param FAS star warning %}} If you find Docsy useful, consider [starring
326326
> the repository][star-the-repo] to show your support.
327327
{._list-unstyled}
328328

0 commit comments

Comments
 (0)