Skip to content

Commit

Permalink
feat: Initial UI design
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeWasTakenn committed Dec 26, 2021
1 parent 5bbf30e commit de01f5d
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 83 deletions.
2 changes: 2 additions & 0 deletions src/ui/public/global.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import url('https://fonts.googleapis.com/css2?family=Inter&display=swap');

* {
margin: 0;
padding: 0;
Expand Down
4 changes: 2 additions & 2 deletions src/ui/src/App.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import VisibilityProvider from './providers/VisibilityProvider.svelte';
import HelloWorld from './components/HelloWorld.svelte';
import Main from './components/Main.svelte';
import { debugData } from './utils/debugData';
debugData([
Expand All @@ -13,6 +13,6 @@

<main>
<VisibilityProvider>
<HelloWorld />
<Main />
</VisibilityProvider>
</main>
81 changes: 0 additions & 81 deletions src/ui/src/components/HelloWorld.svelte

This file was deleted.

39 changes: 39 additions & 0 deletions src/ui/src/components/Main.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<script lang="ts">
import Resources from './resources/Resources.svelte';
</script>

<div class="container">
<Resources />
<div class="content-wrapper">
<div class="content-container">Some Data here</div>
</div>
</div>

<style>
.container {
width: 55%;
height: 65%;
background-color: rgb(44, 62, 80);
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border-radius: 0.25vh;
}
.content-wrapper {
margin-left: 18vh;
height: 100%;
display: grid;
place-items: center;
}
.content-container {
width: 80vh;
height: 55vh;
background-color: #34495e;
border-radius: 0.25vh;
color: white;
font-family: 'Inter', sans-serif;
}
</style>
45 changes: 45 additions & 0 deletions src/ui/src/components/resources/Resources.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<script>
const executingResources = ['luke_garages', 'ox_inventory', 'npwd'];
</script>

<div class="container">
{#each executingResources as resource}
<div class="resource-wrapper">
<div class="resource">
{resource}
</div>
</div>
{/each}
</div>

<style>
.container {
width: 18vh;
position: fixed;
left: 0;
top: 0;
background-color: #34495e;
height: 100%;
border-top-left-radius: 0.25vh;
border-bottom-left-radius: 0.25vh;
color: white;
font-family: 'Inter', sans-serif;
user-select: none;
}
.resource-wrapper {
padding: 1vh;
}
.resource {
font-family: 'Inter', sans-serif;
font-size: 2.2vh;
width: 100%;
height: 5%;
display: block;
}
.resource-wrapper:hover {
background-color: grey;
}
</style>

0 comments on commit de01f5d

Please sign in to comment.