Skip to content

Commit

Permalink
Embed user guide pdfs (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
netalondon authored Jun 4, 2024
1 parent 1afe093 commit 3005a67
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
Binary file added web/public/user_guide/asm.pdf
Binary file not shown.
Binary file added web/public/user_guide/chip.pdf
Binary file not shown.
Binary file added web/public/user_guide/compiler.pdf
Binary file not shown.
Binary file added web/public/user_guide/cpu.pdf
Binary file not shown.
Binary file added web/public/user_guide/vm.pdf
Binary file not shown.
12 changes: 8 additions & 4 deletions web/src/service-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,23 @@ precacheAndRoute([
},

{
url: "https://drive.google.com/file/d/15unXGgTfQySMr1V39xTCLTgGfCOr6iG9/view",
url: "user_guide/chip.pdf",
revision: null,
},
{
url: "https://drive.google.com/file/d/16eHIj78Cpeb0uxXBAvxUPUaIwkrj3NIu/view",
url: "user_guide/cpu.pdf",
revision: null,
},
{
url: "https://drive.google.com/file/d/16gy2EDqUqrPIzy-vyX0-M8ObN5HyQa3Y/view",
url: "user_guide/asm.pdf",
revision: null,
},
{
url: "https://drive.google.com/file/d/1IMKD_khjO7iQ673kH9j8qMkyIlMSOtUG/view",
url: "user_guide/vm.pdf",
revision: null,
},
{
url: "user_guide/compiler.pdf",
revision: null,
},
]);
Expand Down
11 changes: 5 additions & 6 deletions web/src/shell/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,11 @@ function headerButtonFromURL(url: URL, icon: string, tooltip?: string) {

// When updating these, also edit service-worker.ts
const guideLinks: Record<string, string> = {
chip: "https://drive.google.com/file/d/15unXGgTfQySMr1V39xTCLTgGfCOr6iG9/view",
cpu: "https://drive.google.com/file/d/16eHIj78Cpeb0uxXBAvxUPUaIwkrj3NIu/view",
asm: "https://drive.google.com/file/d/16gy2EDqUqrPIzy-vyX0-M8ObN5HyQa3Y/view",
vm: "https://drive.google.com/file/d/1IMKD_khjO7iQ673kH9j8qMkyIlMSOtUG/view",
compiler:
"https://drive.google.com/file/d/1KIxNH148mZET5JGE8Y0fPYVYKesgCH8V/view",
chip: "user_guide/chip.pdf",
cpu: "user_guide/cpu.pdf",
asm: "user_guide/asm.pdf",
vm: "user_guide/vm.pdf",
compiler: "user_guide/compiler.pdf",
};

const GUIDE_NOT_AVAILABLE_MESSAGE = "Guide not available for this tool";
Expand Down

0 comments on commit 3005a67

Please sign in to comment.