From 3c52bb3c5f5e7e77ed3576be44c26f2690be2d0b Mon Sep 17 00:00:00 2001 From: Yohn Date: Sun, 22 Dec 2024 02:11:16 -0500 Subject: [PATCH] Removed unused docs and docs/js files --- docs/cheatsheet.html | 486 --------------------------------------- docs/js/Accordion.js | 40 ---- docs/js/Notifications.js | 20 -- docs/js/popover-toast.js | 80 ------- 4 files changed, 626 deletions(-) delete mode 100644 docs/cheatsheet.html delete mode 100644 docs/js/Accordion.js delete mode 100644 docs/js/Notifications.js delete mode 100644 docs/js/popover-toast.js diff --git a/docs/cheatsheet.html b/docs/cheatsheet.html deleted file mode 100644 index e42ebcda..00000000 --- a/docs/cheatsheet.html +++ /dev/null @@ -1,486 +0,0 @@ - - - - - - -Preview • Pico CSS - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
-

Container

-

Example of Container...

-

Document

-

Example of Document...

-

Grid

-

Example of Grid...

-

Landmarks

-

Example of Landmarks...

-

Overflow Auto

-

Example of Overflow Auto...

-

Row

-

Example of Row...

-

Section

-

Example of Section...

-
- -
- -
-
-

Button

-
- - - -
Article
- -
Article: Contrast not adjusted
-
-

With and without classes versions.

-
-
-

Code

-

Example of Code...

-

Embedded

-

Example of Embedded...

-

Figure

-

Example of Figure...

- -

Example of Link...

-

Misc

-

Example of Misc...

-

Table

-

Example of Table...

-

Typography

-

Example of Typography...

-
- -
-

Basics

-

Example of Basics...

-

Checkbox Radio Switch

-

Example of Checkbox Radio Switch...

-

Floating

-

Example of Floating...

-

Input Color

-

Example of Input Color...

-

Input Date

-

Example of Input Date...

-

Input File

-

Example of Input File...

-

Input Range

-

Example of Input Range...

-

Input Search

-

Example of Input Search...

-

Validation

-

Example of Validation...

-
- -
-
-
-

Accordion

-
-
- Accordion Title -
-

Your content goes here...

-
-
-
-
-
-

Card

-
-

Example of Card...

-
- -
-
-

Group

-
-

Example of Group...

-
-
-
-

Loading

-
-

Example of Loading...

-
- - - -
-
-

Notification

-
-

Example of Notification...

-
-
-
-

Offcanvas

-
-

Example of Offcanvas...

-
-
-
-

Popover Toast

-
-

Example of Popover Toast...

-
-
-
-

Popover

-
-

Example of Popover...

-
-
-
-

Progress

-
-

Example of Progress...

-
-
-
-

Tab Region

-
-

Example of Tab Region...

-
-
-
-

Timeline

-
-

Example of Timeline...

-
-
-
-

Tooltip

-
-
- -
-
-
-
-
-
- - -
-
-
- -

Confirm Your Membership

-
-

Thank you for signing up for a membership! Please review the membership details below:

-
    -
  • Membership: Individual
  • -
  • Price: $10
  • -
-
- - -
-
-
-
- - -
-
- -

Confirm Your Membership

-
-

Thank you for signing up for a membership! Please review the membership details below:

-
    -
  • Membership: Individual
  • -
  • Price: $10
  • -
-
- - - -
-
-
- - - - - - - diff --git a/docs/js/Accordion.js b/docs/js/Accordion.js deleted file mode 100644 index 33788c61..00000000 --- a/docs/js/Accordion.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Accordion JavaScript Removed. - * -*/ - -document.addEventListener("DOMContentLoaded", () => { - document.querySelectorAll('details').forEach(el => { - let anim = null, opening = false, closing = false - let summ = el.querySelector('summary') - const runAnim = (height, targetHeight, callback) => { - anim?.cancel() - anim = el.animate({ height: [`${height}px`,`${targetHeight}px`] },{ - duration: 400, - easing: 'ease-out' - }) - anim.onfinish = () => { - anim = null - el.style.height = el.style.overflow = '' - opening = closing = false - callback?.() - } - } - - summ.addEventListener('click', ev => { - ev.preventDefault() - el.style.overflow = 'hidden' - - if(!el.open || closing) { - el.style.height = `${el.offsetHeight}px` - el.open = opening = true - runAnim(el.offsetHeight, [...el.children].reduce((a,c) => a+c.offsetHeight, 0)) - anim.oncancel = () => opening = false - } else if(el.open || opening) { - closing = true - runAnim(el.offsetHeight, summ.offsetHeight, () => el.open = false) - anim.oncancel = () => closing = false - } - }) - }) -}) \ No newline at end of file diff --git a/docs/js/Notifications.js b/docs/js/Notifications.js deleted file mode 100644 index f3c6959b..00000000 --- a/docs/js/Notifications.js +++ /dev/null @@ -1,20 +0,0 @@ -function showNotification(options = {}) { - const dialog = document.querySelector("dialog[role='alert']"); - - if (options.text || typeof options === "string") { - dialog.innerText = options.text || options; - } else if (options.html) { - dialog.innerHTML = options.html; - } - - dialog.showModal(); - - setTimeout(() => { - dialog.close(); - }, options.delay || 3000); -} - -function closeNotification() { - const dialog = document.querySelector("dialog[role='alert']"); - dialog.close(); -} \ No newline at end of file diff --git a/docs/js/popover-toast.js b/docs/js/popover-toast.js deleted file mode 100644 index 2ef0ebd4..00000000 --- a/docs/js/popover-toast.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Popover Toast - * - * Modified from https://mdn.github.io/dom-examples/popover-api/toast-popovers/ - * Modified by Yohn - */ - -const successToastBtn = document.getElementById("success-toast-btn"); -const failureToastBtn = document.getElementById("failure-toast-btn"); -const counter = document.querySelector("p"); - -function makeToast(result) { - // Create an element and make it into a popover - const popover = document.createElement("article"); - popover.popover = "manual"; - popover.classList.add("toast"); - popover.classList.add("newest"); - - let msg; - - // Give the toast an appropriate text content, class for styling, and update - // the relevant count, depending on whether it was a success or a failure - if (result === "success") { - msg = "Action was successful!"; - popover.classList.add("success"); - successCount++; - } else if (result === "failure") { - msg = "Action failed!"; - popover.classList.add("failure"); - failCount++; - } else { - return; - } - - // Give the toast its text content, and add it to the DOM - popover.textContent = msg; - document.body.appendChild(popover); - - // Show the popover - popover.showPopover(); - - // Remove the toast again after 4 seconds - setTimeout(() => { - popover.hidePopover(); - popover.remove(); - }, 4000); - - // When a new toast appears, run the movetoastsUp() function - popover.addEventListener("toggle", (event) => { - if (event.newState === "open") { - moveToastsUp(); - } - }); -} - -function moveToastsUp() { - const toasts = document.querySelectorAll(".toast"); - - toasts.forEach((toast) => { - // If the toast is the one that has just appeared, we don't want it to move up. - if (toast.classList.contains("newest")) { - toast.style.bottom = `5px`; - toast.classList.remove("newest"); - } else { - // Move up all the other toasts by 50px to make way for the new one - const prevValue = toast.style.bottom.replace("px", ""); - const newValue = parseInt(prevValue) + 50; - toast.style.bottom = `${newValue}px`; - } - }); -} - -// Handlers to wire up the buttons to the makeToast() function -successToastBtn.addEventListener("click", () => { - makeToast("success"); -}); - -failureToastBtn.addEventListener("click", () => { - makeToast("failure"); -});