diff --git a/.gitignore b/.gitignore index 364fdec..db37107 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ public/ +.deploy_config +static/processed_images diff --git a/config.toml b/config.toml index 3996024..b73ac6c 100644 --- a/config.toml +++ b/config.toml @@ -1,12 +1,12 @@ -# The URL the site will be built for -base_url = "https://lfcode.ca" +base_url = "https://jade.fyi" -# Whether to automatically compile all Sass files in the sass directory compile_sass = true -# Whether to build a search index to be used later on by a JavaScript library build_search_index = false +feed_filename = "rss.xml" +generate_feed = true + title = "jade's website" description = "computers i guess" @@ -19,3 +19,4 @@ highlight_code = true # Put all your custom variables here copyright = "(c) 2021 jade CC-BY-SA" dtformat = "%B %d, %Y" +debug = false diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..8bc0069 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,3 @@ ++++ +sort_by = "date" ++++ diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..2fb1ac5 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [[ ! -e .deploy_config ]]; then + cat >&2 <<-EOF + Please create a .deploy_config with content: + DEPLOY_HOST=[the host you rsync to] + DEPLOY_DIR=[the directory you rsync to] + # optional + EXTRA_OPTS=[extra rsync options you want to use] + EOF + + exit 1 +fi + +source .deploy_config +# trailing slash: copy contents of directory into destination +rsync --verbose --human-readable --recursive --links --times --new-compress --delete-delay ${EXTRA_OPTS} public/ "${DEPLOY_HOST}:${DEPLOY_DIR}" diff --git a/sass/main.scss b/sass/main.scss index af42467..6e9f049 100644 --- a/sass/main.scss +++ b/sass/main.scss @@ -1,24 +1,18 @@ $text: #ddd; $bg: #540362; +$lowerbg1: darken($bg, 5); +$higherbg1: lighten($bg, 10); $lower1: darken($text, 18); +$lower2: darken($text, 30); @import 'fonts'; @mixin reset-list { - margin: 0; - padding: 0; -} - -@mixin horizontal-list { - @include reset-list; - li { display: inline-block; - margin: { - left: -2px; - right: 2em; - } } + margin: 0; + padding: 0; } @mixin flex-center { @@ -27,16 +21,16 @@ $lower1: darken($text, 18); justify-content: center; } -@mixin chonky-link-underline { - a { - border-bottom: solid 2px; +@mixin chonky-link-underline($elType: "a", $thickness: 2px) { + #{$elType} { + border-bottom: solid $thickness; padding-bottom: 0px; border-radius: 1px; } } -@mixin a-normal { - a { +@mixin a-normal($class: "") { + a#{$class} { color: $text; text-decoration: none; } @@ -47,7 +41,7 @@ pre { margin: .5em 0; border-radius: .3em; overflow: auto; - background-color: darken($bg, 5.0); + background-color: $lowerbg1; code { font-family: Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace; @@ -58,44 +52,155 @@ body { font-family: 'Source Sans 3', 'sans-serif'; background-color: $bg; color: $text; - font-size: 1.1em; + font-size: 1.1rem; + line-height: 1.35; + + margin: { + left: 0.75rem; + right: 0.75rem; + } } -nav { +a { + color: #f778e3; + text-decoration: none; +} + +// navigation between pages at the end of articles +nav.article-nav { + margin-top: 5rem; + margin-bottom: 2rem; + + .disabled-link { + color: $lower2; + cursor: default; + } + + .nav-label { + color: $lower1; + font-size: 1rem; + user-select: none; + } + + .older { + text-align: right; + } + + ul { + @include reset-list(); + @include chonky-link-underline($thickness: 1px); + @include chonky-link-underline($elType: ".disabled-link", $thickness: 1px); + @include a-normal(); + display: flex; + justify-content: space-between; + font-size: 1.4rem; + font-weight: 400; + } +} + +// navigation at the top of the page +nav.main-nav { @include flex-center; ul { - @include horizontal-list(); + @include reset-list(); @include chonky-link-underline(); @include a-normal(); + font-size: 1.4rem; font-weight: 700; + + li { + margin: { + left: -2px; + right: 2rem; + bottom: .25rem; + } + } + } + + margin: { + bottom: 2rem; + top: 2rem; } } -article { - @include a-normal(); - h2 { - margin-block-end: -0.2em; +header.page-header { + margin: { + bottom: 1em; } +} - // the spans below individual page titles on the home page +main { + // the details below individual page titles on the home page .detail span { font-weight: 600; font-size: 0.8rem; color: $lower1; } + display: block; + margin: 0 auto; + max-width: 860px; + + .detail.page-detail span { + font-size: 1rem; + } + .detail span:first-child::after { content: " - "; } } +article.homepage-article { + @include a-normal($class: ".homepage-link"); +} + footer { @include flex-center; } -main { - display: block; - margin: 0 auto; - max-width: 860px; +// stuff on pages + +:not(pre) > code { + // add background with rounded corners + background: $lowerbg1; + padding: 0.2rem; + border-radius: 0.3rem; + + // wrap words instead of causing scrolling + word-wrap: break-word; +} + +img { + // make the alt text extremely obnoxious and harder to miss if the image + // is missing + font-size: 3rem; + color: #0f0; +} + +div.image { + display: flex; + align-content: center; + justify-content: center; + + img { + border-radius: .3rem; + } +} + +blockquote { + border-left: solid $higherbg1; + border-left-width: 0.5rem; + padding-left: 1rem; + margin-left: 1.5rem; +} + +/* headings */ + +h1 { + line-height: 1.10; +} + +h1, h2 { + margin-block-end: 0.1rem; } \ No newline at end of file diff --git a/static/css/normalize.css b/static/css/normalize.css new file mode 100644 index 0000000..192eb9c --- /dev/null +++ b/static/css/normalize.css @@ -0,0 +1,349 @@ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. + */ + +html { + line-height: 1.15; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers. + */ + +body { + margin: 0; +} + +/** + * Render the `main` element consistently in IE. + */ + +main { + 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 + ========================================================================== */ + +/** + * 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 + ========================================================================== */ + +/** + * Remove the gray background on active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * 1. Remove the bottom border in Chrome 57- + * 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 */ +} + +/** + * 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 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 + ========================================================================== */ + +/** + * Remove the border on images inside links in IE 10. + */ + +img { + border-style: none; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 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; +} + +/** + * Correct the inability to style clickable types in iOS and Safari. + */ + +button, +[type="button"], +[type="reset"], +[type="submit"] { + -webkit-appearance: button; +} + +/** + * 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; +} + +/** + * Correct the padding in Firefox. + */ + +fieldset { + padding: 0.35em 0.75em 0.625em; +} + +/** + * 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 */ +} + +/** + * Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + vertical-align: baseline; +} + +/** + * Remove the default vertical scrollbar in IE 10+. + */ + +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 in Chrome and Safari on macOS. + */ + +[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 Edge, IE 10+, and Firefox. + */ + +details { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Misc + ========================================================================== */ + +/** + * Add the correct display in IE 10+. + */ + +template { + display: none; +} + +/** + * Add the correct display in IE 10. + */ + +[hidden] { + display: none; +} diff --git a/static/images/Annotation-2019-04-16-172723.png b/static/images/Annotation-2019-04-16-172723.png new file mode 100644 index 0000000..1e02a78 Binary files /dev/null and b/static/images/Annotation-2019-04-16-172723.png differ diff --git a/static/images/XH8q54D.png b/static/images/XH8q54D.png new file mode 100644 index 0000000..0e26053 Binary files /dev/null and b/static/images/XH8q54D.png differ diff --git a/static/images/aeJcTos.jpg b/static/images/aeJcTos.jpg new file mode 100644 index 0000000..a893509 Binary files /dev/null and b/static/images/aeJcTos.jpg differ diff --git a/static/images/autonomous-robot.jpg b/static/images/autonomous-robot.jpg new file mode 100644 index 0000000..f1fa5aa Binary files /dev/null and b/static/images/autonomous-robot.jpg differ diff --git a/static/images/autonomous-robot_o.jpg b/static/images/autonomous-robot_o.jpg new file mode 100644 index 0000000..1095ea1 Binary files /dev/null and b/static/images/autonomous-robot_o.jpg differ diff --git a/static/images/event5858.png b/static/images/event5858.png new file mode 100644 index 0000000..c194cae Binary files /dev/null and b/static/images/event5858.png differ diff --git a/static/images/fusionleak.png b/static/images/fusionleak.png new file mode 100644 index 0000000..54007ca Binary files /dev/null and b/static/images/fusionleak.png differ diff --git a/static/images/gatsby-astronaut.png b/static/images/gatsby-astronaut.png new file mode 100644 index 0000000..da58ece Binary files /dev/null and b/static/images/gatsby-astronaut.png differ diff --git a/static/images/gatsby-icon.png b/static/images/gatsby-icon.png new file mode 100644 index 0000000..908bc78 Binary files /dev/null and b/static/images/gatsby-icon.png differ diff --git a/static/images/jar-configs.png b/static/images/jar-configs.png new file mode 100644 index 0000000..c624dc8 Binary files /dev/null and b/static/images/jar-configs.png differ diff --git a/static/images/jar-post.png b/static/images/jar-post.png new file mode 100644 index 0000000..990b566 Binary files /dev/null and b/static/images/jar-post.png differ diff --git a/static/images/jar-pre.png b/static/images/jar-pre.png new file mode 100644 index 0000000..01d35df Binary files /dev/null and b/static/images/jar-pre.png differ diff --git a/static/images/kicad-crystals.png b/static/images/kicad-crystals.png new file mode 100644 index 0000000..8b1dc2c Binary files /dev/null and b/static/images/kicad-crystals.png differ diff --git a/static/images/macropad-back-small.jpg b/static/images/macropad-back-small.jpg new file mode 100644 index 0000000..7201ddd Binary files /dev/null and b/static/images/macropad-back-small.jpg differ diff --git a/static/images/macropad-front-small.jpg b/static/images/macropad-front-small.jpg new file mode 100644 index 0000000..7bb121d Binary files /dev/null and b/static/images/macropad-front-small.jpg differ diff --git a/static/images/macropad-in-hand-small-1.jpg b/static/images/macropad-in-hand-small-1.jpg new file mode 100644 index 0000000..dec7d8f Binary files /dev/null and b/static/images/macropad-in-hand-small-1.jpg differ diff --git a/static/images/macropad-in-hand-small.jpg b/static/images/macropad-in-hand-small.jpg new file mode 100644 index 0000000..dec7d8f Binary files /dev/null and b/static/images/macropad-in-hand-small.jpg differ diff --git a/static/images/meshmixer-default.png b/static/images/meshmixer-default.png new file mode 100644 index 0000000..29037f1 Binary files /dev/null and b/static/images/meshmixer-default.png differ diff --git a/static/images/meshmixer-fixed.png b/static/images/meshmixer-fixed.png new file mode 100644 index 0000000..6b9e980 Binary files /dev/null and b/static/images/meshmixer-fixed.png differ diff --git a/static/images/meshmixer-setting-fix.png b/static/images/meshmixer-setting-fix.png new file mode 100644 index 0000000..96f058b Binary files /dev/null and b/static/images/meshmixer-setting-fix.png differ diff --git a/static/images/new-keyboard.jpg b/static/images/new-keyboard.jpg new file mode 100644 index 0000000..36e7261 Binary files /dev/null and b/static/images/new-keyboard.jpg differ diff --git a/static/images/robotics-court.jpg b/static/images/robotics-court.jpg new file mode 100644 index 0000000..f351faa Binary files /dev/null and b/static/images/robotics-court.jpg differ diff --git a/static/images/robotics-header-1.jpg b/static/images/robotics-header-1.jpg new file mode 100644 index 0000000..cbc143a Binary files /dev/null and b/static/images/robotics-header-1.jpg differ diff --git a/static/images/robotics-header.jpg b/static/images/robotics-header.jpg new file mode 100644 index 0000000..cbc143a Binary files /dev/null and b/static/images/robotics-header.jpg differ diff --git a/static/images/robotics-header_o-1.jpg b/static/images/robotics-header_o-1.jpg new file mode 100644 index 0000000..7d29b4f Binary files /dev/null and b/static/images/robotics-header_o-1.jpg differ diff --git a/static/images/robotics-header_o.jpg b/static/images/robotics-header_o.jpg new file mode 100644 index 0000000..7d29b4f Binary files /dev/null and b/static/images/robotics-header_o.jpg differ diff --git a/static/images/robotics-internals.jpg b/static/images/robotics-internals.jpg new file mode 100644 index 0000000..def2aad Binary files /dev/null and b/static/images/robotics-internals.jpg differ diff --git a/static/images/slowfolder.png b/static/images/slowfolder.png new file mode 100644 index 0000000..73ebe4e Binary files /dev/null and b/static/images/slowfolder.png differ diff --git a/static/images/ss1.png b/static/images/ss1.png new file mode 100644 index 0000000..29037f1 Binary files /dev/null and b/static/images/ss1.png differ diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..eabc618 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,42 @@ + + +
+ + + + +{{ __tera_context | escape | safe }}
- {{ __tera_context | escape | safe }}
+{% endif %}
+{% endblock content %}
\ No newline at end of file
diff --git a/templates/page.html b/templates/page.html
new file mode 100644
index 0000000..afbc103
--- /dev/null
+++ b/templates/page.html
@@ -0,0 +1,49 @@
+{% extends "base.html" %}
+
+{% block content %}
+{{ __tera_context | escape | safe }}
+{% endif %}
+
+{# back/forward buttons #}
+{% if not page.extra.isPage %}
+
+{% endif %}
+
+
+{% endblock content %}
\ No newline at end of file
diff --git a/templates/shortcodes/image.html b/templates/shortcodes/image.html
new file mode 100644
index 0000000..28368ff
--- /dev/null
+++ b/templates/shortcodes/image.html
@@ -0,0 +1,20 @@
+{% set name_sanitized = name | replace(from=".", to="-") | replace(from="/", to="-") %}
+{% set image_id = "image" ~ name_sanitized %}
+{% set alt = alt | default(value=body) %}
+{% set height = height | default(value=600) %}
+