From: Kyle Bowman Date: Sat, 14 Dec 2024 18:09:17 +0000 (-0500) Subject: feat: add make-demo features X-Git-Url: https://git.rocketbowman.com/?a=commitdiff_plain;h=0b37a66f01884297e0db10e1f8f7c7da6375629e;p=jetsam.git feat: add make-demo features --- diff --git a/Makefile b/Makefile index f9d5c5c..2cd9a09 100644 --- a/Makefile +++ b/Makefile @@ -3,8 +3,7 @@ BUILD_DIR := build SRC_DIR := src BUILD_LIST := $(shell find -L . -path './$(SRC_DIR)/**/*.md' | sed 's:./$(SRC_DIR):$(BUILD_DIR):g' | sed 's:\.md:\.html:g') -.PHONY: all clean help - +.PHONY: help: @echo "Builds HTML files from MD files. Targets include:" @echo @@ -17,12 +16,13 @@ help: @echo " you invoke the make command. The default BUILD_LIST is created from MD files" @echo " found anywhere under the $(SRC_DIR) directory." +.PHONY: all: build/index.html build/index.html: .buildlist xargs -n 1 make --no-print-directory < .buildlist scripts/index.sh > build/index.html - + .buildlist: @echo $(BUILD_LIST) | tr ' ' '\n' > .buildlist @@ -41,6 +41,32 @@ $(BUILD_DIR)/%.html: $(SRC_DIR)/%.md $(BUILD_DIR)/$(ASSETS_DIR) --lua-filter=scripts/links-to-html.lua @echo "Building $@ from $<..." +.PHONY: clean: -rm .buildlist - rm -rf $(BUILD_DIR) \ No newline at end of file + rm -rf $(BUILD_DIR) + +.PHONY: +init-demo: + @if [ -e $(SRC_DIR) ]; then echo "$(SRC_DIR) already exists. Aborting." && exit 1; fi + ln -s demo $(SRC_DIR) + +.PHONY: +init-altdemo: + mkdir -p $(SRC_DIR) + ln -s ../demo/assets $(SRC_DIR)/ + ln -s ../demo/md $(SRC_DIR)/ + +.PHONY: +rm-src: + @if [ ! -z "$(shell find $(SRC_DIR) -not -type 'l' -not -path '$(SRC_DIR)')" ]; then \ + echo "non-link file found in $(SRC_DIR). Aborting." && exit 1; \ + fi + @if [ -L "$(SRC_DIR)" ]; then \ + rm "$(SRC_DIR)" && echo "removing $(SRC_DIR)" ;\ + elif [ -d "$(SRC_DIR)" ]; then \ + find $(SRC_DIR) -type 'l' | xargs rm; \ + rmdir $(SRC_DIR) && echo "removing $(SRC_DIR)";\ + else \ + echo "$(SRC_DIR) is an unhandled type. Aborting."; \ + fi diff --git a/assets/css/normalize.css b/assets/css/normalize.css deleted file mode 100644 index 9b77e0e..0000000 --- a/assets/css/normalize.css +++ /dev/null @@ -1,461 +0,0 @@ -/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */ - -/** - * 1. Change the default font family in all browsers (opinionated). - * 2. Correct the line height in all browsers. - * 3. Prevent adjustments of font size after orientation changes in - * IE on Windows Phone and in iOS. - */ - -/* Document - ========================================================================== */ - -html { - font-family: sans-serif; /* 1 */ - line-height: 1.15; /* 2 */ - -ms-text-size-adjust: 100%; /* 3 */ - -webkit-text-size-adjust: 100%; /* 3 */ -} - -/* Sections - ========================================================================== */ - -/** - * Remove the margin in all browsers (opinionated). - */ - -body { - margin: 0; -} - -/** - * Add the correct display in IE 9-. - */ - -article, -aside, -footer, -header, -nav, -section { - display: block; -} - -/** - * Correct the font size and margin on `h1` elements within `section` and - * `article` contexts in Chrome, Firefox, and Safari. - */ - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -/* Grouping content - ========================================================================== */ - -/** - * Add the correct display in IE 9-. - * 1. Add the correct display in IE. - */ - -figcaption, -figure, -main { /* 1 */ - display: block; -} - -/** - * Add the correct margin in IE 8. - */ - -figure { - margin: 1em 40px; -} - -/** - * 1. Add the correct box sizing in Firefox. - * 2. Show the overflow in Edge and IE. - */ - -hr { - box-sizing: content-box; /* 1 */ - height: 0; /* 1 */ - overflow: visible; /* 2 */ -} - -/** - * 1. Correct the inheritance and scaling of font size in all browsers. - * 2. Correct the odd `em` font sizing in all browsers. - */ - -pre { - font-family: monospace, monospace; /* 1 */ - font-size: 1em; /* 2 */ -} - -/* Text-level semantics - ========================================================================== */ - -/** - * 1. Remove the gray background on active links in IE 10. - * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. - */ - -a { - background-color: transparent; /* 1 */ - -webkit-text-decoration-skip: objects; /* 2 */ -} - -/** - * Remove the outline on focused links when they are also active or hovered - * in all browsers (opinionated). - */ - -a:active, -a:hover { - outline-width: 0; -} - -/** - * 1. Remove the bottom border in Firefox 39-. - * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. - */ - -abbr[title] { - border-bottom: none; /* 1 */ - text-decoration: underline; /* 2 */ - text-decoration: underline dotted; /* 2 */ -} - -/** - * Prevent the duplicate application of `bolder` by the next rule in Safari 6. - */ - -b, -strong { - font-weight: inherit; -} - -/** - * Add the correct font weight in Chrome, Edge, and Safari. - */ - -b, -strong { - font-weight: bolder; -} - -/** - * 1. Correct the inheritance and scaling of font size in all browsers. - * 2. Correct the odd `em` font sizing in all browsers. - */ - -code, -kbd, -samp { - font-family: monospace, monospace; /* 1 */ - font-size: 1em; /* 2 */ -} - -/** - * Add the correct font style in Android 4.3-. - */ - -dfn { - font-style: italic; -} - -/** - * Add the correct background and color in IE 9-. - */ - -mark { - background-color: #ff0; - color: #000; -} - -/** - * Add the correct font size in all browsers. - */ - -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` elements from affecting the line height in - * all browsers. - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sub { - bottom: -0.25em; -} - -sup { - top: -0.5em; -} - -/* Embedded content - ========================================================================== */ - -/** - * Add the correct display in IE 9-. - */ - -audio, -video { - display: inline-block; -} - -/** - * Add the correct display in iOS 4-7. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/** - * Remove the border on images inside links in IE 10-. - */ - -img { - border-style: none; -} - -/** - * Hide the overflow in IE. - */ - -svg:not(:root) { - overflow: hidden; -} - -/* Forms - ========================================================================== */ - -/** - * 1. Change the font styles in all browsers (opinionated). - * 2. Remove the margin in Firefox and Safari. - */ - -button, -input, -optgroup, -select, -textarea { - font-family: sans-serif; /* 1 */ - font-size: 100%; /* 1 */ - line-height: 1.15; /* 1 */ - margin: 0; /* 2 */ -} - -/** - * Show the overflow in IE. - * 1. Show the overflow in Edge. - */ - -button, -input { /* 1 */ - overflow: visible; -} - -/** - * Remove the inheritance of text transform in Edge, Firefox, and IE. - * 1. Remove the inheritance of text transform in Firefox. - */ - -button, -select { /* 1 */ - text-transform: none; -} - -/** - * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` - * controls in Android 4. - * 2. Correct the inability to style clickable types in iOS and Safari. - */ - -button, -html [type="button"], /* 1 */ -[type="reset"], -[type="submit"] { - -webkit-appearance: button; /* 2 */ -} - -/** - * Remove the inner border and padding in Firefox. - */ - -button::-moz-focus-inner, -[type="button"]::-moz-focus-inner, -[type="reset"]::-moz-focus-inner, -[type="submit"]::-moz-focus-inner { - border-style: none; - padding: 0; -} - -/** - * Restore the focus styles unset by the previous rule. - */ - -button:-moz-focusring, -[type="button"]:-moz-focusring, -[type="reset"]:-moz-focusring, -[type="submit"]:-moz-focusring { - outline: 1px dotted ButtonText; -} - -/** - * Change the border, margin, and padding in all browsers (opinionated). - */ - -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} - -/** - * 1. Correct the text wrapping in Edge and IE. - * 2. Correct the color inheritance from `fieldset` elements in IE. - * 3. Remove the padding so developers are not caught out when they zero out - * `fieldset` elements in all browsers. - */ - -legend { - box-sizing: border-box; /* 1 */ - color: inherit; /* 2 */ - display: table; /* 1 */ - max-width: 100%; /* 1 */ - padding: 0; /* 3 */ - white-space: normal; /* 1 */ -} - -/** - * 1. Add the correct display in IE 9-. - * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. - */ - -progress { - display: inline-block; /* 1 */ - vertical-align: baseline; /* 2 */ -} - -/** - * Remove the default vertical scrollbar in IE. - */ - -textarea { - overflow: auto; -} - -/** - * 1. Add the correct box sizing in IE 10-. - * 2. Remove the padding in IE 10-. - */ - -[type="checkbox"], -[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Correct the cursor style of increment and decrement buttons in Chrome. - */ - -[type="number"]::-webkit-inner-spin-button, -[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -/** - * 1. Correct the odd appearance in Chrome and Safari. - * 2. Correct the outline style in Safari. - */ - -[type="search"] { - -webkit-appearance: textfield; /* 1 */ - outline-offset: -2px; /* 2 */ -} - -/** - * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. - */ - -[type="search"]::-webkit-search-cancel-button, -[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * 1. Correct the inability to style clickable types in iOS and Safari. - * 2. Change font properties to `inherit` in Safari. - */ - -::-webkit-file-upload-button { - -webkit-appearance: button; /* 1 */ - font: inherit; /* 2 */ -} - -/* Interactive - ========================================================================== */ - -/* - * Add the correct display in IE 9-. - * 1. Add the correct display in Edge, IE, and Firefox. - */ - -details, /* 1 */ -menu { - display: block; -} - -/* - * Add the correct display in all browsers. - */ - -summary { - display: list-item; -} - -/* Scripting - ========================================================================== */ - -/** - * Add the correct display in IE 9-. - */ - -canvas { - display: inline-block; -} - -/** - * Add the correct display in IE. - */ - -template { - display: none; -} - -/* Hidden - ========================================================================== */ - -/** - * Add the correct display in IE 10-. - */ - -[hidden] { - display: none; -} diff --git a/assets/css/space-sakura.css b/assets/css/space-sakura.css deleted file mode 100644 index 9c24ad6..0000000 --- a/assets/css/space-sakura.css +++ /dev/null @@ -1,207 +0,0 @@ -/* This stylesheet was modified from - Sakura.css v1.3.1 - * ================ - * Minimal css theme. - * Project: https://github.com/oxalorg/sakura/ - */ - - /* Color pallet -Original sakura-dark theme: - white: ffffff - light gray: e6e6e6 - medium-light gray: c9c9c9 - medium-dark gray: 4a4a4a - dark gray: 222222 - -Deep-space theme from: https://vimcolorschemes.com/rafi/awesome-vim-colorschemes - deep blue-gray: 1b202a (background) formerly 222222 - light blue-gray: 323c4d (contrasting background) formerly 4a4a4a - orangey: dfa276 (grabby text - links) formerly ffffff - light purpley: 8d70bc (visited) formerly e6e6e6 - c9c9c9 is still used in places - -Unused from theme: - light blue: 5e89bf (mildly grabby text) - redish pink: a65a76 (alternate grabby text) - light gray: 98a5ba (base text?) -*/ - -/* Body */ -html { - font-size: 62.5%; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; } - -body { - font-size: 1.8rem; - line-height: 1.5; - max-width: 40em; - margin: auto; - color: #c9c9c9; - background-color: #1b202a; - padding: 13px; } - -@media (max-width: 684px) { - body { - font-size: 1.53rem; } } - -@media (max-width: 382px) { - body { - font-size: 1.35rem; } } - -h1, h2, h3, h4, h5, h6 { - line-height: 1.1; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; - font-weight: 700; - margin-top: 3rem; - margin-bottom: 1.5rem; - overflow-wrap: break-word; - word-wrap: break-word; - -ms-word-break: break-all; - word-break: break-word; } - -h1 { - font-size: 2.35em; } - -h2 { - font-size: 2.00em; } - -h3 { - font-size: 1.75em; } - -h4 { - font-size: 1.5em; } - -h5 { - font-size: 1.25em; } - -h6 { - font-size: 1em; } - -p { - margin-top: 0px; - margin-bottom: 1.5rem; } - -small, sub, sup { - font-size: 75%; } - -hr { - border-color: #dfa276; } - -a { - text-decoration: none; - color: #dfa276; } - a:hover { - color: #c9c9c9; - border-bottom: 2px solid #c9c9c9; } - a:visited { - color: #8d70bc; } - -ul { - padding-left: 1.4em; - margin-top: 0px; - margin-bottom: 1.5rem; } - -li { - margin-bottom: 0.2em; } - -blockquote { - margin-left: 0px; - margin-right: 0px; - padding-left: 1em; - padding-top: 0.8em; - padding-bottom: 0.8em; - padding-right: 0.8em; - border-left: 5px solid #dfa276; - margin-bottom: 1.5rem; - background-color: #323c4d; } - -blockquote p { - margin-bottom: 0; } - -img { - height: auto; - max-width: 100%; - margin-top: 0px; - margin-bottom: 2.5rem; } - -/* Pre and Code */ -pre { - background-color: #323c4d; - display: block; - padding: 1em; - overflow-x: auto; - margin-top: 0px; - margin-bottom: 2.5rem; } - -code { - font-size: 0.9em; - padding: 0 0.5em; - background-color: #323c4d; - white-space: pre-wrap; } - -pre > code { - padding: 0; - background-color: transparent; - white-space: pre; } - -/* Tables */ -table { - text-align: justify; - width: 100%; - border-collapse: collapse; } - -td, th { - padding: 0.5em; - border-bottom: 1px solid #323c4d; } - -/* Buttons, forms and input */ -input, textarea { - border: 1px solid #c9c9c9; } - input:focus, textarea:focus { - border: 1px solid #dfa276; } - -textarea { - width: 100%; } - -.button, button, input[type="submit"], input[type="reset"], input[type="button"] { - display: inline-block; - padding: 5px 10px; - text-align: center; - text-decoration: none; - white-space: nowrap; - background-color: #dfa276; - color: #1b202a; - border-radius: 1px; - border: 1px solid #dfa276; - cursor: pointer; - box-sizing: border-box; } - .button[disabled], button[disabled], input[type="submit"][disabled], input[type="reset"][disabled], input[type="button"][disabled] { - cursor: default; - opacity: .5; } - .button:focus:enabled, .button:hover:enabled, button:focus:enabled, button:hover:enabled, input[type="submit"]:focus:enabled, input[type="submit"]:hover:enabled, input[type="reset"]:focus:enabled, input[type="reset"]:hover:enabled, input[type="button"]:focus:enabled, input[type="button"]:hover:enabled { - background-color: #c9c9c9; - border-color: #c9c9c9; - color: #1b202a; - outline: 0; } - -textarea, select, input { - color: #c9c9c9; - padding: 6px 10px; - /* The 6px vertically centers text on FF, ignored by Webkit */ - margin-bottom: 10px; - background-color: #323c4d; - border: 1px solid #323c4d; - border-radius: 4px; - box-shadow: none; - box-sizing: border-box; } - textarea:focus, select:focus, input:focus { - border: 1px solid #dfa276; - outline: 0; } - -input[type="checkbox"]:focus { - outline: 1px dotted #dfa276; } - -label, legend, fieldset { - display: block; - margin-bottom: .5rem; - font-weight: 600; } diff --git a/demo/assets/css/normalize.css b/demo/assets/css/normalize.css new file mode 100644 index 0000000..9b77e0e --- /dev/null +++ b/demo/assets/css/normalize.css @@ -0,0 +1,461 @@ +/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */ + +/** + * 1. Change the default font family in all browsers (opinionated). + * 2. Correct the line height in all browsers. + * 3. Prevent adjustments of font size after orientation changes in + * IE on Windows Phone and in iOS. + */ + +/* Document + ========================================================================== */ + +html { + font-family: sans-serif; /* 1 */ + line-height: 1.15; /* 2 */ + -ms-text-size-adjust: 100%; /* 3 */ + -webkit-text-size-adjust: 100%; /* 3 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers (opinionated). + */ + +body { + margin: 0; +} + +/** + * Add the correct display in IE 9-. + */ + +article, +aside, +footer, +header, +nav, +section { + display: block; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/* Grouping content + ========================================================================== */ + +/** + * Add the correct display in IE 9-. + * 1. Add the correct display in IE. + */ + +figcaption, +figure, +main { /* 1 */ + display: block; +} + +/** + * Add the correct margin in IE 8. + */ + +figure { + margin: 1em 40px; +} + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * 1. Remove the gray background on active links in IE 10. + * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. + */ + +a { + background-color: transparent; /* 1 */ + -webkit-text-decoration-skip: objects; /* 2 */ +} + +/** + * Remove the outline on focused links when they are also active or hovered + * in all browsers (opinionated). + */ + +a:active, +a:hover { + outline-width: 0; +} + +/** + * 1. Remove the bottom border in Firefox 39-. + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Prevent the duplicate application of `bolder` by the next rule in Safari 6. + */ + +b, +strong { + font-weight: inherit; +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font style in Android 4.3-. + */ + +dfn { + font-style: italic; +} + +/** + * Add the correct background and color in IE 9-. + */ + +mark { + background-color: #ff0; + color: #000; +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Add the correct display in IE 9-. + */ + +audio, +video { + display: inline-block; +} + +/** + * Add the correct display in iOS 4-7. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Remove the border on images inside links in IE 10-. + */ + +img { + border-style: none; +} + +/** + * Hide the overflow in IE. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers (opinionated). + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: sans-serif; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, +input { /* 1 */ + overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, +select { /* 1 */ + text-transform: none; +} + +/** + * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` + * controls in Android 4. + * 2. Correct the inability to style clickable types in iOS and Safari. + */ + +button, +html [type="button"], /* 1 */ +[type="reset"], +[type="submit"] { + -webkit-appearance: button; /* 2 */ +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** + * Change the border, margin, and padding in all browsers (opinionated). + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * 1. Add the correct display in IE 9-. + * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ +} + +/** + * Remove the default vertical scrollbar in IE. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10-. + * 2. Remove the padding in IE 10-. + */ + +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type="search"] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. + */ + +[type="search"]::-webkit-search-cancel-button, +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in IE 9-. + * 1. Add the correct display in Edge, IE, and Firefox. + */ + +details, /* 1 */ +menu { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Scripting + ========================================================================== */ + +/** + * Add the correct display in IE 9-. + */ + +canvas { + display: inline-block; +} + +/** + * Add the correct display in IE. + */ + +template { + display: none; +} + +/* Hidden + ========================================================================== */ + +/** + * Add the correct display in IE 10-. + */ + +[hidden] { + display: none; +} diff --git a/demo/assets/css/space-sakura.css b/demo/assets/css/space-sakura.css new file mode 100644 index 0000000..9c24ad6 --- /dev/null +++ b/demo/assets/css/space-sakura.css @@ -0,0 +1,207 @@ +/* This stylesheet was modified from + Sakura.css v1.3.1 + * ================ + * Minimal css theme. + * Project: https://github.com/oxalorg/sakura/ + */ + + /* Color pallet +Original sakura-dark theme: + white: ffffff + light gray: e6e6e6 + medium-light gray: c9c9c9 + medium-dark gray: 4a4a4a + dark gray: 222222 + +Deep-space theme from: https://vimcolorschemes.com/rafi/awesome-vim-colorschemes + deep blue-gray: 1b202a (background) formerly 222222 + light blue-gray: 323c4d (contrasting background) formerly 4a4a4a + orangey: dfa276 (grabby text - links) formerly ffffff + light purpley: 8d70bc (visited) formerly e6e6e6 + c9c9c9 is still used in places + +Unused from theme: + light blue: 5e89bf (mildly grabby text) + redish pink: a65a76 (alternate grabby text) + light gray: 98a5ba (base text?) +*/ + +/* Body */ +html { + font-size: 62.5%; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; } + +body { + font-size: 1.8rem; + line-height: 1.5; + max-width: 40em; + margin: auto; + color: #c9c9c9; + background-color: #1b202a; + padding: 13px; } + +@media (max-width: 684px) { + body { + font-size: 1.53rem; } } + +@media (max-width: 382px) { + body { + font-size: 1.35rem; } } + +h1, h2, h3, h4, h5, h6 { + line-height: 1.1; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; + font-weight: 700; + margin-top: 3rem; + margin-bottom: 1.5rem; + overflow-wrap: break-word; + word-wrap: break-word; + -ms-word-break: break-all; + word-break: break-word; } + +h1 { + font-size: 2.35em; } + +h2 { + font-size: 2.00em; } + +h3 { + font-size: 1.75em; } + +h4 { + font-size: 1.5em; } + +h5 { + font-size: 1.25em; } + +h6 { + font-size: 1em; } + +p { + margin-top: 0px; + margin-bottom: 1.5rem; } + +small, sub, sup { + font-size: 75%; } + +hr { + border-color: #dfa276; } + +a { + text-decoration: none; + color: #dfa276; } + a:hover { + color: #c9c9c9; + border-bottom: 2px solid #c9c9c9; } + a:visited { + color: #8d70bc; } + +ul { + padding-left: 1.4em; + margin-top: 0px; + margin-bottom: 1.5rem; } + +li { + margin-bottom: 0.2em; } + +blockquote { + margin-left: 0px; + margin-right: 0px; + padding-left: 1em; + padding-top: 0.8em; + padding-bottom: 0.8em; + padding-right: 0.8em; + border-left: 5px solid #dfa276; + margin-bottom: 1.5rem; + background-color: #323c4d; } + +blockquote p { + margin-bottom: 0; } + +img { + height: auto; + max-width: 100%; + margin-top: 0px; + margin-bottom: 2.5rem; } + +/* Pre and Code */ +pre { + background-color: #323c4d; + display: block; + padding: 1em; + overflow-x: auto; + margin-top: 0px; + margin-bottom: 2.5rem; } + +code { + font-size: 0.9em; + padding: 0 0.5em; + background-color: #323c4d; + white-space: pre-wrap; } + +pre > code { + padding: 0; + background-color: transparent; + white-space: pre; } + +/* Tables */ +table { + text-align: justify; + width: 100%; + border-collapse: collapse; } + +td, th { + padding: 0.5em; + border-bottom: 1px solid #323c4d; } + +/* Buttons, forms and input */ +input, textarea { + border: 1px solid #c9c9c9; } + input:focus, textarea:focus { + border: 1px solid #dfa276; } + +textarea { + width: 100%; } + +.button, button, input[type="submit"], input[type="reset"], input[type="button"] { + display: inline-block; + padding: 5px 10px; + text-align: center; + text-decoration: none; + white-space: nowrap; + background-color: #dfa276; + color: #1b202a; + border-radius: 1px; + border: 1px solid #dfa276; + cursor: pointer; + box-sizing: border-box; } + .button[disabled], button[disabled], input[type="submit"][disabled], input[type="reset"][disabled], input[type="button"][disabled] { + cursor: default; + opacity: .5; } + .button:focus:enabled, .button:hover:enabled, button:focus:enabled, button:hover:enabled, input[type="submit"]:focus:enabled, input[type="submit"]:hover:enabled, input[type="reset"]:focus:enabled, input[type="reset"]:hover:enabled, input[type="button"]:focus:enabled, input[type="button"]:hover:enabled { + background-color: #c9c9c9; + border-color: #c9c9c9; + color: #1b202a; + outline: 0; } + +textarea, select, input { + color: #c9c9c9; + padding: 6px 10px; + /* The 6px vertically centers text on FF, ignored by Webkit */ + margin-bottom: 10px; + background-color: #323c4d; + border: 1px solid #323c4d; + border-radius: 4px; + box-shadow: none; + box-sizing: border-box; } + textarea:focus, select:focus, input:focus { + border: 1px solid #dfa276; + outline: 0; } + +input[type="checkbox"]:focus { + outline: 1px dotted #dfa276; } + +label, legend, fieldset { + display: block; + margin-bottom: .5rem; + font-weight: 600; } diff --git a/demo/assets/images/favicon.ico b/demo/assets/images/favicon.ico new file mode 100644 index 0000000..9d199a8 Binary files /dev/null and b/demo/assets/images/favicon.ico differ diff --git a/demo/md/about.md b/demo/md/about.md new file mode 100644 index 0000000..b4d0c13 --- /dev/null +++ b/demo/md/about.md @@ -0,0 +1,72 @@ +--- +title: About the Project +author: Kyle Bowman +created: 20241123084949 +last_updated: 20241123084949 +--- + +[Pandoc](https://pandoc.org/) deserves to be mentioned before Jetsam as it's the +real workhorse of this operation. Jetsam can be described as a Pandoc-based +distribution of writing utilities that are designed to help you write, publish, +and maintain a corpus of personal-space writings. + +# About Personal-Space Writing and Jetsam Philosophy + +Personal-space writing is an *ad hoc* term designed to connote your own cozy part +of the web. It's intended to contrast with enterprise- or commercial-style +writing. For example, personal-space writing is more aligned to capturing one +person's thoughts over a lifetime than it is to maximizing reader engagement. + +The following principles of personal-space writing help govern the philosophy of the Jetsam project: + +* **Prioritize simple data formats.** Data tends to outlast your application, so +choose something that won't lock you in. Either the format should be relevant +in 20 years or you should be able to be easily port it to whatever is relevant in +20 years. +* **Next, prioritize predicable, stable tools.** Even if you choose a simple data +format, each application tends to have its own quirks about how it handles the +data. When you accumulate a volume of data, migrating becomes non-trivial even +for small deviations. Each new dependency incurs a maintenance cost, so it deserves +scrutiny. When you add a new dependency, try to +[Choose Boring Technology](https://mcfunley.com/choose-boring-technology) because the maintenance risk of __ tends to be much lower than __. +* **Then, prioritize extensibility.** Ostensibly, a personalized space is the +goal. So, why is it last in this list of priorities? Because, if you don't +have the stability offered by the previous priorities, you'll spend an awful +lot of time rebuilding your extensions. But you can innovate a lot _on top of_ +boring technology. + +With those guidelines in mind, you can see why we rely so heavily on Pandoc. + +* **We can use Markdown as our primary data format.** Markdown is a simple +standard, which makes it easy to create tools for. Furthermore, it's a +text-based standard, so if all else fails, it's still readable. +* **Pandoc is its own data migration tool.** This includes migrating between +different flavors of Markdown. +* **Pandoc is relatively stable with ongoing support.** There have been 3 major +releases in its first 18 years. The core seems pretty stable. There are still +updates every few days. But even if the project becomes unmaintained, the +existing versions contain a _ton_ of functionality. Its infinitely stable +in that regard. +* **Pandoc contains an embedded Lua interpreter.** This gives you a ton of +room for extensibility without adding potentially fragile dependencies. + +# About the Name + +The term [jetsam](https://en.wikipedia.org/wiki/Flotsam,_jetsam,_lagan_and_derelict#Jetsam) +comes from maritime law. It refers to cargo that is intentionally discarded +from a ship or wreckage. Jetsam is often the byproduct of trying to save a +sinking ship by reducing its load. Per maritime law, someone that recovers jetsam +is generally not obligated to return it to the original owner. The finder retains +the value of the recovered goods. + +Jetsam is a beautiful metaphor for writing. For the writer, writing is a powerful form of [rubber ducking](https://en.wikipedia.org/wiki/Rubber_duck_debugging) +(jetsam's mascot). Writing forces you to encounter and clarify any ambiguous or +underspecified thoughts that you may have about a topic. Once you have written +about the topic sufficiently clearly, it _feels_ resolved. You can mentally offload +it. But just because you discard it doesn't mean that your jetsam isn't valuable to +whomever stumbles upon it. + +Also, I chuckle at the mental image of a panicked sailor casting rubber ducks off a +sinking ship. + +Godspeed, little ducky. \ No newline at end of file diff --git a/demo/md/acknowledgements.md b/demo/md/acknowledgements.md new file mode 100644 index 0000000..758b6d1 --- /dev/null +++ b/demo/md/acknowledgements.md @@ -0,0 +1,14 @@ +--- +title: acknowledgements +author: Kyle Bowman +--- + +This site is heavily influenced by the following projects: + +| Project | Website | License | +| ------- | ------- | ------- | +| Sakura CSS | https://github.com/oxalorg/sakura | [MIT License](https://github.com/oxalorg/sakura/blob/master/LICENSE.txt) | +| Normalize CSS | https://github.com/necolas/normalize.css | [MIT License](https://github.com/necolas/normalize.css/blob/master/LICENSE.md) | +| Vim Deep Space | https://github.com/tyrannicaltoucan/vim-deep-space/ | [MIT License](https://github.com/tyrannicaltoucan/vim-deep-space/blob/master/LICENSE) | + +Thank you for choosing to open-source your contributions to the open source community! \ No newline at end of file diff --git a/demo/md/demo.md b/demo/md/demo.md new file mode 100644 index 0000000..34e144a --- /dev/null +++ b/demo/md/demo.md @@ -0,0 +1,78 @@ +--- +title: Demo Page +author: Kyle Bowman +created: 20241123170613 +last_updated: 20241123170613 +--- + +This page demonstrates how various Markdown elements are rendered and the +style that is applied. It is useful as a suite of tests when you tinker. + +# Demo + +This is an anchor tag/hyperlink: [sakura - GitHub Repository](https://github.com/oxalorg/sakura). + +Paragraphs look like this. Font size along with line height and maximum width +are optimized for reading. + +_Italic_, **strong**, and `monospace`. Itemized lists look liked: + +* this one +* that one +* the other one + +Here's a block quote: + +>Man surprised me most about humanity. Because he sacrifices his health in order +to make money. Then he sacrifices money to recuperate his health. And then he is +so anxious about the future that he does not enjoy the present; the result being +that he does not live in the present or the future; he lives as if he is never +going to die, and then dies having never really lived. -James J Lachard + +## An h2 header + +Some code blocks: + +``` python +def foobar(): + return "Welcome to flavor country!" +``` +### An h3 header + +A nested list: + +1. First, get these ingredients + * carrots + * celery + * lentils +2. Boil some water. +3. Dump everything in the pot and follow this algorithm: + +``` +uncover pot +stir +cover pot +balance wooden spoon precariously on pot handle +wait 10 minutes +goto first step (or shut off burner when done) +``` + +Do not bump wooden spoon or it will fall + +# Header level 1 +## Header level 2 +### Header level 3 +#### Header level 4 +##### Header level 5 +###### Header level 6 + +A horizontal line: + +--- + + + +Here's a link to [my acknowledgements for the demo](../demo/acknowledgements.md). +You can see what tables look like on that page. + + diff --git a/scripts/index.sh b/scripts/index.sh index 404fbc5..f2a4bd4 100755 --- a/scripts/index.sh +++ b/scripts/index.sh @@ -47,8 +47,8 @@ make_boilerplate(){ Pages in Build - - + +
diff --git a/src/demo/about.md b/src/demo/about.md deleted file mode 100644 index b4d0c13..0000000 --- a/src/demo/about.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: About the Project -author: Kyle Bowman -created: 20241123084949 -last_updated: 20241123084949 ---- - -[Pandoc](https://pandoc.org/) deserves to be mentioned before Jetsam as it's the -real workhorse of this operation. Jetsam can be described as a Pandoc-based -distribution of writing utilities that are designed to help you write, publish, -and maintain a corpus of personal-space writings. - -# About Personal-Space Writing and Jetsam Philosophy - -Personal-space writing is an *ad hoc* term designed to connote your own cozy part -of the web. It's intended to contrast with enterprise- or commercial-style -writing. For example, personal-space writing is more aligned to capturing one -person's thoughts over a lifetime than it is to maximizing reader engagement. - -The following principles of personal-space writing help govern the philosophy of the Jetsam project: - -* **Prioritize simple data formats.** Data tends to outlast your application, so -choose something that won't lock you in. Either the format should be relevant -in 20 years or you should be able to be easily port it to whatever is relevant in -20 years. -* **Next, prioritize predicable, stable tools.** Even if you choose a simple data -format, each application tends to have its own quirks about how it handles the -data. When you accumulate a volume of data, migrating becomes non-trivial even -for small deviations. Each new dependency incurs a maintenance cost, so it deserves -scrutiny. When you add a new dependency, try to -[Choose Boring Technology](https://mcfunley.com/choose-boring-technology) because the maintenance risk of __ tends to be much lower than __. -* **Then, prioritize extensibility.** Ostensibly, a personalized space is the -goal. So, why is it last in this list of priorities? Because, if you don't -have the stability offered by the previous priorities, you'll spend an awful -lot of time rebuilding your extensions. But you can innovate a lot _on top of_ -boring technology. - -With those guidelines in mind, you can see why we rely so heavily on Pandoc. - -* **We can use Markdown as our primary data format.** Markdown is a simple -standard, which makes it easy to create tools for. Furthermore, it's a -text-based standard, so if all else fails, it's still readable. -* **Pandoc is its own data migration tool.** This includes migrating between -different flavors of Markdown. -* **Pandoc is relatively stable with ongoing support.** There have been 3 major -releases in its first 18 years. The core seems pretty stable. There are still -updates every few days. But even if the project becomes unmaintained, the -existing versions contain a _ton_ of functionality. Its infinitely stable -in that regard. -* **Pandoc contains an embedded Lua interpreter.** This gives you a ton of -room for extensibility without adding potentially fragile dependencies. - -# About the Name - -The term [jetsam](https://en.wikipedia.org/wiki/Flotsam,_jetsam,_lagan_and_derelict#Jetsam) -comes from maritime law. It refers to cargo that is intentionally discarded -from a ship or wreckage. Jetsam is often the byproduct of trying to save a -sinking ship by reducing its load. Per maritime law, someone that recovers jetsam -is generally not obligated to return it to the original owner. The finder retains -the value of the recovered goods. - -Jetsam is a beautiful metaphor for writing. For the writer, writing is a powerful form of [rubber ducking](https://en.wikipedia.org/wiki/Rubber_duck_debugging) -(jetsam's mascot). Writing forces you to encounter and clarify any ambiguous or -underspecified thoughts that you may have about a topic. Once you have written -about the topic sufficiently clearly, it _feels_ resolved. You can mentally offload -it. But just because you discard it doesn't mean that your jetsam isn't valuable to -whomever stumbles upon it. - -Also, I chuckle at the mental image of a panicked sailor casting rubber ducks off a -sinking ship. - -Godspeed, little ducky. \ No newline at end of file diff --git a/src/demo/acknowledgements.md b/src/demo/acknowledgements.md deleted file mode 100644 index 758b6d1..0000000 --- a/src/demo/acknowledgements.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: acknowledgements -author: Kyle Bowman ---- - -This site is heavily influenced by the following projects: - -| Project | Website | License | -| ------- | ------- | ------- | -| Sakura CSS | https://github.com/oxalorg/sakura | [MIT License](https://github.com/oxalorg/sakura/blob/master/LICENSE.txt) | -| Normalize CSS | https://github.com/necolas/normalize.css | [MIT License](https://github.com/necolas/normalize.css/blob/master/LICENSE.md) | -| Vim Deep Space | https://github.com/tyrannicaltoucan/vim-deep-space/ | [MIT License](https://github.com/tyrannicaltoucan/vim-deep-space/blob/master/LICENSE) | - -Thank you for choosing to open-source your contributions to the open source community! \ No newline at end of file diff --git a/src/demo/demo.md b/src/demo/demo.md deleted file mode 100644 index 34e144a..0000000 --- a/src/demo/demo.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: Demo Page -author: Kyle Bowman -created: 20241123170613 -last_updated: 20241123170613 ---- - -This page demonstrates how various Markdown elements are rendered and the -style that is applied. It is useful as a suite of tests when you tinker. - -# Demo - -This is an anchor tag/hyperlink: [sakura - GitHub Repository](https://github.com/oxalorg/sakura). - -Paragraphs look like this. Font size along with line height and maximum width -are optimized for reading. - -_Italic_, **strong**, and `monospace`. Itemized lists look liked: - -* this one -* that one -* the other one - -Here's a block quote: - ->Man surprised me most about humanity. Because he sacrifices his health in order -to make money. Then he sacrifices money to recuperate his health. And then he is -so anxious about the future that he does not enjoy the present; the result being -that he does not live in the present or the future; he lives as if he is never -going to die, and then dies having never really lived. -James J Lachard - -## An h2 header - -Some code blocks: - -``` python -def foobar(): - return "Welcome to flavor country!" -``` -### An h3 header - -A nested list: - -1. First, get these ingredients - * carrots - * celery - * lentils -2. Boil some water. -3. Dump everything in the pot and follow this algorithm: - -``` -uncover pot -stir -cover pot -balance wooden spoon precariously on pot handle -wait 10 minutes -goto first step (or shut off burner when done) -``` - -Do not bump wooden spoon or it will fall - -# Header level 1 -## Header level 2 -### Header level 3 -#### Header level 4 -##### Header level 5 -###### Header level 6 - -A horizontal line: - ---- - - - -Here's a link to [my acknowledgements for the demo](../demo/acknowledgements.md). -You can see what tables look like on that page. - - diff --git a/src/demo/images/favicon.ico b/src/demo/images/favicon.ico deleted file mode 100644 index 9d199a8..0000000 Binary files a/src/demo/images/favicon.ico and /dev/null differ