Browse Source

Update v0.9.2

pull/2301/head
Artur Arseniev 9 years ago
parent
commit
a17df6dc48
  1. 11
      demo.html
  2. 6
      js/grapes.min.js
  3. 2
      js/grapesjs-blocks-basic.min.js
  4. 62
      js/grapesjs-preset-webpage.js
  5. 2
      stylesheets/grapes.min.css

11
demo.html

@ -928,12 +928,13 @@
</style>
</div>
<script src="js/grapes.min.js?v0.8.19"></script>
<script src="js/grapes.min.js?v0.8.21"></script>
<script src="js/grapesjs-plugin-export.min.js"></script>
<script src="js/grapesjs-plugin-filestack.min.js"></script>
<script src="js/grapesjs-blocks-basic.min.js"></script>
<script src="js/grapesjs-preset-webpage.js"></script>
<script src="js/grapesjs-plugin-forms.min.js"></script>
<script src="js/grapesjs-aviary.min.js"></script>
<script src="js/grapesjs-preset-webpage.js"></script>
<script type="text/javascript">
var lp = './img/';
@ -951,7 +952,7 @@
fromElement: 1,
showOffsets: 1,
plugins: ['gjs-plugin-export', 'gjs-preset-webpage', 'gjs-plugin-filestack',
'gjs-aviary', 'gjs-plugin-forms'],
'gjs-aviary', 'gjs-blocks-basic', 'gjs-plugin-forms'],
pluginsOpts: {
'gjs-plugin-filestack': {
key: 'A1nL8omiAR8W7pHi3cotzz',
@ -1275,7 +1276,9 @@
hideDuration: 150
};
console.warn = function (msg) {
toastr.warning(msg);
if (msg.indexOf('[undefined]') == -1) {
toastr.warning(msg);
}
origWarn(msg);
};

6
js/grapes.min.js

File diff suppressed because one or more lines are too long

2
js/grapesjs-blocks-basic.min.js

@ -0,0 +1,2 @@
/*! grapesjs-blocks-basic - 0.1.1 */
!function(e,a){"object"==typeof exports&&"object"==typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):"object"==typeof exports?exports["grapesjs-blocks-basic"]=a():e["grapesjs-blocks-basic"]=a()}(this,function(){return function(e){function a(t){if(l[t])return l[t].exports;var n=l[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}var l={};return a.m=e,a.c=l,a.i=function(e){return e},a.d=function(e,l,t){a.o(e,l)||Object.defineProperty(e,l,{configurable:!1,enumerable:!0,get:t})},a.n=function(e){var l=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(l,"a",l),l},a.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},a.p="",a(a.s=1)}([function(e,a,l){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=a,t=e.BlockManager,n=l.blocks;n.indexOf("column1")>=0&&t.add("column1",{label:l.labelColumn1,category:"Basic",attributes:{class:"gjs-fonts gjs-f-b1"},content:'<div class="row" data-gjs-droppable=".cell" data-gjs-custom-name="Row">\n <div class="cell" data-gjs-draggable=".row" data-gjs-custom-name="Cell"></div>\n </div>'}),n.indexOf("column2")>=0&&t.add("column2",{label:l.labelColumn2,attributes:{class:"gjs-fonts gjs-f-b2"},category:"Basic",content:'<div class="row" data-gjs-droppable=".cell" data-gjs-custom-name="Row">\n <div class="cell" data-gjs-draggable=".row" data-gjs-custom-name="Cell"></div>\n <div class="cell" data-gjs-draggable=".row" data-gjs-custom-name="Cell"></div>\n </div>'}),n.indexOf("column3")>=0&&t.add("column3",{label:l.labelColumn3,category:"Basic",attributes:{class:"gjs-fonts gjs-f-b3"},content:'<div class="row" data-gjs-droppable=".cell" data-gjs-custom-name="Row">\n <div class="cell" data-gjs-draggable=".row" data-gjs-custom-name="Cell"></div>\n <div class="cell" data-gjs-draggable=".row" data-gjs-custom-name="Cell"></div>\n <div class="cell" data-gjs-draggable=".row" data-gjs-custom-name="Cell"></div>\n </div>'}),n.indexOf("column3-7")>=0&&t.add("column3-7",{label:l.labelColumn37,category:"Basic",attributes:{class:"gjs-fonts gjs-f-b37"},content:'<div class="row" data-gjs-droppable=".cell" data-gjs-custom-name="Row">\n <div class="cell cell30" data-gjs-draggable=".row" data-gjs-custom-name="Cell"></div>\n <div class="cell cell70" data-gjs-draggable=".row" data-gjs-custom-name="Cell"></div>\n </div>'}),n.indexOf("text")>=0&&t.add("text",{label:l.labelText,category:"Basic",attributes:{class:"gjs-fonts gjs-f-text"},content:{type:"text",content:"Insert your text here",style:{padding:"10px"},activeOnRender:1}}),n.indexOf("link")>=0&&t.add("link",{label:l.labelLink,category:"Basic",attributes:{class:"fa fa-link"},content:{type:"link",content:"Link",style:{color:"#d983a6"}}}),n.indexOf("image")>=0&&t.add("image",{label:l.labelImage,category:"Basic",attributes:{class:"gjs-fonts gjs-f-image"},content:{style:{color:"black"},type:"image",activeOnRender:1}}),n.indexOf("video")>=0&&t.add("video",{label:l.labelVideo,category:"Basic",attributes:{class:"fa fa-youtube-play"},content:{type:"video",src:"img/video2.webm",style:{height:"350px",width:"615px"}}}),n.indexOf("map")>=0&&t.add("map",{label:l.labelMap,category:"Basic",attributes:{class:"fa fa-map-o"},content:{type:"map",style:{height:"350px"}}})}},function(e,a,l){"use strict";grapesjs.plugins.add("gjs-blocks-basic",function(e,a){var t=a||{},n=e.getConfig(),s=(n.stylePrefix,{blocks:["column1","column2","column3","column3-7","text","link","image","video","map"],addBasicStyle:!0,labelColumn1:"1 Column",labelColumn2:"2 Columns",labelColumn3:"3 Columns",labelColumn37:"2 Columns 3/7",labelText:"Text",labelLink:"Link",labelImage:"Image",labelVideo:"Video",labelMap:"Map"});for(var o in s)o in t||(t[o]=s[o]);t.addBasicStyle&&e.addComponents("\n <style>\n .row {\n display: table;\n padding: 10px;\n width: 100%;\n }\n\n .cell {\n width: 8%;\n display: table-cell;\n height: 75px;\n }\n\n .cell30 {\n width: 30%;\n }\n\n .cell70 {\n width: 70%;\n }\n\n @media (max-width: 768px) {\n .cell, .cell30, .cell70 {\n width: 100%;\n display: block;\n }\n }\n </style>\n "),l(0).default(e,t)})}])});

62
js/grapesjs-preset-webpage.js

@ -130,6 +130,68 @@ grapesjs.plugins.add('gjs-preset-webpage', function(editor, opts) {
},
});
bm.add('quote', {
label: 'Quote',
category: 'Basic',
content: '<blockquote class="quote">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit</blockquote>',
attributes: {class:'fa fa-quote-right'}
});
bm.add('section-hero', {
label: 'Hero section',
category: 'Sections',
content: '<header class="header-banner"> <div class="container-width">'+
'<div class="logo-container"><div class="logo">GrapesJS</div></div>'+
'<nav class="navbar">'+
'<div class="menu-item">BUILDER</div><div class="menu-item">TEMPLATE</div><div class="menu-item">WEB</div>'+
'</nav><div class="clearfix"></div>'+
'<div class="lead-title">Build your templates without coding</div>'+
'<div class="lead-btn">Try it now</div></div></header>',
attributes: {class:'gjs-fonts gjs-f-hero'}
});
bm.add('section-typography', {
label: 'Text section',
category: 'Sections',
content: `<section class="bdg-sect">
<h1 class="heading">Insert title here</h1>
<p class="paragraph">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua</p>
</section>`,
attributes: {class:'gjs-fonts gjs-f-h1p'}
});
bm.add('section-badges', {
label: 'Badges',
category: 'Sections',
content: '<section class="bdg-sect"><div class="badges">'+
'<div class="badge">'+
'<div class="badge-header"></div>'+
'<img class="badge-avatar" src="img/team1.jpg">'+
'<div class="badge-body">'+
'<div class="badge-name">Adam Smith</div><div class="badge-role">CEO</div><div class="badge-desc">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit</div>'+
'</div>'+
'<div class="badge-foot"><span class="badge-link">f</span><span class="badge-link">t</span><span class="badge-link">ln</span></div>'+
'</div>'+
'<div class="badge">'+
'<div class="badge-header"></div>'+
'<img class="badge-avatar" src="img/team2.jpg">'+
'<div class="badge-body">'+
'<div class="badge-name">John Black</div><div class="badge-role">Software Engineer</div><div class="badge-desc">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit</div>'+
'</div>'+
'<div class="badge-foot"><span class="badge-link">f</span><span class="badge-link">t</span><span class="badge-link">ln</span></div>'+
'</div>'+
'<div class="badge">'+
'<div class="badge-header"></div>'+
'<img class="badge-avatar" src="img/team3.jpg">'+
'<div class="badge-body">'+
'<div class="badge-name">Jessica White</div><div class="badge-role">Web Designer</div><div class="badge-desc">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit</div>'+
'</div>'+
'<div class="badge-foot"><span class="badge-link">f</span><span class="badge-link">t</span><span class="badge-link">ln</span>'+
'</div>'+
'</div></div></section>',
attributes: {class:'gjs-fonts gjs-f-3ba'}
});
/****************** BUTTONS *************************/
var pnm = editor.Panels;

2
stylesheets/grapes.min.css

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save