Introduce landing page and card shortcode
This commit is contained in:
@@ -28,9 +28,9 @@ $hint-colors: (
|
|||||||
warning: #f59e42,
|
warning: #f59e42,
|
||||||
danger: #d84747,
|
danger: #d84747,
|
||||||
|
|
||||||
note: #64748b,
|
note: #4486dd,
|
||||||
tip: #3bad3b,
|
tip: #3bad3b,
|
||||||
important: #4486dd,
|
important: #8144dd,
|
||||||
caution: #d84747
|
caution: #d84747
|
||||||
) !default;
|
) !default;
|
||||||
|
|
||||||
|
|||||||
+17
-1
@@ -217,6 +217,22 @@ body[dir="rtl"] .book-menu {
|
|||||||
height: 1.5em;
|
height: 1.5em;
|
||||||
width: 1.5em;
|
width: 1.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
> ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 $padding-16;
|
||||||
|
display: flex;
|
||||||
|
gap: $padding-16;
|
||||||
|
justify-content: end;
|
||||||
|
|
||||||
|
li {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.book-kind-home .book-header {
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.book-search {
|
.book-search {
|
||||||
@@ -338,7 +354,7 @@ body[dir="rtl"] .book-menu {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.book-header {
|
.book-header {
|
||||||
display: block;
|
display: block !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#menu-control:focus ~ main label[for="menu-control"] {
|
#menu-control:focus ~ main label[for="menu-control"] {
|
||||||
|
|||||||
+41
-4
@@ -132,17 +132,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
span.book-badge-title {
|
span.book-badge-title {
|
||||||
background-color: var(--body-background);
|
--background-opacity: 0.1;
|
||||||
opacity: 0.9;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
span.book-badge-value {
|
span.book-badge-value {
|
||||||
|
--background-opacity: 1;
|
||||||
color: var(--body-background);
|
color: var(--body-background);
|
||||||
}
|
}
|
||||||
|
|
||||||
@each $name, $color in $hint-colors {
|
@each $name, $color in $hint-colors {
|
||||||
&.#{$name} {
|
&.#{$name} span {
|
||||||
background-color: $color;
|
background-color: rgba($color, var(--background-opacity));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -192,4 +192,41 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// {{< card >}}
|
||||||
|
.book-card {
|
||||||
|
display: block;
|
||||||
|
overflow: hidden;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: $border-radius;
|
||||||
|
border: $padding-1 solid var(--gray-200);
|
||||||
|
|
||||||
|
&[href]:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
background: var(--gray-100);
|
||||||
|
}
|
||||||
|
&[href]:visited {
|
||||||
|
color: var(--body-font-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
display: block;
|
||||||
|
object-fit: contain;
|
||||||
|
aspect-ratio: 4 / 3;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-inner {
|
||||||
|
padding: $padding-16;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.book-hero {
|
||||||
|
min-height: $padding-16 * 24;
|
||||||
|
align-content: center;
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 3em;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,41 +1,62 @@
|
|||||||
---
|
---
|
||||||
title: Introduction
|
title: Introduction
|
||||||
type: docs
|
bookHeadingAnchor: false
|
||||||
---
|
---
|
||||||
|
|
||||||
# Acerbo datus maxime
|
<div class="book-hero">
|
||||||
|
|
||||||
|
# HUGO BOOK
|
||||||
|
[Hugo](https://gohugo.io) documentation theme as simple as plain book
|
||||||
|
|
||||||
|
{{< badge style="info" title="Badge" value="Value" >}} {{< badge style="default" title="Badge" value="Value" >}}
|
||||||
|
|
||||||
|
{{<button relref="/docs/example">}}Button{{</button>}}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
{{% columns %}}
|
{{% columns %}}
|
||||||
## Astris ipse furtiva
|
- ## Astris ipse furtiva
|
||||||
|
Est in vagis et Pittheus tu arge accipiter regia iram vocatur nurus. Omnes ut
|
||||||
|
olivae sensit **arma sorori** deducit, inesset **crudus**, ego vetuere aliis,
|
||||||
|
modo arsit? Utinam rapta fiducia valuere litora _adicit cursu_, ad facies
|
||||||
|
|
||||||
Est in vagis et Pittheus tu arge accipiter regia iram vocatur nurus. Omnes ut
|
- ## Suis quot vota
|
||||||
olivae sensit **arma sorori** deducit, inesset **crudus**, ego vetuere aliis,
|
Ea _furtique_ risere fratres edidit terrae magis. Colla tam mihi tenebat:
|
||||||
modo arsit? Utinam rapta fiducia valuere litora _adicit cursu_, ad facies
|
miseram excita suadent es pecudes iam. Concilio _quam_ velatus posset ait quod
|
||||||
|
nunc! Fragosis suae dextra geruntur functus vulgata.
|
||||||
<--->
|
|
||||||
|
|
||||||
## Suis quot vota
|
|
||||||
|
|
||||||
Ea _furtique_ risere fratres edidit terrae magis. Colla tam mihi tenebat:
|
|
||||||
miseram excita suadent es pecudes iam. Concilio _quam_ velatus posset ait quod
|
|
||||||
nunc! Fragosis suae dextra geruntur functus vulgata.
|
|
||||||
{{% /columns %}}
|
{{% /columns %}}
|
||||||
|
|
||||||
|
|
||||||
## Tempora nisi nunc
|
{{% columns %}}
|
||||||
|
- {{< card title="Card" image="" >}}
|
||||||
|
# Heading
|
||||||
|
Nullam feugiat urna massa, et fringilla metus consectetur molestie. Suspendisse sed congue orci, eu congue metus.
|
||||||
|
{{< /card >}}
|
||||||
|
|
||||||
Lorem **markdownum** emicat gestu. Cannis sol pressit ducta. **Est** Idaei,
|
- {{< card title="Card" image="" >}}
|
||||||
tremens ausim se tutaeque, illi ulnis hausit, sed, lumina cutem. Quae avis
|
# Heading
|
||||||
sequens!
|
Suspendisse sed congue orci, eu congue metus. Nullam feugiat urna massa, et fringilla metus consectetur molestie.
|
||||||
|
{{< /card >}}
|
||||||
|
|
||||||
var panel = ram_design;
|
- {{< card title="Card" image="" >}}
|
||||||
if (backup + system) {
|
# Heading
|
||||||
file.readPoint = network_native;
|
Suspendisse sed congue orci, eu congue metus. Nullam feugiat urna massa, et fringilla metus consectetur molestie.
|
||||||
sidebar_engine_device(cell_tftp_raster,
|
{{< /card >}}
|
||||||
dual_login_paper.adf_vci.application_reader_design(
|
{{% /columns %}}
|
||||||
graphicsNvramCdma, lpi_footer_snmp, integer_model));
|
|
||||||
}
|
|
||||||
|
|
||||||
## Locis suis novi cum suoque decidit eadem
|
{{% columns %}}
|
||||||
|
- {{< card title="Card" >}}
|
||||||
|
### Heading
|
||||||
|
Nullam feugiat urna massa, et fringilla metus consectetur molestie. Suspendisse sed congue orci, eu congue metus.
|
||||||
|
{{< /card >}}
|
||||||
|
|
||||||
Idmoniae ripis, at aves, ali missa adest, ut _et autem_, et ab?
|
- {{< card title="Card" >}}
|
||||||
|
### Heading
|
||||||
|
Suspendisse sed congue orci, eu congue metus. Nullam feugiat urna massa, et fringilla metus consectetur molestie.
|
||||||
|
{{< /card >}}
|
||||||
|
|
||||||
|
- {{< card title="Card" >}}
|
||||||
|
### Heading
|
||||||
|
Nullam feugiat urna massa, et fringilla metus consectetur molestie. Suspendisse sed congue orci, eu congue metus.
|
||||||
|
{{< /card >}}
|
||||||
|
{{% /columns %}}
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
# Cards
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
{{% columns %}}
|
||||||
|
- {{< card image="https://images.pexels.com/photos/346529/pexels-photo-346529.jpeg" >}}
|
||||||
|
### Line 1
|
||||||
|
Line 2
|
||||||
|
{{< /card >}}
|
||||||
|
|
||||||
|
- {{< card image="https://images.pexels.com/photos/346529/pexels-photo-346529.jpeg" >}}
|
||||||
|
This is tab MacOS content.
|
||||||
|
{{< /card >}}
|
||||||
|
{{% /columns %}}
|
||||||
|
|
||||||
|
{{% columns %}}
|
||||||
|
- {{< card href="/" >}}
|
||||||
|
**Markdown**
|
||||||
|
Suspendisse sed congue orci, eu congue metus. Nullam feugiat urna massa.
|
||||||
|
{{< /card >}}
|
||||||
|
|
||||||
|
- {{< card >}}
|
||||||
|
Suspendisse sed congue orci, eu congue metus. Nullam feugiat urna massa, et fringilla metus consectetur molestie.
|
||||||
|
{{< /card >}}
|
||||||
|
|
||||||
|
- {{< card title="Card" >}}
|
||||||
|
### Heading
|
||||||
|
This is tab MacOS content.
|
||||||
|
{{< /card >}}
|
||||||
|
{{% /columns %}}
|
||||||
@@ -13,7 +13,6 @@ stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
|||||||
> **Markdown content**
|
> **Markdown content**
|
||||||
> Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
> Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||||
> stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
> stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
@@ -51,26 +50,26 @@ stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
|||||||
## Support for markdown alerts
|
## Support for markdown alerts
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> **Markdown content**
|
> **Note**
|
||||||
> Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
> Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||||
> stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
> stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> **Markdown content**
|
> **Tip**
|
||||||
> Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
> Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||||
> stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
> stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> **Markdown content**
|
> **Important**
|
||||||
> Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
> Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||||
> stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
> stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
||||||
|
|
||||||
> [!WARNING]
|
> [!WARNING]
|
||||||
> **Markdown content**
|
> **Warning**
|
||||||
> Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
> Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||||
> stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
> stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
||||||
|
|
||||||
> [!CAUTION]
|
> [!CAUTION]
|
||||||
> **Markdown content**
|
> **Caution**
|
||||||
> Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
> Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||||
> stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
> stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
||||||
+16
-1
@@ -38,10 +38,25 @@ enableGitInfo = true
|
|||||||
weight = 3
|
weight = 3
|
||||||
|
|
||||||
[menu]
|
[menu]
|
||||||
|
[[menu.home]]
|
||||||
|
name = "Documentation"
|
||||||
|
url = "/docs/example/"
|
||||||
|
weight = 1
|
||||||
|
|
||||||
|
[[menu.home]]
|
||||||
|
name = "Showcases"
|
||||||
|
url = "/showcases/"
|
||||||
|
weight = 2
|
||||||
|
|
||||||
|
[[menu.home]]
|
||||||
|
name = "Github"
|
||||||
|
url = "https://github.com/alex-shpak/hugo-book/"
|
||||||
|
weight = 3
|
||||||
|
|
||||||
# [[menu.before]]
|
# [[menu.before]]
|
||||||
[[menu.after]]
|
[[menu.after]]
|
||||||
name = "Github"
|
name = "Github"
|
||||||
url = "https://github.com/alex-shpak/hugo-book"
|
url = "https://github.com/alex-shpak/hugo-book/"
|
||||||
weight = 10
|
weight = 10
|
||||||
|
|
||||||
[[menu.after]]
|
[[menu.after]]
|
||||||
|
|||||||
@@ -36,6 +36,17 @@ languages:
|
|||||||
weight: 3
|
weight: 3
|
||||||
|
|
||||||
menu:
|
menu:
|
||||||
|
home:
|
||||||
|
- name: "Documentation"
|
||||||
|
url: "/docs/example/"
|
||||||
|
weight: 1
|
||||||
|
- name: "Showcases"
|
||||||
|
url: "/showcases/"
|
||||||
|
weight: 2
|
||||||
|
- name: "Github"
|
||||||
|
url: "https://github.com/alex-shpak/hugo-book/"
|
||||||
|
weight: 3
|
||||||
|
|
||||||
# before: []
|
# before: []
|
||||||
after:
|
after:
|
||||||
- name: "Github"
|
- name: "Github"
|
||||||
|
|||||||
@@ -9,5 +9,5 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- with .Inner }}
|
{{- with .Inner }}
|
||||||
<span>\[ {{ . }} \]</span>
|
<span>\[ {{ .| htmlEscape | safeHTML }} \]</span>
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}">
|
<h{{ .Level }} id="{{ .Anchor }}" {{- with .Attributes.class }} class="{{ . }}" {{- end }}>
|
||||||
{{ .Text | safeHTML }}
|
{{ .Text }}
|
||||||
<a class="anchor" href="#{{ .Anchor | safeURL }}">#</a>
|
{{ if default true .Page.Params.bookHeadingAnchor }}
|
||||||
|
<a class="anchor" href="#{{ .Anchor }}">#</a>
|
||||||
|
{{ end }}
|
||||||
</h{{ .Level }}>
|
</h{{ .Level }}>
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{{- /* remove whitespace */ -}}
|
||||||
|
{{- if .Get "href" -}}
|
||||||
|
<a class="book-card{{ with .Get "class" }} {{ . }}{{ end }}"{{ with .Get "href" }} href="{{ . | relURL }}"{{ end }}>
|
||||||
|
{{- template "book-card-content" . -}}
|
||||||
|
</a>
|
||||||
|
{{- else -}}
|
||||||
|
<div class="book-card{{ with .Get "class" }} {{ . }}{{ end }}">
|
||||||
|
{{- template "book-card-content" . -}}
|
||||||
|
</div>
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "book-card-content" -}}
|
||||||
|
{{- with .Get "image" -}}
|
||||||
|
<img src="{{ . | urls.RelLangURL }}" />
|
||||||
|
{{- end }}
|
||||||
|
<div class="markdown-inner">
|
||||||
|
{{ with .InnerDeindent }}{{ . }}{{ end }}
|
||||||
|
</div>
|
||||||
|
{{- end -}}
|
||||||
|
{{- /* remove whitespace */ -}}
|
||||||
@@ -8,5 +8,5 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<pre class="mermaid{{ with .Get "class" }} {{ . }}{{ end }}">
|
<pre class="mermaid{{ with .Get "class" }} {{ . }}{{ end }}">
|
||||||
{{- .Inner -}}
|
{{- .Inner | htmlEscape | safeHTML -}}
|
||||||
</pre>
|
</pre>
|
||||||
|
|||||||
+21
-14
@@ -4,15 +4,11 @@
|
|||||||
{{ partial "docs/html-head" . }}
|
{{ partial "docs/html-head" . }}
|
||||||
{{ partial "docs/inject/head" . }}
|
{{ partial "docs/inject/head" . }}
|
||||||
</head>
|
</head>
|
||||||
<body dir="{{ default "ltr" .Site.Language.LanguageDirection }}">
|
<body dir="{{ default "ltr" .Site.Language.LanguageDirection }}" class="book-kind-{{ .Kind }} book-type-{{ .Type }}">
|
||||||
<input type="checkbox" class="hidden toggle" id="menu-control" />
|
<input type="checkbox" class="hidden toggle" id="menu-control" />
|
||||||
<input type="checkbox" class="hidden toggle" id="toc-control" />
|
<input type="checkbox" class="hidden toggle" id="toc-control" />
|
||||||
<main class="container flex">
|
<main class="container flex">
|
||||||
<aside class="book-menu">
|
{{ template "menu-container" . }} <!-- Left menu -->
|
||||||
<div class="book-menu-content">
|
|
||||||
{{ template "menu" . }} <!-- Left menu Content -->
|
|
||||||
</div>
|
|
||||||
</aside>
|
|
||||||
|
|
||||||
<div class="book-page">
|
<div class="book-page">
|
||||||
<header class="book-header">
|
<header class="book-header">
|
||||||
@@ -29,23 +25,24 @@
|
|||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
{{ template "comments" . }} <!-- Comments block -->
|
{{ template "comments" . }} <!-- Comments block -->
|
||||||
|
|
||||||
<label for="menu-control" class="hidden book-menu-overlay"></label>
|
<label for="menu-control" class="hidden book-menu-overlay"></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ if partial "docs/toc-show" . }}
|
{{ template "toc-container" . }} <!-- Table of Contents -->
|
||||||
<aside class="book-toc">
|
|
||||||
<div class="book-toc-content">
|
|
||||||
{{ template "toc" . }} <!-- Table of Contents -->
|
|
||||||
</div>
|
|
||||||
</aside>
|
|
||||||
{{ end }}
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
{{ partial "docs/inject/body" . }}
|
{{ partial "docs/inject/body" . }}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
{{ define "menu-container" }}
|
||||||
|
<aside class="book-menu">
|
||||||
|
<div class="book-menu-content">
|
||||||
|
{{ template "menu" . }}
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ define "menu" }}
|
{{ define "menu" }}
|
||||||
{{ partial "docs/menu" . }}
|
{{ partial "docs/menu" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -78,6 +75,16 @@
|
|||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ define "toc-container" }}
|
||||||
|
{{ if partial "docs/toc-show" . }}
|
||||||
|
<aside class="book-toc">
|
||||||
|
<div class="book-toc-content">
|
||||||
|
{{ template "toc" . }}
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ define "toc" }}
|
{{ define "toc" }}
|
||||||
{{ partial "docs/toc" . }}
|
{{ partial "docs/toc" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{{ define "menu-container" }}
|
||||||
|
<!-- -->
|
||||||
|
{{ end }}
|
||||||
|
{{ define "toc-container" }}
|
||||||
|
<!-- -->
|
||||||
|
{{ end }}
|
||||||
|
{{ define "footer" }}
|
||||||
|
<!-- -->
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ define "header" }}
|
||||||
|
{{ partial "docs/menu-hugo" .Site.Menus.home }}
|
||||||
|
{{ end }}
|
||||||
Reference in New Issue
Block a user