-
Notifications
You must be signed in to change notification settings - Fork 0
/
branded-footer-example.env.config.jsx
80 lines (71 loc) · 1.59 KB
/
branded-footer-example.env.config.jsx
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
Basic Frontend Pluggability Workshop Example.
*/
import {
DIRECT_PLUGIN,
IFRAME_PLUGIN,
PLUGIN_OPERATIONS,
} from '@openedx/frontend-plugin-framework';
import {
Badge,
Card,
Container,
Truncate,
Hyperlink,
} from '@openedx/paragon';
const sidebarRecommender = () => (
<Container>
<h3 className="p2-b">
Other courses for you
</h3>
<div className="product-card-container d-flex">
<Card className="mb-4" orientation="horizontal">
<Card.ImageCap
src="https://picsum.photos/360/200/"
srcAlt="Card image"
logoSrc="https://picsum.photos/150/150"
logoAlt="Card logo"
/>
<Card.Section
title="Section title"
>
Course recommendation
</Card.Section>
<Card.Footer orientation="horizontal">
</Card.Footer>
</Card>
</div>
</Container>
);
import Footer from './src/my-brand/Footer'
const config = {
pluginSlots: {
footer_slot: {
keepDefault: true,
plugins: [
{
op: PLUGIN_OPERATIONS.Insert,
widget: {
id: 'custom_footer',
type: DIRECT_PLUGIN,
RenderWidget: Footer,
},
}
]
},
widget_sidebar_plugin_slot: {
keepDefault: false,
plugins: [
{
op: PLUGIN_OPERATIONS.Insert,
widget: {
id: 'sidebar_iframe_plugin',
type: DIRECT_PLUGIN,
RenderWidget: sidebarRecommender,
},
}
],
},
},
}
export default config;