diff --git a/CHANGELOG.md b/CHANGELOG.md index ba0afe7810..5e2003a4ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,17 +6,41 @@ Useful links: Docsy [releases][] & [tags][]. Jump to the [latest][] release. -For a list of issues targeted for the next release, see the [23Q1][] milestone. +For a list of issues targeted for the next release, see the [23Q2][] milestone. -## 0.7.0 - next planned release (unpublished yet) +## [0.8.0][releases] - next major release (unpublished yet) **New**: **Breaking changes**: +**Other changes**: + +## [0.7.1][] + +Followup changes to **Bootstrap (BS) 5.2 upgrade** ([#470]): + +- `td-blog-posts-list__item` and `td-blog-posts-list__body` replace the `.media` + and `.media-body` classes, dropped by BS 5 [#1560]. +- Docsy test for Bootstrap version has been made more robust, and can be + disabled. For details, see [#1579]. + +[#1560]: https://github.com/google/docsy/issues/1560 +[#1579]: https://github.com/google/docsy/issues/1579 + +## [0.7.0][] + +**New**: + +- **Click to copy button for Chroma-highlighted code blocks**: If you already + implemented this functionality on your website, you can disable it. For + details see [Chroma highlighting docs][chroma-docsy]. + +**Breaking changes:** + +- [**Hugo** release][hugo-releases] **0.110.0** or later is required. - **Upgraded Bootstrap ([#470])** to v5.2. For a list of Bootstrap's breaking - changes, see the [Bootstrap migration guide][bsv5mig]. Other Docsy-specific - changes are listed below: + changes, see the [Bootstrap migration page][bsv5mig]. Docsy-specific changes: - Clean up of unused, or rarely used, variables, functions, and mixins: - Dropped `$primary-light` - Dropped `color-diff()` @@ -29,29 +53,40 @@ For a list of issues targeted for the next release, see the [23Q1][] milestone. - Dropped support for pre-Hugo-0.54.x behavior of `{{% %}}`. ([#939]) - `blocks/section`: **default** and accepted values of the `type` argument have changed! For details see [blocks/section] ([#1472]). + - **Card shortcodes** ([#1376])]: + - Renamed CSS class `td-card-deck` to `td-card-group`. + - `card`, `card-code`: markup of inner content (HTML/markdown) now depends + on the syntax of the calling shortcode, not on extension of page file any + more [#906]. + - `card-code` is deprecated; use `card` with named parameter `code=true` + instead. + +[chroma-docsy]: + https://www.docsy.dev/docs/adding-content/lookandfeel/#code-highlighting-with-chroma -- **[Adaptation of shortcodes for diplay of cards (#1376)][1376]: - - shortcode `cardpane`: renamed CSS class `td-card-deck` to `td-card-group`. - - shortcode `card`, `card-code`: markup of inner content (html/markdown) - now depends on the syntax of the calling shortcode, not on extension - of page file any more [#906][906]. - - shortcode `card-code` is now deprecated, use shortcode `card` with named - parameter `code=true` instead. +- **Detection of draw.io diagrams** is now **disabled** by default [#1185][] **Other changes**: +- `$list-inline-padding` is increased in support of footer icons ([#1523]). If + this global adjustment is a problem for your project, let us know and we can + contextualize the adjustment to the footer. - Non-breaking changes that result from the Bootstrap v5 upgrade: - Draw.io diagram edit button: replaced custom colors by BS's outline primary. [#470]: https://github.com/google/docsy/issues/470 [#906]: https://github.com/google/docsy/issues/906 [#939]: https://github.com/google/docsy/issues/939 +[#1185]: https://github.com/google/docsy/issues/1185 [#1369]: https://github.com/google/docsy/issues/1369 +[#1376]: https://github.com/google/docsy/issues/1369 [#1442]: https://github.com/google/docsy/issues/1442 [#1472]: https://github.com/google/docsy/issues/1472 +[#1523]: https://github.com/google/docsy/pull/1523 [blocks/section]: https://www.docsy.dev/docs/adding-content/shortcodes/#blockssection [bsv5mig]: https://getbootstrap.com/docs/5.2/migration/ +[hugo-releases]: https://github.com/gohugoio/hugo/releases ## [0.6.0][] @@ -147,12 +182,16 @@ submodules. This has an impact on your project-build setup. To migrate your site, follow these steps (execute commands from your project's root directory): 1. Delete obsolete Docsy Git submodules: - ```console - $ rm -Rf themes/docsy/assets/vendor + ```sh + git rm themes/docsy/assets/vendor/Font-Awesome + git rm themes/docsy/assets/vendor/bootstrap ``` + These commands remove the submodules from Git's tracking, from the + `.gitmodules` file, and deletes the submodule files under + `themes/docsy/assets/vendor`. 2. Get Docsy dependencies: - ```console - $ (cd themes/docsy && npm install) + ```sh + (cd themes/docsy && npm install) ``` 3. Update your build scripts to fetch Docsy dependencies automatically. For example, if your site build uses NPM scripts, consider getting Docsy @@ -223,6 +262,8 @@ For a full list of the changes to this release, see the [release notes][0.x.y]. [@deining]: https://github.com/deining [@lisafc]: https://github.com/LisaFC +[0.7.1]: https://github.com/google/docsy/releases/v0.7.1 +[0.7.0]: https://github.com/google/docsy/releases/v0.7.0 [0.6.0]: https://github.com/google/docsy/releases/v0.6.0 [0.5.1]: https://github.com/google/docsy/releases/v0.5.1 [0.5.0]: https://github.com/google/docsy/releases/v0.5.0 @@ -230,7 +271,7 @@ For a full list of the changes to this release, see the [release notes][0.x.y]. [0.3.0]: https://github.com/google/docsy/releases/v0.3.0 [0.2.0]: https://github.com/google/docsy/releases/v0.2.0 [0.x.y]: # -[23q1]: https://github.com/google/docsy/milestone/6 +[23q2]: https://github.com/google/docsy/milestone/7 [hugo modules]: https://gohugo.io/hugo-modules/ [latest]: https://github.com/google/docsy/releases/latest [releases]: https://github.com/google/docsy/releases diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0f8a216700..82ccce057c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,6 +29,10 @@ information on using pull requests. This project follows [Google's Open Source Community Guidelines](https://opensource.google.com/conduct/). +## Student contributions + +Docsy welcomes contributions from students. However, we cannot guarantee that PRs will be merged within any specific timeframe. We ask that instructors *not* create assignments requiring students to have PRs merged into the project. We will not merge PRs solely to satisfy any class assignments. + ## How to contribute See the [contribution guidelines][] in the Docsy user guide. diff --git a/README.md b/README.md index 7cdc73813b..4b008ebdc3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,12 @@ # Docsy -## ЁЯЪз WARNING: `main` is unstable! For details, see [#1359](https://github.com/google/docsy/discussions/1359) ЁЯЪз + +[![Project status: active тАУ The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) +[![Project releases](https://img.shields.io/github/release/google/docsy)](https://github.com/google/docsy/releases) +[![Project build Status](https://badges.netlify.com/api/docsydocs.svg?branch=master)](https://app.netlify.com/sites/docsydocs/deploys) +[![Project contributors](https://img.shields.io/github/contributors/google/docsy)](https://github.com/google/docsy/graphs/contributors) +[![Project license](https://img.shields.io/github/license/google/docsy)](https://github.com/google/docsy/blob/main/LICENSE) + +## ЁЯЪз WARNING ЁЯЪз : `main` is under development and potentially unstable! Use official Docsy [releases]. Docsy is a [Hugo](https://gohugo.io) theme for technical documentation sets, providing simple navigation, site structure, and more. @@ -13,52 +20,54 @@ The following are basic prerequisites for using Docsy in your site: - Install a recent release of the Hugo "extended" version. If you install from the [Hugo release page](https://github.com/gohugoio/hugo/releases), make sure - you download the `_extended` version which supports SCSS. + you download the `extended` version, which supports SCSS. - Install `PostCSS` so that the site build can create the final CSS assets. You can install it locally by running the following commands from the root directory of your project: - ```console - $ npm install --save-dev autoprefixer - $ npm install --save-dev postcss-cli + ```sh + npm install --save-dev autoprefixer + npm install --save-dev postcss-cli ``` - - Starting in [version 8 of `postcss-cli`](https://github.com/postcss/postcss-cli/blob/master/CHANGELOG.md), + + Starting in + [version 8 of `postcss-cli`](https://github.com/postcss/postcss-cli/blob/master/CHANGELOG.md), you must also separately install `postcss`: - ```bash + ```sh npm install -D postcss ``` - -Any additional prerequisites depend on the [installation option](https://www.docsy.dev/docs/get-started/#installation-options) -you choose. We recommend using Docsy as a Hugo module, which requires that -you have the `go` language installed in addition to Hugo and PostCSS. -For complete prerequisites and instructions, see our [Get started guides](https://www.docsy.dev/docs/get-started/). +Any additional prerequisites depend on the +[installation option](https://www.docsy.dev/docs/get-started/#installation-options) +you choose. We recommend using Docsy as a Hugo module, which requires that you +have the `go` language installed in addition to Hugo and PostCSS. + +For complete prerequisites and instructions, see our +[Get started guides](https://www.docsy.dev/docs/get-started/). ## Example and usage -You can find an example project that uses Docsy in the [Docsy Example Project -repo](https://github.com/google/docsy-example).The Docsy Example Project is -hosted at [example.docsy.dev](https://example.docsy.dev). For +You can find an example project that uses Docsy in the +[Docsy Example Project repo](https://github.com/google/docsy-example).The Docsy +Example Project is hosted at [example.docsy.dev](https://example.docsy.dev). For real-life examples of sites that use Docsy (and their source repos), see our [Examples](https://www.docsy.dev/docs/examples/) page. To use the Docsy theme for your own site: -- (Recommended) Use the [example - project](https://github.com/google/docsy-example), which includes the Docsy - theme as a Hugo module, as a template to create your project. You can customize - this pre-configured basic site into your own Docsy themed site. [Learn - more...](https://github.com/google/docsy-example) +- (Recommended) Use the + [example project](https://github.com/google/docsy-example), which includes the + Docsy theme as a Hugo module, as a template to create your project. You can + customize this pre-configured basic site into your own Docsy themed site. + [Learn more...](https://github.com/google/docsy-example) -- Add Docsy to your existing Hugo site. You can - add Docsy as a Hugo module, as a Git submodule, or clone the Docsy theme into your - project. +- Add Docsy to your existing Hugo site. You can add Docsy as a Hugo module, as a + Git submodule, or clone the Docsy theme into your project. -See the [Get started guides](https://www.docsy.dev/docs/get-started/) -for details about the various usage options. +See the [Get started guides](https://www.docsy.dev/docs/get-started/) for +details about the various usage options. ## Documentation @@ -71,27 +80,27 @@ Alternatively you can use Hugo to generate and serve a local copy of the guide (also useful for testing local theme changes), making sure you have installed all the prerequisites listed above: -```console -$ git clone --depth 1 https://github.com/google/docsy.git -$ cd docsy/userguide/ -$ npm install -$ npm run serve +```sh +git clone --depth 1 https://github.com/google/docsy.git +cd docsy/userguide/ +npm install +npm run serve ``` -## Contributing ![GitHub](https://img.shields.io/github/contributors/google/docsy) +## Contributing Please read -[CONTRIBUTING.md](https://github.com/google/docsy/blob/main/CONTRIBUTING.md) -for details on our code of conduct, and the process for submitting pull requests -to us. See also the list of +[CONTRIBUTING.md](https://github.com/google/docsy/blob/main/CONTRIBUTING.md) for +details on our code of conduct, and the process for submitting pull requests to +us. See also the list of [contributors](https://github.com/google/docsy/graphs/contributors) who participated in this project. -## License ![GitHub](https://img.shields.io/github/license/google/docsy) +## License This project is licensed under the Apache License 2.0 - see the -[LICENSE.md](https://github.com/google/docsy/blob/main/LICENSE) file for -details +[LICENSE.md](https://github.com/google/docsy/blob/main/LICENSE) file for details -[Deploys]: https://app.netlify.com/sites/docsydocs/deploys -[Netlify]: https://netlify.com +[deploys]: https://app.netlify.com/sites/docsydocs/deploys +[netlify]: https://netlify.com +[releases]: https://github.com/google/docsy/releases diff --git a/assets/js/click-to-copy.js b/assets/js/click-to-copy.js index 5fdb041a86..0616fe4b21 100644 --- a/assets/js/click-to-copy.js +++ b/assets/js/click-to-copy.js @@ -1,86 +1,47 @@ let codeListings = document.querySelectorAll('.highlight > pre'); -for (let index = 0; index < codeListings.length; index++) -{ +for (let index = 0; index < codeListings.length; index++) { const codeSample = codeListings[index].querySelector('code'); - const copyButton = document.createElement("button"); - copyButton.setAttribute('type', 'button'); - copyButton.onclick = function() { copyCode(codeSample); }; - copyButton.classList.add('fas', 'fa-copy'); + const copyButton = document.createElement('button'); + const buttonAttributes = { + type: 'button', + title: 'Copy to clipboard', + 'data-bs-toggle': 'tooltip', + 'data-bs-placement': 'top', + 'data-bs-container': 'body', + }; + + Object.keys(buttonAttributes).forEach((key) => { + copyButton.setAttribute(key, buttonAttributes[key]); + }); - const buttonTooltip = document.createElement('div'); - buttonTooltip.classList.add('c2c-tooltip'); - buttonTooltip.setAttribute('role', 'tooltip'); - buttonTooltip.innerHTML += 'Copy to clipboard'; + copyButton.classList.add( + 'fas', + 'fa-copy', + 'btn', + 'btn-dark', + 'btn-sm', + 'td-click-to-copy' + ); + const tooltip = new bootstrap.Tooltip(copyButton); + + copyButton.onclick = () => { + copyCode(codeSample); + copyButton.setAttribute('data-bs-original-title', 'Copied!'); + tooltip.show(); + }; + + copyButton.onmouseout = () => { + copyButton.setAttribute('data-bs-original-title', 'Copy to clipboard'); + tooltip.hide(); + }; const buttonDiv = document.createElement('div'); buttonDiv.classList.add('click-to-copy'); - - // Use Popper to create and handle the tooltip behavior. - - const popperInstance = Popper.createPopper(copyButton, buttonTooltip, - { - modifiers: - [ - { - name: 'offset', - options: - { - offset: [0, -48], - }, - }, - ], - }); - - copyButton.addEventListener('click', () => - { - buttonTooltip.innerHTML = 'Copied!'; - }); - - copyButton.addEventListener('mouseenter', () => - { - buttonTooltip.setAttribute('show-tooltip', ''); - - // Enable eventListeners when the code block is on the viewport - - popperInstance.setOptions((options) => ({ - ...options, - modifiers: - [ - ...options.modifiers, - { name: 'eventListeners', enabled: true }, - ], - })); - popperInstance.update(); - }); - - copyButton.addEventListener('mouseleave', () => - { - buttonTooltip.removeAttribute('show-tooltip'); - - // Reset the message in case the button was clicked - buttonTooltip.innerHTML = 'Copy to clipboard'; - - // Disble eventListeners when the code block is NOT on the viewport - - popperInstance.setOptions((options) => ({ - ...options, - modifiers: - [ - ...options.modifiers, - { name: 'eventListeners', enabled: false }, - ], - })); - }); - buttonDiv.append(copyButton); - buttonDiv.append(buttonTooltip); codeListings[index].insertBefore(buttonDiv, codeSample); - -} - -function copyCode(codeSample) -{ - navigator.clipboard.writeText(codeSample.textContent.trim()); } +const copyCode = (codeSample) => { + navigator.clipboard.writeText(codeSample.textContent.trim() + '\n'); +}; diff --git a/assets/scss/_blog.scss b/assets/scss/_blog.scss index 70f2b95979..6cc7d5dd60 100644 --- a/assets/scss/_blog.scss +++ b/assets/scss/_blog.scss @@ -1,12 +1,28 @@ .td-blog { .td-rss-button { @extend .btn; + @extend .btn-info; @extend .btn-lg; - @extend .-bg-orange; float: right; display: none; @extend .d-lg-block; } -} + + &-posts-list { + @extend .list-unstyled; + margin-top: map-get($spacers, 4) !important; + + &__item { + display: flex; + align-items: flex-start; + margin-bottom: map-get($spacers, 4) !important; + + &__body { + flex: 1; + } + } + + } +} \ No newline at end of file diff --git a/assets/scss/_boxes.scss b/assets/scss/_boxes.scss index 9d2d49fd6f..c33316099f 100644 --- a/assets/scss/_boxes.scss +++ b/assets/scss/_boxes.scss @@ -4,7 +4,11 @@ @mixin box-variant($parent, $color-name, $color-value) { $text-color: color-contrast($color-value); $link-color: mix($blue, $text-color, lightness($color-value)); - $link-hover-color: rgba($link-color, 0.5) !default; + $link-hover-color: if( + color-contrast($link-color) == $color-contrast-light, + shade-color($link-color, $link-shade-percentage), + tint-color($link-color, $link-shade-percentage) + ); #{$parent} { &--#{$color-name} { @@ -31,7 +35,7 @@ // Improve contrast for the links in paragraphs. @include link-variant( - "#{$parent}--#{$color-name} p > a", + "#{$parent}--#{$color-name} p > a, #{$parent}--#{$color-name} span > a", $link-color, $link-hover-color, false diff --git a/assets/scss/_code.scss b/assets/scss/_code.scss index 759c7e5634..5307fea13c 100644 --- a/assets/scss/_code.scss +++ b/assets/scss/_code.scss @@ -12,7 +12,6 @@ .click-to-copy { display: block; text-align: right; - height: 1ex; } pre { @@ -21,15 +20,15 @@ // Default click-to-copy button - button { + button.td-click-to-copy { position: absolute; color: $gray-400; border-radius: 3px; border-width: 0; background-color: inherit; box-shadow: 1px 1px $gray-400; - right: 8px; - top: 6px; + right: 4px; + top: 2px; &:hover { color: $dark; @@ -41,22 +40,6 @@ transform: translateY(2px); } } - - .c2c-tooltip { - background: $dark; - color: $white; - padding: 2px 4px; - border-radius: 3px; - display: block; - visibility: hidden; - opacity: 0; - transition: visibility 0s, opacity 0.5s linear; - } - - .c2c-tooltip[show-tooltip] { - visibility: visible; - opacity: 1; - } } } @@ -97,5 +80,6 @@ pre.mermaid { background-color: inherit; font-size: 0; + padding: 0; } } diff --git a/assets/scss/_colors.scss b/assets/scss/_colors.scss index fe390dd342..48f32ac6f1 100644 --- a/assets/scss/_colors.scss +++ b/assets/scss/_colors.scss @@ -12,7 +12,7 @@ // Make links in paragraphs stand out more. @include link-variant( - ".-bg-#{$color-name} p > a", + ".-bg-#{$color-name} p:not(.p-initial) > a", $link-color, $link-hover-color, false diff --git a/assets/scss/_main-container.scss b/assets/scss/_main-container.scss index f64592b01b..131a1b1549 100644 --- a/assets/scss/_main-container.scss +++ b/assets/scss/_main-container.scss @@ -2,7 +2,7 @@ .td-outer { display: flex; flex-direction: column; - height: 100vh; + min-height: 100vh; } // The outer page container for the default base template. diff --git a/assets/scss/_sidebar-tree.scss b/assets/scss/_sidebar-tree.scss index 661cc62375..a7b92bb4cc 100644 --- a/assets/scss/_sidebar-tree.scss +++ b/assets/scss/_sidebar-tree.scss @@ -81,7 +81,6 @@ } & > .td-sidebar-nav__section { - padding-top: 0.5rem; padding-left: 1.5rem; } diff --git a/assets/scss/_swagger.scss b/assets/scss/_swagger.scss new file mode 100644 index 0000000000..c504057ef3 --- /dev/null +++ b/assets/scss/_swagger.scss @@ -0,0 +1,3 @@ +.swagger-ui .info .title small pre { + background: #7d8492; +} \ No newline at end of file diff --git a/assets/scss/_variables.scss b/assets/scss/_variables.scss index 5adae3c8ae..376b27abe7 100644 --- a/assets/scss/_variables.scss +++ b/assets/scss/_variables.scss @@ -39,7 +39,7 @@ $td-sidebar-border-color: $border-color !default; $td-box-colors: $dark, $primary, $secondary, $info, $white, $gray-600, $success, $warning, $dark, $danger, $primary, $secondary, $info !default; -$link-color: $blue-500; +$link-color: $blue-500 !default; $link-decoration: none !default; $link-shade-percentage: 30% !default; @@ -91,3 +91,7 @@ $pagination-disabled-color: $gray-300 !default; // TODO: consider using BS defau $navbar-dark-color: rgba($white, 0.75) !default; // TODO: consider moving into UG SCSS $navbar-dark-hover-color: rgba($white, 0.5) !default; // TODO: consider moving into UG SCSS + +// Footer + +$list-inline-padding: $spacer; diff --git a/assets/scss/main.scss b/assets/scss/main.scss index cbad7f3678..4e5f482eca 100644 --- a/assets/scss/main.scss +++ b/assets/scss/main.scss @@ -7,11 +7,7 @@ @import "support/mixins"; @import "../vendor/bootstrap/scss/bootstrap"; - -$display1-size: null !default; -@if $display1-size { - @error "Docsy requires Bootstrap v5, but v4 was detected. Did you forget to update Docsy dependencies?"; -} +@import "support/bootstrap_vers_test"; @import "../vendor/Font-Awesome/scss/fontawesome.scss"; @import "../vendor/Font-Awesome/scss/solid.scss"; @@ -38,17 +34,46 @@ $display1-size: null !default; @import "taxonomy"; @import "drawio"; @import "shortcodes"; +@import "swagger"; + @if $td-enable-google-fonts { @import url($web-font-path); } -footer { +.td-footer { + @extend .td-box--dark; + min-height: 150px; + padding-top: map-get($spacers, 5); @include media-breakpoint-down(lg) { min-height: 200px; } + + &__copyright-etc { + @extend .small; + } + &__about { + font-size: initial; + } + + &__links { + &-list { + @extend .list-inline; + margin-bottom: 0; + } + + &-item { + @extend .list-inline-item; + @extend .h3; + + a { + color: inherit !important; + } + } + } + } // Adjust anchors vs the fixed menu. diff --git a/assets/scss/shortcodes/tabbed-pane.scss b/assets/scss/shortcodes/tabbed-pane.scss index 65096aee6e..1c0d81825b 100644 --- a/assets/scss/shortcodes/tabbed-pane.scss +++ b/assets/scss/shortcodes/tabbed-pane.scss @@ -8,6 +8,7 @@ .tab-content { .tab-pane { + @extend .td-max-width-on-larger-screens; .highlight { margin: 0rem 0 0rem 0; border: none; @@ -15,7 +16,6 @@ } margin-top: 0rem; margin-bottom: 1.5rem; - max-width: 80%; border-left: 1px solid rgba(0, 0, 0, 0.125); border-right: 1px solid rgba(0, 0, 0, 0.125); border-bottom: 1px solid rgba(0, 0, 0, 0.125); diff --git a/assets/scss/support/_bootstrap_vers_test.scss b/assets/scss/support/_bootstrap_vers_test.scss new file mode 100644 index 0000000000..c65647acb8 --- /dev/null +++ b/assets/scss/support/_bootstrap_vers_test.scss @@ -0,0 +1,8 @@ +$enable-important-utilities: null !default; +@if $enable-important-utilities == null { + @error "\ + Docsy requires Bootstrap v5, but the v5 variable \ + $enable-important-utilities isn't defined. \ + Did you forget to update Docsy dependencies?\ + "; +} diff --git a/dependencies/go.mod b/dependencies/go.mod index 06ce57a771..7f79ecf2dd 100644 --- a/dependencies/go.mod +++ b/dependencies/go.mod @@ -3,6 +3,6 @@ module github.com/LNA-DEV/PrivateDocsy/dependencies go 1.12 require ( - github.com/FortAwesome/Font-Awesome v0.0.0-20230207192303-d02961b01815 // indirect + github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2 // indirect github.com/twbs/bootstrap v5.2.3+incompatible // indirect ) diff --git a/dependencies/go.sum b/dependencies/go.sum index 6f13ac5d5a..403c1f58cb 100644 --- a/dependencies/go.sum +++ b/dependencies/go.sum @@ -1,4 +1,6 @@ github.com/FortAwesome/Font-Awesome v0.0.0-20230207192303-d02961b01815 h1:IgbtROhk8s9GkcNxrqFKAzR5rmDwV/QQ4Y31pb6crM8= github.com/FortAwesome/Font-Awesome v0.0.0-20230207192303-d02961b01815/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= +github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2 h1:Uv1z5EqCfmiK4IHUwT0m3h/u/WCk+kpRfxvAZhpC7Gc= +github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= github.com/twbs/bootstrap v5.2.3+incompatible h1:lOmsJx587qfF7/gE7Vv4FxEofegyJlEACeVV+Mt7cgc= github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= diff --git a/go.mod b/go.mod index e9171daa17..e137b673fa 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/Fedodo/Fedodo.Docs.Theme go 1.12 require ( - github.com/FortAwesome/Font-Awesome v0.0.0-20230207192303-d02961b01815 // indirect - github.com/google/docsy/dependencies v0.6.1-0.20230125095517-798c2504905e // indirect + github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2 // indirect + github.com/google/docsy/dependencies v0.7.1 // indirect github.com/twbs/bootstrap v5.2.3+incompatible // indirect ) diff --git a/go.sum b/go.sum index 2a48666480..0ab0330fe6 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,10 @@ github.com/FortAwesome/Font-Awesome v0.0.0-20230207192303-d02961b01815 h1:IgbtROhk8s9GkcNxrqFKAzR5rmDwV/QQ4Y31pb6crM8= github.com/FortAwesome/Font-Awesome v0.0.0-20230207192303-d02961b01815/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= +github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2 h1:Uv1z5EqCfmiK4IHUwT0m3h/u/WCk+kpRfxvAZhpC7Gc= +github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= github.com/google/docsy/dependencies v0.6.1-0.20230125095517-798c2504905e h1:lfvr9ByCkuIz/ARoEDC/6gucVRjkooYTts5P+0yq5Qk= github.com/google/docsy/dependencies v0.6.1-0.20230125095517-798c2504905e/go.mod h1:qhtpynRkDn1FOmD1gj0a5n6ptDjDw0O4Zmb+6pfYUKU= +github.com/google/docsy/dependencies v0.6.1-0.20230601182954-ff1818261e64 h1:ZBeOh/qGThEUn/r4vPXyfKXYKvMPmHgGS1BgQI8Xf2E= +github.com/google/docsy/dependencies v0.6.1-0.20230601182954-ff1818261e64/go.mod h1:gihhs5gmgeO+wuoay4FwOzob+jYJVyQbNaQOh788lD4= github.com/twbs/bootstrap v5.2.3+incompatible h1:lOmsJx587qfF7/gE7Vv4FxEofegyJlEACeVV+Mt7cgc= github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= diff --git a/hugo.yaml b/hugo.yaml index 75d2dbfa55..806a9690f3 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -25,7 +25,7 @@ outputFormats: module: hugoVersion: extended: true - min: 0.73.0 + min: 0.110.0 mounts: - source: assets target: assets diff --git a/i18n/de.toml b/i18n/de.toml index 665eedf3b3..d64e7b166c 100644 --- a/i18n/de.toml +++ b/i18n/de.toml @@ -79,3 +79,13 @@ other = "Wenn Du aktiv beteiligen und einen Beitrag zu {{ .Site.Title }} leisten other = "Wie Du selbst zu {{ .Site.Title }} beitragen kannst, kannst Du nachlesen in unseren" [community_guideline] other = "Richtlinien f├╝r Beitr├дge" + +# Feedback +[feedback_title] +other = "R├╝ckmeldung" +[feedback_question] +other = "War diese Seite hilfreich?" +[feedback_positive] +other = "Ja" +[feedback_negative] +other = "Nein" diff --git a/i18n/en.toml b/i18n/en.toml index 476b1cd67b..dcb78102c9 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -27,7 +27,6 @@ other = "All Rights Reserved" [footer_privacy_policy] other = "Privacy Policy" - # Post (blog, articles etc.) [post_byline_by] other = "By" @@ -79,3 +78,13 @@ other = "If you want to get more involved by contributing to {{ .Site.Title }}, other = "You can find out how to contribute to {{ .Site.Title }} in our" [community_guideline] other = "Contribution Guidelines" + +# Feedback +[feedback_title] +other = "Feedback" +[feedback_question] +other = "Was this page helpful?" +[feedback_positive] +other = "Yes" +[feedback_negative] +other = "No" diff --git a/i18n/es.toml b/i18n/es.toml index ef6a47adc8..dd84b258b7 100644 --- a/i18n/es.toml +++ b/i18n/es.toml @@ -7,7 +7,7 @@ other = "Previo" other = "Siguiente" [ui_read_more] -other = "Contiuar leyendo" +other = "Continuar leyendo" [ui_search] other = "Buscar" diff --git a/i18n/hi.toml b/i18n/hi.toml new file mode 100644 index 0000000000..84fe407741 --- /dev/null +++ b/i18n/hi.toml @@ -0,0 +1,81 @@ +# UI strings. Buttons and similar. + +[ui_pager_prev] +other = "рдкрд┐рдЫрд▓рд╛" + +[ui_pager_next] +other = "рдЕрдЧрд▓рд╛" + +[ui_read_more] +other = "рдЕрдзрд┐рдХ рдЬрд╛рдиреЗрдВ" + +[ui_search] +other = "рдЗрд╕ рд╕рд╛рдЗрдЯ рдореЗрдВ рдЦреЛрдЬреЗрдВтАж" + +# Used in sentences such as "Posted in News" +[ui_in] +other = "рдореЗрдВ" + +# Used in sentences such as "All Tags" +[ui_all] +other = "рджреЗрдЦрдирд╛ рд╕рднреА рдЯреИрдЧ" + +# Footer text +[footer_all_rights_reserved] +other = "рд╕рд░реНрд╡рд╛рдзрд┐рдХрд╛рд░ рд╕реБрд░рдХреНрд╖рд┐рдд" + +[footer_privacy_policy] +other = "рдЧреЛрдкрдиреАрдпрддрд╛ рдиреАрддрд┐" + + +# Post (blog, articles etc.) +[post_byline_by] +other = "рджреНрд╡рд╛рд░рд╛" +[post_created] +other = "рдмрдирд╛рдпрд╛" +[post_last_mod] +other = "рдЕрдВрддрд┐рдо рдмрд╛рд░ рд╕рдВрд╢реЛрдзрд┐рдд" +[post_edit_this] +other = "рдЗрд╕ рдкреГрд╖реНрда рдХреЛ рд╕рдВрдкрд╛рджрд┐рдд рдХрд░реЗрдВ" +[post_view_this] +other = "рдкреГрд╖реНрда рдХрд╛ рд╕реНрддреНрд░реЛрдд рджреЗрдЦреЗрдВ" +[post_create_child_page] +other = "рдЪрд╛рдЗрд▓реНрдб рдкреГрд╖реНрда рдмрдирд╛рдПрдВ" +[post_create_issue] +other = "рд╕рдорд╕реНрдпрд╛ рдХреА рд╕реБрдЪрдирд╛ рджреЗрдВ" +[post_create_project_issue] +other = "рдкрд░рд┐рдпреЛрдЬрдирд╛ рдЗрд╢реВ рдмрдирд╛рдПрдВ" +[post_posts_in] +other = "рдкреЛрд╕реНрдЯ рдореЗрдВ" +[post_reading_time] +other = "рд▓рдШреБ рдЕрдзреНрдпрдпрди" +[post_less_than_a_minute_read] +other = "рдПрдХ рдорд┐рдирдЯ рд╕реЗ рдХрдо" + +# Print support +[print_printable_section] +other = "рдпрд╣ рдЗрд╕ рдЦрдВрдб рдХрд╛ рдмрд╣реБ-рдкреГрд╖реНрда рдкреНрд░рд┐рдВрдЯ рдпреЛрдЧреНрдп рджреГрд╢реНрдп рд╣реИред" +[print_click_to_print] +other = "рдкреНрд░рд┐рдВрдЯ рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП рдпрд╣рд╛рдВ рдХреНрд▓рд┐рдХ рдХрд░реЗрдВ" +[print_show_regular] +other = "рдЗрд╕ рдкреГрд╖реНрда рдХреЗ рд╕рд╛рдорд╛рдиреНрдп рджреГрд╢реНрдп рдкрд░ рд▓реМрдЯреЗрдВ" +[print_entire_section] +other = "рд╕рдВрдкреВрд░реНрдг рдЕрдиреБрднрд╛рдЧ рдкреНрд░рд┐рдВрдЯ рдХрд░реЗрдВ" + +# Community +[community_join] +other = "{{ .Site.Title }} рд╕рдореБрджрд╛рдп рдореЗрдВ рд╢рд╛рдорд┐рд▓ рд╣реЛрдВ" +[community_introduce] +other = "{{ .Site.Title }} рдПрдХ рдЦреБрд▓рд╛ рд╕реНрд░реЛрдд рдкреНрд░реЛрдЬреЗрдХреНрдЯ рд╣реИ рдЬрд┐рд╕рдХрд╛ рд╕рдореБрджрд╛рдп рдореЗрдВ рдХреЛрдИ рднреА рдЙрдкрдпреЛрдЧ рдХрд░ рд╕рдХрддрд╛ рд╣реИ, рд╕реБрдзрд╛рд░ рдХрд░ рд╕рдХрддрд╛ рд╣реИ рдФрд░ рдЖрдирдВрдж рд▓реЗ рд╕рдХрддрд╛ рд╣реИред рд╣рдо рдЪрд╛рд╣реЗрдВрдЧреЗ рдХрд┐ рдЖрдк рд╣рдорд╛рд░реЗ рд╕рд╛рде рдЬреБрдбрд╝реЗрдВ! рдХреНрдпрд╛ рд╣реЛ рд░рд╣рд╛ рд╣реИ рдЗрд╕рдХрд╛ рдкрддрд╛ рд▓рдЧрд╛рдиреЗ рдФрд░ рдЗрд╕рдореЗрдВ рд╢рд╛рдорд┐рд▓ рд╣реЛрдиреЗ рдХреЗ рдХреБрдЫ рддрд░реАрдХреЗ рдпрд╣рд╛рдВ рджрд┐рдП рдЧрдП рд╣реИрдВ." +[community_learn] +other = "рд╕реАрдЦреЗрдВ рдФрд░ рдЬреБрдбрд╝реЗрдВ" +[community_using] +other = "{{ .Site.Title }} рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░ рд░рд╣реЗ рд╣реИрдВ рдпрд╛ рдХрд░рдирд╛ рдЪрд╛рд╣рддреЗ рд╣реИрдВ? рдпрд╣рд╛рдВ рдФрд░ рдЬрд╛рдиреЗрдВ:" +[community_develop] +other = "рд╡рд┐рдХрд╛рд╕ рдХрд░реЗрдВ рдФрд░ рдпреЛрдЧрджрд╛рди рджреЗрдВ" +[community_contribute] +other = "рдпрджрд┐ рдЖрдк {{ .Site.Title }} рдореЗрдВ рдпреЛрдЧрджрд╛рди рджреЗрдХрд░ рдФрд░ рдЕрдзрд┐рдХ рд╢рд╛рдорд┐рд▓ рд╣реЛрдирд╛ рдЪрд╛рд╣рддреЗ рд╣реИрдВ, рддреЛ рдпрд╣рд╛рдВ рд╣рдорд╕реЗ рдЬреБрдбрд╝реЗрдВ:" +[community_how_to] +other = "рдЖрдк рд╣рдорд╛рд░реЗ рдпрд╣рд╛рдВ {{ .Site.Title }} рдореЗрдВ рдпреЛрдЧрджрд╛рди рдХрд░рдиреЗ рдХрд╛ рддрд░реАрдХрд╛ рдЬрд╛рди рд╕рдХрддреЗ рд╣реИрдВ" +[community_guideline] +other = "рдпреЛрдЧрджрд╛рди рджрд┐рд╢рд╛рдирд┐рд░реНрджреЗрд╢" diff --git a/layouts/_default/_markup/render-codeblock-mermaid.html b/layouts/_default/_markup/render-codeblock-mermaid.html index 7425fa721f..6c52c7b17f 100644 --- a/layouts/_default/_markup/render-codeblock-mermaid.html +++ b/layouts/_default/_markup/render-codeblock-mermaid.html @@ -1,5 +1,5 @@ {{ .Page.Store.Set "hasmermaid" true -}}
- {{- .Inner }} + {{- .Inner -}}diff --git a/layouts/_default/content.html b/layouts/_default/content.html index ca8259310c..193927abb1 100644 --- a/layouts/_default/content.html +++ b/layouts/_default/content.html @@ -2,20 +2,20 @@
{{ .Date.Format ($.Param "time_format_blog") }} {{ T "ui_in"}} {{ .CurrentSection.LinkTitle }}
-{{ .Plain | safeHTML | truncate 250 }}
- -{{ .Date.Format ($.Param "time_format_blog") }} {{ T "ui_in"}} {{ .CurrentSection.LinkTitle }}
+{{ .Plain | safeHTML | truncate 250 }}
+ +{{ T "community_how_to" . }} - {{ T "community_guideline" }}. + {{ T "community_guideline" }}.
Was this page helpful?
- - +{{- i18n "feedback_question" -}}
+ +{{ .yes | safeHTML }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 5ee524fd1e..b652549f2f 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,7 +1,7 @@ {{ $links := .Site.Params.links -}} -