PoseiOS
- 4 Devlogs
- 5 Total hours
PoseiOS is an OS inspired by the greek god of the sea: Poseidon!
PoseiOS is an OS inspired by the greek god of the sea: Poseidon!
element.classList.add("...");
width: fit-content so that I don’t have to guess the width of my div.Aesthetic tweak: Changed cursor grab to only show when hovering over handle instead of showing over the whole window).
Reduced repetition and improved scalability by turning open/close window into a generalized function that works for all windows, so I can call the function for future apps.
A lot of bugs and back-and-forth and commenting out code to add open-close function for the apps. I found out that I needed 2 parameters for the functions closeWindowOnClick and openWindowOnClick. First parameter is used for checking if the open button (app icon) or close button was selected/tapped, and second parameter is used for targeting the specific window that should be opened/closed. The parameters made me very confused because I would sometimes misinterpret the element as the button when the element parameter being passed was linked to the window.
Added an icon and CSS styling for my first app: poseidon.md
Added attributions to my README, for the bg image and the icons.
Called addWindowTapHandler() on line 19 instead of calling addWindowTapHandler() for each window directly to reduce redundancy.
Chose mousedown instead of click for event listener so that the window auto-focus when it is tapped immediately (if click is used then the window will only focus after mouse is up).
Add open and close window functions. You can open by clicking “PoseiOS” in the topbar, and close by clicking the “x” button.
Add left & right padding on top bar.
Fix text being highlighted when dragging windows by using user-select: none; cursor: grab;
I encountered a bug where u can drag window by selecting any part of it. I fixed this by changing the id to include “-handle” so that the javascript could recognize it (before the javascript was looking for “handle” instead of “-handle” which created the bug).
backdrop-blur andbackground-color: rgba(255, 255, 255, 0.1);
transform: translate(-50%, -50%);
I started off with some boilerplate code, creating and linking the HTML, CSS, and JS files.
I added some content on the webpage.
I added a background wallpaper for the WebOS.
I styled the site using CSS, but I haven’t added any Javascript yet.
I imported the Inter Font from Google fonts.
A new tag that I learned was using background-position in order to crop/position the background image so that it fit my preferences.