// composables/useMediaObjects.js
export function useMediaObjects() {
const transformMediaObjects = (productGallery, productVideos) => {
const finalObjects = []
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 | |
// Pro hesla uživatelů | |
$hashedPassword = password_hash($userPassword, PASSWORD_DEFAULT); | |
if (password_verify($inputPassword, $hashedPassword)) { | |
// přihlášen | |
} | |
// Pro bearer tokeny | |
$token = hash_hmac('sha256', $windowStart, 'secret'); |
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
// https://learnvue.co/articles/v-once-v-memo | |
<script setup> | |
import { ref } from 'vue' | |
const subscribers = ref(4000) | |
const views = ref(10000) | |
const likes = ref(3000) | |
</script> | |
<template> |
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
// https://medium.com/@genildocs/mastering-object-oriented-programming-in-javascript-from-zero-to-hero-c718c3182eba | |
// Mixin for logging functionality | |
const LoggerMixin = { | |
log(message) { | |
console.log(`[${this.constructor.name}] ${message}`); | |
}, | |
logError(error) { | |
console.error(`[${this.constructor.name}] ERROR: ${error}`); |
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
<template> | |
<TheBase :state="state" /> | |
</template> | |
<script setup> | |
import { ref } from 'vue' | |
import TheBase from './TheBase.vue' | |
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
// Pattern 1 — Bind Helper | |
export function S(selector) { | |
const nodes = document.querySelectorAll(selector); | |
nodes.forEach(bindAll); // Bind helpers to node(s) | |
return nodes.length > 1 ? nodes : nodes[0]; // native node(s) returned | |
} | |
export function C(tag) { |
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
_ |
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
.modal { | |
/* Hidden state */ | |
display: none; | |
opacity: 1; | |
} | |
.modal.open { | |
display: block; | |
/* Regular transition works now */ | |
transition: opacity 300ms; |
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 observer = new IntersectionObserver(entries => { | |
entries.forEach(entry => { | |
if (entry.isIntersecting) { | |
entry.target.classList.add('fade-in'); | |
} | |
}); | |
}); | |
document.querySelectorAll('.section').forEach(section => { | |
observer.observe(section); |
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
// https://play.vuejs.org/#eNqdVE2P2jAQ/SsjXwCJBlXtic2itohDK7W72u7Rl5BMwItjW7bDUiH+e8d2krJbRNXlgOyZN1/Pb3Jkn43J9i2yOctdaYXx4NC3ZsGVaIy2Ho5gsZ5C6/ARGyMLjw9YwwlqqxsYUehogH7XVSE7RzaLt5CbAKVWzkMTLCH69lW68Si6RpMbrvJZ6oM6oIvvQHS7LywqD/nawoyut3//Bl++br3XCj6VUpS7W876ypk2qMYTzhZ3dEgN57OEvhpXSu0wBi7D6UJkqNz9b7suEh9EX5+Js+SYDWOxKfOO2KnFJntyWtE7HLkC4KzUjRES7Z3xgtjjbA7RE3yFlPr5W7R52+K0t5dbLHcX7E/uEGyc3Vt0aPfI2eDzhd2gT+7Vzx94oPPgpK5bSegrzgd0WrahxwT70qqK2j7DxW6/RokItXl0q4NH5fqhQqMBeYp4zkgwyyuj/2n3Q/YxxnF1IhYHtQUln6kGYLkVsoJxBEzeJp//VM0/xVKJPezfua1+JrRwIStJo5SFc2SI8KVWxBINukgq6u75jGJfSijuyZXdfbWr/TKmsrSKBBnXhXQ44apuVRk4hzRxoj0hs30hWyR8eDAg0s/Q3cAX4TF1wnNVYS0Urg4m4I+xyjRFw4nKv9x953/J9ITZOSW9FkxRVaSnOby32NzAuih3G6tJfXMwsm3oUxJQDelFqA7U6YXKxNTs9BvEAbCg | |
// Parent | |
<script setup> | |
import { ref, useTemplateRef } from 'vue' | |
import Modal from './Modal.vue' | |
const modalRef = useTemplateRef('modal'); | |
</script> | |
<template> |
NewerOlder