From 5eda477106f12ecb75b037101c25d64ed22a07ac Mon Sep 17 00:00:00 2001 From: Heather Yu <35639529+hetd54@users.noreply.github.com> Date: Tue, 13 Aug 2024 12:35:01 -0400 Subject: [PATCH 1/5] test: link config explicitly in head --- public/admin/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/public/admin/index.html b/public/admin/index.html index 3fce062..d3b8e26 100644 --- a/public/admin/index.html +++ b/public/admin/index.html @@ -4,6 +4,7 @@ + Content Manager From c9dba4816799721f56cb06dc30fe75549d0fc170 Mon Sep 17 00:00:00 2001 From: Heather Yu <35639529+hetd54@users.noreply.github.com> Date: Tue, 13 Aug 2024 12:39:51 -0400 Subject: [PATCH 2/5] test: remove imports to subfolder for now --- public/admin/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/admin/index.html b/public/admin/index.html index d3b8e26..6dc4778 100644 --- a/public/admin/index.html +++ b/public/admin/index.html @@ -11,14 +11,14 @@ From f6957422c0339d898d54b0736e1e77b80bf2b5d3 Mon Sep 17 00:00:00 2001 From: Heather Yu <35639529+hetd54@users.noreply.github.com> Date: Tue, 13 Aug 2024 12:47:32 -0400 Subject: [PATCH 3/5] test: unnest previews --- public/admin/{previews => }/NewsPreview.js | 0 public/admin/{previews => }/PeoplePreview.js | 0 public/admin/index.html | 8 ++++---- 3 files changed, 4 insertions(+), 4 deletions(-) rename public/admin/{previews => }/NewsPreview.js (100%) rename public/admin/{previews => }/PeoplePreview.js (100%) diff --git a/public/admin/previews/NewsPreview.js b/public/admin/NewsPreview.js similarity index 100% rename from public/admin/previews/NewsPreview.js rename to public/admin/NewsPreview.js diff --git a/public/admin/previews/PeoplePreview.js b/public/admin/PeoplePreview.js similarity index 100% rename from public/admin/previews/PeoplePreview.js rename to public/admin/PeoplePreview.js diff --git a/public/admin/index.html b/public/admin/index.html index 6dc4778..0a68c80 100644 --- a/public/admin/index.html +++ b/public/admin/index.html @@ -11,14 +11,14 @@ From 72d13652bd47d1bdcf1c22a19d518bb67d60e3a4 Mon Sep 17 00:00:00 2001 From: Heather Yu <35639529+hetd54@users.noreply.github.com> Date: Tue, 13 Aug 2024 13:23:06 -0400 Subject: [PATCH 4/5] test: script for previews in its own file --- public/admin/config.js | 8 ++++++++ public/admin/index.html | 11 +---------- public/admin/{ => previews}/NewsPreview.js | 0 public/admin/{ => previews}/PeoplePreview.js | 0 4 files changed, 9 insertions(+), 10 deletions(-) create mode 100644 public/admin/config.js rename public/admin/{ => previews}/NewsPreview.js (100%) rename public/admin/{ => previews}/PeoplePreview.js (100%) diff --git a/public/admin/config.js b/public/admin/config.js new file mode 100644 index 0000000..afd8a03 --- /dev/null +++ b/public/admin/config.js @@ -0,0 +1,8 @@ +import { PeoplePreview } from "./previews/PeoplePreview.js" +import { NewsPreview } from "./previews/NewsPreview.js" + +window.CMS.init() +window.CMS.registerPreviewStyle("../src/styles/global.css") + +window.CMS.registerPreviewTemplate("people", PeoplePreview) +window.CMS.registerPreviewTemplate("news", NewsPreview) diff --git a/public/admin/index.html b/public/admin/index.html index 0a68c80..24556f2 100644 --- a/public/admin/index.html +++ b/public/admin/index.html @@ -10,16 +10,7 @@ - \ No newline at end of file diff --git a/public/admin/NewsPreview.js b/public/admin/previews/NewsPreview.js similarity index 100% rename from public/admin/NewsPreview.js rename to public/admin/previews/NewsPreview.js diff --git a/public/admin/PeoplePreview.js b/public/admin/previews/PeoplePreview.js similarity index 100% rename from public/admin/PeoplePreview.js rename to public/admin/previews/PeoplePreview.js From 48c17ff276527bdd2b6afc542eaac943eb0ece2f Mon Sep 17 00:00:00 2001 From: Heather Yu <35639529+hetd54@users.noreply.github.com> Date: Tue, 13 Aug 2024 13:29:50 -0400 Subject: [PATCH 5/5] fix: explicit path to config.js --- public/admin/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/admin/index.html b/public/admin/index.html index 24556f2..e5267ed 100644 --- a/public/admin/index.html +++ b/public/admin/index.html @@ -5,12 +5,12 @@ + Content Manager - + \ No newline at end of file