jekyll-theme-yat 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 98ac82995fa7fe0f023cfdbbb2aa005413c8839adfaf3db2cf1a44b6b28b952d
4
- data.tar.gz: 2e955f528fe54844e7ffbf5605a2f93b3eaf0f5bfa9a9465a1b4dbd518cb80bd
3
+ metadata.gz: b240330b198155ad46585d5205c0d08f794cdd5267edb1d3d9d07ed8e228f1cd
4
+ data.tar.gz: cbf130a4d7beb75c8d68c44b7621ba0c140b6ea839e4521f1ce7e4a8e57a0484
5
5
  SHA512:
6
- metadata.gz: 4c860e189b2e200c9723262207f8d5d8e69840c710faa4375b84ef99ac542a11fd30dfb19a09dafbc7bdf95fd38c86b4ad54c26e36b1fd3f8fa0e7147457db56
7
- data.tar.gz: 63e1b8843f8ae8be5234623a914f32cbc7411f9322c5b9b083cedafe2dee51255c41b93dddc378e8046cf0dae57b286b4a886a4d5118037e52d758c41885b672
6
+ metadata.gz: 7e7475aa560905263a4e4448b4ba7d4e4eafe36ceb93a851637ae8d4983b6ca499b270fc729ac27ce3d3b14d5108eb48c3841bbe5b2d69191b97b78334bca975
7
+ data.tar.gz: 67f7984dd1c2620267a8b0808b48ce7b6ee8ad45330739b1f69c393aef99f3ee995ccd016f33d01b77e40197da630aec5fc8cc1604f9d2fb618d7616b36c3845
@@ -109,10 +109,6 @@ a {
109
109
  color: $brand-color;
110
110
  text-decoration: none;
111
111
 
112
- &:visited {
113
- color: #606060;
114
- }
115
-
116
112
  &:hover {
117
113
  color: $text-color;
118
114
  text-decoration: underline;
@@ -59,13 +59,25 @@ function smoothScrollTo(y, time) {
59
59
  // Init highlight js
60
60
  document.addEventListener('DOMContentLoaded', function(event) {
61
61
  document.querySelectorAll('pre code').forEach((block) => {
62
- hljs.highlightBlock(block);
62
+ var outer = block.parentElement.parentElement.parentElement;
63
63
  var lang = block.getAttribute('data-lang');
64
- if (!lang) {
64
+ for (var cls of outer.classList) {
65
+ if (cls.startsWith('language-')) {
66
+ lang = cls;
67
+ break;
68
+ }
69
+ }
70
+ if (lang) {
71
+ block.setAttribute('class', 'hljs ' + lang);
72
+ } else {
65
73
  lang = block
66
74
  .getAttribute('class')
67
75
  .replace('hljs ', '');
68
76
  }
77
+ if (lang.startsWith('language-')) {
78
+ lang = lang.substr(9);
79
+ }
69
80
  block.parentNode.setAttribute('data-lang', lang);
81
+ hljs.highlightBlock(block);
70
82
  });
71
83
  });
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-yat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - jeffreytse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-16 00:00:00.000000000 Z
11
+ date: 2020-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler