-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Mermaid and tables, bump version
- Loading branch information
1 parent
71c90d5
commit ec3943a
Showing
7 changed files
with
187 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,7 +82,7 @@ <h5 id="contribute" class="sidebar-title">Contribute to This Page</h5> | |
</div> | ||
</div> | ||
|
||
<script src="https://unpkg.com/[email protected]/lib/toURI.js"></script> | ||
<script src="{{ site.url }}/assets/toURI.js"></script> | ||
<script src="{{ site.url }}/assets/entry-parser.js"></script> | ||
<script> | ||
var siteName = '{{ site.ham.site_name }}'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { b9 as f } from "./mermaid-9f2aa176.js"; | ||
export { | ||
f as default | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* Utility stylesheet for rendering tables */ | ||
|
||
table:not([data-ham-ignore="true"]) { | ||
border-collapse: collapse; | ||
margin-top: 1rem; | ||
margin-bottom: 1rem; | ||
} | ||
|
||
table:not([data-ham-ignore="true"]) td, table:not([data-ham-ignore="true"]) th { | ||
padding: 0.5rem; | ||
} | ||
|
||
table:not([data-ham-ignore="true"]) thead { | ||
background: var(--bs-primary-bg-subtle); | ||
} | ||
|
||
table:not([data-ham-ignore="true"]) tr { | ||
border-bottom: solid 1px var(--bs-primary-700); | ||
} | ||
|
||
[data-bs-theme="dark"] table:not([data-ham-ignore="true"]) tr { | ||
border-bottom: solid 1px var(--bs-primary-300); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
// Version 1.0.4 | ||
|
||
/* | ||
* String transliteration for URI generation purposes. | ||
* Adds .toURI() to String's prototype for browser usage. | ||
* With Node.js & AMD support. | ||
* | ||
* @link http://annexare.com/ | ||
* @license MIT | ||
*/ | ||
|
||
;(function () { | ||
'use strict'; | ||
|
||
var pairs = { | ||
// Cyrillic | ||
'а': 'a', 'б': 'b', 'в': 'v', 'г': 'g', | ||
'д': 'd', 'е': 'e', 'ё': 'yo', 'ж': 'zh', | ||
'з': 'z', 'и': 'y', 'й': 'j', | ||
'кс': 'x', 'к': 'k', | ||
'л': 'l', 'м': 'm', 'н': 'n', 'о': 'o', | ||
'п': 'p', 'р': 'r', 'с': 's', 'т': 't', | ||
'у': 'u', 'ф': 'f', 'х': 'h', 'ц': 'ts', | ||
'ч': 'ch', 'ш': 'sh', 'щ': 'shch','ъ': '', | ||
'ы': 'y', 'ь': '', 'э': 'e', | ||
// Part is done as: http://zakon4.rada.gov.ua/laws/show/55-2010-%D0%BF | ||
// But don't agree with "Гг | Hh", nobody talks like that. | ||
'^ю': 'yu', '\\s+ю': ' yu', 'ю': 'iu', | ||
'^я': 'ya', '\\s+я': ' ya', 'я': 'ia', | ||
'^є': 'ye', '\\s+є': ' ye', 'є': 'ie', | ||
'і': 'i', | ||
'^ї': 'yi', '\\s+ї': ' yi', 'ї': 'i', | ||
'ґ': 'gh', | ||
// Symbols & Accents | ||
'\\.': '_', | ||
'&': 'and', | ||
'∞': 'infinity', | ||
'♥': 'love', | ||
'ä|æ|ǽ': 'ae', | ||
'ö|œ': 'oe', | ||
'ü': 'ue', | ||
'à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª': 'a', | ||
'ç|ć|ĉ|ċ|č': 'c', | ||
'ð|ď|đ': 'd', | ||
'è|é|ê|ë|ē|ĕ|ė|ę|ě': 'e', | ||
'ĝ|ğ|ġ|ģ': 'g', | ||
'ĥ|ħ': 'h', | ||
'ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı': '', | ||
'ĵ': 'j', | ||
'ķ': 'k', | ||
'ĺ|ļ|ľ|ŀ|ł': 'l', | ||
'ñ|ń|ņ|ň|ʼn': 'n', | ||
'ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º': 'o', | ||
'ŕ|ŗ|ř': 'r', | ||
'ś|ŝ|ş|š|ſ': 's', | ||
'ţ|ť|ŧ': 't', | ||
'ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ': 'u', | ||
'ý|ÿ|ŷ': 'y', | ||
'ŵ': 'w', | ||
'ź|ż|ž': 'z', | ||
'ß': 'ss', | ||
'ij': 'ij', | ||
'ƒ': 'f', | ||
// Currencies | ||
'\\$': 'USD', | ||
'€': 'EUR', | ||
'£': 'GBP', | ||
'₴': 'UAH', | ||
'¢': 'cent' | ||
}, | ||
isRU = /ы|ъ|э|ё|ъ|(\s|^)и|жь|чь|шь|иа|ие|ии|ио|иу|аи|еи|ои|уи|цк|ец(\s|$)/, | ||
isUA = /є|i|ї|ґ|зьк|ськ|цьк|ць(\s|$)|(нн|тт|чч)[юя]/, | ||
strtr = function (string, pairs) { | ||
// Just like this: | ||
// http://php.net/manual/en/function.strtr.php | ||
var str = string; | ||
for (var key in pairs) if (pairs.hasOwnProperty(key)) { | ||
str = str.replace(new RegExp(key, 'g'), pairs[key]); | ||
} | ||
return str; | ||
}, | ||
transliterate = function (separateWith) { | ||
var text = this.toString().trim(), | ||
space = ' ', | ||
separator = separateWith || space, | ||
isUri = (separator !== space); | ||
|
||
if (!text) { | ||
return ''; | ||
} | ||
|
||
if (isUri) { | ||
text = text | ||
// Strip tags | ||
.replace(/(<([^>]+)>)/ig, ''); | ||
|
||
if (!text) { | ||
return ''; | ||
} | ||
} | ||
|
||
text = text.toLowerCase(); | ||
pairs['и'] = ((text.search(isRU) !== -1) && (text.search(isUA) === -1)) ? 'i' : 'y'; | ||
|
||
text = strtr(text, pairs); | ||
|
||
if (isUri) { | ||
text = text | ||
// Strip whitespace into separator | ||
.replace(/\s+/g, separator) | ||
// Slashes, ":" | ||
.replace(/[\/\\:]+/g, separator) | ||
// Unsupported symbols | ||
.replace(/[^\d\w\-\+_]+/g, separator) | ||
// Multiple dashes | ||
.replace(new RegExp('(' + separator + ')+', 'g'), separator) | ||
.replace(/\-([+_])\-/g, '$1') | ||
// Trim text for specific chars | ||
.replace(/^[\-_]+|[\-_]+$/g, ''); | ||
} | ||
|
||
return text; | ||
}, | ||
toURI = function (separateWith) { | ||
return transliterate.call(this, separateWith || '-'); | ||
}; | ||
|
||
if (typeof module !== 'undefined' && module.exports) { | ||
module.exports = toURI; | ||
} else if (typeof define !== 'undefined' && define.amd) { | ||
define([], function() { | ||
return toURI; | ||
}); | ||
} else { | ||
this.transliterate = function (text, separateWith) { | ||
return transliterate.call(text, separateWith); | ||
}; | ||
this.toURI = function (text, separateWith) { | ||
return toURI.call(text, separateWith); | ||
}; | ||
} | ||
}.call(this)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
Gem::Specification.new do |spec| | ||
spec.name = "jekyll-ham" | ||
spec.version = "1.0.4" | ||
spec.version = "1.1.0" | ||
spec.authors = ["Reinhart Previano Koentjoro"] | ||
spec.email = ["[email protected]"] | ||
|
||
|