@opencraft/frontend-plugin-sandbox 1.2.0-alpha.2 → 1.3.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
@@ -1,28 +1,23 @@
1
1
  import React from 'react';
2
- import { Image, Row, Stack } from '@openedx/paragon';
3
- import bannerBg from '../assets/banner-bg.png';
2
+ import { Image, Row, Col } from '@openedx/paragon';
3
+ import largeBannerBg from '../assets/desktop-openclass.jpg';
4
+ import smallBannerBg from '../assets/mobile-openclass.jpg';
4
5
  export const CatalogBanner = () => /*#__PURE__*/React.createElement(Row, {
5
6
  direction: "horizontal",
6
7
  className: "bg-primary"
7
- }, /*#__PURE__*/React.createElement(Stack, {
8
+ }, /*#__PURE__*/React.createElement(Col, {
8
9
  direction: "vertical",
9
- className: "justify-content-center px-6",
10
- style: {
11
- maxWidth: '55rem'
12
- }
10
+ className: "justify-content-center align-content-center px-6 col-12 col-lg-6 col-xl-5"
13
11
  }, /*#__PURE__*/React.createElement("h1", {
14
- className: "display-2 text-light-100"
12
+ className: "intro-header text-light-100"
15
13
  }, "You\u2019re viewing a live", /*#__PURE__*/React.createElement("span", {
16
14
  className: "text-brand-500"
17
15
  }, ' Open edX® '), "demo"), /*#__PURE__*/React.createElement("p", {
18
- className: "h4 text-light-100 "
19
- }, "OpenClass is a demo site by OpenCraft where you can explore the Open edX platform as a learner or course author.")), /*#__PURE__*/React.createElement(Stack, {
20
- className: "justify-content-end",
21
- style: {
22
- backgroundImage: 'url(../assets/banner-bg.png)'
23
- }
16
+ className: "text-light-100"
17
+ }, "OpenClass is a demo site by OpenCraft where you can explore the Open edX platform as a learner or course author.")), /*#__PURE__*/React.createElement(Col, {
18
+ className: 'col-12 col-lg-6 col-xl-7'
24
19
  }, /*#__PURE__*/React.createElement(Image, {
25
- src: bannerBg,
20
+ src: largeBannerBg,
26
21
  style: {
27
22
  height: '100%',
28
23
  width: '100%',
@@ -30,6 +25,15 @@ export const CatalogBanner = () => /*#__PURE__*/React.createElement(Row, {
30
25
  objectFit: 'contain',
31
26
  objectPosition: 'right top'
32
27
  },
28
+ className: 'd-none d-xl-block',
29
+ alt: "illustration of a workspace with a computer screen displaying charts and graphs, accompanied by a desk lamp, coffee cup, and potted plant"
30
+ }), /*#__PURE__*/React.createElement(Image, {
31
+ src: smallBannerBg,
32
+ style: {
33
+ width: '100%',
34
+ objectFit: 'contain'
35
+ },
36
+ className: 'd-block d-xl-none',
33
37
  alt: "illustration of a workspace with a computer screen displaying charts and graphs, accompanied by a desk lamp, coffee cup, and potted plant"
34
38
  })));
35
39
  //# sourceMappingURL=CatalogBanner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CatalogBanner.js","names":["React","Image","Row","Stack","bannerBg","CatalogBanner","createElement","direction","className","style","maxWidth","backgroundImage","src","height","width","maxHeight","objectFit","objectPosition","alt"],"sources":["../../src/components/CatalogBanner.tsx"],"sourcesContent":["import React from 'react';\nimport { Image, Row, Stack } from '@openedx/paragon';\nimport bannerBg from '../assets/banner-bg.png';\n\nexport const CatalogBanner = () => (\n <Row\n direction=\"horizontal\"\n className=\"bg-primary\"\n >\n <Stack\n direction=\"vertical\"\n className=\"justify-content-center px-6\"\n style={{ maxWidth: '55rem' }}\n >\n <h1 className=\"display-2 text-light-100\">\n You’re viewing a live\n <span className=\"text-brand-500\">\n {' Open edX® '}\n </span>\n demo\n </h1>\n <p className=\"h4 text-light-100 \">\n OpenClass is a demo site by OpenCraft where you can explore the\n Open edX platform as a learner or course author.\n </p>\n </Stack>\n <Stack\n className=\"justify-content-end\"\n style={{\n backgroundImage: 'url(../assets/banner-bg.png)',\n }}\n >\n <Image\n src={bannerBg}\n style={{\n height: '100%',\n width: '100%',\n maxHeight: '550px',\n objectFit: 'contain',\n objectPosition: 'right top',\n }}\n alt=\"illustration of a workspace with a computer screen displaying charts and graphs, accompanied by a desk lamp, coffee cup, and potted plant\"\n />\n </Stack>\n </Row>\n);\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,GAAG,EAAEC,KAAK,QAAQ,kBAAkB;AACpD,OAAOC,QAAQ,MAAM,yBAAyB;AAE9C,OAAO,MAAMC,aAAa,GAAGA,CAAA,kBAC3BL,KAAA,CAAAM,aAAA,CAACJ,GAAG;EACFK,SAAS,EAAC,YAAY;EACtBC,SAAS,EAAC;AAAY,gBAEtBR,KAAA,CAAAM,aAAA,CAACH,KAAK;EACJI,SAAS,EAAC,UAAU;EACpBC,SAAS,EAAC,6BAA6B;EACvCC,KAAK,EAAE;IAAEC,QAAQ,EAAE;EAAQ;AAAE,gBAE7BV,KAAA,CAAAM,aAAA;EAAIE,SAAS,EAAC;AAA0B,GAAC,4BAEvC,eAAAR,KAAA,CAAAM,aAAA;EAAME,SAAS,EAAC;AAAgB,GAC7B,aACG,CAAC,QAEL,CAAC,eACLR,KAAA,CAAAM,aAAA;EAAGE,SAAS,EAAC;AAAoB,GAAC,kHAG/B,CACE,CAAC,eACRR,KAAA,CAAAM,aAAA,CAACH,KAAK;EACJK,SAAS,EAAC,qBAAqB;EAC/BC,KAAK,EAAE;IACLE,eAAe,EAAE;EACnB;AAAE,gBAEFX,KAAA,CAAAM,aAAA,CAACL,KAAK;EACJW,GAAG,EAAER,QAAS;EACdK,KAAK,EAAE;IACLI,MAAM,EAAE,MAAM;IACdC,KAAK,EAAE,MAAM;IACbC,SAAS,EAAE,OAAO;IAClBC,SAAS,EAAE,SAAS;IACpBC,cAAc,EAAE;EAClB,CAAE;EACFC,GAAG,EAAC;AAA2I,CAChJ,CACI,CACJ,CACN","ignoreList":[]}
1
+ {"version":3,"file":"CatalogBanner.js","names":["React","Image","Row","Col","largeBannerBg","smallBannerBg","CatalogBanner","createElement","direction","className","src","style","height","width","maxHeight","objectFit","objectPosition","alt"],"sources":["../../src/components/CatalogBanner.tsx"],"sourcesContent":["import React from 'react';\nimport { Image, Row, Col } from '@openedx/paragon';\nimport largeBannerBg from '../assets/desktop-openclass.jpg';\nimport smallBannerBg from '../assets/mobile-openclass.jpg';\n\nexport const CatalogBanner = () => (\n <Row\n direction=\"horizontal\"\n className=\"bg-primary\"\n >\n <Col\n direction=\"vertical\"\n className=\"justify-content-center align-content-center px-6 col-12 col-lg-6 col-xl-5\"\n >\n <h1 className=\"intro-header text-light-100\">\n You’re viewing a live\n <span className=\"text-brand-500\">\n {' Open edX® '}\n </span>\n demo\n </h1>\n <p className=\"text-light-100\">\n OpenClass is a demo site by OpenCraft where you can explore the\n Open edX platform as a learner or course author.\n </p>\n </Col>\n <Col className={'col-12 col-lg-6 col-xl-7'}>\n <Image\n src={largeBannerBg}\n style={{\n height: '100%',\n width: '100%',\n maxHeight: '550px',\n objectFit: 'contain',\n objectPosition: 'right top',\n }}\n className={'d-none d-xl-block'}\n alt=\"illustration of a workspace with a computer screen displaying charts and graphs, accompanied by a desk lamp, coffee cup, and potted plant\"\n />\n <Image\n src={smallBannerBg}\n style={{\n width: '100%',\n objectFit: 'contain',\n }}\n className={'d-block d-xl-none'}\n alt=\"illustration of a workspace with a computer screen displaying charts and graphs, accompanied by a desk lamp, coffee cup, and potted plant\"\n />\n </Col>\n </Row>\n);\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,GAAG,EAAEC,GAAG,QAAQ,kBAAkB;AAClD,OAAOC,aAAa,MAAM,iCAAiC;AAC3D,OAAOC,aAAa,MAAM,gCAAgC;AAE1D,OAAO,MAAMC,aAAa,GAAGA,CAAA,kBAC3BN,KAAA,CAAAO,aAAA,CAACL,GAAG;EACFM,SAAS,EAAC,YAAY;EACtBC,SAAS,EAAC;AAAY,gBAEtBT,KAAA,CAAAO,aAAA,CAACJ,GAAG;EACFK,SAAS,EAAC,UAAU;EACpBC,SAAS,EAAC;AAA2E,gBAErFT,KAAA,CAAAO,aAAA;EAAIE,SAAS,EAAC;AAA6B,GAAC,4BAE1C,eAAAT,KAAA,CAAAO,aAAA;EAAME,SAAS,EAAC;AAAgB,GAC7B,aACG,CAAC,QAEL,CAAC,eACLT,KAAA,CAAAO,aAAA;EAAGE,SAAS,EAAC;AAAgB,GAAC,kHAG3B,CACA,CAAC,eACNT,KAAA,CAAAO,aAAA,CAACJ,GAAG;EAACM,SAAS,EAAE;AAA2B,gBACzCT,KAAA,CAAAO,aAAA,CAACN,KAAK;EACJS,GAAG,EAAEN,aAAc;EACnBO,KAAK,EAAE;IACLC,MAAM,EAAE,MAAM;IACdC,KAAK,EAAE,MAAM;IACbC,SAAS,EAAE,OAAO;IAClBC,SAAS,EAAE,SAAS;IACpBC,cAAc,EAAE;EAClB,CAAE;EACFP,SAAS,EAAE,mBAAoB;EAC/BQ,GAAG,EAAC;AAA2I,CAChJ,CAAC,eACFjB,KAAA,CAAAO,aAAA,CAACN,KAAK;EACJS,GAAG,EAAEL,aAAc;EACnBM,KAAK,EAAE;IACHE,KAAK,EAAE,MAAM;IACbE,SAAS,EAAE;EACf,CAAE;EACFN,SAAS,EAAE,mBAAoB;EAC/BQ,GAAG,EAAC;AAA2I,CAClJ,CACI,CACF,CACN","ignoreList":[]}
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@ export const slotSettings = {
18
18
  }
19
19
  }]
20
20
  },
21
- desktop_user_menu_slot: {
21
+ 'org.openedx.frontend.layout.header_desktop_user_menu.v1': {
22
22
  keepDefault: true,
23
23
  plugins: [{
24
24
  op: PLUGIN_OPERATIONS.Wrap,
@@ -26,7 +26,7 @@ export const slotSettings = {
26
26
  wrapper: MenuWrapper
27
27
  }]
28
28
  },
29
- mobile_user_menu_slot: {
29
+ 'org.openedx.frontend.layout.header_mobile_user_menu.v1': {
30
30
  keepDefault: true,
31
31
  plugins: [{
32
32
  op: PLUGIN_OPERATIONS.Wrap,
@@ -34,7 +34,7 @@ export const slotSettings = {
34
34
  wrapper: MenuWrapper
35
35
  }]
36
36
  },
37
- footer_slot: {
37
+ 'org.openedx.frontend.layout.footer.v1': {
38
38
  plugins: [{
39
39
  op: PLUGIN_OPERATIONS.Hide,
40
40
  widgetId: 'default_contents'
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["DIRECT_PLUGIN","PLUGIN_OPERATIONS","MenuWrapper","SandboxFooter","DropDownToggler","CatalogBanner","slotSettings","keepDefault","plugins","op","Insert","widget","id","type","RenderWidget","desktop_user_menu_slot","Wrap","widgetId","wrapper","mobile_user_menu_slot","footer_slot","Hide"],"sources":["../src/index.ts"],"sourcesContent":["import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';\nimport { MenuWrapper } from './components/MenuWrapper';\nimport { SandboxFooter } from './components/SandboxFooter';\nimport { DropDownToggler } from './components/DropDownToggler';\nimport { CatalogBanner } from './components/CatalogBanner';\n\nexport {\n MenuWrapper, SandboxFooter, DropDownToggler, CatalogBanner,\n};\n// Example slot settings you can use in your deployment. You may be able to import these\n// for quick development usage.\nexport const slotSettings = {\n 'org.openedx.frontend.layout.header_desktop_user_menu_toggle.v1': {\n keepDefault: false,\n plugins: [\n {\n op: PLUGIN_OPERATIONS.Insert,\n widget: {\n id: 'custom_desktop_toggle',\n type: DIRECT_PLUGIN,\n RenderWidget: DropDownToggler,\n },\n },\n ],\n },\n desktop_user_menu_slot: {\n keepDefault: true,\n plugins: [\n {\n op: PLUGIN_OPERATIONS.Wrap,\n widgetId: 'default_contents',\n wrapper: MenuWrapper,\n },\n ],\n },\n mobile_user_menu_slot: {\n keepDefault: true,\n plugins: [\n {\n op: PLUGIN_OPERATIONS.Wrap,\n widgetId: 'default_contents',\n wrapper: MenuWrapper,\n },\n ],\n },\n footer_slot: {\n plugins: [\n {\n op: PLUGIN_OPERATIONS.Hide,\n widgetId: 'default_contents',\n },\n {\n op: PLUGIN_OPERATIONS.Insert,\n widget: {\n id: 'custom_footer',\n type: DIRECT_PLUGIN,\n RenderWidget: SandboxFooter,\n },\n },\n ],\n },\n 'org.openedx.frontend.catalog.home_page.banner': {\n plugins: [\n {\n op: PLUGIN_OPERATIONS.Hide,\n widgetId: 'default_contents',\n },\n {\n op: PLUGIN_OPERATIONS.Insert,\n widget: {\n id: 'custom_catalog_banner',\n type: DIRECT_PLUGIN,\n RenderWidget: CatalogBanner,\n },\n },\n ],\n },\n};\n"],"mappings":"AAAA,SAASA,aAAa,EAAEC,iBAAiB,QAAQ,oCAAoC;AACrF,SAASC,WAAW,QAAQ,0BAA0B;AACtD,SAASC,aAAa,QAAQ,4BAA4B;AAC1D,SAASC,eAAe,QAAQ,8BAA8B;AAC9D,SAASC,aAAa,QAAQ,4BAA4B;AAE1D,SACEH,WAAW,EAAEC,aAAa,EAAEC,eAAe,EAAEC,aAAa;AAE5D;AACA;AACA,OAAO,MAAMC,YAAY,GAAG;EAC1B,gEAAgE,EAAE;IAChEC,WAAW,EAAE,KAAK;IAClBC,OAAO,EAAE,CACP;MACEC,EAAE,EAAER,iBAAiB,CAACS,MAAM;MAC5BC,MAAM,EAAE;QACNC,EAAE,EAAE,uBAAuB;QAC3BC,IAAI,EAAEb,aAAa;QACnBc,YAAY,EAAEV;MAChB;IACF,CAAC;EAEL,CAAC;EACDW,sBAAsB,EAAE;IACtBR,WAAW,EAAE,IAAI;IACjBC,OAAO,EAAE,CACP;MACEC,EAAE,EAAER,iBAAiB,CAACe,IAAI;MAC1BC,QAAQ,EAAE,kBAAkB;MAC5BC,OAAO,EAAEhB;IACX,CAAC;EAEL,CAAC;EACDiB,qBAAqB,EAAE;IACrBZ,WAAW,EAAE,IAAI;IACjBC,OAAO,EAAE,CACP;MACEC,EAAE,EAAER,iBAAiB,CAACe,IAAI;MAC1BC,QAAQ,EAAE,kBAAkB;MAC5BC,OAAO,EAAEhB;IACX,CAAC;EAEL,CAAC;EACDkB,WAAW,EAAE;IACXZ,OAAO,EAAE,CACP;MACEC,EAAE,EAAER,iBAAiB,CAACoB,IAAI;MAC1BJ,QAAQ,EAAE;IACZ,CAAC,EACD;MACER,EAAE,EAAER,iBAAiB,CAACS,MAAM;MAC5BC,MAAM,EAAE;QACNC,EAAE,EAAE,eAAe;QACnBC,IAAI,EAAEb,aAAa;QACnBc,YAAY,EAAEX;MAChB;IACF,CAAC;EAEL,CAAC;EACD,+CAA+C,EAAE;IAC/CK,OAAO,EAAE,CACP;MACEC,EAAE,EAAER,iBAAiB,CAACoB,IAAI;MAC1BJ,QAAQ,EAAE;IACZ,CAAC,EACD;MACER,EAAE,EAAER,iBAAiB,CAACS,MAAM;MAC5BC,MAAM,EAAE;QACNC,EAAE,EAAE,uBAAuB;QAC3BC,IAAI,EAAEb,aAAa;QACnBc,YAAY,EAAET;MAChB;IACF,CAAC;EAEL;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["DIRECT_PLUGIN","PLUGIN_OPERATIONS","MenuWrapper","SandboxFooter","DropDownToggler","CatalogBanner","slotSettings","keepDefault","plugins","op","Insert","widget","id","type","RenderWidget","Wrap","widgetId","wrapper","Hide"],"sources":["../src/index.ts"],"sourcesContent":["import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';\nimport { MenuWrapper } from './components/MenuWrapper';\nimport { SandboxFooter } from './components/SandboxFooter';\nimport { DropDownToggler } from './components/DropDownToggler';\nimport { CatalogBanner } from './components/CatalogBanner';\n\nexport {\n MenuWrapper, SandboxFooter, DropDownToggler, CatalogBanner,\n};\n// Example slot settings you can use in your deployment. You may be able to import these\n// for quick development usage.\nexport const slotSettings = {\n 'org.openedx.frontend.layout.header_desktop_user_menu_toggle.v1': {\n keepDefault: false,\n plugins: [\n {\n op: PLUGIN_OPERATIONS.Insert,\n widget: {\n id: 'custom_desktop_toggle',\n type: DIRECT_PLUGIN,\n RenderWidget: DropDownToggler,\n },\n },\n ],\n },\n 'org.openedx.frontend.layout.header_desktop_user_menu.v1': {\n keepDefault: true,\n plugins: [\n {\n op: PLUGIN_OPERATIONS.Wrap,\n widgetId: 'default_contents',\n wrapper: MenuWrapper,\n },\n ],\n },\n 'org.openedx.frontend.layout.header_mobile_user_menu.v1': {\n keepDefault: true,\n plugins: [\n {\n op: PLUGIN_OPERATIONS.Wrap,\n widgetId: 'default_contents',\n wrapper: MenuWrapper,\n },\n ],\n },\n 'org.openedx.frontend.layout.footer.v1': {\n plugins: [\n {\n op: PLUGIN_OPERATIONS.Hide,\n widgetId: 'default_contents',\n },\n {\n op: PLUGIN_OPERATIONS.Insert,\n widget: {\n id: 'custom_footer',\n type: DIRECT_PLUGIN,\n RenderWidget: SandboxFooter,\n },\n },\n ],\n },\n 'org.openedx.frontend.catalog.home_page.banner': {\n plugins: [\n {\n op: PLUGIN_OPERATIONS.Hide,\n widgetId: 'default_contents',\n },\n {\n op: PLUGIN_OPERATIONS.Insert,\n widget: {\n id: 'custom_catalog_banner',\n type: DIRECT_PLUGIN,\n RenderWidget: CatalogBanner,\n },\n },\n ],\n },\n};\n"],"mappings":"AAAA,SAASA,aAAa,EAAEC,iBAAiB,QAAQ,oCAAoC;AACrF,SAASC,WAAW,QAAQ,0BAA0B;AACtD,SAASC,aAAa,QAAQ,4BAA4B;AAC1D,SAASC,eAAe,QAAQ,8BAA8B;AAC9D,SAASC,aAAa,QAAQ,4BAA4B;AAE1D,SACEH,WAAW,EAAEC,aAAa,EAAEC,eAAe,EAAEC,aAAa;AAE5D;AACA;AACA,OAAO,MAAMC,YAAY,GAAG;EAC1B,gEAAgE,EAAE;IAChEC,WAAW,EAAE,KAAK;IAClBC,OAAO,EAAE,CACP;MACEC,EAAE,EAAER,iBAAiB,CAACS,MAAM;MAC5BC,MAAM,EAAE;QACNC,EAAE,EAAE,uBAAuB;QAC3BC,IAAI,EAAEb,aAAa;QACnBc,YAAY,EAAEV;MAChB;IACF,CAAC;EAEL,CAAC;EACD,yDAAyD,EAAE;IACzDG,WAAW,EAAE,IAAI;IACjBC,OAAO,EAAE,CACP;MACEC,EAAE,EAAER,iBAAiB,CAACc,IAAI;MAC1BC,QAAQ,EAAE,kBAAkB;MAC5BC,OAAO,EAAEf;IACX,CAAC;EAEL,CAAC;EACD,wDAAwD,EAAE;IACxDK,WAAW,EAAE,IAAI;IACjBC,OAAO,EAAE,CACP;MACEC,EAAE,EAAER,iBAAiB,CAACc,IAAI;MAC1BC,QAAQ,EAAE,kBAAkB;MAC5BC,OAAO,EAAEf;IACX,CAAC;EAEL,CAAC;EACD,uCAAuC,EAAE;IACvCM,OAAO,EAAE,CACP;MACEC,EAAE,EAAER,iBAAiB,CAACiB,IAAI;MAC1BF,QAAQ,EAAE;IACZ,CAAC,EACD;MACEP,EAAE,EAAER,iBAAiB,CAACS,MAAM;MAC5BC,MAAM,EAAE;QACNC,EAAE,EAAE,eAAe;QACnBC,IAAI,EAAEb,aAAa;QACnBc,YAAY,EAAEX;MAChB;IACF,CAAC;EAEL,CAAC;EACD,+CAA+C,EAAE;IAC/CK,OAAO,EAAE,CACP;MACEC,EAAE,EAAER,iBAAiB,CAACiB,IAAI;MAC1BF,QAAQ,EAAE;IACZ,CAAC,EACD;MACEP,EAAE,EAAER,iBAAiB,CAACS,MAAM;MAC5BC,MAAM,EAAE;QACNC,EAAE,EAAE,uBAAuB;QAC3BC,IAAI,EAAEb,aAAa;QACnBc,YAAY,EAAET;MAChB;IACF,CAAC;EAEL;AACF,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.js","names":[],"sources":["../src/types.d.ts"],"sourcesContent":["declare module '*.png';\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.d.js","names":[],"sources":["../src/types.d.ts"],"sourcesContent":["declare module '*.png';\ndeclare module '*.jpg';"],"mappings":"","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencraft/frontend-plugin-sandbox",
3
- "version": "1.2.0-alpha.2",
3
+ "version": "1.3.0-alpha.0",
4
4
  "description": "Plugin for custom headers and footers in OpenCraft's sandboxes",
5
5
  "repository": {
6
6
  "type": "git",
Binary file
Binary file
@@ -1,37 +1,32 @@
1
1
  import React from 'react';
2
- import { Image, Row, Stack } from '@openedx/paragon';
3
- import bannerBg from '../assets/banner-bg.png';
2
+ import { Image, Row, Col } from '@openedx/paragon';
3
+ import largeBannerBg from '../assets/desktop-openclass.jpg';
4
+ import smallBannerBg from '../assets/mobile-openclass.jpg';
4
5
 
5
6
  export const CatalogBanner = () => (
6
7
  <Row
7
8
  direction="horizontal"
8
9
  className="bg-primary"
9
10
  >
10
- <Stack
11
+ <Col
11
12
  direction="vertical"
12
- className="justify-content-center px-6"
13
- style={{ maxWidth: '55rem' }}
13
+ className="justify-content-center align-content-center px-6 col-12 col-lg-6 col-xl-5"
14
14
  >
15
- <h1 className="display-2 text-light-100">
15
+ <h1 className="intro-header text-light-100">
16
16
  You’re viewing a live
17
17
  <span className="text-brand-500">
18
18
  {' Open edX® '}
19
19
  </span>
20
20
  demo
21
21
  </h1>
22
- <p className="h4 text-light-100 ">
22
+ <p className="text-light-100">
23
23
  OpenClass is a demo site by OpenCraft where you can explore the
24
24
  Open edX platform as a learner or course author.
25
25
  </p>
26
- </Stack>
27
- <Stack
28
- className="justify-content-end"
29
- style={{
30
- backgroundImage: 'url(../assets/banner-bg.png)',
31
- }}
32
- >
26
+ </Col>
27
+ <Col className={'col-12 col-lg-6 col-xl-7'}>
33
28
  <Image
34
- src={bannerBg}
29
+ src={largeBannerBg}
35
30
  style={{
36
31
  height: '100%',
37
32
  width: '100%',
@@ -39,8 +34,18 @@ export const CatalogBanner = () => (
39
34
  objectFit: 'contain',
40
35
  objectPosition: 'right top',
41
36
  }}
37
+ className={'d-none d-xl-block'}
42
38
  alt="illustration of a workspace with a computer screen displaying charts and graphs, accompanied by a desk lamp, coffee cup, and potted plant"
43
39
  />
44
- </Stack>
40
+ <Image
41
+ src={smallBannerBg}
42
+ style={{
43
+ width: '100%',
44
+ objectFit: 'contain',
45
+ }}
46
+ className={'d-block d-xl-none'}
47
+ alt="illustration of a workspace with a computer screen displaying charts and graphs, accompanied by a desk lamp, coffee cup, and potted plant"
48
+ />
49
+ </Col>
45
50
  </Row>
46
51
  );
package/src/index.ts CHANGED
@@ -23,7 +23,7 @@ export const slotSettings = {
23
23
  },
24
24
  ],
25
25
  },
26
- desktop_user_menu_slot: {
26
+ 'org.openedx.frontend.layout.header_desktop_user_menu.v1': {
27
27
  keepDefault: true,
28
28
  plugins: [
29
29
  {
@@ -33,7 +33,7 @@ export const slotSettings = {
33
33
  },
34
34
  ],
35
35
  },
36
- mobile_user_menu_slot: {
36
+ 'org.openedx.frontend.layout.header_mobile_user_menu.v1': {
37
37
  keepDefault: true,
38
38
  plugins: [
39
39
  {
@@ -43,7 +43,7 @@ export const slotSettings = {
43
43
  },
44
44
  ],
45
45
  },
46
- footer_slot: {
46
+ 'org.openedx.frontend.layout.footer.v1': {
47
47
  plugins: [
48
48
  {
49
49
  op: PLUGIN_OPERATIONS.Hide,
package/src/types.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  declare module '*.png';
2
+ declare module '*.jpg';
Binary file