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
<div class="grid"> | |
<div class="grid-item"></div> | |
<div class="grid-item"></div> | |
<div class="grid-item"></div> | |
<div class="grid-item"></div> | |
<div class="grid-item"></div> | |
<div class="grid-item"></div> | |
<div class="grid-item"></div> | |
<div class="grid-item"></div> |
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
// https://blog.stackademic.com/how-to-optimize-complex-conditionals-in-javascript-0fcaf0add82a | |
const onButtonClick = (status) => { | |
if (status == 1) { | |
jumpTo('Index Page'); | |
} else if (status == 2 || status == 3) { | |
jumpTo('Failure Page'); | |
} else if (status == 4) { | |
jumpTo('Success 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
_ |
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
// 1 - composable | |
import { ref, computed, watchEffect } from 'vue'; | |
import useSomeOtherComposable from './useSomeOtherComposable'; | |
export default function useMyComposable() { | |
const { asyncValue1, asyncValue2 } = useSomeOtherComposable(); | |
const resolved = ref(false); | |
// Hodnoty, které vrátíme, až budou splněny podmínky |
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
<?php | |
// 1 config object | |
class FooConfig { | |
public int $param1 = 0; | |
public int $param2 = 0; | |
public string $param3 = ''; | |
public string $param4 = ''; | |
public bool $param5 = false; | |
public ?int $param6 = null; |
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
<style> | |
grid { | |
border: 2px solid maroon; | |
width: 100%; | |
display: flex; | |
overflow: auto visible; | |
scrollbar-width: none; | |
} | |
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
document.addEventListener('DOMContentLoaded', () => { | |
let lazyImages = document.querySelectorAll('.lazyload'); | |
let observer = new IntersectionObserver((entries) => { | |
entries.forEach(entry => { | |
if (entry.isIntersecting) { | |
let img = entry.target; | |
img.src = img.dataset.src; | |
observer.unobserve(img); | |
} | |
}); |
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
// Copied from https://javascript.plainenglish.io/structuredclone-the-easiest-way-to-deep-clone-objects-in-javascript-c503b536266b | |
const testData = { | |
number: 123, | |
string: "test", | |
undefined: undefined, | |
null: null, | |
boolean: true, | |
object: { a: 1, b: { c: 2 } }, | |
array: [1, 2, { d: 3 }], |
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
<aw-alert v-for="flash in {$control->getVueDataVar('flashes')}" :type="flash.type">{_}Je to správně? Zkuste číslo opsat ještě jednou.{/_}</aw-alert> | |
<template v-for="image in $presenter.voucher.photos" :key="image.id"> | |
<aw-img src="/assets/temp/enjoyment-1.jpg" class="rounded-ambi" :image="image" size="1230x870x8" /> | |
</template> | |
<div class="Filters justify-center"> | |
<ambi-filter-tag | |
v-for="(filter, index) in $controls['filterTagsList'].filters" |
NewerOlder