Plugin Directory

Changeset 1961288


Ignore:
Timestamp:
10/23/2018 11:47:58 AM (7 years ago)
Author:
frontkom
Message:

Release version 1.0.2

Location:
cloud-blocks
Files:
15 added
22 edited
12 copied

Legend:

Unmodified
Added
Removed
  • cloud-blocks/tags/1.0.2/README.md

    r1958585 r1961288  
    11# Cloud Blocks
    22
    3 Your online library of Gutenberg blocks! Browse and discover new blocks, and install with a click.
     3## Description
     4**Gutenberg Cloud: Your online library of blocks!** Cloud Blocks is the only plugin you need to browse and install new blocks:
    45
    5 ### Description
     6- Discover and install custom blocks with a click
     7- Install only the blocks you need – no huge plugin collections needed
     8- Reuse blocks between WordPress and Drupal
     9- Serve the blocks from a CDN
    610
    7 No block collection plugins needed:
    8 This is the only plugin you need to browse and install new blocks.
     11### Why use Gutenberg Cloud?
     12Installing an actual plugin for each block or block collection easily leads to managing lots of code that you don’t really need. It’s like having one app for each website you visit, instead of just installing a web browser. With the block manager, you have a growing library at your fingertips, without the bloat.
    913
    10 Reuse between platforms
    11 Gutenberg blocks can be used in both Wordpress and Drupal
     14### Get started
     15Install the plugin, and look for the cloud icon in the main menu. Browse around and activate a few blocks. Voila – these are now available to you in the Gutenberg editor!
    1216
    13 Code once, use everywhere: As Gutenberg blocks are CMS agnostic, we want to provide an ecosystem all systems can connect to.
     17### How it works under the hood
     18Gutenberg Cloud is a service that fetches Open Source Gutenberg blocks hosted on NPM. The assets from these are served from CloudFlare using unpkg.com. The Cloud Blocks plugin provides an interface in WordPress for Gutenberg Cloud.
    1419
    15 Why Gutenberg Cloud? Installing an actual plugin/module for each block or block collection easily leads to managing lots of code that you don’t really need. It’s like having one app for each website you visit, instead of just installing a browser. With the block manager, you have a growing library at your fingertips, without the bloat.
     20Code once, use everywhere: Since the blocks are JS/CSS only, they are CMS agnostic. This means you can develop a block for a Drupal site, and reuse it later on a WordPress blog.
    1621
    17 ### Installation
    18 Install it just like any other plugin. It just works!
     22## Installation
     23Install it as any other plugin, but note that you need Gutenberg activated for it to work.
    1924
    20 ### Available hooks
     25To install individual blocks, look for the cloud icon in the left side menu. Click it, and browse away!
     26
     27## Frequently Asked Questions
     28
     29### How do I migrate a block collection plugin to Gutenberg Cloud?
     30Glad you asked! This simply means removing some PHP, adding some meta data and publishing on NPM. [Follow these simple steps](https://github.com/front/cloud-blocks/blob/master/docs/migrate-block.md).
     31
     32### How do I create a custom block for Gutenberg Cloud?
     33Gutenberg Cloud blocks are really just normal Gutenberg blocks, without the PHP. [Follow these steps to do it](https://github.com/front/cloud-blocks/blob/master/docs/create-block.md)!
     34
     35### How do I disable CSS for a single block?
     36This is useful for letting your theme control your block styles. There’s a hook for this, [documented here](https://github.com/front/cloud-blocks/blob/master/docs/hooks.md).
     37
     38### Why is the plugin called Cloud Blocks?
     39We wanted to name it Gutenberg Cloud, but since it’s not possible to name a plugin starting with the name of another plugin (i.e. Gutenberg), we ended up calling it Cloud Blocks. Makes sense though, doesn’t it?
     40
     41### Are the blocks really served from "the cloud"?
     42Indeed, they are! The source code for each block is on NPM, but the JS/CSS is served by a CDN. No local downloads!
     43
     44### Can I add private custom blocks?
     45Sure! Just add your custom blocks into **wp-content/cloud-blocks/** folder.
     46
     47## Available hooks
    2148
    2249`gutenberg_cloud_disable_style`
     
    4370```
    4471
    45 ### Frequently Asked Questions
    46 **How do I add my own custom blocks to Gutenberg Cloud?**
    47 Gutenberg Cloud blocks are really just normal Gutenberg blocks. They have a screenshot and some other meta, but follows the official standards. See https://gutenbergcloud.org/ for more information.
    4872
    49 ### Changelog
     73## Changelog
    5074
     75#### 1.0.2
     76* **Change**: Some translation fixes
     77* **Change**: Better documentation and screenshot
     78* **Added**: Italian translation. (Thanks to [cipo28](https://github.com/front/cloud-blocks/pull/1))
    5179
    52 ##### 1.0.1
    53 * Fix: is_plugin_active() undefined fix
    54 * Fix: Change strings functions to static
     80#### 1.0.1
     81* **Fix**: is_plugin_active() undefined fix
     82* **Fix**: Change strings functions to static
    5583
    56 ##### 1.0.0
     84#### 1.0.0
    5785* Initial plugin
  • cloud-blocks/tags/1.0.2/assets/js/script.js

    r1958571 r1961288  
    7272              v-if="currentBrowsState != 'installed' && !alreadyInstaleld"
    7373              @click.prevent="installBlock">
    74               Install
     74              {{fgcData.strings.install}}
    7575          </button>
    7676          <button class="button theme-install install-block-btn"
     
    117117          this.incrementInstalls(this.block.packageName)
    118118          window.store.dispatch('getInstalledBlocks')
    119           window.store.commit('setNotification', { text: `${fgcData.strings.block} <b>${this.block.name}</b> ${fgcData.strings.block_installed}`, class: 'show success' })
     119          window.store.commit('setNotification', { text: `${fgcData.strings.the_block} <b>${this.block.name}</b> ${fgcData.strings.block_installed}`, class: 'show success' })
    120120          console.log('Block installed ', res.data) 
    121121        })
  • cloud-blocks/tags/1.0.2/assets/js/script.min.js

    r1958571 r1961288  
    1 "use strict";Vue.component("admin-notice",{data:function a(){return{activeTimeout:-1}},template:"\n    <div\n      :class=\"['fgc-notification', notification.class]\"\n      v-cloak>\n      <p v-html=\"notification.text\"></p>\n    </div>\n  ",watch:{isActive:function a(){this.showingTimeout()}},mounted:function a(){this.showingTimeout()},methods:{showingTimeout:function b(){var a=this;window.clearTimeout(this.activeTimeout),this.activeTimeout=window.setTimeout(function(){window.store.state.notification.class="",a.isShowing=!1},4e3)}},computed:{isActive:function a(){return window.store.state.notification.text},notification:function a(){return window.store.state.notification}}}),Vue.component("block-card",{props:["block"],data:function a(){return{installing:!1,alreadyInstaleld:!1,updateAvailable:!1,currentVersion:null}},template:"\n    <div class=\"theme\">\n      <div class=\"theme-screenshot\">\n        <img :src=\"block.imageUrl\" :alt=\"block.name\">\n        <div class=\"spinner installing-block\" v-if=\"installing\"></div>\n      </div>\n\n      <div v-if=\"alreadyInstaleld\" class=\"notice inline notice-success notice-alt\"><p>{{fgcData.strings.installed}}</p></div>\n\n      <div v-if=\"updateAvailable\" class=\"update-message notice inline notice-warning notice-alt\">\n        <p>{{fgcData.strings.update_available}} <button class=\"button-link\" type=\"button\" @click=\"updateBlock\">{{fgcData.strings.update_now}}</button></p>\n      </div>\n\n      <span class=\"more-details\" @click=\"openMoreDetails\">{{fgcData.strings.show_more_details}}</span>\n\n      <div class=\"theme-id-container\">\n        <h3 class=\"theme-name\">{{ block.name }}</h3>\n        <span class=\"block-version\">{{fgcData.strings.version}}: {{ currentVersion }}</span>\n\n        <div class=\"theme-actions\">\n          <button class=\"button button-primary theme-install install-block-btn\"\n              v-if=\"currentBrowsState != 'installed' && !alreadyInstaleld\"\n              @click.prevent=\"installBlock\">\n              Install\n          </button>\n          <button class=\"button theme-install install-block-btn\"\n              v-else\n              @click.prevent=\"deleteBlock\">\n              {{fgcData.strings.delete}}\n          </button>\n          <a class=\"button preview install-theme-preview\" :href=\"block.infoUrl\" target=\"_blank\">{{fgcData.strings.more_details}}</a>\n        </div>\n      </div>\n\n    </div>\n  ",mounted:function b(){var a=this;this.currentVersion=this.block.version,!window.store.state.installedBlocks.filter(function(c){return c.package_name==a.block.packageName}).length||(this.alreadyInstaleld="installed"!=this.currentBrowsState,"installed"==this.currentBrowsState&&(this.updateAvailable=!!window.store.state.installedBlocks.filter(function(c){if(c.package_name==a.block.packageName)return c.block_version<a.block.version}).length,this.currentVersion=window.store.state.installedBlocks.filter(function(c){return c.package_name==a.block.packageName})[0].block_version))},methods:{installBlock:function c(){var a=this;this.installing=!0;var b=this.block;console.log(b),jQuery.ajax({type:"POST",url:fgcData.ajaxUrl,data:{action:"fgc_install_block",data:b}}).done(function(b){a.installing=!1,a.alreadyInstaleld=!0,a.incrementInstalls(a.block.packageName),window.store.dispatch("getInstalledBlocks"),window.store.commit("setNotification",{text:"".concat(fgcData.strings.block," <b>").concat(a.block.name,"</b> ").concat(fgcData.strings.block_installed),class:"show success"}),console.log("Block installed ",b.data)}).fail(function(b){a.installing=!1,console.log("There is some issues installing block: ",b)})},deleteBlock:function c(){var a=this;this.installing=!0;var b=this.block;jQuery.ajax({type:"POST",url:fgcData.ajaxUrl,data:{action:"fgc_delete_block",data:b}}).done(function(b){a.installing=!1,a.alreadyInstaleld=!1,a.decrementInstalls(a.block.packageName),window.store.dispatch("getInstalledBlocks"),window.store.commit("setNotification",{text:"".concat(fgcData.strings.block," <b>").concat(a.block.name,"</b> ").concat(fgcData.strings.block_uninstalled),class:"show success"}),console.log("Block uninstalled ",b.data)}).fail(function(b){a.installing=!1,console.log("There is some issues uninstalling block: ",b)})},updateBlock:function c(){var a=this;this.installing=!0;var b=this.block;jQuery.ajax({type:"POST",url:fgcData.ajaxUrl,data:{action:"fgc_update_block",data:b}}).done(function(b){a.installing=!1,a.updateAvailable=!1,a.currentVersion=a.block.version,window.store.dispatch("getInstalledBlocks"),window.store.commit("setNotification",{text:"".concat(fgcData.strings.block," <b>").concat(a.block.name,"</b> ").concat(fgcData.strigns.block_updated),class:"show success"}),console.log("Block Updated ",b.data)}).fail(function(b){a.installing=!1,console.log("There is some issues updating block: ",b)})},incrementInstalls:function b(a){jQuery.ajax({type:"PUT",url:"https://api.gutenbergcloud.org/blocks/".concat(a)}).done(function(){console.log("Installation counter increased ")}).fail(function(a){console.log("Some errors occured white increasing number of installs: ",a)})},decrementInstalls:function b(a){jQuery.ajax({type:"DELETE",url:"https://api.gutenbergcloud.org/blocks/".concat(a)}).done(function(){console.log("Installation counter decreased ")}).fail(function(a){console.log("Some errors occured white increasing number of installs: ",a)})},openMoreDetails:function a(){this.block.infoUrl&&window.open(this.block.infoUrl,"_blank")}},computed:{currentBrowsState:function a(){return window.store.state.browsState}}}),Vue.component("explorer-filter",{componenets:["filter-drawer"],data:function a(){return{drawerFilterOpen:!1,searchQuery:null,filterLinks:[{name:fgcData.strings.installed,slug:"installed"},{name:fgcData.strings.popular,slug:"popular"},{name:fgcData.strings.latest,slug:"latest"}]}},template:"\n    <div class=\"wp-filter g-blocks-filter hide-if-no-js\">\n      <div class=\"filter-count\">\n        <span class=\"count theme-count\">{{ installedBlocksCount }}</span>\n      </div>\n\n      <ul class=\"filter-links\">\n        <li><a v-for=\"filter in filterLinks\" :key=\"filter.slug\" @click=\"filterLink(filter.slug)\" :class=\"currentFilter(filter.slug)\">{{ filter.name }}</a></li>\n      </ul>\n\n      <button type=\"button\" v-if=\"false\" id=\"searchFilter\" class=\"button drawer-toggle\" :aria-expanded=\"drawerFilterOpen\" @click=\"drawerFilterOpen = !drawerFilterOpen\">{{fgcData.strings.filter}}</button>\n\n      <form class=\"search-form\" @submit.prevent=\"searchForBlock\"><label class=\"screen-reader-text\" for=\"wp-filter-search-input\">{{fgcData.strings.search_for_blocks}}</label><input :placeholder=\"fgcData.strings.search_blocks\" v-model=\"searchQuery\" type=\"search\" id=\"wp-filter-search-input\" class=\"wp-filter-search\"></form>\n\n      <filter-drawer :style=\"{display: drawerFilterOpen ? 'block' : 'none'}\"></filter-drawer>\n    </div>\n  ",mounted:function a(){},methods:{filterLink:function c(a){var b=window.location.search.replace(/\&brows[=a-z]*/,"");history.pushState({state:a},null,"".concat(b,"&brows=").concat(a)),window.store.commit("setBrowsState",a)},currentFilter:function b(a){return window.store.state.browsState==a?"current":""},searchForBlock:function c(){var a=window.location.search.replace(/\&q[=a-z\-]*/,""),b=this.searchQuery.replace(/\s+/g,"-").toLowerCase();history.pushState({state:b},null,"".concat(a,"&q=").concat(b)),window.store.commit("setSearchQuery",b)}},computed:{installedBlocksCount:function a(){return window.store.state.installedBlocks.length}}}),Vue.component("filter-drawer",{template:"\n    <div class=\"filter-drawer\">\n      <div class=\"buttons\">\n        <button type=\"button\" class=\"apply-filters button\">Apply Filters<span></span></button>\n        <button type=\"button\" class=\"clear-filters button\" aria-label=\"Clear all filters\">Clear</button>\n      </div>\n      <fieldset class=\"filter-group\">\n        <legend>Subject</legend>\n        <div class=\"filter-group-feature\">\n          <input type=\"checkbox\" id=\"filter-id-blog\" value=\"blog\">\n          <label for=\"filter-id-blog\">Blog</label>\n          <input type=\"checkbox\" id=\"filter-id-e-commerce\" value=\"e-commerce\">\n          <label for=\"filter-id-e-commerce\">E-Commerce</label>\n          <input type=\"checkbox\" id=\"filter-id-education\" value=\"education\">\n          <label for=\"filter-id-education\">Education</label>\n          <input type=\"checkbox\" id=\"filter-id-entertainment\" value=\"entertainment\">\n          <label for=\"filter-id-entertainment\">News</label>\n        </div>\n      </fieldset>\n      <fieldset class=\"filter-group\">\n        <legend>Features</legend>\n        <div class=\"filter-group-feature\">\n          <input type=\"checkbox\" id=\"filter-id-accessibility-ready\" value=\"accessibility-ready\">\n          <label for=\"filter-id-accessibility-ready\">Custom Colors</label>\n          <input type=\"checkbox\" id=\"filter-id-custom-background\" value=\"custom-background\">\n          <label for=\"filter-id-custom-background\">Editor style</label>\n          <input type=\"checkbox\" id=\"filter-id-custom-colors\" value=\"custom-colors\">\n          <label for=\"filter-id-custom-colors\">Full Width Template</label>\n        </div>  \n      </fieldset>\n      <fieldset class=\"filter-group\">\n        <legend>Layout</legend>\n        <div class=\"filter-group-feature\">\n          <input type=\"checkbox\" id=\"filter-id-grid-layout\" value=\"grid-layout\">\n          <label for=\"filter-id-grid-layout\">Grid-layout</label>\n          <input type=\"checkbox\" id=\"filter-id-one-column\" value=\"one-column\">\n          <label for=\"filter-id-one-column\">One Column</label>\n          <input type=\"checkbox\" id=\"filter-id-two-columns\" value=\"two-columns\">\n          <label for=\"filter-id-two-columns\">Two Column</label>\n          <input type=\"checkbox\" id=\"filter-id-three-columns\" value=\"three-columns\">\n          <label for=\"filter-id-three-columns\">Responsive</label>\n        </div>\n      </fieldset>\n      <div class=\"buttons\">\n        <button type=\"button\" class=\"apply-filters button\">Apply Filters<span></span></button>\n        <button type=\"button\" class=\"clear-filters button\" aria-label=\"Clear all filters\">Clear</button>\n      </div>\n\n    </div>\n  "});var store=new Vuex.Store({state:{notification:{},browsState:null,installedBlocks:fgcData.installedBlocks,searchQuery:null},mutations:{setNotification:function c(a,b){a.notification=b},setBrowsState:function c(a,b){a.browsState=b},setInstalledBlocks:function c(a,b){a.installedBlocks=b},setSearchQuery:function c(a,b){a.searchQuery=b}},actions:{getInstalledBlocks:function b(a){jQuery.ajax({type:"GET",url:fgcData.ajaxUrl,data:{action:"fgc_get_all_blocks"}}).done(function(b){a.commit("setInstalledBlocks",b.data)}).fail(function(a){console.log("There is some issues installing block: ",a)})}}}),app=new Vue({el:"#blockExplorer",data:function a(){return{blocks:[]}},created:function a(){window.store.dispatch("getInstalledBlocks")},mounted:function c(){var a=this.getUrlParams("brows")?this.getUrlParams("brows"):"installed",b=this.getUrlParams("q")?this.getUrlParams("q"):"";this.getBlocks({state:a,q:b}),window.store.commit("setBrowsState",a),window.addEventListener("popstate",this.fetchBlocks)},watch:{currentBrowsFilter:function c(a){var b=this.getUrlParams("q")?this.getUrlParams("q"):"";window.store.dispatch("getInstalledBlocks");this.getBlocks({state:a,q:b})},currentSearchQuery:function c(a){var b=this.getUrlParams("brows")?this.getUrlParams("brows"):"installed";window.store.dispatch("getInstalledBlocks");this.getBlocks({state:b,q:a})},installedBlocks:function d(a,b){var c=this.getUrlParams("brows")?this.getUrlParams("brows"):"installed";a.length!=b.length&&"installed"==c&&(this.blocks=this.blocks.filter(function(b){return a.some(function(a){return a.package_name==b.packageName})}))}},methods:{fetchBlocks:function c(a){var b=null;a.state&&(b=a.state.state),this.getBlocks(b)},getBlocks:function e(a){var b=this,c=[],d="";null!==a.q&&(d="q=".concat(a.q)),jQuery.get("https://api.gutenbergcloud.org/blocks?".concat(d),function(d){d.rows.map(function(d){var e={};e.jsUrl="https://unpkg.com/".concat(d.name,"@").concat(d.version,"/").concat(d.config.js),e.cssUrl="https://unpkg.com/".concat(d.name,"@").concat(d.version,"/").concat(d.config.css),e.editorCss=d.config.editor?"https://unpkg.com/".concat(d.name,"@").concat(d.version,"/").concat(d.config.editor):null,e.infoUrl="https://www.npmjs.com/package/".concat(d.name),e.imageUrl="https://unpkg.com/".concat(d.name,"@").concat(d.version,"/").concat(d.config.screenshot),e.name=d.config.name,e.version=d.version,e.packageName=d.name,null==a.state||"installed"==a.state?b.installedBlocks.length&&b.installedBlocks.filter(function(a){return a.package_name==e.packageName}).length&&c.push(e):c.push(e)})}),this.blocks=c},getUrlParams:function e(a,b){b||(b=window.location.href),a=a.replace(/[\[\]]/g,"\\$&");var c=new RegExp("[?&]"+a+"(=([^&#]*)|&|#|$)"),d=c.exec(b);return d?d[2]?decodeURIComponent(d[2].replace(/\+/g," ")):"":null}},computed:{currentBrowsFilter:function a(){return window.store.state.browsState},currentSearchQuery:function a(){return window.store.state.searchQuery},installedBlocks:function a(){return window.store.state.installedBlocks}}});
     1"use strict";Vue.component("admin-notice",{data:function a(){return{activeTimeout:-1}},template:"\n    <div\n      :class=\"['fgc-notification', notification.class]\"\n      v-cloak>\n      <p v-html=\"notification.text\"></p>\n    </div>\n  ",watch:{isActive:function a(){this.showingTimeout()}},mounted:function a(){this.showingTimeout()},methods:{showingTimeout:function b(){var a=this;window.clearTimeout(this.activeTimeout),this.activeTimeout=window.setTimeout(function(){window.store.state.notification.class="",a.isShowing=!1},4e3)}},computed:{isActive:function a(){return window.store.state.notification.text},notification:function a(){return window.store.state.notification}}}),Vue.component("block-card",{props:["block"],data:function a(){return{installing:!1,alreadyInstaleld:!1,updateAvailable:!1,currentVersion:null}},template:"\n    <div class=\"theme\">\n      <div class=\"theme-screenshot\">\n        <img :src=\"block.imageUrl\" :alt=\"block.name\">\n        <div class=\"spinner installing-block\" v-if=\"installing\"></div>\n      </div>\n\n      <div v-if=\"alreadyInstaleld\" class=\"notice inline notice-success notice-alt\"><p>{{fgcData.strings.installed}}</p></div>\n\n      <div v-if=\"updateAvailable\" class=\"update-message notice inline notice-warning notice-alt\">\n        <p>{{fgcData.strings.update_available}} <button class=\"button-link\" type=\"button\" @click=\"updateBlock\">{{fgcData.strings.update_now}}</button></p>\n      </div>\n\n      <span class=\"more-details\" @click=\"openMoreDetails\">{{fgcData.strings.show_more_details}}</span>\n\n      <div class=\"theme-id-container\">\n        <h3 class=\"theme-name\">{{ block.name }}</h3>\n        <span class=\"block-version\">{{fgcData.strings.version}}: {{ currentVersion }}</span>\n\n        <div class=\"theme-actions\">\n          <button class=\"button button-primary theme-install install-block-btn\"\n              v-if=\"currentBrowsState != 'installed' && !alreadyInstaleld\"\n              @click.prevent=\"installBlock\">\n              {{fgcData.strings.install}}\n          </button>\n          <button class=\"button theme-install install-block-btn\"\n              v-else\n              @click.prevent=\"deleteBlock\">\n              {{fgcData.strings.delete}}\n          </button>\n          <a class=\"button preview install-theme-preview\" :href=\"block.infoUrl\" target=\"_blank\">{{fgcData.strings.more_details}}</a>\n        </div>\n      </div>\n\n    </div>\n  ",mounted:function b(){var a=this;this.currentVersion=this.block.version,!window.store.state.installedBlocks.filter(function(c){return c.package_name==a.block.packageName}).length||(this.alreadyInstaleld="installed"!=this.currentBrowsState,"installed"==this.currentBrowsState&&(this.updateAvailable=!!window.store.state.installedBlocks.filter(function(c){if(c.package_name==a.block.packageName)return c.block_version<a.block.version}).length,this.currentVersion=window.store.state.installedBlocks.filter(function(c){return c.package_name==a.block.packageName})[0].block_version))},methods:{installBlock:function c(){var a=this;this.installing=!0;var b=this.block;console.log(b),jQuery.ajax({type:"POST",url:fgcData.ajaxUrl,data:{action:"fgc_install_block",data:b}}).done(function(b){a.installing=!1,a.alreadyInstaleld=!0,a.incrementInstalls(a.block.packageName),window.store.dispatch("getInstalledBlocks"),window.store.commit("setNotification",{text:"".concat(fgcData.strings.the_block," <b>").concat(a.block.name,"</b> ").concat(fgcData.strings.block_installed),class:"show success"}),console.log("Block installed ",b.data)}).fail(function(b){a.installing=!1,console.log("There is some issues installing block: ",b)})},deleteBlock:function c(){var a=this;this.installing=!0;var b=this.block;jQuery.ajax({type:"POST",url:fgcData.ajaxUrl,data:{action:"fgc_delete_block",data:b}}).done(function(b){a.installing=!1,a.alreadyInstaleld=!1,a.decrementInstalls(a.block.packageName),window.store.dispatch("getInstalledBlocks"),window.store.commit("setNotification",{text:"".concat(fgcData.strings.block," <b>").concat(a.block.name,"</b> ").concat(fgcData.strings.block_uninstalled),class:"show success"}),console.log("Block uninstalled ",b.data)}).fail(function(b){a.installing=!1,console.log("There is some issues uninstalling block: ",b)})},updateBlock:function c(){var a=this;this.installing=!0;var b=this.block;jQuery.ajax({type:"POST",url:fgcData.ajaxUrl,data:{action:"fgc_update_block",data:b}}).done(function(b){a.installing=!1,a.updateAvailable=!1,a.currentVersion=a.block.version,window.store.dispatch("getInstalledBlocks"),window.store.commit("setNotification",{text:"".concat(fgcData.strings.block," <b>").concat(a.block.name,"</b> ").concat(fgcData.strigns.block_updated),class:"show success"}),console.log("Block Updated ",b.data)}).fail(function(b){a.installing=!1,console.log("There is some issues updating block: ",b)})},incrementInstalls:function b(a){jQuery.ajax({type:"PUT",url:"https://api.gutenbergcloud.org/blocks/".concat(a)}).done(function(){console.log("Installation counter increased ")}).fail(function(a){console.log("Some errors occured white increasing number of installs: ",a)})},decrementInstalls:function b(a){jQuery.ajax({type:"DELETE",url:"https://api.gutenbergcloud.org/blocks/".concat(a)}).done(function(){console.log("Installation counter decreased ")}).fail(function(a){console.log("Some errors occured white increasing number of installs: ",a)})},openMoreDetails:function a(){this.block.infoUrl&&window.open(this.block.infoUrl,"_blank")}},computed:{currentBrowsState:function a(){return window.store.state.browsState}}}),Vue.component("explorer-filter",{componenets:["filter-drawer"],data:function a(){return{drawerFilterOpen:!1,searchQuery:null,filterLinks:[{name:fgcData.strings.installed,slug:"installed"},{name:fgcData.strings.popular,slug:"popular"},{name:fgcData.strings.latest,slug:"latest"}]}},template:"\n    <div class=\"wp-filter g-blocks-filter hide-if-no-js\">\n      <div class=\"filter-count\">\n        <span class=\"count theme-count\">{{ installedBlocksCount }}</span>\n      </div>\n\n      <ul class=\"filter-links\">\n        <li><a v-for=\"filter in filterLinks\" :key=\"filter.slug\" @click=\"filterLink(filter.slug)\" :class=\"currentFilter(filter.slug)\">{{ filter.name }}</a></li>\n      </ul>\n\n      <button type=\"button\" v-if=\"false\" id=\"searchFilter\" class=\"button drawer-toggle\" :aria-expanded=\"drawerFilterOpen\" @click=\"drawerFilterOpen = !drawerFilterOpen\">{{fgcData.strings.filter}}</button>\n\n      <form class=\"search-form\" @submit.prevent=\"searchForBlock\"><label class=\"screen-reader-text\" for=\"wp-filter-search-input\">{{fgcData.strings.search_for_blocks}}</label><input :placeholder=\"fgcData.strings.search_blocks\" v-model=\"searchQuery\" type=\"search\" id=\"wp-filter-search-input\" class=\"wp-filter-search\"></form>\n\n      <filter-drawer :style=\"{display: drawerFilterOpen ? 'block' : 'none'}\"></filter-drawer>\n    </div>\n  ",mounted:function a(){},methods:{filterLink:function c(a){var b=window.location.search.replace(/\&brows[=a-z]*/,"");history.pushState({state:a},null,"".concat(b,"&brows=").concat(a)),window.store.commit("setBrowsState",a)},currentFilter:function b(a){return window.store.state.browsState==a?"current":""},searchForBlock:function c(){var a=window.location.search.replace(/\&q[=a-z\-]*/,""),b=this.searchQuery.replace(/\s+/g,"-").toLowerCase();history.pushState({state:b},null,"".concat(a,"&q=").concat(b)),window.store.commit("setSearchQuery",b)}},computed:{installedBlocksCount:function a(){return window.store.state.installedBlocks.length}}}),Vue.component("filter-drawer",{template:"\n    <div class=\"filter-drawer\">\n      <div class=\"buttons\">\n        <button type=\"button\" class=\"apply-filters button\">Apply Filters<span></span></button>\n        <button type=\"button\" class=\"clear-filters button\" aria-label=\"Clear all filters\">Clear</button>\n      </div>\n      <fieldset class=\"filter-group\">\n        <legend>Subject</legend>\n        <div class=\"filter-group-feature\">\n          <input type=\"checkbox\" id=\"filter-id-blog\" value=\"blog\">\n          <label for=\"filter-id-blog\">Blog</label>\n          <input type=\"checkbox\" id=\"filter-id-e-commerce\" value=\"e-commerce\">\n          <label for=\"filter-id-e-commerce\">E-Commerce</label>\n          <input type=\"checkbox\" id=\"filter-id-education\" value=\"education\">\n          <label for=\"filter-id-education\">Education</label>\n          <input type=\"checkbox\" id=\"filter-id-entertainment\" value=\"entertainment\">\n          <label for=\"filter-id-entertainment\">News</label>\n        </div>\n      </fieldset>\n      <fieldset class=\"filter-group\">\n        <legend>Features</legend>\n        <div class=\"filter-group-feature\">\n          <input type=\"checkbox\" id=\"filter-id-accessibility-ready\" value=\"accessibility-ready\">\n          <label for=\"filter-id-accessibility-ready\">Custom Colors</label>\n          <input type=\"checkbox\" id=\"filter-id-custom-background\" value=\"custom-background\">\n          <label for=\"filter-id-custom-background\">Editor style</label>\n          <input type=\"checkbox\" id=\"filter-id-custom-colors\" value=\"custom-colors\">\n          <label for=\"filter-id-custom-colors\">Full Width Template</label>\n        </div>  \n      </fieldset>\n      <fieldset class=\"filter-group\">\n        <legend>Layout</legend>\n        <div class=\"filter-group-feature\">\n          <input type=\"checkbox\" id=\"filter-id-grid-layout\" value=\"grid-layout\">\n          <label for=\"filter-id-grid-layout\">Grid-layout</label>\n          <input type=\"checkbox\" id=\"filter-id-one-column\" value=\"one-column\">\n          <label for=\"filter-id-one-column\">One Column</label>\n          <input type=\"checkbox\" id=\"filter-id-two-columns\" value=\"two-columns\">\n          <label for=\"filter-id-two-columns\">Two Column</label>\n          <input type=\"checkbox\" id=\"filter-id-three-columns\" value=\"three-columns\">\n          <label for=\"filter-id-three-columns\">Responsive</label>\n        </div>\n      </fieldset>\n      <div class=\"buttons\">\n        <button type=\"button\" class=\"apply-filters button\">Apply Filters<span></span></button>\n        <button type=\"button\" class=\"clear-filters button\" aria-label=\"Clear all filters\">Clear</button>\n      </div>\n\n    </div>\n  "});var store=new Vuex.Store({state:{notification:{},browsState:null,installedBlocks:fgcData.installedBlocks,searchQuery:null},mutations:{setNotification:function c(a,b){a.notification=b},setBrowsState:function c(a,b){a.browsState=b},setInstalledBlocks:function c(a,b){a.installedBlocks=b},setSearchQuery:function c(a,b){a.searchQuery=b}},actions:{getInstalledBlocks:function b(a){jQuery.ajax({type:"GET",url:fgcData.ajaxUrl,data:{action:"fgc_get_all_blocks"}}).done(function(b){a.commit("setInstalledBlocks",b.data)}).fail(function(a){console.log("There is some issues installing block: ",a)})}}}),app=new Vue({el:"#blockExplorer",data:function a(){return{blocks:[]}},created:function a(){window.store.dispatch("getInstalledBlocks")},mounted:function c(){var a=this.getUrlParams("brows")?this.getUrlParams("brows"):"installed",b=this.getUrlParams("q")?this.getUrlParams("q"):"";this.getBlocks({state:a,q:b}),window.store.commit("setBrowsState",a),window.addEventListener("popstate",this.fetchBlocks)},watch:{currentBrowsFilter:function c(a){var b=this.getUrlParams("q")?this.getUrlParams("q"):"";window.store.dispatch("getInstalledBlocks");this.getBlocks({state:a,q:b})},currentSearchQuery:function c(a){var b=this.getUrlParams("brows")?this.getUrlParams("brows"):"installed";window.store.dispatch("getInstalledBlocks");this.getBlocks({state:b,q:a})},installedBlocks:function d(a,b){var c=this.getUrlParams("brows")?this.getUrlParams("brows"):"installed";a.length!=b.length&&"installed"==c&&(this.blocks=this.blocks.filter(function(b){return a.some(function(a){return a.package_name==b.packageName})}))}},methods:{fetchBlocks:function c(a){var b=null;a.state&&(b=a.state.state),this.getBlocks(b)},getBlocks:function e(a){var b=this,c=[],d="";null!==a.q&&(d="q=".concat(a.q)),jQuery.get("https://api.gutenbergcloud.org/blocks?".concat(d),function(d){d.rows.map(function(d){var e={};e.jsUrl="https://unpkg.com/".concat(d.name,"@").concat(d.version,"/").concat(d.config.js),e.cssUrl="https://unpkg.com/".concat(d.name,"@").concat(d.version,"/").concat(d.config.css),e.editorCss=d.config.editor?"https://unpkg.com/".concat(d.name,"@").concat(d.version,"/").concat(d.config.editor):null,e.infoUrl="https://www.npmjs.com/package/".concat(d.name),e.imageUrl="https://unpkg.com/".concat(d.name,"@").concat(d.version,"/").concat(d.config.screenshot),e.name=d.config.name,e.version=d.version,e.packageName=d.name,null==a.state||"installed"==a.state?b.installedBlocks.length&&b.installedBlocks.filter(function(a){return a.package_name==e.packageName}).length&&c.push(e):c.push(e)})}),this.blocks=c},getUrlParams:function e(a,b){b||(b=window.location.href),a=a.replace(/[\[\]]/g,"\\$&");var c=new RegExp("[?&]"+a+"(=([^&#]*)|&|#|$)"),d=c.exec(b);return d?d[2]?decodeURIComponent(d[2].replace(/\+/g," ")):"":null}},computed:{currentBrowsFilter:function a(){return window.store.state.browsState},currentSearchQuery:function a(){return window.store.state.searchQuery},installedBlocks:function a(){return window.store.state.installedBlocks}}});
  • cloud-blocks/tags/1.0.2/assets/source/js/block-component.js

    r1958571 r1961288  
    3232              v-if="currentBrowsState != 'installed' && !alreadyInstaleld"
    3333              @click.prevent="installBlock">
    34               Install
     34              {{fgcData.strings.install}}
    3535          </button>
    3636          <button class="button theme-install install-block-btn"
     
    7777          this.incrementInstalls(this.block.packageName)
    7878          window.store.dispatch('getInstalledBlocks')
    79           window.store.commit('setNotification', { text: `${fgcData.strings.block} <b>${this.block.name}</b> ${fgcData.strings.block_installed}`, class: 'show success' })
     79          window.store.commit('setNotification', { text: `${fgcData.strings.the_block} <b>${this.block.name}</b> ${fgcData.strings.block_installed}`, class: 'show success' })
    8080          console.log('Block installed ', res.data) 
    8181        })
  • cloud-blocks/tags/1.0.2/cloud-blocks.php

    r1958585 r1961288  
    22/*
    33Plugin Name: Cloud Blocks
    4 Version: 1.0.1
     4Version: 1.0.2
    55Description: Your library of Gutenberg blocks in the cloud
    6 Author: Frontkom - Fouad Yousefi
     6Author: Frontkom
    77Author URI: https://frontkom.no
    88License: GPL2
  • cloud-blocks/tags/1.0.2/core/Blocks/Blocks.php

    r1958571 r1961288  
    6060      );
    6161      Options::add( $new_block, true );
    62       update_option( 'gutenberg_cloud_install_block', $new_block);
     62
    6363      $response = array(
    6464        'code'      => 200,
     
    218218       * to enable/disable styling per individual block or for all of them.
    219219       */
    220       $disable_style = apply_filters( 'gutenberg_cloud_disable_style', false, $block );
     220      $disable_style = apply_filters( 'cloud_blocks_disable_style', false, $block );
    221221      if ( !$disable_style ) {
    222222        wp_register_style( str_replace( ' ', '-', $block->block_name ) , $block->css_url, array(), $block->block_version);
  • cloud-blocks/tags/1.0.2/core/Settings/Tools.php

    r1958571 r1961288  
    220220            <div class="inside">
    221221              <form method="post">
    222                 <p><?php _e( 'Here you can export all installed Gutenberg custom blocks from Gutenberg Cloud as a json file and import it elsewhere.', 'cloud-blocks' ); ?></p>
     222                <p><?php _e( 'Export all your installed blocks from Gutenberg Cloud as JSON. Note: The content will not be exported.', 'cloud-blocks' ); ?></p>
    223223                <p class="fgc-submit">
    224224                  <button type="submit" name="action" class="button button-primary" value="download-json"><?php _e( 'Export file', 'cloud-blocks' ); ?></button>
  • cloud-blocks/tags/1.0.2/core/Settings/Translations.php

    r1958585 r1961288  
    1717    return array(
    1818      'block'                   => __( 'Block', 'cloud-blocks' ),
     19      'the_block'               => __( 'The block', 'cloud-blocks' ),
    1920      'delete'                  => __( 'Delete', 'cloud-blocks' ),
     21      'install'                 => __( 'Install', 'cloud-blocks' ),
    2022      'installed'               => __( 'Installed', 'cloud-blocks' ),
    2123      'popular'                 => __( 'Popular', 'cloud-blocks' ),
  • cloud-blocks/tags/1.0.2/languages/cloud-blocks-nb_NO.po

    r1958571 r1961288  
    22msgstr ""
    33"Project-Id-Version: Cloud Blocks\n"
    4 "POT-Creation-Date: 2018-10-18 13:12+0200\n"
    5 "PO-Revision-Date: 2018-10-18 13:13+0200\n"
     4"POT-Creation-Date: 2018-10-22 11:20+0200\n"
     5"PO-Revision-Date: 2018-10-22 11:20+0200\n"
    66"Last-Translator: \n"
    77"Language-Team: \n"
     
    2222"X-Poedit-SearchPathExcluded-0: *.js\n"
    2323
    24 #: core/CloudBlocks.php:39
     24#: core/CloudBlocks.php:40
    2525msgid "Gutenberg is not enabled. Please try again after enabling."
    2626msgstr "Gutenberg er ikke aktivert. Skru den på, og prøv igjen!"
     
    6666#: core/Settings/Tools.php:222
    6767msgid ""
    68 "Here you can export all installed Gutenberg custom blocks from Gutenberg "
    69 "Cloud as a json file and import it elsewhere."
     68"Export all your installed blocks from Gutenberg Cloud as JSON. Note: The "
     69"content will not be exported."
    7070msgstr ""
    71 "Her kan du eksportere alle installerte Gutenberg egendefinerte blokker fra "
    72 "Gutenberg Cloud som en JSON-fil og importere den et annet sted."
     71"Klikk for å eksportere aktive blokker fra Gutenberg Cloud som JSON. OBS: "
     72"Innholdet blir ikke eksportert."
    7373
    7474#: core/Settings/Tools.php:224
     
    9797
    9898#: core/Settings/Translations.php:19
     99msgid "The block"
     100msgstr "Blokk"
     101
     102#: core/Settings/Translations.php:20
    99103msgid "Delete"
    100104msgstr "Slett"
    101105
    102 #: core/Settings/Translations.php:20
     106#: core/Settings/Translations.php:21
     107msgid "Install"
     108msgstr "Aktiver"
     109
     110#: core/Settings/Translations.php:22
    103111msgid "Installed"
    104112msgstr "Installert"
    105113
    106 #: core/Settings/Translations.php:21
     114#: core/Settings/Translations.php:23
    107115msgid "Popular"
    108116msgstr "Populær"
    109117
    110 #: core/Settings/Translations.php:22
     118#: core/Settings/Translations.php:24
    111119msgid "Latest"
    112120msgstr "Nyeste"
    113121
    114 #: core/Settings/Translations.php:23
     122#: core/Settings/Translations.php:25
    115123msgid "Most used"
    116124msgstr "Mest brukt"
    117125
    118 #: core/Settings/Translations.php:24
     126#: core/Settings/Translations.php:26
    119127msgid "Search for blocks"
    120128msgstr "Søk etter blokker"
    121129
    122 #: core/Settings/Translations.php:25
     130#: core/Settings/Translations.php:27
    123131msgid "Search blocks..."
    124132msgstr "Søk blokker..."
    125133
    126 #: core/Settings/Translations.php:26
     134#: core/Settings/Translations.php:28
    127135msgid "Filter"
    128136msgstr "Filter"
    129137
    130 #: core/Settings/Translations.php:27
     138#: core/Settings/Translations.php:29
    131139msgid "Update now"
    132140msgstr "Uppdater nå"
    133141
    134 #: core/Settings/Translations.php:28
     142#: core/Settings/Translations.php:30
    135143msgid "Show more details"
    136144msgstr "Vis flere detaljer"
    137145
    138 #: core/Settings/Translations.php:29
     146#: core/Settings/Translations.php:31
    139147msgid "More details"
    140148msgstr "Flere detaljer"
    141149
    142 #: core/Settings/Translations.php:30
     150#: core/Settings/Translations.php:32
    143151msgid "have been installed successfully."
    144152msgstr "er installert."
    145153
    146 #: core/Settings/Translations.php:31
     154#: core/Settings/Translations.php:33
    147155msgid "have been uninstalled successfully."
    148156msgstr "er avinstallert.."
    149157
    150 #: core/Settings/Translations.php:32
     158#: core/Settings/Translations.php:34
    151159msgid "have been updated successfully."
    152160msgstr "er oppdatert."
    153161
    154 #: core/Settings/Translations.php:33
     162#: core/Settings/Translations.php:35
    155163msgid "New version available."
    156164msgstr "Ny versjon tilgjengelig."
    157165
    158 #: core/Settings/Translations.php:34
     166#: core/Settings/Translations.php:36
    159167msgid "Version"
    160168msgstr "Versjon"
     
    173181
    174182#. Author of the plugin/theme
    175 msgid "Frontkom - Fouad Yousefi"
    176 msgstr "Frontkom - Foad Yousefi"
     183msgid "Frontkom"
     184msgstr ""
    177185
    178186#. Author URI of the plugin/theme
     
    180188msgstr "https://frontkom.no"
    181189
     190#~ msgid "Frontkom - Fouad Yousefi"
     191#~ msgstr "Frontkom - Foad Yousefi"
     192
    182193#~ msgid "Gutenberg Cloud"
    183194#~ msgstr "Gutenberg Cloud"
  • cloud-blocks/tags/1.0.2/languages/cloud-blocks-pt_PT.po

    r1958571 r1961288  
    22msgstr ""
    33"Project-Id-Version: Cloud Blocks\n"
    4 "POT-Creation-Date: 2018-10-18 13:25+0200\n"
    5 "PO-Revision-Date: 2018-10-18 13:56+0200\n"
     4"POT-Creation-Date: 2018-10-22 11:20+0200\n"
     5"PO-Revision-Date: 2018-10-22 11:20+0200\n"
    66"Last-Translator: \n"
    77"Language-Team: \n"
     
    2222"X-Poedit-SearchPathExcluded-0: *.js\n"
    2323
    24 #: core/CloudBlocks.php:39
     24#: core/CloudBlocks.php:40
    2525msgid "Gutenberg is not enabled. Please try again after enabling."
    2626msgstr ""
     
    6767#: core/Settings/Tools.php:222
    6868msgid ""
    69 "Here you can export all installed Gutenberg custom blocks from Gutenberg "
    70 "Cloud as a json file and import it elsewhere."
     69"Export all your installed blocks from Gutenberg Cloud as JSON. Note: The "
     70"content will not be exported."
    7171msgstr ""
    72 "Aqui pode exportar todos os blocos personalizados instalados na Gutenberg "
    73 "Cloud num ficheiro JSON e importá-lo em outro lugar."
     72"Exportar da Gutenberg Could todos os blocos instalados para um ficheiro "
     73"JSON. Nota: o conteúdo não será exportado."
    7474
    7575#: core/Settings/Tools.php:224
     
    9898
    9999#: core/Settings/Translations.php:19
     100msgid "The block"
     101msgstr "O bloco"
     102
     103#: core/Settings/Translations.php:20
    100104msgid "Delete"
    101105msgstr "Excluir"
    102106
    103 #: core/Settings/Translations.php:20
     107#: core/Settings/Translations.php:21
     108msgid "Install"
     109msgstr "Instalar"
     110
     111#: core/Settings/Translations.php:22
    104112msgid "Installed"
    105113msgstr "Instalado"
    106114
    107 #: core/Settings/Translations.php:21
     115#: core/Settings/Translations.php:23
    108116msgid "Popular"
    109117msgstr "Popular"
    110118
    111 #: core/Settings/Translations.php:22
     119#: core/Settings/Translations.php:24
    112120msgid "Latest"
    113121msgstr "Mais recentes"
    114122
    115 #: core/Settings/Translations.php:23
     123#: core/Settings/Translations.php:25
    116124msgid "Most used"
    117125msgstr "Mais utilizados"
    118126
    119 #: core/Settings/Translations.php:24
     127#: core/Settings/Translations.php:26
    120128msgid "Search for blocks"
    121129msgstr "Procurar blocos"
    122130
    123 #: core/Settings/Translations.php:25
     131#: core/Settings/Translations.php:27
    124132msgid "Search blocks..."
    125133msgstr "Pesquisar blocos…"
    126134
    127 #: core/Settings/Translations.php:26
     135#: core/Settings/Translations.php:28
    128136msgid "Filter"
    129137msgstr "Filtro"
    130138
    131 #: core/Settings/Translations.php:27
     139#: core/Settings/Translations.php:29
    132140msgid "Update now"
    133141msgstr "Atualizar agora"
    134142
    135 #: core/Settings/Translations.php:28
     143#: core/Settings/Translations.php:30
    136144msgid "Show more details"
    137145msgstr "Mostrar mais detalhes"
    138146
    139 #: core/Settings/Translations.php:29
     147#: core/Settings/Translations.php:31
    140148msgid "More details"
    141149msgstr "Mais detalhes"
    142150
    143 #: core/Settings/Translations.php:30
     151#: core/Settings/Translations.php:32
    144152msgid "have been installed successfully."
    145 msgstr "foram instalados com sucesso."
    146 
    147 #: core/Settings/Translations.php:31
    148 msgid "have been uninstalled successfully."
    149 msgstr "foram desinstalados com sucesso."
    150 
    151 #: core/Settings/Translations.php:32
    152 msgid "have been updated successfully."
    153 msgstr "foram atualizados com sucesso."
     153msgstr "foi instalado com sucesso."
    154154
    155155#: core/Settings/Translations.php:33
     156msgid "have been uninstalled successfully."
     157msgstr "foi desinstalado com sucesso."
     158
     159#: core/Settings/Translations.php:34
     160msgid "have been updated successfully."
     161msgstr "foi atualizado com sucesso."
     162
     163#: core/Settings/Translations.php:35
    156164msgid "New version available."
    157165msgstr "Nova versão disponível."
    158166
    159 #: core/Settings/Translations.php:34
     167#: core/Settings/Translations.php:36
    160168msgid "Version"
    161169msgstr "Versão"
     
    174182
    175183#. Author of the plugin/theme
    176 msgid "Frontkom - Fouad Yousefi"
    177 msgstr "Frontkom-Foad Yousefi"
     184msgid "Frontkom"
     185msgstr ""
    178186
    179187#. Author URI of the plugin/theme
    180188msgid "https://frontkom.no"
    181189msgstr "https://frontkom.no"
     190
     191#~ msgid "Frontkom - Fouad Yousefi"
     192#~ msgstr "Frontkom-Foad Yousefi"
  • cloud-blocks/tags/1.0.2/readme.txt

    r1958585 r1961288  
    22Contributors: frontkom, foadyousefi
    33Author URI: https://frontkom.no
    4 Tags: gutenberg, pagebuilder
     4Tags: gutenberg, pagebuilder, blocks, gutenberg blocks, page builder
    55Requires at least: 4.9.8
    66Tested up to: 4.9.8
    77Requires PHP: 5
    8 Stable tag: 1.0.1
    9 License: GNU GPL
    10 License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     8Stable tag: 1.0.2
     9License: GPLv3
     10License URI: https://www.gnu.org/licenses/gpl-3.0.html
    1111
    1212Your online library of Gutenberg blocks! Browse and discover new blocks, and install with a click.
    1313
    1414== Description ==
    15 No block collection plugins needed:
    16 This is the only plugin you need to browse and install new blocks.
     15**Gutenberg Cloud: Your online library of blocks!** Cloud Blocks is the only plugin you need to browse and install new blocks:
    1716
    18 Reuse between platforms
    19 Gutenberg blocks can be used in both Wordpress and Drupal
     17- Discover and install custom blocks with a click
     18- Install only the blocks you need – no huge plugin collections needed
     19- Reuse blocks between WordPress and Drupal
     20- Serve the blocks from a CDN
    2021
    21 Code once, use everywhere: As Gutenberg blocks are CMS agnostic, we want to provide an ecosystem all systems can connect to.
     22## Why use Gutenberg Cloud?
     23Installing an actual plugin for each block or block collection easily leads to managing lots of code that you don’t really need. It’s like having one app for each website you visit, instead of just installing a web browser. With the block manager, you have a growing library at your fingertips, without the bloat. It’s like an app store for blocks – except it’s free.
    2224
    23 Why Gutenberg Cloud? Installing an actual plugin/module for each block or block collection easily leads to managing lots of code that you don’t really need. It’s like having one app for each website you visit, instead of just installing a browser. With the block manager, you have a growing library at your fingertips, without the bloat.
     25## Get started
     26Install the plugin, and look for the cloud icon in the main menu. Browse around and activate a few blocks. Voila – these are now available to you in the Gutenberg editor!
     27
     28## How it works under the hood
     29Gutenberg Cloud is a service that fetches Open Source Gutenberg blocks hosted on NPM. The assets from these are served from CloudFlare using unpkg.com. The Cloud Blocks plugin provides an interface in WordPress for Gutenberg Cloud.
     30
     31Code once, use everywhere: Since the blocks are JS/CSS only, they are CMS agnostic. This means you can develop a block for a Drupal site, and reuse it later on a WordPress blog.
     32
    2433
    2534== Installation ==
    2635Install it just like any other plugin. It just works!
    2736
     37== Screenshots ==
     38
     391. Discover and install blocks
     40
    2841== Frequently Asked Questions ==
    29 How do I add my own custom blocks to Gutenberg Cloud?
    3042
    31 Gutenberg Cloud blocks are really just normal Gutenberg blocks. They have a screenshot and some other meta, but follows the official standards. See https://gutenbergcloud.org/ for more information.
     43**How do I migrate a block collection plugin to Gutenberg Cloud?**
     44
     45This simply means removing some PHP, adding some meta data and publishing on NPM. [Follow these simple steps](https://github.com/front/cloud-blocks/blob/master/docs/migrate-block.md).
     46
     47**How do I create a custom block for Gutenberg Cloud?**
     48
     49Gutenberg Cloud blocks are really just normal Gutenberg blocks, without the PHP. [Follow these steps to do it](https://github.com/front/cloud-blocks/blob/master/docs/create-block.md)!
     50
     51**How do I disable CSS for a single block?**
     52
     53This is useful for letting your theme control your block styles. There’s a hook for this, [documented here](https://github.com/front/cloud-blocks/blob/master/docs/hooks.md).
     54
     55**Why is the plugin called Cloud Blocks?**
     56
     57We wanted to name it Gutenberg Cloud, but since it’s not possible to name a plugin starting with the name of another plugin (i.e. Gutenberg), we ended up calling it Cloud Blocks. Makes sense though, doesn’t it?
     58
     59**Are the blocks really served from "the cloud"?**
     60
     61Indeed, they are! The source code for each block is on NPM, but the JS/CSS is served by a CDN. No local downloads!
     62
     63**Can I add private custom blocks?**
     64
     65Sure! Just add your custom blocks into **wp-content/cloud-blocks/** folder.
    3266
    3367== Changelog ==
    3468
     69= 1.0.2 =
     70* Change: Some translation fixes
     71* Change: Better documentation and screenshot
    3572
    3673= 1.0.1 =
  • cloud-blocks/trunk/README.md

    r1958585 r1961288  
    11# Cloud Blocks
    22
    3 Your online library of Gutenberg blocks! Browse and discover new blocks, and install with a click.
     3## Description
     4**Gutenberg Cloud: Your online library of blocks!** Cloud Blocks is the only plugin you need to browse and install new blocks:
    45
    5 ### Description
     6- Discover and install custom blocks with a click
     7- Install only the blocks you need – no huge plugin collections needed
     8- Reuse blocks between WordPress and Drupal
     9- Serve the blocks from a CDN
    610
    7 No block collection plugins needed:
    8 This is the only plugin you need to browse and install new blocks.
     11### Why use Gutenberg Cloud?
     12Installing an actual plugin for each block or block collection easily leads to managing lots of code that you don’t really need. It’s like having one app for each website you visit, instead of just installing a web browser. With the block manager, you have a growing library at your fingertips, without the bloat.
    913
    10 Reuse between platforms
    11 Gutenberg blocks can be used in both Wordpress and Drupal
     14### Get started
     15Install the plugin, and look for the cloud icon in the main menu. Browse around and activate a few blocks. Voila – these are now available to you in the Gutenberg editor!
    1216
    13 Code once, use everywhere: As Gutenberg blocks are CMS agnostic, we want to provide an ecosystem all systems can connect to.
     17### How it works under the hood
     18Gutenberg Cloud is a service that fetches Open Source Gutenberg blocks hosted on NPM. The assets from these are served from CloudFlare using unpkg.com. The Cloud Blocks plugin provides an interface in WordPress for Gutenberg Cloud.
    1419
    15 Why Gutenberg Cloud? Installing an actual plugin/module for each block or block collection easily leads to managing lots of code that you don’t really need. It’s like having one app for each website you visit, instead of just installing a browser. With the block manager, you have a growing library at your fingertips, without the bloat.
     20Code once, use everywhere: Since the blocks are JS/CSS only, they are CMS agnostic. This means you can develop a block for a Drupal site, and reuse it later on a WordPress blog.
    1621
    17 ### Installation
    18 Install it just like any other plugin. It just works!
     22## Installation
     23Install it as any other plugin, but note that you need Gutenberg activated for it to work.
    1924
    20 ### Available hooks
     25To install individual blocks, look for the cloud icon in the left side menu. Click it, and browse away!
     26
     27## Frequently Asked Questions
     28
     29### How do I migrate a block collection plugin to Gutenberg Cloud?
     30Glad you asked! This simply means removing some PHP, adding some meta data and publishing on NPM. [Follow these simple steps](https://github.com/front/cloud-blocks/blob/master/docs/migrate-block.md).
     31
     32### How do I create a custom block for Gutenberg Cloud?
     33Gutenberg Cloud blocks are really just normal Gutenberg blocks, without the PHP. [Follow these steps to do it](https://github.com/front/cloud-blocks/blob/master/docs/create-block.md)!
     34
     35### How do I disable CSS for a single block?
     36This is useful for letting your theme control your block styles. There’s a hook for this, [documented here](https://github.com/front/cloud-blocks/blob/master/docs/hooks.md).
     37
     38### Why is the plugin called Cloud Blocks?
     39We wanted to name it Gutenberg Cloud, but since it’s not possible to name a plugin starting with the name of another plugin (i.e. Gutenberg), we ended up calling it Cloud Blocks. Makes sense though, doesn’t it?
     40
     41### Are the blocks really served from "the cloud"?
     42Indeed, they are! The source code for each block is on NPM, but the JS/CSS is served by a CDN. No local downloads!
     43
     44### Can I add private custom blocks?
     45Sure! Just add your custom blocks into **wp-content/cloud-blocks/** folder.
     46
     47## Available hooks
    2148
    2249`gutenberg_cloud_disable_style`
     
    4370```
    4471
    45 ### Frequently Asked Questions
    46 **How do I add my own custom blocks to Gutenberg Cloud?**
    47 Gutenberg Cloud blocks are really just normal Gutenberg blocks. They have a screenshot and some other meta, but follows the official standards. See https://gutenbergcloud.org/ for more information.
    4872
    49 ### Changelog
     73## Changelog
    5074
     75#### 1.0.2
     76* **Change**: Some translation fixes
     77* **Change**: Better documentation and screenshot
     78* **Added**: Italian translation. (Thanks to [cipo28](https://github.com/front/cloud-blocks/pull/1))
    5179
    52 ##### 1.0.1
    53 * Fix: is_plugin_active() undefined fix
    54 * Fix: Change strings functions to static
     80#### 1.0.1
     81* **Fix**: is_plugin_active() undefined fix
     82* **Fix**: Change strings functions to static
    5583
    56 ##### 1.0.0
     84#### 1.0.0
    5785* Initial plugin
  • cloud-blocks/trunk/assets/js/script.js

    r1958571 r1961288  
    7272              v-if="currentBrowsState != 'installed' && !alreadyInstaleld"
    7373              @click.prevent="installBlock">
    74               Install
     74              {{fgcData.strings.install}}
    7575          </button>
    7676          <button class="button theme-install install-block-btn"
     
    117117          this.incrementInstalls(this.block.packageName)
    118118          window.store.dispatch('getInstalledBlocks')
    119           window.store.commit('setNotification', { text: `${fgcData.strings.block} <b>${this.block.name}</b> ${fgcData.strings.block_installed}`, class: 'show success' })
     119          window.store.commit('setNotification', { text: `${fgcData.strings.the_block} <b>${this.block.name}</b> ${fgcData.strings.block_installed}`, class: 'show success' })
    120120          console.log('Block installed ', res.data) 
    121121        })
  • cloud-blocks/trunk/assets/js/script.min.js

    r1958571 r1961288  
    1 "use strict";Vue.component("admin-notice",{data:function a(){return{activeTimeout:-1}},template:"\n    <div\n      :class=\"['fgc-notification', notification.class]\"\n      v-cloak>\n      <p v-html=\"notification.text\"></p>\n    </div>\n  ",watch:{isActive:function a(){this.showingTimeout()}},mounted:function a(){this.showingTimeout()},methods:{showingTimeout:function b(){var a=this;window.clearTimeout(this.activeTimeout),this.activeTimeout=window.setTimeout(function(){window.store.state.notification.class="",a.isShowing=!1},4e3)}},computed:{isActive:function a(){return window.store.state.notification.text},notification:function a(){return window.store.state.notification}}}),Vue.component("block-card",{props:["block"],data:function a(){return{installing:!1,alreadyInstaleld:!1,updateAvailable:!1,currentVersion:null}},template:"\n    <div class=\"theme\">\n      <div class=\"theme-screenshot\">\n        <img :src=\"block.imageUrl\" :alt=\"block.name\">\n        <div class=\"spinner installing-block\" v-if=\"installing\"></div>\n      </div>\n\n      <div v-if=\"alreadyInstaleld\" class=\"notice inline notice-success notice-alt\"><p>{{fgcData.strings.installed}}</p></div>\n\n      <div v-if=\"updateAvailable\" class=\"update-message notice inline notice-warning notice-alt\">\n        <p>{{fgcData.strings.update_available}} <button class=\"button-link\" type=\"button\" @click=\"updateBlock\">{{fgcData.strings.update_now}}</button></p>\n      </div>\n\n      <span class=\"more-details\" @click=\"openMoreDetails\">{{fgcData.strings.show_more_details}}</span>\n\n      <div class=\"theme-id-container\">\n        <h3 class=\"theme-name\">{{ block.name }}</h3>\n        <span class=\"block-version\">{{fgcData.strings.version}}: {{ currentVersion }}</span>\n\n        <div class=\"theme-actions\">\n          <button class=\"button button-primary theme-install install-block-btn\"\n              v-if=\"currentBrowsState != 'installed' && !alreadyInstaleld\"\n              @click.prevent=\"installBlock\">\n              Install\n          </button>\n          <button class=\"button theme-install install-block-btn\"\n              v-else\n              @click.prevent=\"deleteBlock\">\n              {{fgcData.strings.delete}}\n          </button>\n          <a class=\"button preview install-theme-preview\" :href=\"block.infoUrl\" target=\"_blank\">{{fgcData.strings.more_details}}</a>\n        </div>\n      </div>\n\n    </div>\n  ",mounted:function b(){var a=this;this.currentVersion=this.block.version,!window.store.state.installedBlocks.filter(function(c){return c.package_name==a.block.packageName}).length||(this.alreadyInstaleld="installed"!=this.currentBrowsState,"installed"==this.currentBrowsState&&(this.updateAvailable=!!window.store.state.installedBlocks.filter(function(c){if(c.package_name==a.block.packageName)return c.block_version<a.block.version}).length,this.currentVersion=window.store.state.installedBlocks.filter(function(c){return c.package_name==a.block.packageName})[0].block_version))},methods:{installBlock:function c(){var a=this;this.installing=!0;var b=this.block;console.log(b),jQuery.ajax({type:"POST",url:fgcData.ajaxUrl,data:{action:"fgc_install_block",data:b}}).done(function(b){a.installing=!1,a.alreadyInstaleld=!0,a.incrementInstalls(a.block.packageName),window.store.dispatch("getInstalledBlocks"),window.store.commit("setNotification",{text:"".concat(fgcData.strings.block," <b>").concat(a.block.name,"</b> ").concat(fgcData.strings.block_installed),class:"show success"}),console.log("Block installed ",b.data)}).fail(function(b){a.installing=!1,console.log("There is some issues installing block: ",b)})},deleteBlock:function c(){var a=this;this.installing=!0;var b=this.block;jQuery.ajax({type:"POST",url:fgcData.ajaxUrl,data:{action:"fgc_delete_block",data:b}}).done(function(b){a.installing=!1,a.alreadyInstaleld=!1,a.decrementInstalls(a.block.packageName),window.store.dispatch("getInstalledBlocks"),window.store.commit("setNotification",{text:"".concat(fgcData.strings.block," <b>").concat(a.block.name,"</b> ").concat(fgcData.strings.block_uninstalled),class:"show success"}),console.log("Block uninstalled ",b.data)}).fail(function(b){a.installing=!1,console.log("There is some issues uninstalling block: ",b)})},updateBlock:function c(){var a=this;this.installing=!0;var b=this.block;jQuery.ajax({type:"POST",url:fgcData.ajaxUrl,data:{action:"fgc_update_block",data:b}}).done(function(b){a.installing=!1,a.updateAvailable=!1,a.currentVersion=a.block.version,window.store.dispatch("getInstalledBlocks"),window.store.commit("setNotification",{text:"".concat(fgcData.strings.block," <b>").concat(a.block.name,"</b> ").concat(fgcData.strigns.block_updated),class:"show success"}),console.log("Block Updated ",b.data)}).fail(function(b){a.installing=!1,console.log("There is some issues updating block: ",b)})},incrementInstalls:function b(a){jQuery.ajax({type:"PUT",url:"https://api.gutenbergcloud.org/blocks/".concat(a)}).done(function(){console.log("Installation counter increased ")}).fail(function(a){console.log("Some errors occured white increasing number of installs: ",a)})},decrementInstalls:function b(a){jQuery.ajax({type:"DELETE",url:"https://api.gutenbergcloud.org/blocks/".concat(a)}).done(function(){console.log("Installation counter decreased ")}).fail(function(a){console.log("Some errors occured white increasing number of installs: ",a)})},openMoreDetails:function a(){this.block.infoUrl&&window.open(this.block.infoUrl,"_blank")}},computed:{currentBrowsState:function a(){return window.store.state.browsState}}}),Vue.component("explorer-filter",{componenets:["filter-drawer"],data:function a(){return{drawerFilterOpen:!1,searchQuery:null,filterLinks:[{name:fgcData.strings.installed,slug:"installed"},{name:fgcData.strings.popular,slug:"popular"},{name:fgcData.strings.latest,slug:"latest"}]}},template:"\n    <div class=\"wp-filter g-blocks-filter hide-if-no-js\">\n      <div class=\"filter-count\">\n        <span class=\"count theme-count\">{{ installedBlocksCount }}</span>\n      </div>\n\n      <ul class=\"filter-links\">\n        <li><a v-for=\"filter in filterLinks\" :key=\"filter.slug\" @click=\"filterLink(filter.slug)\" :class=\"currentFilter(filter.slug)\">{{ filter.name }}</a></li>\n      </ul>\n\n      <button type=\"button\" v-if=\"false\" id=\"searchFilter\" class=\"button drawer-toggle\" :aria-expanded=\"drawerFilterOpen\" @click=\"drawerFilterOpen = !drawerFilterOpen\">{{fgcData.strings.filter}}</button>\n\n      <form class=\"search-form\" @submit.prevent=\"searchForBlock\"><label class=\"screen-reader-text\" for=\"wp-filter-search-input\">{{fgcData.strings.search_for_blocks}}</label><input :placeholder=\"fgcData.strings.search_blocks\" v-model=\"searchQuery\" type=\"search\" id=\"wp-filter-search-input\" class=\"wp-filter-search\"></form>\n\n      <filter-drawer :style=\"{display: drawerFilterOpen ? 'block' : 'none'}\"></filter-drawer>\n    </div>\n  ",mounted:function a(){},methods:{filterLink:function c(a){var b=window.location.search.replace(/\&brows[=a-z]*/,"");history.pushState({state:a},null,"".concat(b,"&brows=").concat(a)),window.store.commit("setBrowsState",a)},currentFilter:function b(a){return window.store.state.browsState==a?"current":""},searchForBlock:function c(){var a=window.location.search.replace(/\&q[=a-z\-]*/,""),b=this.searchQuery.replace(/\s+/g,"-").toLowerCase();history.pushState({state:b},null,"".concat(a,"&q=").concat(b)),window.store.commit("setSearchQuery",b)}},computed:{installedBlocksCount:function a(){return window.store.state.installedBlocks.length}}}),Vue.component("filter-drawer",{template:"\n    <div class=\"filter-drawer\">\n      <div class=\"buttons\">\n        <button type=\"button\" class=\"apply-filters button\">Apply Filters<span></span></button>\n        <button type=\"button\" class=\"clear-filters button\" aria-label=\"Clear all filters\">Clear</button>\n      </div>\n      <fieldset class=\"filter-group\">\n        <legend>Subject</legend>\n        <div class=\"filter-group-feature\">\n          <input type=\"checkbox\" id=\"filter-id-blog\" value=\"blog\">\n          <label for=\"filter-id-blog\">Blog</label>\n          <input type=\"checkbox\" id=\"filter-id-e-commerce\" value=\"e-commerce\">\n          <label for=\"filter-id-e-commerce\">E-Commerce</label>\n          <input type=\"checkbox\" id=\"filter-id-education\" value=\"education\">\n          <label for=\"filter-id-education\">Education</label>\n          <input type=\"checkbox\" id=\"filter-id-entertainment\" value=\"entertainment\">\n          <label for=\"filter-id-entertainment\">News</label>\n        </div>\n      </fieldset>\n      <fieldset class=\"filter-group\">\n        <legend>Features</legend>\n        <div class=\"filter-group-feature\">\n          <input type=\"checkbox\" id=\"filter-id-accessibility-ready\" value=\"accessibility-ready\">\n          <label for=\"filter-id-accessibility-ready\">Custom Colors</label>\n          <input type=\"checkbox\" id=\"filter-id-custom-background\" value=\"custom-background\">\n          <label for=\"filter-id-custom-background\">Editor style</label>\n          <input type=\"checkbox\" id=\"filter-id-custom-colors\" value=\"custom-colors\">\n          <label for=\"filter-id-custom-colors\">Full Width Template</label>\n        </div>  \n      </fieldset>\n      <fieldset class=\"filter-group\">\n        <legend>Layout</legend>\n        <div class=\"filter-group-feature\">\n          <input type=\"checkbox\" id=\"filter-id-grid-layout\" value=\"grid-layout\">\n          <label for=\"filter-id-grid-layout\">Grid-layout</label>\n          <input type=\"checkbox\" id=\"filter-id-one-column\" value=\"one-column\">\n          <label for=\"filter-id-one-column\">One Column</label>\n          <input type=\"checkbox\" id=\"filter-id-two-columns\" value=\"two-columns\">\n          <label for=\"filter-id-two-columns\">Two Column</label>\n          <input type=\"checkbox\" id=\"filter-id-three-columns\" value=\"three-columns\">\n          <label for=\"filter-id-three-columns\">Responsive</label>\n        </div>\n      </fieldset>\n      <div class=\"buttons\">\n        <button type=\"button\" class=\"apply-filters button\">Apply Filters<span></span></button>\n        <button type=\"button\" class=\"clear-filters button\" aria-label=\"Clear all filters\">Clear</button>\n      </div>\n\n    </div>\n  "});var store=new Vuex.Store({state:{notification:{},browsState:null,installedBlocks:fgcData.installedBlocks,searchQuery:null},mutations:{setNotification:function c(a,b){a.notification=b},setBrowsState:function c(a,b){a.browsState=b},setInstalledBlocks:function c(a,b){a.installedBlocks=b},setSearchQuery:function c(a,b){a.searchQuery=b}},actions:{getInstalledBlocks:function b(a){jQuery.ajax({type:"GET",url:fgcData.ajaxUrl,data:{action:"fgc_get_all_blocks"}}).done(function(b){a.commit("setInstalledBlocks",b.data)}).fail(function(a){console.log("There is some issues installing block: ",a)})}}}),app=new Vue({el:"#blockExplorer",data:function a(){return{blocks:[]}},created:function a(){window.store.dispatch("getInstalledBlocks")},mounted:function c(){var a=this.getUrlParams("brows")?this.getUrlParams("brows"):"installed",b=this.getUrlParams("q")?this.getUrlParams("q"):"";this.getBlocks({state:a,q:b}),window.store.commit("setBrowsState",a),window.addEventListener("popstate",this.fetchBlocks)},watch:{currentBrowsFilter:function c(a){var b=this.getUrlParams("q")?this.getUrlParams("q"):"";window.store.dispatch("getInstalledBlocks");this.getBlocks({state:a,q:b})},currentSearchQuery:function c(a){var b=this.getUrlParams("brows")?this.getUrlParams("brows"):"installed";window.store.dispatch("getInstalledBlocks");this.getBlocks({state:b,q:a})},installedBlocks:function d(a,b){var c=this.getUrlParams("brows")?this.getUrlParams("brows"):"installed";a.length!=b.length&&"installed"==c&&(this.blocks=this.blocks.filter(function(b){return a.some(function(a){return a.package_name==b.packageName})}))}},methods:{fetchBlocks:function c(a){var b=null;a.state&&(b=a.state.state),this.getBlocks(b)},getBlocks:function e(a){var b=this,c=[],d="";null!==a.q&&(d="q=".concat(a.q)),jQuery.get("https://api.gutenbergcloud.org/blocks?".concat(d),function(d){d.rows.map(function(d){var e={};e.jsUrl="https://unpkg.com/".concat(d.name,"@").concat(d.version,"/").concat(d.config.js),e.cssUrl="https://unpkg.com/".concat(d.name,"@").concat(d.version,"/").concat(d.config.css),e.editorCss=d.config.editor?"https://unpkg.com/".concat(d.name,"@").concat(d.version,"/").concat(d.config.editor):null,e.infoUrl="https://www.npmjs.com/package/".concat(d.name),e.imageUrl="https://unpkg.com/".concat(d.name,"@").concat(d.version,"/").concat(d.config.screenshot),e.name=d.config.name,e.version=d.version,e.packageName=d.name,null==a.state||"installed"==a.state?b.installedBlocks.length&&b.installedBlocks.filter(function(a){return a.package_name==e.packageName}).length&&c.push(e):c.push(e)})}),this.blocks=c},getUrlParams:function e(a,b){b||(b=window.location.href),a=a.replace(/[\[\]]/g,"\\$&");var c=new RegExp("[?&]"+a+"(=([^&#]*)|&|#|$)"),d=c.exec(b);return d?d[2]?decodeURIComponent(d[2].replace(/\+/g," ")):"":null}},computed:{currentBrowsFilter:function a(){return window.store.state.browsState},currentSearchQuery:function a(){return window.store.state.searchQuery},installedBlocks:function a(){return window.store.state.installedBlocks}}});
     1"use strict";Vue.component("admin-notice",{data:function a(){return{activeTimeout:-1}},template:"\n    <div\n      :class=\"['fgc-notification', notification.class]\"\n      v-cloak>\n      <p v-html=\"notification.text\"></p>\n    </div>\n  ",watch:{isActive:function a(){this.showingTimeout()}},mounted:function a(){this.showingTimeout()},methods:{showingTimeout:function b(){var a=this;window.clearTimeout(this.activeTimeout),this.activeTimeout=window.setTimeout(function(){window.store.state.notification.class="",a.isShowing=!1},4e3)}},computed:{isActive:function a(){return window.store.state.notification.text},notification:function a(){return window.store.state.notification}}}),Vue.component("block-card",{props:["block"],data:function a(){return{installing:!1,alreadyInstaleld:!1,updateAvailable:!1,currentVersion:null}},template:"\n    <div class=\"theme\">\n      <div class=\"theme-screenshot\">\n        <img :src=\"block.imageUrl\" :alt=\"block.name\">\n        <div class=\"spinner installing-block\" v-if=\"installing\"></div>\n      </div>\n\n      <div v-if=\"alreadyInstaleld\" class=\"notice inline notice-success notice-alt\"><p>{{fgcData.strings.installed}}</p></div>\n\n      <div v-if=\"updateAvailable\" class=\"update-message notice inline notice-warning notice-alt\">\n        <p>{{fgcData.strings.update_available}} <button class=\"button-link\" type=\"button\" @click=\"updateBlock\">{{fgcData.strings.update_now}}</button></p>\n      </div>\n\n      <span class=\"more-details\" @click=\"openMoreDetails\">{{fgcData.strings.show_more_details}}</span>\n\n      <div class=\"theme-id-container\">\n        <h3 class=\"theme-name\">{{ block.name }}</h3>\n        <span class=\"block-version\">{{fgcData.strings.version}}: {{ currentVersion }}</span>\n\n        <div class=\"theme-actions\">\n          <button class=\"button button-primary theme-install install-block-btn\"\n              v-if=\"currentBrowsState != 'installed' && !alreadyInstaleld\"\n              @click.prevent=\"installBlock\">\n              {{fgcData.strings.install}}\n          </button>\n          <button class=\"button theme-install install-block-btn\"\n              v-else\n              @click.prevent=\"deleteBlock\">\n              {{fgcData.strings.delete}}\n          </button>\n          <a class=\"button preview install-theme-preview\" :href=\"block.infoUrl\" target=\"_blank\">{{fgcData.strings.more_details}}</a>\n        </div>\n      </div>\n\n    </div>\n  ",mounted:function b(){var a=this;this.currentVersion=this.block.version,!window.store.state.installedBlocks.filter(function(c){return c.package_name==a.block.packageName}).length||(this.alreadyInstaleld="installed"!=this.currentBrowsState,"installed"==this.currentBrowsState&&(this.updateAvailable=!!window.store.state.installedBlocks.filter(function(c){if(c.package_name==a.block.packageName)return c.block_version<a.block.version}).length,this.currentVersion=window.store.state.installedBlocks.filter(function(c){return c.package_name==a.block.packageName})[0].block_version))},methods:{installBlock:function c(){var a=this;this.installing=!0;var b=this.block;console.log(b),jQuery.ajax({type:"POST",url:fgcData.ajaxUrl,data:{action:"fgc_install_block",data:b}}).done(function(b){a.installing=!1,a.alreadyInstaleld=!0,a.incrementInstalls(a.block.packageName),window.store.dispatch("getInstalledBlocks"),window.store.commit("setNotification",{text:"".concat(fgcData.strings.the_block," <b>").concat(a.block.name,"</b> ").concat(fgcData.strings.block_installed),class:"show success"}),console.log("Block installed ",b.data)}).fail(function(b){a.installing=!1,console.log("There is some issues installing block: ",b)})},deleteBlock:function c(){var a=this;this.installing=!0;var b=this.block;jQuery.ajax({type:"POST",url:fgcData.ajaxUrl,data:{action:"fgc_delete_block",data:b}}).done(function(b){a.installing=!1,a.alreadyInstaleld=!1,a.decrementInstalls(a.block.packageName),window.store.dispatch("getInstalledBlocks"),window.store.commit("setNotification",{text:"".concat(fgcData.strings.block," <b>").concat(a.block.name,"</b> ").concat(fgcData.strings.block_uninstalled),class:"show success"}),console.log("Block uninstalled ",b.data)}).fail(function(b){a.installing=!1,console.log("There is some issues uninstalling block: ",b)})},updateBlock:function c(){var a=this;this.installing=!0;var b=this.block;jQuery.ajax({type:"POST",url:fgcData.ajaxUrl,data:{action:"fgc_update_block",data:b}}).done(function(b){a.installing=!1,a.updateAvailable=!1,a.currentVersion=a.block.version,window.store.dispatch("getInstalledBlocks"),window.store.commit("setNotification",{text:"".concat(fgcData.strings.block," <b>").concat(a.block.name,"</b> ").concat(fgcData.strigns.block_updated),class:"show success"}),console.log("Block Updated ",b.data)}).fail(function(b){a.installing=!1,console.log("There is some issues updating block: ",b)})},incrementInstalls:function b(a){jQuery.ajax({type:"PUT",url:"https://api.gutenbergcloud.org/blocks/".concat(a)}).done(function(){console.log("Installation counter increased ")}).fail(function(a){console.log("Some errors occured white increasing number of installs: ",a)})},decrementInstalls:function b(a){jQuery.ajax({type:"DELETE",url:"https://api.gutenbergcloud.org/blocks/".concat(a)}).done(function(){console.log("Installation counter decreased ")}).fail(function(a){console.log("Some errors occured white increasing number of installs: ",a)})},openMoreDetails:function a(){this.block.infoUrl&&window.open(this.block.infoUrl,"_blank")}},computed:{currentBrowsState:function a(){return window.store.state.browsState}}}),Vue.component("explorer-filter",{componenets:["filter-drawer"],data:function a(){return{drawerFilterOpen:!1,searchQuery:null,filterLinks:[{name:fgcData.strings.installed,slug:"installed"},{name:fgcData.strings.popular,slug:"popular"},{name:fgcData.strings.latest,slug:"latest"}]}},template:"\n    <div class=\"wp-filter g-blocks-filter hide-if-no-js\">\n      <div class=\"filter-count\">\n        <span class=\"count theme-count\">{{ installedBlocksCount }}</span>\n      </div>\n\n      <ul class=\"filter-links\">\n        <li><a v-for=\"filter in filterLinks\" :key=\"filter.slug\" @click=\"filterLink(filter.slug)\" :class=\"currentFilter(filter.slug)\">{{ filter.name }}</a></li>\n      </ul>\n\n      <button type=\"button\" v-if=\"false\" id=\"searchFilter\" class=\"button drawer-toggle\" :aria-expanded=\"drawerFilterOpen\" @click=\"drawerFilterOpen = !drawerFilterOpen\">{{fgcData.strings.filter}}</button>\n\n      <form class=\"search-form\" @submit.prevent=\"searchForBlock\"><label class=\"screen-reader-text\" for=\"wp-filter-search-input\">{{fgcData.strings.search_for_blocks}}</label><input :placeholder=\"fgcData.strings.search_blocks\" v-model=\"searchQuery\" type=\"search\" id=\"wp-filter-search-input\" class=\"wp-filter-search\"></form>\n\n      <filter-drawer :style=\"{display: drawerFilterOpen ? 'block' : 'none'}\"></filter-drawer>\n    </div>\n  ",mounted:function a(){},methods:{filterLink:function c(a){var b=window.location.search.replace(/\&brows[=a-z]*/,"");history.pushState({state:a},null,"".concat(b,"&brows=").concat(a)),window.store.commit("setBrowsState",a)},currentFilter:function b(a){return window.store.state.browsState==a?"current":""},searchForBlock:function c(){var a=window.location.search.replace(/\&q[=a-z\-]*/,""),b=this.searchQuery.replace(/\s+/g,"-").toLowerCase();history.pushState({state:b},null,"".concat(a,"&q=").concat(b)),window.store.commit("setSearchQuery",b)}},computed:{installedBlocksCount:function a(){return window.store.state.installedBlocks.length}}}),Vue.component("filter-drawer",{template:"\n    <div class=\"filter-drawer\">\n      <div class=\"buttons\">\n        <button type=\"button\" class=\"apply-filters button\">Apply Filters<span></span></button>\n        <button type=\"button\" class=\"clear-filters button\" aria-label=\"Clear all filters\">Clear</button>\n      </div>\n      <fieldset class=\"filter-group\">\n        <legend>Subject</legend>\n        <div class=\"filter-group-feature\">\n          <input type=\"checkbox\" id=\"filter-id-blog\" value=\"blog\">\n          <label for=\"filter-id-blog\">Blog</label>\n          <input type=\"checkbox\" id=\"filter-id-e-commerce\" value=\"e-commerce\">\n          <label for=\"filter-id-e-commerce\">E-Commerce</label>\n          <input type=\"checkbox\" id=\"filter-id-education\" value=\"education\">\n          <label for=\"filter-id-education\">Education</label>\n          <input type=\"checkbox\" id=\"filter-id-entertainment\" value=\"entertainment\">\n          <label for=\"filter-id-entertainment\">News</label>\n        </div>\n      </fieldset>\n      <fieldset class=\"filter-group\">\n        <legend>Features</legend>\n        <div class=\"filter-group-feature\">\n          <input type=\"checkbox\" id=\"filter-id-accessibility-ready\" value=\"accessibility-ready\">\n          <label for=\"filter-id-accessibility-ready\">Custom Colors</label>\n          <input type=\"checkbox\" id=\"filter-id-custom-background\" value=\"custom-background\">\n          <label for=\"filter-id-custom-background\">Editor style</label>\n          <input type=\"checkbox\" id=\"filter-id-custom-colors\" value=\"custom-colors\">\n          <label for=\"filter-id-custom-colors\">Full Width Template</label>\n        </div>  \n      </fieldset>\n      <fieldset class=\"filter-group\">\n        <legend>Layout</legend>\n        <div class=\"filter-group-feature\">\n          <input type=\"checkbox\" id=\"filter-id-grid-layout\" value=\"grid-layout\">\n          <label for=\"filter-id-grid-layout\">Grid-layout</label>\n          <input type=\"checkbox\" id=\"filter-id-one-column\" value=\"one-column\">\n          <label for=\"filter-id-one-column\">One Column</label>\n          <input type=\"checkbox\" id=\"filter-id-two-columns\" value=\"two-columns\">\n          <label for=\"filter-id-two-columns\">Two Column</label>\n          <input type=\"checkbox\" id=\"filter-id-three-columns\" value=\"three-columns\">\n          <label for=\"filter-id-three-columns\">Responsive</label>\n        </div>\n      </fieldset>\n      <div class=\"buttons\">\n        <button type=\"button\" class=\"apply-filters button\">Apply Filters<span></span></button>\n        <button type=\"button\" class=\"clear-filters button\" aria-label=\"Clear all filters\">Clear</button>\n      </div>\n\n    </div>\n  "});var store=new Vuex.Store({state:{notification:{},browsState:null,installedBlocks:fgcData.installedBlocks,searchQuery:null},mutations:{setNotification:function c(a,b){a.notification=b},setBrowsState:function c(a,b){a.browsState=b},setInstalledBlocks:function c(a,b){a.installedBlocks=b},setSearchQuery:function c(a,b){a.searchQuery=b}},actions:{getInstalledBlocks:function b(a){jQuery.ajax({type:"GET",url:fgcData.ajaxUrl,data:{action:"fgc_get_all_blocks"}}).done(function(b){a.commit("setInstalledBlocks",b.data)}).fail(function(a){console.log("There is some issues installing block: ",a)})}}}),app=new Vue({el:"#blockExplorer",data:function a(){return{blocks:[]}},created:function a(){window.store.dispatch("getInstalledBlocks")},mounted:function c(){var a=this.getUrlParams("brows")?this.getUrlParams("brows"):"installed",b=this.getUrlParams("q")?this.getUrlParams("q"):"";this.getBlocks({state:a,q:b}),window.store.commit("setBrowsState",a),window.addEventListener("popstate",this.fetchBlocks)},watch:{currentBrowsFilter:function c(a){var b=this.getUrlParams("q")?this.getUrlParams("q"):"";window.store.dispatch("getInstalledBlocks");this.getBlocks({state:a,q:b})},currentSearchQuery:function c(a){var b=this.getUrlParams("brows")?this.getUrlParams("brows"):"installed";window.store.dispatch("getInstalledBlocks");this.getBlocks({state:b,q:a})},installedBlocks:function d(a,b){var c=this.getUrlParams("brows")?this.getUrlParams("brows"):"installed";a.length!=b.length&&"installed"==c&&(this.blocks=this.blocks.filter(function(b){return a.some(function(a){return a.package_name==b.packageName})}))}},methods:{fetchBlocks:function c(a){var b=null;a.state&&(b=a.state.state),this.getBlocks(b)},getBlocks:function e(a){var b=this,c=[],d="";null!==a.q&&(d="q=".concat(a.q)),jQuery.get("https://api.gutenbergcloud.org/blocks?".concat(d),function(d){d.rows.map(function(d){var e={};e.jsUrl="https://unpkg.com/".concat(d.name,"@").concat(d.version,"/").concat(d.config.js),e.cssUrl="https://unpkg.com/".concat(d.name,"@").concat(d.version,"/").concat(d.config.css),e.editorCss=d.config.editor?"https://unpkg.com/".concat(d.name,"@").concat(d.version,"/").concat(d.config.editor):null,e.infoUrl="https://www.npmjs.com/package/".concat(d.name),e.imageUrl="https://unpkg.com/".concat(d.name,"@").concat(d.version,"/").concat(d.config.screenshot),e.name=d.config.name,e.version=d.version,e.packageName=d.name,null==a.state||"installed"==a.state?b.installedBlocks.length&&b.installedBlocks.filter(function(a){return a.package_name==e.packageName}).length&&c.push(e):c.push(e)})}),this.blocks=c},getUrlParams:function e(a,b){b||(b=window.location.href),a=a.replace(/[\[\]]/g,"\\$&");var c=new RegExp("[?&]"+a+"(=([^&#]*)|&|#|$)"),d=c.exec(b);return d?d[2]?decodeURIComponent(d[2].replace(/\+/g," ")):"":null}},computed:{currentBrowsFilter:function a(){return window.store.state.browsState},currentSearchQuery:function a(){return window.store.state.searchQuery},installedBlocks:function a(){return window.store.state.installedBlocks}}});
  • cloud-blocks/trunk/assets/source/js/block-component.js

    r1958571 r1961288  
    3232              v-if="currentBrowsState != 'installed' && !alreadyInstaleld"
    3333              @click.prevent="installBlock">
    34               Install
     34              {{fgcData.strings.install}}
    3535          </button>
    3636          <button class="button theme-install install-block-btn"
     
    7777          this.incrementInstalls(this.block.packageName)
    7878          window.store.dispatch('getInstalledBlocks')
    79           window.store.commit('setNotification', { text: `${fgcData.strings.block} <b>${this.block.name}</b> ${fgcData.strings.block_installed}`, class: 'show success' })
     79          window.store.commit('setNotification', { text: `${fgcData.strings.the_block} <b>${this.block.name}</b> ${fgcData.strings.block_installed}`, class: 'show success' })
    8080          console.log('Block installed ', res.data) 
    8181        })
  • cloud-blocks/trunk/cloud-blocks.php

    r1958585 r1961288  
    22/*
    33Plugin Name: Cloud Blocks
    4 Version: 1.0.1
     4Version: 1.0.2
    55Description: Your library of Gutenberg blocks in the cloud
    6 Author: Frontkom - Fouad Yousefi
     6Author: Frontkom
    77Author URI: https://frontkom.no
    88License: GPL2
  • cloud-blocks/trunk/core/Blocks/Blocks.php

    r1958571 r1961288  
    6060      );
    6161      Options::add( $new_block, true );
    62       update_option( 'gutenberg_cloud_install_block', $new_block);
     62
    6363      $response = array(
    6464        'code'      => 200,
     
    218218       * to enable/disable styling per individual block or for all of them.
    219219       */
    220       $disable_style = apply_filters( 'gutenberg_cloud_disable_style', false, $block );
     220      $disable_style = apply_filters( 'cloud_blocks_disable_style', false, $block );
    221221      if ( !$disable_style ) {
    222222        wp_register_style( str_replace( ' ', '-', $block->block_name ) , $block->css_url, array(), $block->block_version);
  • cloud-blocks/trunk/core/Settings/Tools.php

    r1958571 r1961288  
    220220            <div class="inside">
    221221              <form method="post">
    222                 <p><?php _e( 'Here you can export all installed Gutenberg custom blocks from Gutenberg Cloud as a json file and import it elsewhere.', 'cloud-blocks' ); ?></p>
     222                <p><?php _e( 'Export all your installed blocks from Gutenberg Cloud as JSON. Note: The content will not be exported.', 'cloud-blocks' ); ?></p>
    223223                <p class="fgc-submit">
    224224                  <button type="submit" name="action" class="button button-primary" value="download-json"><?php _e( 'Export file', 'cloud-blocks' ); ?></button>
  • cloud-blocks/trunk/core/Settings/Translations.php

    r1958585 r1961288  
    1717    return array(
    1818      'block'                   => __( 'Block', 'cloud-blocks' ),
     19      'the_block'               => __( 'The block', 'cloud-blocks' ),
    1920      'delete'                  => __( 'Delete', 'cloud-blocks' ),
     21      'install'                 => __( 'Install', 'cloud-blocks' ),
    2022      'installed'               => __( 'Installed', 'cloud-blocks' ),
    2123      'popular'                 => __( 'Popular', 'cloud-blocks' ),
  • cloud-blocks/trunk/languages/cloud-blocks-nb_NO.po

    r1958571 r1961288  
    22msgstr ""
    33"Project-Id-Version: Cloud Blocks\n"
    4 "POT-Creation-Date: 2018-10-18 13:12+0200\n"
    5 "PO-Revision-Date: 2018-10-18 13:13+0200\n"
     4"POT-Creation-Date: 2018-10-22 11:20+0200\n"
     5"PO-Revision-Date: 2018-10-22 11:20+0200\n"
    66"Last-Translator: \n"
    77"Language-Team: \n"
     
    2222"X-Poedit-SearchPathExcluded-0: *.js\n"
    2323
    24 #: core/CloudBlocks.php:39
     24#: core/CloudBlocks.php:40
    2525msgid "Gutenberg is not enabled. Please try again after enabling."
    2626msgstr "Gutenberg er ikke aktivert. Skru den på, og prøv igjen!"
     
    6666#: core/Settings/Tools.php:222
    6767msgid ""
    68 "Here you can export all installed Gutenberg custom blocks from Gutenberg "
    69 "Cloud as a json file and import it elsewhere."
     68"Export all your installed blocks from Gutenberg Cloud as JSON. Note: The "
     69"content will not be exported."
    7070msgstr ""
    71 "Her kan du eksportere alle installerte Gutenberg egendefinerte blokker fra "
    72 "Gutenberg Cloud som en JSON-fil og importere den et annet sted."
     71"Klikk for å eksportere aktive blokker fra Gutenberg Cloud som JSON. OBS: "
     72"Innholdet blir ikke eksportert."
    7373
    7474#: core/Settings/Tools.php:224
     
    9797
    9898#: core/Settings/Translations.php:19
     99msgid "The block"
     100msgstr "Blokk"
     101
     102#: core/Settings/Translations.php:20
    99103msgid "Delete"
    100104msgstr "Slett"
    101105
    102 #: core/Settings/Translations.php:20
     106#: core/Settings/Translations.php:21
     107msgid "Install"
     108msgstr "Aktiver"
     109
     110#: core/Settings/Translations.php:22
    103111msgid "Installed"
    104112msgstr "Installert"
    105113
    106 #: core/Settings/Translations.php:21
     114#: core/Settings/Translations.php:23
    107115msgid "Popular"
    108116msgstr "Populær"
    109117
    110 #: core/Settings/Translations.php:22
     118#: core/Settings/Translations.php:24
    111119msgid "Latest"
    112120msgstr "Nyeste"
    113121
    114 #: core/Settings/Translations.php:23
     122#: core/Settings/Translations.php:25
    115123msgid "Most used"
    116124msgstr "Mest brukt"
    117125
    118 #: core/Settings/Translations.php:24
     126#: core/Settings/Translations.php:26
    119127msgid "Search for blocks"
    120128msgstr "Søk etter blokker"
    121129
    122 #: core/Settings/Translations.php:25
     130#: core/Settings/Translations.php:27
    123131msgid "Search blocks..."
    124132msgstr "Søk blokker..."
    125133
    126 #: core/Settings/Translations.php:26
     134#: core/Settings/Translations.php:28
    127135msgid "Filter"
    128136msgstr "Filter"
    129137
    130 #: core/Settings/Translations.php:27
     138#: core/Settings/Translations.php:29
    131139msgid "Update now"
    132140msgstr "Uppdater nå"
    133141
    134 #: core/Settings/Translations.php:28
     142#: core/Settings/Translations.php:30
    135143msgid "Show more details"
    136144msgstr "Vis flere detaljer"
    137145
    138 #: core/Settings/Translations.php:29
     146#: core/Settings/Translations.php:31
    139147msgid "More details"
    140148msgstr "Flere detaljer"
    141149
    142 #: core/Settings/Translations.php:30
     150#: core/Settings/Translations.php:32
    143151msgid "have been installed successfully."
    144152msgstr "er installert."
    145153
    146 #: core/Settings/Translations.php:31
     154#: core/Settings/Translations.php:33
    147155msgid "have been uninstalled successfully."
    148156msgstr "er avinstallert.."
    149157
    150 #: core/Settings/Translations.php:32
     158#: core/Settings/Translations.php:34
    151159msgid "have been updated successfully."
    152160msgstr "er oppdatert."
    153161
    154 #: core/Settings/Translations.php:33
     162#: core/Settings/Translations.php:35
    155163msgid "New version available."
    156164msgstr "Ny versjon tilgjengelig."
    157165
    158 #: core/Settings/Translations.php:34
     166#: core/Settings/Translations.php:36
    159167msgid "Version"
    160168msgstr "Versjon"
     
    173181
    174182#. Author of the plugin/theme
    175 msgid "Frontkom - Fouad Yousefi"
    176 msgstr "Frontkom - Foad Yousefi"
     183msgid "Frontkom"
     184msgstr ""
    177185
    178186#. Author URI of the plugin/theme
     
    180188msgstr "https://frontkom.no"
    181189
     190#~ msgid "Frontkom - Fouad Yousefi"
     191#~ msgstr "Frontkom - Foad Yousefi"
     192
    182193#~ msgid "Gutenberg Cloud"
    183194#~ msgstr "Gutenberg Cloud"
  • cloud-blocks/trunk/languages/cloud-blocks-pt_PT.po

    r1958571 r1961288  
    22msgstr ""
    33"Project-Id-Version: Cloud Blocks\n"
    4 "POT-Creation-Date: 2018-10-18 13:25+0200\n"
    5 "PO-Revision-Date: 2018-10-18 13:56+0200\n"
     4"POT-Creation-Date: 2018-10-22 11:20+0200\n"
     5"PO-Revision-Date: 2018-10-22 11:20+0200\n"
    66"Last-Translator: \n"
    77"Language-Team: \n"
     
    2222"X-Poedit-SearchPathExcluded-0: *.js\n"
    2323
    24 #: core/CloudBlocks.php:39
     24#: core/CloudBlocks.php:40
    2525msgid "Gutenberg is not enabled. Please try again after enabling."
    2626msgstr ""
     
    6767#: core/Settings/Tools.php:222
    6868msgid ""
    69 "Here you can export all installed Gutenberg custom blocks from Gutenberg "
    70 "Cloud as a json file and import it elsewhere."
     69"Export all your installed blocks from Gutenberg Cloud as JSON. Note: The "
     70"content will not be exported."
    7171msgstr ""
    72 "Aqui pode exportar todos os blocos personalizados instalados na Gutenberg "
    73 "Cloud num ficheiro JSON e importá-lo em outro lugar."
     72"Exportar da Gutenberg Could todos os blocos instalados para um ficheiro "
     73"JSON. Nota: o conteúdo não será exportado."
    7474
    7575#: core/Settings/Tools.php:224
     
    9898
    9999#: core/Settings/Translations.php:19
     100msgid "The block"
     101msgstr "O bloco"
     102
     103#: core/Settings/Translations.php:20
    100104msgid "Delete"
    101105msgstr "Excluir"
    102106
    103 #: core/Settings/Translations.php:20
     107#: core/Settings/Translations.php:21
     108msgid "Install"
     109msgstr "Instalar"
     110
     111#: core/Settings/Translations.php:22
    104112msgid "Installed"
    105113msgstr "Instalado"
    106114
    107 #: core/Settings/Translations.php:21
     115#: core/Settings/Translations.php:23
    108116msgid "Popular"
    109117msgstr "Popular"
    110118
    111 #: core/Settings/Translations.php:22
     119#: core/Settings/Translations.php:24
    112120msgid "Latest"
    113121msgstr "Mais recentes"
    114122
    115 #: core/Settings/Translations.php:23
     123#: core/Settings/Translations.php:25
    116124msgid "Most used"
    117125msgstr "Mais utilizados"
    118126
    119 #: core/Settings/Translations.php:24
     127#: core/Settings/Translations.php:26
    120128msgid "Search for blocks"
    121129msgstr "Procurar blocos"
    122130
    123 #: core/Settings/Translations.php:25
     131#: core/Settings/Translations.php:27
    124132msgid "Search blocks..."
    125133msgstr "Pesquisar blocos…"
    126134
    127 #: core/Settings/Translations.php:26
     135#: core/Settings/Translations.php:28
    128136msgid "Filter"
    129137msgstr "Filtro"
    130138
    131 #: core/Settings/Translations.php:27
     139#: core/Settings/Translations.php:29
    132140msgid "Update now"
    133141msgstr "Atualizar agora"
    134142
    135 #: core/Settings/Translations.php:28
     143#: core/Settings/Translations.php:30
    136144msgid "Show more details"
    137145msgstr "Mostrar mais detalhes"
    138146
    139 #: core/Settings/Translations.php:29
     147#: core/Settings/Translations.php:31
    140148msgid "More details"
    141149msgstr "Mais detalhes"
    142150
    143 #: core/Settings/Translations.php:30
     151#: core/Settings/Translations.php:32
    144152msgid "have been installed successfully."
    145 msgstr "foram instalados com sucesso."
    146 
    147 #: core/Settings/Translations.php:31
    148 msgid "have been uninstalled successfully."
    149 msgstr "foram desinstalados com sucesso."
    150 
    151 #: core/Settings/Translations.php:32
    152 msgid "have been updated successfully."
    153 msgstr "foram atualizados com sucesso."
     153msgstr "foi instalado com sucesso."
    154154
    155155#: core/Settings/Translations.php:33
     156msgid "have been uninstalled successfully."
     157msgstr "foi desinstalado com sucesso."
     158
     159#: core/Settings/Translations.php:34
     160msgid "have been updated successfully."
     161msgstr "foi atualizado com sucesso."
     162
     163#: core/Settings/Translations.php:35
    156164msgid "New version available."
    157165msgstr "Nova versão disponível."
    158166
    159 #: core/Settings/Translations.php:34
     167#: core/Settings/Translations.php:36
    160168msgid "Version"
    161169msgstr "Versão"
     
    174182
    175183#. Author of the plugin/theme
    176 msgid "Frontkom - Fouad Yousefi"
    177 msgstr "Frontkom-Foad Yousefi"
     184msgid "Frontkom"
     185msgstr ""
    178186
    179187#. Author URI of the plugin/theme
    180188msgid "https://frontkom.no"
    181189msgstr "https://frontkom.no"
     190
     191#~ msgid "Frontkom - Fouad Yousefi"
     192#~ msgstr "Frontkom-Foad Yousefi"
  • cloud-blocks/trunk/readme.txt

    r1958585 r1961288  
    22Contributors: frontkom, foadyousefi
    33Author URI: https://frontkom.no
    4 Tags: gutenberg, pagebuilder
     4Tags: gutenberg, pagebuilder, blocks, gutenberg blocks, page builder
    55Requires at least: 4.9.8
    66Tested up to: 4.9.8
    77Requires PHP: 5
    8 Stable tag: 1.0.1
    9 License: GNU GPL
    10 License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     8Stable tag: 1.0.2
     9License: GPLv3
     10License URI: https://www.gnu.org/licenses/gpl-3.0.html
    1111
    1212Your online library of Gutenberg blocks! Browse and discover new blocks, and install with a click.
    1313
    1414== Description ==
    15 No block collection plugins needed:
    16 This is the only plugin you need to browse and install new blocks.
     15**Gutenberg Cloud: Your online library of blocks!** Cloud Blocks is the only plugin you need to browse and install new blocks:
    1716
    18 Reuse between platforms
    19 Gutenberg blocks can be used in both Wordpress and Drupal
     17- Discover and install custom blocks with a click
     18- Install only the blocks you need – no huge plugin collections needed
     19- Reuse blocks between WordPress and Drupal
     20- Serve the blocks from a CDN
    2021
    21 Code once, use everywhere: As Gutenberg blocks are CMS agnostic, we want to provide an ecosystem all systems can connect to.
     22## Why use Gutenberg Cloud?
     23Installing an actual plugin for each block or block collection easily leads to managing lots of code that you don’t really need. It’s like having one app for each website you visit, instead of just installing a web browser. With the block manager, you have a growing library at your fingertips, without the bloat. It’s like an app store for blocks – except it’s free.
    2224
    23 Why Gutenberg Cloud? Installing an actual plugin/module for each block or block collection easily leads to managing lots of code that you don’t really need. It’s like having one app for each website you visit, instead of just installing a browser. With the block manager, you have a growing library at your fingertips, without the bloat.
     25## Get started
     26Install the plugin, and look for the cloud icon in the main menu. Browse around and activate a few blocks. Voila – these are now available to you in the Gutenberg editor!
     27
     28## How it works under the hood
     29Gutenberg Cloud is a service that fetches Open Source Gutenberg blocks hosted on NPM. The assets from these are served from CloudFlare using unpkg.com. The Cloud Blocks plugin provides an interface in WordPress for Gutenberg Cloud.
     30
     31Code once, use everywhere: Since the blocks are JS/CSS only, they are CMS agnostic. This means you can develop a block for a Drupal site, and reuse it later on a WordPress blog.
     32
    2433
    2534== Installation ==
    2635Install it just like any other plugin. It just works!
    2736
     37== Screenshots ==
     38
     391. Discover and install blocks
     40
    2841== Frequently Asked Questions ==
    29 How do I add my own custom blocks to Gutenberg Cloud?
    3042
    31 Gutenberg Cloud blocks are really just normal Gutenberg blocks. They have a screenshot and some other meta, but follows the official standards. See https://gutenbergcloud.org/ for more information.
     43**How do I migrate a block collection plugin to Gutenberg Cloud?**
     44
     45This simply means removing some PHP, adding some meta data and publishing on NPM. [Follow these simple steps](https://github.com/front/cloud-blocks/blob/master/docs/migrate-block.md).
     46
     47**How do I create a custom block for Gutenberg Cloud?**
     48
     49Gutenberg Cloud blocks are really just normal Gutenberg blocks, without the PHP. [Follow these steps to do it](https://github.com/front/cloud-blocks/blob/master/docs/create-block.md)!
     50
     51**How do I disable CSS for a single block?**
     52
     53This is useful for letting your theme control your block styles. There’s a hook for this, [documented here](https://github.com/front/cloud-blocks/blob/master/docs/hooks.md).
     54
     55**Why is the plugin called Cloud Blocks?**
     56
     57We wanted to name it Gutenberg Cloud, but since it’s not possible to name a plugin starting with the name of another plugin (i.e. Gutenberg), we ended up calling it Cloud Blocks. Makes sense though, doesn’t it?
     58
     59**Are the blocks really served from "the cloud"?**
     60
     61Indeed, they are! The source code for each block is on NPM, but the JS/CSS is served by a CDN. No local downloads!
     62
     63**Can I add private custom blocks?**
     64
     65Sure! Just add your custom blocks into **wp-content/cloud-blocks/** folder.
    3266
    3367== Changelog ==
    3468
     69= 1.0.2 =
     70* Change: Some translation fixes
     71* Change: Better documentation and screenshot
    3572
    3673= 1.0.1 =
Note: See TracChangeset for help on using the changeset viewer.