diff --git a/README.md b/README.md index c8cdbed..4a172db 100644 --- a/README.md +++ b/README.md @@ -65,9 +65,7 @@ https://frnmst.github.io/the-flux-of-thought/ - No Javascript is used. See [The JavaScript Trap](https://www.gnu.org/philosophy/javascript-trap.html). - No local fonts are served. - No remote fonts are included (called). -- Boxes with outer shades are clickable links. -- Boxes with inner shades are NOT clickable links. -- Any box without shades, inner or outer, is either the navbar or the badges in the footer. +- A very minimal CSS is served. ## Versions diff --git a/_assets/badge-uses_minimal_css.svg b/_assets/badge-uses_minimal_css.svg new file mode 100644 index 0000000..7cd3394 --- /dev/null +++ b/_assets/badge-uses_minimal_css.svg @@ -0,0 +1 @@ + usesusesminimal CSSminimal CSS \ No newline at end of file diff --git a/_config.yml b/_config.yml index 53c097d..f89be9d 100644 --- a/_config.yml +++ b/_config.yml @@ -54,7 +54,7 @@ excerpts: enabled: true start: "" end: "" - words: 20 + words: 10 tags: score: diff --git a/_includes/anchor_headings.html b/_includes/anchor_headings.html index e50cbe6..21e2d04 100644 --- a/_includes/anchor_headings.html +++ b/_includes/anchor_headings.html @@ -1,86 +1,105 @@ {% capture headingsWorkspace %} - {% comment %} - Version 1.0.0 - https://github.com/allejo/jekyll-anchor-headings - - "Be the pull request you wish to see in the world." ~Ben Balter - - Usage: - {% include anchor_headings.html html=content %} - - Parameters: - * html (string) - the HTML of compiled markdown generated by kramdown in Jekyll - - Optional Parameters: - * beforeHeading (bool) : false - Set to true if the anchor should be placed _before_ the heading's content - * anchorBody (string) : '' - The content that will be placed inside the anchor; the `%heading%` placeholder is available - * anchorClass (string) : '' - The class(es) that will be used for each anchor. Separate multiple classes with a space - * anchorTitle (string) : '' - The `title` attribute that will be used for anchors - * h_min (int) : 1 - The minimum header level to build an anchor for; any header lower than this value will be ignored - * h_max (int) : 6 - The maximum header level to build an anchor for; any header greater than this value will be ignored - - Output: - The original HTML with the addition of anchors inside of all of the h1-h6 headings. - {% endcomment %} - - {% assign minHeader = include.h_min | default: 1 %} - {% assign maxHeader = include.h_max | default: 6 %} - {% assign beforeHeading = include.beforeHeading %} - {% assign nodes = include.html | split: ' - {% if headerLevel < 1 or headerLevel > 6 %} - {% capture edited_headings %}{{ edited_headings }}{{ node }}{% endcapture %} - {% continue %} - {% endif %} - - {% assign _workspace = node | split: '' | first }}>{% endcapture %} - {% assign header = _workspace[0] | replace: _hAttrToStrip, '' %} - - - {% capture anchor %}{% endcapture %} - - {% if html_id and headerLevel >= minHeader and headerLevel <= maxHeader %} - {% capture anchor %}href="#{{ html_id}}"{% endcapture %} - - {% if include.anchorClass %} - {% capture anchor %}{{ anchor }} class="{{ include.anchorClass }}"{% endcapture %} - {% endif %} - - {% if include.anchorTitle %} - {% capture anchor %}{{ anchor }} title="{{ include.anchorTitle | replace: '%heading%', header }}"{% endcapture %} - {% endif %} - - {% capture anchor %}{{ include.anchorBody | replace: '%heading%', header | default: '' | raw }}{% endcapture %} - - {% if beforeHeading %} - {% capture anchor %}{{ anchor }} {% endcapture %} - {% else %} - {% capture anchor %} {{ anchor }}{% endcapture %} - {% endif %} - {% endif %} - - + {% comment %} + Version 1.0.4 + https://github.com/allejo/jekyll-anchor-headings + + "Be the pull request you wish to see in the world." ~Ben Balter + + Usage: + {% include anchor_headings.html html=content %} + + Parameters: + * html (string) - the HTML of compiled markdown generated by kramdown in Jekyll + + Optional Parameters: + * beforeHeading (bool) : false - Set to true if the anchor should be placed _before_ the heading's content + * anchorAttrs (string) : '' - Any custom HTML attributes that will be added to the `` tag; you may NOT use `href`, `class` or `title` + * anchorBody (string) : '' - The content that will be placed inside the anchor; the `%heading%` placeholder is available + * anchorClass (string) : '' - The class(es) that will be used for each anchor. Separate multiple classes with a space + * anchorTitle (string) : '' - The `title` attribute that will be used for anchors + * h_min (int) : 1 - The minimum header level to build an anchor for; any header lower than this value will be ignored + * h_max (int) : 6 - The maximum header level to build an anchor for; any header greater than this value will be ignored + * bodyPrefix (string) : '' - Anything that should be inserted inside of the heading tag _before_ its anchor and content + * bodySuffix (string) : '' - Anything that should be inserted inside of the heading tag _after_ its anchor and content + + Output: + The original HTML with the addition of anchors inside of all of the h1-h6 headings. + {% endcomment %} + + {% assign minHeader = include.h_min | default: 1 %} + {% assign maxHeader = include.h_max | default: 6 %} + {% assign beforeHeading = include.beforeHeading %} + {% assign nodes = include.html | split: ' + {% if headerLevel == 0 %} + {% if nextChar != '<' and nextChar != '' %} + {% capture node %}' | first }}>{% endcapture %} + {% assign header = _workspace[0] | replace: _hAttrToStrip, '' %} + + + {% capture anchor %}{% endcapture %} + + {% if html_id and headerLevel >= minHeader and headerLevel <= maxHeader %} + {% capture anchor %}href="#{{ html_id }}"{% endcapture %} + + {% if include.anchorClass %} + {% capture anchor %}{{ anchor }} class="{{ include.anchorClass }}"{% endcapture %} + {% endif %} + + {% if include.anchorTitle %} + {% capture anchor %}{{ anchor }} title="{{ include.anchorTitle | replace: '%heading%', header }}"{% endcapture %} + {% endif %} + + {% if include.anchorAttrs %} + {% capture anchor %}{{ anchor }} {{ include.anchorAttrs }}{% endcapture %} + {% endif %} + + {% capture anchor %}{{ include.anchorBody | replace: '%heading%', header | default: '' }}{% endcapture %} + + + {% if beforeHeading %} + {% capture anchor %}{{ anchor }} {% endcapture %} + {% else %} + {% capture anchor %} {{ anchor }}{% endcapture %} + {% endif %} + {% endif %} + + {% capture new_heading %} +
diff --git a/_layouts/default.html b/_layouts/default.html index 9479d40..416a6ff 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -11,6 +11,8 @@ layout: compress {% include header.html %} +
+ {% if page.is_post != true %}
{% endif %} @@ -23,9 +25,12 @@ layout: compress {% comment %}Can't use == false since page.is_home might be undefined{% endcomment %} {% if page.is_home != true and page.is_404 != true and page.is_tags != true and page.is_sitemap != true %} +
{% include comments.html %} {% endif %} +
+ {% if page.is_post %} {% include post_navigation.html %} {% else %} diff --git a/_layouts/post.html b/_layouts/post.html index 7c3c4a5..f79319c 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -2,19 +2,8 @@ layout: default --- -
-

{{ page.title }}

-
First written on {{ page.date | date: '%B %-d, %Y' }}
- {% assign page_date = page.date | date: '%F' %} - {% assign page_updated = page.updated | date: '%F' %} - {% if page_updated < page_date %} -
*** ERROR: check front matter updated variable ***
- {% elsif page_date != page_updated %} -
Last updated on {{ page.updated | date: '%B %-d, %Y' }}
- {% endif %} -
- {% if page.tags %} +

Tags

{% assign page_tags = page.tags | sort %}
+
{% endif %} +
+

{{ page.title }}

+
First written on {{ page.date | date: '%B %-d, %Y' }}
+ {% assign page_date = page.date | date: '%F' %} + {% assign page_updated = page.updated | date: '%F' %} + {% if page_updated < page_date %} +
*** ERROR: check front matter updated variable ***
+ {% elsif page_date != page_updated %} +
Last updated on {{ page.updated | date: '%B %-d, %Y' }}
+ {% endif %} +
+
{% include anchor_headings.html html=content %}
diff --git a/_pages/index.md b/_pages/index.md index 0debc99..c717100 100644 --- a/_pages/index.md +++ b/_pages/index.md @@ -4,8 +4,14 @@ permalink: index.html excerpt: none --- +# {{ site.title }} + +## Tags + {% include tag_list.html %} - + +## Years +
{% assign i=0 | plus: 0 %} @@ -27,11 +33,11 @@ excerpt: none
{% if i == 0 %} -### Year {{ current_year }} +### {{ current_year }} {% assign open_list = true %} {% elsif post.next %} {% if current_year != next_year %} -### Year {{ current_year }} +### {{ current_year }} {% assign open_list = true %} {% endif %} {% endif %} @@ -59,12 +65,7 @@ excerpt: none {% endcapture %} - +[ {{ post.date | date: "%F" }} ] {{ post.title }} { {{ post_excerpt }} } @@ -74,3 +75,4 @@ excerpt: none {% assign i=i | plus: 1 %} {% endfor %} + diff --git a/_pages/tags.md b/_pages/tags.md index 9294bd0..75abd75 100644 --- a/_pages/tags.md +++ b/_pages/tags.md @@ -6,6 +6,8 @@ permalink: /tags/ {% include tag_list.html %} +
+
{% assign site_tags = site.tags | sort %} diff --git a/_sass/main.scss b/_sass/main.scss index a9ca873..4b532dd 100644 --- a/_sass/main.scss +++ b/_sass/main.scss @@ -1,457 +1,11 @@ -/* For mobile phones */ -@media only screen and (max-width: 700px) { - body { - margin-left: 0.40625em; - margin-right: 0.40625em; - } - - .post { - pre { - font-size:0.8125em; - line-height: 2em; - - padding-left: 0.8125em; - padding-right: 0.8125em; - } - } - p code { - font-size:0.8125em; - line-height: 2em; - - padding-left: 0.40625em; - padding-right: 0.40625em; - } -} - -/* For desktops */ -@media only screen and (min-width: 700px) { - body { - margin-left: 5%; - margin-right: 5%; - @media only screen and (max-width: 1375px) { - margin-left: 10%; - margin-right: 10%; - } - @media only screen and (min-width: 1920px) { - margin-left: 25%; - margin-right: 25%; - } - } - - .post { - pre { - font-size: 1.1375em; - line-height: 2em; - - padding-left: 1.625em; - padding-right: 1.625em; - } - } - p code { - font-size:1.1375em; - line-height: 2em; - - padding-left: 0.8125em; - padding-right: 0.8125em; - } -} - -body { - text-align: left; - text-rendering: optimizeLegibility; - background-color: #dadada; - line-height: 1.625em; - font-family: "Arial Black", Gadget, sans-serif; - font-size: 1.080625em; - word-spacing: 0em; -} - -p { - code { - font-weight: bold; - border: none; - border-radius: 0.8125em; - box-shadow: inset 0 0 0.8125em grey; - background-color: #e6e6e6; - white-space: pre-wrap; - white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ - white-space: -pre-wrap; /* Opera 4-6 */ - white-space: -o-pre-wrap; /* Opera 7 */ - word-wrap: break-word; /* Internet Explorer 5.5+ */ - } -} - -a:hover { - transition: 0.2s; -} - -/* Use for abbreviations only. */ -abbr { - letter-spacing: 0.1em; -} - -blockquote { - font-size: 1.08625em; - line-height: 1.08625em; - font-family: "Comic Sans MS", cursive, serif; - background-color: #ffffff; - box-shadow: inset 0 0 0.40625em grey; - border-radius: 0.8125em; - padding-left: 1.625em; - padding-top: 0.8125em; - padding-bottom: 0.8125em; - margin: 0; -} - -h1 { - line-height: 1.625em; - margin-top: 0.40625em; - margin-bottom: 0.40625em; -} - -h2 { - line-height: 1.263157em; - margin-top: 1.263157em; - margin-bottom: 1.263157em; -} - -p { - text-indent: 0; - line-height: 1.625em; - margin-top: 1.625em; - margin-bottom: 1.625em; -} - a { - text-decoration: underline; - text-decoration-color: #d9d9d9; - text-align: center; - color: #666666; + text-decoration: none; } a:hover { text-decoration: underline; } -ul { - list-style-type: circle; -} - -.post { - pre { - border: none; - border-radius: 1.625em; - box-shadow: inset 0 0 0.8125em grey; - background-color: #e6e6e6; - white-space: pre-wrap; - white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ - white-space: -pre-wrap; /* Opera 4-6 */ - white-space: -o-pre-wrap; /* Opera 7 */ - word-wrap: break-word; /* Internet Explorer 5.5+ */ - } -} - -.post-list { - margin: 0; - padding: 0; - list-style-type: none; - -webkit-padding-start: 0; -} - -.post-list-metadata, .post-list-div, .post-list-excerpt { - display: block; -} - -.post-metadata, .page-metadata, .footer, .comment { - box-shadow: inset 0 0 0.40625em grey; - background-color: #ffffff; -} - -.post-metadata, .page-metadata, .footer, .comment, .index .post-list-metadata { - border-radius: 1.625em; - padding-left: 1.625em; - padding-bottom: 0.40625em; -} - -.post-metadata, .page-metadata, .footer, .comment, .comment-content, .index .post-list-metadata { - margin-bottom: 1.625em; -} - -.page-metadata, .footer, .comment, .index .post-list-metadata { - padding-top: 0.40625em; -} - -.post-metadata, .page-metadata, .footer, .comment, .index .post-list-metadata { - padding-right: 1.625em; -} - - -.top, .page-navigation, .tag-list { - ul { - margin: 0; - padding: 0; - overflow: hidden; - } - - li { - display: block; - float: left; - } - - a { - text-decoration: none; - } -} - -.badges { - ul { - margin-top: 0.203125em; - margin-bottom: 0.203125em; - margin-left: 0em; - padding: 0; - overflow: hidden; - display: flex; - } - - li { - display: block; - float: left; - margin-left: 0.203125em; - } - - img { - padding: 0; - margin: 0; - } -} - -.top, .page-navigation { - ul { - font-size: 0.8125em; - margin-bottom: 1.625em; - background-color: #666666; - border-radius: 0.8125em; - } - - li { - border-right: 0.05em solid #ffffff; - } - - a { - display: block; - color: #ffffff; - text-align: center; - padding: 0.8125em 0.8125em; - } - - li a:hover { - background-color: #000000; - } - - .rss { - border-left: 0.05em solid #ffffff; - border-right: none; - float:right - } -} - -.index { - .post-list-div { - margin-top: 0.8125em; - margin-bottom: 0.8125em; - } - - .post-list-date { - float: right; - } - - .post-list-excerpt { - font-family: serif; - font-size: 0.8125em; - } - - a { - text-decoration: none; - text-align: left; - color: #000000; - } - - .post-list-metadata { - background-color: #ffffff; - box-shadow: 0 0.203125em 0.203125em 0 grey, 0 0.203125em 0.203125em 0 grey; - } - - .post-list-metadata:hover { - background-color: #404040; - transition: 0.2s; - color: #ffffff; - } -} - -.tag-list { - ul { - margin-top: 0em; - margin-bottom: 0.40625em; - } - - li { - margin-top: 0.203125em; - margin-bottom: 0.40625em; - } - - a { - margin-top: 0em; - margin-left: 0.8125em; - padding: 0.40625em; - font-size: 0.8125em; - background-color: #ffffff; - border-radius: 0.8125em; - } - - li a:hover { - background-color: #404040; - color: #ffffff; - } -} - -.comment-content, .tag-list { - a { - box-shadow: 0 0.203125em 0.203125em 0 grey, 0 0.203125em 0.203125em 0 grey; - } -} - -.comment-content { - font-size: 0.8125em; - - a.odd { - background-color: #cccccc; - } - - a.even { - background-color: #e6e6e6; - } - - a:hover { - background-color: #f2f2f2; - } - - a { - display: block; - margin-top: 1.625em; - text-decoration: none; - text-decoration-color: #000000; - text-align: left; - border-radius: 0.8125em; - color: #000000; - } - - .text { - padding: 0.8125em; - } - - .hr { - border: 0.1015625em inset #808080; - color: #ffffff; - } - - .from { - overflow: hidden; - } - - .date { - font-style: italic; - } -} - -.footer { - font-size: 0.8125em; -} - img { max-width: 100%; - height: auto; - display: block; - margin-right: auto; - margin-left: auto; - margin-bottom: 0.8125em; -} - -.img img, .figure { - box-shadow: 0 0.203125em 0.203125em 0 grey, 0 0.203125em 0.203125em 0 grey; - border-radius: 0.8125em; -} - -.img img:hover { - opacity: 0.5; - transition: 0.2s; -} - -.figure:hover { - background-color: #404040; - transition: 0.2s; - img { - opacity: 0.75; - } - .text { - color: #ffffff; - } -} - -.figure { - display: auto; - margin-right: auto; - margin-left: auto; - justify-content: center; - background-color: #ffffff; - margin-bottom: 0.8125em; - img { - max-width: 100%; - height: auto; - display: block; - margin-right: auto; - margin-left: auto; - border-top-left-radius: 0.8125em; - border-top-right-radius: 0.8125em; - } - .text { - text-align: center; - font-size: 0.8125em; - font-style: italic; - } - a { - text-decoration: none; - color: #000000; - } -} - -/* Tables */ -table { - border-collapse: collapse; -} - -table, th, td { - border: 0.1015625em solid black; -} - -th, td { - padding: 0.40625em; - text-align: left; -} - -th { - background-color: #f2f2f2; -} - -tr:nth-child(even) { - background-color: #f2f2f2; -} - -.hAnchor { - opacity: 0.1; - filter: alpha(opacity=50); /* For IE8 and earlier */ -} - -.hAnchor:hover { - opacity: 1; - filter: alpha(opacity=100); /* For IE8 and earlier */ }