This file contains hidden or 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
| function aUser() { | |
| let user = { | |
| id: 1, | |
| name: "Default", | |
| lastname: "irrelevant", | |
| email: "irrelevant", | |
| phone: "irrelevant", | |
| address: "irrelevant" | |
| } | |
| return { |
This file contains hidden or 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
| function $(selector) { | |
| const element = typeof selector === 'string' | |
| ? document.querySelector(selector) | |
| : selector | |
| return { | |
| addClass(className) { | |
| element.classList.add(className) | |
| return this |
This file contains hidden or 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
| .grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); | |
| gap: 20px; | |
| width: 90%; | |
| margin: 0 auto; | |
| max-width: 680px; | |
| } |
This file contains hidden or 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
| .grid { | |
| display: grid; | |
| gap: 20px; | |
| width: 90%; | |
| margin: 0 auto; | |
| } | |
| @media(min-width: 1100px) { | |
| .grid { | |
| grid-template-columns: 1fr 1fr; |
This file contains hidden or 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
| /* Sin soporte, mantenemos ouline */ | |
| :focus{ | |
| outline: 5px solid green; | |
| } | |
| /* Con suporte, eliminamos ouline cuando no sea estrictamente necesario */ | |
| :focus:not(:focus-visible) { | |
| outline: 0; | |
| } |
This file contains hidden or 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
| /.wordpress-org | |
| /.git | |
| /.github | |
| /node_modules | |
| .distignore | |
| .gitignore |
This file contains hidden or 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
| name: Deploy to WordPress.org | |
| on: | |
| push: | |
| tags: | |
| - "*" | |
| jobs: | |
| tag: | |
| name: New tag | |
| runs-on: ubuntu-latest | |
| steps: |
This file contains hidden or 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
| <ArticlesList type={ selected } /> |
This file contains hidden or 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
| <?php | |
| //... | |
| register_block_type( 'block-list-post-type/block-list-post-type', array( | |
| 'editor_script' => 'block_list_post_type_scripts', | |
| 'render_callback' => 'block_list_post_type_render', | |
| 'attributes' => [ | |
| // ... | |
| ] | |
| ) ); | |
| } |
This file contains hidden or 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 { Spinner } from '@wordpress/components'; | |
| import { withSelect } from '@wordpress/data'; | |
| const ArticlesList = ({ articles }) => { | |
| if ( ! articles ) { | |
| return ( | |
| <p style={{textAlign: "center", padding: "1rem"}}> | |
| <Spinner /> | |
| </p> | |
| ); |
NewerOlder