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

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;
}
}