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
| @mixin sizedBox ($width: 10px, $height: $width) { | |
| width: $width; | |
| height: $height; | |
| } | |
| @mixin clampLines ($lines: 1) { | |
| text-overflow: ellipsis; | |
| display: -webkit-box; | |
| -webkit-line-clamp: $lines; |
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
| const SECONDS_PER_HOUR = 3600; | |
| const SECONDS_PER_MINUTE = 60; | |
| function toFloor (value) { | |
| return Math.floor(value); | |
| } | |
| function secondsToHours (secs) { | |
| const hours = toFloor(secs / SECONDS_PER_HOUR); |
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
| const transactions = [ | |
| { | |
| date: '2023-03-20', | |
| description: 'Restaurante X-Burger', | |
| amount: -30 | |
| }, | |
| { | |
| date: '2023-03-20', | |
| description: 'Cinema', |
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
| // Faça o calculo do total destes produtos que estão no carrinho | |
| const cart = [ | |
| { | |
| name: 'Pizza de calebreza', | |
| amount: 10, | |
| qty: 2, | |
| addons: [ | |
| { | |
| 'name': 'Extra calabreza', |
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
| /** | |
| * @description mask phones to pt-BR format | |
| * @param {string} selector | |
| * @return {undefined} | |
| */ | |
| function phoneMask (selector) { | |
| const _targetElement = [...document.querySelectorAll(selector)]; | |
| const maskNumber = (event) => { | |
| let maskedNumber = ''; |
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 | |
| add_filter('wpcf7_form_elements', function( $content ) { | |
| $dom = new DOMDocument(); | |
| $dom->preserveWhiteSpace = false; | |
| $dom->loadHTML(mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8'), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); | |
| $xpath = new DomXPath($dom); | |
| $spans = $xpath->query("//span[contains(@class, 'wpcf7-form-control-wrap')]" ); |
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
| {% for image in post.meta('field_name') %} | |
| <img src="{{ image.imagem.url }}" alt="" /> | |
| {% endfor %} |
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 | |
| function exibir_pesquisas () { | |
| $args = array( | |
| 'post_type' => 'desenvolvimento', 'posts_per_page' => -1 | |
| ); | |
| $wp_query = new WP_Query($args); | |
| if ($wp_query->have_posts()) { |
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 () { | |
| const formattedList = new Intl.ListFormat('pt-BR').format(["Banana", "Maça", "Laranja"]); | |
| console.log(formattedList); | |
| })(); |
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
| .element { | |
| scrollbar-width: none; | |
| &::-webkit-scrollbar { | |
| display: none !important; | |
| } | |
| } |