Couple of shortcodes (#1485)

* card shortcode

* shortcodes

* updateing readme and hugo version

* readme upd
This commit is contained in:
trean
2025-03-06 19:35:25 +01:00
committed by GitHub
parent 7abc36b8b6
commit 35d0b0f0db
8 changed files with 138 additions and 6 deletions
@@ -0,0 +1,15 @@
{{ $cta := default "Get Started" (.Get "cta") }}
{{ $image := default "/img/rocket.svg" (.Get "image") }}
{{ $link := .Get "link" }}
<div class="docs-core__developing-block mb-4">
<div class="row align-items-center">
<div class="docs-core__developing-block-text col-12 col-lg-7">
<h3 class="docs-core__developing-bloc-title">{{ .Inner }}</h3>
<a href="{{ $link }}" class="button button_outlined button_sm" target="_blank"> Get Started </a>
</div>
<div class="docs-core__developing-block-image col-12 col-lg-5">
<img src="{{ $image }}" alt="" />
</div>
<div class="docs-core__overlay"></div>
</div>
</div>
@@ -0,0 +1,20 @@
{{ $col := .Get "col" }}
{{ $tagColor := .Get "tagColor" }}
{{ $type := default "Document" (.Get "type") }}
{{ $icon := default "/icons/outline/documentation-blue.svg" (.Get "icon") }}
{{ $image := .Get "image" }}
<div class="col-{{ if $col }}{{ $col }}{{ else }}12{{ end }} mb-4">
<a class="docs-card" href="{{ .Get "link" }}">
{{ if $image }}
<img class="docs-card__image" src="{{ $image }}" alt="{{ .Get "title" }}" />
{{ else }}
<div class="docs-card__tag{{ if $tagColor }}docs-card__tag_{{- $tagColor -}}{{ end }}">
<img class="docs-card__icon" src="{{ $icon }}" alt="icon" />
<span>{{ $type }}</span>
</div>
{{ end }}
<h3 class="docs-card__title">{{ .Get "title" }}</h3>
<p class="docs-card__description">{{ .Inner | .Page.RenderString }}</p>
<span class="docs-card__link link link_sm">Read More</span>
</a>
</div>
@@ -0,0 +1,3 @@
<div class="row">
{{ .Inner | safeHTML }}
</div>