File tree Expand file tree Collapse file tree 7 files changed +78
-1225
lines changed Expand file tree Collapse file tree 7 files changed +78
-1225
lines changed Original file line number Diff line number Diff line change 35
35
"@edx/frontend-platform" : " ^8.2.1" ,
36
36
"@edx/reactifex" : " ^2.1.1" ,
37
37
"@openedx/frontend-build" : " ^14.3.1" ,
38
- "@openedx/frontend-plugin-framework" : " ^1.5.0" ,
39
38
"@openedx/paragon" : " ^23.3.0" ,
40
39
"@testing-library/jest-dom" : " ^5.16.4" ,
41
40
"@testing-library/react" : " ^16.2.0" ,
56
55
"@fortawesome/free-regular-svg-icons" : " 6.7.2" ,
57
56
"@fortawesome/free-solid-svg-icons" : " 6.7.2" ,
58
57
"@fortawesome/react-fontawesome" : " 0.2.2" ,
58
+ "@openedx/frontend-plugin-framework" : " ^1.5.0" ,
59
59
"classnames" : " ^2.5.1" ,
60
60
"jest-environment-jsdom" : " ^29.7.0" ,
61
61
"lodash" : " ^4.17.21" ,
Original file line number Diff line number Diff line change @@ -8,14 +8,14 @@ import {
8
8
Button ,
9
9
Container ,
10
10
Hyperlink ,
11
- Image ,
12
11
TransitionReplace ,
13
12
} from '@openedx/paragon' ;
14
13
import { ExpandLess , ExpandMore , Help } from '@openedx/paragon/icons' ;
15
14
import classNames from 'classnames' ;
16
15
import PropTypes from 'prop-types' ;
17
16
18
17
import messages from './messages' ;
18
+ import StudioFooterLogoSlot from '../../plugin-slots/StudioFooterLogoSlot' ;
19
19
20
20
ensureConfig ( [
21
21
'LMS_BASE_URL' ,
@@ -134,13 +134,7 @@ const StudioFooter = ({
134
134
< FormattedMessage { ...messages . trademarkMessage } />
135
135
< Hyperlink className = "ml-1" destination = "https://www.edx.org" > edX Inc</ Hyperlink > .
136
136
< ActionRow . Spacer />
137
- < Hyperlink destination = "https://openedx.org" className = "float-right" >
138
- < Image
139
- width = "120px"
140
- alt = "Powered by Open edX"
141
- src = "https://logos.openedx.org/open-edx-logo-tag.png"
142
- />
143
- </ Hyperlink >
137
+ < StudioFooterLogoSlot />
144
138
</ ActionRow >
145
139
</ Container >
146
140
</ >
Original file line number Diff line number Diff line change
1
+ # ` frontend-component-footer ` Plugin Slots
2
+
3
+ * [ ` studio_footer_logo_slot ` ] ( ./StudioFooterLogoSlot/ )
Original file line number Diff line number Diff line change
1
+ # StudioFooterLogo Slot
2
+
3
+ ### Slot ID: ` studio_footer_logo_slot `
4
+
5
+ ## Description
6
+
7
+ This slot is used to add your site logo to the studio footer.
8
+
9
+ ## Examples
10
+
11
+ ### Add your site logo.
12
+
13
+ The following ` env.config.jsx ` will add your site logo to the studio footer.
14
+
15
+ ![ Screenshot of modified Studio Footer Logo] ( ./images/add_your_site_logo.png )
16
+
17
+ ``` jsx
18
+ import { PLUGIN_OPERATIONS , DIRECT_PLUGIN } from ' @openedx/frontend-plugin-framework' ;
19
+ import {
20
+ Hyperlink ,
21
+ Image ,
22
+ } from ' @openedx/paragon' ;
23
+
24
+ const config = {
25
+ pluginSlots: {
26
+ studio_footer_logo_slot: {
27
+ keepDefault: true ,
28
+ plugins: [
29
+ {
30
+ op: PLUGIN_OPERATIONS .Insert ,
31
+ widget: {
32
+ id: ' studio_footer_logo_slot' ,
33
+ type: DIRECT_PLUGIN ,
34
+ priority: 40 ,
35
+ RenderWidget : () => {
36
+ return (
37
+ < Hyperlink destination= " https://example.com/" className= " float-right" >
38
+ < Image
39
+ height= " 48px"
40
+ alt= " Hosted by MySite"
41
+ src= " https://logos.openedx.org/generic-logo.svg"
42
+ / >
43
+ < / Hyperlink>
44
+ )
45
+ }
46
+ }
47
+ },
48
+ ],
49
+ }
50
+ },
51
+ };
52
+
53
+ export default config ;
54
+ ```
Original file line number Diff line number Diff line change
1
+ import React from 'react' ;
2
+ import { PluginSlot } from '@openedx/frontend-plugin-framework' ;
3
+ import { Hyperlink , Image } from '@openedx/paragon' ;
4
+
5
+ const StudioFooterLogoSlot = ( ) => (
6
+ < PluginSlot id = "studio_footer_logo_slot" >
7
+ < Hyperlink destination = "https://openedx.org" className = "float-right" >
8
+ < Image
9
+ width = "120px"
10
+ alt = "Powered by Open edX"
11
+ src = "https://logos.openedx.org/open-edx-logo-tag.png"
12
+ />
13
+ </ Hyperlink >
14
+ </ PluginSlot >
15
+ ) ;
16
+
17
+ export default StudioFooterLogoSlot ;
You can’t perform that action at this time.
0 commit comments