myheats

Live heats, scoring and leaderboard for sport events
git clone https://git.in0rdr.ch/myheats.git
Log | Files | Refs | Pull requests |Archive | README | LICENSE

App.css (4294B)


      1 #root {
      2   display: flex;
      3   flex-direction: column;
      4   min-height: 100vh;
      5   justify-content: space-between;
      6 }
      7 
      8 main {
      9   flex: 1;
     10   border-top: 1px solid #e1e1e7;
     11   border-bottom: 1px solid #e1e1e7;
     12   padding: 30px 0;
     13 }
     14 
     15 span.logo img {
     16   max-height: 33px;
     17 }
     18 
     19 nav {
     20   background: #f9f9fc;
     21   border-bottom: 1px solid white;
     22 }
     23 
     24 nav ul {
     25   display: flex;
     26   flex-wrap: wrap;
     27   justify-content: space-between;
     28   padding: 0;
     29 }
     30 
     31 nav li {
     32   flex: 1;
     33   list-style-type: none;
     34   white-space: nowrap;
     35 }
     36 
     37 nav li a {
     38   text-transform: uppercase;
     39   text-align: center;
     40   font-size: 0.8em;
     41   text-decoration: none;
     42   padding: 10px;
     43   display: block;
     44 }
     45 nav a.active {
     46   font-weight: bold;
     47   background: white;
     48 }
     49 
     50 table {
     51   border-collapse: collapse;
     52   width: 100%;
     53 }
     54 
     55 th, td {
     56   padding: 5px 10px;
     57   text-align: left;
     58 }
     59 
     60 th, label {
     61   font-weight: normal;
     62   font-size: 0.8em;
     63   text-transform: uppercase;
     64   color: #b0b0b6;
     65 }
     66 
     67 /* don't color rows of tables with input forms */
     68 tbody tr:nth-child(even):not(.input) {
     69   background-color: #f9f9fc;
     70 }
     71 
     72 footer {
     73   padding: 5px;
     74   display: flex;
     75   flex-wrap: wrap;
     76   justify-content: center;
     77   align-items: center;
     78   border-top: 1px solid white;
     79   background: #f9f9fc;
     80 }
     81 footer span {
     82   font-size: 0.8em;
     83   margin: 5px;
     84 }
     85 footer span a {
     86   font-size: 1em;
     87 }
     88 footer span button {
     89   margin-left: 20px;
     90 }
     91 
     92 .right {
     93   text-align: right;
     94 }
     95 .inline-block {
     96   display: inline-block;
     97 }
     98 
     99 .scoreInput {
    100   font-size: 25px;
    101 }
    102 
    103 .loginForm, .exportForm {
    104   margin: auto;
    105   padding: 1em;
    106 }
    107 .loginForm button, .loginForm input, .exportForm button {
    108   width: 100%;
    109   display: block;
    110 }
    111 
    112 .heatInfo {
    113   padding: 20px;
    114 }
    115 .heatInfo li {
    116   list-style: none;
    117 }
    118 
    119 .hidden {
    120   display: none
    121 }
    122 
    123 .Leaderboard, .Scoring, .StartlistForm, .AthleteForm, .HeatForm, .Settings {
    124   position: relative;
    125 }
    126 
    127 .Leaderboard header, .Scoring {
    128   padding: 0 20px;
    129 }
    130 
    131 .Scoring ul {
    132   display: flex;
    133   flex-direction: row;
    134   flex-wrap: wrap;
    135 }
    136 
    137 .Scoring li {
    138   list-style: none;
    139   padding-right: 20px;
    140 }
    141 
    142 .loading {
    143   top: -19px;
    144   right: 10px;
    145   width: 80px;
    146   position: absolute;
    147   font-size: 0.8em;
    148   text-transform: uppercase;
    149   color: #b0b0b6;
    150 }
    151 
    152 .Leaderboard .loading {
    153   right: 120px;
    154   top: -29px;
    155 }
    156 
    157 /* Show details toggle button */
    158 .show-details {
    159   width: 50px;
    160   height: 20px;
    161   border-radius: 5px;
    162   box-shadow: 0 1px #b1b0b6;
    163   position: absolute;
    164   right: 20px;
    165   top: -15px;
    166   transition: background 0.1s ease, box-shadow 0.1s ease;
    167 }
    168 .show-details .thumb {
    169   text-transform: uppercase;
    170   height: 12px;
    171   width: 22px;
    172   border-radius: 5px;
    173   background: white;
    174   border: 1px solid #cfced3;
    175   position: absolute;
    176   left: 3px;
    177   transform: translateX(0);
    178   transform: translateY(-50%);
    179   transition: left 0.15s ease;
    180 }
    181 .show-details.toggled {
    182   background: #f3f2f7;
    183   box-shadow: 0 -1px #b1b0b6;
    184 }
    185 .show-details.toggled .thumb {
    186   left: calc(50px - 29px);
    187 }
    188 .show-details span {
    189   font-size: 0.8em;
    190   text-transform: uppercase;
    191   color: #b0b0b6;
    192   right: 53px;
    193   top: 1px;
    194   position: absolute;
    195 }
    196 
    197 /* increment rank row number */
    198 table.leaderboard:not(.hide-rank) tr {
    199   counter-increment: rowNumber;
    200 }
    201 table.leaderboard:not(.hide-rank) tr td:first-child::before {
    202   content: counter(rowNumber);
    203   min-width: 1em;
    204   margin-right: 0.5em;
    205 }
    206 
    207 /* highlight totals */
    208 td.total {
    209   font-weight: bold;
    210 }
    211 
    212 @media(min-width: 1600px) {
    213   main > div {
    214     width: 75%;
    215     margin: 0 auto;
    216   }
    217 }
    218 
    219 /* https://css-tricks.com/making-tables-responsive-with-minimal-css */
    220 /* Mobile / Small screen styles */
    221 @media (max-width: 768px) {
    222   table.leaderboard thead {
    223     display: none;
    224   }
    225 
    226   table.leaderboard td {
    227     display: flex;
    228     border-bottom: 1px solid #e1e1e7;
    229     font-size: 0.8em;
    230   }
    231 
    232   table.leaderboard:not(.hide-rank) tr td:first-child {
    233     background: #f3f2f7;
    234     color: #b0b0b6;
    235     font-size: 0.8em;
    236     font-weight: bold;
    237   }
    238   table.leaderboard:not(.hide-rank) tr td:first-child::before {
    239     content: counter(rowNumber) ". RANK";
    240   }
    241 
    242   table.leaderboard td[data-title]:before {
    243     content: attr(data-title);
    244     width: 25%;
    245     margin-right: 1em;
    246     align-content: center;
    247     text-align: right;
    248     text-transform: uppercase;
    249     color: #b0b0b6;
    250   }
    251 
    252   table.leaderboard tr {
    253     border-bottom: 1px solid white;
    254   }
    255 
    256   table.leaderboard td:not(td:first-child):empty {
    257     display: none;
    258   }
    259 }