From 6b2d5df075bdc30fc2c548aa8b1c4b66cb7ce391 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Fri, 24 Mar 2023 12:41:18 -0400 Subject: [PATCH] Apply prettier and djlint --- .prettierrc | 0 .../i-made-a-mechanical-keyboard-numpad.md | 4 +- .../robotics-tournament-and-exam-week.md | 16 +- content/pages/about.md | 11 +- theme-fred/static/css/main.css | 40 +++-- theme-fred/static/css/pygment.css | 166 +++++++++--------- theme-fred/templates/archives.html | 23 +-- theme-fred/templates/article.html | 24 ++- theme-fred/templates/article_infos.html | 4 +- theme-fred/templates/base.html | 87 +++++---- theme-fred/templates/categories.html | 12 +- theme-fred/templates/index.html | 30 ++-- theme-fred/templates/page.html | 14 +- theme-fred/templates/pagination.html | 24 +-- theme-fred/templates/taglist.html | 13 +- theme-fred/templates/tags.html | 13 +- 16 files changed, 256 insertions(+), 225 deletions(-) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..e69de29 diff --git a/content/articles/mech-numpad/i-made-a-mechanical-keyboard-numpad.md b/content/articles/mech-numpad/i-made-a-mechanical-keyboard-numpad.md index 4d3b00d..46ff167 100644 --- a/content/articles/mech-numpad/i-made-a-mechanical-keyboard-numpad.md +++ b/content/articles/mech-numpad/i-made-a-mechanical-keyboard-numpad.md @@ -5,7 +5,7 @@ Category: Uncategorized Tags: electronics, keyboard, Status: published -So I've been meaning to make a mechanical keyboard for a while, and finally got around to doing it. I had a teensy 2.0 and a bunch of Cherry MX brown knockoff switches lying around, so I just needed to design a board. +So I've been meaning to make a mechanical keyboard for a while, and finally got around to doing it. I had a teensy 2.0 and a bunch of Cherry MX brown knockoff switches lying around, so I just needed to design a board. I had previously designed and milled a plate for a 60%ish keyboard out of acrylic, but it was somewhat poorly thought out, so I decided to try something else. I backed the [Ultimate Hacking Keyboard](https://ultimatehackingkeyboard.com/) a while ago, so I thought I'd make a numpad, since that keyboard doesn't have one. However, I decided to make it just an array of 1x1 switches instead of the normal numpad 1x1 and 2x1 so that it is more configurable. I guess I can 3D print 2x1 caps that span the switches later if I change my mind. @@ -25,6 +25,6 @@ Really, much nicer than I was expecting. Soldering was, however, almost exactly For software, I decided on [QMK](https://github.com/qmk/qmk_firmware), a derivative of TMK. I didn't do all that much research, but I don't really need that many features, and someone wrote a [relatively simple configurator](https://kbfirmware.com/) for QMK. I still haven't really decided on all the layers, but the base is mostly just a normal keypad. -I'm not sure what I'll do for casing. My original plan was milled wood, but with it quite a bit taller than I'd planned, I'm considering just putting rubber bumpers or something and using the angle to my advantage. +I'm not sure what I'll do for casing. My original plan was milled wood, but with it quite a bit taller than I'd planned, I'm considering just putting rubber bumpers or something and using the angle to my advantage. So yeah, my first (relatively poorly thought) out mechanical keyboard build. [Here are some files]({attach}numpad.zip), just in case someone happens to want to build this. diff --git a/content/articles/robotics-tournament-and-exam-week/robotics-tournament-and-exam-week.md b/content/articles/robotics-tournament-and-exam-week/robotics-tournament-and-exam-week.md index a389ee7..d1e37c3 100644 --- a/content/articles/robotics-tournament-and-exam-week/robotics-tournament-and-exam-week.md +++ b/content/articles/robotics-tournament-and-exam-week/robotics-tournament-and-exam-week.md @@ -13,14 +13,14 @@ The robotics competition started on Thursday (just for setup), and went until Sa My thoughts on the game/competition: -- the noodles were much more important than I had anticipated. There were many matches where throwing them earned the majority of the points. (up to 40. for reference, our final qualifying average was somewhere around 20, while the first seed (1519)'s was around 80) - - I am not really fond of this: human players shouldn't be that important. The robot it the important part. -- Autonomous rarely scored many points (since it basically required all of the robots to work/have an autonomous), with the exception of 1519, who could do a 3 tote stack. - - Also pretty annoying, since that meant that programming didn't really have any oportunity to show off. -- Using average points was a bit weird, and I don't think I liked that much either (even though it helped us a bit). - - Being paired with a top team meant that you could have a very high scoring match, drastically rasing your average (and therefore your rank). The reverse is also true; a poor alliance can quickly decrease your score/rank. I saw one match where a team got raised 11 ranks, and in one of ours, we got raised 9. - - Previously each mach could only affect your team by adding or subtracting 1 from your "score," whereas here the change was much more significant -- Overall, it was a lot more fun as a spectator sport than I was expecting. Each match played out quite differently, even when we did the basically the same things +- the noodles were much more important than I had anticipated. There were many matches where throwing them earned the majority of the points. (up to 40. for reference, our final qualifying average was somewhere around 20, while the first seed (1519)'s was around 80) + - I am not really fond of this: human players shouldn't be that important. The robot it the important part. +- Autonomous rarely scored many points (since it basically required all of the robots to work/have an autonomous), with the exception of 1519, who could do a 3 tote stack. + - Also pretty annoying, since that meant that programming didn't really have any oportunity to show off. +- Using average points was a bit weird, and I don't think I liked that much either (even though it helped us a bit). + - Being paired with a top team meant that you could have a very high scoring match, drastically rasing your average (and therefore your rank). The reverse is also true; a poor alliance can quickly decrease your score/rank. I saw one match where a team got raised 11 ranks, and in one of ours, we got raised 9. + - Previously each mach could only affect your team by adding or subtracting 1 from your "score," whereas here the change was much more significant +- Overall, it was a lot more fun as a spectator sport than I was expecting. Each match played out quite differently, even when we did the basically the same things I have a bunch of stuff written down (in [todo.txt](https://github.com/ginatrapani/todo.txt-cli/), more on this later whenever I get around to it) for what needs to be done before our next competition (in Massachusetts, after break). Since robotics season (the winter trimester) is over, I can only hope things actually get done. diff --git a/content/pages/about.md b/content/pages/about.md index ea2de21..826e3f0 100644 --- a/content/pages/about.md +++ b/content/pages/about.md @@ -10,12 +10,13 @@ Favorite short stories that I think everyone should read: [The Last Question](ht #### Me, in other places: -- [Github](https://github.com/ad1217) -- [Hackaday.io](http://hackaday.io/hacker/14006-adam-goldsmith) -- User ad1217 in most places +- [Github](https://github.com/ad1217) +- [Hackaday.io](http://hackaday.io/hacker/14006-adam-goldsmith) +- User ad1217 in most places ### Some other stuff I host on this server -- [A calendar of my classes, autogenerated](/WPI_Classes.ics/) -- [My git repos (including dotfiles) which are not on github](/cgit/) + +- [A calendar of my classes, autogenerated](/WPI_Classes.ics/) +- [My git repos (including dotfiles) which are not on github](/cgit/) Here is my PGP pubkey: [pubkey.gpg](/pubkey.gpg) diff --git a/theme-fred/static/css/main.css b/theme-fred/static/css/main.css index bee8432..9c07aef 100644 --- a/theme-fred/static/css/main.css +++ b/theme-fred/static/css/main.css @@ -13,15 +13,15 @@ @import url("pygment.css"); body { - background: #1E1E1E; - color: #EEE; + background: #1e1e1e; + color: #eee; font: 15px Hoefler Text, bodyfont, serif; max-width: 50em; margin: 20px 20px 0 64px; } h1 { - color: #F00; + color: #f00; font-family: Helvetica, sans-serif; font-size: 1.5em; font-weight: normal; @@ -29,19 +29,19 @@ h1 { } h2 { - color: #DDD; + color: #ddd; font-family: Helvetica, sans-serif; font-size: 1.3em; } h3 { - color: #CCC; + color: #ccc; font-family: Helvetica, sans-serif; font-size: 1em; } h4 { - color: #CCC; + color: #ccc; font-family: Helvetica, sans-serif; font-size: 0.9em; } @@ -52,12 +52,13 @@ time { font-variant: small-caps; } -#site-title, #site-title:visited{ +#site-title, +#site-title:visited { color: #ddd; font-size: 150%; } -#site-title:hover{ +#site-title:hover { color: #fff; background-color: transparent; font-size: 150%; @@ -78,7 +79,7 @@ img { } blockquote { - border-left: 1px solid #A5ABAB; + border-left: 1px solid #a5abab; margin: 0px; padding: 0 12px 0 12px; } @@ -105,19 +106,21 @@ a:hover { } a:visited { - color: #6F6144; + color: #6f6144; } a:visited:hover { - background-color: #F60; + background-color: #f60; color: white; } -ul, ol { - padding: .5em 0em 1em 3.2em; +ul, +ol { + padding: 0.5em 0em 1em 3.2em; } -ul li, ol li { +ul li, +ol li { line-height: 30px; padding: 6px 0 0 0; } @@ -128,8 +131,9 @@ strong { font-weight: bold; } -tt, pre { - background-color: #2A2A2A; +tt, +pre { + background-color: #2a2a2a; font-family: Inconsolata, Monaco, monospace; line-height: 1.2em; } @@ -163,8 +167,8 @@ header a#page-title { } footer { - background: #2A2A2A; - color: #CCC; + background: #2a2a2a; + color: #ccc; font-family: helvetica, sans-serif; font-size: 13px; letter-spacing: 4px; diff --git a/theme-fred/static/css/pygment.css b/theme-fred/static/css/pygment.css index 0c7ac87..4966856 100644 --- a/theme-fred/static/css/pygment.css +++ b/theme-fred/static/css/pygment.css @@ -1,205 +1,205 @@ .hll { -background-color:#FFFFCC; + background-color: #ffffcc; } .c { -color:#408090; -font-style:italic; + color: #408090; + font-style: italic; } .err { -border:1px solid #FF0000; + border: 1px solid #ff0000; } .k { -color:#007020; -font-weight:bold; + color: #007020; + font-weight: bold; } .o { -color:#666666; + color: #666666; } .cm { -color:#408090; -font-style:italic; + color: #408090; + font-style: italic; } .cp { -color:#007020; + color: #007020; } .c1 { -color:#408090; -font-style:italic; + color: #408090; + font-style: italic; } .cs { -background-color:#FFF0F0; -color:#408090; + background-color: #fff0f0; + color: #408090; } .gd { -color:#A00000; + color: #a00000; } .ge { -font-style:italic; + font-style: italic; } .gr { -color:#FF0000; + color: #ff0000; } .gh { -color:#000080; -font-weight:bold; + color: #000080; + font-weight: bold; } .gi { -color:#00A000; + color: #00a000; } .go { -color:#303030; + color: #303030; } .gp { -color:#C65D09; -font-weight:bold; + color: #c65d09; + font-weight: bold; } .gs { -font-weight:bold; + font-weight: bold; } .gu { -color:#800080; -font-weight:bold; + color: #800080; + font-weight: bold; } .gt { -color:#0040D0; + color: #0040d0; } .kc { -color:#007020; -font-weight:bold; + color: #007020; + font-weight: bold; } .kd { -color:#007020; -font-weight:bold; + color: #007020; + font-weight: bold; } .kn { -color:#007020; -font-weight:bold; + color: #007020; + font-weight: bold; } .kp { -color:#007020; + color: #007020; } .kr { -color:#007020; -font-weight:bold; + color: #007020; + font-weight: bold; } .kt { -color:#902000; + color: #902000; } .m { -color:#208050; + color: #208050; } .s { -color:#4070A0; + color: #4070a0; } .na { -color:#4070A0; + color: #4070a0; } .nb { -color:#007020; + color: #007020; } .nc { -color:#0E84B5; -font-weight:bold; + color: #0e84b5; + font-weight: bold; } .no { -color:#60ADD5; + color: #60add5; } .nd { -color:#555555; -font-weight:bold; + color: #555555; + font-weight: bold; } .ni { -color:#D55537; -font-weight:bold; + color: #d55537; + font-weight: bold; } .ne { -color:#007020; + color: #007020; } .nf { -color:#10D0E0; + color: #10d0e0; } .nl { -color:#002070; -font-weight:bold; + color: #002070; + font-weight: bold; } .nn { -color:#0E84B5; -font-weight:bold; + color: #0e84b5; + font-weight: bold; } .nt { -color:#062873; -font-weight:bold; + color: #062873; + font-weight: bold; } .nv { -color:#BB60D5; + color: #bb60d5; } .ow { -color:#007020; -font-weight:bold; + color: #007020; + font-weight: bold; } .w { -color:#BBBBBB; + color: #bbbbbb; } .mf { -color:#208050; + color: #208050; } .mh { -color:#208050; + color: #208050; } .mi { -color:#208050; + color: #208050; } .mo { -color:#208050; + color: #208050; } .sb { -color:#4070A0; + color: #4070a0; } .sc { -color:#4070A0; + color: #4070a0; } .sd { -color:#4070A0; -font-style:italic; + color: #4070a0; + font-style: italic; } .s2 { -color:#4070A0; + color: #4070a0; } .se { -color:#4070A0; -font-weight:bold; + color: #4070a0; + font-weight: bold; } .sh { -color:#4070A0; + color: #4070a0; } .si { -color:#70A0D0; -font-style:italic; + color: #70a0d0; + font-style: italic; } .sx { -color:#C65D09; + color: #c65d09; } .sr { -color:#235388; + color: #235388; } .s1 { -color:#4070A0; + color: #4070a0; } .ss { -color:#517918; + color: #517918; } .bp { -color:#007020; + color: #007020; } .vc { -color:#BB60D5; + color: #bb60d5; } .vg { -color:#BB60D5; + color: #bb60d5; } .vi { -color:#BB60D5; + color: #bb60d5; } .il { -color:#208050; + color: #208050; } diff --git a/theme-fred/templates/archives.html b/theme-fred/templates/archives.html index 5ba2c81..b110046 100644 --- a/theme-fred/templates/archives.html +++ b/theme-fred/templates/archives.html @@ -1,13 +1,16 @@ {% extends "base.html" %} {% block content %} -
-

Archives for {{ SITENAME }}

- -
-{% for article in dates %} -
{{ article.locale_date }}
-
{{ article.title }}
-{% endfor %} -
-
+
+

Archives for {{ SITENAME }}

+
+ {% for article in dates %} +
+ {{ article.locale_date }} +
+
+ {{ article.title }} +
+ {% endfor %} +
+
{% endblock %} diff --git a/theme-fred/templates/article.html b/theme-fred/templates/article.html index 241835a..ddb72fe 100644 --- a/theme-fred/templates/article.html +++ b/theme-fred/templates/article.html @@ -1,17 +1,15 @@ {% extends "base.html" %} {% block title %}{{ super() }} : {{ article.title }}{% endblock %} {% block content %} -{% include 'article_infos.html' %} -
- {{ article.content }} - -

category: {{ article.category }} - {% if article.tags %} - tags: - {% for tag in article.tags %} - {{ tag | escape }} - {% endfor %} - {% endif %} -

-
+ {% include 'article_infos.html' %} +
+ {{ article.content }} +

+ category: {{ article.category }} + {% if article.tags %} + tags: + {% for tag in article.tags %}{{ tag | escape }}{% endfor %} + {% endif %} +

+
{% endblock %} diff --git a/theme-fred/templates/article_infos.html b/theme-fred/templates/article_infos.html index a99d2a7..89ed4c8 100644 --- a/theme-fred/templates/article_infos.html +++ b/theme-fred/templates/article_infos.html @@ -1,4 +1,6 @@
-

{{ article.title }}

+

+ {{ article.title }} +

{% if not HIDE_DATE %}{% endif %}
diff --git a/theme-fred/templates/base.html b/theme-fred/templates/base.html index 81a618d..af02ac7 100644 --- a/theme-fred/templates/base.html +++ b/theme-fred/templates/base.html @@ -1,49 +1,60 @@ - - {% block title %}{{ SITENAME }}{%endblock%} + + + {% block title %}{{ SITENAME }}{% endblock %} + - - + + {% if FEED_RSS %} - + {% endif %} - - + - + - - - -
- {{ SITENAME }} -
{% if SITESUBTITLE %} {{ SITESUBTITLE }}{% endif %}
-
- - - {% block content %} - {% endblock %} - - - + + +
+ {{ SITENAME }} +
+ {% if SITESUBTITLE %}{{ SITESUBTITLE }}{% endif %} +
+
+ {% block content %}{% endblock %} + + diff --git a/theme-fred/templates/categories.html b/theme-fred/templates/categories.html index e29be0c..55705e3 100644 --- a/theme-fred/templates/categories.html +++ b/theme-fred/templates/categories.html @@ -1,8 +1,10 @@ {% extends "base.html" %} {% block content %} - + {% endblock %} diff --git a/theme-fred/templates/index.html b/theme-fred/templates/index.html index 310fd7e..8a06f45 100644 --- a/theme-fred/templates/index.html +++ b/theme-fred/templates/index.html @@ -1,19 +1,17 @@ {% extends "base.html" %} {% block content %} -{% if articles %} - {% for article in articles_page.object_list %} - {% include 'article_infos.html' %} -
- {{ article.summary }} - read more -
-{% endfor %} - -{% if articles_page.has_other_pages() %} - {% include 'pagination.html' %} -{% endif %} - -{% else %} - No articles. -{% endif %} + {% if articles %} + {% for article in articles_page.object_list %} + {% include 'article_infos.html' %} +
+ {{ article.summary }} + read more +
+ {% endfor %} + {% if articles_page.has_other_pages() %} + {% include 'pagination.html' %} + {% endif %} + {% else %} + No articles. + {% endif %} {% endblock content %} diff --git a/theme-fred/templates/page.html b/theme-fred/templates/page.html index 81e2823..3906227 100644 --- a/theme-fred/templates/page.html +++ b/theme-fred/templates/page.html @@ -1,10 +1,12 @@ {% extends "base.html" %} {% block title %}{{ page.title }}{% endblock %} {% block content %} -
-

{{ page.title }}

-
-
- {{ page.content }} -
+
+

+ {{ page.title }} +

+
+
+ {{ page.content }} +
{% endblock %} diff --git a/theme-fred/templates/pagination.html b/theme-fred/templates/pagination.html index 83c587a..c430b8a 100644 --- a/theme-fred/templates/pagination.html +++ b/theme-fred/templates/pagination.html @@ -1,15 +1,15 @@ {% if DEFAULT_PAGINATION %} -

- {% if articles_page.has_previous() %} - {% if articles_page.previous_page_number() == 1 %} - « - {% else %} - « +

+ {% if articles_page.has_previous() %} + {% if articles_page.previous_page_number() == 1 %} + « + {% else %} + « + {% endif %} {% endif %} - {% endif %} - Page {{ articles_page.number }} / {{ articles_paginator.num_pages }} - {% if articles_page.has_next() %} - » - {% endif %} -

+ Page {{ articles_page.number }} / {{ articles_paginator.num_pages }} + {% if articles_page.has_next() %} + » + {% endif %} +

{% endif %} diff --git a/theme-fred/templates/taglist.html b/theme-fred/templates/taglist.html index c792fd7..e42e6a5 100644 --- a/theme-fred/templates/taglist.html +++ b/theme-fred/templates/taglist.html @@ -1,2 +1,11 @@ -{% if article.tags %}

tags: {% for tag in article.tags %}{{ tag }}{% endfor %}

{% endif %} -{% if PDF_PROCESSOR %}

get the pdf

{% endif %} +{% if article.tags %} +

+ tags: + {% for tag in article.tags %}{{ tag }}{% endfor %} +

+{% endif %} +{% if PDF_PROCESSOR %} +

+ get the pdf +

+{% endif %} diff --git a/theme-fred/templates/tags.html b/theme-fred/templates/tags.html index a6011a0..0380d15 100644 --- a/theme-fred/templates/tags.html +++ b/theme-fred/templates/tags.html @@ -1,9 +1,10 @@ {% extends "base.html" %} {% block content %} - + {% endblock %} -