Skip to content

Commit

Permalink
Added Gutenberg Block Component
Browse files Browse the repository at this point in the history
  • Loading branch information
tevendale committed Sep 27, 2022
1 parent 636a78f commit 86ca52a
Show file tree
Hide file tree
Showing 34 changed files with 41,681 additions and 168 deletions.
Binary file added assets/map-placeholder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
85 changes: 85 additions & 0 deletions build/block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "yft/showfitfile",
"version": "1.0.0",
"title": "Show Fit File",
"category": "common",
"icon": "location-alt",
"description": "Display Garmin data on a map.",
"supports": {
"html": false
},
"textdomain": "yft",
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"attributes": {
"mediaUrl": {
"type": "string",
"default": "http://placehold.it/500"
},
"fileName": {
"type": "string",
"default": ""
},
"interactive": {
"type": "boolean",
"default": "{true}"
},
"showSummary": {
"type": "boolean",
"default": "{true}"
},
"units": {
"type": "string",
"default": "metric"
},
"lineColour": {
"type": "string",
"default": "red"
},
"distanceMetres": {
"type": "integer",
"default": 0
},
"distanceString": {
"type": "string",
"default": "--"
},
"duration": {
"type": "string",
"default": "--:--:--"
},
"time": {
"type": "string",
"default": "--:--:--"
},
"startPos": {
"type": "array",
"default": [
51.505,
-0.09
]
},
"endPos": {
"type": "array",
"default": [
51.515,
-0.1
]
},
"showStartMarker": {
"type": "boolean",
"default": "{true}"
},
"showEndMarker": {
"type": "boolean",
"default": "{true}"
},
"route": {
"type": "array",
"default": []
}
}
}
Binary file added build/images/map-placeholder.a8a181c2.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 build/images/marker-icon-2x-blue.69c430ad.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 build/images/marker-icon-2x-green.ee495251.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 build/images/marker-shadow.a0c6cc14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions build/index.asset.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php return array('dependencies' => array('react', 'react-dom', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-notices'), 'version' => 'a299b53fc370a68317be');
1 change: 1 addition & 0 deletions build/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.wp-block-create-block-showfitfile{border:1px dotted red}
1 change: 1 addition & 0 deletions build/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build/style-index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.wp-block-create-block-showfitfile{background-color:#21759b;color:#fff;padding:2px}
Loading

0 comments on commit 86ca52a

Please sign in to comment.