diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 0db8e70..251ef51 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -1,37 +1,22 @@ -/* - * This is a manifest file that'll be compiled into application.css. - * - * With Propshaft, assets are served efficiently without preprocessing steps. You can still include - * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard - * cascading order, meaning styles declared later in the document or manifest will override earlier ones, - * depending on specificity. - * - * Consider organizing styles into separate files for maintainability. - */ - -/* Phantom Sans Font Faces */ @font-face { - font-family: 'Phantom Sans'; - src: url('/fonts/Regular.woff2') format('woff2'), - url('/fonts/Regular.woff') format('woff'); + font-family: "Phantom Sans"; + src: url("/fonts/Regular.woff2") format("woff2"), url("/fonts/Regular.woff") format("woff"); font-weight: normal; font-style: normal; font-display: swap; } @font-face { - font-family: 'Phantom Sans'; - src: url('/fonts/Italic.woff2') format('woff2'), - url('/fonts/Italic.woff') format('woff'); + font-family: "Phantom Sans"; + src: url("/fonts/Italic.woff2") format("woff2"), url("/fonts/Italic.woff") format("woff"); font-weight: normal; font-style: italic; font-display: swap; } @font-face { - font-family: 'Phantom Sans'; - src: url('/fonts/Bold.woff2') format('woff2'), - url('/fonts/Bold.woff') format('woff'); + font-family: "Phantom Sans"; + src: url("/fonts/Bold.woff2") format("woff2"), url("/fonts/Bold.woff") format("woff"); font-weight: bold; font-style: normal; font-display: swap; @@ -40,48 +25,31 @@ @import "https://uchu.style/color.css"; @import "settings.css"; -body, html { - font-family: 'Phantom Sans', 'Segoe UI', sans-serif; +body, +html { + font-family: "Phantom Sans", "Segoe UI", sans-serif; } -*, *::before, *::after { +*, +*::before, +*::after { font-family: inherit; } -code, pre, kbd, samp { +code, +pre, +kbd, +samp { font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace; } - -/* Force dark mode for all elements */ -*, *::before, *::after { - color-scheme: dark; -} - /* Ensure forms and inputs respect dark mode */ -input, textarea, select { +input, +textarea, +select { color-scheme: dark; } -/* colors */ - -:root { - --muted-color: var(--uchu-gray); - --black: rgb(42, 42, 42); - --smoke: rgb(242, 242, 242); - /* Force dark mode colors */ - color-scheme: dark; -} - -:root.development { - --primary-color: var(--color-green); -} -:root.production { - --primary-color: var(--color-primary); -} - - - .admin-tool { border-radius: 5px; border: 1px dashed hsl(24.9, 100%, 67.8%); @@ -109,7 +77,6 @@ input, textarea, select { } .auto-scroll { - /* flash a little bit yellow & leave a little bit of a border */ animation: flash 1s ease-in-out; border: 2px solid var(--uchu-yellow); border-radius: 5px; @@ -128,5 +95,3 @@ select { background-color: transparent; } } - - diff --git a/app/assets/stylesheets/tools.css b/app/assets/stylesheets/tools.css deleted file mode 100644 index 308e7f5..0000000 --- a/app/assets/stylesheets/tools.css +++ /dev/null @@ -1,69 +0,0 @@ -/* Admin and Dev Tool styles */ -.admin-tool { - border-radius: 5px; - border: 1px dashed var(--uchu-orange); - position: relative; - transition: all 0.2s ease; -} - -.admin-tool::before { - content: ''; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: var(--uchu-orange); - opacity: 0.1; - z-index: -1; - border-radius: 4px; -} - -.dev-tool { - border-radius: 5px; - border: 1px dashed var(--uchu-green); - position: relative; - transition: all 0.2s ease; -} - -.dev-tool::before { - content: ''; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: var(--uchu-green); - opacity: 0.1; - z-index: -1; - border-radius: 4px; -} - - - .admin-tool::before { - opacity: 1; - background-color: rgba(255, 166, 0, 0.02); /* Orange with very low opacity */ - } - - .dev-tool::before { - opacity: 1; - background-color: rgba(0, 255, 0, 0.02); /* Green with very low opacity */ - } - - /* Improve text contrast in dark mode */ - .admin-tool, - .dev-tool { - background-color: rgba(255, 255, 255, 0.02); - color: rgba(255, 255, 255, 0.9); - } - - /* Make links more visible */ - .admin-tool a, - .dev-tool a { - color: var(--uchu-yellow); - } - - .admin-tool a:hover, - .dev-tool a:hover { - color: var(--uchu-orange); - } diff --git a/app/assets/tailwind/application.css b/app/assets/tailwind/application.css index 4256ffd..79563ff 100644 --- a/app/assets/tailwind/application.css +++ b/app/assets/tailwind/application.css @@ -15,6 +15,10 @@ --color-secondary: #8492A6; } +:root.development { + --color-primary: var(--color-green); +} + /* for some reason tailwind just does not want to work, so lets make sure it does */ .bg-darker { background-color: var(--color-darker) !important; } .bg-dark { background-color: var(--color-dark) !important; } diff --git a/app/views/leaderboards/_mini_leaderboard.html.erb b/app/views/leaderboards/_mini_leaderboard.html.erb index 0e59e97..3d6ec32 100644 --- a/app/views/leaderboards/_mini_leaderboard.html.erb +++ b/app/views/leaderboards/_mini_leaderboard.html.erb @@ -19,7 +19,7 @@ %> <% if mini_leaderboard_entries&.any? %> -
<% if leaderboard.respond_to?(:scope_name) %> Showing others in <%= link_to "your timezone", my_settings_path(anchor: "user_timezone"), data: { turbo: false }, class: "text-accent hover:text-cyan-400 transition-colors" %> @@ -37,7 +37,7 @@ is_separator_needed = show_user_separately && idx == 3 && actual_rank > 3 %> -
This leaderboard is in <%= Leaderboard::GLOBAL_TIMEZONE %>. <% if current_user && timezone_difference_in_seconds(Leaderboard::GLOBAL_TIMEZONE, current_user.timezone) != 0 %> diff --git a/app/views/leaderboards/index.html.erb b/app/views/leaderboards/index.html.erb index 630d500..0089fa3 100644 --- a/app/views/leaderboards/index.html.erb +++ b/app/views/leaderboards/index.html.erb @@ -31,7 +31,7 @@
This affects how your activity graph and other time-based features are displayed.
<%= f.submit "Save Settings", class: "w-full px-4 py-2 bg-primary text-white font-medium rounded transition-colors duration-200" %> <% end %>