Update pages.html
Browse files- pages.html +102 -119
pages.html
CHANGED
@@ -767,128 +767,111 @@ z-index: 1000; /* Убедитесь, что кнопка находится п
|
|
767 |
|
768 |
|
769 |
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
782 |
},
|
783 |
-
|
784 |
-
|
|
|
785 |
},
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
'grapesjs-custom-code',
|
793 |
-
'grapesjs-touch',
|
794 |
-
'grapesjs-parser-postcss',
|
795 |
-
'grapesjs-tooltip',
|
796 |
-
'grapesjs-tui-image-editor',
|
797 |
-
'grapesjs-typed',
|
798 |
-
'grapesjs-style-bg',
|
799 |
-
'grapesjs-preset-webpage',
|
800 |
-
'grapesjs-templates'
|
801 |
-
],
|
802 |
-
pluginsOpts: {
|
803 |
-
'gjs-blocks-basic': { flexGrid: true, blocks: ['text', 'link', 'image', 'video', 'map'] },
|
804 |
-
'grapesjs-tui-image-editor': {
|
805 |
-
script: [
|
806 |
-
// 'https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.6.7/fabric.min.js',
|
807 |
-
'https://uicdn.toast.com/tui.code-snippet/v1.5.2/tui-code-snippet.min.js',
|
808 |
-
'https://uicdn.toast.com/tui-color-picker/v2.2.7/tui-color-picker.min.js',
|
809 |
-
'https://uicdn.toast.com/tui-image-editor/v3.15.2/tui-image-editor.min.js'
|
810 |
-
],
|
811 |
-
style: [
|
812 |
-
'https://uicdn.toast.com/tui-color-picker/v2.2.7/tui-color-picker.min.css',
|
813 |
-
'https://uicdn.toast.com/tui-image-editor/v3.15.2/tui-image-editor.min.css',
|
814 |
-
],
|
815 |
-
},
|
816 |
-
'grapesjs-tabs': {
|
817 |
-
tabsBlock: { category: 'Extra' }
|
818 |
-
},
|
819 |
-
'grapesjs-typed': {
|
820 |
-
block: {
|
821 |
-
category: 'Extra',
|
822 |
-
content: {
|
823 |
-
type: 'typed',
|
824 |
-
'type-speed': 40,
|
825 |
-
strings: [
|
826 |
-
'Text row one',
|
827 |
-
'Text row two',
|
828 |
-
'Text row three',
|
829 |
-
],
|
830 |
-
}
|
831 |
-
}
|
832 |
-
},
|
833 |
-
'grapesjs-preset-webpage': {
|
834 |
-
modalImportTitle: 'Import Template',
|
835 |
-
modalImportLabel: '<div style="margin-bottom: 10px; font-size: 13px;">Paste here your HTML/CSS and click Import</div>',
|
836 |
-
modalImportContent: function (editor) {
|
837 |
-
return editor.getHtml() + '<style>' + editor.getCss() + '</style>'
|
838 |
-
},
|
839 |
-
},
|
840 |
-
'grapesjs-templates': {
|
841 |
-
contactForms: [
|
842 |
-
{ id: 1000, label: 'Contact us' },
|
843 |
-
{ id: 1001, label: 'Contact us 2' }
|
844 |
-
],
|
845 |
-
templates: 'http://localhost:3000/templates',
|
846 |
-
projects: 'http://localhost:3000/projects',
|
847 |
-
//onLoad: (type) => {
|
848 |
-
// return []
|
849 |
-
//}
|
850 |
-
}
|
851 |
},
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
// Open block manager
|
888 |
-
var openBlocksBtn = editor.Panels.getButton('views', 'open-blocks');
|
889 |
-
openBlocksBtn && openBlocksBtn.set('active', 1);
|
890 |
-
})
|
891 |
-
}, 100);
|
892 |
</script>
|
893 |
|
894 |
|
|
|
767 |
|
768 |
|
769 |
|
770 |
+
<script type="text/javascript">
|
771 |
+
var editor = grapesjs.init({
|
772 |
+
container: '#gjs',
|
773 |
+
fromElement: true,
|
774 |
+
height: "100vh",
|
775 |
+
storageManager: {
|
776 |
+
type: 'local',
|
777 |
+
autosave: true,
|
778 |
+
autoload: true,
|
779 |
+
stepsBeforeSave: 1,
|
780 |
+
},
|
781 |
+
plugins: [
|
782 |
+
"gjs-blocks-basic",
|
783 |
+
"grapesjs-component-countdown",
|
784 |
+
"grapesjs-component-code-editor",
|
785 |
+
"grapesjs-templates",
|
786 |
+
"grapesjs-rte-extensions",
|
787 |
+
"grapesjs-user-blocks",
|
788 |
+
"grapesjs-tabs", // Плагин вкладок
|
789 |
+
"grapesjs-tooltip", // Плагин подсказок
|
790 |
+
"grapesjs-script-editor", // Плагин редактора скриптов
|
791 |
+
"grapesjs-rulers" // Добавляем плагин линеек
|
792 |
+
],
|
793 |
+
pluginsOpts: {
|
794 |
+
"gjs-blocks-basic": {
|
795 |
+
blocks: ['column1', 'column2', 'column3', 'column3-7', 'text', 'quote', 'social'],
|
796 |
+
blocksBasicOpts: {
|
797 |
+
flexGrid: true,
|
798 |
+
stylePrefix: 'gjs-',
|
799 |
+
columns: 12,
|
800 |
+
rowHeight: 75,
|
801 |
+
addBasicStyle: true
|
802 |
+
}
|
803 |
+
},
|
804 |
+
"grapesjs-component-code-editor": {
|
805 |
+
panelId: 'views-container',
|
806 |
+
appendTo: '.gjs-pn-views-container',
|
807 |
+
openState: { pn: '35%', cv: '65%' },
|
808 |
+
closedState: { pn: '15%', cv: '85%' },
|
809 |
+
codeViewOptions: {},
|
810 |
+
preserveWidth: false,
|
811 |
+
clearData: false,
|
812 |
+
editJs: true,
|
813 |
+
cleanCssBtn: true,
|
814 |
+
htmlBtnText: 'Применить',
|
815 |
+
cssBtnText: 'Применить',
|
816 |
+
cleanCssBtnText: 'Удалить'
|
817 |
+
},
|
818 |
+
"grapesjs-templates": {
|
819 |
+
// Настройки для grapesjs-templates
|
820 |
+
},
|
821 |
+
"grapesjs-rte-extensions": {
|
822 |
+
base: {
|
823 |
+
bold: true,
|
824 |
+
italic: true,
|
825 |
+
underline: true,
|
826 |
+
strikethrough: true,
|
827 |
+
link: true,
|
828 |
},
|
829 |
+
fonts: {
|
830 |
+
fontColor: true,
|
831 |
+
hilite: true,
|
832 |
},
|
833 |
+
format: {
|
834 |
+
heading1: true,
|
835 |
+
heading2: true,
|
836 |
+
heading3: true,
|
837 |
+
paragraph: true,
|
838 |
+
clearFormatting: true,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
839 |
},
|
840 |
+
align: true,
|
841 |
+
darkColorPicker: true,
|
842 |
+
maxWidth: '600px'
|
843 |
+
},
|
844 |
+
"grapesjs-user-blocks": {
|
845 |
+
// Настройки для grapesjs-user-blocks
|
846 |
+
},
|
847 |
+
"grapesjs-tabs": {
|
848 |
+
// Настройки для grapesjs-tabs
|
849 |
+
},
|
850 |
+
"grapesjs-tooltip": {
|
851 |
+
// Настройки для grapesjs-tooltip
|
852 |
+
},
|
853 |
+
"grapesjs-script-editor": {
|
854 |
+
// Настройки для grapesjs-script-editor
|
855 |
+
starter: 'let el = this',
|
856 |
+
toolbarIcon: '<i class="fa fa-puzzle-piece"></i>',
|
857 |
+
scriptTypesSupport: ['default', 'wrapper', 'text', 'textnode', 'image', 'video', 'svg'],
|
858 |
+
toolbarBtnCustomScript: {},
|
859 |
+
onRun: () => console.log('valid syntax'),
|
860 |
+
onError: err => console.log('error:', err),
|
861 |
+
modalTitle: 'Script',
|
862 |
+
codeViewOptions: {},
|
863 |
+
buttonLabel: 'save',
|
864 |
+
commandAttachScript: {}
|
865 |
+
},
|
866 |
+
"grapesjs-rulers": {
|
867 |
+
// Настройки для grapesjs-rulers
|
868 |
+
dragMode: 'translate',
|
869 |
+
rulerHeight: 15,
|
870 |
+
canvasZoom: 94,
|
871 |
+
rulerOpts: {}
|
872 |
+
}
|
873 |
+
}
|
874 |
+
});
|
|
|
|
|
|
|
|
|
|
|
875 |
</script>
|
876 |
|
877 |
|