demo list and page

This commit is contained in:
Robin Appelman 2023-04-08 17:07:40 +02:00
commit 667f5eae04
32 changed files with 4784 additions and 5 deletions

22
style/footer.css Normal file
View file

@ -0,0 +1,22 @@
footer {
margin: 100px -31px -100px;
text-align: center;
line-height: 35px;
vertical-align: middle;
padding: 10px 0;
color: white;
background-color: var(--secondary-color);
& a, & a:visited {
color: #3498db;
}
@media (min-width: 1700px) {
margin: 0;
position: fixed;
right: 15px;
bottom: 0;
width: 280px;
text-align: right;
}
}

98
style/header.css Normal file
View file

@ -0,0 +1,98 @@
header {
width: 100%;
white-space: nowrap;
background-color: var(--primary-color);
border-bottom: 1px solid rgb(183, 183, 183);
display: block;
position: fixed;
left: 0;
top: 0;
z-index: 3;
text-transform: uppercase;
& a, & a:visited {
color: var(--text-header);
cursor: pointer;
padding: .5em 1em;
text-decoration: none;
display: block;
}
.main a {
background: url('inline://images/logo.svg') no-repeat 0;
background-size: 30px;
padding-left: 35px;
margin-left: 5px;
}
& > span {
left: 0;
top: 0;
z-index: 3;
padding: 0;
float: left;
max-width: 220px;
position: relative;
&.beta {
margin-right: 20px;
&:after {
content: 'beta';
color: var(--highlight-primary);
text-transform: uppercase;
font-size: 12px;
position: absolute;
right: -15px;
top: 2px;
font-weight: bold;
}
}
}
& > ul {
top: 0;
float: right;
}
@media (max-width: 550px) {
.main a {
width: 0;
overflow: hidden;
padding-right: 0;
}
}
@media (max-width: 650px) {
.upload {
display: none;
}
}
}
a.steam-login:before {
content: '';
box-shadow: 1px 0 0 rgba(0, 0, 0, 0.05);
height: inherit;
width: 41px;
background-size: 30px 30px;
background: rgba(255, 255, 255, 0.08) url('inline://images/steam_login.svg') no-repeat 0;
bottom: 0;
left: 0;
padding: 0;
position: absolute;
top: 0;
}
a.steam-login {
text-transform: none;
display: inline-block;
height: 41px;
margin: -1px 0;
background-color: #5A8E27;
color: white;
text-shadow: 0 -1px rgba(0, 0, 0, 0.25);
line-height: 22px;
position: relative;
padding-left: 50px;
}

View file

@ -0,0 +1,85 @@
table.players {
& .red.class, & .blue.class {
background-origin: content-box;
background-clip: content-box;
background-repeat: no-repeat;
background-image: url('inline://images/classes.png');
}
& .red.class {
&.spy {
background-position: -0px -0px;
}
&.demoman {
background-position: -20px -0px;
}
&.soldier {
background-position: -40px -0px;
}
&.medic {
background-position: -0px -20px;
}
&.pyro {
background-position: -20px -20px;
}
&.sniper {
background-position: -40px -20px;
}
&.engineer {
background-position: -0px -40px;
}
&.heavyweapons {
background-position: -20px -40px;
}
&.scout {
background-position: -40px -40px;
}
}
& .blue.class {
&.spy {
background-position: -10px -0px;
}
&.demoman {
background-position: -30px -0px;
}
&.soldier {
background-position: -50px -0px;
}
&.medic {
background-position: -10px -20px;
}
&.pyro {
background-position: -30px -20px;
}
&.sniper {
background-position: -50px -20px;
}
&.engineer {
background-position: -10px -40px;
}
&.heavyweapons {
background-position: -30px -40px;
}
&.scout {
background-position: -50px -40px;
}
}
}

218
style/pages/demo.css Normal file
View file

@ -0,0 +1,218 @@
@import 'class-icons.css';
table.chat, table.players {
table-layout: fixed;
width: 100%;
border-collapse: collapse;
}
table.players {
& td, & th {
padding: 5px 9px;
text-overflow: ellipsis;
overflow: hidden;
}
& tr:nth-child(odd) {
background-color: var(--primary-color-accent);
}
& tr:nth-child(even) {
background-color: var(--primary-color);
}
& th {
padding: 7px 9px;
}
}
p.demo-info .time {
float: right;
font-weight: bold;
}
p.demo-download {
margin-top: 40px;
}
p.demo-download button, p.demo-download a {
margin-right: 40px;
}
@media (max-width: 450px) {
p.demo-download button, p.demo-download a {
margin-right: 0;
}
p.demo-download button {
float: right;
}
}
div.teams {
margin: 0 -30px;
padding: 10px 0 0;
height: 72px;
color: white;
& div {
display: inline-block;
padding: 10px 30px;
width: 50%;
}
& span {
font-family: Arial, sans-serif;
font-weight: bold;
font-size: 45px;
}
& > div {
height: 72px;
}
& .red {
padding-right: 15px;
float: left;
background: #a75d50;
}
& .red span.name,
& .blue span.name {
display: inline-block;
overflow: hidden;
max-width: calc(100% - 30px);
}
& .red .score {
float: right;
}
& .blue {
padding-left: 15px;
float: right;
background: #5b818f;
}
& .blue .name {
float: right;
color: '#fff';
}
}
.playerTable {
width: 100%;
}
.playerTable th {
text-align: left;
}
table.players {
width: 100%;
& .name {
vertical-align: top;
}
& .name a {
text-decoration: none;
color: var(--text-primary);
white-space: nowrap;
}
& .name a:hover {
text-decoration: underline;
}
& .team {
width: 20px;
}
& .team.red {
background: #a75d50;
}
& .team.blue {
background: #5b818f;
}
& .stat {
text-align: right;
}
& .stat {
width: 40px;
vertical-align: top;
}
& .class {
width: 10px;
padding: 7px 0;
vertical-align: top;
}
& .red.class {
padding-right: 0;
}
& .blue.class {
padding-left: 0;
}
& .blue.name {
text-align: right;
padding-right: 15px;
}
& .red.name {
text-align: left;
padding-left: 15px;
}
& th {
border-bottom: solid 1px var(--secondary-color-accent);
}
& th.team {
border-bottom: none;
}
& tr:last-child td.red {
border-bottom: 1px solid #a75d50;
}
& tr:last-child td.blue {
border-bottom: 1px solid #5b818f;
}
& tr:last-child td.class {
border-bottom: 1px solid #666;
}
& td.pov {
background-color: var(--secondary-color-accent);
}
& .demo-info {
margin: 20px 0;
font-size: 20px;
font-weight: bold;
}
& .demo-info .time {
float: right;
}
@media (max-width: 650px) {
.stat {
display: none;
}
}
& .highlight-red .red:not(.team) {
background-color: #a75d5066;
}
& .highlight-blue .blue:not(.team) {
background-color: #5b818f66;
}
}

95
style/pages/index.css Normal file
View file

@ -0,0 +1,95 @@
.demolist {
width: 100%;
text-align: left;
border: none;
border-collapse: collapse;
& tbody {
width: 100%;
}
& th {
font-weight: bold;
}
& td, & th {
display: table-cell;
padding: 9px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin: 0;
}
& td.title {
max-width: 0px;
}
& td.date {
width: 120px;
}
& td.duration {
width: 90px;
max-width: 90px;
text-align: right;
}
& td.format {
width: 75px;
text-align: right;
}
& td.map {
width: 180px;
}
& tr:nth-child(even) {
background-color: var(--primary-color-accent);
}
}
.search {
padding-bottom: 10px;
}
.listType {
line-height: 62px;
& > span {
vertical-align: top;
}
}
.deleted-demo {
background-color: rgba(255, 0, 0, 0.5);
text-align: center;
margin: -10px -30px 0;
padding: 20px;
font-size: 1.1em;
font-weight: bold;
}
@media (max-width: 950px) {
.demolist .format {
display: none;
}
}
@media (max-width: 850px) {
.demolist .duration {
display: none;
}
}
@media (max-width: 750px) {
.demolist .date {
display: none;
}
}
@media (max-width: 550px) {
.demolist .map {
display: none;
}
}

262
style/style.css Normal file
View file

@ -0,0 +1,262 @@
@import 'header.css';
@import 'footer.css';
@import 'pages/index.css';
@import 'pages/demo.css';
:root {
--primary-color: white;
--primary-color-accent: #f4f4f4;
--secondary-color: #444;
--secondary-color-accent: #333;
--text-primary: black;
--text-secondary: grey;
--highlight-primary: #3e95e6;
--highlight-secondary: #daecfa;
--button-primary: #0078e7;
--button-secondary: #e6e6e6;
--button-critical: rgb(202, 60, 60);
--text-header: grey;
--link-color: #0071b8;
--link-color-visited: #004c8b;
}
@media (prefers-color-scheme: dark) {
:root {
--primary-color: rgb(39, 39, 39);
--primary-color-accent: #1c1c1c;
--secondary-color: #5a5a5a;
--secondary-color-accent: #444;
--text-primary: #dcdcdc;
--text-secondary: rgb(169, 169, 169);
--highlight-primary: #0078e7;
--highlight-secondary: #448fbe;
--button-primary: #2568ae;
--button-secondary: #626262;
--text-header: #efefef;
--link-color: #0093ed;
--link-color-visited: #0063ff;
}
}
* {
box-sizing: border-box;
}
body, html {
height: 100%;
margin: 0;
padding: 0;
font-family: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
color: var(--text-primary);
}
.page {
background-color: var(--primary-color);
width: 100%;
min-height: 100%;
max-width: 1100px;
margin-left: auto;
margin-right: auto;
padding: 40px 30px 100px;
}
body {
background-color: var(--secondary-color);
}
body > div > section {
margin-top: 20px;
}
input[type="text"] {
border-radius: 0;
}
section:first-child {
margin-top: 0;
}
section {
padding-bottom: 40px;
}
section > * {
margin-left: 5px;
}
section > div.subsection {
margin-bottom: 20px;
margin-top: 15px;
}
h1, h2, h3 {
font-weight: normal;
font-family: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
h2 {
line-height: 34px;
font-size: 40px;
text-align: center;
padding: 40px 40px 0;
}
h3 {
line-height: 24px;
text-align: center;
font-size: 20px;
}
.clearfix {
width: 0 !important;
padding: 0 !important;;
margin: 0 !important;;
clear: both;
}
a {
color: var(--link-color);
}
a:visited {
color: var(--link-color-visited);
}
label + div.Select,
label + select {
margin-top: 5px;
margin-bottom: 5px;
}
h1 {
margin: 0 -30px;
padding: 20px 30px;
line-height: 50px;
font-size: 45px;
color: var(--text-secondary);
}
pre {
display: block;
padding: 10px 10px 10px 19px;
margin: 20px 0 20px;
font-size: 13px;
line-height: 1.42857143;
color: var(--text-primary);
word-break: break-all;
word-wrap: break-word;
background-color: var(--primary-color-accent);
border: 1px solid #ccc;
}
.right {
float: right;
}
.pure-button {
border-radius: 0;
min-width: 150px;
}
.pure-button-primary, .pure-button-selected, a.pure-button-primary, a.pure-button-selected {
background-color: var(--button-primary);
color: var(--text-primary);
}
.pure-button {
display: inline-block;
zoom: 1;
line-height: normal;
white-space: nowrap;
vertical-align: middle;
text-align: center;
cursor: pointer;
border: none;
-webkit-user-drag: none;
font-family: inherit;
font-size: 100%;
padding: .5em 1em;
color: rgba(0, 0, 0, 0.8);
background-color: #E6E6E6;
text-decoration: none;
min-width: 150px;
&.pure-button-tertiary {
background-color: transparent;
text-decoration: underline;
color: var(--text-secondary);
}
}
.pure-button:hover {
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#1a000000', endColorstr='#1a000000', GradientType=0);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(rgba(0, 0, 0, 0.1)), to(rgba(0, 0, 0, 0.1)));
background-image: -webkit-linear-gradient(rgba(0, 0, 0, 0.1) 40%, rgba(0, 0, 0, 0.1));
background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1));
}
.button-delete {
background: var(--button-critical);
color: var(--primary-color);
}
.button-pause {
background: rgb(223, 117, 20);
color: var(--primary-color);
}
.button-fa:before {
float: left;
font-size: 18px;
margin: 0 -19px 0 -5px;
padding: 0 0.8em 0 0;
pointer-events: none;
text-align: center;
width: 1em;
}
kbd, pre, samp {
font-family: monospace, monospace;
font-size: 1em;
}
.noscript {
position: fixed;
top: 20%;
left: 0;
width: 100%;
text-align: center;
color: var(--primary-color);
font-size: 150%;
}
.react-spinner {
margin: 250px 0;
width: 250px;
height: 100px;
}
.react-spinner_bar {
background-color: var(--text-primary);
}
.topbar {
display: inline-block;
height: 64px;
margin-left: -30px;
margin-top: -10px;
}
code {
font-family: monospace;
}
p.page-note {
border-bottom: 1px solid #ddd;
margin: -10px -30px 50px;
padding: 15px 30px;
background-color: var(--primary-color-accent);
line-height: 32px;
font-size: 120%;
}