From 6a848158b079af271363392c36921c6e623046a3 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sun, 26 Oct 2025 04:09:50 +0500 Subject: feat: design (it doesn't look the same as tinyemotes) --- lib/config.php | 2 ++ lib/partials.php | 22 +++++++++++++ sounds/upload.php | 45 +++++++++++++++++--------- static/style.css | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 149 insertions(+), 15 deletions(-) create mode 100644 lib/partials.php diff --git a/lib/config.php b/lib/config.php index 8705999..73c2efb 100644 --- a/lib/config.php +++ b/lib/config.php @@ -8,6 +8,8 @@ define('DB_URL', "{$c['database']['driver']}:dbname={$c['database']['name']};hos define('DB_USER', $c['database']['user'] ?? null); define('DB_PASS', $c['database']['pass'] ?? null); +define('INSTANCE_NAME', $c['instance']['name'] ?? $_SERVER['HTTP_HOST']); + define('SOUND_DIRECTORY', $c['sound']['directory'] ?? "{$_SERVER['DOCUMENT_ROOT']}/static/userdata/sounds"); define('IS_JSON_REQUEST', isset($_SERVER['HTTP_ACCEPT']) && str_contains($_SERVER['HTTP_ACCEPT'], 'application/json')); \ No newline at end of file diff --git a/lib/partials.php b/lib/partials.php new file mode 100644 index 0000000..d7026ec --- /dev/null +++ b/lib/partials.php @@ -0,0 +1,22 @@ + +
+
+ + +

+
+ + + + + + +
+
+ -
-
- - -
-
- - -
+ -
- - -
+
+
+
+
+

Upload a new sound

+
+
+ +
+ + +
+
+ + +
- - +
+ + +
+ + + +
+
+
+
\ No newline at end of file diff --git a/static/style.css b/static/style.css index a068d89..05a2676 100644 --- a/static/style.css +++ b/static/style.css @@ -1,4 +1,99 @@ +:root { + --primary-1: #97ca96; + --primary-2: #c6eec5; + --primary-3: #d5e9d5; + --border: #445e43; +} + * { padding: 0; margin: 0; +} + +body { + background: var(--primary-3); + width: 100%; + min-height: 100vh; +} + +main { + padding: 8px; +} + +header { + background: linear-gradient(0deg, var(--primary-1), var(--primary-2)); + border-bottom: 1px solid var(--border); + display: flex; + flex-direction: row; + padding: 2px 8px; +} + +header .brand { + display: flex; + flex-direction: row; + gap: 8px; + align-items: end; +} + +header .brand>a { + text-decoration: none; + color: black; + font-size: 12px; +} + +.box { + background: var(--primary-1); + border: 1px solid var(--border); + padding: 8px; + border-radius: 4px; +} + +.box:has(.content):has(.tab) { + background-color: unset; + border: unset; + padding: unset; + border-radius: unset; +} + +.box>.tab { + display: inline-block; + background: var(--primary-1); + padding: 4px 8px; + border: 1px solid var(--border); + border-bottom: unset; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + margin-bottom: -1px; +} + +.box>.content { + background: var(--primary-1); + border: 1px solid var(--border); + padding: 8px; + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + border-top-right-radius: 4px; +} + +.sound-list { + display: flex; + flex-direction: row; + flex-wrap: wrap; + gap: 16px; +} + +.sound-item { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} + +.sound-item>.timestamp { + font-size: 12px; +} + +.row { + display: flex; + flex-direction: row; } \ No newline at end of file -- cgit v1.2.3