-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
2,056 additions
and
935 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,9 @@ cd server | |
npm install | ||
cd ../ux | ||
npm install | ||
cd ../blocks | ||
npm install | ||
npm run build | ||
cd .. | ||
|
||
echo "Ready!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dist | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { LitElement, html, css } from 'lit' | ||
import folderByPath from './folderByPath.graphql' | ||
|
||
/** | ||
* An example element. | ||
* | ||
* @fires count-changed - Indicates when the count changes | ||
* @slot - This element has a slot | ||
* @csspart button - The button | ||
*/ | ||
export class BlockIndexElement extends LitElement { | ||
static get styles() { | ||
return css` | ||
:host { | ||
display: block; | ||
border: solid 1px gray; | ||
padding: 16px; | ||
max-width: 800px; | ||
} | ||
`; | ||
} | ||
|
||
static get properties() { | ||
return { | ||
/** | ||
* The name to say "Hello" to. | ||
* @type {string} | ||
*/ | ||
name: {type: String}, | ||
|
||
/** | ||
* The number of times the button has been clicked. | ||
* @type {number} | ||
*/ | ||
count: {type: Number}, | ||
}; | ||
} | ||
|
||
constructor() { | ||
super(); | ||
this.name = 'World'; | ||
this.count = 0; | ||
} | ||
|
||
render() { | ||
return html` | ||
<h1>${this.sayHello(this.name)}!</h1> | ||
<button @click=${this._onClick} part="button"> | ||
Click Count: ${this.count} | ||
</button> | ||
<slot></slot> | ||
`; | ||
} | ||
|
||
_onClick() { | ||
this.count++; | ||
this.dispatchEvent(new CustomEvent('count-changed')); | ||
} | ||
|
||
/** | ||
* Formats a greeting | ||
* @param name {string} The name to say "Hello" to | ||
* @returns {string} A greeting directed at `name` | ||
*/ | ||
sayHello(name) { | ||
return `Hello, ${name}`; | ||
} | ||
} | ||
|
||
window.customElements.define('block-index', BlockIndexElement); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
query folderByPath($siteId: UUID!, $locale: String!, $path: String!) { | ||
folderByPath(siteId: $siteId, locale: $locale, path: $path) { | ||
id | ||
title | ||
} | ||
} |
Oops, something went wrong.