Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mill413 committed Feb 5, 2025
2 parents 97f8495 + 0eb7efa commit c29717e
Show file tree
Hide file tree
Showing 15 changed files with 166 additions and 54 deletions.
4 changes: 3 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,10 @@ exclude:
- tools
- README.md
- LICENSE
- purgecss.js
- rollup.config.js
- "package*.json"
- "*.config.js"
- package*.json
- assets/jekyll-archives/docs
- assets/jekyll-archives/test/source

Expand Down
90 changes: 90 additions & 0 deletions _data/locales/nl-NL.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# The layout text of site

# ----- Commons label -----

layout:
post: Post
category: Categorie
tag: Tag

# The tabs of sidebar
tabs:
# format: <filename_without_extension>: <value>
home: Startpagina
categories: Categorieën
tags: Tags
archives: Archief
about: Over

# the text displayed in the search bar & search results
search:
hint: Zoek
cancel: Annuleer
no_results: Oops! Geen resultaat gevonden.

panel:
lastmod: Recent Bijgewerkt
trending_tags: Trending Tags
toc: Inhoud

copyright:
# Shown at the bottom of the post
license:
template: Alle posts zijn onder :LICENSE_NAME gepubliceerd door de auteur.
name: CC BY 4.0
link: https://creativecommons.org/licenses/by/4.0/

# Displayed in the footer
brief: Sommige rechten voorbehouden.
verbose: >-
Tenzij anders vermeld, alle posts zijn onder de
Creative Commons Attribution 4.0 International (CC BY 4.0) gepubliceerd door de auteur.
meta: Gebruikt :THEME

not_found:
statement: Sorry, we hebben de URL verkeerd geplaatst of hij verwijst naar iets dat niet bestaat.

notification:
update_found: Nieuwe versie van inhoud beschikbaar.
update: Update

# ----- Posts related labels -----
post:
written_by: Door
posted: Posted
updated: Bijgewerkt
words: woorden
pageview_measure: Gelezen
read_time:
unit: min
prompt: lees
relate_posts: Verder Lezen
share: Deel
button:
next: Volgende
previous: Vorige
copy_code:
succeed: Gekopieerd!
share_link:
title: Link kopiëren
succeed: Succesvol gekopieerd!

# Date time format.
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: "%b %e, %Y"
dayjs: "ll"
archives:
strftime: "%b"
dayjs: "MMM"

# categories page
categories:
category_measure:
singular: categorie
plural: categorieën
post_measure:
singular: post
plural: posts
10 changes: 0 additions & 10 deletions _includes/no-linenos.html

This file was deleted.

16 changes: 8 additions & 8 deletions _includes/pageviews/goatcounter.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
const url = `https://{{ site.analytics.goatcounter.id }}.goatcounter.com/counter/${encodeURIComponent(uri)}.json`;

fetch(url)
.then((response) => response.json())
.then((data) => {
const count = data.count.replace(/\s/g, '');
pv.innerText = new Intl.NumberFormat().format(count);
})
.catch((error) => {
pv.innerText = '1';
});
.then((response) => response.json())
.then((data) => {
const count = data.count.replace(/\s/g, '');
pv.innerText = new Intl.NumberFormat().format(count);
})
.catch((error) => {
pv.innerText = '1';
});
}
});
</script>
13 changes: 11 additions & 2 deletions _includes/post-description.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,17 @@
{%- if post.description -%}
{{- post.description -}}
{%- else -%}
{%- include no-linenos.html content=post.content -%}
{{- content | markdownify | strip_html -}}
{% comment %}
Remove the line number of the code snippet.
{% endcomment %}
{% assign content = post.content %}

{% if content contains '<td class="rouge-gutter gl"><pre class="lineno">' %}
{% assign content = content | replace: '<td class="rouge-gutter gl"><pre class="lineno">', '<!-- <td class="rouge-gutter gl"><pre class="lineno">'%}
{% assign content = content | replace: '</td><td class="rouge-code">', '</td> --><td class="rouge-code">' %}
{% endif %}

{{- content | markdownify | strip_html | newline_to_br | replace: '<br />', ' ' | strip_newlines -}}
{%- endif -%}
{%- endcapture -%}

Expand Down
2 changes: 1 addition & 1 deletion _includes/search-loader.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h2><a href="{url}">{title}</a></h2>
{tags}
</div>
</header>
<p>{snippet}</p>
<p>{content}</p>
</article>
{% endcapture %}

Expand Down
2 changes: 1 addition & 1 deletion _includes/toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% if enable_toc %}
<div class="toc-border-cover z-3"></div>
<section id="toc-wrapper" class="position-sticky ps-0 pe-4">
<section id="toc-wrapper" class="invisible position-sticky ps-0 pe-4 pb-4">
<h2 class="panel-heading ps-3 pb-2 mb-0">{{- site.data.locales[include.lang].panel.toc -}}</h2>
<nav id="toc"></nav>
</section>
Expand Down
2 changes: 1 addition & 1 deletion _javascript/modules/components/mermaid.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function refreshTheme(event) {
const mermaidList = document.getElementsByClassName(MERMAID);

[...mermaidList].forEach((elem) => {
const svgCode = elem.previousSibling.children.item(0).innerHTML;
const svgCode = elem.previousSibling.children.item(0).textContent;
elem.textContent = svgCode;
elem.removeAttribute('data-processed');
});
Expand Down
3 changes: 3 additions & 0 deletions _javascript/modules/components/toc.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ function init() {
mobile.init();
}

const $tocWrapper = document.getElementById('toc-wrapper');
$tocWrapper.classList.remove('invisible');

desktopMode.onchange = refresh;
}

Expand Down
4 changes: 1 addition & 3 deletions _javascript/modules/components/toc/toc-desktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ export class TocDesktop {
}

static init() {
if (document.getElementById('toc-wrapper')) {
tocbot.init(this.options);
}
tocbot.init(this.options);
}
}
32 changes: 11 additions & 21 deletions _sass/pages/_post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -220,28 +220,22 @@ header {
@-webkit-keyframes fade-up {
from {
opacity: 0;
position: relative;
top: 2rem;
margin-top: 4rem;
}

to {
opacity: 1;
position: relative;
top: 0;
}
}

@keyframes fade-up {
from {
opacity: 0;
position: relative;
top: 2rem;
margin-top: 4rem;
}

to {
opacity: 1;
position: relative;
top: 0;
}
}

Expand All @@ -250,6 +244,7 @@ header {
%top-cover {
content: '';
display: block;
position: -webkit-sticky;
position: sticky;
top: 0;
width: 100%;
Expand All @@ -260,30 +255,25 @@ header {
#toc-wrapper {
top: 0;
transition: top 0.2s ease-in-out;
-webkit-animation: fade-up 0.8s;
animation: fade-up 0.8s;
overflow-y: auto;
max-height: calc(100vh - 2rem);
max-height: 100vh;
scrollbar-width: none;
margin-top: 2rem;

&:not(.invisible) {
-webkit-animation: fade-up 0.8s;
animation: fade-up 0.8s;
}

ul {
list-style: none;
font-size: 0.85rem;
line-height: 1.25;
padding-left: 0;

li {
&:not(:last-child) {
margin: 0.4rem 0;
}

&:first-child {
margin-top: 0;
}

a {
padding: 0.2rem 0 0.2rem 1.25rem;
padding: 0.4rem 0 0.4rem 1.25rem;
}
}

Expand Down Expand Up @@ -336,7 +326,7 @@ header {
position: fixed;
bottom: 0;
width: 15%;
height: 3.25rem;
height: 2.25rem;
margin-left: -1px;
background: linear-gradient(transparent, var(--main-bg) 70%);
}
Expand Down
8 changes: 4 additions & 4 deletions assets/js/data/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ swcache: true

[
{% for post in site.posts %}
{%- capture description -%}
{% include post-description.html %}
{%- endcapture -%}
{
"title": {{ post.title | jsonify }},
"url": {{ post.url | relative_url | jsonify }},
"categories": {{ post.categories | join: ', ' | jsonify }},
"tags": {{ post.tags | join: ', ' | jsonify }},
"date": "{{ post.date }}",
{% include no-linenos.html content=post.content %}
{% assign _content = content | strip_html | strip_newlines %}
"snippet": {{ _content | truncate: 200 | jsonify }},
"content": {{ _content | jsonify }}
"content": "{{ description }}"
}{% unless forloop.last %},{% endunless %}
{% endfor %}
]
30 changes: 30 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Changelog

## [7.2.4](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v7.2.3...v7.2.4) (2024-12-21)

### Bug Fixes

* toc not visible when switching from mobile to desktop mode ([#2139](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2139)) ([32051da](https://github.com/cotes2020/jekyll-theme-chirpy/commit/32051dad03cb8f60fa4206969377b9674f9a3f0c))
* **ui:** left borderline of TOC is notched ([#2140](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2140)) ([8a4d0bc](https://github.com/cotes2020/jekyll-theme-chirpy/commit/8a4d0bc4ee9e142a11401cad80bc9605878f121d))

## [7.2.3](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v7.2.2...v7.2.3) (2024-12-15)

### Bug Fixes

* refreshing mermaid theme may fail ([#2113](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2113)) ([2f00d41](https://github.com/cotes2020/jekyll-theme-chirpy/commit/2f00d41861f1b06c2ff7fa4e67e14e647c3c34b0))
* **ui:** gap between TOC entries is inconsistent ([#2119](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2119)) ([1b4e318](https://github.com/cotes2020/jekyll-theme-chirpy/commit/1b4e318dc1cd57da812e11bf69ebb06083c213fc))
* **ui:** slow script loading hides TOC fade-up effect in desktop ([#2120](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2120)) ([e0c3faf](https://github.com/cotes2020/jekyll-theme-chirpy/commit/e0c3fafa470eb12bd04ffdf198018bc28b6de20d))

## [7.2.2](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v7.2.1...v7.2.2) (2024-12-06)

### Bug Fixes

* js files in subdirectories are excluded from the site output ([#2101](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2101)) ([f55cc31](https://github.com/cotes2020/jekyll-theme-chirpy/commit/f55cc31dbd0e7455328c80c7ef38186ad8e54099))

## [7.2.1](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v7.2.0...v7.2.1) (2024-12-05)

### Bug Fixes

* **build:** exclude `purgecss.js` from output files ([#2090](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2090)) ([976e1a1](https://github.com/cotes2020/jekyll-theme-chirpy/commit/976e1a184b3dbe08991e8a50db4d5d7f8a0b7090))
* correct the import condition for theme script ([#2075](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2075)) ([a16aa7d](https://github.com/cotes2020/jekyll-theme-chirpy/commit/a16aa7d41e3c3cb28649bfa1361e8bcb91b9ca47))
* ensure pageviews are fetched after DOM is loaded ([#2071](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2071)) ([b4019f3](https://github.com/cotes2020/jekyll-theme-chirpy/commit/b4019f3517e4a3284df51567d29938cb12bf3acc))
* **toc:** resume fade up animation in desktop mode ([#2085](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2085)) ([8280adb](https://github.com/cotes2020/jekyll-theme-chirpy/commit/8280adb901b9d15cc1bc18009553aae8746121d8))

## [7.2.0](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v7.1.1...v7.2.0) (2024-11-28)

### Features
Expand Down
2 changes: 1 addition & 1 deletion jekyll-theme-chirpy.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |spec|
spec.name = "jekyll-theme-chirpy"
spec.version = "7.2.0"
spec.version = "7.2.4"
spec.authors = ["Cotes Chung"]
spec.email = ["[email protected]"]

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jekyll-theme-chirpy",
"version": "7.2.0",
"version": "7.2.4",
"description": "A minimal, responsive, and feature-rich Jekyll theme for technical writing.",
"repository": {
"type": "git",
Expand Down

0 comments on commit c29717e

Please sign in to comment.