File tree 3 files changed +22
-2
lines changed
packages/frontend/components/card
3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 197
197
}]
198
198
}) }}
199
199
200
+ {{ card ({
201
+ locale : application .locale ,
202
+ title : " Card" ,
203
+ description : " Description" ,
204
+ published : " 2024-12-22" ,
205
+ permalink : " #"
206
+ }) }}
207
+
200
208
<h2 ><code >cardGrid</code ></h2 >
201
209
202
210
{{ cardGrid ({
Original file line number Diff line number Diff line change 48
48
font : var (--card-title-font , var (--font-subhead ));
49
49
}
50
50
51
- .card__title a {
51
+ .card a [ rel = "bookmark" ] {
52
52
& ::before {
53
53
border-radius : var (--border-radius-small );
54
54
content : "" ;
Original file line number Diff line number Diff line change 9
9
</div >
10
10
{% endif %}
11
11
<div class =" card__body" >
12
+ {% if opts .title %}
12
13
<h {{ headingLevel }} class =" card__title" >
13
- <a href =" {{ opts.url }}" >
14
+ {% if opts .url and not opts .permalink %}
15
+ <a href =" {{ opts.url }}" rel =" bookmark" >
16
+ {% endif %}
14
17
{{- icon (opts .icon ) if opts .icon -}}
15
18
{{- opts .title | safe -}}
19
+ {% if opts .url and not opts .permalink %}
16
20
</a >
21
+ {% endif %}
17
22
</h {{ headingLevel }} >
23
+ {% endif %}
18
24
{{ prose ({
19
25
classes : " card__meta" ,
20
26
text : opts .description | markdown | striptags
24
30
{% for item in opts .badges %}
25
31
{{ badge (item ) | indent (6) if item }}
26
32
{% endfor %}
33
+ {% if opts .permalink and not opts .url %}
34
+ <a href =" {{ opts.permalink }}" rel =" bookmark" >
35
+ {% endif %}
27
36
<time datetime =" {{ opts.published }}" >
28
37
{{ opts .published | date (" PPp" , { locale : opts .locale , timeZone : application .timeZone }) }}
29
38
</time >
39
+ {% if opts .permalink and not opts .url %}
40
+ </a >
41
+ {% endif %}
30
42
</footer >
31
43
{% endif %}
32
44
</div >
You can’t perform that action at this time.
0 commit comments