webhook test

This commit is contained in:
ichiju 2023-04-02 21:15:58 +09:00
parent e76af16de2
commit 7e6a82acb9
41 changed files with 507 additions and 9091 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,10 +1,4 @@
<!DOCTYPE html> <!doctype html><html style="background-color:#000;" lang="en"><head><meta charset="utf-8"><title>Video Player - Floatbox</title><script>( function () {
<html style="background-color:#000;" lang="en">
<head>
<meta charset="utf-8"/>
<title>Video Player - Floatbox</title>
<script>
( function () {
var var
$container, $container,
$player, $player,
@ -136,11 +130,7 @@
script.src = fbOptions.scriptPath; script.src = fbOptions.scriptPath;
document.head.appendChild( script ); document.head.appendChild( script );
} )() } )()</script><style>html, body, #container {
</script>
<style>
html, body, #container {
position: absolute; position: absolute;
overflow: hidden; overflow: hidden;
width: 100%; width: 100%;
@ -165,19 +155,4 @@ p {
} }
video { video {
object-fit: cover; object-fit: cover;
} }</style></head><body><div id="container"><p>Uh-oh.<br>Video playback failed.<br>That's all we know.<br><br><a></a></p></div></body></html>
</style>
</head>
<body>
<div id="container">
<p>Uh-oh.<br />
Video playback failed.<br />
That's all we know.<br /><br />
<a></a>
</p>
</div>
</body>
</html>

View File

@ -1,169 +1,2 @@
const header=document.getElementById("header");let lastPos=document.documentElement.scrollTop;window.addEventListener("scroll",()=>{const e=document.documentElement.scrollTop;e>lastPos?e>header.offsetHeight&&(header.classList.add("-translate-y-full"),header.classList.remove("header-shadow")):(header.classList.remove("-translate-y-full"),header.classList.add("header-shadow")),lastPos=e},!1);const menu=document.getElementById("menu"),searchBox=document.getElementById("search"),menuToggle=document.getElementById("menu-toggle");menuToggle.addEventListener("click",()=>{menu.classList.toggle("hidden"),searchBox.classList.toggle("hidden")},!1);const lazyImages=document.getElementsByClassName("lazy");document.addEventListener("DOMContentLoaded",()=>{[...lazyImages].forEach(e=>{const t=e.dataset.src;e.setAttribute("src",t),e.removeAttribute("data-src")})},!1);class SearchPosts{async init(){const e=new URL(location.href).searchParams;this.start=Number(e.get("start"))||1,this.size=Number(e.get("size"))||12,this.posts=await fetch("../index.json").then(e=>e.json()),this.render(e.get("q"))}render(e){const t=document.getElementById("wrapper"),s=document.getElementById("searchbox"),n=document.getElementById("info");if(e="string"==typeof e?e.toLowerCase():"",history.replaceState(null,null,`?q=${e}&start=${this.start}&size=${this.size}`),s.value=e,t.innerHTML="",""===e)return void(n.textContent="Enter keywords in the search box above");const o=this.posts.filter(t=>{const s=t.title.toLowerCase(),n=t.description.toLowerCase();return-1!==s.indexOf(e)||-1!==n.indexOf(e)});if(0===o.length)return void(n.textContent=`No results were found for "${e}"`);const a=this.size,r=this.start-1,d=o.slice(r,r+a),l=r+d.length,i=this.start<l||1!==this.start?`${this.start} to ${l}`:this.start,c=o.length>1?"s":"";n.textContent=`Showing ${i} of ${o.length} result${c} found for "${e}"`,d.forEach(e=>{const{url:s,title:n,date:o,description:a}=e;t.innerHTML+=`\n <div class="w-full sm:w-1/2 md:w-1/3 self-stretch p-2 mb-2">\n <a href="${s}">\n <div class="rounded shadow-md h-full px-6 py-5">\n <div class="font-semibold text-lg mb-2">${n}</div>\n <p class="text-gray-500 mb-1 text-sm" title="Published date">${o}</p>\n <p class="text-gray-600 text-sm">${a}</p>\n </div>\n </a>\n </div>\n `})}}if("/search/"===location.pathname){const e=document.getElementById("searchbox"),t=new SearchPosts;t.init(),e.addEventListener("keyup",debounce((function(){t.render(this.value)}),400))}function debounce(e,t){let s,n=[];return function(...o){return new Promise(a=>{clearTimeout(s),s=setTimeout(()=>{s=null;const t=e.apply(this,o);for(a of n)a(t);n=[]},t),n.push(a)})}}
/*
Hide header on scroll down & show on scroll up
*/
const header = document.getElementById('header');
let lastPos = document.documentElement.scrollTop;
window.addEventListener('scroll', () => {
const currPos = document.documentElement.scrollTop;
if (currPos > lastPos) {
if (currPos > header.offsetHeight) {
header.classList.add('-translate-y-full');
header.classList.remove('header-shadow');
}
} else {
header.classList.remove('-translate-y-full');
header.classList.add('header-shadow');
}
lastPos = currPos;
}, false);
/*
Toggle the menu when pressed on hamburger button
Only on mobile devices
*/
const menu = document.getElementById('menu');
const searchBox = document.getElementById('search');
const menuToggle = document.getElementById('menu-toggle');
menuToggle.addEventListener('click', () => {
menu.classList.toggle('hidden');
searchBox.classList.toggle('hidden');
}, false);
/*
Lazy load images
*/
const lazyImages = document.getElementsByClassName('lazy');
document.addEventListener('DOMContentLoaded', () => {
[...lazyImages].forEach((elem) => {
const originalImage = elem.dataset.src;
elem.setAttribute('src', originalImage);
elem.removeAttribute('data-src');
});
}, false);
/*
Search for posts with keyword given in the parameter "q"
Only run on search page ("/search/")
*/
class SearchPosts {
async init() {
const params = new URL(location.href).searchParams;
this.start = Number(params.get('start')) || 1;
this.size = Number(params.get('size')) || 12;
this.posts = await fetch('../index.json').then((res) => {
return res.json();
});
this.render(params.get('q'));
}
render(query) {
const wrapperEl = document.getElementById('wrapper');
const searchBoxEl = document.getElementById('searchbox');
const infoEl = document.getElementById('info');
query = typeof query === 'string' ? query.toLowerCase() : '';
history.replaceState(null, null, `?q=${query}&start=${this.start}&size=${this.size}`);
searchBoxEl.value = query;
wrapperEl.innerHTML = '';
if (query === '') {
infoEl.textContent = 'Enter keywords in the search box above';
return;
}
const matchedPosts = this.posts.filter((post) => {
const postTitle = post.title.toLowerCase();
const postDescription = post.description.toLowerCase();
return (postTitle.indexOf(query) !== -1) || (postDescription.indexOf(query) !== -1);
});
if (matchedPosts.length === 0) {
infoEl.textContent = `No results were found for "${query}"`;
return;
}
const size = this.size;
const offset = this.start - 1;
const slicedPosts = matchedPosts.slice(offset, offset + size);
const lastPostIndex = offset + slicedPosts.length;
const showingRange = this.start < lastPostIndex || this.start !== 1 ? `${this.start} to ${lastPostIndex}` : this.start;
const extraS = matchedPosts.length > 1 ? 's' : '';
infoEl.textContent = `Showing ${showingRange} of ${matchedPosts.length} result${extraS} found for "${query}"`;
slicedPosts.forEach((post) => {
const { url, title, date, description } = post;
wrapperEl.innerHTML += `
<div class="w-full sm:w-1/2 md:w-1/3 self-stretch p-2 mb-2">
<a href="${url}">
<div class="rounded shadow-md h-full px-6 py-5">
<div class="font-semibold text-lg mb-2">${title}</div>
<p class="text-gray-500 mb-1 text-sm" title="Published date">${date}</p>
<p class="text-gray-600 text-sm">${description}</p>
</div>
</a>
</div>
`;
});
}
}
if (location.pathname === '/search/') {
const searchBoxEl = document.getElementById('searchbox');
const searchPosts = new SearchPosts();
searchPosts.init();
searchBoxEl.addEventListener('keyup', debounce(function () {
searchPosts.render(this.value);
}, 400));
}
// https://github.com/sindresorhus/p-debounce
function debounce(fn, wait) {
let timer;
let resolveList = [];
return function (...arguments_) {
return new Promise((resolve) => {
clearTimeout(timer);
timer = setTimeout(() => {
timer = null;
const result = fn.apply(this, arguments_);
for (resolve of resolveList) {
resolve(result);
}
resolveList = [];
}, wait);
resolveList.push(resolve);
});
};
}

File diff suppressed because one or more lines are too long

View File

@ -1,116 +1,25 @@
<!DOCTYPE html> <!doctype html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Untitled | おこげ俱楽部</title><meta name="title" content="Untitled | おこげ俱楽部"><meta name="description" content="Ohiwa Code Generator - Portal"><meta name="keywords" content="オコゲ,blockly,プログラミング,上野学習塾"><meta name="author" content="ocogeclub"><meta name="robots" content="index, follow"><link rel="canonical" href="https://ocoge.club/img/"><link rel="shortcut icon" type="image/png" href="/assets/img/favicon.png"><link rel="apple-touch-icon" href="/assets/img/apple-touch-icon.png"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Nunito:wght@500&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css2?family=Kosugi+Maru&display=swap" rel="stylesheet"><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap"><script src="https://kit.fontawesome.com/73f7be0650.js" crossorigin="anonymous"></script><link rel="stylesheet" href="/assets/floatbox/floatbox.css"><script src="/assets/floatbox/floatbox.js" defer="defer"></script><link rel="stylesheet" href="/assets/css/ocmain.css"><link rel="stylesheet" href="/assets/css/main.css"><link rel="stylesheet" href="/assets/css/footer.css"><link rel="stylesheet" href="/assets/css/post.css"><meta property="og:title" content="Untitled | おこげ俱楽部"><meta property="og:description" content="Ohiwa Code Generator - Portal"><meta property="og:url" content="https://ocoge.club/img/"><meta property="og:site_name" content="おこげ俱楽部"><meta name="twitter:card" content="summary"><meta name="twitter:site" content="@ocogeclub"></head><body class="flex flex-col h-screen bg-white text-gray-800 break-words"><header id="header" class="header-shadow bg-white px-6 py-5 z-50 fixed w-full top-0 transition-all transform ease-in-out duration-500"><div class="max-w-5xl mx-auto flex items-center flex-wrap justify-between"><div class="sm:mr-8"><a class="flex items-center" href="/"><span class="text-xl text-teal-700 font-semibold self-center"><img src="/assets/img/ocoge_title_kogecha.webp" title="おこげ俱楽部" alt="おこげ俱楽部" id="site_title"></span></a></div><nav id="menu" class="order-last md:order-none items-center flex-grow w-full md:w-auto md:flex hidden mt-2 md:mt-0"><a href="/about" class="block mt-4 md:inline-block md:mt-0 font-medium text-gray-700 hover:text-teal-600 text-base mr-4">About</a> <a href="/tags" class="block mt-4 md:inline-block md:mt-0 font-medium text-gray-700 hover:text-teal-600 text-base mr-4">Tag List</a> <a href="https://cloud.ocoge.club/" target="_blank" rel="noopener" class="block mt-4 md:inline-block md:mt-0 font-medium text-gray-700 hover:text-teal-600 text-base mr-4">Cloud/Mail</a> <a href="https://git.ocoge.club/ocogeclub/pages" target="_blank" rel="noopener" class="block mt-4 md:inline-block md:mt-0 font-medium text-gray-700 hover:text-teal-600 text-base mr-4">ocogIt</a></nav><form id="search" action="/search" class="order-last sm:order-none flex-grow items-center justify-end hidden sm:block mt-6 sm:mt-0"><label class="visually-hidden" for="header-searchbox">記事タイトル/概要を検索 ...</label> <input type="text" id="header-searchbox" name="q" placeholder="記事タイトル/概要を検索 ..." class="w-full sm:max-w-xs bg-gray-200 border border-transparent float-right focus:bg-white focus:border-gray-300 focus:outline-none h-8 p-4 placeholder-gray-500 rounded text-gray-700 text-sm"></form><div id="menu-toggle" class="flex items-center md:hidden text-gray-700 hover:text-teal-600 cursor-pointer sm:ml-6"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg></div></div></header><main class="mx-7 lg:mx-6 mt-32 flex-grow"><article class="max-w-5xl mx-auto"><header class="mb-14"><h1 class="text-3xl text-center font-bold leading-normal text-gray-900 mt-0 mb-3">Untitled</h1><div class="text-center"><i class="fa-regular fa-clock"></i> 2023年3月2日</div></header><div id="content" class="prose text-gray-800 max-w-none"><!doctype html><body style="background-color: green;"><img src="./tama_ko.webp"></body></div><div class="mt-10"><div id="disqus_thread"></div><script>let disqusLoaded = false;
<html> let disqus_config = function () {
this.page.url = 'https://ocoge.club/img/';
<head> this.page.identifier = 'img';
<meta charset="utf-8"> };
<meta http-equiv="X-UA-Compatible" content="IE=edge"> function loadComments() {
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> if (!disqusLoaded) {
<meta name="viewport" content="width=device-width, initial-scale=1"> disqusLoaded = true;
<title>Untitled | おこげ俱楽部</title> const d = document, s = d.createElement('script');
<meta name="title" content="Untitled | おこげ俱楽部"> s.src = '//ocogeclub.disqus.com/embed.js';
<meta name="description" content="Ohiwa Code Generator - Portal"> (d.head || d.body).appendChild(s);
<meta name="keywords" content="オコゲ,blockly,プログラミング,上野学習塾"> }
<meta name="author" content="ocoge.club"> }
<meta name="robots" content="index, follow"> if(!!window.IntersectionObserver) {
<link rel="canonical" href="https://ocoge.club/img/"> const disqusEl = document.getElementById('disqus_thread');
<link rel="shortcut icon" type="image/png" href="/assets/img/favicon.png"> const intersectionObserver = new IntersectionObserver(function(entries, observer) {
<link rel="apple-touch-icon" href="/assets/img/apple-touch-icon.png"> if (entries && entries[0] && entries[0].isIntersecting) {
<link rel="preconnect" href="https://fonts.googleapis.com"> loadComments();
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> observer.unobserve(disqusEl);
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@500&display=swap" rel="stylesheet"> }
<link href="https://fonts.googleapis.com/css2?family=Kosugi+Maru&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap">
<script src="https://kit.fontawesome.com/73f7be0650.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="/assets/floatbox/floatbox.css" />
<script src="/assets/floatbox/floatbox.js" defer></script>
<link rel="stylesheet" href="/assets/css/ocmain.css">
<link rel="stylesheet" href="/assets/css/main.css">
<link rel="stylesheet" href="/assets/css/footer.css">
<link rel="stylesheet" href="/assets/css/post.css">
<meta property="og:title" content="Untitled | おこげ俱楽部">
<meta property="og:description" content="Ohiwa Code Generator - Portal">
<meta property="og:url" content="https://ocoge.club/img/">
<meta property="og:site_name" content="おこげ俱楽部">
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@ocogeclub">
</head>
<body class="flex flex-col h-screen bg-white text-gray-800 break-words">
<header id="header" class="header-shadow bg-white px-6 py-5 z-50 fixed w-full top-0 transition-all transform ease-in-out duration-500">
<div class="max-w-5xl mx-auto flex items-center flex-wrap justify-between">
<div class="sm:mr-8">
<a class="flex items-center" href="/">
<span class="text-xl text-teal-700 font-semibold self-center"><img src="/assets/img/ocoge_title_kogecha.webp" title="おこげ俱楽部" alt="おこげ俱楽部" id="site_title"></span>
</a>
</div>
<nav id="menu" class="order-last md:order-none items-center flex-grow w-full md:w-auto md:flex hidden mt-2 md:mt-0">
<a href="/about" class="block mt-4 md:inline-block md:mt-0 font-medium text-gray-700 hover:text-teal-600 text-base mr-4">About</a>
<a href="/tags" class="block mt-4 md:inline-block md:mt-0 font-medium text-gray-700 hover:text-teal-600 text-base mr-4">Tag List</a>
<a href="https://cloud.ocoge.club/" target="_blank" rel="noopener" class="block mt-4 md:inline-block md:mt-0 font-medium text-gray-700 hover:text-teal-600 text-base mr-4">Cloud/Mail</a>
<a href="https://git.ocoge.club/ocogeclub/pages" target="_blank" rel="noopener" class="block mt-4 md:inline-block md:mt-0 font-medium text-gray-700 hover:text-teal-600 text-base mr-4">ocogIt</a>
</nav>
<form id="search" action="/search" class="order-last sm:order-none flex-grow items-center justify-end hidden sm:block mt-6 sm:mt-0">
<label class="visually-hidden" for="header-searchbox">記事タイトル/概要を検索 ...</label>
<input type="text" id="header-searchbox" name="q" placeholder="記事タイトル/概要を検索 ..." class="w-full sm:max-w-xs bg-gray-200 border border-transparent float-right focus:bg-white focus:border-gray-300 focus:outline-none h-8 p-4 placeholder-gray-500 rounded text-gray-700 text-sm">
</form>
<div id="menu-toggle" class="flex items-center md:hidden text-gray-700 hover:text-teal-600 cursor-pointer sm:ml-6">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu">
<line x1="3" y1="12" x2="21" y2="12"></line>
<line x1="3" y1="6" x2="21" y2="6"></line>
<line x1="3" y1="18" x2="21" y2="18"></line>
</svg>
</div>
</div>
</header>
<main class="mx-7 lg:mx-6 mt-32 flex-grow">
<article class="max-w-5xl mx-auto">
<header class="mb-14">
<h1 class="text-3xl text-center font-bold leading-normal text-gray-900 mt-0 mb-3">Untitled</h1>
<div class="text-center"><i class="fa-regular fa-clock"></i> 2023年3月2日</div>
</header>
<div id="content" class="prose text-gray-800 max-w-none">
<!DOCTYPE html>
<body style="background-color: green;">
<img src="./tama_ko.webp">
</body>
</div>
<div class="mt-10">
<div class="italic text-gray-700">Disqus comments only available for production</div>
</div>
</article>
</main>
<footer class="mt-20 px-10 py-8 bg-gray-200">
<div id="footer-badge"><a href="https://git.ocoge.club/" target=_new><img loading="lazy" src="/assets/img/git-ocogeclub.svg" class="footer-img"></a><a href="http://creativecommons.org/licenses/by-sa/4.0/deed.ja" target=_new><img loading="lazy" src="/assets/img/License_BY-SA_4.0.svg" class="footer-img"></a></div>
<div class="max-w-5xl mx-auto text-gray-700 text-center">
© 2023 <a href="/" class="font-medium" target="_blank" rel="noopener">おこげ俱楽部</a>.
Made by <a href="https://ocoge.club" target="_blank" rel="noopener">ocoge.club</a>
using <a href="https://www.11ty.dev" target="_blank" rel="noopener">Eleventy</a> and <a href="https://github.com/dafiulh/vredeburg" target="_blank" rel="noopener">Vredeburg</a>.<br>
</div>
</footer>
<script src="/assets/js/bundle.js"></script>
</body>
<script>
window.addEventListener('load', (event) => {
document.getElementsByTagName('html')[0].style.display='block';
}); });
</script> intersectionObserver.observe(disqusEl);
}</script></div></article></main><footer class="mt-20 px-10 py-8 bg-gray-200"><div id="footer-badge"><a href="https://git.ocoge.club/" target="_new"><img loading="lazy" src="/assets/img/git-ocogeclub.svg" class="footer-img"></a><a href="http://creativecommons.org/licenses/by-sa/4.0/deed.ja" target="_new"><img loading="lazy" src="/assets/img/License_BY-SA_4.0.svg" class="footer-img"></a></div><div class="max-w-5xl mx-auto text-gray-700 text-center">© 2023 <a href="/" class="font-medium" target="_blank" rel="noopener">おこげ俱楽部</a>. Made by <a href="https://ocoge.club" target="_blank" rel="noopener">ocogeclub</a> using <a href="https://www.11ty.dev" target="_blank" rel="noopener">Eleventy</a> and <a href="https://github.com/dafiulh/vredeburg" target="_blank" rel="noopener">Vredeburg</a>.<br></div></footer><script src="/assets/js/bundle.js"></script></body><script>window.addEventListener('load', (event) => {
</html> document.getElementsByTagName('html')[0].style.display='block';
});</script></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long