Skip to content

Commit

Permalink
Add readmes and screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
dkotter committed Mar 12, 2024
1 parent d397f7e commit 5c2b2dd
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 1 deletion.
Binary file added .wordpress-org/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Figma Block

> Easily display Figma files using an Embed block.
[![Support Level](https://img.shields.io/badge/support-beta-blueviolet.svg)](#support-level) ![WordPress tested up to version](https://img.shields.io/badge/WordPress-v6.5%20tested-success.svg) [![GPLv2 License](https://img.shields.io/github/license/10up/block-catalog.svg)](https://github.com/10up/block-catalog/blob/develop/LICENSE.md)

## Table of Contents

* [Features](#features)
* [Requirements](#requirements)
* [Installation](#installation)
* [Getting Started](#getting-started)
* [Support](#support-level)
* [Changelog](#changelog)
* [Contributing](#contributing)

## Features

* Embed a Figma file using a block in the WordPress editor.
* Paste a Figma URL on a new line in the Block Editor to automatically convert it to a Figma Embed block.

## Requirements

* PHP 7.4+
* [WordPress](http://wordpress.org) 6.4+

## Installation

* You can install the plugin manually by [downloading a zip file](https://github.com/10up/figma-block/releases/latest) from GitHub.
* You then need to upload the zip file to your WordPress site by going to *WP-Admin > Plugins > Add New > Upload Plugin* and selecting the zip file from your computer.

## Getting Started

Once the plugin is installed and activated, you should see a new Figma Embed block. Insert this block into your content and enter the URL of the Figma file you want to embed.

Assuming it's a valid URL, the block will automatically fetch the Figma file and display it in the editor. Once saved, this will also display on the front-end.

![Screenshot of Figma Embed block](.wordpress-org/screenshot-1.png)

## Support Level

**Beta:** This project is quite new and we're not sure what our ongoing support level for this will be. Bug reports, feature requests, questions, and pull requests are welcome. If you like this project please let us know, but be cautious using this in a Production environment!

## Changelog

A complete listing of all notable changes to Block Catalog are documented in [CHANGELOG.md](CHANGELOG.md).

## Contributing

Please read [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) for details on our code of conduct, [CONTRIBUTING.md](CONTRIBUTING.md) for details on the process for submitting pull requests to us, and [CREDITS.md](CREDITS.md) for a listing of maintainers, contributors, and libraries for Block Catalog.

## Like what you see?

[![Work with us at 10up](https://10up.com/uploads/2016/10/10up-Github-Banner.png)](http://10up.com/contact/)
2 changes: 1 addition & 1 deletion includes/FigmaBlock/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Block {
public function setup() {
wp_embed_register_handler(
'figma',
'#https:\/\/[\w\.-]+\.?figma.com\/([\w-]+)\/([0-9a-zA-Z]{22,128})(?:\/.*)?#i',
'#https:\/\/[\w.-]+\.?figma.com\/([\w-]+)\/([0-9a-zA-Z]{22,128})(?:\/.*)?#i',
[ $this, 'embed_handler' ]
);

Expand Down
31 changes: 31 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
=== Block Catalog ===
Contributors: 10up, dkotter
Tags: gutenberg, figma, embed, blocks, custom blocks
Requires at least: 6.4
Tested up to: 6.5
Requires PHP: 7.4
Stable tag: 0.1.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Easily display Figma files using an Embed block.

== Description ==

* Embed a Figma file using a block in the WordPress editor.
* Paste a Figma URL on a new line in the Block Editor to automatically convert it to a Figma Embed block.

== Screenshots ==

1. The Figma Embed block.
2. The rendered Figma Embed block in the admin.
3. The block settings prior to rendering.
4. Front-end rendering of the block.

== Getting Started ==

Once the plugin is installed and activated, you should see a new Figma Embed block. Insert this block into your content and enter the URL of the Figma file you want to embed.

Assuming it's a valid URL, the block will automatically fetch the Figma file and display it in the editor. Once saved, this will also display on the front-end.

== Changelog ==

0 comments on commit 5c2b2dd

Please sign in to comment.