jekyll-theme-centos 0.9.20220201124228 → 0.9.20220212195701
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_includes/download/cards-body-convert.html +0 -1
- data/_layouts/default.html +1 -0
- data/_sass/centos/_highlighter.scss +15 -6
- data/_sass/centos/_mixins.scss +0 -1
- data/_sass/centos/centos.scss +1 -1
- data/_sass/centos/mixins/_content.scss +0 -2
- data/assets/js/clipboard.min.js +7 -0
- data/assets/js/customization.js +17 -20
- metadata +3 -4
- data/_includes/page/code-header.html +0 -10
- data/_sass/centos/mixins/_code-header.scss +0 -64
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68098ad4fab9e64f187803984458996a292c5c4da081e73b6f01ec159f46603c
|
4
|
+
data.tar.gz: 154c6bea65d72b3bd53c28dd01e8f99f1ba465275f8ef451bfee632a041e91db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d15dd926c68b6092fea97036feaecc56aa13126c83dff2d17fb893580c39232fc7553c3f82c1badae5c5e0036f0bb9d691d9d35c193ccbe66e3d255db719af81
|
7
|
+
data.tar.gz: 13bc607da1818f4bd057c3790883203477103da6bde0171f3575756a059cb534210a551d4ac96fb10555b77bc11b62b771e077b230b284c52cc11661dfa798c3
|
data/_layouts/default.html
CHANGED
@@ -6,31 +6,40 @@
|
|
6
6
|
* src: https://github.com/aahan/pygments-github-style
|
7
7
|
*/
|
8
8
|
|
9
|
+
.highlighter-rouge {
|
10
|
+
background-color: #ccc;
|
11
|
+
}
|
12
|
+
|
9
13
|
.highlight pre, pre {
|
10
14
|
background-color: #f8f8f8;
|
11
15
|
border: 1px solid #ccc;
|
12
|
-
padding:
|
13
|
-
border-radius: 0 0 3px 3px;
|
16
|
+
padding: 10px 10px;
|
14
17
|
}
|
15
18
|
|
16
19
|
.card-body {
|
17
20
|
// Corrections for two-columns responsive layout inside cards.
|
18
21
|
.highlight pre, pre {
|
19
22
|
@include media-breakpoint-up(sm) {
|
20
|
-
width:
|
23
|
+
width: 293px;
|
21
24
|
}
|
22
25
|
@include media-breakpoint-up(md) {
|
23
|
-
width:
|
26
|
+
width: 473px;
|
24
27
|
}
|
25
28
|
@include media-breakpoint-up(lg) {
|
26
|
-
width:
|
29
|
+
width: 713px;
|
27
30
|
}
|
28
31
|
@include media-breakpoint-up(xl) {
|
29
|
-
width:
|
32
|
+
width: 523px;
|
30
33
|
}
|
31
34
|
}
|
32
35
|
}
|
33
36
|
|
37
|
+
.btn-clipboard {
|
38
|
+
@extend .btn, .btn-light, .btn-sm;
|
39
|
+
float: right;
|
40
|
+
margin: 5px;
|
41
|
+
}
|
42
|
+
|
34
43
|
.highlight {
|
35
44
|
.hll {
|
36
45
|
background-color: #f8f8f8;
|
data/_sass/centos/_mixins.scss
CHANGED
data/_sass/centos/centos.scss
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* jekyll-theme-centos 0.9.
|
2
|
+
* jekyll-theme-centos 0.9.20220212195701 (https://gitlab.com/areguera/jekyll-theme-centos)
|
3
3
|
* Copyright 2020-2022 areguera@centosproject.org
|
4
4
|
* Licensed under MIT (https://gitlab.com/areguera/jekyll-theme-centos/-/blob/master/LICENSE)
|
5
5
|
*/
|
@@ -0,0 +1,7 @@
|
|
1
|
+
/*!
|
2
|
+
* clipboard.js v2.0.10
|
3
|
+
* https://clipboardjs.com/
|
4
|
+
*
|
5
|
+
* Licensed MIT © Zeno Rocha
|
6
|
+
*/
|
7
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return o}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),c=n.n(e);function a(t){try{return document.execCommand(t)}catch(t){return}}var f=function(t){t=c()(t);return a("cut"),t};var l=function(t){var e,n,o,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body},i="";return"string"==typeof t?(e=t,n="rtl"===document.documentElement.getAttribute("dir"),(o=document.createElement("textarea")).style.fontSize="12pt",o.style.border="0",o.style.padding="0",o.style.margin="0",o.style.position="absolute",o.style[n?"right":"left"]="-9999px",n=window.pageYOffset||document.documentElement.scrollTop,o.style.top="".concat(n,"px"),o.setAttribute("readonly",""),o.value=e,o=o,r.container.appendChild(o),i=c()(o),a("copy"),o.remove()):(i=c()(t),a("copy")),i};function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.action,n=void 0===e?"copy":e,o=t.container,e=t.target,t=t.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==e){if(!e||"object"!==r(e)||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return t?l(t,{container:o}):e?"cut"===n?f(e):l(e,{container:o}):void 0};function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function y(t,e){return(y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(n){var o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=m(n);return t=o?(t=m(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==p(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function m(t){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function v(t,e){t="data-clipboard-".concat(t);if(e.hasAttribute(t))return e.getAttribute(t)}var o=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e)}(r,i());var t,e,n,o=h(r);function r(t,e){var n;return function(t){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this),(n=o.call(this)).resolveOptions(e),n.listenClick(t),n}return t=r,n=[{key:"copy",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body};return l(t,e)}},{key:"cut",value:function(t){return f(t)}},{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof t?[t]:t,e=!!document.queryCommandSupported;return t.forEach(function(t){e=e&&!!document.queryCommandSupported(t)}),e}}],(e=[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===p(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=u()(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget,n=this.action(e)||"copy",t=s({action:n,container:this.container,target:this.target(e),text:this.text(e)});this.emit(t?"success":"error",{action:n,text:t,trigger:e,clearSelection:function(){e&&e.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(t){return v("action",t)}},{key:"defaultTarget",value:function(t){t=v("target",t);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(t){return v("text",t)}},{key:"destroy",value:function(){this.listener.destroy()}}])&&d(t.prototype,e),n&&d(t,n),r}()},828:function(t){var e;"undefined"==typeof Element||Element.prototype.matches||((e=Element.prototype).matches=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector),t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}},438:function(t,e,n){var u=n(828);function i(t,e,n,o,r){var i=function(e,n,t,o){return function(t){t.delegateTarget=u(t.target,n),t.delegateTarget&&o.call(e,t)}}.apply(this,arguments);return t.addEventListener(n,i,r),{destroy:function(){t.removeEventListener(n,i,r)}}}t.exports=function(t,e,n,o,r){return"function"==typeof t.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return i(t,e,n,o,r)}))}},879:function(t,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},370:function(t,e,n){var f=n(879),l=n(438);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!f.string(e))throw new TypeError("Second argument must be a String");if(!f.fn(n))throw new TypeError("Third argument must be a Function");if(f.node(t))return c=e,a=n,(u=t).addEventListener(c,a),{destroy:function(){u.removeEventListener(c,a)}};if(f.nodeList(t))return o=t,r=e,i=n,Array.prototype.forEach.call(o,function(t){t.addEventListener(r,i)}),{destroy:function(){Array.prototype.forEach.call(o,function(t){t.removeEventListener(r,i)})}};if(f.string(t))return t=t,e=e,n=n,l(document.body,t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var o,r,i,u,c,a}},817:function(t){t.exports=function(t){var e,n="SELECT"===t.nodeName?(t.focus(),t.value):"INPUT"===t.nodeName||"TEXTAREA"===t.nodeName?((e=t.hasAttribute("readonly"))||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),e||t.removeAttribute("readonly"),t.value):(t.hasAttribute("contenteditable")&&t.focus(),n=window.getSelection(),(e=document.createRange()).selectNodeContents(t),n.removeAllRanges(),n.addRange(e),n.toString());return n}},279:function(t){function e(){}e.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o<r;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,u=o.length;i<u;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},t.exports=e,t.exports.TinyEmitter=e}},r={},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o(686).default;function o(t){if(r[t])return r[t].exports;var e=r[t]={exports:{}};return n[t](e,e.exports,o),e.exports}var n,r});
|
data/assets/js/customization.js
CHANGED
@@ -1,23 +1,3 @@
|
|
1
|
-
// Copy code
|
2
|
-
// Thanks Aleksandr
|
3
|
-
// https://www.aleksandrhovhannisyan.com/blog/how-to-add-a-copy-to-clipboard-button-to-your-jekyll-blog/
|
4
|
-
const codeBlocks = document.querySelectorAll(".code-header + .highlighter-rouge");
|
5
|
-
const copyCodeButtons = document.querySelectorAll(".copy-code-button");
|
6
|
-
|
7
|
-
copyCodeButtons.forEach((copyCodeButton, index) => {
|
8
|
-
const code = codeBlocks[index].innerText;
|
9
|
-
|
10
|
-
copyCodeButton.addEventListener("click", () => {
|
11
|
-
window.navigator.clipboard.writeText(code);
|
12
|
-
copyCodeButton.classList.add("copied");
|
13
|
-
|
14
|
-
setTimeout(() => {
|
15
|
-
copyCodeButton.classList.remove("copied");
|
16
|
-
copyCodeButton.blur();
|
17
|
-
}, 2000);
|
18
|
-
});
|
19
|
-
});
|
20
|
-
|
21
1
|
// Show top page button after scrolling down.
|
22
2
|
$("#topbtn").hide();
|
23
3
|
$(window).scroll(function() {
|
@@ -27,3 +7,20 @@ $(window).scroll(function() {
|
|
27
7
|
$("#topbtn").fadeOut("fast");
|
28
8
|
}
|
29
9
|
});
|
10
|
+
// Instantiate clipboard.js
|
11
|
+
new ClipboardJS('.btn-clipboard', {
|
12
|
+
target: function(trigger) {
|
13
|
+
return trigger.nextElementSibling;
|
14
|
+
}
|
15
|
+
});
|
16
|
+
// Add button before pre element to complete clipboard.js implementation.
|
17
|
+
document.querySelectorAll("pre > code").forEach((codeBlock) => {
|
18
|
+
const button = document.createElement("button");
|
19
|
+
button.className = "btn-clipboard";
|
20
|
+
button.title = "Copy to clipboard";
|
21
|
+
button.type = "button";
|
22
|
+
button.innerHTML = "<i class=\"fas fa-copy\"></i>";
|
23
|
+
|
24
|
+
const pre = codeBlock.parentNode;
|
25
|
+
pre.parentNode.insertBefore(button, pre);
|
26
|
+
});
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-theme-centos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.20220212195701
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alain Reguera Delgado
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -90,7 +90,6 @@ files:
|
|
90
90
|
- _includes/page/alert-info.html
|
91
91
|
- _includes/page/alert-success.html
|
92
92
|
- _includes/page/alert-warning.html
|
93
|
-
- _includes/page/code-header.html
|
94
93
|
- _includes/page/figure.html
|
95
94
|
- _includes/page/video.html
|
96
95
|
- _includes/post-nav-explorer.html
|
@@ -216,7 +215,6 @@ files:
|
|
216
215
|
- _sass/centos/fonts/_montserrat.scss
|
217
216
|
- _sass/centos/fonts/_overpass.scss
|
218
217
|
- _sass/centos/mixins/_aside-nav.scss
|
219
|
-
- _sass/centos/mixins/_code-header.scss
|
220
218
|
- _sass/centos/mixins/_content-nav.scss
|
221
219
|
- _sass/centos/mixins/_content.scss
|
222
220
|
- _sass/centos/mixins/_header-links.scss
|
@@ -353,6 +351,7 @@ files:
|
|
353
351
|
- assets/img/post.png
|
354
352
|
- assets/js/bootstrap.min.js
|
355
353
|
- assets/js/bootstrap.min.js.map
|
354
|
+
- assets/js/clipboard.min.js
|
356
355
|
- assets/js/customization.js
|
357
356
|
- assets/js/dataTables.bootstrap4.min.js
|
358
357
|
- assets/js/instantsearch.min.js
|
@@ -1,10 +0,0 @@
|
|
1
|
-
<div class="code-header">
|
2
|
-
{% if include.icon and include.title %}
|
3
|
-
<div class="code-header--description-{{ include.icon }}">{{ include.title }}</div>
|
4
|
-
{% else %}
|
5
|
-
<div class="code-header--description-code">Code</div>
|
6
|
-
{% endif %}
|
7
|
-
<div class="code-header--button">
|
8
|
-
<button class="copy-code-button" aria-label="Copy code to clipboard"></button>
|
9
|
-
</div>
|
10
|
-
</div>
|
@@ -1,64 +0,0 @@
|
|
1
|
-
/* code-header
|
2
|
-
*/
|
3
|
-
@mixin code-header {
|
4
|
-
|
5
|
-
.code-header {
|
6
|
-
@extend .bg-light;
|
7
|
-
display: flex;
|
8
|
-
justify-content: space-between;
|
9
|
-
align-items: center;
|
10
|
-
padding-left: 10px;
|
11
|
-
font-size: small;
|
12
|
-
|
13
|
-
&--description {
|
14
|
-
&-code {
|
15
|
-
&:before { @extend .fas; content: fa-content($fa-var-code); padding-right: 5px; }
|
16
|
-
}
|
17
|
-
&-python {
|
18
|
-
&:before { @extend .fab; content: fa-content($fa-var-python); padding-right: 5px; }
|
19
|
-
}
|
20
|
-
&-terminal {
|
21
|
-
&:before { @extend .fas; content: fa-content($fa-var-terminal); padding-right: 5px; }
|
22
|
-
}
|
23
|
-
&-key {
|
24
|
-
&:before { @extend .fas; content: fa-content($fa-var-key); padding-right: 5px; }
|
25
|
-
}
|
26
|
-
&-markdown {
|
27
|
-
&:before { @extend .fab; content: fa-content($fa-var-markdown); padding-right: 5px; }
|
28
|
-
}
|
29
|
-
}
|
30
|
-
|
31
|
-
&--button {
|
32
|
-
.copy-code-button {
|
33
|
-
@extend .btn, .btn-light, .shadow-none, .btn-sm;
|
34
|
-
border-radius: 0px;
|
35
|
-
display: grid;
|
36
|
-
grid-auto-flow: column;
|
37
|
-
align-items: center;
|
38
|
-
grid-column-gap: 4px;
|
39
|
-
border: none;
|
40
|
-
cursor: pointer;
|
41
|
-
font-size: small;
|
42
|
-
|
43
|
-
&:before {
|
44
|
-
@extend .fas;
|
45
|
-
content: fa-content($fa-var-clipboard);
|
46
|
-
}
|
47
|
-
&:after {
|
48
|
-
content: "Copy";
|
49
|
-
}
|
50
|
-
|
51
|
-
// This class will be toggled via JavaScript
|
52
|
-
&.copied {
|
53
|
-
&:before {
|
54
|
-
@extend .fas;
|
55
|
-
content: fa-content($fa-var-clipboard-check);
|
56
|
-
}
|
57
|
-
&:after {
|
58
|
-
content: "Copied!";
|
59
|
-
}
|
60
|
-
}
|
61
|
-
}
|
62
|
-
}
|
63
|
-
}
|
64
|
-
}
|