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
10 changes: 5 additions & 5 deletions docsy.dev/content/en/docs/content/shortcodes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,21 +286,21 @@ feature.

```go-template
{{%/* pageinfo color="info" */%}}
This is placeholder content.
This is _placeholder content_ :heart:
{{%/* /pageinfo */%}}
```

Renders to:

{{% pageinfo color="info" %}}

This is placeholder content
This is _placeholder content_ :heart:

{{% /pageinfo %}}

| Parameter | Default | Description |
| --------- | ------- | ------------------------------------------------------------- |
| color | primary | One of the theme colors, eg `primary`, `info`, `warning` etc. |
| Parameter | Default | Description |
| --------- | ------- | -------------------------------------------------------------- |
| color | primary | One of the theme colors, eg `primary`, `info`, `warning`, etc. |

### `imgproc`

Expand Down
39 changes: 23 additions & 16 deletions layouts/_shortcodes/blocks/cover.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{ $_hugo_config := `{ "version": 1 }` -}}
{{ $blockID := printf "td-cover-block-%d" .Ordinal -}}
{{ $promo_image := (.Page.Resources.ByType "image").GetMatch "**background*" -}}
{{ $logo_image := (.Page.Resources.ByType "image").GetMatch "**logo*" -}}
Expand All @@ -9,12 +8,12 @@
{{ $height := .Get "height" | default "max" -}}

{{ with $promo_image -}}
{{ $promo_image_big := . -}}
{{ $promo_image_small := . -}}
{{ if ne $promo_image.MediaType.SubType "svg" -}}
{{ $promo_image_big = .Fill (printf "1920x1080 %s" $image_anchor) -}}
{{ $promo_image_small = .Fill (printf "960x540 %s" $image_anchor) -}}
{{ end -}}
{{ $promo_image_big := . -}}
{{ $promo_image_small := . -}}
{{ if ne $promo_image.MediaType.SubType "svg" -}}
{{ $promo_image_big = .Fill (printf "1920x1080 %s" $image_anchor) -}}
{{ $promo_image_small = .Fill (printf "960x540 %s" $image_anchor) -}}
{{ end -}}
<link rel="preload" as="image" href="{{ $promo_image_small.RelPermalink }}" media="(max-width: 1200px)">
<link rel="preload" as="image" href="{{ $promo_image_big.RelPermalink }}" media="(min-width: 1200px)">
<style>
Expand All @@ -30,19 +29,27 @@
{{ end -}}

<section id="{{ $blockID }}" class="row td-cover-block td-cover-block--height-{{ $height -}}
{{ if not .Site.Params.ui.navbar_translucent_over_cover_disable }} js-td-cover
{{- end }} td-overlay td-overlay--dark -bg-{{ $col_id }}">
{{ if not .Site.Params.ui.navbar_translucent_over_cover_disable }} js-td-cover
{{- end }} td-overlay td-overlay--dark -bg-{{ $col_id }}" {{/**/ -}}
>
<div class="col-12">
<div class="container td-overlay__inner">
<div class="text-center">
{{ with .Get "title" }}<h1 class="display-1 mt-0 mt-md-5 pb-4">{{ $title := . }}{{ with $logo_image }}{{ $logo_image_resized := (.Fit (printf "70x70 %s" $logo_anchor)) }}<img class="td-cover-logo" src="{{ $logo_image_resized.RelPermalink }}" alt="{{ $title | html }} Logo">{{ end }}{{ $title | html }}</h1>{{ end }}
{{ with .Get "subtitle" }}<p class="display-2 text-uppercase mb-0">{{ . | html }}</p>{{ end }}
{{ with .Get "title" -}}
<h1 class="display-1 mt-0 mt-md-5 pb-4">
{{- $title := . -}}
{{ with $logo_image -}}
{{ $logo_image_resized := (.Fit (printf "70x70 %s" $logo_anchor)) -}}
<img class="td-cover-logo" src="{{ $logo_image_resized.RelPermalink }}" alt="{{ $title | html }} Logo">
{{- end -}}
{{ $title | html -}}
</h1>
{{ end -}}
{{ with .Get "subtitle" -}}
<p class="display-2 text-uppercase mb-0">{{ . | html }}</p>
{{ end -}}
<div class="pt-3 lead">
{{ if eq .Page.File.Ext "md" }}
{{ .Inner | markdownify }}
{{ else }}
{{ .Inner | htmlUnescape | safeHTML }}
{{ end }}
{{ .Inner -}}
</div>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion layouts/_shortcodes/pageinfo.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{ $_hugo_config := `{ "version": 1 }` }}
{{ $color := .Get "color" | default "primary" }}
<div class="pageinfo pageinfo-{{ $color }}">
{{ .Inner }}
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+65-gbf7c497",
"version": "0.14.0-dev+66-g24c01d2",
"repository": "github:google/docsy",
"homepage": "https://www.docsy.dev",
"license": "Apache-2.0",
Expand Down
Loading