Skip to content
Snippets Groups Projects
Commit 7d1371ff authored by Matthias Feyll's avatar Matthias Feyll :cookie: Committed by matthiasf
Browse files

apply some styles to device page

parent 67fd4d92
No related branches found
No related tags found
2 merge requests!1162Draft: Ui integration,!1128UI: Implement yang model view
...@@ -10,4 +10,43 @@ tr:hover > td { ...@@ -10,4 +10,43 @@ tr:hover > td {
tr:nth-child(2n+1) > td { tr:nth-child(2n+1) > td {
background-color: lighten(map-get($theme-colors, primary) , 38%) background-color: lighten(map-get($theme-colors, primary) , 38%)
}
.c-box {
padding: 2em !important;
padding-top: 1em !important;
}
.border-right {
$border-padding: 2em;
border-right: 1px solid lighten(map-get($theme-colors, dark), 35%);
padding-right: $border-padding;
& ~ div {
padding-left: $border-padding;
}
}
.tab-links {
font-size: 1.5em;
text-decoration: none;
color: map-get($theme-colors, dark);
&:hover {
color: lighten(map-get($theme-colors, primary), 10%);
}
&:focus {
border: none !important;
color: lighten(map-get($theme-colors, primary), 10%);
}
&.active {
color: map-get($theme-colors, primary);
font-weight: 500;
}
} }
\ No newline at end of file
...@@ -5,7 +5,6 @@ import { useTranslation } from 'react-i18next'; ...@@ -5,7 +5,6 @@ import { useTranslation } from 'react-i18next';
import { DeviceViewTabs, DeviceViewTabValues } from './deivce.view.tabs'; import { DeviceViewTabs, DeviceViewTabValues } from './deivce.view.tabs';
import './device.scss'; import './device.scss';
import { DeviceViewTable } from './device.view.table'; import { DeviceViewTable } from './device.view.table';
import { useParams } from 'react-router-dom';
function DeviceView() { function DeviceView() {
const { t } = useTranslation('common'); const { t } = useTranslation('common');
...@@ -15,37 +14,33 @@ function DeviceView() { ...@@ -15,37 +14,33 @@ function DeviceView() {
return ( return (
<div className='m-4 pt-4'> <div className='m-4 pt-4'>
<Container className="bg-white rounded c-box" fluid> <Container className="bg-white rounded c-box" fluid>
<Row className='my-2'> <Row>
<Col sm={7}><h3 className='text-black-50'>{t('device.title')}</h3></Col> <Col sm={7} className='border-right mt-4'><h3 className='text-black-50'>{t('device.title')}</h3></Col>
<Col sm={5}> <Col sm={5} className='mt-4'>
<Nav className='justify-content-around'> <Nav className='justify-content-around'>
<NavLink className={handleActiveTabLink(DeviceViewTabValues.METADATA)} onClick={() => setActiveTab(DeviceViewTabValues.METADATA)}>{t('device.tabs.metadata.title')}</NavLink> <NavLink className={handleActiveTabLink(DeviceViewTabValues.METADATA) + " tab-links"} onClick={() => setActiveTab(DeviceViewTabValues.METADATA)}>{t('device.tabs.metadata.title')}</NavLink>
<NavLink className={handleActiveTabLink(DeviceViewTabValues.YANGMODEL)} onClick={() => setActiveTab(DeviceViewTabValues.YANGMODEL)}>{t('device.tabs.yang_model.title')}</NavLink> <NavLink className={handleActiveTabLink(DeviceViewTabValues.YANGMODEL) + " tab-links"} onClick={() => setActiveTab(DeviceViewTabValues.YANGMODEL)}>{t('device.tabs.yang_model.title')}</NavLink>
</Nav> </Nav>
</Col> </Col>
</Row> </Row>
<Row> <Row className='align-items-center'>
<Col sm={3}> <Col sm={3}>
<FloatingLabel <Form.Group controlId='device.search' className='p-0 mx-1 pt-2'>
controlId="device.search" <Form.Control type="text" placeholder={t('device.search.placeholder')} ref={searchRef} />
label={t('device.search.placeholder')} </Form.Group>
className='p-0 mx-2'
>
<Form.Control type="text" placeholder="name@example.com" ref={searchRef} />
</FloatingLabel>
</Col> </Col>
<Col sm={{ span: 2, offset: 2 }}> <Col sm={{ span: 2, offset: 2 }} className='border-right pt-2'>
<Button variant='primary' className='w-100 my-auto'>{t('device.add_device_button')}</Button> <Button variant='primary' className='w-100 my-auto'>{t('device.add_device_button')}</Button>
</Col> </Col>
</Row> </Row>
<Row className='mt-2'> <Row className='align-items-start'>
<Col sm={7}> <Col sm={7} className='pt-2 border-right'>
{DeviceViewTable(searchRef)} {DeviceViewTable(searchRef)}
</Col> </Col>
<Col sm={5} className='border-left border-primary'> <Col sm={5} className='pt-2'>
{DeviceViewTabs(activeTab)} {DeviceViewTabs(activeTab)}
</Col> </Col>
</Row> </Row>
......
@font-face { @font-face {
font-family: inter_font; font-family: Inter;
src: url("./fonts/Inter.ttf"); src: url("/fonts/Inter.ttf");
} }
* { * {
font-family: inter_font; font-family: Inter;
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment