Merge tag '6.0.1'
This commit is contained in:
commit
a6fe22b283
25 changed files with 599 additions and 159 deletions
44
CHANGELOG.md
44
CHANGELOG.md
|
@ -1,13 +1,44 @@
|
|||
## Unreleased version
|
||||
## v6.0.1 (2023-06-08)
|
||||
|
||||
- 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
|
||||
- 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 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
|
||||
- Added support for Patreon in the social network links in the footer
|
||||
- Fixed bug where image thumbnails on the feed page were always forced into a square rather than maintaining a proper image aspect ratio
|
||||
- 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)
|
||||
|
||||
|
@ -54,7 +85,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 jQuery to version 3.5.1 to fix a couple security vulnerabilities with the previous version
|
||||
|
||||
|
||||
## v4.1.0 (2020-08-08)
|
||||
|
||||
- Added Open Graph `site_name` meta field to pages automatically
|
||||
|
|
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
|||
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
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
104
_config.yml
104
_config.yml
|
@ -1,9 +1,13 @@
|
|||
# Welcome to Beautiful Jekyll!
|
||||
# This config file is meant for settings that affect your entire website. When you first
|
||||
# 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.
|
||||
###########################################################
|
||||
### Welcome to Beautiful Jekyll!
|
||||
### This config file is meant for settings that affect your entire website. When you first
|
||||
### 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 --- #
|
||||
############################
|
||||
|
||||
# Name of website
|
||||
title: YameteTomete Translation Cooperative
|
||||
|
@ -11,7 +15,9 @@ title: YameteTomete Translation Cooperative
|
|||
# Your name to show in the footer
|
||||
author: YameteTomete
|
||||
|
||||
###############################################
|
||||
# --- List of links in the navigation bar --- #
|
||||
###############################################
|
||||
|
||||
url: https://yamatotoma.to
|
||||
|
||||
|
@ -23,7 +29,9 @@ navbar-links:
|
|||
- Good Job! Media: "https://www.goodjobmedia.com/"
|
||||
Discord: "https://discord.gg/fpQZQ8g"
|
||||
|
||||
################
|
||||
# --- Logo --- #
|
||||
################
|
||||
|
||||
# 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
|
||||
|
@ -37,7 +45,9 @@ round-avatar: true
|
|||
#title-img: /path/to/image
|
||||
|
||||
|
||||
#####################################
|
||||
# --- Footer social media links --- #
|
||||
#####################################
|
||||
|
||||
# Select the social network links that you want to show in the footer.
|
||||
# Uncomment the links you want to show and add your information to each one.
|
||||
|
@ -48,6 +58,9 @@ social-network-links:
|
|||
twitter: YameteTomete
|
||||
# patreon: DeanAttali
|
||||
# youtube: c/daattali
|
||||
# email: "someone@example.com"
|
||||
# rss: true # remove this line if you don't want to show an RSS link at the bottom
|
||||
# medium: yourname
|
||||
# reddit: yourname
|
||||
# linkedin: daattali
|
||||
# xing: yourname
|
||||
|
@ -65,12 +78,17 @@ social-network-links:
|
|||
bluesky: yametetomete.bsky.social
|
||||
# ORCID: your ORCID ID
|
||||
# google-scholar: your google scholar
|
||||
# discord: "invite_code" or "users/userid" or "invite/invite_code"
|
||||
# kaggle: yourname
|
||||
# hackerrank: yourname
|
||||
|
||||
# If you want to show a link to an RSS in the footer, add the site description here.
|
||||
# If you don't want to show an RSS link, remove the following line.
|
||||
# If you want your website to generate an RSS feed, provide a description
|
||||
# The URL for the feed will be https://<your_website>/feed.xml
|
||||
# rss-description: This website is a virtual proof that I'm awesome
|
||||
|
||||
###########################
|
||||
# --- General options --- #
|
||||
###########################
|
||||
|
||||
# Select which social network share links to show in posts
|
||||
share-links-active:
|
||||
|
@ -95,10 +113,23 @@ excerpt_separator: <!-- excerpt-end -->
|
|||
# Whether or not to show a list of tags below each post preview in the feed page
|
||||
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: true
|
||||
|
||||
# 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
|
||||
#keywords: "my,list,of,keywords"
|
||||
|
||||
######################################
|
||||
# --- Colours / background image --- #
|
||||
######################################
|
||||
|
||||
# Personalize the colours in your website. Colour values can be any valid CSS colour
|
||||
|
||||
|
@ -112,6 +143,7 @@ hover-col: "#0085A1"
|
|||
footer-col: "#EAEAEA"
|
||||
footer-text-col: "#777777"
|
||||
footer-link-col: "#404040"
|
||||
footer-hover-col: "#0085A1"
|
||||
|
||||
# Alternatively, the navbar, footer, and page background can be set to an image
|
||||
# instead of colour
|
||||
|
@ -131,13 +163,15 @@ footer-link-col: "#404040"
|
|||
#site-js:
|
||||
# - "/assets/js/custom-script.js"
|
||||
|
||||
#################################
|
||||
# --- Web Analytics Section --- #
|
||||
#################################
|
||||
|
||||
# Fill in your Google Analytics gtag.js ID to track your website using gtag
|
||||
#gtag: ""
|
||||
# Fill in your Google Analytics tag ID (or "Measurement ID") to track your website usage
|
||||
#gtag: "G-XXXXXXXXXX"
|
||||
|
||||
# Fill in your Google Analytics ID to track your website using Google Analytics
|
||||
#google_analytics: ""
|
||||
# Fill in your Cloudflare Analytics beacon token to track your website using Cloudflare Analytics
|
||||
#cloudflare_analytics: ""
|
||||
|
||||
# Google Tag Manager ID
|
||||
#gtm: ""
|
||||
|
@ -150,7 +184,14 @@ footer-link-col: "#404040"
|
|||
# uri: "demo.wiki.pro"
|
||||
# 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 --- #
|
||||
####################
|
||||
|
||||
# To use Disqus comments, sign up to https://disqus.com and fill in your Disqus shortname (NOT the userid)
|
||||
#disqus: ""
|
||||
|
@ -158,6 +199,9 @@ footer-link-col: "#404040"
|
|||
# To use Facebook Comments, create a Facebook app and fill in the Facebook App 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
|
||||
# "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
|
||||
|
@ -168,21 +212,39 @@ footer-link-col: "#404040"
|
|||
# theme: github-light # Utterances theme
|
||||
# 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
|
||||
# accept the invitation by going to `https://staticman3.herokuapp.com/v3/connect/github/<username>/<repo-name>`.
|
||||
# Then uncomment the following section and fill in "repository" and "branch".
|
||||
# If you want to use reCaptcha for staticman (optional for spam protection), then fill
|
||||
# in the "siteKey" and "secret" parameters below and also in `staticman.yml`.
|
||||
# See more details at https://staticman.net/
|
||||
# To use Staticman comments, uncomment the following section. You may leave the reCaptcha
|
||||
# section commented if you aren't using reCaptcha for spam protection.
|
||||
# Using Staticman requires advanced knowledge, please consult
|
||||
# https://github.com/eduardoboucas/staticman/ and https://staticman.net/ for further
|
||||
# instructions. For any support with staticman please direct questions to staticman and
|
||||
# not to BeautifulJekyll.
|
||||
#staticman:
|
||||
# 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`
|
||||
# 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)
|
||||
# reCaptcha:
|
||||
# siteKey : # Use your own site key, you need to apply for one on Google
|
||||
# secret : # ENCRYPT your password by going to https://staticman3.herokuapp.com/v3/encrypt/<your-site-secret>
|
||||
# endpoint : # URL of your deployment, with a trailing slash eg. "https://<your-api>/v3/entry/github/"
|
||||
# reCaptcha: # (optional, set these parameters in `staticman.yml` as well)
|
||||
# siteKey : # You need to apply for a site key on Google
|
||||
# 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 --- #
|
||||
################
|
||||
|
||||
# Ruby Date Format to show dates of posts
|
||||
date_format: "%B %-d, %Y"
|
||||
|
@ -190,7 +252,9 @@ date_format: "%B %-d, %Y"
|
|||
# Facebook App ID
|
||||
#fb_app_id: ""
|
||||
|
||||
#################################################################################
|
||||
# --- You don't need to touch anything below here (but you can if you want) --- #
|
||||
#################################################################################
|
||||
|
||||
# Output options (more information on Jekyll's site)
|
||||
timezone: "Etc/UTC"
|
||||
|
|
8
_includes/cloudflare_analytics.html
Normal file
8
_includes/cloudflare_analytics.html
Normal 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 %}
|
7
_includes/commentbox.html
Normal file
7
_includes/commentbox.html
Normal 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 %}
|
|
@ -3,4 +3,6 @@
|
|||
{% include fb-comment.html %}
|
||||
{% include staticman-comments.html %}
|
||||
{% include utterances-comment.html %}
|
||||
{% include giscus-comment.html %}
|
||||
{% include commentbox.html %}
|
||||
{% 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>
|
||||
{% endif %}
|
||||
{% endif%}
|
||||
|
||||
{% if site.edit_page_button and site.github.repository_url %}
|
||||
•
|
||||
<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>
|
||||
{% unless site.remove-ads %}<p class="theme-by text-muted">
|
||||
Powered by
|
||||
|
|
16
_includes/giscus-comment.html
Normal file
16
_includes/giscus-comment.html
Normal 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 %}
|
|
@ -1,5 +1,17 @@
|
|||
{% if site.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;">
|
||||
<div title="Close" onclick="$(this).parent().remove()" style="position: absolute; right: 5px; top: 0; font-size: 1.5em; line-height: 1; cursor: pointer;">×</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; margin-bottom: 5px;">
|
||||
<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>
|
||||
(function (i, s, o, g, r, a, m) {
|
||||
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
|
||||
|
|
|
@ -39,11 +39,14 @@
|
|||
<meta name="keywords" content="{{ site.keywords }}">
|
||||
{% endif %}
|
||||
|
||||
{% if site.rss-description %}
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ '/feed.xml' | absolute_url }}">
|
||||
{% endif %}
|
||||
|
||||
{% include gtag.html %}
|
||||
{% include gtm_head.html %}
|
||||
{% include google_analytics.html %}
|
||||
{% include cloudflare_analytics.html %}
|
||||
|
||||
{% if layout.common-ext-css %}
|
||||
{% for css in layout.common-ext-css %}
|
||||
|
|
|
@ -27,13 +27,13 @@
|
|||
<div class="row">
|
||||
<div class="col-xl-8 offset-xl-2 col-lg-10 offset-lg-1">
|
||||
<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 include.type == "page" %}
|
||||
<hr class="small">
|
||||
<span class="{{ include.type }}-subheading">{{ page.subtitle }}</span>
|
||||
<span class="{{ include.type }}-subheading">{{ page.subtitle | strip_html }}</span>
|
||||
{% else %}
|
||||
<h2 class="{{ include.type }}-subheading">{{ page.subtitle }}</h2>
|
||||
<h2 class="{{ include.type }}-subheading">{{ page.subtitle | strip_html }}</h2>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
@ -61,13 +61,13 @@
|
|||
<div class="row">
|
||||
<div class="col-xl-8 offset-xl-2 col-lg-10 offset-lg-1">
|
||||
<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 include.type == "page" %}
|
||||
<hr class="small">
|
||||
<span class="{{ include.type }}-subheading">{{ page.subtitle }}</span>
|
||||
<span class="{{ include.type }}-subheading">{{ page.subtitle | strip_html }}</span>
|
||||
{% else %}
|
||||
<h2 class="{{ include.type }}-subheading">{{ page.subtitle }}</h2>
|
||||
<h2 class="{{ include.type }}-subheading">{{ page.subtitle | strip_html }}</h2>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
{%- if link[1].first %}
|
||||
<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>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
|
||||
{%- for childlink in link[1] -%}
|
||||
{%- for linkparts in childlink %}
|
||||
<a class="dropdown-item" href="{{ linkparts[1] | relative_url }}">{{ linkparts[0] }}</a>
|
||||
|
@ -30,6 +30,14 @@
|
|||
</li>
|
||||
{%- endif -%}
|
||||
{%- 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>
|
||||
</div>
|
||||
|
||||
|
@ -50,3 +58,5 @@
|
|||
{% endif %}
|
||||
|
||||
</nav>
|
||||
|
||||
{% include search.html %}
|
||||
|
|
39
_includes/search.html
Normal file
39
_includes/search.html
Normal file
|
@ -0,0 +1,39 @@
|
|||
{% 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>
|
||||
var searchjson = '[ \
|
||||
{% for post in site.posts %} \
|
||||
{ \
|
||||
"title" : "{% 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 }}", \
|
||||
"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 %}", \
|
||||
"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 %} \
|
||||
]';
|
||||
searchjson = JSON.parse(searchjson);
|
||||
|
||||
var sjs = SimpleJekyllSearch({
|
||||
searchInput: document.getElementById('nav-search-input'),
|
||||
resultsContainer: document.getElementById('search-results-container'),
|
||||
json: searchjson
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
|
@ -1,6 +1,6 @@
|
|||
<ul class="list-inline text-center footer-links">
|
||||
|
||||
{%- if site.rss-description -%}
|
||||
{%- if site.social-network-links.rss and site.rss-description -%}
|
||||
<li class="list-inline-item">
|
||||
<a href="{{ '/feed.xml' | relative_url }}" title="RSS">
|
||||
<span class="fa-stack fa-lg" aria-hidden="true">
|
||||
|
@ -230,7 +230,7 @@
|
|||
|
||||
{%- if site.social-network-links.mastodon -%}
|
||||
<li class="list-inline-item">
|
||||
<a href="https://{{ site.social-network-links.mastodon }}" title="Mastodon">
|
||||
<a rel="me" href="https://{{ site.social-network-links.mastodon }}" title="Mastodon">
|
||||
<span class="fa-stack fa-lg" aria-hidden="true">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="fab fa-mastodon fa-stack-1x fa-inverse"></i>
|
||||
|
@ -287,5 +287,69 @@
|
|||
</a>
|
||||
</li>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if site.social-network-links.medium -%}
|
||||
<li class="list-inline-item">
|
||||
<a href="https://medium.com/@{{ site.social-network-links.medium }}" 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 site.social-network-links.itchio -%}
|
||||
<li class="list-inline-item">
|
||||
<a href="https://{{ site.social-network-links.itchio }}.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 site.social-network-links.discord -%}
|
||||
{% assign discord_start = site.social-network-links.discord | 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}}{{site.social-network-links.discord}}" 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 site.social-network-links.kaggle -%}
|
||||
<li class="list-inline-item">
|
||||
<a href="https://www.kaggle.com/{{ site.social-network-links.kaggle }}" 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 site.social-network-links.hackerrank -%}
|
||||
<li class="list-inline-item">
|
||||
<a href="https://www.hackerrank.com/{{ site.social-network-links.hackerrank }}" 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 -%}
|
||||
|
||||
</ul>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<span class="sr-only">Share: </span>
|
||||
|
||||
{% 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">
|
||||
<span class="fab fa-fw fa-twitter" aria-hidden="true"></span>
|
||||
<span class="sr-only">Twitter</span>
|
||||
|
@ -42,6 +42,14 @@
|
|||
</a>
|
||||
{% 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>
|
||||
|
||||
{% endif %}
|
||||
|
|
|
@ -21,7 +21,7 @@ common-js:
|
|||
|
||||
<!DOCTYPE html>
|
||||
<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 %}
|
||||
|
||||
<body>
|
||||
|
|
|
@ -6,88 +6,96 @@ layout: page
|
|||
|
||||
{% 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 %}
|
||||
<article class="post-preview">
|
||||
<li class="post-preview">
|
||||
<article>
|
||||
|
||||
{%- capture thumbnail -%}
|
||||
{% if post.thumbnail-img %}
|
||||
{{ post.thumbnail-img }}
|
||||
{% elsif post.cover-img %}
|
||||
{% if post.cover-img.first %}
|
||||
{{ post.cover-img[0].first.first }}
|
||||
{%- capture thumbnail -%}
|
||||
{% if post.thumbnail-img %}
|
||||
{{ post.thumbnail-img }}
|
||||
{% elsif post.cover-img %}
|
||||
{% if post.cover-img.first %}
|
||||
{{ post.cover-img[0].first.first }}
|
||||
{% else %}
|
||||
{{ post.cover-img }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ post.cover-img }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% endcapture %}
|
||||
{% assign thumbnail=thumbnail | strip %}
|
||||
|
||||
{% if site.feed_show_excerpt == false %}
|
||||
{% if thumbnail != "" %}
|
||||
<div class="post-image post-image-normal">
|
||||
<a href="{{ post.url | absolute_url }}" aria-label="Thumbnail">
|
||||
<img src="{{ thumbnail | absolute_url }}" alt="Post thumbnail">
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endcapture %}
|
||||
{% assign thumbnail=thumbnail | strip %}
|
||||
|
||||
{% if site.feed_show_excerpt == false %}
|
||||
{% if thumbnail != "" %}
|
||||
<div class="post-image post-image-normal">
|
||||
<a href="{{ post.url | absolute_url }}" aria-label="Thumbnail">
|
||||
<img src="{{ thumbnail | absolute_url }}" alt="Post thumbnail">
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<a href="{{ post.url | absolute_url }}">
|
||||
<h2 class="post-title">{{ post.title }}</h2>
|
||||
|
||||
{% if post.subtitle %}
|
||||
<h3 class="post-subtitle">
|
||||
{{ post.subtitle }}
|
||||
</h3>
|
||||
{% endif %}
|
||||
</a>
|
||||
|
||||
<p class="post-meta">
|
||||
{% assign date_format = site.date_format | default: "%B %-d, %Y" %}
|
||||
Posted on {{ post.date | date: date_format }}
|
||||
</p>
|
||||
<a href="{{ post.url | absolute_url }}">
|
||||
<h2 class="post-title">{{ post.title | strip_html }}</h2>
|
||||
|
||||
{% if thumbnail != "" %}
|
||||
<div class="post-image post-image-small">
|
||||
<a href="{{ post.url | absolute_url }}" aria-label="Thumbnail">
|
||||
<img src="{{ thumbnail | absolute_url }}" alt="Post thumbnail">
|
||||
{% if post.subtitle %}
|
||||
<h3 class="post-subtitle">
|
||||
{{ post.subtitle | strip_html }}
|
||||
</h3>
|
||||
{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% unless site.feed_show_excerpt == false %}
|
||||
{% if thumbnail != "" %}
|
||||
<div class="post-image post-image-short">
|
||||
<a href="{{ post.url | absolute_url }}" aria-label="Thumbnail">
|
||||
<img src="{{ thumbnail | absolute_url }}" alt="Post thumbnail">
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<p class="post-meta">
|
||||
{% assign date_format = site.date_format | default: "%B %-d, %Y" %}
|
||||
Posted on {{ post.date | date: date_format }}
|
||||
</p>
|
||||
|
||||
<div class="post-entry">
|
||||
{% assign excerpt_length = site.excerpt_length | default: 50 %}
|
||||
{{ post.excerpt | strip_html | xml_escape | truncatewords: excerpt_length }}
|
||||
{% assign excerpt_word_count = post.excerpt | number_of_words %}
|
||||
{% if post.content != post.excerpt or excerpt_word_count > excerpt_length %}
|
||||
<a href="{{ post.url | absolute_url }}" class="post-read-more">[Read More]</a>
|
||||
{% if thumbnail != "" %}
|
||||
<div class="post-image post-image-small">
|
||||
<a href="{{ post.url | absolute_url }}" aria-label="Thumbnail">
|
||||
<img src="{{ thumbnail | absolute_url }}" alt="Post thumbnail">
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endunless %}
|
||||
|
||||
{% if site.feed_show_tags != false and post.tags.size > 0 %}
|
||||
<div class="blog-tags">
|
||||
<span>Tags:</span>
|
||||
{% for tag in post.tags %}
|
||||
<a href="{{ '/tags' | absolute_url }}#{{- tag -}}">{{- tag -}}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% unless site.feed_show_excerpt == false %}
|
||||
{% if thumbnail != "" %}
|
||||
<div class="post-image post-image-short">
|
||||
<a href="{{ post.url | absolute_url }}" aria-label="Thumbnail">
|
||||
<img src="{{ thumbnail | absolute_url }}" alt="Post thumbnail">
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</article>
|
||||
<div class="post-entry">
|
||||
{% assign excerpt_length = site.excerpt_length | default: 50 %}
|
||||
{{ post.excerpt | strip_html | truncatewords: excerpt_length }}
|
||||
{% assign excerpt_word_count = post.excerpt | number_of_words %}
|
||||
{% if post.content != post.excerpt or excerpt_word_count > excerpt_length %}
|
||||
<a href="{{ post.url | absolute_url }}" class="post-read-more">[Read More]</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endunless %}
|
||||
|
||||
{% if site.feed_show_tags != false and post.tags.size > 0 %}
|
||||
<div class="blog-tags">
|
||||
<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 %}
|
||||
<li class="list-inline-item">
|
||||
<a href="{{ '/tags' | absolute_url }}#{{- tag -}}">{{- tag -}}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</article>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
{% if paginator.total_pages > 1 %}
|
||||
<ul class="pagination main-pager">
|
||||
|
|
|
@ -67,12 +67,12 @@ layout: base
|
|||
<ul class="pagination blog-pager">
|
||||
{% if page.previous.url %}
|
||||
<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}}">← 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}}">← Previous Post</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if page.next.url %}
|
||||
<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 →</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}}">Next Post →</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
|
|
@ -20,6 +20,7 @@ body {
|
|||
background-image: url({{ site.page-img | relative_url }});
|
||||
background-attachment: fixed;
|
||||
{% endif %}
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
p {
|
||||
line-height: 1.5;
|
||||
|
@ -246,22 +247,28 @@ img {
|
|||
}
|
||||
|
||||
.navbar-custom .nav-item.dropdown .dropdown-menu {
|
||||
min-width: 0;
|
||||
margin-top: 0;
|
||||
font-size: 1em;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
{% if site.navbar-var-length %}
|
||||
min-width: 100%;
|
||||
{% else %}
|
||||
min-width: 0;
|
||||
width: 100%;
|
||||
word-break: break-word;
|
||||
{% endif %}
|
||||
}
|
||||
|
||||
.navbar-custom .nav-item.dropdown .dropdown-menu .dropdown-item {
|
||||
white-space: normal;
|
||||
padding: 0.625rem;
|
||||
background-color: {{ site.navbar-col | default: "#EAEAEA" }};
|
||||
text-decoration: none !important;
|
||||
border-width: 0 1px 1px 1px;
|
||||
font-weight: normal;
|
||||
color: {{ site.navbar-text-col | default: "#404040" }};
|
||||
{% unless site.navbar-var-length %}
|
||||
white-space: normal;
|
||||
{% endunless %}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
|
@ -274,6 +281,10 @@ img {
|
|||
border: 1px solid {{ site.navbar-border-col | default: "#DDDDDD" }};
|
||||
border-width: 0 1px 1px;
|
||||
}
|
||||
|
||||
.navbar-custom .nav-item.dropdown .dropdown-menu .dropdown-item:first-child {
|
||||
border-top-width: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1199px) {
|
||||
|
@ -388,6 +399,11 @@ footer a {
|
|||
color: {{ site.footer-link-col | default: "#404040" }};
|
||||
}
|
||||
|
||||
footer a:hover,
|
||||
footer a:focus {
|
||||
color: {{ site.footer-hover-col | default: "#0085A1" }};
|
||||
}
|
||||
|
||||
footer .list-inline {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
@ -426,6 +442,10 @@ footer .footer-custom-content {
|
|||
|
||||
/* --- Post preview (feed) --- */
|
||||
|
||||
.posts-list {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.post-preview {
|
||||
padding: 1.25rem 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
|
@ -556,6 +576,10 @@ footer .footer-custom-content {
|
|||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.blog-tags .list-inline-item {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.blog-tags a {
|
||||
color: {{ site.text-col | default: "#404040" }};
|
||||
text-decoration: none;
|
||||
|
@ -993,3 +1017,104 @@ pre {
|
|||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* Search bar */
|
||||
#beautifuljekyll-search-overlay {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Dean Attali / Beautiful Jekyll 2020
|
||||
// Dean Attali / Beautiful Jekyll 2023
|
||||
|
||||
var BeautifulJekyllJS = {
|
||||
let BeautifulJekyllJS = {
|
||||
|
||||
bigImgEl : null,
|
||||
numImgs : null,
|
||||
|
@ -27,6 +27,8 @@ var BeautifulJekyllJS = {
|
|||
|
||||
// show the big header image
|
||||
BeautifulJekyllJS.initImgs();
|
||||
|
||||
BeautifulJekyllJS.initSearch();
|
||||
},
|
||||
|
||||
initNavbar : function() {
|
||||
|
@ -52,23 +54,23 @@ var BeautifulJekyllJS = {
|
|||
|
||||
// 2fc73a3a967e97599c9763d05e564189
|
||||
// set an initial image
|
||||
var imgInfo = BeautifulJekyllJS.getImgInfo();
|
||||
var src = imgInfo.src;
|
||||
var desc = imgInfo.desc;
|
||||
const imgInfo = BeautifulJekyllJS.getImgInfo();
|
||||
const src = imgInfo.src;
|
||||
const desc = imgInfo.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
|
||||
var getNextImg = function() {
|
||||
var imgInfo = BeautifulJekyllJS.getImgInfo();
|
||||
var src = imgInfo.src;
|
||||
var desc = imgInfo.desc;
|
||||
const getNextImg = function() {
|
||||
const imgInfo = BeautifulJekyllJS.getImgInfo();
|
||||
const src = imgInfo.src;
|
||||
const desc = imgInfo.desc;
|
||||
|
||||
var prefetchImg = new Image();
|
||||
const prefetchImg = new Image();
|
||||
prefetchImg.src = src;
|
||||
// if I want to do something once the image is ready: `prefetchImg.onload = 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);
|
||||
setTimeout(function(){ img.css("opacity", "1"); }, 50);
|
||||
|
||||
|
@ -91,9 +93,9 @@ var BeautifulJekyllJS = {
|
|||
},
|
||||
|
||||
getImgInfo : function() {
|
||||
var randNum = Math.floor((Math.random() * BeautifulJekyllJS.numImgs) + 1);
|
||||
var src = BeautifulJekyllJS.bigImgEl.attr("data-img-src-" + randNum);
|
||||
var desc = BeautifulJekyllJS.bigImgEl.attr("data-img-desc-" + randNum);
|
||||
const randNum = Math.floor((Math.random() * BeautifulJekyllJS.numImgs) + 1);
|
||||
const src = BeautifulJekyllJS.bigImgEl.attr("data-img-src-" + randNum);
|
||||
const desc = BeautifulJekyllJS.bigImgEl.attr("data-img-desc-" + randNum);
|
||||
|
||||
return {
|
||||
src : src,
|
||||
|
@ -108,6 +110,30 @@ var BeautifulJekyllJS = {
|
|||
} else {
|
||||
$(".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");
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -3,40 +3,51 @@ layout: null
|
|||
---
|
||||
|
||||
(function ($) {
|
||||
var $comments = $('.js-comments');
|
||||
|
||||
$('#new_comment').submit(function () {
|
||||
var form = this;
|
||||
const form = this;
|
||||
|
||||
$(form).addClass('disabled');
|
||||
|
||||
{% assign sm = site.staticman -%}
|
||||
var endpoint = '{{ sm.endpoint | default: "https://staticman3.herokuapp.com/v3/entry/github/" }}';
|
||||
var repository = '{{ sm.repository }}';
|
||||
var branch = '{{ sm.branch }}';
|
||||
const endpoint = '{{ sm.endpoint }}';
|
||||
const repository = '{{ sm.repository }}';
|
||||
const branch = '{{ sm.branch }}';
|
||||
const url = endpoint + repository + '/' + branch + '/comments';
|
||||
const data = $(this).serialize();
|
||||
|
||||
$.ajax({
|
||||
type: $(this).attr('method'),
|
||||
url: endpoint + repository + '/' + branch + '/comments',
|
||||
data: $(this).serialize(),
|
||||
contentType: 'application/x-www-form-urlencoded',
|
||||
success: function (data) {
|
||||
$('#comment-form-submit').addClass('d-none');
|
||||
$('#comment-form-submitted').removeClass('d-none');
|
||||
$('.page__comments-form .js-notice').removeClass('alert-danger');
|
||||
$('.page__comments-form .js-notice').addClass('alert-success');
|
||||
showAlert('success');
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
$('#comment-form-submitted').addClass('d-none');
|
||||
$('#comment-form-submit').removeClass('d-none');
|
||||
$('.page__comments-form .js-notice').removeClass('alert-success');
|
||||
$('.page__comments-form .js-notice').addClass('alert-danger');
|
||||
showAlert('failure');
|
||||
$(form).removeClass('disabled');
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", url);
|
||||
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
||||
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
||||
xhr.onreadystatechange = function () {
|
||||
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-submitted').removeClass('d-none');
|
||||
$('.page__comments-form .js-notice').removeClass('alert-danger');
|
||||
$('.page__comments-form .js-notice').addClass('alert-success');
|
||||
showAlert('success');
|
||||
}
|
||||
|
||||
function formError() {
|
||||
$('#comment-form-submitted').addClass('d-none');
|
||||
$('#comment-form-submit').removeClass('d-none');
|
||||
$('.page__comments-form .js-notice').removeClass('alert-success');
|
||||
$('.page__comments-form .js-notice').addClass('alert-danger');
|
||||
showAlert('failure');
|
||||
$(form).removeClass('disabled');
|
||||
}
|
||||
|
||||
xhr.send(data);
|
||||
|
||||
return false;
|
||||
});
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Gem::Specification.new do |spec|
|
||||
spec.name = "beautiful-jekyll-theme"
|
||||
spec.version = "5.0.0"
|
||||
spec.version = "6.0.1"
|
||||
spec.authors = ["Dean Attali"]
|
||||
spec.email = ["daattali@gmail.com"]
|
||||
|
||||
|
@ -17,11 +17,12 @@ Gem::Specification.new do |spec|
|
|||
"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-sitemap", "~> 1.4"
|
||||
spec.add_runtime_dependency "kramdown-parser-gfm", "~> 1.1"
|
||||
spec.add_runtime_dependency "kramdown", "~> 2.3.0"
|
||||
spec.add_runtime_dependency "kramdown", "~> 2.3.2"
|
||||
spec.add_runtime_dependency "webrick", "~> 1.8"
|
||||
|
||||
spec.add_development_dependency "bundler", ">= 1.16"
|
||||
spec.add_development_dependency "rake", "~> 12.0"
|
||||
|
|
4
feed.xml
4
feed.xml
|
@ -15,9 +15,9 @@ layout: null
|
|||
{% assign excerpt_length = site.excerpt_length | default: 50 %}
|
||||
{% for post in site.posts limit:20 %}
|
||||
<item>
|
||||
<title>{{ post.title | xml_escape }}</title>
|
||||
<title>{{ post.title | strip_html | xml_escape }}</title>
|
||||
<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 }}
|
||||
</description>
|
||||
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# To encrypt strings use the following endpoint:
|
||||
# https://{STATICMAN API INSTANCE}/v3/encrypt/{TEXT TO BE ENCRYPTED}
|
||||
# {STATICMAN API INSTANCE} should match the `endpoint` in the theme config
|
||||
# file. It defaults to "staticman3.herokuapp.com".
|
||||
# file.
|
||||
|
||||
comments:
|
||||
# (*) REQUIRED
|
||||
|
|
|
@ -25,7 +25,7 @@ title: 'Tag Index'
|
|||
<div class="post-list">
|
||||
{%- for post in site.tags[tag] -%}
|
||||
<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">
|
||||
<time datetime="{{- post.date | date_to_xmlschema -}}">{{- post.date | date: date_format -}}</time>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue