Skip to content

Latest commit

 

History

History
84 lines (63 loc) · 1.64 KB

README.md

File metadata and controls

84 lines (63 loc) · 1.64 KB

new-home-project

An OS-like portfolio template for creepy developers.

Creating an Application

const GithubApp = {
  icon: require('asset/app/github/icon.png').default,
  width: 800,
  height: 1000,
  Component: <Github />
} as IApp;
const onClickGithub = () => {
  App.launch(GithubApp);
  
  // or you may pass launch parameters just like `argv`.
  // App.launch(GithubApp, { url: 'https://www.github.com/pjc0247' });
};

EXAMPLE: Blank Application

Retrieving application object

const YourHandsomeApp = () => {
  const app = useApplication();
  
  /* .... */
};

Retrieving window object

Applications may contain more than 1 windows. Each window has its own context. The example below shows how to get and control its own window instance.

const YourHandsomeApp = () => {
  const window = useWindow();

  const onClickClose = () => {
    window.close();
  };

  return (
    <>Hello</>
  );
};

Built-in Applications

You can organize your portfolio with simple modifications to the pre-made applications.

Github

(Using github-e project since official Github.com cannot be embedded by CORS policy.)

CodeView

  • You can use it to show the code you wrote.
  • Contains tree explorer and monaco web editor.

Gallery

  • Photo/Video gallery application.
  • Supports youtube video link.