Skip to content

Commit

Permalink
fix relative url
Browse files Browse the repository at this point in the history
  • Loading branch information
kondaurovDev committed Feb 11, 2025
1 parent c6b6268 commit 2717351
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/cv-maker/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<script defer src="https://cdn.jsdelivr.net/npm/@monaco-editor/[email protected]/lib/umd/monaco-loader.min.js"></script>
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>✍️</text></svg>">
<title>CV Maker</title>
<script type="module" crossorigin src="./assets/index-DkVUQZm6.js"></script>
<script type="module" crossorigin src="./assets/index-Hi6j_poh.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-yRNwTtQE.css">
</head>

Expand Down
4 changes: 1 addition & 3 deletions src/common/editor/text-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ export const makeJsonTextModel = async (
monaco: Monaco,
) => {

const emptyExample = await fetchText("./john-doe.json");

const model =
monaco.editor.createModel(emptyExample, 'json');
monaco.editor.createModel('', 'json');

return {
model
Expand Down
6 changes: 4 additions & 2 deletions src/cv-maker/core/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ export const resumeObjectToHTML =


export const getResumeObject = async () => {
const resume = await fetch("/john-doe.json").then(_ => _.json());
console.log({ resume })
const resume = await fetch("./john-doe.json").then(_ => _.json());

delete resume["$schema"]

const input = S.decodeUnknownSync(ResumeObject)(resume);
return input;
}
Expand Down
4 changes: 1 addition & 3 deletions src/cv-maker/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ async function setup() {
const editor = await makeJsonEditor();

const resumeSchemaObject = await fetch("./resume-schema.json").then(_ => _.json());

delete resumeSchemaObject["$schema"]


if (!editor) {
console.warn("can not load editor");
return;
Expand Down

0 comments on commit 2717351

Please sign in to comment.