Plugin Directory

Changeset 2313849


Ignore:
Timestamp:
05/28/2020 03:13:40 PM (5 years ago)
Author:
codethrower
Message:

spelling fix and tested up to

Location:
lorim-ipsm/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • lorim-ipsm/trunk/dist/blocks.build.js

    r2313806 r2313849  
    1 !function(e){function t(a){if(r[a])return r[a].exports;var i=r[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};t.m=e,t.c=r,t.d=function(e,r,a){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=2)}([function(e,t){},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});r(3),r(4)},function(e,t,r){"use strict";function a(e){return function(){return(e=1e4*Math.sin(e))-Math.floor(e)}}var i=r(0),n=(r.n(i),r(1)),__=(r.n(n),wp.i18n.__),s=wp.element.createElement,o=wp.blocks.registerBlockType,u=wp.components.TextControl;o("cgb/block-lorim-ipsm",{title:__("lorim-ipsm"),icon:"text",category:"common",keywords:[__("placeholder text"),__("lorim ipsm block"),__("utility block")],attributes:{paragraphs:{type:"string",default:1,source:"html",selector:".paragraphs"},wordsPerSentance:{type:"string",default:24,source:"html",selector:".wordsPerSentance"},sentancesPerParagraph:{type:"string",default:5,source:"html",selector:".sentancesPerParagraph"},randomSeed:{type:"string",default:627,source:"html",selector:".randomSeed"}},edit:function(e){var t=(e.attributes,e.setAttributes);return s("div",{className:e.className},s(u,{label:"How many paragraphs of lorem ipsum?",value:e.attributes.paragraphs,onChange:function(e){t({paragraphs:e})}}),s(u,{label:"Max words per sentance?",value:e.attributes.wordsPerSentance,onChange:function(e){t({wordsPerSentance:e})}}),s(u,{label:"Max sentances per paragraph?",value:e.attributes.sentancesPerParagraph,onChange:function(e){t({sentancesPerParagraph:e})}}),s(u,{label:"Seed for random ipsm generation?",value:e.attributes.randomSeed,onChange:function(e){t({randomSeed:e})}}))},save:function(e){var t=[],r=["lorem","ipsum","dolor","sit","amet","consectetur","adipiscing","elit","donec","nec","nulla","vitae","lacus","mattis","volutpat","eu","at","sapien","nunc","interdum","congue","libero","quis","laoreet","elit",",","sagittis","ut","pellentesque","lacus","erat","dictum","condimentum","pharetra","vel","malesuada","volutpat","risus","nunc","sit","amet","risus","dolor","etiam","posuere","tellus","nisl","Integer","lorem","ligula","tempor","eu","laoreet","ac","eleifend","quis","diam","proin","cursus","nibh","eu","vehicula","varius","lacus","elit",",","eleifend","elit","eget","commodo","ante","felis","at","neque","integer","sit","amet","justo","sed","elit","porta","convallis","a","at","metus","suspendisse","molestie","turpis","pulvinar","nisl","tincidunt","quis","fringilla","enim","lobortis","curabitur","placerat","quam","ac","sem","venenatis","blandit","Pellentesque","habitant","morbi","tristique","senectus","et","netus","et","malesuada","fames","ac","turpis","egestas","nullam","sed","ligula","nisl","nam","ullamcorper","elit","id","magna","hendrerit","sit","amet","dignissim","elit","sodales","aenean","accumsan","consectetur","rutrum",","],i=e.attributes.paragraphs,n=627;isNaN(e.attributes.randomSeed)||(n=Number(e.attributes.randomSeed));var o=e.attributes.wordsPerSentance,u=Math.floor(a(n)()*o)+Math.floor(o/2);n+=1;var l=e.attributes.sentancesPerParagraph;Math.floor(a(n)()*l),Math.floor(l/2);if(!isNaN(i))for(var c=1;c<=Number(i);c++){for(var p="",m=1;m<=Number(l);m++){for(var d=1;d<=u;d++)n+=37,p+=r[Math.floor(a(n)()*o+1)],p+=" ";p=p.trim()+". ",u=Math.floor(a(n)()*o)+Math.floor(o/2)}t.push(s("p",{},p))}var h=e.attributes;return s("div",{},s("p",{className:"paragraphs"},h.paragraphs),s("p",{className:"wordsPerSentance"},h.wordsPerSentance),s("p",{className:"sentancesPerParagraph"},h.sentancesPerParagraph),s("p",{className:"randomSeed"},h.randomSeed),t)}})},function(e,t,r){"use strict";var a=r(0),i=(r.n(a),r(1)),__=(r.n(i),wp.i18n.__),n=wp.element.createElement,s=wp.blocks.registerBlockType,o=wp.components.TextControl;s("cgb/block-lorim-picture-ipsm",{title:__("lorim-picture-ipsm"),icon:"format-image",category:"common",keywords:[__("placeholder image"),__("lorim ipsm image"),__("utility block")],attributes:{pictureWidth:{type:"string",default:80,source:"html",selector:".pictureWidth"},pictureHeight:{type:"string",default:80,source:"html",selector:".pictureHeight"}},edit:function(e){var t=(e.attributes,e.setAttributes);return n("div",{className:e.className},n(o,{label:"Picture Width?",value:e.attributes.pictureWidth,onChange:function(e){t({pictureWidth:e})}}),n(o,{label:"Picture Height?",value:e.attributes.pictureHeight,onChange:function(e){t({pictureHeight:e})}}))},save:function(e){var t=e.attributes;return n("div",{},n("p",{className:"pictureWidth"},t.pictureWidth),n("p",{className:"pictureHeight"},t.pictureHeight),n("img",{src:"https://picsum.photos/"+t.pictureWidth+"/"+t.pictureHeight}))}})}]);
     1!function(e){function t(a){if(r[a])return r[a].exports;var i=r[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};t.m=e,t.c=r,t.d=function(e,r,a){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=2)}([function(e,t){},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});r(3),r(4)},function(e,t,r){"use strict";function a(e){return function(){return(e=1e4*Math.sin(e))-Math.floor(e)}}var i=r(0),n=(r.n(i),r(1)),__=(r.n(n),wp.i18n.__),s=wp.element.createElement,o=wp.blocks.registerBlockType,u=wp.components.TextControl;o("cgb/block-lorim-ipsm",{title:__("lorim-ipsm"),icon:"text",category:"common",keywords:[__("placeholder text"),__("lorim ipsm block"),__("utility block")],attributes:{paragraphs:{type:"string",default:1,source:"html",selector:".paragraphs"},wordsPersentence:{type:"string",default:24,source:"html",selector:".wordsPersentence"},sentencesPerParagraph:{type:"string",default:5,source:"html",selector:".sentencesPerParagraph"},randomSeed:{type:"string",default:627,source:"html",selector:".randomSeed"}},edit:function(e){var t=(e.attributes,e.setAttributes);return s("div",{className:e.className},s(u,{label:"How many paragraphs of lorem ipsum?",value:e.attributes.paragraphs,onChange:function(e){t({paragraphs:e})}}),s(u,{label:"Max words per sentence?",value:e.attributes.wordsPersentence,onChange:function(e){t({wordsPersentence:e})}}),s(u,{label:"Max sentences per paragraph?",value:e.attributes.sentencesPerParagraph,onChange:function(e){t({sentencesPerParagraph:e})}}),s(u,{label:"Seed for random ipsm generation?",value:e.attributes.randomSeed,onChange:function(e){t({randomSeed:e})}}))},save:function(e){var t=[],r=["lorem","ipsum","dolor","sit","amet","consectetur","adipiscing","elit","donec","nec","nulla","vitae","lacus","mattis","volutpat","eu","at","sapien","nunc","interdum","congue","libero","quis","laoreet","elit",",","sagittis","ut","pellentesque","lacus","erat","dictum","condimentum","pharetra","vel","malesuada","volutpat","risus","nunc","sit","amet","risus","dolor","etiam","posuere","tellus","nisl","Integer","lorem","ligula","tempor","eu","laoreet","ac","eleifend","quis","diam","proin","cursus","nibh","eu","vehicula","varius","lacus","elit",",","eleifend","elit","eget","commodo","ante","felis","at","neque","integer","sit","amet","justo","sed","elit","porta","convallis","a","at","metus","suspendisse","molestie","turpis","pulvinar","nisl","tincidunt","quis","fringilla","enim","lobortis","curabitur","placerat","quam","ac","sem","venenatis","blandit","Pellentesque","habitant","morbi","tristique","senectus","et","netus","et","malesuada","fames","ac","turpis","egestas","nullam","sed","ligula","nisl","nam","ullamcorper","elit","id","magna","hendrerit","sit","amet","dignissim","elit","sodales","aenean","accumsan","consectetur","rutrum",","],i=e.attributes.paragraphs,n=627;isNaN(e.attributes.randomSeed)||(n=Number(e.attributes.randomSeed));var o=e.attributes.wordsPersentence,u=Math.floor(a(n)()*o)+Math.floor(o/2);n+=1;var l=e.attributes.sentencesPerParagraph;Math.floor(a(n)()*l),Math.floor(l/2);if(!isNaN(i))for(var c=1;c<=Number(i);c++){for(var p="",m=1;m<=Number(l);m++){for(var d=1;d<=u;d++)n+=37,p+=r[Math.floor(a(n)()*o+1)],p+=" ";p=p.trim()+". ",u=Math.floor(a(n)()*o)+Math.floor(o/2)}t.push(s("p",{},p))}var h=e.attributes;return s("div",{},s("p",{className:"paragraphs"},h.paragraphs),s("p",{className:"wordsPersentence"},h.wordsPersentence),s("p",{className:"sentencesPerParagraph"},h.sentencesPerParagraph),s("p",{className:"randomSeed"},h.randomSeed),t)}})},function(e,t,r){"use strict";var a=r(0),i=(r.n(a),r(1)),__=(r.n(i),wp.i18n.__),n=wp.element.createElement,s=wp.blocks.registerBlockType,o=wp.components.TextControl;s("cgb/block-lorim-picture-ipsm",{title:__("lorim-picture-ipsm"),icon:"format-image",category:"common",keywords:[__("placeholder image"),__("lorim ipsm image"),__("utility block")],attributes:{pictureWidth:{type:"string",default:80,source:"html",selector:".pictureWidth"},pictureHeight:{type:"string",default:80,source:"html",selector:".pictureHeight"}},edit:function(e){var t=(e.attributes,e.setAttributes);return n("div",{className:e.className},n(o,{label:"Picture Width?",value:e.attributes.pictureWidth,onChange:function(e){t({pictureWidth:e})}}),n(o,{label:"Picture Height?",value:e.attributes.pictureHeight,onChange:function(e){t({pictureHeight:e})}}))},save:function(e){var t=e.attributes;return n("div",{},n("p",{className:"pictureWidth"},t.pictureWidth),n("p",{className:"pictureHeight"},t.pictureHeight),n("img",{src:"https://picsum.photos/"+t.pictureWidth+"/"+t.pictureHeight}))}})}]);
  • lorim-ipsm/trunk/dist/blocks.style.build.css

    r2313806 r2313849  
    1 .wp-block-cgb-block-lorim-ipsm .paragraphs{display:none}.wp-block-cgb-block-lorim-ipsm .wordsPerSentance{display:none}.wp-block-cgb-block-lorim-ipsm .sentancesPerParagraph{display:none}.wp-block-cgb-block-lorim-ipsm .randomSeed{display:none}.wp-block-cgb-block-lorim-picture-ipsm .pictureWidth{display:none}.wp-block-cgb-block-lorim-picture-ipsm .pictureHeight{display:none}
     1.wp-block-cgb-block-lorim-ipsm .paragraphs{display:none}.wp-block-cgb-block-lorim-ipsm .wordsPersentence{display:none}.wp-block-cgb-block-lorim-ipsm .sentencesPerParagraph{display:none}.wp-block-cgb-block-lorim-ipsm .randomSeed{display:none}.wp-block-cgb-block-lorim-picture-ipsm .pictureWidth{display:none}.wp-block-cgb-block-lorim-picture-ipsm .pictureHeight{display:none}
  • lorim-ipsm/trunk/readme.txt

    r2313811 r2313849  
    11Name: Lorim Ipsm
    22Author: Michael LaPan
     3Tested up to: 5.5
    34License: GPL2+
    45License URI: https://www.gnu.org/licenses/gpl-2.0.txt
     
    78
    89Lorim ipsm block -
    9 Input your options and it will randomly generate a lorim ipsm paragraphs. Pseudo random is used for generating the sentances. Changing the seed will change the sentance.
     10Input your options and it will randomly generate one or more lorim ipsm paragraphs. Pseudo random is used for generating sentences. Changing the seed will change the sentence.
    1011
    1112Lorim picture block -
  • lorim-ipsm/trunk/src/block/block.js

    r2313806 r2313849  
    4949            selector: '.paragraphs',
    5050        },
    51         wordsPerSentance: {
     51        wordsPersentence: {
    5252            type: 'string',
    5353            default: 24,
    5454            source: 'html',
    55             selector: '.wordsPerSentance',
     55            selector: '.wordsPersentence',
    5656        },
    57         sentancesPerParagraph: {
     57        sentencesPerParagraph: {
    5858            type: 'string',
    5959            default: 5,
    6060            source: 'html',
    61             selector: '.sentancesPerParagraph',
     61            selector: '.sentencesPerParagraph',
    6262        },
    6363        randomSeed: {
     
    7373            el( 'div', { className: props.className },
    7474                el( TextControl, {
    75                     label: 'How many paragraphs of lorem ipsum?',
     75                    label: 'How many paragraphs of lorem ipsum? ',
    7676                    value: props.attributes.paragraphs,
    7777                    onChange: ( value ) => {
     
    8080                }),
    8181                el( TextControl, {
    82                     label: 'Max words per sentance?',
    83                     value: props.attributes.wordsPerSentance,
     82                    label: 'Max words per sentence?',
     83                    value: props.attributes.wordsPersentence,
    8484                    onChange: ( value ) => {
    85                         setAttributes( { wordsPerSentance: value } );
     85                        setAttributes( { wordsPersentence: value } );
    8686                    }
    8787                }),
    8888                el( TextControl, {
    89                     label: 'Max sentances per paragraph?',
    90                     value: props.attributes.sentancesPerParagraph,
     89                    label: 'Max sentences per paragraph?',
     90                    value: props.attributes.sentencesPerParagraph,
    9191                    onChange: ( value ) => {
    92                         setAttributes( { sentancesPerParagraph: value } );
     92                        setAttributes( { sentencesPerParagraph: value } );
    9393                    }
    9494                }),
     
    141141        }
    142142
    143         let wordsPerSentance = props.attributes.wordsPerSentance
    144         let wordsVarance = Math.floor((seededRandom(seed)() * wordsPerSentance)) + Math.floor(wordsPerSentance / 2)
     143        let wordsPersentence = props.attributes.wordsPersentence
     144        let wordsVarance = Math.floor((seededRandom(seed)() * wordsPersentence)) + Math.floor(wordsPersentence / 2)
    145145       
    146146        seed += 1;
    147147
    148         let sentancesPerParagraph = props.attributes.sentancesPerParagraph
    149         let sentanceVarance = Math.floor((seededRandom(seed)() * sentancesPerParagraph)) + Math.floor(sentancesPerParagraph / 2)
     148        let sentencesPerParagraph = props.attributes.sentencesPerParagraph
     149        let sentenceVarance = Math.floor((seededRandom(seed)() * sentencesPerParagraph)) + Math.floor(sentencesPerParagraph / 2)
    150150
    151151        if (!isNaN(paragraphs)) {
    152152            for (var i = 1; i <= Number(paragraphs); i++) {
    153                 let sentance = '';
    154                 for (var k = 1; k <= Number(sentancesPerParagraph); k++) {
     153                let sentence = '';
     154                for (var k = 1; k <= Number(sentencesPerParagraph); k++) {
    155155                    for (var j = 1; j <= wordsVarance; j++) {
    156156                        seed += 37;
    157                         sentance += ipsmText[Math.floor((seededRandom(seed)() * wordsPerSentance) + 1)]
    158                         sentance += ' '
     157                        sentence += ipsmText[Math.floor((seededRandom(seed)() * wordsPersentence) + 1)]
     158                        sentence += ' '
    159159                    }
    160                     sentance = sentance.trim() + '. '
    161                     wordsVarance = Math.floor((seededRandom(seed)() * wordsPerSentance)) + Math.floor(wordsPerSentance / 2)
     160                    sentence = sentence.trim() + '. '
     161                    wordsVarance = Math.floor((seededRandom(seed)() * wordsPersentence)) + Math.floor(wordsPersentence / 2)
    162162                }
    163                 ipsm.push(el( 'p', {}, sentance ))
     163                ipsm.push(el( 'p', {}, sentence ))
    164164            }
    165165        }
     
    167167        return el('div', {},
    168168                el( 'p', {className: 'paragraphs'}, attributes.paragraphs ),
    169                 el( 'p', {className: 'wordsPerSentance'}, attributes.wordsPerSentance ),
    170                 el( 'p', {className: 'sentancesPerParagraph'}, attributes.sentancesPerParagraph ),
     169                el( 'p', {className: 'wordsPersentence'}, attributes.wordsPersentence ),
     170                el( 'p', {className: 'sentencesPerParagraph'}, attributes.sentencesPerParagraph ),
    171171                el( 'p', {className: 'randomSeed'}, attributes.randomSeed ),
    172172                ipsm
  • lorim-ipsm/trunk/src/block/style.scss

    r2313806 r2313849  
    1111    display:none;
    1212}
    13 .wp-block-cgb-block-lorim-ipsm .wordsPerSentance {
     13.wp-block-cgb-block-lorim-ipsm .wordsPersentence {
    1414    display:none;
    1515}
    16 .wp-block-cgb-block-lorim-ipsm .sentancesPerParagraph {
     16.wp-block-cgb-block-lorim-ipsm .sentencesPerParagraph {
    1717    display:none;
    1818}
Note: See TracChangeset for help on using the changeset viewer.