add asset page and its components #3

Merged
selina.mail merged 2 commits from assetPage into main 2023-11-15 08:22:22 +00:00
5 changed files with 278 additions and 1 deletions

View File

@ -0,0 +1,71 @@
<template>
<section class="client-search">
<div class="label">Client</div>
<pre class="data">...</pre>
</section>
</template>
<script>
export default {
name: "ClientSearch",
};
</script>
<style scoped>
.client-search {
display: flex;
align-items: center;
padding: 0.625em 1.875em;
gap: 1.25em;
width: 30.125em;
height: 3.125em;
background: #2C2C2C;
box-shadow: 0.25em 0.25em 0.25em rgba(0, 0, 0, 0.25);
border-radius: 0.625em;
}
.label {
width: 2.5625em;
height: 1.875em;
font-family: "Overpass";
font-style: normal;
font-weight: 400;
font-size: 0.875em;
line-height: 1.875;
letter-spacing: 0.05em;
color: #FFFFFF;
}
/* flex: 0;
height: 1.875em; */
/* min-width: 1.875em;
width: fit-content;
overflow: hidden; */
.data {
display: flex;
flex-direction: row;
align-items: flex-start;
padding: 0 0.625rem;
border-radius: 0.3125rem;
box-shadow: 0.0625rem 0.0625rem 0.25rem 0rem rgba(0, 0, 0, 0.25) inset;
background-color: #212121;
color: #fff;
letter-spacing: 5%;
font: 400 0.75rem/250% Overpass, sans-serif;
/* gap: 0.625em;
flex: 0; */
}
.input input {
flex: 1;
width: 100%;
height: 100%;
border: none;
background: transparent;
color: #FFFFFF;
}
</style>

View File

@ -0,0 +1,123 @@
<template>
<div class="data">
<div class="label">Last viewed:</div>
<table class="data-table" id="client-table">
<tr class="table-row" id="table-head">
<th class="Client">Client</th>
<th class="Name">Name</th>
<th class="Type">Type</th>
<th class="State">State</th>
<th class="User">User</th>
</tr>
<tr class="table-row" id="row-1">
<td class="Client">...</td>
<td class="Name">...</td>
<td class="Type">...</td>
<td class="State">...</td>
<td class="User">...</td>
</tr>
</table>
</div>
</template>
<script>
export default {
name: "AssetTable",
}
</script>
<style scoped>
.data {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
align-self: stretch;
width: 100%;
padding: 1.25rem 1.875rem;
gap: 1.25rem;
border-radius: 0.625rem;
box-shadow: 0.25rem 0.25rem 0.25rem 0rem rgba(0, 0, 0, 0.25);
background-color: #2c2c2c;
}
.data-table {
width: 100%;
padding: 0 0.625rem;
table-layout: fixed;
border-collapse: collapse;
}
.table-row {
display: flex;
flex-direction: row;
align-items: center;
height: 3.125rem;
padding: 0.625rem;
gap: 0.625rem;
border-top: 0.0625rem solid #000000;
}
#table-head {
border-top: none;
border-bottom: 0.0625rem solid #000000;
}
th,
td {
height: 1.875rem;
text-align: left;
padding: 0;
color: #ffffff;
letter-spacing: 5%;
font: 400 0.875rem/1.875rem Overpass, sans-serif;
}
th {
font: 700 0.875rem/1.875rem Overpass, sans-serif;
}
.Client {
width: 33.3%;
border-right: 0.0625rem solid #000000;
}
.Name {
width: 33.3%;
border-right: 0.0625rem solid #000000;
}
.Type {
width: 12.7%;
border-right: 0.0625rem solid #000000;
}
.State {
width: 12.7%;
border-right: 0.0625rem solid #000000;
}
.User {
width: 8%;
}
.label {
width: 6.0625em;
height: 1.875em;
font-family: 'Overpass';
font-style: normal;
font-weight: 400;
font-size: 1em;
line-height: 1.875em;
letter-spacing: 0.05em;
color: #FFFFFF;
}
</style>

View File

@ -30,7 +30,7 @@
</div> </div>
<span v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Checklists</span> <span v-if="isExpanded" :class="['label', darkMode ? 'label-darkmode' : 'label-lightmode']">Checklists</span>
</router-link> </router-link>
<router-link to="/home" class="button" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="assets-button"> <router-link to="/assets" class="button" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']" id="assets-button">
<div class="icon" id="assets-icon"> <div class="icon" id="assets-icon">
<img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy" <img :class="[darkMode ? 'img-darkmode' : 'img-lightmode']" loading="lazy"
src="../icons/navbar-icons/Assets-Icon.svg" /> src="../icons/navbar-icons/Assets-Icon.svg" />

78
pages/assets.vue Normal file
View File

@ -0,0 +1,78 @@
<template>
<section id="content">
<div id="content-header">
<h1 id="page-name">Assets</h1>
</div>
<div id="content-body">
<ClientSearch />
<AssetTable />
</div>
</section>
</template>
<script setup>
definePageMeta({
layout: 'default'
})
</script>
<script>
import ClientSearch from "../components/ClientSearch.vue";
import AssetTable from "../components/server/AssetTable.vue";
export default {
name: "AssetPage",
components: {
ClientSearch,
AssetTable,
}
}
</script>
<style scoped>
* {
box-sizing: border-box;
}
#content {
display: flex;
flex-direction: column;
float: left;
justify-content: stretch;
align-items: stretch;
width: 100%;
flex-grow: 1;
gap: 0.625rem;
padding: 0 1.25rem;
}
#content-header {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
width: 100%;
height: 3.125rem;
}
#page-name {
color: #fff;
letter-spacing: 5%;
font: 400 1.5rem/125% Overpass, -apple-system, Roboto, Helvetica,
sans-serif;
}
#content-body {
display: flex;
flex-direction: column;
width: 100%;
gap: 1.25rem;
margin-bottom: 0.625rem;
border-radius: 0.625rem;
}
</style>

View File

@ -2,6 +2,7 @@ import { createRouter, createWebHistory } from 'vue-router';
import HomePage from '../pages/home.vue'; import HomePage from '../pages/home.vue';
import ClientsPage from '../pages/clients.vue'; import ClientsPage from '../pages/clients.vue';
import LoginPage from '../pages/login.vue'; import LoginPage from '../pages/login.vue';
import AssetPage from '../pages/assets.vue'
const router = createRouter({ const router = createRouter({
@ -15,6 +16,10 @@ const router = createRouter({
path: '/home', path: '/home',
component: HomePage component: HomePage
}, },
{
path: '/assets',
component: AssetPage
},
{ {
path: '/clients', path: '/clients',
component: ClientsPage component: ClientsPage