Move all css to theme.cs

This commit is contained in:
2026-02-14 22:45:34 -05:00
parent 928ee46b9d
commit d523c31953
2 changed files with 288 additions and 327 deletions

View File

@@ -2,9 +2,9 @@
import axios from "axios";
import dayjs from "dayjs";
import utc from "dayjs/plugin/utc";
import { ref } from "vue";
import "vue-loading-overlay/dist/css/index.css";
import "./theme.css";
// Configure day.js with UTC support
dayjs.extend(utc);
@@ -191,10 +191,6 @@ export default {
};
</script>
<script setup>
const sortBy = ref([{ key: "score", order: "desc" }]);
</script>
<template>
<v-app>
<v-main>
@@ -247,7 +243,6 @@ const sortBy = ref([{ key: "score", order: "desc" }]);
<span class="dealer-name" v-html="highlightDealerName(topic.Offer.dealer_name)"></span>
</div>
<!-- Card details -->
<div class="card-details">
<div class="details-stats">
<div class="stat">
@@ -272,291 +267,4 @@ const sortBy = ref([{ key: "score", order: "desc" }]);
</v-app>
</template>
<style scoped>
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
background-color: var(--bg-primary);
color: var(--text-primary);
min-height: 100vh;
}
.header {
margin-bottom: 30px;
}
.search-input {
width: 100%;
max-width: 500px;
}
.cards-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
gap: 20px;
margin-top: 20px;
}
.deal-card {
background-color: var(--bg-secondary);
border: 1.5px solid #aaaaaa;
border-radius: 12px;
padding: 16px;
display: flex;
flex-direction: column;
transition: all 0.2s ease;
min-height: auto;
}
.deal-card:hover {
background-color: rgba(0, 0, 0, 0.03);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
border-color: #999999;
}
html.dark-theme .deal-card:hover {
background-color: rgba(255, 255, 255, 0.03);
}
.card-header {
display: flex;
gap: 12px;
align-items: flex-start;
margin-bottom: 12px;
justify-content: space-between;
}
.title-with-link {
display: flex;
align-items: flex-start;
gap: 6px;
flex: 1;
}
.deal-title {
color: var(--link-color);
text-decoration: none;
font-weight: 500;
font-size: 15px;
line-height: 1.4;
flex: 1;
transition: color 0.2s ease;
}
.deal-title:visited {
color: var(--link-visited);
}
.deal-title:hover {
text-decoration: underline;
}
.card-meta {
display: flex;
flex-direction: column;
gap: 6px;
font-size: 13px;
margin-bottom: 12px;
}
.dealer-name {
color: var(--text-secondary);
font-weight: 500;
font-size: 13px;
}
.card-timestamp {
color: var(--text-secondary);
font-size: 12px;
margin-top: 8px;
}
.card-link {
display: inline-flex;
align-items: center;
justify-content: center;
color: var(--link-color);
text-decoration: none;
transition: all 0.2s ease;
flex-shrink: 0;
}
.card-link:hover {
opacity: 0.7;
}
.card-link .material-symbols-outlined {
font-size: 18px;
}
.score-bubble {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 50px;
height: 40px;
border-radius: 6px;
font-weight: 700;
font-size: 12px;
flex-shrink: 0;
transition: all 0.2s ease;
padding: 0 8px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
border: none;
}
.score-bubble.positive {
background-color: rgb(34, 139, 34);
color: white;
box-shadow: 0 1px 3px rgba(34, 139, 34, 0.2);
}
html.light-theme .score-bubble.positive {
background-color: rgb(34, 139, 34);
color: white;
box-shadow: 0 1px 3px rgba(34, 139, 34, 0.2);
}
html.dark-theme .score-bubble.positive {
background-color: rgb(158, 206, 106);
color: #1a1a1a;
box-shadow: 0 1px 3px rgba(158, 206, 106, 0.2);
}
.score-bubble.negative {
background-color: rgb(247, 118, 142);
color: white;
box-shadow: 0 1px 3px rgba(247, 118, 142, 0.2);
}
.score-bubble.neutral {
background-color: var(--text-secondary);
color: var(--bg-primary);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.card-details {
margin-top: 12px;
padding-top: 12px;
border-top: 1px solid var(--border-color);
}
.details-stats {
display: flex;
gap: 16px;
margin-bottom: 12px;
}
.stat {
display: flex;
align-items: center;
gap: 6px;
font-size: 13px;
color: var(--text-secondary);
}
.stat .material-symbols-outlined {
font-size: 18px;
}
.stat-value {
font-weight: 500;
}
.details-section {
margin-bottom: 12px;
}
.details-section strong {
display: block;
color: var(--text-primary);
margin-bottom: 4px;
font-size: 13px;
}
.details-section p {
margin: 0;
color: var(--text-secondary);
font-size: 12px;
line-height: 1.4;
word-wrap: break-word;
}
/* Mobile responsive */
@media (max-width: 768px) {
.cards-grid {
grid-template-columns: 1fr;
}
.container {
padding: 12px;
}
.search-input {
max-width: 100%;
}
}
/* Mark highlighting */
:deep(mark) {
background-color: rgba(255, 193, 7, 0.3);
color: inherit;
font-weight: 600;
border-radius: 2px;
}
html.dark-theme :deep(mark) {
background-color: rgba(255, 193, 7, 0.4);
color: inherit;
font-weight: 600;
border-radius: 2px;
}
/* Vuetify overrides */
:deep(.v-text-field) {
--v-field-border-color: #cccccc;
}
html[data-bs-theme="light"] :deep(.v-text-field) {
--v-field-border-color: #e8e8e8;
}
html[data-bs-theme="light"] :deep(.v-field__input) {
background-color: #d0d0d0 !important;
}
html[data-bs-theme="light"] :deep(.v-field--focused .v-field__input) {
background-color: #e8e8e8 !important;
}
html[data-bs-theme="dark"] :deep(.v-text-field) {
--v-field-border-color: #555555;
}
html.light-theme :deep(.v-text-field) {
--v-field-border-color: #cccccc;
}
html.light-theme :deep(.v-field__input) {
background-color: #d0d0d0 !important;
}
html.light-theme :deep(.v-field--focused .v-field__input) {
background-color: #e8e8e8 !important;
}
html.dark-theme :deep(.v-text-field) {
--v-field-border-color: #555555;
}
/* Ensure v-app and v-main use theme colors */
:deep(.v-app) {
background-color: var(--bg-primary) !important;
color: var(--text-primary) !important;
}
:deep(.v-main) {
background-color: var(--bg-primary) !important;
}
</style>

View File

@@ -21,8 +21,6 @@
--text-secondary: #6c757d;
--border-color: #d0d0d0;
--link-color: #212529;
--footer-bg: #f8f9fa;
--footer-text: #212529;
}
/* Dark theme */
@@ -34,8 +32,6 @@
--text-secondary: #a0a0a0;
--border-color: #3a3a3a;
--link-color: #212529;
--footer-bg: #1a1a1a;
--footer-text: #e0e0e0;
}
}
@@ -47,8 +43,6 @@ html[data-bs-theme="dark"] {
--text-secondary: #a0a0a0;
--border-color: #3a3a3a;
--link-color: ##e0e0e0;
--footer-bg: #1a1a1a;
--footer-text: #e0e0e0;
}
html[data-bs-theme="light"],
@@ -59,8 +53,6 @@ html.light-theme {
--text-secondary: #6c757d;
--border-color: #d0d0d0;
--link-color: #212529;
--footer-bg: #f8f9fa;
--footer-text: #212529;
}
html {
@@ -81,23 +73,6 @@ body {
padding: 0;
}
footer {
background: var(--footer-bg);
color: var(--footer-text);
padding: 3px;
padding-right: 10px;
padding-left: 10px;
border-top: 1px solid var(--border-color);
}
.footer-left {
float: left;
}
.footer-right {
float: right;
}
.green-score {
color: rgb(34, 139, 34) !important;
}
@@ -125,9 +100,8 @@ a:visited {
@media (min-width: 769px) {
.v-data-table-header th,
.v-data-table__td,
.v-data-footer {
font-size: 1.2rem;
.v-data-table__td {
border-color: #888888 !important;
}
}
@@ -158,12 +132,6 @@ html.dark-theme .v-data-table-header th {
border-color: #888888 !important;
}
html.dark-theme .v-data-footer {
background-color: #2a2a2a !important;
color: #e0e0e0 !important;
border-color: #888888 !important;
}
html.dark-theme .v-data-table__divider {
border-color: #888888 !important;
}
@@ -198,3 +166,288 @@ html.light-theme .v-data-table-header th {
color: #212529 !important;
border-color: #dee2e6 !important;
}
/* App.vue scoped styles */
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
background-color: var(--bg-primary);
color: var(--text-primary);
min-height: 100vh;
}
.header {
margin-bottom: 30px;
}
.search-input {
width: 100%;
max-width: 500px;
}
.cards-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
gap: 20px;
margin-top: 20px;
}
.deal-card {
background-color: var(--bg-secondary);
border: 1.5px solid #aaaaaa;
border-radius: 12px;
padding: 16px;
display: flex;
flex-direction: column;
transition: all 0.2s ease;
min-height: auto;
}
.deal-card:hover {
background-color: #15151515;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
border-color: #999999;
}
.card-header {
display: flex;
gap: 12px;
align-items: flex-start;
margin-bottom: 12px;
justify-content: space-between;
}
.title-with-link {
display: flex;
align-items: flex-start;
gap: 6px;
flex: 1;
}
.deal-title {
color: var(--link-color);
text-decoration: none;
font-weight: 500;
font-size: 15px;
line-height: 1.4;
flex: 1;
transition: color 0.2s ease;
}
.deal-title:visited {
color: var(--link-visited);
}
.deal-title:hover {
text-decoration: underline;
}
.card-meta {
display: flex;
flex-direction: column;
gap: 6px;
font-size: 13px;
margin-bottom: 12px;
}
.dealer-name {
color: var(--text-secondary);
font-weight: 500;
font-size: 13px;
}
.card-timestamp {
color: var(--text-secondary);
font-size: 12px;
margin-top: 8px;
}
.card-link {
display: inline-flex;
align-items: center;
justify-content: center;
color: var(--link-color);
text-decoration: none;
transition: all 0.2s ease;
flex-shrink: 0;
}
.card-link:hover {
opacity: 0.7;
}
.card-link .material-symbols-outlined {
font-size: 18px;
}
.score-bubble {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 50px;
height: 40px;
border-radius: 6px;
font-weight: 700;
font-size: 12px;
flex-shrink: 0;
transition: all 0.2s ease;
padding: 0 8px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
border: none;
}
.score-bubble.positive {
background-color: rgb(34, 139, 34);
color: white;
box-shadow: 0 1px 3px rgba(34, 139, 34, 0.2);
}
html.light-theme .score-bubble.positive {
background-color: rgb(34, 139, 34);
color: white;
box-shadow: 0 1px 3px rgba(34, 139, 34, 0.2);
}
html.dark-theme .score-bubble.positive {
background-color: rgb(158, 206, 106);
color: #1a1a1a;
box-shadow: 0 1px 3px rgba(158, 206, 106, 0.2);
}
.score-bubble.negative {
background-color: rgb(247, 118, 142);
color: white;
box-shadow: 0 1px 3px rgba(247, 118, 142, 0.2);
}
.score-bubble.neutral {
background-color: var(--text-secondary);
color: var(--bg-primary);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.card-details {
margin-top: 12px;
padding-top: 12px;
border-top: 1px solid var(--border-color);
}
.details-stats {
display: flex;
gap: 16px;
margin-bottom: 12px;
}
.stat {
display: flex;
align-items: center;
gap: 6px;
font-size: 13px;
color: var(--text-secondary);
}
.stat .material-symbols-outlined {
font-size: 18px;
}
.stat-value {
font-weight: 500;
}
.details-section {
margin-bottom: 12px;
}
.details-section strong {
display: block;
color: var(--text-primary);
margin-bottom: 4px;
font-size: 13px;
}
.details-section p {
margin: 0;
color: var(--text-secondary);
font-size: 12px;
line-height: 1.4;
word-wrap: break-word;
}
/* Mobile responsive */
@media (max-width: 768px) {
.cards-grid {
grid-template-columns: 1fr;
}
.container {
padding: 12px;
}
.search-input {
max-width: 100%;
}
}
/* Mark highlighting */
mark {
background-color: rgba(255, 193, 7, 0.3);
color: inherit;
font-weight: 600;
border-radius: 2px;
}
html.dark-theme mark {
background-color: rgba(255, 193, 7, 0.4);
color: inherit;
font-weight: 600;
border-radius: 2px;
}
/* Vuetify overrides */
.v-text-field {
--v-field-border-color: #cccccc;
}
html[data-bs-theme="light"] .v-text-field {
--v-field-border-color: #e8e8e8;
}
html[data-bs-theme="light"] .v-field__input {
background-color: #d0d0d0 !important;
}
html[data-bs-theme="light"] .v-field--focused .v-field__input {
background-color: #e8e8e8 !important;
}
html[data-bs-theme="dark"] .v-text-field {
--v-field-border-color: #555555;
}
html.light-theme .v-text-field {
--v-field-border-color: #cccccc;
}
html.light-theme .v-field__input {
background-color: #d0d0d0 !important;
}
html.light-theme .v-field--focused .v-field__input {
background-color: #e8e8e8 !important;
}
html.dark-theme .v-text-field {
--v-field-border-color: #555555;
}
/* Ensure v-app and v-main use theme colors */
.v-app {
background-color: var(--bg-primary) !important;
color: var(--text-primary) !important;
}
.v-main {
background-color: var(--bg-primary) !important;
}