Update Beautiful Jekyll to the latest commit version

This commit is contained in:
JohnnyZB 2025-05-16 16:35:38 +03:00
parent 55804453a2
commit 484c65f982
33 changed files with 983 additions and 408 deletions

6
Appraisals Normal file
View File

@ -0,0 +1,6 @@
appraise "jekyll-3" do
gem "jekyll", "3.9.4"
end
appraise "jekyll-4" do
gem "jekyll", "4.3.3"
end

View File

@ -1,13 +1,65 @@
## Unreleased version ## Unreleased version
- BREAKING CHANGE: Allow changing the order of the social network links that appear in the footer (#1152)
- BREAKING CHANGE: `google-scholar` social network link no longer requires the prefix `citations?user=`; if you previously set this parameter, it needs to be updated (#1189)
- Added `mathjax` YAML parameter to allow support for MathJax, used to write LaTeX expressions (#195)
- Added explicit support for favicons, you only need to add a `favicon.ico` file to the root directory
- The footer of a page always sticks to the bottom, even on short pages (#576)
- Added `author` YAML parameter to allow specifying the author(s) of a post (#1220)
- Fixed bug where search results broke if a post title had a backslash (#1279)
- Fixed bug where hovering over search results showed the text "{desc}" (#1156)
- Added social network links for GitLab, Bluesky, Whatsapp, Untappd, Strava (#1168, #1218, #1299, #1307, #1443)
- Support reddit social network link to either be a subreddit or a user (#1371)
- Use CSS variables (#661)
- Added instructions and example on how to fix image links in project sites (#1171)
- Pagination buttons: use nicer arrows, and don't show text on small screens (#1221)
- Updated Yelp URL format - if you previously used the `yelp` social network config parameter, you might need to update the config value (#1259)
- Added `title-on-all-pages` config setting, that adds the website title to all page titles (#1272)
- Change Twitter icon to X (#1193)
- Upgraded font-awesome to 6.5.2 (#1330)
- Fixed tables not having a scroll bar when wider than the page (usually happened on mobile) (#1452)
- Add author name to RSS feed (#1442)
- Slightly reworked margins and position for avatar image to resolve an alignment issue on Safari. ## v6.0.1 (2023-06-08)
- Changed the width at which the navbar collapses to a higher threshold because most modern non-mobile browsers are >1000px
- Fixed bug where navbar secondary level dropdown items didn't inherit te same colour as the primary navbar links This version has been in the works for a few years. It includes several new features that were highly requested, numerous bug fixes, new documentation, and aggresively encourages migrating from the old Google Universal Analytics to the new Analytics 4.
#### Breaking changes
- As of July 2023, Google Universal Analytics is going away and being replaced by Google Analytics 4. Beautiful Jekyll sites that still use the old analytics tag will show a warning to encourage them to move to Analytics 4 (#1096).
- More control over RSS feed sharing: previously, an RSS feed was *always* generated, and if the config setting `rss-description` was set then there was an RSS icon in the footer. Now, an RSS feed is only generated when the config setting `rss-description` exists, and an RSS footer icon is only shown if `rss: true` is set in the `social-network-links` config settings.
#### New parameters and settings
- Added `navbar-var-length` config setting that allows the navigation menu to be the same length as the longest sub-menu, so that long words in the submenu are not cut off (#765)
- Added `post_search` config setting that creates a Search button in the navbar (#770)
- Added `edit_page_button` config setting that adds a "Edit page" button to the footer (to edit the current page on GitHub) (#1004)
- Added `footer-hover-col` config setting to customize the hover colour of links in the footer (#848)
#### New features and improvements
- Made the home page feed more accessible for screen readers (#950)
- Added support for giscus comments (#886) and CommentBox (#960)
- Added support for Cloudflare Analytics (#797)
- Added Reddit in share options of posts (#815)
#### Bug fixes
- Fixed page titles, subtitles, and excerpts rendering correctly when there are special characeters in them (#856)
- Fixed bug where navbar secondary level dropdown items didn't inherit the same colour as the primary navbar links
- Fixed bug where the navbar "burger" collapsed button didn't always revert back to a light colour - Fixed bug where the navbar "burger" collapsed button didn't always revert back to a light colour
- Fixed bug where using an image as a navbar title did not render in GitHub Project pages that did not have a custom domain - Fixed bug where using an image as a navbar title did not render in GitHub Project pages that did not have a custom domain
- Fixed issue where image thumbnails on the feed page were always forced into a square rather than maintaining a proper image aspect ratio - Fixed bug where image thumbnails on the feed page were always forced into a square rather than maintaining a proper image aspect ratio
- Added support for Patreon in the social network links in the footer
- Fixed bug where special characters in the title led to broken share tags (#744) - Fixed bug where special characters in the title led to broken share tags (#744)
- Fixed bug where staticman didn't work jQuery slim version is used (#766)
- Fixed very long strings to wrap around the next line rather than go off-screen (#787)
#### Small changes
- Updated staticman from using v2 (public servers) to v3 (private servers) due to the public servers becoming obsolete (#775)
- Added social network links for Patreon, Medium, Itch.io, Discord, Kaggle, Hackerrank (#783, #788, #907, #961, #978)
- Slightly reworked margins and position for avatar image to resolve an alignment issue on Safari
- Changed the width at which the navbar collapses to a higher threshold because most modern non-mobile browsers are >1000px
## v5.0.0 (2020-09-15) ## v5.0.0 (2020-09-15)
@ -54,7 +106,6 @@ One of the major changes in this version is that a lot of time was spent on reth
- Upgraded kramdown to version 2.3.0 to fix security issues - Upgraded kramdown to version 2.3.0 to fix security issues
- Upgraded jQuery to version 3.5.1 to fix a couple security vulnerabilities with the previous version - Upgraded jQuery to version 3.5.1 to fix a couple security vulnerabilities with the previous version
## v4.1.0 (2020-08-08) ## v4.1.0 (2020-08-08)
- Added Open Graph `site_name` meta field to pages automatically - Added Open Graph `site_name` meta field to pages automatically

10
Gemfile
View File

@ -2,5 +2,15 @@
source "https://rubygems.org" source "https://rubygems.org"
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
platforms :mingw, :x64_mingw, :mswin, :jruby do
gem "tzinfo", ">= 1", "< 3"
gem "tzinfo-data"
end
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1", :platforms => [:mingw, :x64_mingw, :mswin]
gemspec gemspec

View File

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2020 Dean Attali Copyright (c) 2023 Dean Attali
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -1,9 +1,13 @@
# Welcome to Beautiful Jekyll! ###########################################################
# This config file is meant for settings that affect your entire website. When you first ### Welcome to Beautiful Jekyll!
# set up your website you should go through all these settings and edit them, but after ### This config file is meant for settings that affect your entire website. When you first
# the initial set up you won't need to come back to this file often. ### set up your website you should go through all these settings and edit them, but after
### the initial set up you won't need to come back to this file often.
###########################################################
############################
# --- Required options --- # # --- Required options --- #
############################
# Name of website # Name of website
title: YameteTomete Translation Cooperative title: YameteTomete Translation Cooperative
@ -11,19 +15,21 @@ title: YameteTomete Translation Cooperative
# Your name to show in the footer # Your name to show in the footer
author: YameteTomete author: YameteTomete
###############################################
# --- List of links in the navigation bar --- # # --- List of links in the navigation bar --- #
###############################################
url: https://poweris.moe
navbar-links: navbar-links:
Projects: "https://poweris.moe/projects" Projects: "projects"
Symphogear Wiki: "https://wiki.poweris.moe/" Symphogear Wiki: "https://wiki.poweris.moe/"
Friends: Friends:
- Kaleido-subs: "https://kaleido.kageru.moe/" - Kaleido-subs: "https://kaleido.kageru.moe/"
- Good Job! Media: "https://www.goodjobmedia.com/" - Good Job! Media: "https://www.goodjobmedia.com/"
Discord: "https://discord.gg/fpQZQ8g" Discord: "https://discord.gg/fpQZQ8g"
################
# --- Logo --- # # --- Logo --- #
################
# Image to show in the navigation bar - works best with a square image # Image to show in the navigation bar - works best with a square image
# Remove this parameter if you don't want an image in the navbar # Remove this parameter if you don't want an image in the navbar
@ -37,18 +43,24 @@ round-avatar: true
#title-img: /path/to/image #title-img: /path/to/image
#####################################
# --- Footer social media links --- # # --- Footer social media links --- #
#####################################
# Select the social network links that you want to show in the footer. # Select the social network links that you want to show in the footer.
# You can change the order that they show up on the page by changing the order here.
# Uncomment the links you want to show and add your information to each one. # Uncomment the links you want to show and add your information to each one.
social-network-links: social-network-links:
# email: "louis@poweris.moe" # email: "someone@example.com"
rss: true # remove this line if you don't want to show an RSS link at the bottom
# facebook: deanattali # facebook: deanattali
github: yttt github: yttt
twitter: YameteTomete twitter: YameteTomete
# patreon: DeanAttali # patreon: yourname
# youtube: c/daattali # youtube: "@yourname"
# reddit: yourname # whatsapp: 15551212
# medium: yourname
# reddit: yourname or r/yoursubreddit
# linkedin: daattali # linkedin: daattali
# xing: yourname # xing: yourname
# stackoverflow: "3943160/daattali" # stackoverflow: "3943160/daattali"
@ -65,12 +77,21 @@ social-network-links:
bluesky: yametetomete.bsky.social bluesky: yametetomete.bsky.social
# ORCID: your ORCID ID # ORCID: your ORCID ID
# google-scholar: your google scholar # google-scholar: your google scholar
# discord: "invite_code" or "users/userid" or "invite/invite_code"
# kaggle: yourname
# hackerrank: yourname
# gitlab: yourname
# itchio: yourname
# untappd: yourname
# strava: youruserid
# If you want to show a link to an RSS in the footer, add the site description here. # If you want your website to generate an RSS feed, provide a description
# If you don't want to show an RSS link, remove the following line. # The URL for the feed will be https://<your_website>/feed.xml
# rss-description: This website is a virtual proof that I'm awesome rss-description: YameteTomete Translation Cooperative
###########################
# --- General options --- # # --- General options --- #
###########################
# Select which social network share links to show in posts # Select which social network share links to show in posts
share-links-active: share-links-active:
@ -78,10 +99,14 @@ share-links-active:
facebook: false facebook: false
linkedin: false linkedin: false
vk: false vk: false
reddit: false
# How to display the link to your website in the footer # How to display the link to your website in the footer
# Remove this if you don't want a link in the footer # Remove this if you don't want a link in the footer
# url-pretty: "MyWebsite.com" # url-pretty: "poweris.moe"
# Add the website title to the title of every page
title-on-all-pages: true
# Excerpt word length - Truncate the excerpt of each post on the feed page to the specified number of words # Excerpt word length - Truncate the excerpt of each post on the feed page to the specified number of words
excerpt_length: 50 excerpt_length: 50
@ -95,23 +120,37 @@ excerpt_separator: <!-- excerpt-end -->
# Whether or not to show a list of tags below each post preview in the feed page # Whether or not to show a list of tags below each post preview in the feed page
feed_show_tags: false feed_show_tags: false
# Add a search button to the navbar
post_search: true
# Add a button in the footer to edit the current page. Only works if your website is hosted on GitHub
edit_page_button: false
# Allow sub-menu items (second-level navigation menu items) to be longer than the top-level menu
# If this setting is off, then long sub-menu words might get cut off
# See https://github.com/daattali/beautiful-jekyll/issues/765 to understand the issue this setting can solve
navbar-var-length: false
# The keywords to associate with your website, for SEO purposes # The keywords to associate with your website, for SEO purposes
#keywords: "my,list,of,keywords" #keywords: "my,list,of,keywords"
######################################
# --- Colours / background image --- # # --- Colours / background image --- #
######################################
# Personalize the colours in your website. Colour values can be any valid CSS colour # Personalize the colours in your website. Colour values can be any valid CSS colour
navbar-col: "#EAEAEA"
navbar-text-col: "#404040"
navbar-border-col: "#DDDDDD"
page-col: "#FFFFFF" page-col: "#FFFFFF"
text-col: "#404040" text-col: "#404040"
link-col: "#008AFF" link-col: "#008AFF"
hover-col: "#0085A1" hover-col: "#0085A1"
navbar-col: "#EAEAEA"
navbar-text-col: "#404040"
navbar-border-col: "#DDDDDD"
footer-col: "#EAEAEA" footer-col: "#EAEAEA"
footer-text-col: "#777777" footer-text-col: "#777777"
footer-link-col: "#404040" footer-link-col: "#404040"
footer-hover-col: "#0085A1"
# Alternatively, the navbar, footer, and page background can be set to an image # Alternatively, the navbar, footer, and page background can be set to an image
# instead of colour # instead of colour
@ -131,13 +170,15 @@ footer-link-col: "#404040"
#site-js: #site-js:
# - "/assets/js/custom-script.js" # - "/assets/js/custom-script.js"
#################################
# --- Web Analytics Section --- # # --- Web Analytics Section --- #
#################################
# Fill in your Google Analytics gtag.js ID to track your website using gtag # Fill in your Google Analytics tag ID (or "Measurement ID") to track your website usage
#gtag: "" #gtag: "G-XXXXXXXXXX"
# Fill in your Google Analytics ID to track your website using Google Analytics # Fill in your Cloudflare Analytics beacon token to track your website using Cloudflare Analytics
#google_analytics: "" #cloudflare_analytics: ""
# Google Tag Manager ID # Google Tag Manager ID
#gtm: "" #gtm: ""
@ -150,7 +191,14 @@ footer-link-col: "#404040"
# uri: "demo.wiki.pro" # uri: "demo.wiki.pro"
# opt-out: true # opt-out: true
# Google Universal Analytics ID -- deprecated
# As of July 2023 this is no longer supported by Google! If you are still using `google_analytics`,
# you should switch to using the `gtag` field above instead.
#google_analytics: "UA-XXXXXXXX-X"
####################
# --- Comments --- # # --- Comments --- #
####################
# To use Disqus comments, sign up to https://disqus.com and fill in your Disqus shortname (NOT the userid) # To use Disqus comments, sign up to https://disqus.com and fill in your Disqus shortname (NOT the userid)
#disqus: "" #disqus: ""
@ -158,6 +206,9 @@ footer-link-col: "#404040"
# To use Facebook Comments, create a Facebook app and fill in the Facebook App ID # To use Facebook Comments, create a Facebook app and fill in the Facebook App ID
#fb_comment_id: "" #fb_comment_id: ""
# To use CommentBox, sign up for a Project ID on https://commentbox.io
#commentbox: "" # Project ID, e.g. "5694267682979840-proj"
# To use Utterances comments: (0) uncomment the following section, (1) fill in # To use Utterances comments: (0) uncomment the following section, (1) fill in
# "repository" (make sure the repository is public), (2) Enable Issues in your repository, # "repository" (make sure the repository is public), (2) Enable Issues in your repository,
# (3) Install the Utterances app in your repository https://github.com/apps/utterances # (3) Install the Utterances app in your repository https://github.com/apps/utterances
@ -168,21 +219,39 @@ footer-link-col: "#404040"
# theme: github-light # Utterances theme # theme: github-light # Utterances theme
# label: blog-comments # Label that will be assigned to GitHub Issues created by Utterances # label: blog-comments # Label that will be assigned to GitHub Issues created by Utterances
# To use Staticman comments, first invite `staticmanlab` as a collaborator to your repository and # To use Staticman comments, uncomment the following section. You may leave the reCaptcha
# accept the invitation by going to `https://staticman3.herokuapp.com/v3/connect/github/<username>/<repo-name>`. # section commented if you aren't using reCaptcha for spam protection.
# Then uncomment the following section and fill in "repository" and "branch". # Using Staticman requires advanced knowledge, please consult
# If you want to use reCaptcha for staticman (optional for spam protection), then fill # https://github.com/eduardoboucas/staticman/ and https://staticman.net/ for further
# in the "siteKey" and "secret" parameters below and also in `staticman.yml`. # instructions. For any support with staticman please direct questions to staticman and
# See more details at https://staticman.net/ # not to BeautifulJekyll.
#staticman: #staticman:
# repository : # GitHub username/repository eg. "daattali/beautiful-jekyll" # repository : # GitHub username/repository eg. "daattali/beautiful-jekyll"
# branch : master # If you're not using `master` branch, then you also need to update the `branch` parameter in `staticman.yml` # branch : master # If you're not using `master` branch, then you also need to update the `branch` parameter in `staticman.yml`
# endpoint : # (optional) URL of your own deployment, with a trailing slash eg. https://<your-api>/v3/entry/github/ (will fallback to a public GitLab instance) # endpoint : # URL of your deployment, with a trailing slash eg. "https://<your-api>/v3/entry/github/"
# reCaptcha: # reCaptcha: # (optional, set these parameters in `staticman.yml` as well)
# siteKey : # Use your own site key, you need to apply for one on Google # siteKey : # You need to apply for a site key on Google
# secret : # ENCRYPT your password by going to https://staticman3.herokuapp.com/v3/encrypt/<your-site-secret> # secret : # Encrypt your password by going to https://<your-own-api>/v3/encrypt/<your-site-secret>
# To use giscus comments:
# (0) Uncomment the following giscus section, (1) Enable Discussions in your GitHub repository,
# (2) Install the giscus app in your repository (details at https://giscus.app),
# (3) Fill in *all* the parameters below
# See more details about giscus and each of the following parameters at https://giscus.app
#giscus:
# hostname: giscus.app # Replace with your giscus instance's hostname if self-hosting
# repository: # GitHub username/repository eg. "daattali/beautiful-jekyll"
# repository-id: # ID of your repository, retrieve this info from https://giscus.app
# category: Announcements # Category name of your GitHub Discussion posts
# category-id: # ID of your category, retrieve this info from https://giscus.app
# mapping: pathname
# reactions-enabled: 1
# emit-metadata: 0
# theme: light
################
# --- Misc --- # # --- Misc --- #
################
# Ruby Date Format to show dates of posts # Ruby Date Format to show dates of posts
date_format: "%B %-d, %Y" date_format: "%B %-d, %Y"
@ -190,7 +259,9 @@ date_format: "%B %-d, %Y"
# Facebook App ID # Facebook App ID
#fb_app_id: "" #fb_app_id: ""
#################################################################################
# --- You don't need to touch anything below here (but you can if you want) --- # # --- You don't need to touch anything below here (but you can if you want) --- #
#################################################################################
# Output options (more information on Jekyll's site) # Output options (more information on Jekyll's site)
timezone: "Etc/UTC" timezone: "Etc/UTC"

View File

@ -0,0 +1,8 @@
{% if site.cloudflare_analytics %}
<!-- Cloudflare Web Analytics -->
<script defer
src='https://static.cloudflareinsights.com/beacon.min.js'
data-cf-beacon='{"token": "{{ site.cloudflare_analytics}}"}'>
</script>
<!-- End Cloudflare Web Analytics -->
{% endif %}

View File

@ -0,0 +1,7 @@
{% if site.commentbox %}
<div class="commentbox"></div>
<script src="https://unpkg.com/commentbox.io/dist/commentBox.min.js"></script>
<script>commentBox('{{ site.commentbox }}')</script>
{% endif %}

View File

@ -3,4 +3,6 @@
{% include fb-comment.html %} {% include fb-comment.html %}
{% include staticman-comments.html %} {% include staticman-comments.html %}
{% include utterances-comment.html %} {% include utterances-comment.html %}
{% include giscus-comment.html %}
{% include commentbox.html %}
{% endif %} {% endif %}

View File

@ -12,7 +12,7 @@
{% if site.url-pretty %} {% if site.url-pretty %}
&nbsp;&nbsp;&bull;&nbsp;&nbsp; &nbsp;&nbsp;&bull;&nbsp;&nbsp;
<a href="{{ '' | absolute_url }}">{{ site.url-pretty }}</a> <a href="{{ '/' | absolute_url }}">{{ site.url-pretty }}</a>
{% endif %} {% endif %}
</div> </div>
</footer> </footer>

View File

@ -20,7 +20,7 @@
{% if site.url-pretty %} {% if site.url-pretty %}
&nbsp;&bull;&nbsp; &nbsp;&bull;&nbsp;
<span class="author-site"> <span class="author-site">
<a href="{% if site.url-canonical %}{{ site.url-canonical }}{% else %}{{ '' | absolute_url }}{% endif %}">{{ site.url-pretty }}</a> <a href="{% if site.url-canonical %}{{ site.url-canonical }}{% else %}{{ '/' | absolute_url }}{% endif %}">{{ site.url-pretty }}</a>
</span> </span>
{% endif %} {% endif %}
@ -30,6 +30,12 @@
<a href="http://{{- site.matomo.uri -}}/index.php?module=CoreAdminHome&action=optOut" target="_blank" class="text_muted">Do-not-Track</a> <a href="http://{{- site.matomo.uri -}}/index.php?module=CoreAdminHome&action=optOut" target="_blank" class="text_muted">Do-not-Track</a>
{% endif %} {% endif %}
{% endif%} {% endif%}
{% if site.edit_page_button and site.github.repository_url %}
&nbsp;&bull;&nbsp;
<a title="Edit this page on GitHub" href="{{ site.github.repository_url }}/edit/{{ site.github.source.branch }}/{{ page.path }}" class="text_muted">Edit page</a>
{% endif%}
</p> </p>
{% unless site.remove-ads %}<p class="theme-by text-muted"> {% unless site.remove-ads %}<p class="theme-by text-muted">
Powered by Powered by

View File

@ -0,0 +1,16 @@
{% if site.giscus.repository and site.giscus.hostname %}
<script src="https://{{ site.giscus.hostname }}/client.js"
data-repo="{{ site.giscus.repository }}"
data-repo-id="{{ site.giscus.repository-id }}"
data-category="{{ site.giscus.category }}"
data-category-id="{{ site.giscus.category-id }}"
data-mapping="{{ site.giscus.mapping }}"
data-reactions-enabled="{{ site.giscus.reactions-enabled }}"
data-emit-metadata="{{ site.giscus.emit-metadata }}"
data-theme="{{ site.giscus.theme }}"
crossorigin="anonymous"
async>
</script>
{% endif %}

View File

@ -1,5 +1,17 @@
{% if site.google_analytics %} {% if site.google_analytics %}
<!-- Google Analytics --> <!-- Google Analytics -->
{% unless site.gtag %}
<div id="bj-ganalytics-deprecated-msg" style="position: fixed; background: #b90404; bottom: 0; width: 100%; z-index: 10000; color: #f0f0f0; text-align: center; padding: 0.5rem;">
<div title="Close" onclick="$(this).parent().remove()" style="position: absolute; right: 5px; top: 0; font-size: 1.5em; line-height: 1; cursor: pointer;">&times;</div>
<div style="max-width: 800px; margin: auto; font-size: 1.1em;">
This website is using outdated Google Analytics
<details style="font-size: 0.8em;">
<summary>More info</summary>
As of July 2023, Google's Universal Analytics is going away and being replaced by Google Analytics 4. This website is still using the old Universal Analytics. In order to remove this message, the website owner must remove the <code>google_analytics</code> property in the website's config file, and optionally replace it with the new <code>gtag</code> property.
</details>
</div>
</div>
{% endunless %}
<script> <script>
(function (i, s, o, g, r, a, m) { (function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {

View File

@ -2,7 +2,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{% capture title %} {% capture pagetitle %}
{%- if page.share-title -%} {%- if page.share-title -%}
{{ page.share-title | strip_html | xml_escape }} {{ page.share-title | strip_html | xml_escape }}
{%- elsif page.title -%} {%- elsif page.title -%}
@ -12,6 +12,14 @@
{%- endif -%} {%- endif -%}
{% endcapture %} {% endcapture %}
{% capture title %}
{%- if site.title and site.title-on-all-pages and (site.title != pagetitle) -%}
{{ pagetitle }} | {{ site.title }}
{%- else -%}
{{ pagetitle }}
{%- endif -%}
{% endcapture %}
{% capture description %} {% capture description %}
{%- if page.share-description -%} {%- if page.share-description -%}
{{ page.share-description | strip_html | xml_escape }} {{ page.share-description | strip_html | xml_escape }}
@ -25,8 +33,15 @@
<title>{{ title }}</title> <title>{{ title }}</title>
{% if site.author %} {% capture author %}
<meta name="author" content="{{ site.author }}"> {%- if page.author -%}
{{ page.author | strip_html }}
{%- elsif site.author -%}
{{ site.author }}
{%- endif -%}
{% endcapture %}
{% if author != "" %}
<meta name="author" content="{{ author }}">
{% endif %} {% endif %}
<meta name="description" content="{{ description }}"> <meta name="description" content="{{ description }}">
@ -39,11 +54,15 @@
<meta name="keywords" content="{{ site.keywords }}"> <meta name="keywords" content="{{ site.keywords }}">
{% endif %} {% endif %}
{% if site.rss-description %}
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ '/feed.xml' | absolute_url }}"> <link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ '/feed.xml' | absolute_url }}">
{% endif %}
{% include gtag.html %} {% include gtag.html %}
{% include gtm_head.html %} {% include gtm_head.html %}
{% include google_analytics.html %} {% include google_analytics.html %}
{% include cloudflare_analytics.html %}
{% include mathjax.html %}
{% if layout.common-ext-css %} {% if layout.common-ext-css %}
{% for css in layout.common-ext-css %} {% for css in layout.common-ext-css %}
@ -109,7 +128,9 @@
{% if page.id %} {% if page.id %}
<meta property="og:type" content="article"> <meta property="og:type" content="article">
<meta property="og:article:author" content="{{ site.author }}"> {% if author != "" %}
<meta property="og:article:author" content="{{ author }}">
{% endif %}
<meta property="og:article:published_time" content="{{ page.date | date_to_xmlschema }}"> <meta property="og:article:published_time" content="{{ page.date | date_to_xmlschema }}">
<meta property="og:url" content="{{ page.url | absolute_url }}"> <meta property="og:url" content="{{ page.url | absolute_url }}">
<link rel="canonical" href="{{ page.url | absolute_url }}"> <link rel="canonical" href="{{ page.url | absolute_url }}">
@ -140,6 +161,11 @@
<link rel="stylesheet" href="{{ "/assets/css/staticman.css" | relative_url }}"> <link rel="stylesheet" href="{{ "/assets/css/staticman.css" | relative_url }}">
{% endif %} {% endif %}
{% assign favicon_exists = site.static_files | where: "path", "/favicon.ico" | size %}
{% if favicon_exists == 1 %}
<link rel="icon" href="{{ '/favicon.ico' | relative_url }}" />
{% endif %}
{% if page.head-extra %} {% if page.head-extra %}
{% for file in page.head-extra %} {% for file in page.head-extra %}
{% include {{ file }} %} {% include {{ file }} %}

View File

@ -1,9 +1,5 @@
<!-- TODO this file has become a mess, refactor it -->
{% assign date_format = site.date_format | default: "%B %-d, %Y" %} {% assign date_format = site.date_format | default: "%B %-d, %Y" %}
{% if page.cover-img or page.title %}
{% if page.cover-img %} {% if page.cover-img %}
<div id="header-big-imgs" data-num-img={% if page.cover-img.first %}{{ page.cover-img.size }}{% else %}1{% endif %} <div id="header-big-imgs" data-num-img={% if page.cover-img.first %}{{ page.cover-img.size }}{% else %}1{% endif %}
{% for bigimg in page.cover-img %} {% for bigimg in page.cover-img %}
@ -21,23 +17,26 @@
{% endif %} {% endif %}
<header class="header-section {% if page.cover-img %}has-img{% endif %}"> <header class="header-section {% if page.cover-img %}has-img{% endif %}">
{% if page.cover-img %} <div class="intro-header {% if page.cover-img %} big-img {% endif %}">
<div class="big-img intro-header"> {% if page.cover-img or page.title %}
<div class="container-md"> <div class="container-md">
<div class="row"> <div class="row">
<div class="col-xl-8 offset-xl-2 col-lg-10 offset-lg-1"> <div class="col-xl-8 offset-xl-2 col-lg-10 offset-lg-1">
<div class="{{ include.type }}-heading"> <div class="{{ include.type }}-heading">
<h1>{% if page.title %}{{ page.title }}{% else %}<br/>{% endif %}</h1> <h1>{% if page.title %}{{ page.title | strip_html }}{% else %}<br/>{% endif %}</h1>
{% if page.subtitle %} {% if page.subtitle %}
{% if include.type == "page" %} {% if include.type == "page" %}
<hr class="small"> <hr class="small">
<span class="{{ include.type }}-subheading">{{ page.subtitle }}</span> <span class="{{ include.type }}-subheading">{{ page.subtitle | strip_html }}</span>
{% else %} {% else %}
<h2 class="{{ include.type }}-subheading">{{ page.subtitle }}</h2> <h2 class="{{ include.type }}-subheading">{{ page.subtitle | strip_html }}</h2>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if include.type == "post" %} {% if include.type == "post" %}
{% if page.author %}
By <strong>{{ page.author | strip_html }}</strong><br>
{% endif%}
<span class="post-meta">Posted on {{ page.date | date: date_format }}</span> <span class="post-meta">Posted on {{ page.date | date: date_format }}</span>
{% if page.last-updated %} {% if page.last-updated %}
<span class="post-meta"> <span class="post-meta">
@ -53,44 +52,14 @@
</div> </div>
</div> </div>
</div> </div>
<span class='img-desc'></span> {% endif %}
{% if page.cover-img %}<span class='img-desc'></span>{% endif %}
</div> </div>
{% endif %}
<div class="intro-header no-img"> {% if page.header-extra %}
<div class="container-md"> {% for file in page.header-extra %}
<div class="row"> {% include {{ file }} %}
<div class="col-xl-8 offset-xl-2 col-lg-10 offset-lg-1"> {% endfor %}
<div class="{{ include.type }}-heading">
<h1>{% if page.title %}{{ page.title }}{% else %}<br/>{% endif %}</h1>
{% if page.subtitle %}
{% if include.type == "page" %}
<hr class="small">
<span class="{{ include.type }}-subheading">{{ page.subtitle }}</span>
{% else %}
<h2 class="{{ include.type }}-subheading">{{ page.subtitle }}</h2>
{% endif %}
{% endif %} {% endif %}
{% if include.type == "post" %}
<span class="post-meta">Posted on {{ page.date | date: date_format }}</span>
{% if page.last-updated %}
<span class="post-meta">
<span class="d-none d-md-inline middot">&middot;</span>
Last updated {{ page.last-updated | date: date_format }}
</span>
{% endif %}
{% if page.readtime %}
{% include readtime.html %}
{% endif %}
{% endif %}
</div>
</div>
</div>
</div>
</div>
</header> </header>
{% else %}
<div class="intro-header"></div>
{% endif %}

12
_includes/mathjax.html Normal file
View File

@ -0,0 +1,12 @@
{% if page.mathjax %}
<script type="text/javascript">
MathJax = {
options: {
skipHtmlTags: [
'script', 'noscript', 'style', 'textarea', 'pre', 'code'
]
}
};
</script>
<script type="text/javascript" async src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
{% endif %}

View File

@ -1,9 +1,9 @@
<nav class="navbar navbar-expand-xl navbar-light fixed-top navbar-custom {% if page.nav-short %}top-nav-short-permanent{% else %}top-nav-regular{% endif %}"> <nav class="navbar navbar-expand-xl navbar-light fixed-top navbar-custom {% if page.nav-short %}top-nav-short-permanent{% else %}top-nav-regular{% endif %}">
{%- if site.title-img -%} {%- if site.title-img -%}
<a class="navbar-brand navbar-brand-logo" href="{{ '' | absolute_url }}"><img alt="{{ site.title }} Logo" src="{{ site.title-img | relative_url}}"/></a> <a class="navbar-brand navbar-brand-logo" href="{{ '/' | absolute_url }}"><img alt="{{ site.title }} Logo" src="{{ site.title-img | relative_url}}"/></a>
{%- elsif site.title -%} {%- elsif site.title -%}
<a class="navbar-brand" href="{{ '' | absolute_url }}">{{ site.title }}</a> <a class="navbar-brand" href="{{ '/' | absolute_url }}">{{ site.title }}</a>
{%- endif -%} {%- endif -%}
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#main-navbar" aria-controls="main-navbar" aria-expanded="false" aria-label="Toggle navigation"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#main-navbar" aria-controls="main-navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -16,7 +16,7 @@
{%- if link[1].first %} {%- if link[1].first %}
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ link[0] }}</a> <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ link[0] }}</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown"> <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
{%- for childlink in link[1] -%} {%- for childlink in link[1] -%}
{%- for linkparts in childlink %} {%- for linkparts in childlink %}
<a class="dropdown-item" href="{{ linkparts[1] | relative_url }}">{{ linkparts[0] }}</a> <a class="dropdown-item" href="{{ linkparts[1] | relative_url }}">{{ linkparts[0] }}</a>
@ -30,6 +30,14 @@
</li> </li>
{%- endif -%} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{% if site.post_search %}
<li class="nav-item">
<a class="nav-link" id="nav-search-link" href="#" title="Search">
<span id="nav-search-icon" class="fa fa-search"></span>
<span id="nav-search-text">Search</span>
</a>
</li>
{%- endif -%}
</ul> </ul>
</div> </div>
@ -42,7 +50,7 @@
{% if site.avatar and page.show-avatar != false %} {% if site.avatar and page.show-avatar != false %}
<div class="avatar-container"> <div class="avatar-container">
<div class="avatar-img-border"> <div class="avatar-img-border">
<a href="{{ '' | absolute_url }}"> <a href="{{ '/' | absolute_url }}">
<img alt="Navigation bar avatar" class="avatar-img" src="{{ site.avatar | relative_url }}" /> <img alt="Navigation bar avatar" class="avatar-img" src="{{ site.avatar | relative_url }}" />
</a> </a>
</div> </div>
@ -50,3 +58,5 @@
{% endif %} {% endif %}
</nav> </nav>
{% include search.html %}

19
_includes/search.html Normal file
View File

@ -0,0 +1,19 @@
{% if site.post_search %}
<div id="beautifuljekyll-search-overlay">
<div id="nav-search-exit" title="Exit search"></div>
<input type="text" id="nav-search-input" placeholder="Search">
<ul id="search-results-container"></ul>
<script src="https://unpkg.com/simple-jekyll-search@latest/dest/simple-jekyll-search.min.js"></script>
<script>
SimpleJekyllSearch({
searchInput: document.getElementById('nav-search-input'),
resultsContainer: document.getElementById('search-results-container'),
json: '{{ site.baseurl }}/assets/data/searchcorpus.json'
});
</script>
</div>
{% endif %}

View File

@ -1,6 +1,9 @@
{% if site.social-network-links %}
<ul class="list-inline text-center footer-links"> <ul class="list-inline text-center footer-links">
{%- if site.rss-description -%} {%- for network in site.social-network-links -%}
{%- if network[0] == "rss" and network[1] and site.rss-description -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a href="{{ '/feed.xml' | relative_url }}" title="RSS"> <a href="{{ '/feed.xml' | relative_url }}" title="RSS">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
@ -12,9 +15,9 @@
</li> </li>
{%- endif -%} {%- endif -%}
{%- if site.social-network-links.email -%} {%- if network[0] == "email" -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a href="mailto:{{ site.social-network-links.email }}" title="Email me"> <a href="mailto:{{ network[1] }}" title="Email me">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i> <i class="fas fa-circle fa-stack-2x"></i>
<i class="fas fa-envelope fa-stack-1x fa-inverse"></i> <i class="fas fa-envelope fa-stack-1x fa-inverse"></i>
@ -24,9 +27,9 @@
</li> </li>
{%- endif -%} {%- endif -%}
{%- if site.social-network-links.calendly -%} {%- if network[0] == "calendly" -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a href="https://calendly.com/{{ site.social-network-links.calendly }}" title="Schedule a meeting with me"> <a href="https://calendly.com/{{ network[1] }}" title="Schedule a meeting with me">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i> <i class="fas fa-circle fa-stack-2x"></i>
<i class="fas fa-calendar-check fa-stack-1x fa-inverse"></i> <i class="fas fa-calendar-check fa-stack-1x fa-inverse"></i>
@ -36,9 +39,9 @@
</li> </li>
{%- endif -%} {%- endif -%}
{%- if site.social-network-links.facebook -%} {%- if network[0] == "facebook" -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a href="https://www.facebook.com/{{ site.social-network-links.facebook }}" title="Facebook"> <a href="https://www.facebook.com/{{ network[1] }}" title="Facebook">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i> <i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-facebook fa-stack-1x fa-inverse"></i> <i class="fab fa-facebook fa-stack-1x fa-inverse"></i>
@ -48,9 +51,9 @@
</li> </li>
{%- endif -%} {%- endif -%}
{%- if site.social-network-links.telegram -%} {%- if network[0] == "telegram" -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a href="https://t.me/{{ site.social-network-links.telegram }}" title="Telegram"> <a href="https://t.me/{{ network[1] }}" title="Telegram">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i> <i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-telegram-plane fa-stack-1x fa-inverse"></i> <i class="fab fa-telegram-plane fa-stack-1x fa-inverse"></i>
@ -60,33 +63,61 @@
</li> </li>
{%- endif -%} {%- endif -%}
{%- if site.social-network-links.github -%} {%- if network[0] == "whatsapp" -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a href="https://git.poweris.moe/{{ site.social-network-links.github }}" title="GitHub"> <a href="https://wa.me/{{ network[1] }}" title="Whatsapp">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-whatsapp fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Whatsapp</span>
</a>
</li>
{%- endif -%}
{%- if network[0] == "github" -%}
<li class="list-inline-item">
<a href="https://git.poweris.moe/{{ network[1] }}" title="Git">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i> <i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-github fa-stack-1x fa-inverse"></i> <i class="fab fa-github fa-stack-1x fa-inverse"></i>
</span> </span>
<span class="sr-only">GitHub</span> <span class="sr-only">Git</span>
</a> </a>
</li> </li>
{%- endif -%} {%- endif -%}
{%- if site.social-network-links.twitter -%} {%- if network[0] == "gitlab" -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a href="https://twitter.com/{{ site.social-network-links.twitter }}" title="Twitter"> <a href="https://gitlab.com/{{ network[1] }}" title="GitLab">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i> <i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-twitter fa-stack-1x fa-inverse"></i> <i class="fab fa-gitlab fa-stack-1x fa-inverse"></i>
</span> </span>
<span class="sr-only">Twitter</span> <span class="sr-only">GitLab</span>
</a> </a>
</li> </li>
{%- endif -%} {%- endif -%}
{%- if site.social-network-links.reddit -%} {%- if network[0] == "twitter" -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a href="https://reddit.com/u/{{ site.social-network-links.reddit }}" title="Reddit"> <a href="https://twitter.com/{{ network[1] }}" title="X (Twitter)">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-x-twitter fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">X (Twitter)</span>
</a>
</li>
{%- endif -%}
{%- if network[0] == "reddit" -%}
{% assign reddit_start = network[1] | split: "/" | first -%}
{% unless reddit_start == 'r' or reddit_start == 'u' -%}
{% assign reddit_url_prefix = 'u/' -%}
{% endunless -%}
<li class="list-inline-item">
<a href="https://reddit.com/{{ reddit_url_prefix }}{{ network[1] }}" title="Reddit">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i> <i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-reddit fa-stack-1x fa-inverse"></i> <i class="fab fa-reddit fa-stack-1x fa-inverse"></i>
@ -96,9 +127,9 @@
</li> </li>
{%- endif -%} {%- endif -%}
{%- if site.social-network-links.linkedin -%} {%- if network[0] == "linkedin" -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a href="https://linkedin.com/in/{{ site.social-network-links.linkedin }}" title="LinkedIn"> <a href="https://linkedin.com/in/{{ network[1] }}" title="LinkedIn">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i> <i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-linkedin fa-stack-1x fa-inverse"></i> <i class="fab fa-linkedin fa-stack-1x fa-inverse"></i>
@ -108,9 +139,9 @@
</li> </li>
{%- endif -%} {%- endif -%}
{%- if site.social-network-links.xing -%} {%- if network[0] == "xing" -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a href="https://www.xing.com/profile/{{ site.social-network-links.xing }}" title="Xing"> <a href="https://www.xing.com/profile/{{ network[1] }}" title="Xing">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i> <i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-xing fa-stack-1x fa-inverse"></i> <i class="fab fa-xing fa-stack-1x fa-inverse"></i>
@ -120,9 +151,9 @@
</li> </li>
{%- endif -%} {%- endif -%}
{%- if site.social-network-links.stackoverflow -%} {%- if network[0] == "stackoverflow" -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a href="https://stackoverflow.com/users/{{ site.social-network-links.stackoverflow }}" title="StackOverflow"> <a href="https://stackoverflow.com/users/{{ network[1] }}" title="StackOverflow">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i> <i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-stack-overflow fa-stack-1x fa-inverse"></i> <i class="fab fa-stack-overflow fa-stack-1x fa-inverse"></i>
@ -132,9 +163,9 @@
</li> </li>
{%- endif -%} {%- endif -%}
{%- if site.social-network-links.snapchat -%} {%- if network[0] == "snapchat" -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a href="https://www.snapchat.com/add/{{ site.social-network-links.snapchat }}" title="Snapchat"> <a href="https://www.snapchat.com/add/{{ network[1] }}" title="Snapchat">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i> <i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-snapchat-ghost fa-stack-1x fa-inverse"></i> <i class="fab fa-snapchat-ghost fa-stack-1x fa-inverse"></i>
@ -144,9 +175,9 @@
</li> </li>
{%- endif -%} {%- endif -%}
{%- if site.social-network-links.instagram -%} {%- if network[0] == "instagram" -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a href="https://www.instagram.com/{{ site.social-network-links.instagram }}" title="Instagram"> <a href="https://www.instagram.com/{{ network[1] }}" title="Instagram">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i> <i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-instagram fa-stack-1x fa-inverse"></i> <i class="fab fa-instagram fa-stack-1x fa-inverse"></i>
@ -156,9 +187,9 @@
</li> </li>
{%- endif -%} {%- endif -%}
{%- if site.social-network-links.youtube -%} {%- if network[0] == "youtube" -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a href="https://www.youtube.com/{{ site.social-network-links.youtube }}" title="YouTube"> <a href="https://www.youtube.com/{{ network[1] }}" title="YouTube">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i> <i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-youtube fa-stack-1x fa-inverse"></i> <i class="fab fa-youtube fa-stack-1x fa-inverse"></i>
@ -168,9 +199,9 @@
</li> </li>
{%- endif -%} {%- endif -%}
{%- if site.social-network-links.spotify -%} {%- if network[0] == "spotify" -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a href="https://open.spotify.com/user/{{ site.social-network-links.spotify }}" title="Spotify"> <a href="https://open.spotify.com/user/{{ network[1] }}" title="Spotify">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i> <i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-spotify fa-stack-1x fa-inverse"></i> <i class="fab fa-spotify fa-stack-1x fa-inverse"></i>
@ -180,9 +211,9 @@
</li> </li>
{%- endif -%} {%- endif -%}
{%- if site.social-network-links.telephone -%} {%- if network[0] == "telephone" -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a href="tel:{{ site.social-network-links.telephone }}" title="Phone"> <a href="tel:{{ network[1] }}" title="Phone">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i> <i class="fas fa-circle fa-stack-2x"></i>
<i class="fas fa-phone fa-stack-1x fa-inverse"></i> <i class="fas fa-phone fa-stack-1x fa-inverse"></i>
@ -192,9 +223,9 @@
</li> </li>
{%- endif -%} {%- endif -%}
{%- if site.social-network-links.steam -%} {%- if network[0] == "steam" -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a href="https://steamcommunity.com/id/{{ site.social-network-links.steam }}" title="Steam"> <a href="https://steamcommunity.com/id/{{ network[1] }}" title="Steam">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i> <i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-steam fa-stack-1x fa-inverse"></i> <i class="fab fa-steam fa-stack-1x fa-inverse"></i>
@ -204,9 +235,9 @@
</li> </li>
{%- endif -%} {%- endif -%}
{%- if site.social-network-links.twitch -%} {%- if network[0] == "twitch" -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a href="https://www.twitch.tv/{{ site.social-network-links.twitch }}" title="Twitch"> <a href="https://www.twitch.tv/{{ network[1] }}" title="Twitch">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i> <i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-twitch fa-stack-1x fa-inverse"></i> <i class="fab fa-twitch fa-stack-1x fa-inverse"></i>
@ -216,9 +247,9 @@
</li> </li>
{%- endif -%} {%- endif -%}
{%- if site.social-network-links.yelp -%} {%- if network[0] == "yelp" -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a href="https://{{ site.social-network-links.yelp }}.yelp.com" title="Yelp"> <a href="https://yelp.com/{{ network[1] }}" title="Yelp">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i> <i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-yelp fa-stack-1x fa-inverse"></i> <i class="fab fa-yelp fa-stack-1x fa-inverse"></i>
@ -228,9 +259,9 @@
</li> </li>
{%- endif -%} {%- endif -%}
{%- if site.social-network-links.mastodon -%} {%- if network[0] == "mastodon" -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a href="https://{{ site.social-network-links.mastodon }}" title="Mastodon"> <a rel="me" href="https://{{ network[1] }}" title="Mastodon">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i> <i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-mastodon fa-stack-1x fa-inverse"></i> <i class="fab fa-mastodon fa-stack-1x fa-inverse"></i>
@ -240,9 +271,9 @@
</li> </li>
{%- endif -%} {%- endif -%}
{%- if site.social-network-links.bluesky -%} {%- if network[0] == "bluesky" -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a rel="me" href="https://bsky.app/profile/{{ site.social-network-links.bluesky }}" title="Bluesky"> <a rel="me" href="https://bsky.app/profile/{{ network[1] }}" title="Bluesky">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i> <i class="fas fa-circle fa-stack-2x"></i>
<i class="fas fa-brands fa-bluesky fa-stack-1x fa-inverse"></i> <i class="fas fa-brands fa-bluesky fa-stack-1x fa-inverse"></i>
@ -252,9 +283,9 @@
</li> </li>
{%- endif -%} {%- endif -%}
{%- if site.social-network-links.ORCID -%} {%- if network[0] == "ORCID" -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a href="https://orcid.org/{{ site.social-network-links.ORCID }}" title="ORCID"> <a href="https://orcid.org/{{ network[1] }}" title="ORCID">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i> <i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-orcid fa-stack-1x fa-inverse"></i> <i class="fab fa-orcid fa-stack-1x fa-inverse"></i>
@ -264,9 +295,9 @@
</li> </li>
{%- endif -%} {%- endif -%}
{%- if site.social-network-links.google-scholar -%} {%- if network[0] == "google-scholar" -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a href="https://scholar.google.com/{{ site.social-network-links.google-scholar }}" title="Google Scholar"> <a href="https://scholar.google.com/citations?user={{ network[1] }}" title="Google Scholar">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i> <i class="fas fa-circle fa-stack-2x"></i>
<i class="fa fa-graduation-cap fa-stack-1x fa-inverse"></i> <i class="fa fa-graduation-cap fa-stack-1x fa-inverse"></i>
@ -276,9 +307,9 @@
</li> </li>
{%- endif -%} {%- endif -%}
{%- if site.social-network-links.patreon -%} {%- if network[0] == "patreon" -%}
<li class="list-inline-item"> <li class="list-inline-item">
<a href="https://patreon.com/{{ site.social-network-links.patreon }}" title="Patreon"> <a href="https://patreon.com/{{ network[1] }}" title="Patreon">
<span class="fa-stack fa-lg" aria-hidden="true"> <span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i> <i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-patreon fa-stack-1x fa-inverse"></i> <i class="fab fa-patreon fa-stack-1x fa-inverse"></i>
@ -288,4 +319,95 @@
</li> </li>
{%- endif -%} {%- endif -%}
{%- if network[0] == "medium" -%}
<li class="list-inline-item">
<a href="https://medium.com/@{{ network[1] }}" title="Medium">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-medium fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Medium</span>
</a>
</li>
{%- endif -%}
{%- if network[0] == "itchio" -%}
<li class="list-inline-item">
<a href="https://{{ network[1] }}.itch.io/" title="Itchio">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-itch-io fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Itchio</span>
</a>
</li>
{%- endif -%}
{%- if network[0] == "discord" -%}
{% assign discord_start = network[1] | split: "/" | first -%}
{% unless discord_start == 'users' or discord_start == 'invite' -%}
{% assign discord_url_prefix = 'invite/' -%}
{% endunless -%}
<li class="list-inline-item">
<a href="https://discord.com/{{discord_url_prefix}}{{network[1]}}" title="Discord">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-discord fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Discord</span>
</a>
</li>
{%- endif -%}
{%- if network[0] == "kaggle" -%}
<li class="list-inline-item">
<a href="https://www.kaggle.com/{{ network[1] }}" title="Kaggle">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-kaggle fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Kaggle</span>
</a>
</li>
{%- endif -%}
{%- if network[0] == "hackerrank" -%}
<li class="list-inline-item">
<a href="https://www.hackerrank.com/{{ network[1] }}" title="Hackerrank">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-hackerrank fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Hackerrank</span>
</a>
</li>
{%- endif -%}
{%- if network[0] == "untappd" -%}
<li class="list-inline-item">
<a href="https://untappd.com/user/{{ network[1] }}" title="Untappd">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-untappd fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Untappd</span>
</a>
</li>
{%- endif -%}
{%- if network[0] == "strava" -%}
<li class="list-inline-item">
<a href="https://www.strava.com/athletes/{{ site.social-network-links.strava}}" title="Strava">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-strava fa-stack-1x fa-inverse"></i>
</span>
<span class="sr-only">Strava</span>
</a>
</li>
{%- endif -%}
{%- endfor -%}
</ul> </ul>
{% endif %}

View File

@ -11,10 +11,10 @@
<span class="sr-only">Share: </span> <span class="sr-only">Share: </span>
{% if site.share-links-active.twitter %} {% if site.share-links-active.twitter %}
<a href="https://twitter.com/intent/tweet?text={{ page.title | url_encode }}&url={{ page.url | absolute_url | url_encode }}" <a href="https://twitter.com/intent/tweet?text={{ page.title | strip_html | url_encode }}&url={{ page.url | absolute_url | url_encode }}"
class="btn btn-social-icon btn-twitter" title="Share on Twitter"> class="btn btn-social-icon btn-twitter" title="Share on X (Twitter)">
<span class="fab fa-fw fa-twitter" aria-hidden="true"></span> <span class="fab fa-fw fa-x-twitter" aria-hidden="true"></span>
<span class="sr-only">Twitter</span> <span class="sr-only">X (Twitter)</span>
</a> </a>
{% endif %} {% endif %}
@ -42,6 +42,14 @@
</a> </a>
{% endif %} {% endif %}
{% if site.share-links-active.reddit %}
<a href="https://www.reddit.com/submit?url={{ page.url | absolute_url | url_encode }}"
class="btn btn-social-icon btn-reddit" title="Share on Reddit">
<span class="fab fa-fw fa-reddit" aria-hidden="true"></span>
<span class="sr-only">Reddit</span>
</a>
{% endif %}
</section> </section>
{% endif %} {% endif %}

View File

@ -21,11 +21,10 @@ common-js:
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ page.language | default: site.language | default: 'en' }}"> <html lang="{{ page.language | default: site.language | default: 'en' }}">
<!-- Beautiful Jekyll 5.0.0 | Copyright Dean Attali 2020 --> <!-- Beautiful Jekyll 6.0.1 | Copyright Dean Attali 2023 -->
{% include head.html %} {% include head.html %}
<body> <body>
{% include gtm_body.html %} {% include gtm_body.html %}
{% include nav.html %} {% include nav.html %}

View File

@ -4,7 +4,7 @@ layout: base
<div class="intro-header"></div> <div class="intro-header"></div>
<div role="main" class="{% if page.full-width %} container-fluid {% else %} container-md {% endif %}"> <main class="{% if page.full-width %} container-fluid {% else %} container-md {% endif %}">
{% if page.before-content %} {% if page.before-content %}
<div class="before-content"> <div class="before-content">
{% for file in page.before-content %} {% for file in page.before-content %}
@ -22,4 +22,4 @@ layout: base
{% endfor %} {% endfor %}
</div> </div>
{% endif %} {% endif %}
</div> </main>

View File

@ -6,9 +6,11 @@ layout: page
{% assign posts = paginator.posts | default: site.posts %} {% assign posts = paginator.posts | default: site.posts %}
<div class="posts-list"> <!-- role="list" needed so that `list-style: none` in Safari doesn't remove the list semantics -->
<ul class="posts-list list-unstyled" role="list">
{% for post in posts %} {% for post in posts %}
<article class="post-preview"> <li class="post-preview">
<article>
{%- capture thumbnail -%} {%- capture thumbnail -%}
{% if post.thumbnail-img %} {% if post.thumbnail-img %}
@ -35,15 +37,18 @@ layout: page
{% endif %} {% endif %}
<a href="{{ post.url | absolute_url }}"> <a href="{{ post.url | absolute_url }}">
<h2 class="post-title">{{ post.title }}</h2> <h2 class="post-title">{{ post.title | strip_html }}</h2>
{% if post.subtitle %} {% if post.subtitle %}
<h3 class="post-subtitle"> <h3 class="post-subtitle">
{{ post.subtitle }} {{ post.subtitle | strip_html }}
</h3> </h3>
{% endif %} {% endif %}
</a> </a>
{% if post.author %}
<span>By <strong>{{ post.author | strip_html }}</strong></span>
{% endif %}
<p class="post-meta"> <p class="post-meta">
{% assign date_format = site.date_format | default: "%B %-d, %Y" %} {% assign date_format = site.date_format | default: "%B %-d, %Y" %}
Posted on {{ post.date | date: date_format }} Posted on {{ post.date | date: date_format }}
@ -68,7 +73,7 @@ layout: page
<div class="post-entry"> <div class="post-entry">
{% assign excerpt_length = site.excerpt_length | default: 50 %} {% assign excerpt_length = site.excerpt_length | default: 50 %}
{{ post.excerpt | strip_html | xml_escape | truncatewords: excerpt_length }} {{ post.excerpt | strip_html | truncatewords: excerpt_length }}
{% assign excerpt_word_count = post.excerpt | number_of_words %} {% assign excerpt_word_count = post.excerpt | number_of_words %}
{% if post.content != post.excerpt or excerpt_word_count > excerpt_length %} {% if post.content != post.excerpt or excerpt_word_count > excerpt_length %}
<a href="{{ post.url | absolute_url }}" class="post-read-more">[Read&nbsp;More]</a> <a href="{{ post.url | absolute_url }}" class="post-read-more">[Read&nbsp;More]</a>
@ -79,26 +84,38 @@ layout: page
{% if site.feed_show_tags != false and post.tags.size > 0 %} {% if site.feed_show_tags != false and post.tags.size > 0 %}
<div class="blog-tags"> <div class="blog-tags">
<span>Tags:</span> <span>Tags:</span>
<!-- role="list" needed so that `list-style: none` in Safari doesn't remove the list semantics -->
<ul class="d-inline list-inline" role="list">
{% for tag in post.tags %} {% for tag in post.tags %}
<li class="list-inline-item">
<a href="{{ '/tags' | absolute_url }}#{{- tag -}}">{{- tag -}}</a> <a href="{{ '/tags' | absolute_url }}#{{- tag -}}">{{- tag -}}</a>
</li>
{% endfor %} {% endfor %}
</ul>
</div> </div>
{% endif %} {% endif %}
</article> </article>
</li>
{% endfor %} {% endfor %}
</div> </ul>
{% if paginator.total_pages > 1 %} {% if paginator.total_pages > 1 %}
<ul class="pagination main-pager"> <ul class="pagination main-pager">
{% if paginator.previous_page %} {% if paginator.previous_page %}
<li class="page-item previous"> <li class="page-item previous">
<a class="page-link" href="{{ paginator.previous_page_path | absolute_url }}">&larr; Newer Posts</a> <a class="page-link" href="{{ paginator.previous_page_path | absolute_url }}">
<i class="fas fa-arrow-left" alt="Newer Posts"></i>
<span class="d-none d-sm-inline-block">Newer Posts</span>
</a>
</li> </li>
{% endif %} {% endif %}
{% if paginator.next_page %} {% if paginator.next_page %}
<li class="page-item next"> <li class="page-item next">
<a class="page-link" href="{{ paginator.next_page_path | absolute_url }}">Older Posts &rarr;</a> <a class="page-link" href="{{ paginator.next_page_path | absolute_url }}">
<span class="d-none d-sm-inline-block">Older Posts</span>
<i class="fas fa-arrow-right" alt="Older Posts"></i>
</a>
</li> </li>
{% endif %} {% endif %}
</ul> </ul>

View File

@ -20,7 +20,7 @@ common-ext-js:
<body> <body>
<div role="main" class="{% if page.full-width %} container-fluid {% else %} container-md {% endif %} main-content"> <main class="{% if page.full-width %} container-fluid {% else %} container-md {% endif %} main-content">
{% if page.before-content %} {% if page.before-content %}
<div class="before-content"> <div class="before-content">
{% for file in page.before-content %} {% for file in page.before-content %}
@ -38,7 +38,7 @@ common-ext-js:
{% endfor %} {% endfor %}
</div> </div>
{% endif %} {% endif %}
</div> </main>
{% include footer-minimal.html %} {% include footer-minimal.html %}

View File

@ -4,7 +4,7 @@ layout: base
{% include header.html type="page" %} {% include header.html type="page" %}
<div class="{% if page.full-width %} container-fluid {% else %} container-md {% endif %}" role="main"> <main class="{% if page.full-width %} container-fluid {% else %} container-md {% endif %}">
<div class="row"> <div class="row">
<div class="{% if page.full-width %} col {% else %} col-xl-8 offset-xl-2 col-lg-10 offset-lg-1 {% endif %}"> <div class="{% if page.full-width %} col {% else %} col-xl-8 offset-xl-2 col-lg-10 offset-lg-1 {% endif %}">
{% if page.before-content %} {% if page.before-content %}
@ -28,4 +28,4 @@ layout: base
{% include comments.html %} {% include comments.html %}
</div> </div>
</div> </div>
</div> </main>

View File

@ -4,7 +4,7 @@ layout: base
{% include header.html type="post" %} {% include header.html type="post" %}
<div class="{% if page.full-width %} container-fluid {% else %} container-md {% endif %}"> <main class="{% if page.full-width %} container-fluid {% else %} container-md {% endif %}">
<div class="row"> <div class="row">
<div class="{% if page.full-width %} col {% else %} col-xl-8 offset-xl-2 col-lg-10 offset-lg-1 {% endif %}"> <div class="{% if page.full-width %} col {% else %} col-xl-8 offset-xl-2 col-lg-10 offset-lg-1 {% endif %}">
@ -39,9 +39,9 @@ layout: base
</div> </div>
{% endif %} {% endif %}
<article role="main" class="blog-post"> <div class="blog-post">
{{ content }} {{ content }}
</article> </div>
{% if page.tags.size > 0 %} {% if page.tags.size > 0 %}
<div class="blog-tags"> <div class="blog-tags">
@ -67,16 +67,22 @@ layout: base
<ul class="pagination blog-pager"> <ul class="pagination blog-pager">
{% if page.previous.url %} {% if page.previous.url %}
<li class="page-item previous"> <li class="page-item previous">
<a class="page-link" href="{{ page.previous.url | relative_url }}" data-toggle="tooltip" data-placement="top" title="{{page.previous.title}}">&larr; Previous Post</a> <a class="page-link" href="{{ page.previous.url | relative_url }}" data-toggle="tooltip" data-placement="top" title="{{page.previous.title | strip_html | xml_escape}}">
<i class="fas fa-arrow-left" alt="Previous Post"></i>
<span class="d-none d-sm-inline-block">Previous Post</span>
</a>
</li> </li>
{% endif %} {% endif %}
{% if page.next.url %} {% if page.next.url %}
<li class="page-item next"> <li class="page-item next">
<a class="page-link" href="{{ page.next.url | relative_url }}" data-toggle="tooltip" data-placement="top" title="{{page.next.title}}">Next Post &rarr;</a> <a class="page-link" href="{{ page.next.url | relative_url }}" data-toggle="tooltip" data-placement="top" title="{{page.next.title | strip_html | xml_escape}}">
<span class="d-none d-sm-inline-block">Next Post</span>
<i class="fas fa-arrow-right" alt="Next Post"></i>
</a>
</li> </li>
{% endif %} {% endif %}
</ul> </ul>
{% include comments.html %} {% include comments.html %}
</div> </div>
</div> </div>
</div> </main>

View File

@ -4,6 +4,26 @@ layout: null
@import url("pygment_highlights.css"); @import url("pygment_highlights.css");
:root {
/* config file CSS variables */
--page-col: {{ site.page-col | default: "#FFFFFF" }};
--text-col: {{ site.text-col | default: "#404040" }};
--link-col: {{ site.link-col | default: "#008AFF" }};
--hover-col: {{ site.hover-col | default: "#0085A1" }};
--navbar-col: {{ site.navbar-col | default: "#EAEAEA" }};
--navbar-text-col: {{ site.navbar-text-col | default: "#404040" }};
--navbar-border-col: {{ site.navbar-border-col | default: "#DDDDDD" }};
--footer-col: {{ site.footer-col | default: "#EAEAEA" }};
--footer-text-col: {{ site.footer-text-col | default: "#777777" }};
--footer-link-col: {{ site.footer-link-col | default: "#404040" }};
--footer-hover-col: {{ site.footer-hover-col | default: "#0085A1" }};
/* common CSS variables */
--body-font: 'Lora', 'Times New Roman', serif;
--header-font: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
--mid-col: #808080;
}
/* --- General --- */ /* --- General --- */
html { html {
@ -11,22 +31,29 @@ html {
} }
body { body {
font-family: 'Lora', 'Times New Roman', serif; font-family: var(--body-font);
font-size: 1.125rem; font-size: 1.125rem;
color: {{ site.text-col | default: "#404040" }}; color: var(--text-col);
position: relative; position: relative;
background-color: {{ site.page-col | default: "#FFFFFF" }}; background-color: var(--page-col);
{% if site.page-img %} {% if site.page-img %}
background-image: url({{ site.page-img | relative_url }}); background-image: url({{ site.page-img | relative_url }});
background-attachment: fixed; background-attachment: fixed;
{% endif %} {% endif %}
overflow-wrap: break-word;
min-height: 100vh;
display: flex;
flex-direction: column;
}
body > main {
flex: 1;
} }
p { p {
line-height: 1.5; line-height: 1.5;
margin: 1.875rem 0; margin: 1.875rem 0;
} }
h1,h2,h3,h4,h5,h6 { h1,h2,h3,h4,h5,h6 {
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-family: var(--header-font);
font-weight: 800; font-weight: 800;
line-height: 1.1; line-height: 1.1;
} }
@ -46,19 +73,22 @@ h1, h2, h3, h4 {
margin-top: 1.25rem; margin-top: 1.25rem;
} }
a { a {
color: {{ site.link-col | default: "#008AFF" }}; color: var(--link-col);
} }
a:hover, a:hover,
a:focus { a:focus {
color: {{ site.hover-col | default: "#0085A1" }}; color: var(--hover-col);
} }
blockquote { blockquote {
color: #808080; color: var(--mid-col);
font-style: italic; font-style: italic;
} }
blockquote p:first-child { blockquote p:first-child {
margin-top: 0; margin-top: 0;
} }
.jumbotron {
background: #EEE;
}
hr.small { hr.small {
max-width: 6.25rem; max-width: 6.25rem;
margin: 1rem auto; margin: 1rem auto;
@ -80,21 +110,21 @@ hr.small {
} }
::-moz-selection { ::-moz-selection {
color: #fff; color: var(--page-col);
background-color: var(--hover-col);
text-shadow: none; text-shadow: none;
background-color: {{ site.hover-col | default: "#0085A1" }};
} }
::selection { ::selection {
color: #fff; color: var(--page-col);
background-color: var(--hover-col);
text-shadow: none; text-shadow: none;
background-color: {{ site.hover-col | default: "#0085A1" }};
} }
img::selection { img::selection {
color: #fff; color: var(--hover-col);
background: transparent; background: transparent;
} }
img::-moz-selection { img::-moz-selection {
color: #fff; color: var(--hover-col);
background: transparent; background: transparent;
} }
@ -122,9 +152,9 @@ img {
/* --- Navbar --- */ /* --- Navbar --- */
.navbar-custom { .navbar-custom {
background-color: {{ site.navbar-col | default: "#EAEAEA" }}; background-color: var(--navbar-col);
border-bottom: 1px solid {{ site.navbar-border-col | default: "#DDDDDD" }}; border-bottom: 1px solid var(--navbar-border-col);
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-family: var(--header-font);
{% if site.navbar-img %} {% if site.navbar-img %}
background-image: url({{ site.navbar-img | relative_url }}); background-image: url({{ site.navbar-img | relative_url }});
background-attachment: fixed; background-attachment: fixed;
@ -180,8 +210,6 @@ img {
} }
.navbar-custom .navbar-nav .nav-link { .navbar-custom .navbar-nav .nav-link {
padding-top: 0;
padding-bottom: 0;
line-height: 1.25rem; line-height: 1.25rem;
padding-top: 0.9375rem; padding-top: 0.9375rem;
padding-bottom: 0.9375rem; padding-bottom: 0.9375rem;
@ -190,7 +218,7 @@ img {
.navbar-custom .navbar-brand, .navbar-custom .navbar-brand,
.navbar-custom .navbar-nav .nav-link { .navbar-custom .navbar-nav .nav-link {
font-weight: 800; font-weight: 800;
color: {{ site.navbar-text-col | default: "#404040" }}; color: var(--navbar-text-col);
} }
.navbar-toggler { .navbar-toggler {
@ -246,22 +274,28 @@ img {
} }
.navbar-custom .nav-item.dropdown .dropdown-menu { .navbar-custom .nav-item.dropdown .dropdown-menu {
min-width: 0;
margin-top: 0; margin-top: 0;
font-size: 1em; font-size: 1em;
border: 0; border: 0;
padding: 0; padding: 0;
{% if site.navbar-var-length %}
min-width: 100%;
{% else %}
min-width: 0;
width: 100%; width: 100%;
word-break: break-word; word-break: break-word;
{% endif %}
} }
.navbar-custom .nav-item.dropdown .dropdown-menu .dropdown-item { .navbar-custom .nav-item.dropdown .dropdown-menu .dropdown-item {
white-space: normal;
padding: 0.625rem; padding: 0.625rem;
background-color: {{ site.navbar-col | default: "#EAEAEA" }}; background-color: var(--navbar-col);
text-decoration: none !important; text-decoration: none !important;
border-width: 0 1px 1px 1px;
font-weight: normal; font-weight: normal;
color: {{ site.navbar-text-col | default: "#404040" }}; color: var(--navbar-text-col);
{% unless site.navbar-var-length %}
white-space: normal;
{% endunless %}
} }
@media (min-width: 1200px) { @media (min-width: 1200px) {
@ -271,14 +305,18 @@ img {
.navbar-custom .nav-item.dropdown .dropdown-menu .dropdown-item { .navbar-custom .nav-item.dropdown .dropdown-menu .dropdown-item {
padding-left: 0.625rem; padding-left: 0.625rem;
border: 1px solid {{ site.navbar-border-col | default: "#DDDDDD" }}; border: 1px solid var(--navbar-border-col);
border-width: 0 1px 1px; border-width: 0 1px 1px;
} }
.navbar-custom .nav-item.dropdown .dropdown-menu .dropdown-item:first-child {
border-top-width: 1px;
}
} }
@media (max-width: 1199px) { @media (max-width: 1199px) {
.navbar-custom .navbar-collapse { .navbar-custom .navbar-collapse {
border-top: 1px solid {{ site.navbar-border-col | default: "#DDDDDD" }}; border-top: 1px solid var(--navbar-border-col);
margin: 0 -1rem; margin: 0 -1rem;
} }
@ -304,7 +342,7 @@ img {
.navbar-custom .navbar-nav .nav-link:focus, .navbar-custom .navbar-nav .nav-link:focus,
.navbar-custom .navbar-nav .dropdown-menu .dropdown-item:hover, .navbar-custom .navbar-nav .dropdown-menu .dropdown-item:hover,
.navbar-custom .navbar-nav .dropdown-menu .dropdown-item:focus { .navbar-custom .navbar-nav .dropdown-menu .dropdown-item:focus {
color: {{ site.hover-col | default: "#0085A1" }}; color: var(--hover-col);
} }
.navbar-custom .avatar-container { .navbar-custom .avatar-container {
@ -370,10 +408,10 @@ img {
footer { footer {
padding: 1.875rem 0; padding: 1.875rem 0;
border-top: 1px #EAEAEA solid; border-top: 1px var(--footer-col) solid;
margin-top: 3.125rem; margin-top: 3.125rem;
font-size: 0.875rem; font-size: 0.875rem;
background-color: {{ site.footer-col | default: "#EAEAEA" }}; background-color: var(--footer-col);
{% if site.footer-img %} {% if site.footer-img %}
background-image: url({{ site.footer-img | relative_url }}); background-image: url({{ site.footer-img | relative_url }});
background-attachment: fixed; background-attachment: fixed;
@ -381,20 +419,34 @@ footer {
} }
footer p.text-muted { footer p.text-muted {
color: {{ site.footer-text-col | default: "#777777" }} !important; color: var(--footer-text-col) !important;
} }
footer a { footer a {
color: {{ site.footer-link-col | default: "#404040" }}; color: var(--footer-link-col);
}
footer .footer-links a {
color: var(--text-col);
}
footer .footer-links .fa-inverse {
color: var(--page-col);
}
footer a:hover,
footer a:focus {
color: var(--footer-hover-col);
} }
footer .list-inline { footer .list-inline {
margin: 0; margin: 0;
padding: 0; padding: 0;
margin-bottom: 1.875rem; margin-bottom: 1.375rem;
}
footer .list-inline .list-inline-item {
margin-bottom: 0.5rem;
} }
footer .copyright { footer .copyright {
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-family: var(--header-font);
text-align: center; text-align: center;
margin-bottom: 0; margin-bottom: 0;
margin-top: 0; margin-top: 0;
@ -406,7 +458,7 @@ footer .theme-by {
footer .footer-custom-content { footer .footer-custom-content {
text-align: center; text-align: center;
margin-bottom: 0.9375rem; margin-bottom: 0.9375rem;
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-family: var(--header-font);
} }
@media (min-width: 768px) { @media (min-width: 768px) {
@ -426,6 +478,10 @@ footer .footer-custom-content {
/* --- Post preview (feed) --- */ /* --- Post preview (feed) --- */
.posts-list {
margin: 0;
}
.post-preview { .post-preview {
padding: 1.25rem 0; padding: 1.25rem 0;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
@ -444,14 +500,14 @@ footer .footer-custom-content {
.post-preview a { .post-preview a {
text-decoration: none; text-decoration: none;
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-family: var(--header-font);
color: {{ site.text-col | default: "#404040" }}; color: var(--text-col);
} }
.post-preview a:focus, .post-preview a:focus,
.post-preview a:hover { .post-preview a:hover {
text-decoration: none; text-decoration: none;
color: {{ site.hover-col | default: "#0085A1" }}; color: var(--hover-col);
} }
.post-preview .post-title { .post-preview .post-title {
@ -465,11 +521,11 @@ footer .footer-custom-content {
} }
.post-preview .post-meta, .post-preview .post-meta,
.post-heading .post-meta { .post-heading .post-meta {
color: #808080; color: var(--mid-col);
font-size: 1.125rem; font-size: 1.125rem;
font-style: italic; font-style: italic;
margin: 0 0 0.625rem; margin: 0 0 0.625rem;
font-family: 'Lora', 'Times New Roman', serif; font-family: var(--body-font);
} }
.post-heading .post-meta { .post-heading .post-meta {
display: inline-block; display: inline-block;
@ -546,18 +602,22 @@ footer .footer-custom-content {
/* --- Tags --- */ /* --- Tags --- */
.blog-tags { .blog-tags {
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-family: var(--header-font);
font-size: 0.9375rem; font-size: 0.9375rem;
margin: 1.875rem 0; margin: 1.875rem 0;
} }
.blog-tags span { .blog-tags span {
color: {{ site.text-col | default: "#404040" }}; color: var(--text-col);
opacity: 0.8; opacity: 0.8;
} }
.blog-tags .list-inline-item {
margin-right: 0;
}
.blog-tags a { .blog-tags a {
color: {{ site.text-col | default: "#404040" }}; color: var(--text-col);
text-decoration: none; text-decoration: none;
padding: 0 0.3125rem; padding: 0 0.3125rem;
opacity: 0.8; opacity: 0.8;
@ -567,8 +627,8 @@ footer .footer-custom-content {
.blog-tags a:hover { .blog-tags a:hover {
opacity: 1; opacity: 1;
color: {{ site.text-col | default: "#404040" }}; color: var(--text-col);
border-color: {{ site.text-col | default: "#404040" }}; border-color: var(--text-col);
} }
.post-preview .blog-tags { .post-preview .blog-tags {
@ -589,7 +649,7 @@ footer .footer-custom-content {
} }
#full-tags-list { #full-tags-list {
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-family: var(--header-font);
} }
#full-tags-list .tag-entry { #full-tags-list .tag-entry {
@ -601,7 +661,7 @@ footer .footer-custom-content {
} }
#full-tags-list .tag-entry .entry-date { #full-tags-list .tag-entry .entry-date {
color: #808080; color: var(--mid-col);
font-style: italic; font-style: italic;
font-size: 1rem; font-size: 1rem;
} }
@ -652,18 +712,18 @@ nav.top-nav-short-permanent ~ header > .intro-header.big-img {
} }
.intro-header .page-heading h1 { .intro-header .page-heading h1 {
margin-top: 0; margin-top: 0;
font-size: 1.5rem; font-size: 3.125rem;
} }
.intro-header .post-heading h1 { .intro-header .post-heading h1 {
margin-top: 0; margin-top: 0;
font-size: 1.5rem; font-size: 2.1875rem;
} }
.intro-header .page-heading .page-subheading, .intro-header .page-heading .page-subheading,
.intro-header .post-heading .post-subheading { .intro-header .post-heading .post-subheading {
font-size: 1.6875rem; font-size: 1.6875rem;
line-height: 1.1; line-height: 1.1;
display: block; display: block;
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-family: var(--header-font);
font-weight: 300; font-weight: 300;
margin: 0.625rem 0 0; margin: 0.625rem 0 0;
} }
@ -688,7 +748,7 @@ nav.top-nav-short-permanent ~ header > .intro-header.big-img {
padding: 0.3125rem 0.625rem; padding: 0.3125rem 0.625rem;
font-size: 0.6875rem; font-size: 0.6875rem;
color: #EEE; color: #EEE;
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-family: var(--header-font);
right: 0; right: 0;
bottom: 0; bottom: 0;
display: none; display: none;
@ -715,39 +775,6 @@ nav.top-nav-short-permanent ~ header > .intro-header.big-img {
} }
} }
.header-section.has-img .no-img {
margin-top: 0;
background-color: #FCFCFC;
margin: 0 0 2.5rem;
padding: 1.25rem 0;
box-shadow: 0 0 0.3125rem #AAA;
}
/* Many phones are 320 or 360px, so make sure images are a proper aspect ratio in those cases */
.header-section.has-img .intro-header.no-img {
display: none;
}
@media (max-width: 365px) {
.header-section.has-img .intro-header.no-img {
display: block;
}
.intro-header.big-img {
width: 100%;
height: 13.75rem;
}
.intro-header.big-img .page-heading,
.intro-header.big-img .post-heading {
display: none;
}
.header-section.has-img .big-img {
margin-bottom: 0;
}
}
@media (max-width: 325px) {
.intro-header.big-img {
height: 12.5rem;
}
}
#header-gh-btns { #header-gh-btns {
margin-bottom: 0.9375rem; margin-bottom: 0.9375rem;
} }
@ -780,15 +807,16 @@ nav.top-nav-short-permanent ~ header > .intro-header.big-img {
} }
.pagination .page-item .page-link { .pagination .page-item .page-link {
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-family: var(--header-font);
text-transform: uppercase; text-transform: uppercase;
font-size: 0.875rem; font-size: 0.875rem;
font-weight: 800; font-weight: 800;
letter-spacing: 1px; letter-spacing: 1px;
padding: 0.625rem 0.3125rem; padding: 0.625rem 0.3125rem;
background-color: #FFF; background-color: var(--page-col);
border-radius: 0; border-radius: 0;
color: {{ site.text-col | default: "#404040" }}; color: var(--text-col);
padding: 0.75rem 1rem;
} }
@media (min-width: 768px) { @media (min-width: 768px) {
.pagination .page-item .page-link { .pagination .page-item .page-link {
@ -797,38 +825,37 @@ nav.top-nav-short-permanent ~ header > .intro-header.big-img {
} }
.pagination .page-item .page-link:hover, .pagination .page-item .page-link:hover,
.pagination .page-item .page-link:focus { .pagination .page-item .page-link:focus {
color: #FFF; color: var(--page-col);
border: 1px solid {{ site.hover-col | default: "#0085A1" }}; border: 1px solid var(--hover-col);
background-color: {{ site.hover-col | default: "#0085A1" }}; background-color: var(--hover-col);
} }
/* --- Tables --- */ /* --- Tables --- */
table { table {
padding: 0; padding: 0;
overflow-x: auto;
display: block;
} }
table tr { table tr {
border-top: 1px solid #cccccc; border-top: 1px solid #cccccc;
background-color: #ffffff; background-color: var(--page-col);
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
table tr:nth-child(2n) { table tr:nth-child(2n) {
background-color: #f8f8f8; background-color: #f8f8f8;
} }
table tr th { table tr th,
font-weight: bold;
border: 1px solid #cccccc;
text-align: left;
margin: 0;
padding: 0.375rem 0.8125rem;
}
table tr td { table tr td {
border: 1px solid #cccccc; border: 1px solid #cccccc;
text-align: left; text-align: left;
margin: 0; margin: 0;
padding: 0.375rem 0.8125rem; padding: 0.375rem 0.8125rem;
} }
table tr th {
font-weight: bold;
}
table tr th :first-child, table tr th :first-child,
table tr td :first-child { table tr td :first-child {
margin-top: 0; margin-top: 0;
@ -975,7 +1002,7 @@ pre {
max-width: 25%; max-width: 25%;
border-width: 0.25rem; border-width: 0.25rem;
border-radius: 0.1875rem; border-radius: 0.1875rem;
border-color: #808080; border-color: var(--mid-col);
} }
.blog-post blockquote { .blog-post blockquote {
@ -993,3 +1020,107 @@ pre {
display: block; display: block;
margin: 0 auto; margin: 0 auto;
} }
/* Search bar */
#beautifuljekyll-search-overlay {
font-family: var(--header-font);
display: none;
z-index: 999999;
position: fixed;
background: rgba(0,0,0,0.9);
left: 0;
right: 0;
top: 0;
bottom: 0;
text-align: center;
padding: 1rem;
}
#nav-search-exit {
position: absolute;
top: 1.5rem;
cursor: pointer;
right: 25%;
margin-right: 2rem;
color: #555;
font-size: 2rem;
line-height: 2rem;
font-weight: bold;
}
#nav-search-exit:hover {
color: #000;
}
#nav-search-input {
text-align: center;
background: #e7edee;
margin: auto;
display: block;
font-size: 2rem;
width: 50%;
transition: width 300ms ease;
color: #222;
border-radius: 5rem;
outline: none;
border: none;
padding: 0 3rem;
}
@media (max-width: 1199px) {
#nav-search-input {
width: 75%;
}
#nav-search-exit {
right: 12.5%;
}
}
@media (max-width: 767px) {
#nav-search-input {
width: 100%;
}
#nav-search-exit {
right: 0;
}
}
#nav-search-input:focus {
background: #f3f8fe;
box-shadow: 0px 0.15rem 1rem #e7f4ff;
outline: none;
}
#nav-search-input::placeholder {
color: #777;
}
#search-results-container {
list-style: none;
padding-left: unset;
margin-top: 1.5rem;
color: #fff;
font-size: 1.5rem;
max-height: calc(100vh - 6.5rem);
overflow-y: auto;
}
#search-results-container a {
color: #fff;
text-decoration: none;
}
#search-results-container a:hover {
color: #fff;
text-decoration: underline;
}
#nav-search-icon {
display: inline-block;
}
#nav-search-text {
display: none;
}
@media (max-width: 1199px) {
#nav-search-icon {
display: none;
}
#nav-search-text {
display: inline-block;
}
}

View File

@ -0,0 +1,23 @@
---
layout: null
---
[
{% for post in site.posts %}
{
"title" : "{% if post.title != "" %}{{ post.title | strip_html | escape }}{% else %}{{ post.excerpt | strip_html | escape | strip }}{%endif%}",
"desc" : "{% if post.title != "" %}{{ post.title | strip_html | escape }}{% else %}{{ post.excerpt | strip_html | escape | strip }}{%endif%}",
"category" : "{{ post.tags | join: ', ' }}",
"url" : "{{ site.baseurl }}{{ post.url | escape }}",
"date" : "{{ post.date | date: "%B %e, %Y" | default: "January 1, 1970" }}"
},
{% endfor %}
{% for page in site.html_pages %}{% if page.title != "{title}" and page.title != "404 - Page not found" %}
{
"title" : "{% if page.title != "" %}{{ page.title | strip_html | escape }}{% else %}{{ page.excerpt | strip_html | escape | strip }}{% endif %}",
"desc" : "{% if page.title != "" %}{{ page.title | strip_html | escape }}{% else %}{{ page.excerpt | strip_html | escape | strip }}{% endif %}",
"category" : "{% if page.tags %}{{ page.tags | join: ', ' }}{% else %}page{% endif %}",
"url" : "{{ site.baseurl }}{{ page.url }}",
"date" : "{{ page.date | date: '%B %e, %Y' | default: "January 1, 1970" }}"
}{% unless forloop.last %},{% endunless %}
{% endif %}{% endfor %}
]

View File

@ -1,6 +1,6 @@
// Dean Attali / Beautiful Jekyll 2020 // Dean Attali / Beautiful Jekyll 2023
var BeautifulJekyllJS = { let BeautifulJekyllJS = {
bigImgEl : null, bigImgEl : null,
numImgs : null, numImgs : null,
@ -27,6 +27,8 @@ var BeautifulJekyllJS = {
// show the big header image // show the big header image
BeautifulJekyllJS.initImgs(); BeautifulJekyllJS.initImgs();
BeautifulJekyllJS.initSearch();
}, },
initNavbar : function() { initNavbar : function() {
@ -52,23 +54,23 @@ var BeautifulJekyllJS = {
// 2fc73a3a967e97599c9763d05e564189 // 2fc73a3a967e97599c9763d05e564189
// set an initial image // set an initial image
var imgInfo = BeautifulJekyllJS.getImgInfo(); const imgInfo = BeautifulJekyllJS.getImgInfo();
var src = imgInfo.src; const src = imgInfo.src;
var desc = imgInfo.desc; const desc = imgInfo.desc;
BeautifulJekyllJS.setImg(src, desc); BeautifulJekyllJS.setImg(src, desc);
// For better UX, prefetch the next image so that it will already be loaded when we want to show it // For better UX, prefetch the next image so that it will already be loaded when we want to show it
var getNextImg = function() { const getNextImg = function() {
var imgInfo = BeautifulJekyllJS.getImgInfo(); const imgInfo = BeautifulJekyllJS.getImgInfo();
var src = imgInfo.src; const src = imgInfo.src;
var desc = imgInfo.desc; const desc = imgInfo.desc;
var prefetchImg = new Image(); const prefetchImg = new Image();
prefetchImg.src = src; prefetchImg.src = src;
// if I want to do something once the image is ready: `prefetchImg.onload = function(){}` // if I want to do something once the image is ready: `prefetchImg.onload = function(){}`
setTimeout(function(){ setTimeout(function(){
var img = $("<div></div>").addClass("big-img-transition").css("background-image", 'url(' + src + ')'); const img = $("<div></div>").addClass("big-img-transition").css("background-image", 'url(' + src + ')');
$(".intro-header.big-img").prepend(img); $(".intro-header.big-img").prepend(img);
setTimeout(function(){ img.css("opacity", "1"); }, 50); setTimeout(function(){ img.css("opacity", "1"); }, 50);
@ -91,9 +93,9 @@ var BeautifulJekyllJS = {
}, },
getImgInfo : function() { getImgInfo : function() {
var randNum = Math.floor((Math.random() * BeautifulJekyllJS.numImgs) + 1); const randNum = Math.floor((Math.random() * BeautifulJekyllJS.numImgs) + 1);
var src = BeautifulJekyllJS.bigImgEl.attr("data-img-src-" + randNum); const src = BeautifulJekyllJS.bigImgEl.attr("data-img-src-" + randNum);
var desc = BeautifulJekyllJS.bigImgEl.attr("data-img-desc-" + randNum); const desc = BeautifulJekyllJS.bigImgEl.attr("data-img-desc-" + randNum);
return { return {
src : src, src : src,
@ -108,6 +110,30 @@ var BeautifulJekyllJS = {
} else { } else {
$(".img-desc").hide(); $(".img-desc").hide();
} }
},
initSearch : function() {
if (!document.getElementById("beautifuljekyll-search-overlay")) {
return;
}
$("#nav-search-link").click(function(e) {
e.preventDefault();
$("#beautifuljekyll-search-overlay").show();
$("#nav-search-input").focus().select();
$("body").addClass("overflow-hidden");
});
$("#nav-search-exit").click(function(e) {
e.preventDefault();
$("#beautifuljekyll-search-overlay").hide();
$("body").removeClass("overflow-hidden");
});
$(document).on('keyup', function(e) {
if (e.key == "Escape") {
$("#beautifuljekyll-search-overlay").hide();
$("body").removeClass("overflow-hidden");
}
});
} }
}; };

View File

@ -3,32 +3,42 @@ layout: null
--- ---
(function ($) { (function ($) {
var $comments = $('.js-comments');
$('#new_comment').submit(function () { $('#new_comment').submit(function () {
var form = this; const form = this;
$(form).addClass('disabled'); $(form).addClass('disabled');
{% assign sm = site.staticman -%} {% assign sm = site.staticman -%}
var endpoint = '{{ sm.endpoint | default: "https://staticman3.herokuapp.com/v3/entry/github/" }}'; const endpoint = '{{ sm.endpoint }}';
var repository = '{{ sm.repository }}'; const repository = '{{ sm.repository }}';
var branch = '{{ sm.branch }}'; const branch = '{{ sm.branch }}';
const url = endpoint + repository + '/' + branch + '/comments';
const data = $(this).serialize();
$.ajax({ const xhr = new XMLHttpRequest();
type: $(this).attr('method'), xhr.open("POST", url);
url: endpoint + repository + '/' + branch + '/comments', xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
data: $(this).serialize(), xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
contentType: 'application/x-www-form-urlencoded', xhr.onreadystatechange = function () {
success: function (data) { if(xhr.readyState === XMLHttpRequest.DONE) {
const status = xhr.status;
if (status >= 200 && status < 400) {
formSubmitted();
} else {
formError();
}
}
};
function formSubmitted() {
$('#comment-form-submit').addClass('d-none'); $('#comment-form-submit').addClass('d-none');
$('#comment-form-submitted').removeClass('d-none'); $('#comment-form-submitted').removeClass('d-none');
$('.page__comments-form .js-notice').removeClass('alert-danger'); $('.page__comments-form .js-notice').removeClass('alert-danger');
$('.page__comments-form .js-notice').addClass('alert-success'); $('.page__comments-form .js-notice').addClass('alert-success');
showAlert('success'); showAlert('success');
}, }
error: function (err) {
console.log(err); function formError() {
$('#comment-form-submitted').addClass('d-none'); $('#comment-form-submitted').addClass('d-none');
$('#comment-form-submit').removeClass('d-none'); $('#comment-form-submit').removeClass('d-none');
$('.page__comments-form .js-notice').removeClass('alert-success'); $('.page__comments-form .js-notice').removeClass('alert-success');
@ -36,7 +46,8 @@ layout: null
showAlert('failure'); showAlert('failure');
$(form).removeClass('disabled'); $(form).removeClass('disabled');
} }
});
xhr.send(data);
return false; return false;
}); });

View File

@ -2,7 +2,7 @@
Gem::Specification.new do |spec| Gem::Specification.new do |spec|
spec.name = "beautiful-jekyll-theme" spec.name = "beautiful-jekyll-theme"
spec.version = "5.0.0" spec.version = "6.0.1"
spec.authors = ["Dean Attali"] spec.authors = ["Dean Attali"]
spec.email = ["daattali@gmail.com"] spec.email = ["daattali@gmail.com"]
@ -17,12 +17,14 @@ Gem::Specification.new do |spec|
"documentation_uri" => "https://github.com/daattali/beautiful-jekyll#readme" "documentation_uri" => "https://github.com/daattali/beautiful-jekyll#readme"
} }
spec.add_runtime_dependency "jekyll", "~> 3.8" spec.add_runtime_dependency "jekyll", ">= 3.9.3"
spec.add_runtime_dependency "jekyll-paginate", "~> 1.1" spec.add_runtime_dependency "jekyll-paginate", "~> 1.1"
spec.add_runtime_dependency "jekyll-sitemap", "~> 1.4" spec.add_runtime_dependency "jekyll-sitemap", "~> 1.4"
spec.add_runtime_dependency "kramdown-parser-gfm", "~> 1.1" spec.add_runtime_dependency "kramdown-parser-gfm", "~> 1.1"
spec.add_runtime_dependency "kramdown", "~> 2.3.0" spec.add_runtime_dependency "kramdown", "~> 2.3"
spec.add_runtime_dependency "webrick", "~> 1.8"
spec.add_development_dependency "bundler", ">= 1.16" spec.add_development_dependency "bundler", ">= 1.16"
spec.add_development_dependency "rake", "~> 12.0" spec.add_development_dependency "rake", "~> 12.0"
spec.add_development_dependency "appraisal", "~> 2.5"
end end

View File

@ -2,7 +2,7 @@
layout: null layout: null
--- ---
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel> <channel>
{% if site.title %} {% if site.title %}
<title>{{ site.title | xml_escape }}</title> <title>{{ site.title | xml_escape }}</title>
@ -10,14 +10,19 @@ layout: null
{% if site.rss-description %} {% if site.rss-description %}
<description>{{ site.rss-description | xml_escape }}</description> <description>{{ site.rss-description | xml_escape }}</description>
{% endif %} {% endif %}
<link>{{ '' | absolute_url }}</link> <link>{{ '/' | absolute_url }}</link>
<atom:link href="{{ 'feed.xml' | absolute_url }}" rel="self" type="application/rss+xml" /> <atom:link href="{{ 'feed.xml' | absolute_url }}" rel="self" type="application/rss+xml" />
{% assign excerpt_length = site.excerpt_length | default: 50 %} {% assign excerpt_length = site.excerpt_length | default: 50 %}
{% for post in site.posts limit:20 %} {% for post in site.posts limit:20 %}
<item> <item>
<title>{{ post.title | xml_escape }}</title> <title>{{ post.title | strip_html | xml_escape }}</title>
{% if post.author %}
<dc:creator><![CDATA[ {{ post.author | xml_escape }} ]]></dc:creator>
{% elsif site.author %}
<dc:creator><![CDATA[ {{ site.author | xml_escape }} ]]></dc:creator>
{% endif %}
<description> <description>
{% if post.subtitle %}{{ post.subtitle | xml_escape }} - {% endif %} {% if post.subtitle %}{{ post.subtitle | strip_html | xml_escape }} - {% endif %}
{{ post.content | strip_html | xml_escape | truncatewords: excerpt_length }} {{ post.content | strip_html | xml_escape | truncatewords: excerpt_length }}
</description> </description>
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate> <pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>

View File

@ -5,7 +5,7 @@
# To encrypt strings use the following endpoint: # To encrypt strings use the following endpoint:
# https://{STATICMAN API INSTANCE}/v3/encrypt/{TEXT TO BE ENCRYPTED} # https://{STATICMAN API INSTANCE}/v3/encrypt/{TEXT TO BE ENCRYPTED}
# {STATICMAN API INSTANCE} should match the `endpoint` in the theme config # {STATICMAN API INSTANCE} should match the `endpoint` in the theme config
# file. It defaults to "staticman3.herokuapp.com". # file.
comments: comments:
# (*) REQUIRED # (*) REQUIRED

View File

@ -25,7 +25,7 @@ title: 'Tag Index'
<div class="post-list"> <div class="post-list">
{%- for post in site.tags[tag] -%} {%- for post in site.tags[tag] -%}
<div class="tag-entry"> <div class="tag-entry">
<a href="{{ post.url | relative_url }}">{{- post.title -}}</a> <a href="{{ post.url | relative_url }}">{{- post.title | strip_html -}}</a>
<div class="entry-date"> <div class="entry-date">
<time datetime="{{- post.date | date_to_xmlschema -}}">{{- post.date | date: date_format -}}</time> <time datetime="{{- post.date | date_to_xmlschema -}}">{{- post.date | date: date_format -}}</time>
</div> </div>