mirror of
https://codeberg.org/demostf/frontend.git
synced 2026-06-03 18:24:12 +02:00
uploads/profiles
This commit is contained in:
parent
7bbaa70481
commit
d82fb05d68
16 changed files with 276 additions and 24 deletions
|
|
@ -6,7 +6,8 @@ import {Api, SteamId} from "./api";
|
||||||
let lastFilter = {
|
let lastFilter = {
|
||||||
mode: "",
|
mode: "",
|
||||||
map: "",
|
map: "",
|
||||||
players: []
|
uploader: "",
|
||||||
|
players: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
ready(async () => {
|
ready(async () => {
|
||||||
|
|
@ -19,17 +20,26 @@ ready(async () => {
|
||||||
const steamIds = (searchParams.get("players") || "").split(",").filter(id => id);
|
const steamIds = (searchParams.get("players") || "").split(",").filter(id => id);
|
||||||
let players = [];
|
let players = [];
|
||||||
|
|
||||||
|
if (window.location.href.includes("profiles/")) {
|
||||||
|
const [, profile] = window.location.href.split("profiles/");
|
||||||
|
steamIds.push(profile);
|
||||||
|
}
|
||||||
|
|
||||||
if (steamIds.length) {
|
if (steamIds.length) {
|
||||||
players = await Promise.all(steamIds.map(steamId => api.getPlayer(steamId)));
|
players = await Promise.all(steamIds.map(steamId => api.getPlayer(steamId)));
|
||||||
console.log(players);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lastFilter = {
|
lastFilter = {
|
||||||
mode: searchParams.get("mode") || "",
|
mode: searchParams.get("mode") || "",
|
||||||
map: searchParams.get("map") || "",
|
map: searchParams.get("map") || "",
|
||||||
|
uploader: "",
|
||||||
players,
|
players,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (window.location.href.includes("uploads/")) {
|
||||||
|
[, lastFilter.uploader] = window.location.href.split("uploads/");
|
||||||
|
}
|
||||||
|
|
||||||
render(() => <FilterBar maps={maps} api={api} initialFilter={lastFilter}
|
render(() => <FilterBar maps={maps} api={api} initialFilter={lastFilter}
|
||||||
onChange={onFilter.bind(null, api, demoListBody)}/>, filterBar);
|
onChange={onFilter.bind(null, api, demoListBody)}/>, filterBar);
|
||||||
});
|
});
|
||||||
|
|
@ -37,6 +47,7 @@ ready(async () => {
|
||||||
const filterEq = (a, b) => {
|
const filterEq = (a, b) => {
|
||||||
return (a.mode || "") === (b.mode || "")
|
return (a.mode || "") === (b.mode || "")
|
||||||
&& (a.map || "") === (b.map || "")
|
&& (a.map || "") === (b.map || "")
|
||||||
|
&& (a.uploader || "") === (b.uploader || "")
|
||||||
&& a.players.length === b.players.length && b.players.every(player => a.players.includes(player))
|
&& a.players.length === b.players.length && b.players.every(player => a.players.includes(player))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -51,6 +62,9 @@ const onFilter = async (api, demoListBody, filter) => {
|
||||||
mode: (filter.mode || "").toLowerCase(),
|
mode: (filter.mode || "").toLowerCase(),
|
||||||
map: filter.map || "",
|
map: filter.map || "",
|
||||||
});
|
});
|
||||||
|
if (filter.uploader) {
|
||||||
|
queryParams.set("uploader", filter.uploader);
|
||||||
|
}
|
||||||
const response = await fetch("/fragments/demo-list?" + queryParams);
|
const response = await fetch("/fragments/demo-list?" + queryParams);
|
||||||
document.querySelector('.demolist tbody').innerHTML = await response.text();
|
document.querySelector('.demolist tbody').innerHTML = await response.text();
|
||||||
}
|
}
|
||||||
|
|
@ -65,4 +65,5 @@ export interface FilterSet {
|
||||||
mode: string,
|
mode: string,
|
||||||
map: string,
|
map: string,
|
||||||
players: SteamUser[],
|
players: SteamUser[],
|
||||||
|
uploader: string,
|
||||||
}
|
}
|
||||||
|
|
@ -370,16 +370,16 @@ impl GameMode {
|
||||||
#[derive(Default, Debug, Deserialize)]
|
#[derive(Default, Debug, Deserialize)]
|
||||||
pub struct Filter {
|
pub struct Filter {
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
mode: GameMode,
|
pub mode: GameMode,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
map: String,
|
pub map: String,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
#[serde(deserialize_with = "deserialize_array")]
|
#[serde(deserialize_with = "deserialize_array")]
|
||||||
players: Vec<SteamId>,
|
pub players: Vec<SteamId>,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
before: Option<i32>,
|
pub before: Option<i32>,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
uploader: Option<i32>,
|
pub uploader: Option<SteamId>,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn deserialize_array<'de, D, T>(deserializer: D) -> Result<Vec<T>, D::Error>
|
fn deserialize_array<'de, D, T>(deserializer: D) -> Result<Vec<T>, D::Error>
|
||||||
|
|
@ -420,7 +420,12 @@ impl Filter {
|
||||||
query.and_where(Expr::col(Demos::Id).lt(*before));
|
query.and_where(Expr::col(Demos::Id).lt(*before));
|
||||||
}
|
}
|
||||||
if let Some(uploader) = &self.uploader {
|
if let Some(uploader) = &self.uploader {
|
||||||
query.and_where(Expr::col(Demos::Uploader).eq(*uploader));
|
query
|
||||||
|
.inner_join(
|
||||||
|
Users::Table,
|
||||||
|
Expr::col((Users::Table, Users::Id)).equals((Demos::Table, Demos::Uploader)),
|
||||||
|
)
|
||||||
|
.and_where(Expr::col(Users::SteamId).eq(uploader));
|
||||||
}
|
}
|
||||||
if !self.players.is_empty() && self.players.len() < 19 {
|
if !self.players.is_empty() && self.players.len() < 19 {
|
||||||
let mut player = self.players.iter();
|
let mut player = self.players.iter();
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ use std::str::FromStr;
|
||||||
use steamid_ng::SteamID;
|
use steamid_ng::SteamID;
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
#[derive(Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||||
|
#[serde(untagged)]
|
||||||
pub enum SteamId {
|
pub enum SteamId {
|
||||||
Id(u64),
|
Id(u64),
|
||||||
Raw(Cow<'static, str>),
|
Raw(Cow<'static, str>),
|
||||||
|
|
@ -161,3 +162,9 @@ impl From<SteamId> for Value {
|
||||||
Value::String(Some(Box::new(value.steamid64())))
|
Value::String(Some(Box::new(value.steamid64())))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<&SteamId> for Value {
|
||||||
|
fn from(value: &SteamId) -> Self {
|
||||||
|
Value::String(Some(Box::new(value.steamid64())))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
use crate::data::steam_id::SteamId;
|
use crate::data::steam_id::SteamId;
|
||||||
use crate::Result;
|
use crate::{Error, Result};
|
||||||
use rand::distributions::Alphanumeric;
|
use rand::distributions::Alphanumeric;
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
use reqwest::get;
|
use reqwest::get;
|
||||||
|
|
@ -60,6 +60,9 @@ impl User {
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn fetch(steam_id: &SteamId) -> Result<Profile> {
|
async fn fetch(steam_id: &SteamId) -> Result<Profile> {
|
||||||
|
let SteamId::Id(steam_id) = steam_id else {
|
||||||
|
return Err(Error::NotFound);
|
||||||
|
};
|
||||||
let response = get(format!(
|
let response = get(format!(
|
||||||
"https://steamcommunity.com/profiles/{steam_id}?xml=1"
|
"https://steamcommunity.com/profiles/{steam_id}?xml=1"
|
||||||
))
|
))
|
||||||
|
|
|
||||||
62
src/main.rs
62
src/main.rs
|
|
@ -16,9 +16,11 @@ use crate::data::user::User;
|
||||||
use crate::fragments::demo_list::DemoList;
|
use crate::fragments::demo_list::DemoList;
|
||||||
use crate::pages::about::AboutPage;
|
use crate::pages::about::AboutPage;
|
||||||
use crate::pages::api::ApiPage;
|
use crate::pages::api::ApiPage;
|
||||||
use crate::pages::demo::DemoPage;
|
use crate::pages::demo::{ClassIconsStyle, DemoPage};
|
||||||
use crate::pages::index::{DemoListScript, Index};
|
use crate::pages::index::{DemoListScript, Index};
|
||||||
|
use crate::pages::profile::Profile;
|
||||||
use crate::pages::upload::{UploadPage, UploadScript};
|
use crate::pages::upload::{UploadPage, UploadScript};
|
||||||
|
use crate::pages::uploads::Uploads;
|
||||||
use crate::pages::{render, GlobalStyle};
|
use crate::pages::{render, GlobalStyle};
|
||||||
use crate::session::{SessionData, COOKIE_NAME};
|
use crate::session::{SessionData, COOKIE_NAME};
|
||||||
use async_session::{MemoryStore, Session, SessionStore};
|
use async_session::{MemoryStore, Session, SessionStore};
|
||||||
|
|
@ -86,7 +88,13 @@ async fn main() -> Result<()> {
|
||||||
|
|
||||||
let app = Router::new()
|
let app = Router::new()
|
||||||
.route("/", get(index))
|
.route("/", get(index))
|
||||||
|
.route("/uploads/:uploader", get(uploads))
|
||||||
|
.route("/profiles/:uploader", get(profiles))
|
||||||
.route(GlobalStyle::route(), get(serve_asset::<GlobalStyle>))
|
.route(GlobalStyle::route(), get(serve_asset::<GlobalStyle>))
|
||||||
|
.route(
|
||||||
|
ClassIconsStyle::route(),
|
||||||
|
get(serve_asset::<ClassIconsStyle>),
|
||||||
|
)
|
||||||
.route(UploadScript::route(), get(serve_asset::<UploadScript>))
|
.route(UploadScript::route(), get(serve_asset::<UploadScript>))
|
||||||
.route(DemoListScript::route(), get(serve_asset::<DemoListScript>))
|
.route(DemoListScript::route(), get(serve_asset::<DemoListScript>))
|
||||||
.route(LogoPng::route(), get(serve_asset::<LogoPng>))
|
.route(LogoPng::route(), get(serve_asset::<LogoPng>))
|
||||||
|
|
@ -286,6 +294,58 @@ async fn demo_list(State(app): State<Arc<App>>, filter: Option<Query<Filter>>) -
|
||||||
Ok(DemoList { demos: &demos }.render())
|
Ok(DemoList { demos: &demos }.render())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[axum::debug_handler]
|
||||||
|
async fn uploads(
|
||||||
|
State(app): State<Arc<App>>,
|
||||||
|
session: SessionData,
|
||||||
|
filter: Option<Query<Filter>>,
|
||||||
|
Path(uploader): Path<SteamId>,
|
||||||
|
) -> Result<Markup> {
|
||||||
|
let mut filter = filter.map(|filter| filter.0).unwrap_or_default();
|
||||||
|
filter.uploader = Some(uploader.clone());
|
||||||
|
|
||||||
|
let demos = ListDemo::list(&app.connection, filter).await?;
|
||||||
|
let maps: Vec<_> = map_list(&app.connection).await?.collect();
|
||||||
|
let user = User::get(&app.connection, uploader)
|
||||||
|
.await
|
||||||
|
.map_err(|_| Error::NotFound)?;
|
||||||
|
Ok(render(
|
||||||
|
Uploads {
|
||||||
|
user,
|
||||||
|
demos: &demos,
|
||||||
|
maps: &maps,
|
||||||
|
api: &app.api,
|
||||||
|
},
|
||||||
|
session,
|
||||||
|
))
|
||||||
|
}
|
||||||
|
|
||||||
|
#[axum::debug_handler]
|
||||||
|
async fn profiles(
|
||||||
|
State(app): State<Arc<App>>,
|
||||||
|
session: SessionData,
|
||||||
|
filter: Option<Query<Filter>>,
|
||||||
|
Path(profile): Path<SteamId>,
|
||||||
|
) -> Result<Markup> {
|
||||||
|
let mut filter = filter.map(|filter| filter.0).unwrap_or_default();
|
||||||
|
filter.players.push(profile.clone());
|
||||||
|
|
||||||
|
let demos = ListDemo::list(&app.connection, filter).await?;
|
||||||
|
let maps: Vec<_> = map_list(&app.connection).await?.collect();
|
||||||
|
let user = User::get(&app.connection, profile)
|
||||||
|
.await
|
||||||
|
.map_err(|_| Error::NotFound)?;
|
||||||
|
Ok(render(
|
||||||
|
Profile {
|
||||||
|
user,
|
||||||
|
demos: &demos,
|
||||||
|
maps: &maps,
|
||||||
|
api: &app.api,
|
||||||
|
},
|
||||||
|
session,
|
||||||
|
))
|
||||||
|
}
|
||||||
|
|
||||||
async fn handler_404() -> impl IntoResponse {
|
async fn handler_404() -> impl IntoResponse {
|
||||||
Error::NotFound
|
Error::NotFound
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,15 @@
|
||||||
use crate::data::demo::Demo;
|
use crate::data::demo::Demo;
|
||||||
use crate::data::player::{Player, Team};
|
use crate::data::player::{Player, Team};
|
||||||
use crate::pages::Page;
|
use crate::pages::Page;
|
||||||
|
use demostf_build::Asset;
|
||||||
use itertools::{EitherOrBoth, Itertools};
|
use itertools::{EitherOrBoth, Itertools};
|
||||||
use maud::{html, Markup};
|
use maud::{html, Markup};
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
|
|
||||||
|
#[derive(Asset)]
|
||||||
|
#[asset(source = "style/pages/class-icons.css", url = "/class-icons.css")]
|
||||||
|
pub struct ClassIconsStyle;
|
||||||
|
|
||||||
pub struct DemoPage {
|
pub struct DemoPage {
|
||||||
pub demo: Demo,
|
pub demo: Demo,
|
||||||
}
|
}
|
||||||
|
|
@ -15,6 +20,7 @@ impl Page for DemoPage {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn render(&self) -> Markup {
|
fn render(&self) -> Markup {
|
||||||
|
let style_url = ClassIconsStyle::url();
|
||||||
html! {
|
html! {
|
||||||
h2 { (self.demo.server) " - " (self.demo.red) " vs " (self.demo.blu) }
|
h2 { (self.demo.server) " - " (self.demo.red) " vs " (self.demo.blu) }
|
||||||
h3 { (self.demo.name) }
|
h3 { (self.demo.name) }
|
||||||
|
|
@ -111,6 +117,7 @@ impl Page for DemoPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
link rel="stylesheet" type="text/css" href=(style_url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ impl Page for Index<'_> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct MapList<'a>(&'a [String]);
|
pub struct MapList<'a>(pub &'a [String]);
|
||||||
|
|
||||||
impl Render for MapList<'_> {
|
impl Render for MapList<'_> {
|
||||||
fn render_to(&self, buffer: &mut String) {
|
fn render_to(&self, buffer: &mut String) {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,9 @@ pub mod api;
|
||||||
pub mod demo;
|
pub mod demo;
|
||||||
pub mod index;
|
pub mod index;
|
||||||
mod plugin_section;
|
mod plugin_section;
|
||||||
|
pub mod profile;
|
||||||
pub mod upload;
|
pub mod upload;
|
||||||
|
pub mod uploads;
|
||||||
|
|
||||||
use crate::session::SessionData;
|
use crate::session::SessionData;
|
||||||
use demostf_build::Asset;
|
use demostf_build::Asset;
|
||||||
|
|
@ -23,11 +25,12 @@ pub fn render<T: Page>(page: T, session: SessionData) -> Markup {
|
||||||
let style_url = GlobalStyle::url();
|
let style_url = GlobalStyle::url();
|
||||||
html! {
|
html! {
|
||||||
(DOCTYPE)
|
(DOCTYPE)
|
||||||
html {
|
html lang = "en" {
|
||||||
head {
|
head {
|
||||||
|
meta name = "viewport" content = "initial-scale=1,width=device-width";
|
||||||
title { (page.title()) }
|
title { (page.title()) }
|
||||||
link rel="stylesheet" type="text/css" href=(style_url);
|
link rel="stylesheet" type="text/css" href=(style_url);
|
||||||
link rel="shortcut icon" type="image/svg+xml" href="images/logo.svg";
|
link rel="shortcut icon" type="image/svg+xml" href="/images/logo.svg";
|
||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
header {
|
header {
|
||||||
|
|
|
||||||
56
src/pages/profile.rs
Normal file
56
src/pages/profile.rs
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
use crate::data::demo::ListDemo;
|
||||||
|
use crate::data::user::User;
|
||||||
|
use crate::fragments::demo_list::DemoList;
|
||||||
|
use crate::pages::index::{DemoListScript, MapList};
|
||||||
|
use crate::pages::Page;
|
||||||
|
use demostf_build::Asset;
|
||||||
|
use maud::{html, Markup, Render};
|
||||||
|
use std::borrow::Cow;
|
||||||
|
|
||||||
|
pub struct Profile<'a> {
|
||||||
|
pub user: User,
|
||||||
|
pub demos: &'a [ListDemo],
|
||||||
|
pub maps: &'a [String],
|
||||||
|
pub api: &'a str,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'a> Profile<'a> {
|
||||||
|
fn map_list(&self) -> impl Render + 'a {
|
||||||
|
MapList(&self.maps)
|
||||||
|
}
|
||||||
|
fn demo_list(&self) -> impl Render + 'a {
|
||||||
|
DemoList { demos: self.demos }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Page for Profile<'_> {
|
||||||
|
fn title(&self) -> Cow<'static, str> {
|
||||||
|
format!("Demos with {} - demos.tf", self.user.name).into()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn render(&self) -> Markup {
|
||||||
|
let script = DemoListScript::url();
|
||||||
|
html! {
|
||||||
|
h1 {
|
||||||
|
"Demos with "
|
||||||
|
(self.user.name)
|
||||||
|
}
|
||||||
|
#filter-bar data-maps = (self.map_list()) data-api-base = (self.api) {}
|
||||||
|
table.demolist {
|
||||||
|
thead {
|
||||||
|
tr {
|
||||||
|
th .title { "Title" }
|
||||||
|
th .format { "Format" }
|
||||||
|
th .map { "Map" }
|
||||||
|
th .duration { "Duration" }
|
||||||
|
th .date { "Date" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tbody {
|
||||||
|
(self.demo_list())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
script defer src = (script) type = "text/javascript" {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
56
src/pages/uploads.rs
Normal file
56
src/pages/uploads.rs
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
use crate::data::demo::ListDemo;
|
||||||
|
use crate::data::user::User;
|
||||||
|
use crate::fragments::demo_list::DemoList;
|
||||||
|
use crate::pages::index::{DemoListScript, MapList};
|
||||||
|
use crate::pages::Page;
|
||||||
|
use demostf_build::Asset;
|
||||||
|
use maud::{html, Markup, Render};
|
||||||
|
use std::borrow::Cow;
|
||||||
|
|
||||||
|
pub struct Uploads<'a> {
|
||||||
|
pub user: User,
|
||||||
|
pub demos: &'a [ListDemo],
|
||||||
|
pub maps: &'a [String],
|
||||||
|
pub api: &'a str,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'a> Uploads<'a> {
|
||||||
|
fn map_list(&self) -> impl Render + 'a {
|
||||||
|
MapList(&self.maps)
|
||||||
|
}
|
||||||
|
fn demo_list(&self) -> impl Render + 'a {
|
||||||
|
DemoList { demos: self.demos }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Page for Uploads<'_> {
|
||||||
|
fn title(&self) -> Cow<'static, str> {
|
||||||
|
format!("Uploads by {} - demos.tf", self.user.name).into()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn render(&self) -> Markup {
|
||||||
|
let script = DemoListScript::url();
|
||||||
|
html! {
|
||||||
|
h1 {
|
||||||
|
"Uploads by "
|
||||||
|
(self.user.name)
|
||||||
|
}
|
||||||
|
#filter-bar data-maps = (self.map_list()) data-api-base = (self.api) {}
|
||||||
|
table.demolist {
|
||||||
|
thead {
|
||||||
|
tr {
|
||||||
|
th .title { "Title" }
|
||||||
|
th .format { "Format" }
|
||||||
|
th .map { "Map" }
|
||||||
|
th .duration { "Duration" }
|
||||||
|
th .date { "Date" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tbody {
|
||||||
|
(self.demo_list())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
script defer src = (script) type = "text/javascript" {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -20,6 +20,8 @@
|
||||||
|
|
||||||
& .solid-select-placeholder {
|
& .solid-select-placeholder {
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
& .solid-select-option {
|
& .solid-select-option {
|
||||||
|
|
@ -54,6 +56,7 @@
|
||||||
|
|
||||||
& > .mode {
|
& > .mode {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
|
max-width: 20%;
|
||||||
|
|
||||||
& .solid-select-control {
|
& .solid-select-control {
|
||||||
border-right: none;
|
border-right: none;
|
||||||
|
|
@ -64,6 +67,7 @@
|
||||||
|
|
||||||
& > .maps {
|
& > .maps {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
|
max-width: 20%;
|
||||||
|
|
||||||
& .solid-select-control {
|
& .solid-select-control {
|
||||||
border-right: none;
|
border-right: none;
|
||||||
|
|
@ -90,3 +94,33 @@
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 450px) {
|
||||||
|
#filter-bar {
|
||||||
|
height: 105px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-bar {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
& > .maps, & > .mode {
|
||||||
|
width: calc(100% - 30px);
|
||||||
|
max-width: calc(100% - 30px);
|
||||||
|
}
|
||||||
|
|
||||||
|
& > .maps, & > .mode {
|
||||||
|
.solid-select-control {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
& .reset {
|
||||||
|
border-right: var(--text-secondary) 1px solid;
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
& .solid-select-control {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
footer {
|
footer {
|
||||||
margin: 100px -31px -100px;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 35px;
|
line-height: 35px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
:root {
|
||||||
|
--icon-demos-tf: url('inline://images/logo.svg');
|
||||||
|
--icon-steam: url('inline://images/steam_login.svg');
|
||||||
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
@ -11,7 +16,7 @@ header {
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
|
|
||||||
& a, & a:visited {
|
& a, & a:visited {
|
||||||
color: var(--text-header);
|
color: var(--text-secondary);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: .5em 1em;
|
padding: .5em 1em;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
@ -20,7 +25,7 @@ header {
|
||||||
}
|
}
|
||||||
|
|
||||||
.main a {
|
.main a {
|
||||||
background: url('inline://images/logo.svg') no-repeat 0;
|
background: var(--icon-demos-tf) no-repeat 0;
|
||||||
background-size: 30px;
|
background-size: 30px;
|
||||||
padding-left: 35px;
|
padding-left: 35px;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
|
|
@ -81,7 +86,7 @@ a.steam-login:before {
|
||||||
height: inherit;
|
height: inherit;
|
||||||
width: 41px;
|
width: 41px;
|
||||||
background-size: 30px 30px;
|
background-size: 30px 30px;
|
||||||
background: rgba(255, 255, 255, 0.08) url('inline://images/steam_login.svg') no-repeat 0;
|
background: rgba(255, 255, 255, 0.08) var(--icon-steam) no-repeat 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
@import 'class-icons.css';
|
|
||||||
|
|
||||||
table.chat, table.players {
|
table.chat, table.players {
|
||||||
table-layout: fixed;
|
table-layout: fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
||||||
|
|
@ -16,13 +16,12 @@
|
||||||
--secondary-color: #444;
|
--secondary-color: #444;
|
||||||
--secondary-color-accent: #333;
|
--secondary-color-accent: #333;
|
||||||
--text-primary: black;
|
--text-primary: black;
|
||||||
--text-secondary: grey;
|
--text-secondary: #5d5d5d;
|
||||||
--highlight-primary: #3e95e6;
|
--highlight-primary: #3e95e6;
|
||||||
--highlight-secondary: #daecfa;
|
--highlight-secondary: #daecfa;
|
||||||
--button-primary: #0078e7;
|
--button-primary: #0078e7;
|
||||||
--button-secondary: #e6e6e6;
|
--button-secondary: #e6e6e6;
|
||||||
--button-critical: rgb(202, 60, 60);
|
--button-critical: rgb(202, 60, 60);
|
||||||
--text-header: grey;
|
|
||||||
--link-color: #0071b8;
|
--link-color: #0071b8;
|
||||||
--link-color-visited: #004c8b;
|
--link-color-visited: #004c8b;
|
||||||
}
|
}
|
||||||
|
|
@ -39,7 +38,6 @@
|
||||||
--highlight-secondary: #448fbe;
|
--highlight-secondary: #448fbe;
|
||||||
--button-primary: #2568ae;
|
--button-primary: #2568ae;
|
||||||
--button-secondary: #626262;
|
--button-secondary: #626262;
|
||||||
--text-header: #efefef;
|
|
||||||
--link-color: #0093ed;
|
--link-color: #0093ed;
|
||||||
--link-color-visited: #0063ff;
|
--link-color-visited: #0063ff;
|
||||||
}
|
}
|
||||||
|
|
@ -60,13 +58,19 @@ body, html {
|
||||||
.page {
|
.page {
|
||||||
background-color: var(--primary-color);
|
background-color: var(--primary-color);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 100%;
|
min-height: calc(100% - 60px);
|
||||||
max-width: 1100px;
|
max-width: 1100px;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
padding: 40px 30px 100px;
|
padding: 40px 30px 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 700px) {
|
||||||
|
.page {
|
||||||
|
padding-top: 80px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: var(--secondary-color);
|
background-color: var(--secondary-color);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue