-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1935 from nonowazu/bugfix-and-feat/fix-chrome-iss…
…ue-in-editor-and-also-enable-better-previews-in-some-places-somebody-once-told-me-the-world-was-gon- fix chrome editing issue and also enable new theme preview styles
- Loading branch information
Showing
1 changed file
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,14 @@ | |
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script> | ||
<!-- Darkreader --> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/darkreader.min.js"></script> | ||
<!-- accurate previews --> | ||
<script src="/theme-assets/editor/job-preview.js"></script> | ||
<style> | ||
/* fixes editor issues - remove after netlify-cms issue 5902 is fixed – https://github.com/netlify/netlify-cms/issues/5902 */ | ||
[data-slate-editor] { | ||
-webkit-user-modify: read-write !important; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<!-- Include the script that builds the page and powers Netlify CMS --> | ||
|
@@ -20,7 +28,12 @@ | |
<script src="https://sharadcodes.github.io/hugo-shortcodes-netlify-cms/dist/hugo_shortcodes_netlify_cms.js"></script> | ||
<script> | ||
DarkReader.enable(); // Enable darkreader | ||
CMS.registerPreviewStyle("preview.css"); // Register preview styles in Netlify | ||
CMS.registerPreviewStyle("/css/main.css"); // Register preview styles in Netlify | ||
/* job guide previews */ | ||
CMS.registerPreviewTemplate("leveling-guide", GenericJobGuide); | ||
CMS.registerPreviewTemplate("basic-guide", GenericJobGuide); | ||
CMS.registerPreviewTemplate("skills-overview", GenericJobGuide); | ||
CMS.registerPreviewTemplate("openers", GenericJobGuide); | ||
</script> | ||
</body> | ||
</html> |