x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<section class="pk-c-content-slice"> <div class="pk-c-content-slice__container pk-background-color--red"> <div class="pk-c-content-slice__content"> <div class="ui-subtitle"> <div class="ui-subtitle__container"> <h2 class="ui-subtitle__title">Title</h2> <p class="ui-subtitle__text">Cupcake ipsum dolor. Sit amet marshmallow topping cheesecake muffin. Halvah croissant candy canes bonbon candy.</p> </div> </div> </div> <div class="pk-c-content-slice__cards pk-c-content-slice__cards--stacked-cards pk-c-content-slice__cards--two-column"> <div class="pk-c-content-slice__card"> <div class="pk-c-image-text-card"> <div class="pk-c-image-text-card__container pk-c-image-text-card__container--reversed"> <div class="pk-c-image-text-card__image"> <img alt="Alt Text" height="375" width="600" srcset="https://static.raspberrypi.org/wallpaper/temple.jpg 2x" src="https://static.raspberrypi.org/wallpaper/lasers.jpg" /> </div> <div class="pk-c-image-text-card__content"> <div class="pk-c-image-text-card__copy"> <div class="pk-c-image-text-card__titles"> <h3 class="pk-c-image-text-card__subtitle"> The problem </h3> </div> <div class="pk-c-image-text-card__text"> Young people should be digital protagonists who can use technology for good, but in a rapidly changing digital world many lack agency. </div> </div> </div> </div> </div> </div> <div class="pk-c-content-slice__card"> <div class="pk-c-image-text-card"> <div class="pk-c-image-text-card__container pk-c-image-text-card__container--reversed"> <div class="pk-c-image-text-card__image"> <img alt="Alt Text" height="375" width="600" srcset="https://static.raspberrypi.org/wallpaper/canyon.jpg 2x" src="https://static.raspberrypi.org/wallpaper/clouds.jpg" /> </div> <div class="pk-c-image-text-card__content"> <div class="pk-c-image-text-card__copy"> <div class="pk-c-image-text-card__titles"> <h3 class="pk-c-image-text-card__subtitle"> The problem </h3> </div> <div class="pk-c-image-text-card__text"> Young people should be digital protagonists who can use technology for good, but in a rapidly changing digital world many lack agency. </div> </div> </div> </div> </div> </div> </div> <div class="pk-c-content-slice__cta"> <a data-event-category="Category" data-event-label="Label" data-event-action="click" class="rpf-button" href="https://www.raspberrypi.org/">Call to action</a> </div> </div></section>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
c( 'site/content_slice', { title:, description:, background_colour:, cta: { href:, label:, attrs: { data: { event_category: 'Category', event_label: 'Label', event_action: 'click' } } } }) do |component| number_of_cards.times { component.with_card { component.render(image_text_card_preview) } }endNo notes provided.
| Param | Description | Input |
|---|---|---|
|
The number of cards to display |
2
5
|
|
|
The background colour of the content slice |
|
|
|
The title of the content slice |
|
|
|
The description of the content slice |
|
|
|
The URL for the CTA |
|
|
|
The text for the CTA button |
|