Compare commits

..

3 Commits

Author SHA1 Message Date
Mark Dumay
8f5ac20310 Merge pull request #81 from markdumay/develop
Develop
2022-12-09 06:50:59 +01:00
mark
db65425c06 Bump package version 2022-12-09 06:48:30 +01:00
mark
e475460a48 Remove default ratio 2022-12-09 06:48:19 +01:00
4 changed files with 9 additions and 7 deletions

View File

@@ -1,10 +1,11 @@
<!-- <!--
Displays a carousel of several responsive images (see the image shortcode for more details). Add inner <img> Displays a carousel of several responsive images (see the image shortcode for more details). Add inner <img>
elements to define individual image slides. The shortcode supports the following arguments: elements to define individual image slides. The shortcode supports the following arguments:
"ratio": Bootstrap ratio of the image, either "1x1", "4x3" (default), "16x9", or "21x9". "ratio": Optional ratio of the image, either "1x1", "4x3", "16x9", or "21x9". Other values are ignored.
Instead, the original aspect ratio of the image is preserved.
--> -->
{{ $ratio := "4x3" -}} {{ $ratio := "" -}}
{{ $class := "" -}} {{ $class := "" -}}
{{ with .Get "ratio" }}{{ $ratio = . }}{{ end -}} {{ with .Get "ratio" }}{{ $ratio = . }}{{ end -}}
{{ with .Get "class" }}{{ $class = . }}{{ end -}} {{ with .Get "class" }}{{ $class = . }}{{ end -}}

View File

@@ -2,13 +2,14 @@
Renders a carousel item with a responsive image (see the image shortcode for more details). The shortcode Renders a carousel item with a responsive image (see the image shortcode for more details). The shortcode
supports the following arguments: supports the following arguments:
"src": Required relative url of the image, e.g. "img/example.jpg" "src": Required relative url of the image, e.g. "img/example.jpg"
"ratio": Bootstrap ratio of the image, either "1x1", "4x3" (default), "16x9", or "21x9". "ratio": Optional ratio of the image, either "1x1", "4x3", "16x9", or "21x9". Other values are ignored.
Instead, the original aspect ratio of the image is preserved.
"caption": Optional carousel slide caption. "caption": Optional carousel slide caption.
--> -->
{{- $src := .Get "src" -}} {{- $src := .Get "src" -}}
{{ $caption := .Get "caption" -}} {{ $caption := .Get "caption" -}}
{{- $ratio := "4x3" -}} {{- $ratio := "" -}}
{{ with .Parent -}} {{ with .Parent -}}
{{ with .Get "ratio" }}{{ $ratio = . }}{{ end -}} {{ with .Get "ratio" }}{{ $ratio = . }}{{ end -}}
{{ else }} {{ else }}

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "@markdumay/hugo-theme-hinode", "name": "@markdumay/hugo-theme-hinode",
"version": "0.7.2", "version": "0.7.4",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@markdumay/hugo-theme-hinode", "name": "@markdumay/hugo-theme-hinode",
"version": "0.7.2", "version": "0.7.4",
"hasInstallScript": true, "hasInstallScript": true,
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "@markdumay/hugo-theme-hinode", "name": "@markdumay/hugo-theme-hinode",
"version": "0.7.3", "version": "0.7.4",
"description": "Hinode is a clean blog theme for Hugo, an open-source static site generator", "description": "Hinode is a clean blog theme for Hugo, an open-source static site generator",
"main": "index.js", "main": "index.js",
"publishConfig": { "publishConfig": {