Skip to content

Commit

Permalink
fix: toggle launchpad via spotlight
Browse files Browse the repository at this point in the history
  • Loading branch information
Renovamen committed May 7, 2021
1 parent b682bda commit 0c831cd
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ My portfolio website simulating macOS's GUI: https://portfolio.zxh.io

Powered by [React](https://reactjs.org/) + [React Redux](https://react-redux.js.org/) + [tailwindcss](https://tailwindcss.com/).

![screenshot](./public/screenshots/screen.png)


 

Expand All @@ -28,6 +30,7 @@ yarn build
- [macOS Catalina](https://www.apple.com/bw/macos/catalina/)
- [macOS Icon Gallery](https://www.macosicongallery.com/)
- [sindresorhus/file-icon-cli](https://github.com/sindresorhus/file-icon-cli)
- [vivek9patel.github.io](https://github.com/vivek9patel/vivek9patel.github.io)


 
Expand Down
Binary file added public/screenshots/screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/components/Spotlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ export default class Spotlight extends Component {

launchCurApp = () => {
if (this.state.curDetails.type === "app" && !this.state.curDetails.link) {
this.props.openApp(this.state.curDetails.id);
const id = this.state.curDetails.id;
if (id === "launchpad") this.props.toggleLaunchpad(true);
else this.props.openApp(id);
this.props.toggleSpotlight();
} else {
window.open(this.state.curDetails.link);
Expand Down
2 changes: 1 addition & 1 deletion src/configs/bear.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const bear = [
title: "About Me",
file: "markdown/about-me.md",
icon: <GiNinjaHeroicStance />,
excerpt: "Hey there! I'm Xiaohan Zou, a dragon lost in human world..."
excerpt: "Hey there! I'm a dragon lost in human world..."
},
{
id: "github-stats",
Expand Down
22 changes: 21 additions & 1 deletion src/configs/terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const terminal = [
title: "interests.txt",
type: "file",
content:
"Continual Learning / Meta-Learning / Reinforcement Learning / Neutral Language Processing"
"Machine Learning / Deep Learning / Continual Learning / Meta-Learning / Reinforcement Learning / Neutral Language Processing"
},
{
id: "about-who-cares",
Expand Down Expand Up @@ -110,6 +110,26 @@ const terminal = [
)
}
]
},
{
id: "about-dream",
title: "my-dream.cpp",
type: "file",
content: (
<div className="py-1">
<div>
<span className="text-yellow-400">while</span>(
<span className="text-blue-400">sleeping</span>) <span>{"{"}</span>
</div>
<div>
<span className="text-blue-400 ml-9">money</span>
<span className="text-yellow-400">++</span>;
</div>
<div>
<span>{"}"}</span>
</div>
</div>
)
}
];

Expand Down
1 change: 1 addition & 0 deletions src/pages/Desktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ class Desktop extends Component {
{this.state.spotlight && (
<Spotlight
openApp={this.openApp}
toggleLaunchpad={this.toggleLaunchpad}
toggleSpotlight={this.toggleSpotlight}
btnRef={this.state.spotlightBtnRef}
/>
Expand Down
10 changes: 9 additions & 1 deletion src/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,15 @@ body:not(pre) {
}

.bear .markdown pre {
@apply mt-2;
@apply mt-2 text-sm;
}

.bear .markdown pre code {
@apply text-sm;
}

.dark .bear .markdown pre code {
font-size: 14px !important;
}

.bear .markdown pre div {
Expand Down

0 comments on commit 0c831cd

Please sign in to comment.