Skip to content

Commit

Permalink
feat(*): add basic setup for image, css and desktop module
Browse files Browse the repository at this point in the history
  • Loading branch information
mukuljainx committed Mar 17, 2021
1 parent 7047683 commit ad91dc1
Show file tree
Hide file tree
Showing 22 changed files with 427 additions and 19 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ dist

# TernJS port file
.tern-port

# Mac OS folder cache
.DS_Store
195 changes: 195 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,28 @@
"@types/jest": "^26.0.20",
"@types/react": "^17.0.3",
"@types/react-dom": "^17.0.2",
"@types/react-router-dom": "^5.1.7",
"babel-loader": "^8.2.2",
"clean-webpack-plugin": "^3.0.0",
"css-loader": "^5.1.2",
"cypress": "^6.6.0",
"file-loader": "^6.2.0",
"fork-ts-checker-webpack-plugin": "^6.1.1",
"html-webpack-plugin": "^5.3.1",
"jest": "^26.6.3",
"normalize.css": "^8.0.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-refresh": "^0.9.0",
"react-router-dom": "^5.2.0",
"sass": "^1.32.8",
"sass-loader": "^11.0.1",
"style-loader": "^2.0.0",
"ts-node": "^9.1.1",
"type-fest": "^0.21.3",
"typescript": "^4.2.3",
"uglifyjs-webpack-plugin": "^2.2.0",
"url-loader": "^4.1.1",
"webpack": "^5.25.0",
"webpack-bundle-analyzer": "^4.4.0",
"webpack-cli": "^4.5.0",
Expand Down
18 changes: 18 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as React from "react";
import { BrowserRouter as Router, Switch, Route } from "react-router-dom";
import "normalize.css";

import "theme/index.scss";
import Desktop from "desktop";

const App = () => {
return (
<Router>
<Switch>
<Route path="/" component={Desktop} />
</Switch>
</Router>
);
};

export default App;
6 changes: 6 additions & 0 deletions src/desktop/desktop.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.desktop{
height: 100%;
width: 100%;
// <a href='https://www.freepik.com/photos/abstract'>Abstract photo created by wirestock - www.freepik.com</a>
background-size: cover;
}
21 changes: 21 additions & 0 deletions src/desktop/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import * as React from "react";
import Icon from "icons";

import "./desktop.scss";

const Desktop = () => {
return (
<div
style={{
backgroundImage: `url(${
require("display/wallpaper/default.jpg").default
})`,
}}
className="desktop"
>
<Icon draggable name="folder" type="DESKTOP" label="Applications" />
</div>
);
};

export default Desktop;
Binary file added src/display/wallpaper/default.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/icons/.DS_Store
Binary file not shown.
Binary file added src/icons/assets/folder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions src/icons/icons.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.icon {
position: relative;
cursor: pointer;
z-index: 40;
}

.icon__label {
color: var(--icon-text-color);
text-shadow: 2px 2px var(--icon-text-shadow);
margin: 0;
}

.icon__image {
-webkit-user-drag: none;
}
Loading

0 comments on commit ad91dc1

Please sign in to comment.