File tree Expand file tree Collapse file tree 8 files changed +62
-16
lines changed
Expand file tree Collapse file tree 8 files changed +62
-16
lines changed Original file line number Diff line number Diff line change 1515 </ head >
1616 < body >
1717 < noscript > You need to enable JavaScript to run this app.</ noscript >
18- < div id ="root " class =" h-100 " > </ div >
18+ < div id ="root "> </ div >
1919 < script src ="/src/index.tsx " type ="module "> </ script >
2020 </ body >
2121</ html >
Original file line number Diff line number Diff line change 1+ # root > main {
2+ margin-left : calc (60px + 1vw );
3+ }
Original file line number Diff line number Diff line change 11import { Devices } from './component/Devices.jsx'
2- import { useParameters } from './context/Parameters.js'
2+ import { ExperimentalWarning } from './component/ExperimentalWarning.jsx'
3+ import { Sidebar } from './component/Sidebar.jsx'
34
4- export const MapApp = ( ) => {
5- const parameters = useParameters ( )
5+ import './MapApp.css'
66
7+ export const MapApp = ( ) => {
78 return (
89 < >
10+ < Sidebar />
11+ < ExperimentalWarning />
912 < main >
1013 < Devices />
1114 </ main >
12- < aside style = { { 'margin-top' : '2rem' } } >
13- < h1 > Parameters</ h1 >
14- < dl >
15- < dt >
16- < code > devicesAPIURL</ code >
17- </ dt >
18- < dd >
19- < code > { parameters . devicesAPIURL . toString ( ) } </ code >
20- </ dd >
21- </ dl >
22- </ aside >
2315 </ >
2416 )
2517}
Original file line number Diff line number Diff line change 1+ .experimental-warning {
2+ position : absolute;
3+ top : 1rem ;
4+ justify-content : center;
5+ width : 100vw ;
6+ display : flex;
7+ }
8+
9+ .experimental-warning div {
10+ background-color : # e7c27b ;
11+ color : # 333 ;
12+ padding : 0.5rem ;
13+ border-radius : 4px ;
14+ }
Original file line number Diff line number Diff line change 1+ import './ExperimentalWarning.css'
2+
3+ export const ExperimentalWarning = ( ) => (
4+ < aside class = "experimental-warning" >
5+ < div role = "alert" > Work in progress!</ div >
6+ </ aside >
7+ )
Original file line number Diff line number Diff line change 1+ nav .sidebar {
2+ background-color : var (--bg-blue-4 );
3+ width : 60px ;
4+ height : 100vh ;
5+ position : fixed;
6+ left : 0 ;
7+ top : 0 ;
8+ border-right : 1px solid var (--bg-blue-1 );
9+ }
10+
11+ nav .sidebar .logo {
12+ padding : 10px ;
13+ }
14+
15+ nav .sidebar hr {
16+ border-top : 1px solid var (--bg-blue-8 );
17+ border-bottom : 1px solid var (--bg-blue-1 );
18+ width : 100% ;
19+ padding : 0 ;
20+ }
Original file line number Diff line number Diff line change 1+ import './Sidebar.css'
2+
3+ export const Sidebar = ( ) => (
4+ < nav class = "sidebar" >
5+ < a href = "/map" >
6+ < img src = "/assets/logo.svg" class = "logo" alt = "hello.nrfcloud.com logo" />
7+ </ a >
8+ < hr />
9+ </ nav >
10+ )
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import { DevicesProvider } from './context/Devices.jsx'
1010const root = document . getElementById ( 'root' )
1111
1212if ( import . meta. env . DEV && ! ( root instanceof HTMLElement ) ) {
13- throw new Error ( 'Root element not found. ' )
13+ throw new Error ( 'Root element not found.' )
1414}
1515
1616render (
You can’t perform that action at this time.
0 commit comments