From 9ccd5ee9a192605ba9c147ec1fdedf714924388a Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Fri, 22 Apr 2022 23:55:24 +0200 Subject: [PATCH] make buttons configurable --- _includes/block/hero.html | 10 ++++++++-- _layouts/user.html | 9 ++++++++- assets/index.css | 4 ++++ use/maker.md | 3 +++ 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/_includes/block/hero.html b/_includes/block/hero.html index 8bd58f00..207e1198 100644 --- a/_includes/block/hero.html +++ b/_includes/block/hero.html @@ -12,10 +12,16 @@ {% if include.detail %}

{{ include.detail }}

{% endif %} + {% if include.buttons %}
- - + {% for item in include.buttons %} + + {% endfor %}
+ {% endif %}
{% if include.image %} diff --git a/_layouts/user.html b/_layouts/user.html index 7a94edd1..f161b780 100644 --- a/_layouts/user.html +++ b/_layouts/user.html @@ -2,7 +2,14 @@ layout: default --- -{% include block/hero.html title=site.tagline title_2=page.title_2 image='https://dummyimage.com/860x600' color='with InvenTree' detail=page.long_text %} +{% include block/hero.html + title=site.tagline + title_2=page.title_2 + image='https://dummyimage.com/860x600' + color='with InvenTree' + detail=page.long_text + buttons=page.buttons +%} {% assign data = site.data[page.data] %} {% include block/features.html data=data extend=true %} diff --git a/assets/index.css b/assets/index.css index f1162fb5..8bac2d6d 100644 --- a/assets/index.css +++ b/assets/index.css @@ -32,6 +32,10 @@ layout: empty @apply text-gray-700 bg-gray-100 hover:bg-gray-200 rounded } + .cm-hvr-btn-primary { + @apply text-white bg-secondary hover:bg-primary rounded + } + .cm-gray-1 { @apply text-gray-900 } diff --git a/use/maker.md b/use/maker.md index 2eec5e1c..8acf4049 100644 --- a/use/maker.md +++ b/use/maker.md @@ -6,4 +6,7 @@ data: for_maker long_text: | lorem ipsum place for multiline inteligent text +buttons: + - text: Button + - text: Button1 ---