DonChiaQE / vuejs-os-template

Template to create an interactive OS on the Web
MIT License
79 stars 8 forks source link
babel desktop environment html js os portfolio portfolio-website vue vue2 vuejs vuex web webapp

OS Website Template for Vue.js

Blueprint Theme Windows Theme MacOS Theme
Screenshot 2021-12-21 at 5 16 53 PM Screenshot 2021-12-21 at 5 16 53 PM Screenshot 2021-12-29 at 3 06 44 PM

Table of contents

  1. Project Overview
  2. Features
  3. Technologies
  4. Pre-Requisites
  5. Setup Instructions
  6. Register Windows with Slots (Quick Registration)
  7. Register Custom Windows (Advanced Registration)
  8. Window API
  9. FAQ

Project Overview

This project aims to create an interactive Web OS template for Vue. Included in the template are all necessary logic for individual window components, navbars and app grids. Users are able to register new components (custom or otherwise) easily.

Features

Technologies

Pre-requisites

Setup Instructions

  1. Download the latest release from this page's sidebae

  2. Make sure you have Vue.js installed

Official Documentation from Vue

  1. Rename the folder to vuejs-os-template

  2. Cd into project folder and install packages + dependencies

$ cd vuejs-os-template && npm install
  1. Serve project
$ npm run serve

Register Windows (slots method)

Registering a window with the slots method will allow you quick access to the pre-made window template. This method is most suited for users who do not require any change in the styling or layout of the window itself.

  1. Head to /src/store/index.js

  2. Register a new window by pasting the following snippet within the windows state array

{
     windowId: "UniqueWindowID", 
     windowState: "close",
     displayName: "Unique Window",
     windowComponent: 'window',
     windowContent: 'Placeholder',
     windowContentPadding: {
         top: null,
         right: null,
         bottom: null,
         left: null
     },
     position: "absolute",
     positionX: "10vw",
     positionY: "10vh",
     iconImage: "placeholder.png",
     altText: "Placeholder Icon",
     fullscreen: false
 },
  1. Change 'windowId' to a unique window ID and 'displayName' to a preferred name for the window.
windowId: "MyNewWindow"
displayName: "New Window"
  1. The content displayed within the window is registered to the 'Placeholder' component. Simply create a new content component under /src/components/views folder and replace 'windowContent' with the name of the new content component created.
windowContent: "MyNewWindowContent"

/src/components/views/MyNewWindowContent.vue

<template>
  <p>this is my new window's content!</p>
</template>
  1. Head over to /src/App.vue to import and register the new components under the Githubissues.
  2. Githubissues is a development platform for aggregating issues.