File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -283,3 +283,9 @@ class-title
283
283
284
284
class-footer
285
285
: Additional CSS classes for the footer element.
286
+
287
+ class-img-top
288
+ : Additional CSS classes for the top image (if present).
289
+
290
+ class-img-bottom
291
+ : Additional CSS classes for the bottom image (if present).
Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ class CardDirective(SphinxDirective):
68
68
"class-body" : directives .class_option ,
69
69
"class-title" : directives .class_option ,
70
70
"class-footer" : directives .class_option ,
71
+ "class-img-top" : directives .class_option ,
72
+ "class-img-bottom" : directives .class_option ,
71
73
}
72
74
73
75
def run (self ) -> List [nodes .Node ]:
@@ -113,7 +115,7 @@ def create_card(
113
115
"" ,
114
116
uri = options ["img-top" ],
115
117
alt = "card-img-top" ,
116
- classes = ["sd-card-img-top" ],
118
+ classes = ["sd-card-img-top" ] + options . get ( "class-img-top" , []) ,
117
119
)
118
120
container .append (image_top )
119
121
@@ -154,7 +156,7 @@ def create_card(
154
156
"" ,
155
157
uri = options ["img-bottom" ],
156
158
alt = "card-img-bottom" ,
157
- classes = ["sd-card-img-bottom" ],
159
+ classes = ["sd-card-img-bottom" ] + options . get ( "class-img-bottom" , []) ,
158
160
)
159
161
container .append (image_bottom )
160
162
You can’t perform that action at this time.
0 commit comments