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 (4251B)


      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 
     96 .scoreInput {
     97   font-size: 25px;
     98 }
     99 
    100 .loginForm, .exportForm {
    101   margin: auto;
    102   padding: 1em;
    103 }
    104 .loginForm button, .loginForm input, .exportForm button {
    105   width: 100%;
    106   display: block;
    107 }
    108 
    109 .heatInfo {
    110   padding: 20px;
    111 }
    112 .heatInfo li {
    113   list-style: none;
    114 }
    115 
    116 .hidden {
    117   display: none
    118 }
    119 
    120 .Leaderboard, .Scoring, .StartlistForm, .AthleteForm, .HeatForm, .Settings {
    121   position: relative;
    122 }
    123 
    124 .Leaderboard header, .Scoring {
    125   padding: 0 20px;
    126 }
    127 
    128 .Scoring ul {
    129   display: flex;
    130   flex-direction: row;
    131   flex-wrap: wrap;
    132 }
    133 
    134 .Scoring li {
    135   list-style: none;
    136   padding-right: 20px;
    137 }
    138 
    139 .loading {
    140   top: -19px;
    141   right: 10px;
    142   width: 80px;
    143   position: absolute;
    144   font-size: 0.8em;
    145   text-transform: uppercase;
    146   color: #b0b0b6;
    147 }
    148 
    149 .Leaderboard .loading {
    150   right: 120px;
    151   top: -29px;
    152 }
    153 
    154 /* Show details toggle button */
    155 .show-details {
    156   width: 50px;
    157   height: 20px;
    158   border-radius: 5px;
    159   box-shadow: 0 1px #b1b0b6;
    160   position: absolute;
    161   right: 20px;
    162   top: -15px;
    163   transition: background 0.1s ease, box-shadow 0.1s ease;
    164 }
    165 .show-details .thumb {
    166   text-transform: uppercase;
    167   height: 12px;
    168   width: 22px;
    169   border-radius: 5px;
    170   background: white;
    171   border: 1px solid #cfced3;
    172   position: absolute;
    173   left: 3px;
    174   transform: translateX(0);
    175   transform: translateY(-50%);
    176   transition: left 0.15s ease;
    177 }
    178 .show-details.toggled {
    179   background: #f3f2f7;
    180   box-shadow: 0 -1px #b1b0b6;
    181 }
    182 .show-details.toggled .thumb {
    183   left: calc(50px - 29px);
    184 }
    185 .show-details span {
    186   font-size: 0.8em;
    187   text-transform: uppercase;
    188   color: #b0b0b6;
    189   right: 53px;
    190   top: 1px;
    191   position: absolute;
    192 }
    193 
    194 /* increment rank row number */
    195 table.leaderboard:not(.hide-rank) tr {
    196   counter-increment: rowNumber;
    197 }
    198 table.leaderboard:not(.hide-rank) tr td:first-child::before {
    199   content: counter(rowNumber);
    200   min-width: 1em;
    201   margin-right: 0.5em;
    202 }
    203 
    204 /* highlight totals */
    205 td.total {
    206   font-weight: bold;
    207 }
    208 
    209 @media(min-width: 1600px) {
    210   main > div {
    211     width: 75%;
    212     margin: 0 auto;
    213   }
    214 }
    215 
    216 /* https://css-tricks.com/making-tables-responsive-with-minimal-css */
    217 /* Mobile / Small screen styles */
    218 @media (max-width: 768px) {
    219   table.leaderboard thead {
    220     display: none;
    221   }
    222 
    223   table.leaderboard td {
    224     display: flex;
    225     border-bottom: 1px solid #e1e1e7;
    226     font-size: 0.8em;
    227   }
    228 
    229   table.leaderboard:not(.hide-rank) tr td:first-child {
    230     background: #f3f2f7;
    231     color: #b0b0b6;
    232     font-size: 0.8em;
    233     font-weight: bold;
    234   }
    235   table.leaderboard:not(.hide-rank) tr td:first-child::before {
    236     content: counter(rowNumber) ". RANK";
    237   }
    238 
    239   table.leaderboard td[data-title]:before {
    240     content: attr(data-title);
    241     width: 25%;
    242     margin-right: 1em;
    243     align-content: center;
    244     text-align: right;
    245     text-transform: uppercase;
    246     color: #b0b0b6;
    247   }
    248 
    249   table.leaderboard tr {
    250     border-bottom: 1px solid white;
    251   }
    252 
    253   table.leaderboard td:not(td:first-child):empty {
    254     display: none;
    255   }
    256 }