forked from ScoDoc/ScoDoc
Merge branch 'table' of https://scodoc.org/git/ScoDoc/ScoDoc into bac_a_sable_prod
This commit is contained in:
commit
7bf00f1ad9
@ -10,7 +10,18 @@ function getCurrentScriptPath() {
|
|||||||
|
|
||||||
return scriptPath;
|
return scriptPath;
|
||||||
}
|
}
|
||||||
|
function removeLastTwoComponents(path) {
|
||||||
|
// Split the path into individual components
|
||||||
|
var components = path.split('/');
|
||||||
|
|
||||||
|
// Remove the last two components (filename and enclosing directory)
|
||||||
|
components.splice(-2);
|
||||||
|
|
||||||
|
// Join the remaining components back into a path
|
||||||
|
var newPath = components.join('/');
|
||||||
|
|
||||||
|
return newPath;
|
||||||
|
}
|
||||||
class ref_competences extends HTMLElement {
|
class ref_competences extends HTMLElement {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
@ -27,7 +38,7 @@ class ref_competences extends HTMLElement {
|
|||||||
/* Style du module */
|
/* Style du module */
|
||||||
const styles = document.createElement('link');
|
const styles = document.createElement('link');
|
||||||
styles.setAttribute('rel', 'stylesheet');
|
styles.setAttribute('rel', 'stylesheet');
|
||||||
styles.setAttribute('href', getCurrentScriptPath() + '../css/ref-competences.css');
|
styles.setAttribute('href', removeLastTwoComponents(getCurrentScriptPath()) + '/css/ref-competences.css');
|
||||||
|
|
||||||
this.shadow.appendChild(styles);
|
this.shadow.appendChild(styles);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user