summaryrefslogtreecommitdiff
path: root/server/web/src/design/components/Server.design.tsx
blob: b6296b67364edff3733a286cc550fd48739dd87c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
import styled, { css } from 'styled-components';
import {
    IServerTableRow,
    IServerTableBar
} from '../../interfaces/design/ServerDesign.interface';

const tableColumn = css`
    border: solid thin rgb(31, 113, 145);
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 3.1rem;
    border-top: none;
    overflow: hidden;
    padding: 0.3rem;
`;

const tableResponsive = css`
    @media (max-width: 767px) {
        display: block;
    }
`;

export const ServerTable = styled('table')`
    width: calc(100% - 1.125rem);
    color: rgb(255, 255, 255);
    border-collapse: collapse;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    margin-bottom: 5.9rem;
    -ms-user-select: none;
    text-align: center;
    user-select: none;
    ${tableResponsive}
`;

export const ServerTableHead = styled('thead')`
    background-color: rgb(31, 93, 117);

    @media (max-width: 767px) {
        display: none;
    }
`;

export const ServerTableBody = styled('tbody')`
    background-color: rgb(5, 32, 58);
    ${tableResponsive}

    > tr:first-child {
        padding-top: 1.5rem;
    }

    > tr:last-child {
        padding-bottom: 1.5rem;
    }
`;

export const ServerTableRow = styled('tr') <IServerTableRow>`
    ${(props) => props.activeSession && `color: ${props.activeSession};`}
    padding: 0.75rem 1.5rem;
    ${tableResponsive}

    > td:first-child {
        border-top: solid thin rgb(31, 113, 145);
    }
`;

export const ServerTableHeader = styled('th')`
    ${tableColumn}
`;

export const ServerTableData = styled('td')`
    ${tableColumn}

    @media (max-width: 767px) {
        min-height: 1.4125rem;
        padding-right: 1rem;
        position: relative;
        text-align: right;
        padding-left: 45%;
        overflow: hidden;
        max-width: 100%;
        display: block;

        &:before {
            content: attr(data-label);
            position: absolute;
            padding-left: 1rem;
            text-align: left;
            width: 55%;
            left: 0;
        }
    }
`;

export const ServerTableImage = styled('img')`
    vertical-align: text-bottom;
    margin-right: 0.15rem;
    height: 0.90625rem;
    width: 0.90625rem;
`;

export const ServerTableBarBg = styled('div')`
    background-color: rgb(31, 93, 117);
`;

export const ServerTableBar = styled('div') <IServerTableBar>`
    ${(props) => props.width && `width: ${props.width}%;`}
    background-color: rgb(24, 79, 59);
    margin: 0.0625rem 0;
    height: 0.375rem;
`;

export const ServerBlock = styled('div')`
    background-color: rgb(31, 93, 117);
    width: calc(100% - 1.2rem);
    color: rgb(255, 255, 255);
    text-align: center;
    padding: 0.8rem 0;
`;