psy_vk2 / build.html
DmitrMakeev's picture
Update build.html
d8142db verified
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<!-- GrapeJs -->
<link rel="stylesheet" href="https://unpkg.com/grapesjs">
<script src="https://huggingface.co/spaces/DMTuit/psy_vk2/resolve/main/assets%20/js/grapes.min.js"></script>
<!-- UIKit -->
<link rel="stylesheet" href="https://huggingface.co/spaces/DMTuit/psy_vk2/resolve/main/assets%20/uikit-3.3.3%20/css/uikit.min.css" />
<script src="https://huggingface.co/spaces/DMTuit/psy_vk2/resolve/main/assets%20/uikit-3.3.3%20/js/uikit.min.js"></script>
<script src="https://huggingface.co/spaces/DMTuit/psy_vk2/resolve/main/assets%20/uikit-3.3.3%20/js/uikit-icons.js"></script>
<!-- Style -->
<link rel="stylesheet" href="https://huggingface.co/spaces/DMTuit/psy_vk2/resolve/main/assets%20/css/style.css">
<!-- Plugins -->
<script src="https://huggingface.co/spaces/DMTuit/psy_vk2/resolve/main/editor%20/plugins/custom-page-manager.js"></script>
<script src="https://huggingface.co/spaces/DMTuit/psy_vk2/resolve/main/editor%20/plugins/custom-code-editor.js"></script>
<script src="https://huggingface.co/spaces/DMTuit/psy_vk2/resolve/main/editor%20/plugins/customize-devices.js"></script>
<script src="https://huggingface.co/spaces/DMTuit/psy_vk2/resolve/main/editor%20/plugins/customize-options.js"></script>
<script src="https://huggingface.co/spaces/DMTuit/psy_vk2/resolve/main/editor%20/plugins/customize-views.js"></script>
<!-- JQuery -->
<!-- <script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> -->
</head>
<body>
<div id="gjs"></div>
<!--Script -->
<script type="text/javascript">
const categories = {
'layout': 'Layout <span class="gjs-title-tags">Elements</span>',
'basic': 'Basic <span class="gjs-title-tags">Elements</span>',
'typography': 'Typography <span class="gjs-title-tags">Elements</span>',
'media': 'Media <span class="gjs-title-tags">Elements</span>',
'components': 'Components <span class="gjs-title-tags">Layout structure</span>',
'pages': 'Pages <span class="gjs-title-tags">Fully constructed layouts</span>',
'uikit': 'UIKit Component <a target="_blank" href="https://getuikit.com/docs/accordion">UIKit Doc</a>',
'mylinkpreview': '<a target="_blank" href="https://mylinkpreview.com/">MylinkPreview</a> Blocks'
}
const editor = grapesjs.init({
container : '#gjs',
height: '100vh',
canvas: {
styles: [
'https://huggingface.co/spaces/DMTuit/psy_vk2/resolve/main/assets%20/uikit-3.3.3%20/css/uikit.min.css',
],
scripts: [
'https://huggingface.co/spaces/DMTuit/psy_vk2/resolve/main/assets%20/uikit-3.3.3%20/js/uikit.min.js',
'https://huggingface.co/spaces/DMTuit/psy_vk2/resolve/main/assets%20/uikit-3.3.3%20/js/uikit-icons.min.js'
]
},
plugins: [
'customPageManager',
'customCodeEditor',
'customizeDevices',
'customizeOptions',
'customizeViews',
// Plugin temporary code
editor => {
},
],
storageManager: {
type: 'remote',
autosave: false, // Store data automatically
stepsBeforeSave: 1,
contentTypeJson: true,
urlStore: 'https://dmtuit-psy-vk2.hf.space/storage/save',
urlLoad: 'https://dmtuit-psy-vk2.hf.space/storage/save',
}
// Disable the storage manager for the moment
// storageManager: false,
});
// Vars for other scripts like pages.js, elements.js
const blockManager = editor.BlockManager;
const commands = editor.Commands;
</script>
<!-- Blocks -->
<script src="https://huggingface.co/spaces/DMTuit/psy_vk2/resolve/main/editor%20/blocks/pages.js"></script>
<script src="https://huggingface.co/spaces/DMTuit/psy_vk2/resolve/main/editor%20/blocks/elements.js"></script>
</body>
</html>