mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2025-07-16 19:51:22 +00:00
Merge branch 'master' of https://github.com/barziv/hugo-book into feat/dynamic-ltr
This commit is contained in:
commit
0cdb34dab6
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -9,7 +9,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
hugo-version:
|
hugo-version:
|
||||||
- 'latest'
|
- 'latest'
|
||||||
- '0.134.2'
|
- '0.146.7'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Hugo Book Theme
|
# Hugo Book Theme
|
||||||
|
|
||||||
[](https://gohugo.io)
|
[](https://gohugo.io)
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||

|

|
||||||
|
|
||||||
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- Hugo 0.134 or higher
|
- Hugo 0.146 or higher
|
||||||
- Hugo extended version, [Installation Instructions](https://gohugo.io/installation/)
|
- Hugo extended version, [Installation Instructions](https://gohugo.io/installation/)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
@ -298,7 +298,7 @@ If you are using `config.yaml` or `config.json`, consult the [configuration mark
|
|||||||
|
|
||||||
## Versioning
|
## Versioning
|
||||||
|
|
||||||
This theme follows a simple incremental versioning. e.g. `v1`, `v2` and so on. There might be breaking changes between versions.
|
This theme follows a simple incremental versioning. e.g. `v1.0.0`, `v2.0.0` and so on. Releases will happen on breaking changes.
|
||||||
|
|
||||||
If you want lower maintenance, use one of the released versions. If you want to live on the bleeding edge of changes, you can use the `master` branch and update your website when needed.
|
If you want lower maintenance, use one of the released versions. If you want to live on the bleeding edge of changes, you can use the `master` branch and update your website when needed.
|
||||||
|
|
||||||
|
@ -49,11 +49,11 @@ aside nav ul {
|
|||||||
list-style: none;
|
list-style: none;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
margin: 1em 0;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a, span {
|
||||||
|
padding: .5em 0;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,10 +136,12 @@ a .book-icon {
|
|||||||
|
|
||||||
input.toggle + label::after {
|
input.toggle + label::after {
|
||||||
content: "▸";
|
content: "▸";
|
||||||
|
align-self: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.toggle:checked + label::after {
|
input.toggle:checked + label::after {
|
||||||
content: "▾";
|
content: "▾";
|
||||||
|
align-self: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,7 +157,7 @@ body[dir="rtl"] .book-menu {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.book-section-flat {
|
.book-section-flat {
|
||||||
margin: $padding-16 * 2 0;
|
margin: $padding-16 0;
|
||||||
|
|
||||||
> a,
|
> a,
|
||||||
> span,
|
> span,
|
||||||
@ -175,7 +177,7 @@ body[dir="rtl"] .book-menu {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.book-post {
|
.book-post {
|
||||||
margin-bottom: $padding-16 * 2;
|
margin-bottom: $padding-16 * 4;
|
||||||
|
|
||||||
.book-post-date img {
|
.book-post-date img {
|
||||||
height: 1em;
|
height: 1em;
|
||||||
@ -210,7 +212,7 @@ body[dir="rtl"] .book-menu {
|
|||||||
|
|
||||||
.book-search {
|
.book-search {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: $padding-16 0;
|
margin: $padding-8 0;
|
||||||
border-bottom: 1px solid transparent;
|
border-bottom: 1px solid transparent;
|
||||||
|
|
||||||
input {
|
input {
|
||||||
@ -244,6 +246,10 @@ body[dir="rtl"] .book-menu {
|
|||||||
@include spin(1s);
|
@include spin(1s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul a {
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
small {
|
small {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
@ -280,7 +286,7 @@ body[dir="rtl"] .book-menu {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.book-languages {
|
.book-languages {
|
||||||
margin-block-end: $padding-16 * 2;
|
margin-bottom: $padding-16;
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
padding-inline-start: 1.5em;
|
padding-inline-start: 1.5em;
|
||||||
|
14
i18n/pt-BR.yaml
Normal file
14
i18n/pt-BR.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
- id: Search
|
||||||
|
translation: Buscar
|
||||||
|
|
||||||
|
- id: Edit this page
|
||||||
|
translation: Editar página
|
||||||
|
|
||||||
|
- id: Last modified by
|
||||||
|
translation: Última modificação por
|
||||||
|
|
||||||
|
- id: Expand
|
||||||
|
translation: Expandir
|
||||||
|
|
||||||
|
- id: bookSearchConfig
|
||||||
|
translation: '{ cache: true }'
|
@ -1,5 +1,5 @@
|
|||||||
- id: Search
|
- id: Search
|
||||||
translation: Buscar
|
translation: Pesquisar
|
||||||
|
|
||||||
- id: Edit this page
|
- id: Edit this page
|
||||||
translation: Editar página
|
translation: Editar página
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
<ul class="book-languages">
|
<ul class="book-languages">
|
||||||
<li>
|
<li>
|
||||||
<input type="checkbox" id="languages" class="toggle" />
|
<input type="checkbox" id="languages" class="toggle" />
|
||||||
<label for="languages" class="flex justify-between">
|
<label for="languages" class="flex">
|
||||||
<a role="button" class="flex align-center">
|
<a role="button" class="flex flex-auto">
|
||||||
<img src="{{ "svg/translate.svg" | relURL }}" class="book-icon" alt="Languages" />
|
<img src="{{ "svg/translate.svg" | relURL }}" class="book-icon" alt="Languages" />
|
||||||
{{ $.Site.Language.LanguageName }}
|
{{ $.Site.Language.LanguageName }}
|
||||||
</a>
|
</a>
|
@ -30,8 +30,8 @@
|
|||||||
|
|
||||||
{{ if .Page.Params.BookCollapseSection }}
|
{{ if .Page.Params.BookCollapseSection }}
|
||||||
<input type="checkbox" id="section-{{ md5 .Page }}" class="toggle" {{ if or $current $ancestor }}checked{{ end }} />
|
<input type="checkbox" id="section-{{ md5 .Page }}" class="toggle" {{ if or $current $ancestor }}checked{{ end }} />
|
||||||
<label for="section-{{ md5 .Page }}" class="flex justify-between">
|
<label for="section-{{ md5 .Page }}" class="flex">
|
||||||
<a {{ if .Page.Content }}href="{{ .Page.RelPermalink }}"{{ else }}role="button"{{ end }} class="{{ if $current }}active{{ end }}">
|
<a {{ if .Page.Content }}href="{{ .Page.RelPermalink }}"{{ else }}role="button"{{ end }} class="flex-auto {{ if $current }}active{{ end }}">
|
||||||
{{- partial "docs/title" .Page -}}
|
{{- partial "docs/title" .Page -}}
|
||||||
</a>
|
</a>
|
||||||
</label>
|
</label>
|
@ -3,7 +3,7 @@
|
|||||||
{{ range $term, $_ := .Site.Taxonomies }}
|
{{ range $term, $_ := .Site.Taxonomies }}
|
||||||
{{ with $.Site.GetPage (printf "/%s" $term | urlize) }}
|
{{ with $.Site.GetPage (printf "/%s" $term | urlize) }}
|
||||||
<li class="book-section-flat">
|
<li class="book-section-flat">
|
||||||
<strong>{{ .Title | title }}</strong>
|
<span>{{ .Title | title }}</span>
|
||||||
<ul>
|
<ul>
|
||||||
{{ range .Pages }}
|
{{ range .Pages }}
|
||||||
<li class="flex justify-between">
|
<li class="flex justify-between">
|
@ -7,9 +7,6 @@
|
|||||||
{{ partial "docs/post-meta" . }}
|
{{ partial "docs/post-meta" . }}
|
||||||
<div class="book-post-content">
|
<div class="book-post-content">
|
||||||
{{- .Summary -}}
|
{{- .Summary -}}
|
||||||
{{ if .Truncated }}
|
|
||||||
<a href="{{ .RelPermalink }}">...</a>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -7,9 +7,6 @@
|
|||||||
{{ partial "docs/post-meta" . }}
|
{{ partial "docs/post-meta" . }}
|
||||||
<p>
|
<p>
|
||||||
{{- .Summary -}}
|
{{- .Summary -}}
|
||||||
{{ if .Truncated }}
|
|
||||||
<a href="{{ .RelPermalink }}">...</a>
|
|
||||||
{{ end }}
|
|
||||||
</p>
|
</p>
|
||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
Loading…
Reference in New Issue
Block a user