DmitrMakeev commited on
Commit
773f928
·
verified ·
1 Parent(s): af48111

Update builder.html

Browse files
Files changed (1) hide show
  1. builder.html +6 -22
builder.html CHANGED
@@ -34,29 +34,13 @@
34
  label: 'Horizontal Triple Block',
35
  content: `
36
  <div style="display: flex; justify-content: space-between;">
37
- <div style="flex: 1; margin: 5px; background-color: #f0f0f0; padding: 10px;">
38
- <div data-gjs-type="block-container">Block 1</div>
39
- </div>
40
- <div style="flex: 1; margin: 5px; background-color: #f0f0f0; padding: 10px;">
41
- <div data-gjs-type="block-container">Block 2</div>
42
- </div>
43
- <div style="flex: 1; margin: 5px; background-color: #f0f0f0; padding: 10px;">
44
- <div data-gjs-type="block-container">Block 3</div>
45
- </div>
46
  </div>
47
  `,
48
  });
49
 
50
- // Define a container for blocks
51
- domc.addType('block-container', {
52
- model: {
53
- defaults: {
54
- droppable: true,
55
- components: [],
56
- },
57
- },
58
- });
59
-
60
  // Define a button to add new blocks
61
  domc.addType('add-block-button', {
62
  model: {
@@ -75,9 +59,9 @@
75
  window.addNewBlock = function() {
76
  const newBlock = `
77
  <div style="display: flex; justify-content: space-between;">
78
- <div style="flex: 1; margin: 5px; background-color: #f0f0f0; padding: 10px;">New Block 1</div>
79
- <div style="flex: 1; margin: 5px; background-color: #f0f0f0; padding: 10px;">New Block 2</div>
80
- <div style="flex: 1; margin: 5px; background-color: #f0f0f0; padding: 10px;">New Block 3</div>
81
  </div>
82
  `;
83
  editor.addComponents(newBlock);
 
34
  label: 'Horizontal Triple Block',
35
  content: `
36
  <div style="display: flex; justify-content: space-between;">
37
+ <div style="flex: 1; margin: 5px; background-color: #f0f0f0; padding: 10px; border: 1px solid #ccc;"></div>
38
+ <div style="flex: 1; margin: 5px; background-color: #f0f0f0; padding: 10px; border: 1px solid #ccc;"></div>
39
+ <div style="flex: 1; margin: 5px; background-color: #f0f0f0; padding: 10px; border: 1px solid #ccc;"></div>
 
 
 
 
 
 
40
  </div>
41
  `,
42
  });
43
 
 
 
 
 
 
 
 
 
 
 
44
  // Define a button to add new blocks
45
  domc.addType('add-block-button', {
46
  model: {
 
59
  window.addNewBlock = function() {
60
  const newBlock = `
61
  <div style="display: flex; justify-content: space-between;">
62
+ <div style="flex: 1; margin: 5px; background-color: #f0f0f0; padding: 10px; border: 1px solid #ccc;"></div>
63
+ <div style="flex: 1; margin: 5px; background-color: #f0f0f0; padding: 10px; border: 1px solid #ccc;"></div>
64
+ <div style="flex: 1; margin: 5px; background-color: #f0f0f0; padding: 10px; border: 1px solid #ccc;"></div>
65
  </div>
66
  `;
67
  editor.addComponents(newBlock);