Compare commits

...
9 Commits
Author SHA1 Message Date
iBug 1a85a28685 Release 4.26.1 💎 2024-05-10 17:59:50 +08:00
iBug be3c046acf Actually 3 B's in "dribbble" 2024-05-07 14:21:28 +08:00
iBug 573f286971 Limit "auto scroll ToC" to Chromium-based 2024-05-07 14:20:45 +08:00
iBug 70462d0e16 Rewrite social icons SCSS with a loop 2024-05-06 21:37:40 +08:00
iBug 9dce68d58a Oops, fixed the typo the wrong way 2024-05-06 21:28:05 +08:00
iBug 4c3ada478a Fix typo: dribbble → dribble
seems like nobody uses it anyways
2024-05-06 21:22:06 +08:00
iBug 438710da82 Disable copy button for bad pre blocks 2024-05-06 21:16:04 +08:00
iBug 4f76c2546a Try fixing copy button flying out 2024-05-06 21:06:32 +08:00
iBug 14e3fa2b28 Add success indicator for code block copy button 2024-05-06 01:20:41 +08:00
18 changed files with 174 additions and 135 deletions
+16
View File
@@ -1,5 +1,21 @@
# Changelog # Changelog
## Unreleased
### Bug Fixes
- Disable copy button on invalid syntax highlighting blocks to avoid positioning issues.
- Fix typo for `fa-dribbble` in `_utilities.scss`.
- Restrict "auto scroll sticky ToC to content" feature to Chromium browsers for now. [#4826](https://github.com/mmistakes/minimal-mistakes/issues/4826)
### Documentation & Maintenance
- Rewrite social icons SCSS with a loop.
### Enhancements
- Change the icon of a copy button into a tick for 1.5 seconds on successful copy.
## [4.26.0](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.26.0) ## [4.26.0](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.26.0)
### Bug Fixes ### Bug Fixes
+1 -1
View File
@@ -121,7 +121,7 @@ To install:
bundle bundle
``` ```
4. Add `remote_theme: "mmistakes/minimal-mistakes@4.26.0"` to your `_config.yml` file. Remove any other `theme:` or `remote_theme:` entry. 4. Add `remote_theme: "mmistakes/minimal-mistakes@4.26.1"` to your `_config.yml` file. Remove any other `theme:` or `remote_theme:` entry.
<!-- <!--
Dev note: The version number is currently hard-coded in these files: Dev note: The version number is currently hard-coded in these files:
+1 -1
View File
@@ -1,5 +1,5 @@
<!-- <!--
Minimal Mistakes Jekyll Theme 4.26.0 by Michael Rose Minimal Mistakes Jekyll Theme 4.26.1 by Michael Rose
Copyright 2013-2024 Michael Rose - mademistakes.com | @mmistakes Copyright 2013-2024 Michael Rose - mademistakes.com | @mmistakes
Free for personal and commercial use under the MIT license Free for personal and commercial use under the MIT license
https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE
+1 -1
View File
@@ -1,5 +1,5 @@
/*! /*!
* Minimal Mistakes Jekyll Theme 4.26.0 by Michael Rose * Minimal Mistakes Jekyll Theme 4.26.1 by Michael Rose
* Copyright 2013-2024 Michael Rose - mademistakes.com | @mmistakes * Copyright 2013-2024 Michael Rose - mademistakes.com | @mmistakes
* Free for personal and commercial use under the MIT license * Free for personal and commercial use under the MIT license
* https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE * https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE
+1 -1
View File
@@ -1,5 +1,5 @@
/*! /*!
* Minimal Mistakes Jekyll Theme 4.26.0 by Michael Rose * Minimal Mistakes Jekyll Theme 4.26.1 by Michael Rose
* Copyright 2013-2024 Michael Rose - mademistakes.com | @mmistakes * Copyright 2013-2024 Michael Rose - mademistakes.com | @mmistakes
* Free for personal and commercial use under the MIT license * Free for personal and commercial use under the MIT license
* https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE * https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE
+51 -117
View File
@@ -211,118 +211,35 @@ body:hover .visually-hidden button {
color: $text-color; color: $text-color;
} }
.fa-behance, @each $color, $icons in (
.fa-behance-square { $behance-color: ".fa-behance, .fa-behance-square",
color: $behance-color; $bitbucket-color: ".fa-bitbucket",
} $dribbble-color: ".fa-dribbble, .fa-dribbble-square",
$facebook-color: ".fa-facebook, .fa-facebook-square, .fa-facebook-f",
.fa-bitbucket { $flickr-color: ".fa-flickr",
color: $bitbucket-color; $foursquare-color: ".fa-foursquare",
} $github-color: ".fa-github, .fa-github-alt, .fa-github-square",
$gitlab-color: ".fa-gitlab",
.fa-dribbble, $instagram-color: ".fa-instagram",
.fa-dribble-square { $keybase-color: ".fa-keybase",
color: $dribbble-color; $lastfm-color: ".fa-lastfm, .fa-lastfm-square",
} $linkedin-color: ".fa-linkedin, .fa-linkedin-in",
$mastodon-color: ".fa-mastodon, .fa-mastodon-square",
.fa-facebook, $pinterest-color: ".fa-pinterest, .fa-pinterest-p, .fa-pinterest-square",
.fa-facebook-square, $reddit-color: ".fa-reddit",
.fa-facebook-f { $rss-color: ".fa-rss, .fa-rss-square",
color: $facebook-color; $soundcloud-color: ".fa-soundcloud",
} $stackoverflow-color: ".fa-stack-exchange, .fa-stack-overflow",
$tumblr-color: ".fa-tumblr, .fa-tumblr-square",
.fa-flickr { $twitter-color: ".fa-twitter, .fa-twitter-square",
color: $flickr-color; $vimeo-color: ".fa-vimeo, .fa-vimeo-square, .fa-vimeo-v",
} $vine-color: ".fa-vine",
$xing-color: ".fa-xing, .fa-xing-square",
.fa-foursquare { $youtube-color: ".fa-youtube",
color: $foursquare-color; ) {
} #{$icons} {
color: $color;
.fa-github, }
.fa-github-alt,
.fa-github-square {
color: $github-color;
}
.fa-gitlab {
color: $gitlab-color;
}
.fa-instagram {
color: $instagram-color;
}
.fa-keybase {
color: $keybase-color;
}
.fa-lastfm,
.fa-lastfm-square {
color: $lastfm-color;
}
.fa-linkedin,
.fa-linkedin-in {
color: $linkedin-color;
}
.fa-mastodon,
.fa-mastodon-square {
color: $mastodon-color;
}
.fa-pinterest,
.fa-pinterest-p,
.fa-pinterest-square {
color: $pinterest-color;
}
.fa-reddit {
color: $reddit-color;
}
.fa-rss,
.fa-rss-square {
color: $rss-color;
}
.fa-soundcloud {
color: $soundcloud-color;
}
.fa-stack-exchange,
.fa-stack-overflow {
color: $stackoverflow-color;
}
.fa-tumblr,
.fa-tumblr-square {
color: $tumblr-color;
}
.fa-twitter,
.fa-twitter-square {
color: $twitter-color;
}
.fa-vimeo,
.fa-vimeo-square,
.fa-vimeo-v {
color: $vimeo-color;
}
.fa-vine {
color: $vine-color;
}
.fa-youtube {
color: $youtube-color;
}
.fa-xing,
.fa-xing-square {
color: $xing-color;
} }
} }
@@ -608,25 +525,26 @@ a.reversefootnote {
} }
pre { pre {
&.highlight .clipboard-copy-button {
color: #ffffca;
}
.clipboard-copy-button { .clipboard-copy-button {
display: block; display: block;
position: absolute; position: absolute;
top: 0.6em; top: 0.6em;
right: 0.5em; right: 0.5em;
width: 1.8em;
height: 1.5em;
z-index: 1; z-index: 1;
background: none; background: none;
border: none; border: none;
outline: none; outline: none;
border-radius: 0.1em; border-radius: 0.1em;
padding: 0.2em 0.5em; padding: 0.2em 0.5em;
color: white;
opacity: 0.4; opacity: 0.4;
transition: color 0.25s linear -0.25s, opacity 0.25s linear; transition: color 0.25s linear -0.25s, opacity 0.25s linear;
&:hover {
color: #ffffca;
}
&::before { &::before {
content: ''; content: '';
position: absolute; position: absolute;
@@ -637,6 +555,22 @@ pre {
z-index: 2; z-index: 2;
} }
i {
position: absolute;
top: 0.25em;
right: 0.25em;
&.copied {
opacity: 0;
}
}
&.copied i {
opacity: 0;
&.copied {
opacity: 1;
}
}
@at-root { @at-root {
.no-copy & { .no-copy & {
display: none; display: none;
+20 -4
View File
@@ -61,7 +61,7 @@ $(document).ready(function () {
} }
// Auto scroll sticky ToC with content // Auto scroll sticky ToC with content
document.addEventListener("gumshoeActivate", function (event) { const scrollTocToContent = function (event) {
var target = event.target; var target = event.target;
var scrollOptions = { behavior: "auto", block: "nearest", inline: "start" }; var scrollOptions = { behavior: "auto", block: "nearest", inline: "start" };
@@ -75,7 +75,12 @@ $(document).ready(function () {
} else { } else {
target.scrollIntoView(scrollOptions); target.scrollIntoView(scrollOptions);
} }
}); };
// Has issues on Firefox, whitelist Chrome for now
if (!!window.chrome) {
document.addEventListener("gumshoeActivate", scrollTocToContent);
}
// add lightbox class to all image links // add lightbox class to all image links
$( $(
@@ -190,12 +195,23 @@ $(document).ready(function () {
var result = copyText(codeBlock.innerText); var result = copyText(codeBlock.innerText);
// Restore the focus to the button // Restore the focus to the button
thisButton.focus(); thisButton.focus();
if (result) {
if (thisButton.interval !== null) {
clearInterval(thisButton.interval);
}
thisButton.classList.add('copied');
thisButton.interval = setTimeout(function () {
thisButton.classList.remove('copied');
clearInterval(thisButton.interval);
thisButton.interval = null;
}, 1500);
}
return result; return result;
}; };
if (window.enable_copy_code_button) { if (window.enable_copy_code_button) {
document document
.querySelectorAll(".page__content pre > code") .querySelectorAll(".page__content pre.highlight > code")
.forEach(function (element, index, parentList) { .forEach(function (element, index, parentList) {
// Locate the <pre> element // Locate the <pre> element
var container = element.parentElement; var container = element.parentElement;
@@ -206,7 +222,7 @@ $(document).ready(function () {
var copyButton = document.createElement("button"); var copyButton = document.createElement("button");
copyButton.title = "Copy to clipboard"; copyButton.title = "Copy to clipboard";
copyButton.className = "clipboard-copy-button"; copyButton.className = "clipboard-copy-button";
copyButton.innerHTML = '<span class="sr-only">Copy code</span><i class="far fa-copy"></i>'; copyButton.innerHTML = '<span class="sr-only">Copy code</span><i class="far fa-fw fa-copy"></i><i class="fas fa-fw fa-check copied"></i>';
copyButton.addEventListener("click", copyButtonEventListener); copyButton.addEventListener("click", copyButtonEventListener);
container.prepend(copyButton); container.prepend(copyButton);
}); });
+2 -2
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2
View File
@@ -1,6 +1,8 @@
source "https://rubygems.org" source "https://rubygems.org"
gem "github-pages", group: :jekyll_plugins gem "github-pages", group: :jekyll_plugins
gem "minimal-mistakes-jekyll", path: ".."
gem "rake"
gem "tzinfo-data" gem "tzinfo-data"
gem "wdm", "~> 0.1.0" if Gem.win_platform? gem "wdm", "~> 0.1.0" if Gem.win_platform?
+5
View File
@@ -0,0 +1,5 @@
task :default => %i[build]
task :build do
sh 'jekyll build --profile --trace --config _config.yml,_config.dev.yml'
end
+2
View File
@@ -1,5 +1,7 @@
# Develop override settings # Develop override settings
theme: minimal-mistakes-jekyll
remote_theme: null
url: http://localhost:4000 url: http://localhost:4000
analytics: analytics:
+1 -1
View File
@@ -1,3 +1,3 @@
# for use with in-page templates # for use with in-page templates
--- ---
version: 4.26.0 version: 4.26.1
+17 -1
View File
@@ -5,7 +5,7 @@ permalink: "/docs/history/"
excerpt: Change log of enhancements and bug fixes made to the theme. excerpt: Change log of enhancements and bug fixes made to the theme.
sidebar: sidebar:
nav: docs nav: docs
last_modified_at: '2024-05-05T19:50:49+08:00' last_modified_at: '2024-05-07T14:21:22+08:00'
toc: false toc: false
--- ---
@@ -19,6 +19,22 @@ toc: false
### Bug Fixes ### Bug Fixes
- Disable copy button on invalid syntax highlighting blocks to avoid positioning issues.
- Fix typo for `fa-dribbble` in `_utilities.scss`.
- Restrict "auto scroll sticky ToC to content" feature to Chromium browsers for now. [#4826](https://github.com/mmistakes/minimal-mistakes/issues/4826)
### Documentation & Maintenance
- Rewrite social icons SCSS with a loop.
### Enhancements
- Change the icon of a copy button into a tick for 1.5 seconds on successful copy.
## [4.26.0](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.26.0)
### Bug Fixes
- Fix an unclosed `<p>` tag in `page__hero.html`, near `page.header.actions`. - Fix an unclosed `<p>` tag in `page__hero.html`, near `page.header.actions`.
- Remove overlay and revert X to hamburger icon when popup disappears. [#3958](https://github.com/mmistakes/minimal-mistakes/pull/3958) - Remove overlay and revert X to hamburger icon when popup disappears. [#3958](https://github.com/mmistakes/minimal-mistakes/pull/3958)
- Fix SEO title when it contains a vertical bar. [#3094](https://github.com/mmistakes/minimal-mistakes/pull/3094) [#3113](https://github.com/mmistakes/minimal-mistakes/pull/3113) - Fix SEO title when it contains a vertical bar. [#3094](https://github.com/mmistakes/minimal-mistakes/pull/3094) [#3113](https://github.com/mmistakes/minimal-mistakes/pull/3113)
+1 -1
View File
@@ -10,7 +10,7 @@ header:
url: "/docs/quick-start-guide/" url: "/docs/quick-start-guide/"
excerpt: > excerpt: >
A flexible two-column Jekyll theme. Perfect for building personal sites, blogs, and portfolios.<br /> A flexible two-column Jekyll theme. Perfect for building personal sites, blogs, and portfolios.<br />
<small><a href="https://github.com/mmistakes/minimal-mistakes/releases/tag/4.26.0">Latest release v4.26.0</a></small> <small><a href="https://github.com/mmistakes/minimal-mistakes/releases/tag/4.26.1">Latest release v4.26.1</a></small>
feature_row: feature_row:
- image_path: /assets/images/mm-customizable-feature.png - image_path: /assets/images/mm-customizable-feature.png
alt: "customizable" alt: "customizable"
@@ -0,0 +1,48 @@
---
title: "Edge Case: Invalid syntax highlight languages"
categories:
- Edge Case
tags:
- content
- css
- edge case
---
Good highlighting:
```ruby
str = ARGV.first
if str
str = str.b[/\A_(.*)_\z/, 1]
if str and Gem::Version.correct?(str)
version = str
ARGV.shift
end
end
```
Good (but dumb) highlighting:
```
str = ARGV.first
if str
str = str.b[/\A_(.*)_\z/, 1]
if str and Gem::Version.correct?(str)
version = str
ARGV.shift
end
end
```
Bad highlighting:
```invalid
str = ARGV.first
if str
str = str.b[/\A_(.*)_\z/, 1]
if str and Gem::Version.correct?(str)
version = str
ARGV.shift
end
end
```
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "minimal-mistakes", "name": "minimal-mistakes",
"version": "4.26.0", "version": "4.26.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "minimal-mistakes", "name": "minimal-mistakes",
"version": "4.26.0", "version": "4.26.1",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"uglify-js": "^3.17.4" "uglify-js": "^3.17.4"
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "minimal-mistakes", "name": "minimal-mistakes",
"private": true, "private": true,
"version": "4.26.0", "version": "4.26.1",
"description": "Minimal Mistakes 2 column Jekyll theme.", "description": "Minimal Mistakes 2 column Jekyll theme.",
"repository": { "repository": {
"type": "git", "type": "git",