Apply prettier and djlint

This commit is contained in:
Adam Goldsmith 2023-03-24 12:41:18 -04:00
parent c893ec385b
commit 6b2d5df075
16 changed files with 256 additions and 225 deletions

0
.prettierrc Normal file
View File

View File

@ -15,6 +15,7 @@ Favorite short stories that I think everyone should read: [The Last Question](ht
- User ad1217 in most places - User ad1217 in most places
### Some other stuff I host on this server ### Some other stuff I host on this server
- [A calendar of my classes, autogenerated](/WPI_Classes.ics/) - [A calendar of my classes, autogenerated](/WPI_Classes.ics/)
- [My git repos (including dotfiles) which are not on github](/cgit/) - [My git repos (including dotfiles) which are not on github](/cgit/)

View File

@ -13,15 +13,15 @@
@import url("pygment.css"); @import url("pygment.css");
body { body {
background: #1E1E1E; background: #1e1e1e;
color: #EEE; color: #eee;
font: 15px Hoefler Text, bodyfont, serif; font: 15px Hoefler Text, bodyfont, serif;
max-width: 50em; max-width: 50em;
margin: 20px 20px 0 64px; margin: 20px 20px 0 64px;
} }
h1 { h1 {
color: #F00; color: #f00;
font-family: Helvetica, sans-serif; font-family: Helvetica, sans-serif;
font-size: 1.5em; font-size: 1.5em;
font-weight: normal; font-weight: normal;
@ -29,19 +29,19 @@ h1 {
} }
h2 { h2 {
color: #DDD; color: #ddd;
font-family: Helvetica, sans-serif; font-family: Helvetica, sans-serif;
font-size: 1.3em; font-size: 1.3em;
} }
h3 { h3 {
color: #CCC; color: #ccc;
font-family: Helvetica, sans-serif; font-family: Helvetica, sans-serif;
font-size: 1em; font-size: 1em;
} }
h4 { h4 {
color: #CCC; color: #ccc;
font-family: Helvetica, sans-serif; font-family: Helvetica, sans-serif;
font-size: 0.9em; font-size: 0.9em;
} }
@ -52,12 +52,13 @@ time {
font-variant: small-caps; font-variant: small-caps;
} }
#site-title, #site-title:visited{ #site-title,
#site-title:visited {
color: #ddd; color: #ddd;
font-size: 150%; font-size: 150%;
} }
#site-title:hover{ #site-title:hover {
color: #fff; color: #fff;
background-color: transparent; background-color: transparent;
font-size: 150%; font-size: 150%;
@ -78,7 +79,7 @@ img {
} }
blockquote { blockquote {
border-left: 1px solid #A5ABAB; border-left: 1px solid #a5abab;
margin: 0px; margin: 0px;
padding: 0 12px 0 12px; padding: 0 12px 0 12px;
} }
@ -105,19 +106,21 @@ a:hover {
} }
a:visited { a:visited {
color: #6F6144; color: #6f6144;
} }
a:visited:hover { a:visited:hover {
background-color: #F60; background-color: #f60;
color: white; color: white;
} }
ul, ol { ul,
padding: .5em 0em 1em 3.2em; ol {
padding: 0.5em 0em 1em 3.2em;
} }
ul li, ol li { ul li,
ol li {
line-height: 30px; line-height: 30px;
padding: 6px 0 0 0; padding: 6px 0 0 0;
} }
@ -128,8 +131,9 @@ strong {
font-weight: bold; font-weight: bold;
} }
tt, pre { tt,
background-color: #2A2A2A; pre {
background-color: #2a2a2a;
font-family: Inconsolata, Monaco, monospace; font-family: Inconsolata, Monaco, monospace;
line-height: 1.2em; line-height: 1.2em;
} }
@ -163,8 +167,8 @@ header a#page-title {
} }
footer { footer {
background: #2A2A2A; background: #2a2a2a;
color: #CCC; color: #ccc;
font-family: helvetica, sans-serif; font-family: helvetica, sans-serif;
font-size: 13px; font-size: 13px;
letter-spacing: 4px; letter-spacing: 4px;

View File

@ -1,205 +1,205 @@
.hll { .hll {
background-color:#FFFFCC; background-color: #ffffcc;
} }
.c { .c {
color:#408090; color: #408090;
font-style:italic; font-style: italic;
} }
.err { .err {
border:1px solid #FF0000; border: 1px solid #ff0000;
} }
.k { .k {
color:#007020; color: #007020;
font-weight:bold; font-weight: bold;
} }
.o { .o {
color:#666666; color: #666666;
} }
.cm { .cm {
color:#408090; color: #408090;
font-style:italic; font-style: italic;
} }
.cp { .cp {
color:#007020; color: #007020;
} }
.c1 { .c1 {
color:#408090; color: #408090;
font-style:italic; font-style: italic;
} }
.cs { .cs {
background-color:#FFF0F0; background-color: #fff0f0;
color:#408090; color: #408090;
} }
.gd { .gd {
color:#A00000; color: #a00000;
} }
.ge { .ge {
font-style:italic; font-style: italic;
} }
.gr { .gr {
color:#FF0000; color: #ff0000;
} }
.gh { .gh {
color:#000080; color: #000080;
font-weight:bold; font-weight: bold;
} }
.gi { .gi {
color:#00A000; color: #00a000;
} }
.go { .go {
color:#303030; color: #303030;
} }
.gp { .gp {
color:#C65D09; color: #c65d09;
font-weight:bold; font-weight: bold;
} }
.gs { .gs {
font-weight:bold; font-weight: bold;
} }
.gu { .gu {
color:#800080; color: #800080;
font-weight:bold; font-weight: bold;
} }
.gt { .gt {
color:#0040D0; color: #0040d0;
} }
.kc { .kc {
color:#007020; color: #007020;
font-weight:bold; font-weight: bold;
} }
.kd { .kd {
color:#007020; color: #007020;
font-weight:bold; font-weight: bold;
} }
.kn { .kn {
color:#007020; color: #007020;
font-weight:bold; font-weight: bold;
} }
.kp { .kp {
color:#007020; color: #007020;
} }
.kr { .kr {
color:#007020; color: #007020;
font-weight:bold; font-weight: bold;
} }
.kt { .kt {
color:#902000; color: #902000;
} }
.m { .m {
color:#208050; color: #208050;
} }
.s { .s {
color:#4070A0; color: #4070a0;
} }
.na { .na {
color:#4070A0; color: #4070a0;
} }
.nb { .nb {
color:#007020; color: #007020;
} }
.nc { .nc {
color:#0E84B5; color: #0e84b5;
font-weight:bold; font-weight: bold;
} }
.no { .no {
color:#60ADD5; color: #60add5;
} }
.nd { .nd {
color:#555555; color: #555555;
font-weight:bold; font-weight: bold;
} }
.ni { .ni {
color:#D55537; color: #d55537;
font-weight:bold; font-weight: bold;
} }
.ne { .ne {
color:#007020; color: #007020;
} }
.nf { .nf {
color:#10D0E0; color: #10d0e0;
} }
.nl { .nl {
color:#002070; color: #002070;
font-weight:bold; font-weight: bold;
} }
.nn { .nn {
color:#0E84B5; color: #0e84b5;
font-weight:bold; font-weight: bold;
} }
.nt { .nt {
color:#062873; color: #062873;
font-weight:bold; font-weight: bold;
} }
.nv { .nv {
color:#BB60D5; color: #bb60d5;
} }
.ow { .ow {
color:#007020; color: #007020;
font-weight:bold; font-weight: bold;
} }
.w { .w {
color:#BBBBBB; color: #bbbbbb;
} }
.mf { .mf {
color:#208050; color: #208050;
} }
.mh { .mh {
color:#208050; color: #208050;
} }
.mi { .mi {
color:#208050; color: #208050;
} }
.mo { .mo {
color:#208050; color: #208050;
} }
.sb { .sb {
color:#4070A0; color: #4070a0;
} }
.sc { .sc {
color:#4070A0; color: #4070a0;
} }
.sd { .sd {
color:#4070A0; color: #4070a0;
font-style:italic; font-style: italic;
} }
.s2 { .s2 {
color:#4070A0; color: #4070a0;
} }
.se { .se {
color:#4070A0; color: #4070a0;
font-weight:bold; font-weight: bold;
} }
.sh { .sh {
color:#4070A0; color: #4070a0;
} }
.si { .si {
color:#70A0D0; color: #70a0d0;
font-style:italic; font-style: italic;
} }
.sx { .sx {
color:#C65D09; color: #c65d09;
} }
.sr { .sr {
color:#235388; color: #235388;
} }
.s1 { .s1 {
color:#4070A0; color: #4070a0;
} }
.ss { .ss {
color:#517918; color: #517918;
} }
.bp { .bp {
color:#007020; color: #007020;
} }
.vc { .vc {
color:#BB60D5; color: #bb60d5;
} }
.vg { .vg {
color:#BB60D5; color: #bb60d5;
} }
.vi { .vi {
color:#BB60D5; color: #bb60d5;
} }
.il { .il {
color:#208050; color: #208050;
} }

View File

@ -1,13 +1,16 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
<section id="content" class="body"> <section id="content" class="body">
<h1>Archives for {{ SITENAME }}</h1> <h1>Archives for {{ SITENAME }}</h1>
<dl>
<dl> {% for article in dates %}
{% for article in dates %} <dt>
<dt>{{ article.locale_date }}</dt> {{ article.locale_date }}
<dd><a href='{{ article.url }}'>{{ article.title }}</a></dd> </dt>
{% endfor %} <dd>
</dl> <a href='{{ article.url }}'>{{ article.title }}</a>
</section> </dd>
{% endfor %}
</dl>
</section>
{% endblock %} {% endblock %}

View File

@ -1,17 +1,15 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}{{ super() }} : {{ article.title }}{% endblock %} {% block title %}{{ super() }} : {{ article.title }}{% endblock %}
{% block content %} {% block content %}
{% include 'article_infos.html' %} {% include 'article_infos.html' %}
<article> <article>
{{ article.content }} {{ article.content }}
<p id="cat-tags">
<p id="cat-tags"> category: <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a> category: <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
{% if article.tags %} {% if article.tags %}
tags: tags:
{% for tag in article.tags %} {% for tag in article.tags %}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag | escape }}</a>{% endfor %}
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag | escape }}</a>
{% endfor %}
{% endif %} {% endif %}
</p> </p>
</article> </article>
{% endblock %} {% endblock %}

View File

@ -1,4 +1,6 @@
<header> <header>
<h1><a href="{{ SITEURL }}/{{ article.url }}" id="page-title">{{ article.title }}</a></h1> <h1>
<a href="{{ SITEURL }}/{{ article.url }}" id="page-title">{{ article.title }}</a>
</h1>
{% if not HIDE_DATE %}<time datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time>{% endif %} {% if not HIDE_DATE %}<time datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time>{% endif %}
</header> </header>

View File

@ -1,49 +1,60 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<title>{% block title %}{{ SITENAME }}{%endblock%}</title> <title>
{% block title %}{{ SITENAME }}{% endblock %}
</title>
<meta charset="utf-8" /> <meta charset="utf-8" />
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/{{ CSS_FILE }}" type="text/css" /> <link rel="stylesheet"
<link href="{{ SITEURL }}/{{ FEED_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} ATOM Feed" /> href="{{ SITEURL }}/theme/css/{{ CSS_FILE }}"
type="text/css"/>
<link href="{{ SITEURL }}/{{ FEED_ATOM }}"
type="application/atom+xml"
rel="alternate"
title="{{ SITENAME }} ATOM Feed"/>
{% if FEED_RSS %} {% if FEED_RSS %}
<link href="{{ SITEURL }}/{{ FEED_RSS }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" /> <link href="{{ SITEURL }}/{{ FEED_RSS }}"
type="application/atom+xml"
rel="alternate"
title="{{ SITENAME }} RSS Feed"/>
{% endif %} {% endif %}
<!--[if IE]> <!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]--> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<!--[if lte IE 7]> <!--[if lte IE 7]>
<link rel="stylesheet" type="text/css" media="all" href="{{ SITEURL }}/css/ie.css"/> <link rel="stylesheet" type="text/css" media="all" href="{{ SITEURL }}/css/ie.css"/>
<script src="{{ SITEURL }}/js/IE8.js" type="text/javascript"></script><![endif]--> <script src="{{ SITEURL }}/js/IE8.js" type="text/javascript"></script><![endif]-->
<!--[if lt IE 7]> <!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" media="all" href="{{ SITEURL }}/css/ie6.css"/><![endif]--> <link rel="stylesheet" type="text/css" media="all" href="{{ SITEURL }}/css/ie6.css"/><![endif]-->
</head> </head>
<body>
<body>
<header> <header>
<a href="{{ SITEURL }}" id="site-title">{{ SITENAME }}</a> <a href="{{ SITEURL }}" id="site-title">{{ SITENAME }}</a>
<div id="sitesubtitle">{% if SITESUBTITLE %} {{ SITESUBTITLE }}{% endif %}</div> <div id="sitesubtitle">
{% if SITESUBTITLE %}{{ SITESUBTITLE }}{% endif %}
</div>
</header> </header>
{% block content %}{% endblock %}
{% block content %}
{% endblock %}
<footer> <footer>
<nav> <nav>
<ul> <ul>
{% for page in pages %} {% for page in pages %}
<li><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a>{% if not loop.last %} ::{% endif %}</li> <li>
<a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a>
{% if not loop.last %}::{% endif %}
</li>
{% endfor %} {% endfor %}
{% if categories|length > 1 %} {% if categories|length > 1 %}
<li>:: <a href="{{ SITEURL }}/categories.html">Categories</a></li> <li>
:: <a href="{{ SITEURL }}/categories.html">Categories</a>
</li>
{% endif %} {% endif %}
{% if tags|length > 1 %} {% if tags|length > 1 %}
<li>:: <a href="{{ SITEURL }}/tags.html">Tags</a></li> <li>
:: <a href="{{ SITEURL }}/tags.html">Tags</a>
</li>
{% endif %} {% endif %}
</ul> </ul>
</nav> </nav>
</footer> </footer>
</body> </body>
</html> </html>

View File

@ -1,8 +1,10 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
<ul> <ul>
{% for category, articles in categories %} {% for category, articles in categories %}
<li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a></li> <li>
{% endfor %} <a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a>
</ul> </li>
{% endfor %}
</ul>
{% endblock %} {% endblock %}

View File

@ -1,19 +1,17 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
{% if articles %} {% if articles %}
{% for article in articles_page.object_list %} {% for article in articles_page.object_list %}
{% include 'article_infos.html' %} {% include 'article_infos.html' %}
<article> <article>
{{ article.summary }} {{ article.summary }}
<a class="readmore" href="{{ SITEURL }}/{{ article.url }}">read more</a> <a class="readmore" href="{{ SITEURL }}/{{ article.url }}">read more</a>
</article> </article>
{% endfor %} {% endfor %}
{% if articles_page.has_other_pages() %}
{% if articles_page.has_other_pages() %}
{% include 'pagination.html' %} {% include 'pagination.html' %}
{% endif %} {% endif %}
{% else %}
{% else %}
No articles. No articles.
{% endif %} {% endif %}
{% endblock content %} {% endblock content %}

View File

@ -1,10 +1,12 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}{{ page.title }}{% endblock %} {% block title %}{{ page.title }}{% endblock %}
{% block content %} {% block content %}
<header> <header>
<h1><a href="{{ SITEURL }}/{{ page.slug }}" id="page-title">{{ page.title }}</a></h1> <h1>
</header> <a href="{{ SITEURL }}/{{ page.slug }}" id="page-title">{{ page.title }}</a>
<article> </h1>
</header>
<article>
{{ page.content }} {{ page.content }}
</article> </article>
{% endblock %} {% endblock %}

View File

@ -1,5 +1,5 @@
{% if DEFAULT_PAGINATION %} {% if DEFAULT_PAGINATION %}
<p class="paginator"> <p class="paginator">
{% if articles_page.has_previous() %} {% if articles_page.has_previous() %}
{% if articles_page.previous_page_number() == 1 %} {% if articles_page.previous_page_number() == 1 %}
<a href="{{ SITEURL }}/{{ page_name }}.html">&laquo;</a> <a href="{{ SITEURL }}/{{ page_name }}.html">&laquo;</a>
@ -11,5 +11,5 @@
{% if articles_page.has_next() %} {% if articles_page.has_next() %}
<a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">&raquo;</a> <a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">&raquo;</a>
{% endif %} {% endif %}
</p> </p>
{% endif %} {% endif %}

View File

@ -1,2 +1,11 @@
{% if article.tags %}<p>tags: {% for tag in article.tags %}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% endfor %}</p>{% endif %} {% if article.tags %}
{% if PDF_PROCESSOR %}<p><a href="{{ SITEURL }}/pdf/{{ article.slug }}.pdf">get the pdf</a></p>{% endif %} <p>
tags:
{% for tag in article.tags %}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% endfor %}
</p>
{% endif %}
{% if PDF_PROCESSOR %}
<p>
<a href="{{ SITEURL }}/pdf/{{ article.slug }}.pdf">get the pdf</a>
</p>
{% endif %}

View File

@ -1,9 +1,10 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
<ul> <ul>
{% for tag, articles in tags %} {% for tag, articles in tags %}
<li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a></li> <li>
{% endfor %} <a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>
</ul> </li>
{% endfor %}
</ul>
{% endblock %} {% endblock %}