Compare commits
3 commits
a21aa34104
...
62cce216df
Author | SHA1 | Date | |
---|---|---|---|
62cce216df | |||
1ed0524573 | |||
0d470d43d8 |
8 changed files with 71 additions and 181 deletions
|
@ -2,6 +2,8 @@ import { highlightElement } from "@speed-highlight/core";
|
||||||
import { createRef } from "tsx-dom";
|
import { createRef } from "tsx-dom";
|
||||||
import socket from "../../utilities/socket";
|
import socket from "../../utilities/socket";
|
||||||
|
|
||||||
|
import colors from "../../colors.module.css";
|
||||||
|
|
||||||
const activityTypes: Record<number, string> = {
|
const activityTypes: Record<number, string> = {
|
||||||
0: "Playing",
|
0: "Playing",
|
||||||
1: "Streaming",
|
1: "Streaming",
|
||||||
|
@ -19,9 +21,9 @@ export default () => {
|
||||||
|
|
||||||
const streamingActivity = lanyard.activities.find((act) => act.type === 1);
|
const streamingActivity = lanyard.activities.find((act) => act.type === 1);
|
||||||
if (streamingActivity) {
|
if (streamingActivity) {
|
||||||
document.documentElement.className = "streaming";
|
document.documentElement.className = colors.streaming || "";
|
||||||
} else {
|
} else {
|
||||||
document.documentElement.className = lanyard.discord_status;
|
document.documentElement.className = colors[lanyard.discord_status] || "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lanyard.activities.length === 0) {
|
if (lanyard.activities.length === 0) {
|
||||||
|
|
34
src/front/components/pages/About/index.module.css
Normal file
34
src/front/components/pages/About/index.module.css
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
.container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
width: 90%;
|
||||||
|
padding: .5rem;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.avatar {
|
||||||
|
width: 5rem;
|
||||||
|
height: inherit;
|
||||||
|
border: 2px solid rgb(var(--mdui-color-primary));
|
||||||
|
}
|
||||||
|
|
||||||
|
.lanyard {
|
||||||
|
display: var(--lanyard-display);
|
||||||
|
}
|
||||||
|
|
||||||
|
.hyperate {
|
||||||
|
display: var(--hyperate-display);
|
||||||
|
}
|
|
@ -7,39 +7,23 @@ import "mdui/components/segmented-button";
|
||||||
import Hyperate from "../../Hyperate";
|
import Hyperate from "../../Hyperate";
|
||||||
import Lanyard from "../../Lanyard";
|
import Lanyard from "../../Lanyard";
|
||||||
|
|
||||||
|
import styles from "./index.module.css";
|
||||||
|
import colors from "../../../colors.module.css";
|
||||||
|
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
style={{
|
class={styles.container}
|
||||||
display: "flex",
|
|
||||||
justifyContent: "center",
|
|
||||||
alignItems: "center",
|
|
||||||
flexDirection: "column",
|
|
||||||
height: "100%",
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<mdui-card
|
<mdui-card
|
||||||
// @ts-expect-error; variant is not in the types for some reason?
|
// @ts-expect-error; variant is not in the types for some reason?
|
||||||
variant="filled"
|
variant="filled"
|
||||||
style={{
|
class={`${styles.card} ${styles.center}`}
|
||||||
width: "90%",
|
|
||||||
padding: ".5rem",
|
|
||||||
display: "flex",
|
|
||||||
justifyContent: "center",
|
|
||||||
alignItems: "center",
|
|
||||||
flexDirection: "column",
|
|
||||||
|
|
||||||
textAlign: "center",
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<mdui-avatar
|
<mdui-avatar
|
||||||
style={{
|
|
||||||
width: "5rem",
|
|
||||||
height: "inherit",
|
|
||||||
border: "2px solid rgb(var(--mdui-color-primary))",
|
|
||||||
}}
|
|
||||||
src="/public/Abyssinian/default.png"
|
src="/public/Abyssinian/default.png"
|
||||||
class="pfp"
|
class={`${styles.avatar} ${colors.pfp}`}
|
||||||
/>
|
/>
|
||||||
<p>
|
<p>
|
||||||
Seth, the <strong>dedicated</strong> backend developer, with many{" "}
|
Seth, the <strong>dedicated</strong> backend developer, with many{" "}
|
||||||
|
@ -55,47 +39,25 @@ export default () => {
|
||||||
</mdui-card>
|
</mdui-card>
|
||||||
|
|
||||||
<br
|
<br
|
||||||
style={{
|
class={styles.lanyard}
|
||||||
display: "var(--lanyard-display)",
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<mdui-card
|
<mdui-card
|
||||||
// @ts-expect-error; variant is not in the types for some reason?
|
// @ts-expect-error; variant is not in the types for some reason?
|
||||||
variant="filled"
|
variant="filled"
|
||||||
style={{
|
class={`${styles.card} ${styles.lanyard}`}
|
||||||
width: "90%",
|
|
||||||
padding: ".5rem",
|
|
||||||
// center the contents
|
|
||||||
display: "var(--lanyard-display, flex)",
|
|
||||||
justifyContent: "center",
|
|
||||||
alignItems: "center",
|
|
||||||
flexDirection: "column",
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<Lanyard />
|
<Lanyard />
|
||||||
</mdui-card>
|
</mdui-card>
|
||||||
|
|
||||||
<br
|
<br
|
||||||
style={{
|
class={styles.hyperate}
|
||||||
display: "var(--hyperate-display)",
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<mdui-card
|
<mdui-card
|
||||||
// @ts-expect-error; variant is not in the types for some reason?
|
// @ts-expect-error; variant is not in the types for some reason?
|
||||||
variant="filled"
|
variant="filled"
|
||||||
style={{
|
class={`${styles.card} ${styles.center} ${styles.hyperate}`}
|
||||||
width: "90%",
|
|
||||||
padding: ".5rem",
|
|
||||||
// center the contents
|
|
||||||
display: "var(--hyperate-display, flex)",
|
|
||||||
justifyContent: "center",
|
|
||||||
alignItems: "center",
|
|
||||||
flexDirection: "column",
|
|
||||||
|
|
||||||
textAlign: "center",
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<Hyperate />
|
<Hyperate />
|
||||||
</mdui-card>
|
</mdui-card>
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
@import "../../node_modules/@fontsource/roboto-mono/latin-400.css";
|
@import "../../node_modules/@fontsource/roboto-mono/latin-400.css";
|
||||||
*/
|
*/
|
||||||
@import "../../node_modules/mdui/mdui.css";
|
@import "../../node_modules/mdui/mdui.css";
|
||||||
@import "./colors.css";
|
|
||||||
|
|
||||||
:not(:defined) {
|
:not(:defined) {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
|
@ -22,12 +21,12 @@ body {
|
||||||
background-color: rgb(var(--mdui-color-background));
|
background-color: rgb(var(--mdui-color-background));
|
||||||
}
|
}
|
||||||
|
|
||||||
[class*="shj-lang-"] {
|
.shj-lang-json {
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
color: #112;
|
color: #f8f8f2;
|
||||||
|
background: var(--mdui-color-secondary-container);
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background: #dedede;
|
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
max-width: min(100%, 100vw);
|
max-width: min(100%, 100vw);
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
|
@ -35,6 +34,14 @@ body {
|
||||||
font:
|
font:
|
||||||
18px / 24px monospace;
|
18px / 24px monospace;
|
||||||
box-shadow: 0 0 5px #0001;
|
box-shadow: 0 0 5px #0001;
|
||||||
|
|
||||||
|
:before {
|
||||||
|
color: #6f9aff;
|
||||||
|
}
|
||||||
|
|
||||||
|
::selection {
|
||||||
|
background: #bdf5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.shj-inline {
|
.shj-inline {
|
||||||
|
@ -44,140 +51,15 @@ body {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
[class*="shj-lang-"]::selection {
|
|
||||||
background: #bdf5;
|
|
||||||
}
|
|
||||||
|
|
||||||
[class*="shj-lang-"] ::selection {
|
|
||||||
background: #bdf5;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
[class*="shj-lang-"] > div {
|
|
||||||
display: flex;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
[class*="shj-lang-"] > div :last-child {
|
|
||||||
outline: none;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shj-numbers {
|
|
||||||
counter-reset: line;
|
|
||||||
padding-left: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shj-numbers div {
|
|
||||||
padding-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shj-numbers div:before {
|
|
||||||
color: #999;
|
|
||||||
content: counter(line);
|
|
||||||
opacity: 0.5;
|
|
||||||
text-align: right;
|
|
||||||
counter-increment: line;
|
|
||||||
margin-right: 5px;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shj-syn-cmnt {
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shj-syn-err,
|
|
||||||
.shj-syn-kwd {
|
|
||||||
color: #e16;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shj-syn-num,
|
|
||||||
.shj-syn-class {
|
|
||||||
color: #f60;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
.shj-syn-insert,
|
|
||||||
.shj-syn-str {
|
.shj-syn-str {
|
||||||
color: #7d8;
|
color: #7d8;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
.shj-syn-bool {
|
|
||||||
color: #3bf;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shj-syn-type,
|
|
||||||
.shj-syn-oper {
|
|
||||||
color: #5af;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shj-syn-section,
|
|
||||||
.shj-syn-func {
|
|
||||||
color: #84f;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
.shj-syn-deleted,
|
|
||||||
.shj-syn-var {
|
|
||||||
color: #f44;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
.shj-oneline {
|
|
||||||
padding: 12px 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shj-lang-http.shj-oneline .shj-syn-kwd {
|
|
||||||
color: #fff;
|
|
||||||
background: #25f;
|
|
||||||
border-radius: 5px;
|
|
||||||
padding: 5px 7px;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
[class*="shj-lang-"] {
|
|
||||||
color: #f8f8f2;
|
|
||||||
background: var(--mdui-color-secondary-container);
|
|
||||||
}
|
|
||||||
|
|
||||||
[class*="shj-lang-"]:before {
|
|
||||||
color: #6f9aff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shj-syn-deleted,
|
|
||||||
.shj-syn-err,
|
|
||||||
.shj-syn-var {
|
.shj-syn-var {
|
||||||
color: #ff5261;
|
color: #ff5261;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
.shj-syn-section,
|
|
||||||
.shj-syn-kwd {
|
|
||||||
color: #ff7cc6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shj-syn-class {
|
|
||||||
color: #eab07c;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shj-numbers,
|
|
||||||
.shj-syn-cmnt {
|
|
||||||
color: #7d828b;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shj-syn-insert,
|
|
||||||
.shj-syn-type,
|
|
||||||
.shj-syn-func,
|
|
||||||
.shj-syn-bool {
|
|
||||||
color: #71d58a;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shj-syn-num {
|
|
||||||
color: #b581fd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shj-syn-oper {
|
|
||||||
color: #80c6ff;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
.shj-syn-str {
|
.shj-syn-str {
|
||||||
color: #4dacfa;
|
color: #4dacfa;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" class="offline">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
|
|
|
@ -4,6 +4,10 @@ import "./utilities/clicker";
|
||||||
|
|
||||||
import App from "./App";
|
import App from "./App";
|
||||||
|
|
||||||
|
import colors from "./colors.module.css";
|
||||||
|
|
||||||
|
document.documentElement.className = colors.offline || "";
|
||||||
|
|
||||||
document.body.appendChild(<App />);
|
document.body.appendChild(<App />);
|
||||||
|
|
||||||
// You're garbage, let me collect you.
|
// You're garbage, let me collect you.
|
||||||
|
|
6
types/css.d.ts
vendored
Normal file
6
types/css.d.ts
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
declare module '*.module.css' {
|
||||||
|
const styles: {
|
||||||
|
readonly [key: string]: string
|
||||||
|
}
|
||||||
|
export default styles
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue