mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-09 10:46:52 +02:00
Add beginner version of frontend roadmap
This commit is contained in:
1
public/jsons/roadmaps/frontend-beginner.json
Normal file
1
public/jsons/roadmaps/frontend-beginner.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -5,7 +5,7 @@ export class Renderer {
|
|||||||
this.resourceId = '';
|
this.resourceId = '';
|
||||||
this.resourceType = '';
|
this.resourceType = '';
|
||||||
this.jsonUrl = '';
|
this.jsonUrl = '';
|
||||||
this.loaderNode = null;
|
this.loaderHTML = null;
|
||||||
|
|
||||||
this.containerId = 'resource-svg-wrap';
|
this.containerId = 'resource-svg-wrap';
|
||||||
this.loaderId = 'resource-loader';
|
this.loaderId = 'resource-loader';
|
||||||
@@ -31,7 +31,7 @@ export class Renderer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Clone it so we can use it later
|
// Clone it so we can use it later
|
||||||
this.loaderNode = this.loaderEl.cloneNode();
|
this.loaderHTML = this.loaderEl.innerHTML;
|
||||||
const dataset = this.containerEl.dataset;
|
const dataset = this.containerEl.dataset;
|
||||||
|
|
||||||
this.resourceType = dataset.resourceType;
|
this.resourceType = dataset.resourceType;
|
||||||
@@ -51,7 +51,7 @@ export class Renderer {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.containerEl.replaceChildren(this.loaderNode);
|
this.containerEl.innerHTML = this.loaderHTML;
|
||||||
|
|
||||||
return fetch(jsonUrl)
|
return fetch(jsonUrl)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
@@ -100,6 +100,13 @@ export class Renderer {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (/^json:/.test(groupId)) {
|
||||||
|
this.jsonToSvg(groupId.replace('json:', '')).then(() => {
|
||||||
|
this.containerEl.setAttribute('style', '');
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (/^check:/.test(groupId)) {
|
if (/^check:/.test(groupId)) {
|
||||||
window.dispatchEvent(
|
window.dispatchEvent(
|
||||||
new CustomEvent(`${this.resourceType}.topic.toggle`, {
|
new CustomEvent(`${this.resourceType}.topic.toggle`, {
|
||||||
|
Reference in New Issue
Block a user