Skip to content

Commit d638781

Browse files
authored
added terminal and nextflow svg icons
1 parent 22bbc89 commit d638781

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

_extensions/codewindow/codewindow.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const initCodewindow = function(Reveal) {
1616

1717
const svg_r = `<svg viewBox="0 0 724 561" style = "height: 1em;"><path d="M361.453,485.937 C162.329,485.937 0.906,377.828 0.906,244.469 C0.906,111.109 162.329,3.000 361.453,3.000 C560.578,3.000 722.000,111.109 722.000,244.469 C722.000,377.828 560.578,485.937 361.453,485.937 ZM416.641,97.406 C265.289,97.406 142.594,171.314 142.594,262.484 C142.594,353.654 265.289,427.562 416.641,427.562 C567.992,427.562 679.687,377.033 679.687,262.484 C679.687,147.971 567.992,97.406 416.641,97.406 Z" fill="#a9a8ad" fill-rule="evenodd"/><path d="M550.000,377.000 C550.000,377.000 571.822,383.585 584.500,390.000 C588.899,392.226 596.510,396.668 602.000,402.500 C607.378,408.212 610.000,414.000 610.000,414.000 L696.000,559.000 L557.000,559.062 L492.000,437.000 C492.000,437.000 478.690,414.131 470.500,407.500 C463.668,401.969 460.755,400.000 454.000,400.000 C449.298,400.000 420.974,400.000 420.974,400.000 L421.000,558.974 L298.000,559.026 L298.000,152.938 L545.000,152.938 C545.000,152.938 657.500,154.967 657.500,262.000 C657.500,369.033 550.000,377.000 550.000,377.000 ZM496.500,241.024 L422.037,240.976 L422.000,310.026 L496.500,310.002 C496.500,310.002 531.000,309.895 531.000,274.877 C531.000,239.155 496.500,241.024 496.500,241.024 Z" fill="rgb(39,109,195)" fill-rule="evenodd"/></svg>`
1818

19-
const svg_python = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" style = "height: 30em; width: 30em;"><g transform="matrix(.1617 0 0 .158089 -107.53764 -81.66187)"><path d="M716.255 544.487c0-13.623 3.653-21.034 23.822-24.563 13.693-2.4 31.25-2.7 47.627 0 12.935 2.135 23.822 11.77 23.822 24.563v44.945c0 13.182-10.57 23.98-23.822 23.98h-47.627c-16.164 0-29.787 13.782-29.787 29.363v21.564h-16.376c-13.852 0-21.917-9.988-25.305-23.964-4.57-18.776-4.376-29.963 0-47.945 3.794-15.687 15.917-23.964 29.77-23.964h65.52v-6h-47.645v-17.98z" fill="#366a96"/><path d="M811.527 688.32c0 13.623-11.823 20.523-23.822 23.964-18.052 5.188-32.54 4.394-47.627 0-12.6-3.67-23.822-11.17-23.822-23.964v-44.945c0-12.935 10.782-23.98 23.822-23.98h47.627c15.864 0 29.787-13.71 29.787-29.963v-20.964h17.858c13.87 0 20.4 10.305 23.822 23.964 4.764 18.97 4.976 33.157 0 47.945-4.817 14.364-9.97 23.964-23.822 23.964H763.9v6h47.627v17.98z" fill="#ffc836"/><path d="M728.166 541.505c0-4.976 3.988-9 8.93-9 4.923 0 8.93 4.023 8.93 9 0 4.96-4.006 8.982-8.93 8.982-4.94 0-8.93-4.023-8.93-8.982zm53.59 149.798c0-4.96 4.006-8.982 8.93-8.982 4.94 0 8.93 4.023 8.93 8.982 0 4.976-3.988 9-8.93 9-4.923 0-8.93-4.023-8.93-9z" fill="#fff"/></g></svg>`
19+
const svg_python = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" style = "height: 1em; width: 1em;"><g transform="matrix(.1617 0 0 .158089 -107.53764 -81.66187)"><path d="M716.255 544.487c0-13.623 3.653-21.034 23.822-24.563 13.693-2.4 31.25-2.7 47.627 0 12.935 2.135 23.822 11.77 23.822 24.563v44.945c0 13.182-10.57 23.98-23.822 23.98h-47.627c-16.164 0-29.787 13.782-29.787 29.363v21.564h-16.376c-13.852 0-21.917-9.988-25.305-23.964-4.57-18.776-4.376-29.963 0-47.945 3.794-15.687 15.917-23.964 29.77-23.964h65.52v-6h-47.645v-17.98z" fill="#366a96"/><path d="M811.527 688.32c0 13.623-11.823 20.523-23.822 23.964-18.052 5.188-32.54 4.394-47.627 0-12.6-3.67-23.822-11.17-23.822-23.964v-44.945c0-12.935 10.782-23.98 23.822-23.98h47.627c15.864 0 29.787-13.71 29.787-29.963v-20.964h17.858c13.87 0 20.4 10.305 23.822 23.964 4.764 18.97 4.976 33.157 0 47.945-4.817 14.364-9.97 23.964-23.822 23.964H763.9v6h47.627v17.98z" fill="#ffc836"/><path d="M728.166 541.505c0-4.976 3.988-9 8.93-9 4.923 0 8.93 4.023 8.93 9 0 4.96-4.006 8.982-8.93 8.982-4.94 0-8.93-4.023-8.93-8.982zm53.59 149.798c0-4.96 4.006-8.982 8.93-8.982 4.94 0 8.93 4.023 8.93 8.982 0 4.976-3.988 9-8.93 9-4.923 0-8.93-4.023-8.93-9z" fill="#fff"/></g></svg>`
2020

2121
const svg_html = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" style="height:1em"><path fill="#E44D26" d="M107.644 470.877 74.633 100.62h362.734l-33.046 370.199L255.778 512z"/><path fill="#F16529" d="m256 480.523 120.03-33.277 28.24-316.352H256z"/><path fill="#EBEBEB" d="M256 268.217h-60.09l-4.15-46.501H256v-45.411H142.132l1.087 12.183 11.161 125.139H256zm0 117.936-.199.053-50.574-13.656-3.233-36.217h-45.585l6.362 71.301 93.02 25.823.209-.058z"/><path d="M108.382 0h23.077v22.8h21.11V0h23.078v69.044H152.57v-23.12h-21.11v23.12h-23.077V0zm97.612 22.896h-20.316V0h63.72v22.896h-20.325v46.148h-23.078V22.896zM259.511 0h24.063l14.802 24.26L313.163 0h24.072v69.044h-22.982V34.822l-15.877 24.549h-.397l-15.888-24.549v34.222h-22.58V0zm89.209 0h23.084v46.222h32.453v22.822H348.72V0z"/><path fill="#FFF" d="M255.843 268.217v45.41h55.918l-5.271 58.894-50.647 13.67v47.244l93.094-25.801.683-7.672 10.671-119.551 1.108-12.194h-12.237zm0-91.912v45.411h109.688l.911-10.207 2.069-23.021 1.086-12.183z"/></svg>`
2222

@@ -28,6 +28,10 @@ const initCodewindow = function(Reveal) {
2828

2929
const svg_julia = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 325 300" style="height:1em"><path style="stroke:none;fill-rule:nonzero;fill:#cb3c33;fill-opacity:1" d="M150.898 225c0 41.422-33.578 75-75 75-41.421 0-75-33.578-75-75s33.579-75 75-75c41.422 0 75 33.578 75 75"/><path style="stroke:none;fill-rule:nonzero;fill:#389826;fill-opacity:1" d="M237.5 75c0 41.422-33.578 75-75 75s-75-33.578-75-75 33.578-75 75-75 75 33.578 75 75"/><path style="stroke:none;fill-rule:nonzero;fill:#9558b2;fill-opacity:1" d="M324.102 225c0 41.422-33.579 75-75 75-41.422 0-75-33.578-75-75s33.578-75 75-75c41.421 0 75 33.578 75 75"/></svg>`
3030

31+
const svg_terminal = `<svg width="24" height="24" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="4" y="8" width="40" height="32" rx="2" fill="#ff7043" stroke="#333" stroke-width="4" stroke-linejoin="round"/><path d="M12 18L19 24L12 30" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M23 32H36" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>`
32+
33+
const svg_nextflow = `<svg width="24" height="24" viewBox="0 0 251 251" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 47.0195C39.45 49.6394 71.06 81.3272 73.54 120.815H119.61C117.05 55.8589 64.93 3.64245 0 0.942627V47.0195Z" fill="#0DC09D"/><path d="M73.8 131.324C71.18 170.771 39.49 202.379 0 204.859V250.926C64.96 248.366 117.18 196.249 119.88 131.324H73.8Z" fill="#0DC09D"/><path d="M176.201 120.545C178.821 81.0972 210.511 49.4894 250.001 47.0095V0.942627C185.041 3.50245 132.821 55.619 130.121 120.545H176.201Z" fill="#0DC09D"/><path d="M250.001 204.849C210.551 202.229 178.941 170.542 176.461 131.054H130.391C132.951 196.01 185.071 248.226 250.001 250.926V204.849Z" fill="#0DC09D"/></svg>`
34+
3135
window.addEventListener( 'ready', function(event) {
3236

3337
var content;
@@ -84,6 +88,14 @@ const initCodewindow = function(Reveal) {
8488
file.innerHTML += svg_julia;
8589
empty_file = false;
8690
}
91+
if (content.classList.contains("terminal")) {
92+
file.innerHTML += svg_terminal;
93+
empty_file = false;
94+
}
95+
if (content.classList.contains("nextflow")) {
96+
file.innerHTML += svg_nextflow;
97+
empty_file = false;
98+
}
8799

88100
file_name = content.querySelector("p");
89101
if (file_name !== null) {
@@ -109,4 +121,4 @@ const initCodewindow = function(Reveal) {
109121
}
110122
}
111123
});
112-
};
124+
};

0 commit comments

Comments
 (0)