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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "erc721a/contracts/ERC721A.sol"; | |
import "erc721a/contracts/extensions/ERC721AQueryable.sol"; | |
contract Token is ERC721A, ERC721AQueryable { | |
enum TokenTypes { | |
None, | |
Fist, |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "../utils/Context.sol"; | |
/** | |
* @dev Contract module which provides a basic access control mechanism, where | |
* there is an account (an owner) that can be granted exclusive access to | |
* specific functions. |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "../utils/Context.sol"; | |
/** | |
* @dev Contract module which provides a basic access control mechanism, where | |
* there is an account (an owner) that can be granted exclusive access to | |
* specific functions. |
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
<script> | |
export default { | |
async asyncData ({ store, route }) { | |
// ... | |
// Prefetch CMS data on the server | |
await store.dispatch('cmsBlock/list', { | |
filterValues: ['home_banner'] // Array of CMS blocks identifiers on the page | |
}) | |
} | |
} |
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
<template> | |
<section v-if="!singleBanner" class="offers container my30 px15 cl-black"> | |
<div class="row"> | |
<left-banner :identifier="'home_banner'" /> | |
<!-- ... --> | |
</div> | |
</section> | |
</template> |
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
import { parse } from 'node-html-parser'; | |
const root = parse('<ul id="list"><li>Hello World</li></ul>'); | |
console.log(root.firstChild.structure); | |
// ul#list | |
// li | |
// #text | |
console.log(root.querySelector('#list')); |
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
<template> | |
<section v-if="!singleBanner" class="offers container my30 px15 cl-black"> | |
<div class="row"> | |
<cms-block :identifier="'home_banner'" /> | |
<!-- ... --> | |
</div> | |
</section> | |
</template> |
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
const express = require('express'); | |
const { middleware } = require('@magento/upward-js'); | |
async function serve() { | |
const app = express(); | |
const port = 8000; | |
app.get('/', (req, res) => res.send('Hello from Express!')); | |
const upwardMiddleware = await middleware(`${__dirname}/upward.yml`); |
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
query($pokemonName: String) { | |
pokemon(name: $pokemonName) { | |
name | |
image | |
types | |
weight { | |
minimum | |
maximum | |
} | |
height { |
NewerOlder