lots of styling
This commit is contained in:
parent
f80df70d67
commit
ea8f347085
51
benchtop-fe/src/buttons.css
Normal file
51
benchtop-fe/src/buttons.css
Normal file
@ -0,0 +1,51 @@
|
||||
/* CSS */
|
||||
.custom-button {
|
||||
align-items: center;
|
||||
appearance: none;
|
||||
background-color: #FCFCFD;
|
||||
border-radius: 4px;
|
||||
border-width: 0;
|
||||
box-shadow: rgba(45, 35, 66, 0.4) 0 2px 4px,rgba(45, 35, 66, 0.3) 0 7px 13px -3px,#D6D6E7 0 -3px 0 inset;
|
||||
box-sizing: border-box;
|
||||
color: #36395A;
|
||||
cursor: pointer;
|
||||
display: inline-flex;
|
||||
font-family: "JetBrains Mono",monospace;
|
||||
height: 48px;
|
||||
justify-content: center;
|
||||
line-height: 1;
|
||||
list-style: none;
|
||||
overflow: hidden;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
position: relative;
|
||||
text-align: left;
|
||||
text-decoration: none;
|
||||
transition: box-shadow .15s,transform .15s;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
touch-action: manipulation;
|
||||
white-space: nowrap;
|
||||
will-change: box-shadow,transform;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.custom-button:focus {
|
||||
box-shadow: #D6D6E7 0 0 0 1.5px inset, rgba(45, 35, 66, 0.4) 0 2px 4px, rgba(45, 35, 66, 0.3) 0 7px 13px -3px, #D6D6E7 0 -3px 0 inset;
|
||||
}
|
||||
|
||||
.custom-button:hover {
|
||||
box-shadow: rgba(45, 35, 66, 0.4) 0 4px 8px, rgba(45, 35, 66, 0.3) 0 7px 13px -3px, #D6D6E7 0 -3px 0 inset;
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.custom-button:active {
|
||||
box-shadow: #D6D6E7 0 3px 7px inset;
|
||||
transform: translateY(2px);
|
||||
}
|
||||
.custom-button.red {
|
||||
height: 32px;
|
||||
background-color: #f00;
|
||||
box-shadow: rgba(45, 35, 66, 0.4) 0 2px 4px,rgba(45, 35, 66, 0.3) 0 7px 13px -3px,#fdd 0 -3px 0 inset;
|
||||
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="card-header">
|
||||
Primary Cal Device
|
||||
<button @click="showNewCalibrationClick">New</button>
|
||||
<button class="custom-button" role="button" @click="showNewCalibrationClick">+ New</button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table">
|
||||
@ -21,6 +21,11 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="summary">
|
||||
<p>Enter a serial number to search for an existing <br/>
|
||||
Primary Calibration Device, or press New to log a new device.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<td colspan="2">
|
||||
<h3>Calibration Date</h3>
|
||||
<VueDatePicker
|
||||
v-model="date"
|
||||
@ -13,7 +13,9 @@
|
||||
:flow="flow"
|
||||
></VueDatePicker>
|
||||
</td>
|
||||
<td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<h3>Calibration Due Date</h3>
|
||||
<VueDatePicker
|
||||
v-model="due_date"
|
||||
|
@ -13,7 +13,13 @@
|
||||
<tr>
|
||||
<td>On Site Calibration</td>
|
||||
<td>
|
||||
<div class="checkbox-wrapper-55">
|
||||
<label class="rocker rocker-small">
|
||||
<input type="checkbox" name="onsite_cal" v-model="onsite_cal" id="id_onsite_cal">
|
||||
<span class="switch-left">Yes</span>
|
||||
<span class="switch-right">No</span>
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="card-header">
|
||||
Instrument
|
||||
<button @click="showNewInstrumentClick">New</button>
|
||||
<button class="custom-button" role="button" @click="showNewInstrumentClick">+ New</button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table">
|
||||
@ -21,6 +21,11 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="summary">
|
||||
<p>Enter a serial number to search for an existing <br/>
|
||||
Primary Calibration Device, or press New to log a new device.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
|
@ -4,23 +4,29 @@
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<td colspan="2">
|
||||
<h3>Calibration Date</h3>
|
||||
<div class="date-picker">
|
||||
<VueDatePicker
|
||||
v-model="date"
|
||||
inline
|
||||
auto-apply
|
||||
:flow="flow"
|
||||
></VueDatePicker>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<h3>Calibration Due Date</h3>
|
||||
<div class="date-picker">
|
||||
<VueDatePicker
|
||||
v-model="due_date"
|
||||
inline
|
||||
auto-apply
|
||||
:flow="flow"
|
||||
></VueDatePicker>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -98,15 +104,14 @@ import { ref, defineEmits, watchEffect } from "vue";
|
||||
import VueDatePicker from "@vuepic/vue-datepicker";
|
||||
import "@vuepic/vue-datepicker/dist/main.css";
|
||||
|
||||
const
|
||||
channel = ref(""),
|
||||
const channel = ref(""),
|
||||
serial_number = ref(""),
|
||||
model = ref(""),
|
||||
transducer_model = ref(""),
|
||||
transducer_span = ref(""),
|
||||
due_date = ref(""),
|
||||
date = ref(""),
|
||||
flow = ["year", "month", "calendar"]
|
||||
flow = ["year", "month", "calendar"];
|
||||
|
||||
const emit = defineEmits();
|
||||
watchEffect(() => {
|
||||
|
@ -1,14 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="container">
|
||||
<div class="item card">
|
||||
<UploadForm @uploadForm="uploadForm" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="item card">
|
||||
<CustomerForm @customerForm="customerForm" />
|
||||
</div>
|
||||
|
||||
<div class="item card">
|
||||
<EnvironmentForm @environmentForm="environmentForm" />
|
||||
</div>
|
||||
@ -24,6 +23,8 @@
|
||||
@newInstrumentForm="newInstrumentForm"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="item card">
|
||||
<CalibrationDeviceForm
|
||||
v-if="!show_new_calibration"
|
||||
|
@ -4,8 +4,7 @@ d ..<template>
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Report Type</td>
|
||||
<td>
|
||||
<td>Report Type
|
||||
<select
|
||||
name="report_type"
|
||||
v-model="report_type"
|
||||
@ -18,16 +17,19 @@ d ..<template>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr v-if="showUpload">
|
||||
<td>
|
||||
<button class="button" @click="openFileInput" v-if="showUpload">
|
||||
Select File
|
||||
<button class="custom-button" @click="openFileInput" v-if="showUpload">
|
||||
Select First File
|
||||
</button>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="files.length > 0">
|
||||
<td>
|
||||
<ul>
|
||||
<li v-for="(file, index) in files" :key="index">
|
||||
<button @click="removeUpload(index)">x</button>
|
||||
<li v-for="(file, index) in files" :key="index" class="file-list">
|
||||
<button class="custom-button red" @click="removeUpload(index)">x</button>
|
||||
{{ file.name }}
|
||||
<label>
|
||||
<input
|
||||
@ -59,22 +61,21 @@ d ..<template>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input class="custom-button" type="submit" value="Generate PDF and Label" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<input
|
||||
ref="doc"
|
||||
type="file"
|
||||
style="display: none"
|
||||
@change="readFile($event)"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align="right">
|
||||
<input type="submit" value="Generate PDF and Label" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -88,7 +89,8 @@ const report_type = ref(""),
|
||||
|
||||
const showUpload = computed({
|
||||
get() {
|
||||
if (files.length > 2) {
|
||||
console.log(files.value.length)
|
||||
if (files.value.length >= 2) {
|
||||
return false;
|
||||
}
|
||||
if (files.value.length > 0 && files.value[0].kind == "both") {
|
||||
|
@ -1,5 +1,7 @@
|
||||
import { createApp } from 'vue'
|
||||
import './reset.css'
|
||||
import './buttons.css'
|
||||
import './radio.css'
|
||||
import './style.css'
|
||||
import App from './App.vue'
|
||||
|
||||
|
145
benchtop-fe/src/radio.css
Normal file
145
benchtop-fe/src/radio.css
Normal file
@ -0,0 +1,145 @@
|
||||
/* https://getcssscan.com/css-checkboxes-examples */
|
||||
.checkbox-wrapper-55 input[type="checkbox"] {
|
||||
visibility: hidden;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.checkbox-wrapper-55 *,
|
||||
.checkbox-wrapper-55 ::after,
|
||||
.checkbox-wrapper-55 ::before {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.checkbox-wrapper-55 .rocker {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
/*
|
||||
SIZE OF SWITCH
|
||||
==============
|
||||
All sizes are in em - therefore
|
||||
changing the font-size here
|
||||
will change the size of the switch.
|
||||
See .rocker-small below as example.
|
||||
*/
|
||||
font-size: 2em;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
color: #888;
|
||||
width: 7em;
|
||||
height: 4em;
|
||||
overflow: hidden;
|
||||
border-bottom: 0.5em solid #a1cbfa;
|
||||
}
|
||||
|
||||
.checkbox-wrapper-55 .rocker-small {
|
||||
font-size: 0.75em;
|
||||
}
|
||||
|
||||
.checkbox-wrapper-55 .rocker::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0.5em;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #999;
|
||||
border: 0.5em solid #a1cbfa;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.checkbox-wrapper-55 .switch-left,
|
||||
.checkbox-wrapper-55 .switch-right {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 2.5em;
|
||||
width: 3em;
|
||||
transition: 0.2s;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.checkbox-wrapper-55 .switch-left {
|
||||
height: 2.4em;
|
||||
width: 2.75em;
|
||||
left: 0.85em;
|
||||
bottom: 0.4em;
|
||||
background-color: #ddd;
|
||||
transform: rotate(15deg) skewX(15deg);
|
||||
}
|
||||
|
||||
.checkbox-wrapper-55 .switch-right {
|
||||
right: 0.5em;
|
||||
bottom: 0;
|
||||
background-color: #bd5757;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.checkbox-wrapper-55 .switch-left::before,
|
||||
.checkbox-wrapper-55 .switch-right::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 0.4em;
|
||||
height: 2.45em;
|
||||
bottom: -0.45em;
|
||||
background-color: #ccc;
|
||||
transform: skewY(-65deg);
|
||||
}
|
||||
|
||||
.checkbox-wrapper-55 .switch-left::before {
|
||||
left: -0.4em;
|
||||
}
|
||||
|
||||
.checkbox-wrapper-55 .switch-right::before {
|
||||
right: -0.375em;
|
||||
background-color: transparent;
|
||||
transform: skewY(65deg);
|
||||
}
|
||||
|
||||
.checkbox-wrapper-55 input:checked + .switch-left {
|
||||
background-color: #0084d0;
|
||||
color: #fff;
|
||||
bottom: 0px;
|
||||
left: 0.5em;
|
||||
height: 2.5em;
|
||||
width: 3em;
|
||||
transform: rotate(0deg) skewX(0deg);
|
||||
}
|
||||
|
||||
.checkbox-wrapper-55 input:checked + .switch-left::before {
|
||||
background-color: transparent;
|
||||
width: 3.0833em;
|
||||
}
|
||||
|
||||
.checkbox-wrapper-55 input:checked + .switch-left + .switch-right {
|
||||
background-color: #ddd;
|
||||
color: #888;
|
||||
bottom: 0.4em;
|
||||
right: 0.8em;
|
||||
height: 2.4em;
|
||||
width: 2.75em;
|
||||
transform: rotate(-15deg) skewX(-15deg);
|
||||
}
|
||||
|
||||
.checkbox-wrapper-55 input:checked + .switch-left + .switch-right::before {
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
/* Keyboard Users */
|
||||
.checkbox-wrapper-55 input:focus + .switch-left {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.checkbox-wrapper-55 input:checked:focus + .switch-left {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.checkbox-wrapper-55 input:focus + .switch-left + .switch-right {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.checkbox-wrapper-55 input:checked:focus + .switch-left + .switch-right {
|
||||
color: #333;
|
||||
}
|
@ -20,7 +20,7 @@ body {
|
||||
align-content: space-between;
|
||||
/* Your container needs a fixed height, and it
|
||||
* needs to be taller than your tallest column. */
|
||||
height: 1200px;
|
||||
height: 1800px;
|
||||
|
||||
border-radius: 3px;
|
||||
counter-reset: items;
|
||||
@ -30,6 +30,7 @@ body {
|
||||
.item {
|
||||
/* Optional */
|
||||
position: relative;
|
||||
margin: 0.25rem;
|
||||
margin-bottom: 2%;
|
||||
border-radius: 3px;
|
||||
background-color: #a1cbfa;
|
||||
@ -39,16 +40,18 @@ body {
|
||||
0 8px 8px rgba(0,90,250,0.05),
|
||||
0 16px 16px rgba(0,90,250,0.05);
|
||||
color: #fff;
|
||||
/* padding: 15px; */
|
||||
box-sizing: border-box;
|
||||
min-width:466px;
|
||||
min-height:325px;
|
||||
}
|
||||
.item::before {
|
||||
counter-increment: items;
|
||||
}
|
||||
|
||||
/* Re-order items into 3 rows */
|
||||
.item:nth-child(2n+1) { order: 1; }
|
||||
.item:nth-child(2n) { order: 2; }
|
||||
.item:nth-child(3n+1) { order: 1; }
|
||||
.item:nth-child(3n+2) { order: 2; }
|
||||
.item:nth-child(3n) { order: 3; }
|
||||
|
||||
/* Force new columns */
|
||||
.container::before,
|
||||
@ -58,6 +61,32 @@ body {
|
||||
width: 0;
|
||||
order: 2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
h3 {
|
||||
text-align: center;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.file-list {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.summary {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.date-picker {
|
||||
width:100%;
|
||||
margin:0 auto;
|
||||
}
|
||||
|
||||
.dp__flex_display {
|
||||
display:block ! important;
|
||||
}
|
Loading…
Reference in New Issue
Block a user