Skip to content

Instantly share code, notes, and snippets.

Avatar

VA79 vanaf1979

View GitHub Profile
View head-vs-header.html
<!doctype html>
<html lang="en">
<head>
<!-- This is your document head.-->
<!-- It is not visible to the user, but it contains information for the browser,-->
<!-- like the title, seo meta tags and stylesheet links.-->
<!-- Docs; https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head -->
<title>Document</title>
</head>
<body>
View steph.js
// Name: shoes
import "@johnlindquist/kit";
let Jimp = await npm("jimp")
let text = await editor(`
## Enter a url per line
## Hit cmd+s to "continue"
@vanaf1979
vanaf1979 / RenderedBlocks.php
Created Mar 24, 2021
Are blocks rendered yet
View RenderedBlocks.php
<?php
final class RenderedBlocks {
/**
* instance.
*
* @var RenderedBlocks $instance class instance.
*/
private static $instance = null;
View classlist-toggle-html.html
<div class="box"></div>
<button id="addClass">Add active class</button>
<button id="removeClass">Remove active class</button>
<button id="toggleClass">Toggle active class</button>
View classlist-remove-html.html
<div class="box"></div>
<button id="addClass">Add active class</button>
<button id="removeClass">Remove active class</button>
View classlist-add-html.html
<div class="box"></div>
<button id="addClass">Add active class</button>
View classlist-toggle-js.js
const box = document.querySelector(".box");
const toggleButton = document.querySelector('#toggleClass');
toggleButton.addEventListener('click', () => {
box.classList.toggle("active");
});