From a269c8297e7f5820b8c61e59f6af0f88b4772ab6 Mon Sep 17 00:00:00 2001 From: EthanThatOneKid <31261035+EthanThatOneKid@users.noreply.github.com> Date: Sun, 12 Nov 2023 14:53:25 -0800 Subject: [PATCH 1/4] Squashed commit of the following: commit dcf0093d6e3cf3f09354efce005b4043201e3c35 Merge: 839bcf8 5f37f7b Author: EthanThatOneKid <31261035+EthanThatOneKid@users.noreply.github.com> Date: Sat Nov 11 22:49:52 2023 -0800 Merge branch 'gh-pages' of https://github.com/EthanThatOneKid/dropin-minimal-css into gh-pages commit 839bcf8e8d694bbadd479add26974bae8eb1bd0d Author: EthanThatOneKid <31261035+EthanThatOneKid@users.noreply.github.com> Date: Sat Nov 11 22:45:53 2023 -0800 properly rename variables commit 5f37f7bca20702da77f658e7fd66e510f961218f Author: EthanThatOneKid <31261035+EthanThatOneKid@users.noreply.github.com> Date: Sat Nov 11 22:45:53 2023 -0800 properly rename variables commit ae754ebc616d457c3345139ae93cb04bb69cd93a Author: EthanThatOneKid <31261035+EthanThatOneKid@users.noreply.github.com> Date: Sat Nov 11 22:43:56 2023 -0800 Update index.html commit 950cb33be9756674a6b3d98ad3941e95df3363e2 Author: EthanThatOneKid <31261035+EthanThatOneKid@users.noreply.github.com> Date: Sat Nov 11 22:33:16 2023 -0800 add local storage features commit 2f0def9591e789d4e14e235fb9510a61480c1523 Author: EthanThatOneKid <31261035+EthanThatOneKid@users.noreply.github.com> Date: Sat Nov 11 22:29:30 2023 -0800 add variable host name --- index.html | 6 +++--- switcher.js | 28 ++++++++++++++++++++++------ 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index 3cfd6a2..9862fb9 100644 --- a/index.html +++ b/index.html @@ -45,9 +45,9 @@

Drop-in Minimal CSS

-

This page provides an overview of barebones drop-in minimal CSS boilerplate frameworks. To switch to a different stylesheet, select one of the frameworks from the dropdown menu below. For more information, and links to all the frameworks seen here, visit the project page on GitHub.

+

This page provides an overview of barebones drop-in minimal CSS boilerplate frameworks. To switch to a different stylesheet, select one of the frameworks from the dropdown menu below. For more information, and links to all the frameworks seen here, visit the project page on GitHub.

-

New: Click or drag this bookmarklet to your bookmark bar to add a CSS switcher to any site!

+

New: Click or drag this bookmarklet to your bookmark bar to add a CSS switcher to any site!

diff --git a/switcher.js b/switcher.js index c53b2f6..e08990d 100644 --- a/switcher.js +++ b/switcher.js @@ -1,9 +1,14 @@ +var host = "https://ethanthatonekid.github.io/dropin-minimal-css"; var frameworks = "a11yana,almond,axist,bahunya,bamboo,bare,base,basic,bolt,bonsai,brutalist,bullframe,bulma,caiuss,caramel,cardinal,centigram,centurion,chota,cirrus,classless,clmaterial,codify,comet,concise,concrete,cutestrap,flat-ui,fluidity,furtive,gd,generic,github-markdown,gutenberg,hack,hello,hiq,holiday,html-starterkit,hyp,kathamo,koochak,kraken,kube,latex,lemon,lissom,lit,lotus,markdown,marx,material,materialize,mercury,milligram,min,mini,minimal,minimal-stylesheet,missing-style,mobi,motherplate,mu,mui,mvp,neat,new,no-class,normalize,oh-my-css,ok,pandoc-scholar,paper,papier,pavilion,picnic,pico,preface,primer,propeller,pure,roble,sakura,sanitize,scooter,semantic-ui,shoelace,siimple,simple,skeleton,skeleton-framework,skeleton-plus,snack,spcss,spectre,style,stylize,superstylin,tachyons,tacit,tent,terminal,thao,tui,vanilla,vital,water,wing,writ,yamb,yorha,ads-gazette,ads-medium,ads-notebook,ads-tufte,attri-bright-light-green,attri-midnight-green,attri-dark-forest-green,attri-dark-fairy-pink,attri-light-fairy-pink,awsm-default,awsm-black,awsm-bigstone,awsm-gondola,awsm-mischka,awsm-pastelpink,awsm-pearllusta,awsm-tasman,awsm-white,boot-cerulean,boot-cosmo,boot-cyborg,boot-darkly,boot-flatly,boot-journal,boot-lumen,boot-paper,boot-readable,boot-sandstone,boot-slate,boot-spacelab,boot-superhero,boot-yeti,md-air,md-modest,md-retro,md-splendor,w3c-chocolate,w3c-midnight,w3c-modernist,w3c-oldstyle,w3c-steely,w3c-swiss,w3c-traditional,w3c-ultramarine"; +var localStorageKey = "dropin-minimal-css-framework"; add_switcher(); -function switch_css(css) { - css_link.href = "https://dohliam.github.io/dropin-minimal-css/min/" + css + ".min.css"; +function switch_css(f) { + css_link.href = host + "/min/" + f + ".min.css"; + + // Save framework to local storage. + localStorage.setItem(localStorageKey, f); } function capitalize(s) { @@ -22,12 +27,19 @@ function on_css_load() { function inline_switcher() { switcher = document.getElementById("switcher"); frameworks_array = frameworks.split(","); - select_open = '\n \n'; for (i = 0; i < frameworks_array.length; i++) { f = frameworks_array[i]; framework_name = capitalize(f); - option = ' \n'; + option = '