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
## 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)
### Bug Fixes
+1 -1
View File
@@ -121,7 +121,7 @@ To install:
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:
+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
Free for personal and commercial use under the MIT 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
* Free for personal and commercial use under the MIT 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
* Free for personal and commercial use under the MIT 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;
}
.fa-behance,
.fa-behance-square {
color: $behance-color;
}
.fa-bitbucket {
color: $bitbucket-color;
}
.fa-dribbble,
.fa-dribble-square {
color: $dribbble-color;
}
.fa-facebook,
.fa-facebook-square,
.fa-facebook-f {
color: $facebook-color;
}
.fa-flickr {
color: $flickr-color;
}
.fa-foursquare {
color: $foursquare-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;
@each $color, $icons in (
$behance-color: ".fa-behance, .fa-behance-square",
$bitbucket-color: ".fa-bitbucket",
$dribbble-color: ".fa-dribbble, .fa-dribbble-square",
$facebook-color: ".fa-facebook, .fa-facebook-square, .fa-facebook-f",
$flickr-color: ".fa-flickr",
$foursquare-color: ".fa-foursquare",
$github-color: ".fa-github, .fa-github-alt, .fa-github-square",
$gitlab-color: ".fa-gitlab",
$instagram-color: ".fa-instagram",
$keybase-color: ".fa-keybase",
$lastfm-color: ".fa-lastfm, .fa-lastfm-square",
$linkedin-color: ".fa-linkedin, .fa-linkedin-in",
$mastodon-color: ".fa-mastodon, .fa-mastodon-square",
$pinterest-color: ".fa-pinterest, .fa-pinterest-p, .fa-pinterest-square",
$reddit-color: ".fa-reddit",
$rss-color: ".fa-rss, .fa-rss-square",
$soundcloud-color: ".fa-soundcloud",
$stackoverflow-color: ".fa-stack-exchange, .fa-stack-overflow",
$tumblr-color: ".fa-tumblr, .fa-tumblr-square",
$twitter-color: ".fa-twitter, .fa-twitter-square",
$vimeo-color: ".fa-vimeo, .fa-vimeo-square, .fa-vimeo-v",
$vine-color: ".fa-vine",
$xing-color: ".fa-xing, .fa-xing-square",
$youtube-color: ".fa-youtube",
) {
#{$icons} {
color: $color;
}
}
}
@@ -608,25 +525,26 @@ a.reversefootnote {
}
pre {
&.highlight .clipboard-copy-button {
color: #ffffca;
}
.clipboard-copy-button {
display: block;
position: absolute;
top: 0.6em;
right: 0.5em;
width: 1.8em;
height: 1.5em;
z-index: 1;
background: none;
border: none;
outline: none;
border-radius: 0.1em;
padding: 0.2em 0.5em;
color: white;
opacity: 0.4;
transition: color 0.25s linear -0.25s, opacity 0.25s linear;
&:hover {
color: #ffffca;
}
&::before {
content: '';
position: absolute;
@@ -637,6 +555,22 @@ pre {
z-index: 2;
}
i {
position: absolute;
top: 0.25em;
right: 0.25em;
&.copied {
opacity: 0;
}
}
&.copied i {
opacity: 0;
&.copied {
opacity: 1;
}
}
@at-root {
.no-copy & {
display: none;
+20 -4
View File
@@ -61,7 +61,7 @@ $(document).ready(function () {
}
// Auto scroll sticky ToC with content
document.addEventListener("gumshoeActivate", function (event) {
const scrollTocToContent = function (event) {
var target = event.target;
var scrollOptions = { behavior: "auto", block: "nearest", inline: "start" };
@@ -75,7 +75,12 @@ $(document).ready(function () {
} else {
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
$(
@@ -190,12 +195,23 @@ $(document).ready(function () {
var result = copyText(codeBlock.innerText);
// Restore the focus to the button
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;
};
if (window.enable_copy_code_button) {
document
.querySelectorAll(".page__content pre > code")
.querySelectorAll(".page__content pre.highlight > code")
.forEach(function (element, index, parentList) {
// Locate the <pre> element
var container = element.parentElement;
@@ -206,7 +222,7 @@ $(document).ready(function () {
var copyButton = document.createElement("button");
copyButton.title = "Copy to clipboard";
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);
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"
gem "github-pages", group: :jekyll_plugins
gem "minimal-mistakes-jekyll", path: ".."
gem "rake"
gem "tzinfo-data"
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
+3 -1
View File
@@ -1,5 +1,7 @@
# Develop override settings
theme: minimal-mistakes-jekyll
remote_theme: null
url: http://localhost:4000
analytics:
@@ -10,4 +12,4 @@ comments:
shortname : "mmistakes-dev"
sass:
style: expanded
style: expanded
+1 -1
View File
@@ -1,3 +1,3 @@
# 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.
sidebar:
nav: docs
last_modified_at: '2024-05-05T19:50:49+08:00'
last_modified_at: '2024-05-07T14:21:22+08:00'
toc: false
---
@@ -19,6 +19,22 @@ toc: false
### 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`.
- 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)
+1 -1
View File
@@ -10,7 +10,7 @@ header:
url: "/docs/quick-start-guide/"
excerpt: >
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:
- image_path: /assets/images/mm-customizable-feature.png
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",
"version": "4.26.0",
"version": "4.26.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "minimal-mistakes",
"version": "4.26.0",
"version": "4.26.1",
"license": "MIT",
"devDependencies": {
"uglify-js": "^3.17.4"
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "minimal-mistakes",
"private": true,
"version": "4.26.0",
"version": "4.26.1",
"description": "Minimal Mistakes 2 column Jekyll theme.",
"repository": {
"type": "git",