[go: nahoru, domu]

Skip to content

Commit

Permalink
feat: create base ui
Browse files Browse the repository at this point in the history
  • Loading branch information
iGoodie committed Sep 18, 2022
1 parent f028d19 commit e033b3b
Show file tree
Hide file tree
Showing 10 changed files with 456 additions and 154 deletions.
332 changes: 332 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@
"tauri": "tauri"
},
"dependencies": {
"@tauri-apps/api": "^1.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"@tauri-apps/api": "^1.1.0"
"react-dom": "^18.2.0"
},
"devDependencies": {
"@tauri-apps/cli": "^1.1.0",
"@types/node": "^18.7.10",
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6",
"@vitejs/plugin-react": "^2.0.0",
"sass": "^1.54.9",
"typescript": "^4.6.4",
"vite": "^3.0.2",
"@tauri-apps/cli": "^1.1.0"
"vite": "^3.0.2"
}
}
7 changes: 0 additions & 7 deletions src/App.css

This file was deleted.

49 changes: 9 additions & 40 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,48 +1,17 @@
import { useState } from "react";
import reactLogo from "./assets/react.svg";
import * as TauriAPI from "@tauri-apps/api/tauri";
import "./App.css";
import UpdateIcon from "@/assets/icons/update.svg";
import "@/style/main.scss";

function App() {
const [greetMsg, setGreetMsg] = useState("");
const [name, setName] = useState("");

async function greet() {
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
setGreetMsg(await TauriAPI.invoke("greet", { name }));
}

return (
<div className="container">
<h1>Welcome to Tauri!</h1>

<div className="row">
<a href="https://vitejs.dev" target="_blank">
<img src="/vite.svg" className="logo vite" alt="Vite logo" />
</a>
<a href="https://tauri.app" target="_blank">
<img src="/tauri.svg" className="logo tauri" alt="Tauri logo" />
</a>
<a href="https://reactjs.org" target="_blank">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
</div>

<p>Click on the Tauri, Vite, and React logos to learn more.</p>

<div className="row">
<div>
<input
id="greet-input"
onChange={(e) => setName(e.currentTarget.value)}
placeholder="Enter a name..."
/>
<button type="button" onClick={() => greet()}>
Greet
</button>
<div id="app">
<div className="page">
<div className="app-title">
<img src={UpdateIcon} height={40} />
<h1>Arcdps Updater</h1>
<span className="divider" />
<h2>For DX11 Update</h2>
</div>
</div>
<p>{greetMsg}</p>
</div>
);
}
Expand Down
1 change: 1 addition & 0 deletions src/assets/icons/update.svg
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/assets/wvw-bg.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
import "./style.css";
import "@/utils/appdata.util.ts";

const rootElement = document.getElementById("root") as HTMLElement;
Expand Down
102 changes: 0 additions & 102 deletions src/style.css

This file was deleted.

61 changes: 61 additions & 0 deletions src/style/main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
@import "vendor/reset";

#app {
position: relative;
width: 100vw;
height: 100vh;
background: #443146;

&::before {
content: "";
position: absolute;
width: 100%;
height: 100%;
opacity: 0.1;
background: url("../assets/wvw-bg.jpeg");
background-size: cover;
background-repeat: no-repeat;
background-position: -120px;
filter: blur(5px);
}
}

.page {
display: flex;
justify-content: center;
padding: 50px;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
color: #fff;
font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
"Lucida Sans Unicode", Geneva, Verdana, sans-serif;
font-weight: 600;
font-size: 25px;
}

.app-title {
display: flex;
align-items: center;
gap: 10px;

& > h1 {
}

& > .divider {
width: 1px;
height: 100%;
border-right: 1px solid rgb(117, 117, 117);
}

& > h2 {
font-size: 15px;
color: rgb(216, 216, 216);
}
}
48 changes: 48 additions & 0 deletions src/style/vendor/_reset.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}

0 comments on commit e033b3b

Please sign in to comment.