Mockup UI for dataset editor

This commit is contained in:
Chris Bell 2025-07-02 13:39:32 -05:00
parent 4cd56673db
commit 4cbaa4f07f
7 changed files with 339 additions and 3 deletions

View File

@ -10,7 +10,7 @@
display: flex;
flex: 1;
padding: 1.5rem;
align-items: center;
align-items: stretch;
text-align: center;
flex-direction: column;
}

View File

@ -25,7 +25,6 @@
text-decoration: none;
color: var(--text-color);
margin: 0.2rem 0;
width: 100%;
}
#navbar ::deep .nav-icon {

View File

@ -0,0 +1,327 @@
<div class="dataset-editor-container">
<div class="panel">
<h2>Dataset Editor</h2>
<hr/>
<h3>Info</h3>
<form>
<label for="name">Name</label>
<input type="text" id="name" name="name" placeholder="Dataset Name"/>
<label for="type">Type</label>
<input type="text" id="type" name="type" placeholder="Dataset Type"/>
<label for="version">Version</label>
<input type="text" id="version" name="version" placeholder="Version 1.0.0"/>
<label for="description">Description</label>
<textarea id="description" name="description" placeholder="A brief description of the dataset..."></textarea>
</form>
<hr class="section-divider"/>
<h3>Sections</h3>
@* A single section for demonstration *@
<div class="section-panel">
<div class="section-header">
<input type="text" placeholder="Section Name"/>
<button class="button-icon-only danger">
<img src="res/icons/outline/general/trash-bin.svg" class="button-icon"/>
</button>
</div>
<h4>Entries</h4>
<div class="entry-panel">
<div class="entry-header">
<input type="text" placeholder="Entry Name"/>
<button class="button-icon-only danger">
<img src="res/icons/outline/general/trash-bin.svg" class="button-icon"/>
</button>
</div>
<div class="field-panel">
<input type="text" placeholder="Field Name"/>
<select>
<option value="" disabled selected>Field Type</option>
<option value="text">Text</option>
<option value="text-field">Multi-Line Text</option>
<option value="number">Number</option>
<option value="calculated">Formula</option>
<option value="boolean">Boolean</option>
<option value="entry-reference">Entry Reference</option>
<option value="entry-reference-multi">Multi Entry Reference</option>
<option value="system">System</option>
</select>
<input type="text" placeholder="Field Value"/>
<button class="button-icon-only danger">
<img src="res/icons/outline/general/trash-bin.svg" class="button-icon"/>
</button>
</div>
@* New Fields would be added here *@
<button class="button-secondary add-button">
<img src="res/icons/outline/general/plus.svg" class="button-icon"/>
<span>Add Field</span>
</button>
</div>
@* New Entries would be added here *@
<button class="button-main add-button">
<img src="res/icons/outline/general/plus.svg" class="button-icon"/>
<span>Add Entry</span>
</button>
</div>
@* New Sections would be added here *@
<button class="button-secondary add-button-section">
<img src="res/icons/outline/general/plus.svg" class="button-icon"/>
<span>Add Section</span>
</button>
</div>
</div>
<style>
/* * ================================================
* Color & Font Variables
* ================================================
*/
.dataset-editor-container {
padding: 2rem;
background-color: var(--background-color);
align-self: stretch;
}
.panel {
background-color: var(--secondary-color);
padding: 2rem;
border-radius: 8px;
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
border: 1px solid var(--primary-color-light);
}
/* * ================================================
* Typography & Dividers
* ================================================
*/
h2, h3, h4 {
text-align: center;
color: var(--heading-color);
font-weight: 600;
margin-bottom: 1.5rem;
}
h2 {
font-size: 2rem;
}
h3 {
font-size: 1.5rem;
width: 40%;
margin: 1.5rem auto;
border-bottom: 1px solid var(--accent-color);
padding-bottom: 0.5rem;
}
h4 {
font-size: 1.2rem;
color: var(--neutral-light);
margin-top: 1.5rem;
margin-bottom: 1rem;
}
hr {
border: none;
height: 1px;
background-color: var(--neutral-dark);
margin: 2rem 0;
}
hr.section-divider {
margin: 3rem auto;
width: 80%;
}
/* * ================================================
* Form & Input Styles
* ================================================
*/
form {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
label {
color: var(--neutral-light);
font-weight: 500;
margin-bottom: -0.25rem;
margin-left: 0.25rem;
}
input[type="text"], textarea, select {
width: 100%;
padding: 12px;
border: 2px solid var(--primary-color);
border-radius: 6px;
background-color: var(--form-background);
color: var(--text-color);
font-size: 1rem;
transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
-webkit-appearance: none; /* Removes default OS styling */
-moz-appearance: none;
appearance: none;
}
/* Add custom dropdown arrow */
select {
background-image: url('res/icons/outline/arrows/chevron-down.svg');
background-repeat: no-repeat;
background-position: right 1rem center;
background-size: 1em;
fill: white;
}
/* Style for the placeholder option */
select:invalid {
color: var(--neutral-medium);
}
option {
background-color: var(--secondary-color);
color: var(--text-color);
}
input[type="text"]:focus, textarea:focus, select:focus {
outline: none;
border-color: var(--accent-color);
box-shadow: 0 0 0 3px rgba(91, 137, 179, 0.3);
}
input::placeholder, textarea::placeholder {
color: var(--neutral-medium);
}
textarea {
min-height: 120px;
resize: vertical;
}
/* * ================================================
* Panel & Header Styles
* ================================================
*/
.section-panel, .entry-panel, .field-panel {
padding: 1.5rem;
border-radius: 6px;
margin: 1rem auto;
max-width: 90%;
}
.section-panel {
background-color: var(--primary-color);
border: 1px solid var(--primary-color-light);
}
.entry-panel {
background-color: var(--secondary-color);
border: 1px solid var(--primary-color);
}
.field-panel {
background-color: var(--neutral-dark);
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 1rem;
}
.section-header, .entry-header {
display: flex;
align-items: center;
gap: 1rem;
margin-bottom: 1rem;
}
.section-header input, .entry-header input {
flex-grow: 1;
font-size: 1.2em;
font-weight: 500;
}
.field-panel > input, .field-panel > select {
flex: 1;
min-width: 150px;
}
/* * ================================================
* Button Styles
* ================================================
*/
.button-icon {
filter: invert(1);
width: 16px;
height: 16px;
}
.button-main, .button-secondary {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.75rem;
font-size: 1rem;
font-weight: 600;
padding: 0.75rem 1.5rem;
border-radius: 6px;
border: 2px solid transparent;
cursor: pointer;
text-decoration: none;
transition: all 0.2s ease;
}
.button-main {
background-color: var(--accent-color);
color: var(--button-text);
}
.button-main:hover {
background-color: #73a2c9; /* Lighter accent */
box-shadow: 0 4px 15px rgba(91, 137, 179, 0.2);
}
.button-secondary {
background: none;
border: 2px solid var(--primary-color-light);
color: var(--neutral-light);
}
.button-secondary:hover {
background-color: var(--primary-color);
color: var(--text-color);
border-color: var(--accent-color);
}
.add-button {
width: 100%;
margin-top: 1rem;
}
.add-button-section {
width: 100%;
margin-top: 2rem;
padding: 1rem;
}
.button-icon-only {
background: none;
border: none;
padding: 0.5rem;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.2s ease;
}
.button-icon-only.danger:hover {
background-color: var(--danger-color);
}
</style>

View File

@ -0,0 +1,7 @@
using Microsoft.AspNetCore.Components;
namespace SessionZero.Pages.Library.Datasets;
public partial class DatasetEditor : ComponentBase
{
}

View File

@ -32,4 +32,6 @@
<h1>SessionZeroDB</h1>
<p>Search online for new datasets (NOT FUNCTIONAL)</p>
</div>
</div>
</div>
<DatasetEditor></DatasetEditor>

View File

@ -374,6 +374,7 @@ select.form-control {
border-radius: 8px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
margin-bottom: 1.5rem;
flex: 1;
}
.panel-header {