Show HN: A portfolio website simulating macOS's GUI using React
portfolio.zxh.io
portfolio.zxh.io
Here's the link to website and Github:
Website: https://portfolio.zxh.io
Github: https://github.com/Renovamen/playground-macos
I appreciate any feedback or suggestions.
Source code here: https://github.com/conwnet/github1s
Discussed a while ago: https://news.ycombinator.com/item?id=26083919
I dont’t like frontend work, but that’s different from being bad at it. :)
What browser/hardware?
I started it about 10 days ago, but it's hard to calculate out the exact number of hours...
Then I was like: Cool, look how he got the nice Dock animation down, I bet it took him hours to sort that out.
And then I opened VS Code and I had to write to tell you how my mind was blown.
Kudos, senpai.
In late 90s, I got a gig in part by demo-ing my own personal MS Outlook emulator web front end (backed by ColdFusion POP3/SMTP calls). It was entertaining getting a 1996 browser to look and behave like Outlook — had to love frames and multipart server push.
Seeing Bear, Terminal, and VSCode here are all both delightful and impressive.
Typo feedback:
“In the last sever days, Safari has prevent 95 tracker from profiling you” —> “In the last several [seven?] days, Safari has prevented 95 trackers from profiling you”
It sounds amazing and quite hard to achieve that in 90s, awesome job!
I'll fix the typo later, thanks!
The mind-blown moment for me was when I typed `cat my-` into the terminal and hit Tab, and it actually tab-completed the filename :D Nice touch.
macOS’s resizing has some useful functionality here: dragging an edge resizes in that direction, double-clicking an edge maximizes in that direction (including diagonally) and option+any of these resizes the opposite side of the window as well. So, if you hold option and double-click a corner, it’ll do a Windows-style maximize.
I've used Linux command lines with more discoverability than that. Good to know if I ever need to use macOS, though, that's a nice trick.
Also, most of this sort of functionality is documented in the built-in help system accessible through the help menu.
I guess if I had been using it for twenty years I would've known about those old patterns you describe and would've thought to randomly try that key combination.
A tooltip at some point would've gone a long way. Pretty much an impossible feature to discover unless you're a toddler randomly pressing buttons or a greybeard that remembers OS 9
So it is indeed broken. The fact that it's not humanly possible to fullscreen Safari without Spectacle/Rectangle clearly means it's broken, whether it's what th ey wanted or not.
And, as I've pointed out, both behaviors are possible on macOS out of the box.
Why? This makes absolutely no sense. It's the same thing as macOS' windows not closing when you close them. It's stupid. They should copy Windows on what makes sense.
macOS' windows not closing when you close them
Windows’ apps closing when you close their windows is no less absurd. The same for forcing you to either save or discard documents on quit/reboot.
???
So run them in full-screen mode. No one is stopping you.
I hardly ever run into a program on macOS that doesn't support full-screen. View → Enter Full Screen, or Control+Option+F.
I don’t understand the fascination with maximising windows, especially web browsers. What the hell is the point of filling my screen with the window when, for the vast majority of websites, half or more of it is gonna be empty margin?
You're just used to other platforms.
On the surface, it may seem as if we’ve reached a common interface for mainstream desktop OSs, that one could use Windows and macOS interchangeably.
But there are still fundamental concepts that are unique to the Mac that always trip Windows users, namely, apps that keep running after all windows are closed and maximize vs full screen.
There’s obviously a common ground that has evolved over the years, but you must understand the platform in order to appreciate its subtleties or you’re bound to be frustrated.
But I’m far from a fan.
A lot of just plain silly defaults and UX weirdness gets attributed to some massive usability genius, but near a I can tell (from using all the platforms), it’s just designers making what could be straightforward functionality overly hidden or obtuse because of UX purity and insider cachet with power users or whatever - ending up with changes/behavior for everyone that is surprising and ends up getting in the way for people.
I have actual work to do, I don’t want to have to learn yet another secret handshake gesture in this version of MacOS or turn off new settings to stop it from screen locking me if I accidentally bump my mouse over.
Example - this thread and others like it, or the massive numbers of bug reports and forum complaints on the hot corner screen lock functionality when it came out. and now windows is copying it, yuck.
I've been a daily macOS user for 2 years. Window management on Windows still makes more sense.
Apple MacBook Pro lasts 135 minutes longer on battery in full screen mode https://news.ycombinator.com/item?id=14947703
Apple MacBook Pro 15: How to get 2 more hours of battery life with this simple trick https://www.notebookcheck.net/Apple-MacBook-Pro-lasts-135-mi...
Why do Macs have a longer battery life when in full screen mode? https://www.quora.com/Why-do-Macs-have-a-longer-battery-life...
Here's a quick demo[3] of what this looks like on my machine.
[1] https://brettterpstra.com/2017/06/15/a-hyper-key-with-karabi...
[2] https://manytricks.com/moom/
[3] https://my.supernotes.app/share/wire+unaware+noble+meadow
You get keyboard shortcuts for tiling things and can drag/snap to edges of the screen.
Edit: It's possible to bypass the recursion limit. First open the "Blog" bookmark on the Safari start page. Use Inspect Element on the "portfolio" link at the top right, and remove
target="_blank"
from the HTML. Open the portfolio and enjoy infinite recursion.In the second recursion step, when entering the URL manually, the tab remains blank. If I instead try to click on the unedited "portfolio" link, the site opens in a new (native) tab.
Happens on Safari and Firefox (macOS) as well as Chromium (Debian).
Relevant: https://www.bryanbraun.com/2021/03/24/infinitely-nested-ifra...
Haven't had my Saturday-morning coffee yet, but I think the realism and attention to detail are really impressive. (Check out the Terminal app if you haven't.)
Indeed. I typed "rm -rf /" into the "terminal" in the web browser, and it cost me quite some nerve to actually hit Enter.
Also, if you want to see a portfolio simulating Deepin (a Linux distribution) developed with Vue, check this:
zou@macbook-pro ~ > cat my-dream.cpp
while(sleeping) {
money++;
}It's so convincing that, on an iPhone, I went to one of the applications with camera, got a camera permission dialog, assumed it was part of the mocked up UI and clicked through... then was a bit surprised to see that it was actually using my camera feed!
The UI was of course the actual iOS safari permission dialog :-)
I'd never consciously noticed that aspect of macos before, but this small detail instantly threw the window border into uncanny territory for me. I had to zoom in on both sites to spot what was going on!
I was able to play the alpha of my game in the embedded Safari! https://i.imgur.com/PWCYEZP.png
Really interesting how iframes are an underused tool.
For those who are interested to see the source: https://github.com/Renovamen/playground-macos/blob/main/src/...
and a performance profile shows absolutely insane JS overhead (in React) when simply dragging a window. compare this to something like https://nextapps-de.github.io/winbox/, and you start to wonder if "the React way" is really best-suited for everything that people use it for.
It really looks like MacOS (I made the same mistake as @chrismorgan in another comment) and accidentally closed the tab with ⌘-w). The attention to detail, the easter eggs—I really have no words but to say, great work! Wow.
Oh and I found a typo in Safari:
> In the last sever days, Safari has prevent 66 tracker from profiling you.
I'm assuming that should be seven.
Not really an exact portfolio, but it leads to my twitter and gets me tons of followers, and leads them to my personal site, so IG it counts
Overall this portfolio was really well done!
This is a really cool website! Well done.
Any way, this project is just for fun and I never expected to find a job through this. Thank you for liking it!
You could get the display brightness working too - just change the opacity of the page (with a black background).
But yea you are correct, this person would have no trouble getting hired.
Great portfolio!