Skip to content

Commit ecc172a

Browse files
committed
add a new footer_link property to cards
1 parent 41f6fec commit ecc172a

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

sqlpage/templates/card.handlebars

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@
2020
mt-1 mb-3">
2121
{{#each_row}}
2222
<div class="col">
23-
<{{#if link}}a href="{{link}}" {{else}}div{{/if}} class="card h-100 {{#if active}}card-active{{/if}}">
23+
<div class="card h-100 {{#if active}}card-active{{/if}}">
24+
{{#if link}}
25+
<a href="{{link}}" style="text-decoration: inherit; color: inherit">
26+
{{/if}}
2427
{{#if top_image}}
2528
<img src="{{top_image}}" class="card-img-top" />
2629
{{/if}}
@@ -36,9 +39,16 @@
3639
{{~/if~}}
3740
</div>
3841
</div>
42+
{{#if link}}
43+
</a>
44+
{{/if}}
3945
{{#if footer}}
4046
<div class="card-footer text-muted py-2">
41-
{{footer}}
47+
{{#if footer_link}}
48+
<a href="{{footer_link}}">{{footer}}</a>
49+
{{else}}
50+
{{footer}}
51+
{{/if}}
4252
</div>
4353
{{/if}}
4454
{{#if footer_md}}
@@ -51,7 +61,7 @@
5161
{{~icon_img icon~}}
5262
</div>
5363
{{/if}}
54-
</{{#if link}}a {{else}}div{{/if}}>
64+
</div>
5565
</div>
5666
{{/each_row}}
5767
</div>

0 commit comments

Comments
 (0)