Skip to content

Commit c7e876e

Browse files
committed
Added links to portfolio example
1 parent efe3df5 commit c7e876e

File tree

4 files changed

+55
-2
lines changed

4 files changed

+55
-2
lines changed

examples/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
This is a list of example projects that demonstrate the features and use cases of ProzillaOS.
44

5+
- [ProzillaOS boilerplate](https://github.com/prozilla-os/ProzillaOS-boilerplate)
56
- [Portfolio](./portfolio)
Lines changed: 40 additions & 0 deletions
Loading

examples/portfolio/src/config/virtualDrive.config.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { VirtualDriveConfig, VirtualFolder, VirtualRoot } from "prozilla-os";
1+
import { FILE_SCHEMES, removeUrlProtocol, VirtualDriveConfig, VirtualFolder, VirtualRoot } from "prozilla-os";
22
import { PROJECTS } from "../constants/projects";
33
import { BLOG } from "../constants/blog";
4+
import { LINKS } from "../constants/links";
45

56
function loadData(virtualRoot: VirtualRoot) {
67
const userFolder = virtualRoot.navigate("~");
@@ -29,7 +30,14 @@ function loadData(virtualRoot: VirtualRoot) {
2930
});
3031
});
3132

32-
desktopFolder.createFolder("Links");
33+
desktopFolder.createFolder("Links", (linksFolder) => {
34+
LINKS.forEach((link) => {
35+
linksFolder.createFile(removeUrlProtocol(link.url), undefined, (file) => {
36+
file.setIconUrl(link.icon)
37+
.setSource(FILE_SCHEMES.external + link.url);
38+
});
39+
});
40+
});
3341

3442
desktopFolder.createFile("AboutMe", "md", (file) => {
3543
file.setSource("documents/about-me.md");
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const LINKS = [
2+
{ url: "https://prozilla.dev/", icon: "assets/prozilla.svg" },
3+
{ url: "https://os.prozilla.dev/", icon: "prozilla-os.svg" },
4+
];

0 commit comments

Comments
 (0)