Skip to content

Commit

Permalink
feat(space_time_shape): color for deciders
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuLivebardon authored and CorentinGaut committed Jun 26, 2024
1 parent 4876458 commit fb2e235
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 9 deletions.
42 changes: 42 additions & 0 deletions examples/assets/css/space_time_shape.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#stp_ui {
position: absolute;
display: grid;
left: 0%;
top: 0%;
z-index: 10;
background-color: #f5f5f5c2;
}

#stp_ui > div label {
display: block;
font-weight: bold;
margin-bottom: 0.5rem;
}

#stp_ui > div input[type='text'],
#stp_ui > div select {
padding: 0.5rem;
border: 1px solid #ccc;
border-radius: 0.25rem;
font-size: 1rem;
text-transform: capitalize;
}

#stp_ui > div select {
appearance: none;
background-repeat: no-repeat;
background-position: right 0.5rem center;
background-size: 1rem;
padding-right: 2rem;
}

#stp_ui > div input[type='checkbox'] {
margin-right: 0.5rem;
}

#stp_ui > div input[type='text']:focus,
#stp_ui > div select:focus {
outline: none;
border-color: #666;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}
24 changes: 15 additions & 9 deletions examples/space_time_shape.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="./assets/css/examples.css" />
<link rel="stylesheet" href="./assets/css/space_time_shape.css" />
<link rel="stylesheet" href="./assets/css/loading_screen.css" />
</head>

Expand Down Expand Up @@ -111,12 +112,17 @@

// CREATE HTML
const ui = document.createElement('div');
ui.id = 'stp_ui';
document.body.appendChild(ui);
ui.style =
'position: absolute; display: grid; left: 0%; top: 0%; z-index:10';

const divSelect = document.createElement('div');
ui.appendChild(divSelect);

const divUiSTS = document.createElement('div');
ui.appendChild(divUiSTS);

const selectDataset = document.createElement('select');
ui.appendChild(selectDataset);
divSelect.appendChild(selectDataset);
const optionDefaultDataset = document.createElement('option');
optionDefaultDataset.innerText = 'Choose a dataset';
optionDefaultDataset.selected = true;
Expand Down Expand Up @@ -155,7 +161,7 @@

const selectMode = document.createElement('select');
selectMode.hidden = true;
ui.appendChild(selectMode);
divSelect.appendChild(selectMode);
const optionDefaultMode = document.createElement('option');
optionDefaultMode.innerText = 'Choose a Mode';
optionDefaultMode.selected = true;
Expand All @@ -178,7 +184,7 @@

const selectSTShape = document.createElement('select');
selectSTShape.hidden = true;
ui.appendChild(selectSTShape);
divSelect.appendChild(selectSTShape);
const optionDefaultShape = document.createElement('option');
optionDefaultShape.innerText = 'Choose a Shape';
optionDefaultShape.disabled = true;
Expand All @@ -193,7 +199,7 @@

const uiCircle = document.createElement('div');
uiCircle.hidden = true;
ui.appendChild(uiCircle);
divUiSTS.appendChild(uiCircle);

const radiusParameterLabel = document.createElement('label');
radiusParameterLabel.innerText = 'Radius';
Expand Down Expand Up @@ -233,7 +239,7 @@

const uiVector = document.createElement('div');
uiVector.hidden = true;
ui.appendChild(uiVector);
divUiSTS.appendChild(uiVector);

const deltaLabel = document.createElement('label');
deltaLabel.innerText = 'Delta';
Expand All @@ -259,7 +265,7 @@

const uiHelix = document.createElement('div');
uiHelix.hidden = true;
ui.appendChild(uiHelix);
divUiSTS.appendChild(uiHelix);

const helixDeltaLabel = document.createElement('label');
helixDeltaLabel.innerText = 'Delta';
Expand All @@ -285,7 +291,7 @@

const uiParabola = document.createElement('div');
uiParabola.hidden = true;
ui.appendChild(uiParabola);
divUiSTS.appendChild(uiParabola);

const labelDistAxisX = document.createElement('label');
labelDistAxisX.innerText = 'Distance on X axis';
Expand Down

0 comments on commit fb2e235

Please sign in to comment.