Skip to content

Instantly share code, notes, and snippets.

View ngocminhxx's full-sized avatar
💭
I may be slow to respond.

Chi Hung ngocminhxx

💭
I may be slow to respond.
View GitHub Profile
<div class="mv-inner" id="videoContainer">
<video id="videoPlayer1" class="active" muted playsinline data-video="したごしらえ">
<source src="<?= esc_url( get_template_directory_uri() ); ?>/videos/1.mp4" type="video/mp4" class="pc">
<source src="<?= esc_url( get_template_directory_uri() ); ?>/videos/1-sp.mp4" type="video/mp4" class="sp">
</video>
<video id="videoPlayer2" muted playsinline data-video="お料理">
<source src="<?= esc_url( get_template_directory_uri() ); ?>/videos/2.mp4" type="video/mp4" class="pc">
<source src="<?= esc_url( get_template_directory_uri() ); ?>/videos/2-sp.mp4" type="video/mp4" class="sp">
</video>
<video id="videoPlayer3" muted playsinline data-video="おもてなし">
let lastScrollTop = 0;
let currentTop = 0;
let requestId = null;
let hasScrolled = false;
function lerp(start, end, alpha) {
return start + (end - start) * alpha;
}
function updatePosition() {
https://lenis.darkroom.engineering/
function change_title_separator( $sep ) {
return "|";
}
add_filter( 'document_title_separator', 'change_title_separator', 10, 1 );

Notes (Please be sure to check in advance) About the form tag Be sure to set the value of the name attribute of the file attachment part of the HTML on the form page side to "upfile[]" as shown below . Since multiple attachments on the HTML side are supported, even if there is only one name attribute value, it is necessary to add [ and ] ("and" is not required) after the value.

*You can copy and paste the following

Also, be sure to add enctype="multipart/form-data" to the form tag on the form page side as shown below. This is a required attribute when attaching a file.

import "imagemapster";
/*
*
* ----------------------------------------------- */
$(function () {
$('img[usemap="#image-map"]').mapster({
fillOpacity: 1,
singleSelect: true,
altImage:
var swiperConnectivity = document.querySelector(".swiper-connectivity");
if (swiperConnectivity) {
var swiper = new Swiper(swiperConnectivity, {
observer: true,
observeParents: true,
slidesPerView: "auto",
spaceBetween: 20,
});
.wp-pagenavi {
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
padding-top: 20px;
@include media-breakpoint-up(md) {
padding-top: 46px;
// ----------------------------------------------
.mansonry {
column-count: 2;
column-gap: 60px;
@include media-breakpoint-down(md) {
column-gap: 20px;
}
a {
/**
*
* function for archive page with years
*
---------------------------------------------------------- */
function add_custom_yearly_archives( $wp_rewrite ) {
$rules = array();
// Rules for splunk-news post type
$post_type = 'splunk-news';