1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2026-03-22 02:48:15 +00:00

refactor: correct typos in comments and identifiers (#2681)

- Rename `loadTooptip` to `loadTooltip` in tooltip-loader.js, components.js, and basic.js
- Fix grammar: "This script make" → "This script makes" in search-display.js
- Fix "HomgPage" → "HomePage" in post-paginator.html
- Fix "CND URL" → "CDN URL" in media-url.html
- Fix "locale-dateime.js" → "locale-datetime.js" in datetime.html
- Fix "LaTex" → "LaTeX" in language-alias.html
- Fix "exist <a> tag" → "existing <a> tag" in refactor-content.html
- Fix "Archvies" → "Archives" in _archives.scss
- Fix "underlinke" → "underline" in _syntax.scss
This commit is contained in:
Cotes Chung
2026-03-14 19:01:21 +08:00
committed by GitHub
parent 8fd56560a4
commit 6afe5a6d7b
11 changed files with 20 additions and 21 deletions

View File

@@ -1,6 +1,6 @@
<!-- <!--
Date format snippet Date format snippet
See: ${JS_ROOT}/utils/locale-dateime.js See: ${JS_ROOT}/modules/components/locale-datetime.js
--> -->
{% assign df_strftime = site.data.locales[include.lang].df.post.strftime | default: '%d/%m/%Y' %} {% assign df_strftime = site.data.locales[include.lang].df.post.strftime | default: '%d/%m/%Y' %}

View File

@@ -1,9 +1,7 @@
{% comment %} {% comment %}
Convert the alias of the syntax language to the official name Convert the alias of the syntax language to the official name
See: <https://github.com/rouge-ruby/rouge/wiki/List-of-supported-languages-and-lexers> See: <https://github.com/rouge-ruby/rouge/wiki/List-of-supported-languages-and-lexers>
{% endcomment %} {% endcomment %}
{% assign _lang = include.language | default: '' %} {% assign _lang = include.language | default: '' %}
@@ -20,13 +18,13 @@
{% when 'coffeescript', 'coffee', 'coffee-script' %} {% when 'coffeescript', 'coffee', 'coffee-script' %}
{{ 'CoffeeScript' }} {{ 'CoffeeScript' }}
{% when 'cs', 'csharp' %} {% when 'cs', 'csharp' %}
{{ 'C#' }} {{ 'C#' }}
{% when 'erl' %} {% when 'erl' %}
{{ 'Erlang' }} {{ 'Erlang' }}
{% when 'graphql' %} {% when 'graphql' %}
{{ 'GraphQL' }} {{ 'GraphQL' }}
{% when 'haskell', 'hs' %} {% when 'haskell', 'hs' %}
{{ 'Haskell' }} {{ 'Haskell' }}
{% when 'javascript', 'js' %} {% when 'javascript', 'js' %}
{{ 'JavaScript' }} {{ 'JavaScript' }}
{% when 'make', 'mf', 'gnumake', 'bsdmake' %} {% when 'make', 'mf', 'gnumake', 'bsdmake' %}
@@ -39,22 +37,22 @@
{{ 'Objective-C' }} {{ 'Objective-C' }}
{% when 'perl', 'pl' %} {% when 'perl', 'pl' %}
{{ 'Perl' }} {{ 'Perl' }}
{% when 'php','php3','php4','php5' %} {% when 'php', 'php3', 'php4', 'php5' %}
{{ 'PHP' }} {{ 'PHP' }}
{% when 'py' %} {% when 'py' %}
{{ 'Python' }} {{ 'Python' }}
{% when 'rb' %} {% when 'rb' %}
{{ 'Ruby' }} {{ 'Ruby' }}
{% when 'rs','no_run','ignore','should_panic' %} {% when 'rs', 'no_run', 'ignore', 'should_panic' %}
{{ 'Rust' }} {{ 'Rust' }}
{% when 'bash', 'zsh', 'ksh', 'sh' %} {% when 'bash', 'zsh', 'ksh', 'sh' %}
{{ 'Shell' }} {{ 'Shell' }}
{% when 'st', 'squeak' %} {% when 'st', 'squeak' %}
{{ 'Smalltalk' }} {{ 'Smalltalk' }}
{% when 'tex'%} {% when 'tex' %}
{{ 'TeX' }} {{ 'TeX' }}
{% when 'latex' %} {% when 'latex' %}
{{ 'LaTex' }} {{ 'LaTeX' }}
{% when 'ts', 'typescript' %} {% when 'ts', 'typescript' %}
{{ 'TypeScript' }} {{ 'TypeScript' }}
{% when 'vb', 'visualbasic' %} {% when 'vb', 'visualbasic' %}

View File

@@ -17,7 +17,7 @@
{%- comment -%} Add media resources subpath prefix {%- endcomment -%} {%- comment -%} Add media resources subpath prefix {%- endcomment -%}
{% assign url = include.subpath | default: '' | append: '/' | append: url %} {% assign url = include.subpath | default: '' | append: '/' | append: url %}
{%- comment -%} Prepend CND URL {%- endcomment -%} {%- comment -%} Prepend CDN URL {%- endcomment -%}
{% if site.cdn %} {% if site.cdn %}
{% assign url = site.cdn | append: '/' | append: url %} {% assign url = site.cdn | append: '/' | append: url %}
{% endif %} {% endif %}

View File

@@ -1,4 +1,4 @@
<!-- The paginator for post list on HomgPage. --> <!-- The paginator for post list on HomePage. -->
<nav aria-label="Page Navigation"> <nav aria-label="Page Navigation">
<ul class="pagination align-items-center mt-4 mb-0"> <ul class="pagination align-items-center mt-4 mb-0">

View File

@@ -173,7 +173,7 @@
{% assign _parent = _right | slice: 1, 4 %} {% assign _parent = _right | slice: 1, 4 %}
{% if _parent == '</a>' %} {% if _parent == '</a>' %}
<!-- add class to exist <a> tag --> <!-- add class to existing <a> tag -->
{% assign _size = _img_content | size | minus: 1 %} {% assign _size = _img_content | size | minus: 1 %}
{% capture _class %} {% capture _class %}
class="img-link{% unless _lqip %} shimmer{% endunless %}" class="img-link{% unless _lqip %} shimmer{% endunless %}"

View File

@@ -7,4 +7,4 @@ export { initToc } from './components/toc';
export { loadMermaid } from './components/mermaid'; export { loadMermaid } from './components/mermaid';
export { modeWatcher } from './components/mode-toggle'; export { modeWatcher } from './components/mode-toggle';
export { back2top } from './components/back-to-top'; export { back2top } from './components/back-to-top';
export { loadTooptip } from './components/tooltip-loader'; export { loadTooltip } from './components/tooltip-loader';

View File

@@ -1,5 +1,5 @@
/** /**
* This script make #search-result-wrapper switch to unload or shown automatically. * This script makes #search-result-wrapper switch to unload or shown automatically.
*/ */
const btnSbTrigger = document.getElementById('sidebar-trigger'); const btnSbTrigger = document.getElementById('sidebar-trigger');

View File

@@ -1,6 +1,6 @@
import Tooltip from 'bootstrap/js/src/tooltip'; import Tooltip from 'bootstrap/js/src/tooltip';
export function loadTooptip() { export function loadTooltip() {
const tooltipTriggerList = document.querySelectorAll( const tooltipTriggerList = document.querySelectorAll(
'[data-bs-toggle="tooltip"]' '[data-bs-toggle="tooltip"]'
); );

View File

@@ -1,7 +1,7 @@
import { back2top, loadTooptip, modeWatcher } from '../components'; import { back2top, loadTooltip, modeWatcher } from '../components';
export function basic() { export function basic() {
modeWatcher(); modeWatcher();
back2top(); back2top();
loadTooptip(); loadTooltip();
} }

View File

@@ -78,7 +78,7 @@ code {
} }
a > &.highlighter-rouge { a > &.highlighter-rouge {
padding-bottom: 0; /* show link's underlinke */ padding-bottom: 0; /* show link's underline */
color: inherit; color: inherit;
} }
@@ -137,7 +137,8 @@ div[class^='language-'] {
height: v.$code-dot-size; height: v.$code-dot-size;
border-radius: 50%; border-radius: 50%;
background-color: var(--code-header-muted-color); background-color: var(--code-header-muted-color);
box-shadow: (v.$code-dot-size + v.$code-dot-gap) 0 0 box-shadow:
(v.$code-dot-size + v.$code-dot-gap) 0 0
var(--code-header-muted-color), var(--code-header-muted-color),
(v.$code-dot-size + v.$code-dot-gap) * 2 0 0 (v.$code-dot-size + v.$code-dot-gap) * 2 0 0
var(--code-header-muted-color); var(--code-header-muted-color);

View File

@@ -112,7 +112,7 @@
} }
a { a {
/* post title in Archvies */ /* post title in Archives */
margin-left: 2.5rem; margin-left: 2.5rem;
position: relative; position: relative;
top: 0.1rem; top: 0.1rem;