@opencraft/frontend-plugin-sandbox 1.2.0-alpha.3 → 1.3.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,39 +1,39 @@
1
1
  import React from 'react';
2
- import { Image, Row, Col, 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
8
  }, /*#__PURE__*/React.createElement(Col, {
8
- xl: 7,
9
- xs: 12,
10
- className: "d-flex align-content-middle"
11
- }, /*#__PURE__*/React.createElement(Stack, {
12
9
  direction: "vertical",
13
- className: "justify-content-center px-6 py-lg-6 py-5 my-lg-4",
14
- style: {
15
- maxWidth: '55rem'
16
- }
10
+ className: "justify-content-center align-content-center px-6 col-12 col-lg-6 col-xl-5"
17
11
  }, /*#__PURE__*/React.createElement("h1", {
18
- className: "display-2 text-light-100"
12
+ className: "intro-header text-light-100"
19
13
  }, "You\u2019re viewing a live", /*#__PURE__*/React.createElement("span", {
20
14
  className: "text-brand-500"
21
15
  }, ' Open edX® '), "demo"), /*#__PURE__*/React.createElement("p", {
22
- className: "h4 text-light-100 "
23
- }, "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, {
24
- xl: 5,
25
- xs: 12,
26
- className: "d-flex align-content-middle"
27
- }, /*#__PURE__*/React.createElement(Stack, {
28
- className: "justify-content-lg-end justify-content-center"
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'
29
19
  }, /*#__PURE__*/React.createElement(Image, {
30
- src: bannerBg,
31
- className: "mt-lg-6",
20
+ src: largeBannerBg,
32
21
  style: {
33
22
  height: '100%',
34
23
  width: '100%',
35
- objectFit: "contain"
24
+ maxHeight: '550px',
25
+ objectFit: 'contain',
26
+ objectPosition: 'right top'
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'
36
35
  },
36
+ className: 'd-block d-xl-none',
37
37
  alt: "illustration of a workspace with a computer screen displaying charts and graphs, accompanied by a desk lamp, coffee cup, and potted plant"
38
- }))));
38
+ })));
39
39
  //# sourceMappingURL=CatalogBanner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CatalogBanner.js","names":["React","Image","Row","Col","Stack","bannerBg","CatalogBanner","createElement","direction","className","xl","xs","style","maxWidth","src","height","width","objectFit","alt"],"sources":["../../src/components/CatalogBanner.tsx"],"sourcesContent":["import React from 'react';\nimport { Image, Row, Col, 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 <Col xl={7} xs={12} className={\"d-flex align-content-middle\"}>\n <Stack\n direction=\"vertical\"\n className=\"justify-content-center px-6 py-lg-6 py-5 my-lg-4\"\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 </Col>\n <Col xl={5} xs={12} className={\"d-flex align-content-middle\"}>\n <Stack\n className=\"justify-content-lg-end justify-content-center\"\n >\n <Image\n src={bannerBg}\n className=\"mt-lg-6\"\n style={{\n height: '100%',\n width: '100%',\n objectFit: \"contain\",\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 </Col>\n </Row>\n);\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,GAAG,EAAEC,GAAG,EAAEC,KAAK,QAAQ,kBAAkB;AACzD,OAAOC,QAAQ,MAAM,yBAAyB;AAE9C,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;EAACO,EAAE,EAAE,CAAE;EAACC,EAAE,EAAE,EAAG;EAACF,SAAS,EAAE;AAA8B,gBACzDT,KAAA,CAAAO,aAAA,CAACH,KAAK;EACJI,SAAS,EAAC,UAAU;EACpBC,SAAS,EAAC,kDAAkD;EAC5DG,KAAK,EAAE;IAAEC,QAAQ,EAAE;EAAQ;AAAE,gBAE7Bb,KAAA,CAAAO,aAAA;EAAIE,SAAS,EAAC;AAA0B,GAAC,4BAEvC,eAAAT,KAAA,CAAAO,aAAA;EAAME,SAAS,EAAC;AAAgB,GAC7B,aACG,CAAC,QAEL,CAAC,eACLT,KAAA,CAAAO,aAAA;EAAGE,SAAS,EAAC;AAAoB,GAAC,kHAG/B,CACE,CACN,CAAC,eACNT,KAAA,CAAAO,aAAA,CAACJ,GAAG;EAACO,EAAE,EAAE,CAAE;EAACC,EAAE,EAAE,EAAG;EAACF,SAAS,EAAE;AAA8B,gBACzDT,KAAA,CAAAO,aAAA,CAACH,KAAK;EACJK,SAAS,EAAC;AAA+C,gBAEzDT,KAAA,CAAAO,aAAA,CAACN,KAAK;EACJa,GAAG,EAAET,QAAS;EACdI,SAAS,EAAC,SAAS;EACnBG,KAAK,EAAE;IACLG,MAAM,EAAE,MAAM;IACdC,KAAK,EAAE,MAAM;IACbC,SAAS,EAAE;EACb,CAAE;EACFC,GAAG,EAAC;AAA2I,CAChJ,CACI,CACJ,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.3",
3
+ "version": "1.3.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,46 +1,51 @@
1
1
  import React from 'react';
2
- import { Image, Row, Col, 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
- <Col xl={7} xs={12} className={"d-flex align-content-middle"}>
11
- <Stack
12
- direction="vertical"
13
- className="justify-content-center px-6 py-lg-6 py-5 my-lg-4"
14
- style={{ maxWidth: '55rem' }}
15
- >
16
- <h1 className="display-2 text-light-100">
17
- You’re viewing a live
18
- <span className="text-brand-500">
19
- {' Open edX® '}
20
- </span>
21
- demo
22
- </h1>
23
- <p className="h4 text-light-100 ">
24
- OpenClass is a demo site by OpenCraft where you can explore the
25
- Open edX platform as a learner or course author.
26
- </p>
27
- </Stack>
11
+ <Col
12
+ direction="vertical"
13
+ className="justify-content-center align-content-center px-6 col-12 col-lg-6 col-xl-5"
14
+ >
15
+ <h1 className="intro-header text-light-100">
16
+ You’re viewing a live
17
+ <span className="text-brand-500">
18
+ {' Open edX® '}
19
+ </span>
20
+ demo
21
+ </h1>
22
+ <p className="text-light-100">
23
+ OpenClass is a demo site by OpenCraft where you can explore the
24
+ Open edX platform as a learner or course author.
25
+ </p>
26
+ </Col>
27
+ <Col className={'col-12 col-lg-6 col-xl-7'}>
28
+ <Image
29
+ src={largeBannerBg}
30
+ style={{
31
+ height: '100%',
32
+ width: '100%',
33
+ maxHeight: '550px',
34
+ objectFit: 'contain',
35
+ objectPosition: 'right top',
36
+ }}
37
+ className={'d-none d-xl-block'}
38
+ alt="illustration of a workspace with a computer screen displaying charts and graphs, accompanied by a desk lamp, coffee cup, and potted plant"
39
+ />
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
+ />
28
49
  </Col>
29
- <Col xl={5} xs={12} className={"d-flex align-content-middle"}>
30
- <Stack
31
- className="justify-content-lg-end justify-content-center"
32
- >
33
- <Image
34
- src={bannerBg}
35
- className="mt-lg-6"
36
- style={{
37
- height: '100%',
38
- width: '100%',
39
- objectFit: "contain",
40
- }}
41
- alt="illustration of a workspace with a computer screen displaying charts and graphs, accompanied by a desk lamp, coffee cup, and potted plant"
42
- />
43
- </Stack>
44
- </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
@@ -1,18 +0,0 @@
1
- import React, { useContext } from 'react';
2
- import { AppContext } from '@edx/frontend-platform/react';
3
- import { ensureConfig } from '@edx/frontend-platform';
4
- ensureConfig(['LOGO_WHITE_URL'], 'White Header Logo');
5
- export const WhiteLogo = () => {
6
- const {
7
- config
8
- } = useContext(AppContext);
9
- return /*#__PURE__*/React.createElement("a", {
10
- className: "logo",
11
- href: `${config.LMS_BASE_URL}/dashboard`
12
- }, /*#__PURE__*/React.createElement("img", {
13
- className: "d-block",
14
- src: config.LOGO_WHITE_URL,
15
- alt: config.SITE_NAME
16
- }));
17
- };
18
- //# sourceMappingURL=WhiteLogo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WhiteLogo.js","names":["React","useContext","AppContext","ensureConfig","WhiteLogo","config","createElement","className","href","LMS_BASE_URL","src","LOGO_WHITE_URL","alt","SITE_NAME"],"sources":["../../src/components/WhiteLogo.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { AppContext } from '@edx/frontend-platform/react';\nimport { ensureConfig } from '@edx/frontend-platform';\n\nensureConfig([\n 'LOGO_WHITE_URL',\n], 'White Header Logo');\n\nexport const WhiteLogo = () => {\n const { config } = useContext<AppContextInterface>(AppContext);\n return (\n <a className=\"logo\" href={`${config.LMS_BASE_URL}/dashboard`}>\n <img className=\"d-block\" src={config.LOGO_WHITE_URL} alt={config.SITE_NAME} />\n </a>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,UAAU,QAAQ,8BAA8B;AACzD,SAASC,YAAY,QAAQ,wBAAwB;AAErDA,YAAY,CAAC,CACX,gBAAgB,CACjB,EAAE,mBAAmB,CAAC;AAEvB,OAAO,MAAMC,SAAS,GAAGA,CAAA,KAAM;EAC7B,MAAM;IAAEC;EAAO,CAAC,GAAGJ,UAAU,CAAsBC,UAAU,CAAC;EAC9D,oBACEF,KAAA,CAAAM,aAAA;IAAGC,SAAS,EAAC,MAAM;IAACC,IAAI,EAAE,GAAGH,MAAM,CAACI,YAAY;EAAa,gBAC3DT,KAAA,CAAAM,aAAA;IAAKC,SAAS,EAAC,SAAS;IAACG,GAAG,EAAEL,MAAM,CAACM,cAAe;IAACC,GAAG,EAAEP,MAAM,CAACQ;EAAU,CAAE,CAC5E,CAAC;AAER,CAAC","ignoreList":[]}
Binary file