Skip to content

Commit

Permalink
add style
Browse files Browse the repository at this point in the history
  • Loading branch information
squi-ddy committed Sep 19, 2023
1 parent a537445 commit d602b07
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions frontend/src/mixins/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,16 @@ export function equals<T extends number | string>(a: T[], b: T[]) {

export function addPyScript() {
if (!document.getElementById('pyscript')) {
const env = document.createElement('py-config');
const env = document.createElement('py-env');
env.innerHTML = `
packages = ["numpy", "matplotlib"]
[splashscreen]
enabled = false
- numpy
- matplotlib
`
document.head.appendChild(env);
const script = document.createElement('script');
script.id = 'pyscript';
script.defer = true
script.src = 'https://pyscript.net/latest/pyscript.js';
script.src = 'https://pyscript.net/alpha/pyscript.js';
document.head.appendChild(script);
const styles = document.createElement('style');
styles.innerHTML = `
Expand All @@ -140,6 +138,7 @@ export function addPyScript() {
color: #f5f5f5;
}
`
document.head.appendChild(styles);
}
}

Expand Down

0 comments on commit d602b07

Please sign in to comment.